From 4daad9004d8f07991516970a1cbd77756fae7041 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 27 Sep 2007 10:20:47 +0000 Subject: introduce bb_putchar(). saves ~1800 on uclibc (less on glibc). --- coreutils/printf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'coreutils/printf.c') 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) 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); } } -- cgit v1.2.3