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/printf.c

    r3232 r3621  
    132132}
    133133
    134 /* Handles %b */
    135 static void print_esc_string(const char *str)
     134/* Handles %b; return 1 if output is to be short-circuited by \c */
     135static int print_esc_string(const char *str)
    136136{
    137137    char c;
     
    146146                }
    147147            }
     148            else if (*str == 'c') {
     149                return 1;
     150            }
    148151            {
    149152                /* optimization: don't force arg to be on-stack,
     
    156159        putchar(c);
    157160    }
     161
     162    return 0;
    158163}
    159164
     
    281286            if (*f == 'b') {
    282287                if (*argv) {
    283                     print_esc_string(*argv);
     288                    if (print_esc_string(*argv))
     289                        return saved_argv; /* causes main() to exit */
    284290                    ++argv;
    285291                }
Note: See TracChangeset for help on using the changeset viewer.