summaryrefslogtreecommitdiff
path: root/coreutils/printf.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-09-27 10:20:47 +0000
committerDenis Vlasenko2007-09-27 10:20:47 +0000
commit4daad9004d8f07991516970a1cbd77756fae7041 (patch)
treef1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /coreutils/printf.c
parent1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff)
downloadbusybox-4daad9004d8f07991516970a1cbd77756fae7041.zip
busybox-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz
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 d0cf5a6..d5ef32e 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -99,9 +99,9 @@ static void print_esc_string(char *str)
for (; *str; str++) {
if (*str == '\\') {
str++;
- putchar(bb_process_escape_sequence((const char **)&str));
+ bb_putchar(bb_process_escape_sequence((const char **)&str));
} else {
- putchar(*str);
+ bb_putchar(*str);
}
}
@@ -205,7 +205,7 @@ static int print_formatted(char *format, int argc, char **argv)
direc_length = 1;
field_width = precision = -1;
if (*f == '%') {
- putchar('%');
+ bb_putchar('%');
break;
}
if (*f == 'b') {
@@ -274,11 +274,11 @@ static int print_formatted(char *format, int argc, char **argv)
case '\\':
if (*++f == 'c')
exit(0);
- putchar(bb_process_escape_sequence((const char **)&f));
+ bb_putchar(bb_process_escape_sequence((const char **)&f));
f--;
break;
default:
- putchar(*f);
+ bb_putchar(*f);
}
}