diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-04-28 00:18:56 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-04-28 00:18:56 +0000 |
commit | 4f3f757d56fbf420ea5030dcf7ea971b3da3ab47 (patch) | |
tree | d986e9bb9f03bf1f83465c274c35c0d58ed544e4 /util-linux/more.c | |
parent | 227a59b05d6df9b4be5990915646249d6f548822 (diff) | |
download | busybox-w32-4f3f757d56fbf420ea5030dcf7ea971b3da3ab47.tar.gz busybox-w32-4f3f757d56fbf420ea5030dcf7ea971b3da3ab47.tar.bz2 busybox-w32-4f3f757d56fbf420ea5030dcf7ea971b3da3ab47.zip |
Latest and greatest. Some effort at libc5 (aiming towards newlib)
compatability.
-Erik
Diffstat (limited to 'util-linux/more.c')
-rw-r--r-- | util-linux/more.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/util-linux/more.c b/util-linux/more.c index 909ed286b..30d2757cd 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -48,6 +48,7 @@ static const char more_usage[] = "more [file ...]\n"; | |||
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | FILE *cin; | 50 | FILE *cin; |
51 | |||
51 | struct termios initial_settings, new_settings; | 52 | struct termios initial_settings, new_settings; |
52 | 53 | ||
53 | void gotsig(int sig) | 54 | void gotsig(int sig) |
@@ -65,7 +66,10 @@ void gotsig(int sig) | |||
65 | 66 | ||
66 | 67 | ||
67 | #if defined BB_FEATURE_AUTOWIDTH | 68 | #if defined BB_FEATURE_AUTOWIDTH |
68 | static int terminal_width = 0, terminal_height = 0; | 69 | #ifdef BB_FEATURE_USE_TERMIOS |
70 | static int terminal_width = 0; | ||
71 | #endif | ||
72 | static int terminal_height = 0; | ||
69 | #else | 73 | #else |
70 | #define terminal_width TERMINAL_WIDTH | 74 | #define terminal_width TERMINAL_WIDTH |
71 | #define terminal_height TERMINAL_HEIGHT | 75 | #define terminal_height TERMINAL_HEIGHT |
@@ -80,7 +84,7 @@ extern int more_main(int argc, char **argv) | |||
80 | struct stat st; | 84 | struct stat st; |
81 | FILE *file; | 85 | FILE *file; |
82 | 86 | ||
83 | #ifdef BB_FEATURE_AUTOWIDTH | 87 | #if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS |
84 | struct winsize win = { 0, 0 }; | 88 | struct winsize win = { 0, 0 }; |
85 | #endif | 89 | #endif |
86 | 90 | ||
@@ -151,7 +155,11 @@ extern int more_main(int argc, char **argv) | |||
151 | ); | 155 | ); |
152 | 156 | ||
153 | fflush(stdout); | 157 | fflush(stdout); |
158 | #ifdef BB_FEATURE_USE_TERMIOS | ||
154 | input = getc(cin); | 159 | input = getc(cin); |
160 | #else | ||
161 | input = getc(stdin); | ||
162 | #endif | ||
155 | 163 | ||
156 | #ifdef BB_FEATURE_USE_TERMIOS | 164 | #ifdef BB_FEATURE_USE_TERMIOS |
157 | /* Erase the "More" message */ | 165 | /* Erase the "More" message */ |