hexdump/xxd: a bit more condensed formats
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
0f4364775f
commit
8a2657cbf5
@ -127,8 +127,8 @@ int hexdump_main(int argc, char **argv)
|
|||||||
if (ch == 'C') {
|
if (ch == 'C') {
|
||||||
hd_applet:
|
hd_applet:
|
||||||
bb_dump_add(dumper, "\"%08.8_Ax\n\""); // final address line after dump
|
bb_dump_add(dumper, "\"%08.8_Ax\n\""); // final address line after dump
|
||||||
//------------------- "address " 8 * "xx " " " 8 * "xx "
|
//------------------- "address " 8 * "xx " " " 8 * "xx "
|
||||||
bb_dump_add(dumper, "\"%08.8_ax \"8/1 \"%02x \" \" \"8/1 \"%02x \"");
|
bb_dump_add(dumper, "\"%08.8_ax \"8/1 \"%02x \"\" \"8/1 \"%02x \"");
|
||||||
//------------------- " |ASCII...........|\n"
|
//------------------- " |ASCII...........|\n"
|
||||||
bb_dump_add(dumper, "\" |\"16/1 \"%_p\"\"|\n\"");
|
bb_dump_add(dumper, "\" |\"16/1 \"%_p\"\"|\n\"");
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ int xxd_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
free(bigbuf);
|
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);
|
bb_dump_add(dumper, buf);
|
||||||
|
|
||||||
return bb_dump_dump(dumper, argv);
|
return bb_dump_dump(dumper, argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user