aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-01-25 01:58:00 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2017-01-25 01:58:00 +0100
commit0f4364775fbc0b716024d5211325045c40b431c9 (patch)
tree9f1bbe20c313154a2f9678816e55eb1944e6a622 /libbb
parent2181fb4af8680730e0157310ffeeb3a35768beb0 (diff)
downloadbusybox-w32-0f4364775fbc0b716024d5211325045c40b431c9.tar.gz
busybox-w32-0f4364775fbc0b716024d5211325045c40b431c9.tar.bz2
busybox-w32-0f4364775fbc0b716024d5211325045c40b431c9.zip
xxd: new applet
Yet Another Hexdumper function old new delta xxd_main - 364 +364 packed_usage 31046 31116 +70 applet_names 2560 2564 +4 applet_main 1476 1480 +4 rewrite 1022 1013 -9 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/1 up/down: 442/-9) Total: 433 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/dump.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index 154be5d80..e9ac0c673 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -165,16 +165,14 @@ static NOINLINE void rewrite(priv_dumper_t *dumper, FS *fs)
165 byte_count_str = "\001"; 165 byte_count_str = "\001";
166 DO_BYTE_COUNT: 166 DO_BYTE_COUNT:
167 if (fu->bcnt) { 167 if (fu->bcnt) {
168 do { 168 for (;;) {
169 if (fu->bcnt == *byte_count_str) { 169 if (fu->bcnt == *byte_count_str)
170 break; 170 break;
171 } 171 if (*++byte_count_str == 0)
172 } while (*++byte_count_str); 172 bb_error_msg_and_die("bad byte count for conversion character %s", p1);
173 }
173 } 174 }
174 /* Unlike the original, output the remainder of the format string. */ 175 /* Unlike the original, output the remainder of the format string. */
175 if (!*byte_count_str) {
176 bb_error_msg_and_die("bad byte count for conversion character %s", p1);
177 }
178 pr->bcnt = *byte_count_str; 176 pr->bcnt = *byte_count_str;
179 } else if (*p1 == 'l') { 177 } else if (*p1 == 'l') {
180 ++p2; 178 ++p2;