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). --- procps/fuser.c | 2 +- procps/pidof.c | 2 +- procps/top.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'procps') diff --git a/procps/fuser.c b/procps/fuser.c index f65b05d98..60c10956b 100644 --- a/procps/fuser.c +++ b/procps/fuser.c @@ -292,7 +292,7 @@ static int fuser_print_pid_list(pid_list *plist) printf("%d ", curr->pid); curr = curr->next; } - puts(""); + bb_putchar('\n'); return 1; } diff --git a/procps/pidof.c b/procps/pidof.c index c989076bb..962945253 100644 --- a/procps/pidof.c +++ b/procps/pidof.c @@ -76,7 +76,7 @@ int pidof_main(int argc, char **argv) free(pidList); optind++; } - putchar('\n'); + bb_putchar('\n'); #if ENABLE_FEATURE_PIDOF_OMIT if (ENABLE_FEATURE_CLEAN_UP) diff --git a/procps/top.c b/procps/top.c index e55cecccb..1b8c18516 100644 --- a/procps/top.c +++ b/procps/top.c @@ -482,7 +482,7 @@ static NOINLINE void display_process_list(int count, int scr_width) s++; } /* printf(" %d", hist_iterations); */ - putchar(OPT_BATCH_MODE ? '\n' : '\r'); + bb_putchar(OPT_BATCH_MODE ? '\n' : '\r'); fflush(stdout); } #undef UPSCALE @@ -752,7 +752,7 @@ static NOINLINE void display_topmem_process_list(int count, int scr_width) printf("\n""%.*s", scr_width, line_buf); s++; } - putchar(OPT_BATCH_MODE ? '\n' : '\r'); + bb_putchar(OPT_BATCH_MODE ? '\n' : '\r'); fflush(stdout); #undef HDR_STR #undef MIN_WIDTH @@ -972,6 +972,6 @@ int top_main(int argc, char **argv) } #endif /* FEATURE_USE_TERMIOS */ } - putchar('\n'); + bb_putchar('\n'); return EXIT_SUCCESS; } -- cgit v1.2.3