aboutsummaryrefslogtreecommitdiff
path: root/util-linux/more.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-24 05:00:29 +0000
committerEric Andersen <andersen@codepoet.org>2001-10-24 05:00:29 +0000
commitbdfd0d78bc44e73d693510e70087857785b3b521 (patch)
tree153a573095afac8d8d0ea857759ecabd77fb28b7 /util-linux/more.c
parent9260fc5552a3ee52eb95823aa6689d52a1ffd33c (diff)
downloadbusybox-w32-bdfd0d78bc44e73d693510e70087857785b3b521.tar.gz
busybox-w32-bdfd0d78bc44e73d693510e70087857785b3b521.tar.bz2
busybox-w32-bdfd0d78bc44e73d693510e70087857785b3b521.zip
Major rework of the directory structure and the entire build system.
-Erik
Diffstat (limited to 'util-linux/more.c')
-rw-r--r--util-linux/more.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/util-linux/more.c b/util-linux/more.c
index 780cddf66..5fe1da423 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -37,7 +37,7 @@
37 37
38static FILE *cin; 38static FILE *cin;
39 39
40#ifdef BB_FEATURE_USE_TERMIOS 40#ifdef CONFIG_FEATURE_USE_TERMIOS
41#include <termios.h> 41#include <termios.h>
42#define setTermSettings(fd,argp) tcsetattr(fd,TCSANOW,argp) 42#define setTermSettings(fd,argp) tcsetattr(fd,TCSANOW,argp)
43#define getTermSettings(fd,argp) tcgetattr(fd, argp); 43#define getTermSettings(fd,argp) tcgetattr(fd, argp);
@@ -54,7 +54,7 @@ static void gotsig(int sig)
54 putchar('\n'); 54 putchar('\n');
55 exit(EXIT_FAILURE); 55 exit(EXIT_FAILURE);
56} 56}
57#endif /* BB_FEATURE_USE_TERMIOS */ 57#endif /* CONFIG_FEATURE_USE_TERMIOS */
58 58
59 59
60static int terminal_width = 79; /* not 80 in case terminal has linefold bug */ 60static int terminal_width = 79; /* not 80 in case terminal has linefold bug */
@@ -69,7 +69,7 @@ extern int more_main(int argc, char **argv)
69 FILE *file; 69 FILE *file;
70 int len, page_height; 70 int len, page_height;
71 71
72#if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS 72#if defined CONFIG_FEATURE_AUTOWIDTH && defined CONFIG_FEATURE_USE_TERMIOS
73 struct winsize win = { 0, 0, 0, 0 }; 73 struct winsize win = { 0, 0, 0, 0 };
74#endif 74#endif
75 75
@@ -83,7 +83,7 @@ extern int more_main(int argc, char **argv)
83 if (!cin) 83 if (!cin)
84 cin = xfopen(CONSOLE_DEV, "r"); 84 cin = xfopen(CONSOLE_DEV, "r");
85 please_display_more_prompt = 0; 85 please_display_more_prompt = 0;
86#ifdef BB_FEATURE_USE_TERMIOS 86#ifdef CONFIG_FEATURE_USE_TERMIOS
87 getTermSettings(fileno(cin), &initial_settings); 87 getTermSettings(fileno(cin), &initial_settings);
88 new_settings = initial_settings; 88 new_settings = initial_settings;
89 new_settings.c_lflag &= ~ICANON; 89 new_settings.c_lflag &= ~ICANON;
@@ -114,7 +114,7 @@ extern int more_main(int argc, char **argv)
114 if(please_display_more_prompt>0) 114 if(please_display_more_prompt>0)
115 please_display_more_prompt = 0; 115 please_display_more_prompt = 0;
116 116
117#if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS 117#if defined CONFIG_FEATURE_AUTOWIDTH && defined CONFIG_FEATURE_USE_TERMIOS
118 ioctl(fileno(stdout), TIOCGWINSZ, &win); 118 ioctl(fileno(stdout), TIOCGWINSZ, &win);
119 if (win.ws_row > 4) 119 if (win.ws_row > 4)
120 terminal_height = win.ws_row - 2; 120 terminal_height = win.ws_row - 2;
@@ -147,7 +147,7 @@ extern int more_main(int argc, char **argv)
147 * to get input from the user. 147 * to get input from the user.
148 */ 148 */
149 input = getc(cin); 149 input = getc(cin);
150#ifndef BB_FEATURE_USE_TERMIOS 150#ifndef CONFIG_FEATURE_USE_TERMIOS
151 printf("\033[A"); /* up cursor */ 151 printf("\033[A"); /* up cursor */
152#endif 152#endif
153 /* Erase the "More" message */ 153 /* Erase the "More" message */