hexdump/xxd: a bit more condensed formats
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 25 Jan 2017 02:07:39 +0000 (03:07 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 25 Jan 2017 02:07:39 +0000 (03:07 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/hexdump.c
util-linux/hexdump_xxd.c

index 4b536e1c23cab80e24bde26f52b28bf08c6ca80f..a4483a114c6745212d6af2115c6d59e101d0ec86 100644 (file)
@@ -127,8 +127,8 @@ int hexdump_main(int argc, char **argv)
                if (ch == 'C') {
  hd_applet:
                        bb_dump_add(dumper, "\"%08.8_Ax\n\""); // final address line after dump
-                       //------------------- "address  "  8 * "xx "      "  " 8 * "xx "
-                       bb_dump_add(dumper, "\"%08.8_ax  \"8/1 \"%02x \" \"  \"8/1 \"%02x \"");
+                       //------------------- "address  "   8 * "xx "    "  "  8 * "xx "
+                       bb_dump_add(dumper, "\"%08.8_ax  \"8/1 \"%02x \"\"  \"8/1 \"%02x \"");
                        //------------------- "  |ASCII...........|\n"
                        bb_dump_add(dumper, "\"  |\"16/1 \"%_p\"\"|\n\"");
                }
index 3a7e64bb9ac431bb60e0428e4922ec55b8db34a2..813e7fe57793ad6f429bf1f6d1d03511b141cb82 100644 (file)
@@ -125,7 +125,7 @@ int xxd_main(int argc UNUSED_PARAM, char **argv)
                free(bigbuf);
        }
 
-       sprintf(buf, "\"  \" %u/1 \"%%_p\" \"\n\"", cols); // "  ASCII\n"
+       sprintf(buf, "\"  \"%u/1 \"%%_p\"\"\n\"", cols); // "  ASCII\n"
        bb_dump_add(dumper, buf);
 
        return bb_dump_dump(dumper, argv);