diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-27 10:20:47 +0000 |
commit | 4daad9004d8f07991516970a1cbd77756fae7041 (patch) | |
tree | f1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /shell | |
parent | 1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff) | |
download | busybox-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 'shell')
-rw-r--r-- | shell/hush.c | 2 | ||||
-rw-r--r-- | shell/lash.c | 4 | ||||
-rw-r--r-- | shell/msh.c | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/shell/hush.c b/shell/hush.c index 5796f1127..5f9f2c5c1 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2004,7 +2004,7 @@ static int run_list_real(struct pipe *pi) | |||
2004 | insert_bg_job(pi); | 2004 | insert_bg_job(pi); |
2005 | } else { | 2005 | } else { |
2006 | /* ctrl-C. We just stop doing whatever we were doing */ | 2006 | /* ctrl-C. We just stop doing whatever we were doing */ |
2007 | putchar('\n'); | 2007 | bb_putchar('\n'); |
2008 | } | 2008 | } |
2009 | rcode = 0; | 2009 | rcode = 0; |
2010 | goto ret; | 2010 | goto ret; |
diff --git a/shell/lash.c b/shell/lash.c index 889fe49d8..4ce6d4235 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -319,7 +319,7 @@ static int builtin_help(struct child_prog ATTRIBUTE_UNUSED *dummy) | |||
319 | continue; | 319 | continue; |
320 | printf("%s\t%s\n", x->cmd, x->descr); | 320 | printf("%s\t%s\n", x->cmd, x->descr); |
321 | } | 321 | } |
322 | putchar('\n'); | 322 | bb_putchar('\n'); |
323 | return EXIT_SUCCESS; | 323 | return EXIT_SUCCESS; |
324 | } | 324 | } |
325 | 325 | ||
@@ -677,7 +677,7 @@ static int get_command_bufsiz(FILE * source, char *command) | |||
677 | 677 | ||
678 | if (!fgets(command, BUFSIZ - 2, source)) { | 678 | if (!fgets(command, BUFSIZ - 2, source)) { |
679 | if (source == stdin) | 679 | if (source == stdin) |
680 | puts(""); | 680 | bb_putchar('\n'); |
681 | return 1; | 681 | return 1; |
682 | } | 682 | } |
683 | 683 | ||
diff --git a/shell/msh.c b/shell/msh.c index f1b3f0525..41fe1b6ba 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -1137,7 +1137,7 @@ static void nameval(struct var *vp, const char *val, const char *name) | |||
1137 | if (vp->status & RONLY) { | 1137 | if (vp->status & RONLY) { |
1138 | xp = vp->name; | 1138 | xp = vp->name; |
1139 | while (*xp && *xp != '=') | 1139 | while (*xp && *xp != '=') |
1140 | putc(*xp++, stderr); | 1140 | fputc(*xp++, stderr); |
1141 | err(" is read-only"); | 1141 | err(" is read-only"); |
1142 | return; | 1142 | return; |
1143 | } | 1143 | } |
@@ -3181,7 +3181,7 @@ static int dohelp(struct op *t) | |||
3181 | while (x->name) { | 3181 | while (x->name) { |
3182 | col += printf("%c%s", ((col == 0) ? '\t' : ' '), x->name); | 3182 | col += printf("%c%s", ((col == 0) ? '\t' : ' '), x->name); |
3183 | if (col > 60) { | 3183 | if (col > 60) { |
3184 | puts(""); | 3184 | bb_putchar('\n'); |
3185 | col = 0; | 3185 | col = 0; |
3186 | } | 3186 | } |
3187 | x++; | 3187 | x++; |
@@ -3193,7 +3193,7 @@ static int dohelp(struct op *t) | |||
3193 | while (applet->name) { | 3193 | while (applet->name) { |
3194 | col += printf("%c%s", ((col == 0) ? '\t' : ' '), applet->name); | 3194 | col += printf("%c%s", ((col == 0) ? '\t' : ' '), applet->name); |
3195 | if (col > 60) { | 3195 | if (col > 60) { |
3196 | puts(""); | 3196 | bb_putchar('\n'); |
3197 | col = 0; | 3197 | col = 0; |
3198 | } | 3198 | } |
3199 | applet++; | 3199 | applet++; |
@@ -3274,8 +3274,8 @@ static int doumask(struct op *t) | |||
3274 | i = umask(0); | 3274 | i = umask(0); |
3275 | umask(i); | 3275 | umask(i); |
3276 | for (n = 3 * 4; (n -= 3) >= 0;) | 3276 | for (n = 3 * 4; (n -= 3) >= 0;) |
3277 | putc('0' + ((i >> n) & 07), stderr); | 3277 | fputc('0' + ((i >> n) & 07), stderr); |
3278 | putc('\n', stderr); | 3278 | fputc('\n', stderr); |
3279 | } else { | 3279 | } else { |
3280 | /* huh??? '8','9' are not allowed! */ | 3280 | /* huh??? '8','9' are not allowed! */ |
3281 | for (n = 0; *cp >= '0' && *cp <= '9'; cp++) | 3281 | for (n = 0; *cp >= '0' && *cp <= '9'; cp++) |