Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/coreutils/split.c


Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/coreutils/split.c

    r3232 r3621  
    2323
    2424#include "libbb.h"
     25#include "common_bufsiz.h"
    2526
    26 static const struct suffix_mult split_suffices[] = {
    2727#if ENABLE_FEATURE_SPLIT_FANCY
     28static const struct suffix_mult split_suffixes[] = {
    2829    { "b", 512 },
    29 #endif
    3030    { "k", 1024 },
    3131    { "m", 1024*1024 },
    32 #if ENABLE_FEATURE_SPLIT_FANCY
    3332    { "g", 1024*1024*1024 },
    34 #endif
    3533    { "", 0 }
    3634};
     35#endif
    3736
    3837/* Increment the suffix part of the filename.
     
    8180    char *src;
    8281
     82    setup_common_bufsiz();
     83
    8384    opt_complementary = "?2:a+"; /* max 2 args; -a N */
    8485    opt = getopt32(argv, "l:b:a:", &count_p, &count_p, &suffix_len);
     
    8788        cnt = XATOOFF(count_p);
    8889    if (opt & SPLIT_OPT_b) // FIXME: also needs XATOOFF
    89         cnt = xatoull_sfx(count_p, split_suffices);
     90        cnt = xatoull_sfx(count_p,
     91                IF_FEATURE_SPLIT_FANCY(split_suffixes)
     92                IF_NOT_FEATURE_SPLIT_FANCY(km_suffixes)
     93        );
    9094    sfx = "x";
    9195
Note: See TracChangeset for help on using the changeset viewer.