aboutsummaryrefslogtreecommitdiff
path: root/coreutils/printf.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:20:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:20:47 +0000
commit4daad9004d8f07991516970a1cbd77756fae7041 (patch)
treef1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /coreutils/printf.c
parent1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff)
downloadbusybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz
busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.tar.bz2
busybox-w32-4daad9004d8f07991516970a1cbd77756fae7041.zip
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'coreutils/printf.c')
-rw-r--r--coreutils/printf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c
index d0cf5a671..d5ef32e8c 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -99,9 +99,9 @@ static void print_esc_string(char *str)
99 for (; *str; str++) { 99 for (; *str; str++) {
100 if (*str == '\\') { 100 if (*str == '\\') {
101 str++; 101 str++;
102 putchar(bb_process_escape_sequence((const char **)&str)); 102 bb_putchar(bb_process_escape_sequence((const char **)&str));
103 } else { 103 } else {
104 putchar(*str); 104 bb_putchar(*str);
105 } 105 }
106 106
107 } 107 }
@@ -205,7 +205,7 @@ static int print_formatted(char *format, int argc, char **argv)
205 direc_length = 1; 205 direc_length = 1;
206 field_width = precision = -1; 206 field_width = precision = -1;
207 if (*f == '%') { 207 if (*f == '%') {
208 putchar('%'); 208 bb_putchar('%');
209 break; 209 break;
210 } 210 }
211 if (*f == 'b') { 211 if (*f == 'b') {
@@ -274,11 +274,11 @@ static int print_formatted(char *format, int argc, char **argv)
274 case '\\': 274 case '\\':
275 if (*++f == 'c') 275 if (*++f == 'c')
276 exit(0); 276 exit(0);
277 putchar(bb_process_escape_sequence((const char **)&f)); 277 bb_putchar(bb_process_escape_sequence((const char **)&f));
278 f--; 278 f--;
279 break; 279 break;
280 default: 280 default:
281 putchar(*f); 281 bb_putchar(*f);
282 } 282 }
283 } 283 }
284 284