summaryrefslogtreecommitdiff
path: root/miscutils/less.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-09-27 10:20:47 +0000
committerDenis Vlasenko2007-09-27 10:20:47 +0000
commit4daad9004d8f07991516970a1cbd77756fae7041 (patch)
treef1a17e4b168ef8fdf8af92ac5ce8deba89d38db2 /miscutils/less.c
parent1acdc89e992eb3f0548ff48ba586b31c9a0ae232 (diff)
downloadbusybox-4daad9004d8f07991516970a1cbd77756fae7041.zip
busybox-4daad9004d8f07991516970a1cbd77756fae7041.tar.gz
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
Diffstat (limited to 'miscutils/less.c')
-rw-r--r--miscutils/less.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index a2221cf..ec9c00f 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -173,7 +173,7 @@ static void less_exit(int code)
* and restore it when we exit. Less does this with the
* "ti" and "te" termcap commands; can this be done with
* only termios.h? */
- putchar('\n');
+ bb_putchar('\n');
fflush_stdout_and_exit(code);
}
@@ -419,7 +419,7 @@ static void status_print(void)
clear_line();
if (cur_fline && cur_fline < max_fline - max_displayed_line) {
- putchar(':');
+ bb_putchar(':');
return;
}
p = "(END)";
@@ -755,7 +755,7 @@ static char* less_gets(int sz)
continue;
if (i >= width - sz - 1)
continue; /* len limit */
- putchar(c);
+ bb_putchar(c);
result[i++] = c;
result = xrealloc(result, i+1);
result[i] = '\0';
@@ -916,7 +916,7 @@ static void regex_process(void)
/* Get the uncompiled regular expression from the user */
clear_line();
- putchar((option_mask32 & LESS_STATE_MATCH_BACKWARDS) ? '?' : '/');
+ bb_putchar((option_mask32 & LESS_STATE_MATCH_BACKWARDS) ? '?' : '/');
uncomp_regex = less_gets(1);
if (!uncomp_regex[0]) {
free(uncomp_regex);
@@ -969,7 +969,7 @@ static void number_process(int first_digit)
num_input[i] = less_getch();
if (!num_input[i] || !isdigit(num_input[i]))
break;
- putchar(num_input[i]);
+ bb_putchar(num_input[i]);
i++;
}
@@ -1024,7 +1024,7 @@ static void flag_change(void)
int keypress;
clear_line();
- putchar('-');
+ bb_putchar('-');
keypress = less_getch();
switch (keypress) {
@@ -1049,7 +1049,7 @@ static void show_flag_status(void)
int flag_val;
clear_line();
- putchar('_');
+ bb_putchar('_');
keypress = less_getch();
switch (keypress) {