aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:20:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-09-27 10:20:47 +0000
commit4daad9004d8f07991516970a1cbd77756fae7041 (patch)
treef1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /editors
parent1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff)
downloadbusybox-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'editors')
-rw-r--r--editors/ed.c6
-rw-r--r--editors/vi.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/editors/ed.c b/editors/ed.c
index cd3836aed..31185d9b6 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -853,14 +853,14 @@ static int printLines(int num1, int num2, int expandFlag)
ch &= 0x7f;
}
if (ch < ' ') {
- fputc('^', stdout);
+ bb_putchar('^');
ch += '@';
}
if (ch == 0x7f) {
- fputc('^', stdout);
+ bb_putchar('^');
ch = '?';
}
- fputc(ch, stdout);
+ bb_putchar(ch);
}
fputs("$\n", stdout);
diff --git a/editors/vi.c b/editors/vi.c
index 1fa7c3a09..eafe767f3 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -868,13 +868,13 @@ static void colon(char * buf)
if (c == '\n') {
write1("$\r");
} else if (c < ' ' || c == 127) {
- putchar('^');
+ bb_putchar('^');
if (c == 127)
c = '?';
else
c += '@';
}
- putchar(c);
+ bb_putchar(c);
if (c_is_no_print)
standout_end();
}
@@ -2337,7 +2337,7 @@ static char *get_input_line(const char * prompt) // get input line- use "status
} else {
buf[i] = c; // save char in buffer
buf[i + 1] = '\0'; // make sure buffer is null terminated
- putchar(c); // echo the char back to user
+ bb_putchar(c); // echo the char back to user
i++;
}
}
@@ -2860,7 +2860,7 @@ static void refresh(int full_screen)
char *out = sp + cs;
while (nic-- > 0) {
- putchar(*out);
+ bb_putchar(*out);
out++;
}
}