diff options
author | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-05-16 09:33:03 +0100 |
commit | 35d2f5bccb0f3dde600702ebcdb5424d4d50be4a (patch) | |
tree | 6e0ff0341c69839e268459a199682628bae734ed /miscutils/less.c | |
parent | 248a2600a2f4b442101ad568d1994b908bb28d4b (diff) | |
parent | f2559e5c2b7bd2c5fa0dd8e88d0a931da92a23af (diff) | |
download | busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.gz busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.bz2 busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'miscutils/less.c')
-rw-r--r-- | miscutils/less.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index cc0e20bc7..248f3e3f5 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -131,6 +131,7 @@ | |||
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | #include "libbb.h" | 133 | #include "libbb.h" |
134 | #include "common_bufsiz.h" | ||
134 | #if ENABLE_FEATURE_LESS_REGEXP | 135 | #if ENABLE_FEATURE_LESS_REGEXP |
135 | #include "xregex.h" | 136 | #include "xregex.h" |
136 | #endif | 137 | #endif |
@@ -445,7 +446,6 @@ static int at_end(void) | |||
445 | */ | 446 | */ |
446 | static void read_lines(void) | 447 | static void read_lines(void) |
447 | { | 448 | { |
448 | #define readbuf bb_common_bufsiz1 | ||
449 | char *current_line, *p; | 449 | char *current_line, *p; |
450 | int w = width; | 450 | int w = width; |
451 | char last_terminated = terminated; | 451 | char last_terminated = terminated; |
@@ -455,6 +455,9 @@ static void read_lines(void) | |||
455 | unsigned old_max_fline = max_fline; | 455 | unsigned old_max_fline = max_fline; |
456 | #endif | 456 | #endif |
457 | 457 | ||
458 | #define readbuf bb_common_bufsiz1 | ||
459 | setup_common_bufsiz(); | ||
460 | |||
458 | /* (careful: max_fline can be -1) */ | 461 | /* (careful: max_fline can be -1) */ |
459 | if (max_fline + 1 > MAXLINES) | 462 | if (max_fline + 1 > MAXLINES) |
460 | return; | 463 | return; |
@@ -486,7 +489,7 @@ static void read_lines(void) | |||
486 | time_t t; | 489 | time_t t; |
487 | 490 | ||
488 | errno = 0; | 491 | errno = 0; |
489 | eof_error = safe_read(STDIN_FILENO, readbuf, sizeof(readbuf)); | 492 | eof_error = safe_read(STDIN_FILENO, readbuf, COMMON_BUFSIZE); |
490 | if (errno != EAGAIN) | 493 | if (errno != EAGAIN) |
491 | break; | 494 | break; |
492 | t = time(NULL); | 495 | t = time(NULL); |