[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

od: add explicit support for shell integers (intmax_t)

From: John Isidore
Subject: od: add explicit support for shell integers (intmax_t)
Date: Thu, 2 Oct 2014 01:30:00 +0400

od supports 'long int' using L size e.g., '-t uL'. I suggest
adding M size where M stands for sizeof(intmax_t): '-t uM'.

Something like:

diff --git i/src/od.c w/src/od.c
index 18b1683..2dd1740 100644
--- i/src/od.c
+++ w/src/od.c
@@ -671,6 +671,11 @@ decode_one_format (const char *s_orig, const char
*s, const char **next,
            size = sizeof (long int);

+        case 'M':
+          ++s;
+          size = sizeof (intmax_t);
+          break;
            if (! simple_strtoul (s, &p, &size))

As far as I can see, it should be enough (excluding tests, docs).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]