diff options
Diffstat (limited to 'coreutils/split.c')
-rw-r--r-- | coreutils/split.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/coreutils/split.c b/coreutils/split.c index 11e640442..1e1673efb 100644 --- a/coreutils/split.c +++ b/coreutils/split.c | |||
@@ -23,17 +23,15 @@ | |||
23 | 23 | ||
24 | #include "libbb.h" | 24 | #include "libbb.h" |
25 | 25 | ||
26 | static const struct suffix_mult split_suffices[] = { | ||
27 | #if ENABLE_FEATURE_SPLIT_FANCY | 26 | #if ENABLE_FEATURE_SPLIT_FANCY |
27 | static const struct suffix_mult split_suffixes[] = { | ||
28 | { "b", 512 }, | 28 | { "b", 512 }, |
29 | #endif | ||
30 | { "k", 1024 }, | 29 | { "k", 1024 }, |
31 | { "m", 1024*1024 }, | 30 | { "m", 1024*1024 }, |
32 | #if ENABLE_FEATURE_SPLIT_FANCY | ||
33 | { "g", 1024*1024*1024 }, | 31 | { "g", 1024*1024*1024 }, |
34 | #endif | ||
35 | { "", 0 } | 32 | { "", 0 } |
36 | }; | 33 | }; |
34 | #endif | ||
37 | 35 | ||
38 | /* Increment the suffix part of the filename. | 36 | /* Increment the suffix part of the filename. |
39 | * Returns NULL if we are out of filenames. | 37 | * Returns NULL if we are out of filenames. |
@@ -86,7 +84,10 @@ int split_main(int argc UNUSED_PARAM, char **argv) | |||
86 | if (opt & SPLIT_OPT_l) | 84 | if (opt & SPLIT_OPT_l) |
87 | cnt = XATOOFF(count_p); | 85 | cnt = XATOOFF(count_p); |
88 | if (opt & SPLIT_OPT_b) // FIXME: also needs XATOOFF | 86 | if (opt & SPLIT_OPT_b) // FIXME: also needs XATOOFF |
89 | cnt = xatoull_sfx(count_p, split_suffices); | 87 | cnt = xatoull_sfx(count_p, |
88 | IF_FEATURE_SPLIT_FANCY(split_suffixes) | ||
89 | IF_NOT_FEATURE_SPLIT_FANCY(km_suffixes) | ||
90 | ); | ||
90 | sfx = "x"; | 91 | sfx = "x"; |
91 | 92 | ||
92 | argv += optind; | 93 | argv += optind; |