introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
This commit is contained in:
+1
-1
@@ -2004,7 +2004,7 @@ static int run_list_real(struct pipe *pi)
|
||||
insert_bg_job(pi);
|
||||
} else {
|
||||
/* ctrl-C. We just stop doing whatever we were doing */
|
||||
putchar('\n');
|
||||
bb_putchar('\n');
|
||||
}
|
||||
rcode = 0;
|
||||
goto ret;
|
||||
|
||||
+2
-2
@@ -319,7 +319,7 @@ static int builtin_help(struct child_prog ATTRIBUTE_UNUSED *dummy)
|
||||
continue;
|
||||
printf("%s\t%s\n", x->cmd, x->descr);
|
||||
}
|
||||
putchar('\n');
|
||||
bb_putchar('\n');
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -677,7 +677,7 @@ static int get_command_bufsiz(FILE * source, char *command)
|
||||
|
||||
if (!fgets(command, BUFSIZ - 2, source)) {
|
||||
if (source == stdin)
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -1137,7 +1137,7 @@ static void nameval(struct var *vp, const char *val, const char *name)
|
||||
if (vp->status & RONLY) {
|
||||
xp = vp->name;
|
||||
while (*xp && *xp != '=')
|
||||
putc(*xp++, stderr);
|
||||
fputc(*xp++, stderr);
|
||||
err(" is read-only");
|
||||
return;
|
||||
}
|
||||
@@ -3181,7 +3181,7 @@ static int dohelp(struct op *t)
|
||||
while (x->name) {
|
||||
col += printf("%c%s", ((col == 0) ? '\t' : ' '), x->name);
|
||||
if (col > 60) {
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
col = 0;
|
||||
}
|
||||
x++;
|
||||
@@ -3193,7 +3193,7 @@ static int dohelp(struct op *t)
|
||||
while (applet->name) {
|
||||
col += printf("%c%s", ((col == 0) ? '\t' : ' '), applet->name);
|
||||
if (col > 60) {
|
||||
puts("");
|
||||
bb_putchar('\n');
|
||||
col = 0;
|
||||
}
|
||||
applet++;
|
||||
@@ -3274,8 +3274,8 @@ static int doumask(struct op *t)
|
||||
i = umask(0);
|
||||
umask(i);
|
||||
for (n = 3 * 4; (n -= 3) >= 0;)
|
||||
putc('0' + ((i >> n) & 07), stderr);
|
||||
putc('\n', stderr);
|
||||
fputc('0' + ((i >> n) & 07), stderr);
|
||||
fputc('\n', stderr);
|
||||
} else {
|
||||
/* huh??? '8','9' are not allowed! */
|
||||
for (n = 0; *cp >= '0' && *cp <= '9'; cp++)
|
||||
|
||||
Reference in New Issue
Block a user