Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-05-26 13:34:11 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2023-05-26 13:34:11 +0300
commit3c6f6382eef14b880550cbf28ac5a517d0a075fc (patch)
treefa4a969aabbc2514c13279176add39441b341972 /libbb
parentaa4d303a3139107919f73cece4eaf85a7dc75db6 (diff)
libbb/dump: conditionalize code used only by xxd and od
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/dump.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index 77d76611b..21c6c7083 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -563,17 +563,21 @@ static NOINLINE void display(priv_dumper_t* dumper)
if (dumper->eaddress
&& dumper->pub.address >= dumper->eaddress
) {
+#if ENABLE_XXD
if (dumper->pub.xxd_eofstring) {
/* xxd support: requested to not pad incomplete blocks */
fputs_stdout(dumper->pub.xxd_eofstring);
return;
}
+#endif
+#if ENABLE_OD
if (dumper->pub.od_eofstring) {
/* od support: requested to not pad incomplete blocks */
/* ... but do print final offset */
fputs_stdout(dumper->pub.od_eofstring);
goto endfu;
}
+#endif
if (!(pr->flags & (F_TEXT | F_BPAD)))
bpad(pr);
}
@@ -637,7 +641,7 @@ static NOINLINE void display(priv_dumper_t* dumper)
goto skip;
}
printf(pr->fmt, value);
- skip:
+ IF_OD(skip:)
break;
}
case F_P: