aboutsummaryrefslogtreecommitdiff
path: root/coreutils/head.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-03-02 16:18:14 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-02 16:18:14 +0100
commit5749328b5634918888474222732572a3e0c97f70 (patch)
tree7690a296f44bc15c7215b0c3d805cedc7c70375b /coreutils/head.c
parent88aa558e5cf31d1b390d68fc40f55b47beac246e (diff)
downloadbusybox-w32-5749328b5634918888474222732572a3e0c97f70.tar.gz
busybox-w32-5749328b5634918888474222732572a3e0c97f70.tar.bz2
busybox-w32-5749328b5634918888474222732572a3e0c97f70.zip
head,tail: trim help text; make suffixes unconditional for head too
function old new delta packed_usage 26411 26375 -36 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/head.c')
-rw-r--r--coreutils/head.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/coreutils/head.c b/coreutils/head.c
index 0fab8a8ae..75189eda8 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -20,14 +20,12 @@ static const char head_opts[] ALIGN1 =
20#endif 20#endif
21 ; 21 ;
22 22
23#if ENABLE_FEATURE_FANCY_HEAD
24static const struct suffix_mult head_suffixes[] = { 23static const struct suffix_mult head_suffixes[] = {
25 { "b", 512 }, 24 { "b", 512 },
26 { "k", 1024 }, 25 { "k", 1024 },
27 { "m", 1024*1024 }, 26 { "m", 1024*1024 },
28 { "", 0 } 27 { "", 0 }
29}; 28};
30#endif
31 29
32static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n"; 30static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n";
33 31
@@ -78,11 +76,7 @@ int head_main(int argc, char **argv)
78#if ENABLE_INCLUDE_SUSv2 || ENABLE_FEATURE_FANCY_HEAD 76#if ENABLE_INCLUDE_SUSv2 || ENABLE_FEATURE_FANCY_HEAD
79 GET_COUNT: 77 GET_COUNT:
80#endif 78#endif
81#if !ENABLE_FEATURE_FANCY_HEAD
82 count = xatoul(p);
83#else
84 count = xatoul_sfx(p, head_suffixes); 79 count = xatoul_sfx(p, head_suffixes);
85#endif
86 break; 80 break;
87 default: 81 default:
88 bb_show_usage(); 82 bb_show_usage();