diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-27 10:47:49 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-27 10:47:49 +0100 |
commit | d83bbf41934382631161845302f5d77027383aba (patch) | |
tree | 9f585364bdc127efc6f93e8f6cd34f502244b0ef | |
parent | eb62d7c383320923e8050a24a725277a1fd5c695 (diff) | |
download | busybox-w32-d83bbf41934382631161845302f5d77027383aba.tar.gz busybox-w32-d83bbf41934382631161845302f5d77027383aba.tar.bz2 busybox-w32-d83bbf41934382631161845302f5d77027383aba.zip |
rename sent_ESC_br_n6 variable to sent_ESC_br6n
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/Config.in | 2 | ||||
-rw-r--r-- | libbb/lineedit.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libbb/Config.in b/libbb/Config.in index 60ae0ffe9..55367b21b 100644 --- a/libbb/Config.in +++ b/libbb/Config.in | |||
@@ -111,7 +111,7 @@ config FEATURE_EDITING_ASK_TERMINAL | |||
111 | current cursor position. This information is used to make line | 111 | current cursor position. This information is used to make line |
112 | editing more robust in some cases. | 112 | editing more robust in some cases. |
113 | If you are not sure whether your terminals respond to this code | 113 | If you are not sure whether your terminals respond to this code |
114 | correctly, or want to save on code size (about 300 bytes), | 114 | correctly, or want to save on code size (about 400 bytes), |
115 | then do not turn this option on. | 115 | then do not turn this option on. |
116 | 116 | ||
117 | config FEATURE_NON_POSIX_CP | 117 | config FEATURE_NON_POSIX_CP |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index b4c3fd35c..9c6454daf 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -141,7 +141,7 @@ struct lineedit_statics { | |||
141 | CHAR_T delbuf[DELBUFSIZ]; /* a place to store deleted characters */ | 141 | CHAR_T delbuf[DELBUFSIZ]; /* a place to store deleted characters */ |
142 | #endif | 142 | #endif |
143 | #if ENABLE_FEATURE_EDITING_ASK_TERMINAL | 143 | #if ENABLE_FEATURE_EDITING_ASK_TERMINAL |
144 | smallint sent_ESC_br_n6; | 144 | smallint sent_ESC_br6n; |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | /* Formerly these were big buffers on stack: */ | 147 | /* Formerly these were big buffers on stack: */ |
@@ -409,7 +409,7 @@ static void put_prompt(void) | |||
409 | pfd.fd = STDIN_FILENO; | 409 | pfd.fd = STDIN_FILENO; |
410 | pfd.events = POLLIN; | 410 | pfd.events = POLLIN; |
411 | if (safe_poll(&pfd, 1, 0) == 0) { | 411 | if (safe_poll(&pfd, 1, 0) == 0) { |
412 | S.sent_ESC_br_n6 = 1; | 412 | S.sent_ESC_br6n = 1; |
413 | out1str("\033" "[6n"); | 413 | out1str("\033" "[6n"); |
414 | fflush(NULL); /* make terminal see it ASAP! */ | 414 | fflush(NULL); /* make terminal see it ASAP! */ |
415 | } | 415 | } |
@@ -1674,9 +1674,9 @@ static int lineedit_read_key(char *read_key_buffer) | |||
1674 | 1674 | ||
1675 | #if ENABLE_FEATURE_EDITING_ASK_TERMINAL | 1675 | #if ENABLE_FEATURE_EDITING_ASK_TERMINAL |
1676 | if ((int32_t)ic == KEYCODE_CURSOR_POS | 1676 | if ((int32_t)ic == KEYCODE_CURSOR_POS |
1677 | && S.sent_ESC_br_n6 | 1677 | && S.sent_ESC_br6n |
1678 | ) { | 1678 | ) { |
1679 | S.sent_ESC_br_n6 = 0; | 1679 | S.sent_ESC_br6n = 0; |
1680 | if (cursor == 0) { /* otherwise it may be bogus */ | 1680 | if (cursor == 0) { /* otherwise it may be bogus */ |
1681 | int col = ((ic >> 32) & 0x7fff) - 1; | 1681 | int col = ((ic >> 32) & 0x7fff) - 1; |
1682 | if (col > cmdedit_prmt_len) { | 1682 | if (col > cmdedit_prmt_len) { |
@@ -2203,7 +2203,7 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li | |||
2203 | } /* while (1) */ | 2203 | } /* while (1) */ |
2204 | 2204 | ||
2205 | #if ENABLE_FEATURE_EDITING_ASK_TERMINAL | 2205 | #if ENABLE_FEATURE_EDITING_ASK_TERMINAL |
2206 | if (S.sent_ESC_br_n6) { | 2206 | if (S.sent_ESC_br6n) { |
2207 | /* "sleep 1; busybox ash" + hold [Enter] to trigger. | 2207 | /* "sleep 1; busybox ash" + hold [Enter] to trigger. |
2208 | * We sent "ESC [ 6 n", but got '\n' first, and | 2208 | * We sent "ESC [ 6 n", but got '\n' first, and |
2209 | * KEYCODE_CURSOR_POS response is now buffered from terminal. | 2209 | * KEYCODE_CURSOR_POS response is now buffered from terminal. |