aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-27 10:47:49 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-27 10:47:49 +0100
commitd83bbf41934382631161845302f5d77027383aba (patch)
tree9f585364bdc127efc6f93e8f6cd34f502244b0ef /libbb/lineedit.c
parenteb62d7c383320923e8050a24a725277a1fd5c695 (diff)
downloadbusybox-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>
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c10
1 files changed, 5 insertions, 5 deletions
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.