*-b*, *--one-byte-octal*::
_One-byte octal display_. Display the input offset in hexadecimal, followed by sixteen space-separated, three-column, zero-filled bytes of input data, in octal, per line.
+*-X*, *--one-byte-hex*::
+_One-byte hexadecimal display_. Display the input offset in hexadecimal, followed by sixteen space-separated, two-column, zero-filled bytes of input data, in hexadecimal, per line.
+
*-c*, *--one-byte-char*::
_One-byte character display_. Display the input offset in hexadecimal, followed by sixteen space-separated, three-column, space-filled characters of input data per line.
static const struct option longopts[] = {
{"one-byte-octal", no_argument, NULL, 'b'},
+ {"one-byte-hex", no_argument, NULL, 'X'},
{"one-byte-char", no_argument, NULL, 'c'},
{"canonical", no_argument, NULL, 'C'},
{"two-bytes-decimal", no_argument, NULL, 'd'},
{NULL, no_argument, NULL, 0}
};
- while ((ch = getopt_long(argc, argv, "bcCde:f:L::n:os:vxhV", longopts, NULL)) != -1) {
+ while ((ch = getopt_long(argc, argv, "bXcCde:f:L::n:os:vxhV", longopts, NULL)) != -1) {
switch (ch) {
case 'b':
add_fmt(hex_offt, hex);
add_fmt("\"%07.7_ax \" 16/1 \"%03o \" \"\\n\"", hex);
break;
+ case 'X':
+ add_fmt("\"%07.7_Ax\n\"", hex);
+ add_fmt("\"%07.7_ax \" 16/1 \" %02x \" \"\\n\"", hex);
+ break;
case 'c':
add_fmt(hex_offt, hex);
add_fmt("\"%07.7_ax \" 16/1 \"%3_c \" \"\\n\"", hex);
fputs(USAGE_OPTIONS, out);
fputs(_(" -b, --one-byte-octal one-byte octal display\n"), out);
+ fputs(_(" -X, --one-byte-hex one-byte hexadecimal display\n"), out);
fputs(_(" -c, --one-byte-char one-byte character display\n"), out);
fputs(_(" -C, --canonical canonical hex+ASCII display\n"), out);
fputs(_(" -d, --two-bytes-decimal two-byte decimal display\n"), out);