20 |
#endif |
#endif |
21 |
; |
; |
22 |
|
|
|
#if ENABLE_FEATURE_FANCY_HEAD |
|
23 |
static const struct suffix_mult head_suffixes[] = { |
static const struct suffix_mult head_suffixes[] = { |
24 |
{ "b", 512 }, |
{ "b", 512 }, |
25 |
{ "k", 1024 }, |
{ "k", 1024 }, |
26 |
{ "m", 1024*1024 }, |
{ "m", 1024*1024 }, |
27 |
{ "", 0 } |
{ "", 0 } |
28 |
}; |
}; |
|
#endif |
|
29 |
|
|
30 |
static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n"; |
#define header_fmt_str "\n==> %s <==\n" |
31 |
|
|
32 |
int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
33 |
int head_main(int argc, char **argv) |
int head_main(int argc, char **argv) |
76 |
#if ENABLE_INCLUDE_SUSv2 || ENABLE_FEATURE_FANCY_HEAD |
#if ENABLE_INCLUDE_SUSv2 || ENABLE_FEATURE_FANCY_HEAD |
77 |
GET_COUNT: |
GET_COUNT: |
78 |
#endif |
#endif |
|
#if !ENABLE_FEATURE_FANCY_HEAD |
|
|
count = xatoul(p); |
|
|
#else |
|
79 |
count = xatoul_sfx(p, head_suffixes); |
count = xatoul_sfx(p, head_suffixes); |
|
#endif |
|
80 |
break; |
break; |
81 |
default: |
default: |
82 |
bb_show_usage(); |
bb_show_usage(); |