diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-21 08:50:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-21 08:50:06 +0000 |
commit | 9924ce1cdcb6e4ab9635d6370ff7db6219c56094 (patch) | |
tree | 519c1bd5ff03997c9b11ceb7972da7467e44ea48 /libbb | |
parent | 80297d5f0cbe8a3de497804dcbb1a89e6f9c1562 (diff) | |
download | busybox-w32-1_8_3.tar.gz busybox-w32-1_8_3.tar.bz2 busybox-w32-1_8_3.zip |
apply four post-1.8.2 patches; bump to 1.8.31_8_3
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index f65e852b1..4253054c5 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -1211,7 +1211,7 @@ static void parse_prompt(const char *prmt_ptr) | |||
1211 | #endif | 1211 | #endif |
1212 | 1212 | ||
1213 | #define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp) | 1213 | #define setTermSettings(fd, argp) tcsetattr(fd, TCSANOW, argp) |
1214 | #define getTermSettings(fd, argp) tcgetattr(fd, argp); | 1214 | #define getTermSettings(fd, argp) tcgetattr(fd, argp) |
1215 | 1215 | ||
1216 | static sighandler_t previous_SIGWINCH_handler; | 1216 | static sighandler_t previous_SIGWINCH_handler; |
1217 | 1217 | ||
@@ -1270,9 +1270,10 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t | |||
1270 | smalluint prevc; | 1270 | smalluint prevc; |
1271 | #endif | 1271 | #endif |
1272 | 1272 | ||
1273 | getTermSettings(0, (void *) &initial_settings); | 1273 | if (getTermSettings(0, (void *) &initial_settings) < 0 |
1274 | /* Happens when e.g. stty -echo was run before */ | 1274 | /* Happens when e.g. stty -echo was run before */ |
1275 | if (!(initial_settings.c_lflag & ECHO)) { | 1275 | || !(initial_settings.c_lflag & ECHO) |
1276 | ) { | ||
1276 | parse_prompt(prompt); | 1277 | parse_prompt(prompt); |
1277 | fflush(stdout); | 1278 | fflush(stdout); |
1278 | fgets(command, maxsize, stdin); | 1279 | fgets(command, maxsize, stdin); |