diff options
author | Ron Yorston <rmy@pobox.com> | 2022-02-09 09:03:18 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-02-09 09:05:39 +0000 |
commit | 492d0a7492a57fe8f02c766e25960b0ce0d88759 (patch) | |
tree | 4f5764a5c2250c031ea05e9aeacbb40d7971f493 /editors/vi.c | |
parent | 4734416a21312488a5099a297907783bee4ccc22 (diff) | |
parent | caa9c4f707b661cf398f2c2d66f54f5b0d8adfe2 (diff) | |
download | busybox-w32-492d0a7492a57fe8f02c766e25960b0ce0d88759.tar.gz busybox-w32-492d0a7492a57fe8f02c766e25960b0ce0d88759.tar.bz2 busybox-w32-492d0a7492a57fe8f02c766e25960b0ce0d88759.zip |
Merge busybox into merge
Fix conflicts in reset and ash.
Redefine the new safe_read_key() as a reference to read_key().
Disable SHA256_HWACCEL.
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/vi.c b/editors/vi.c index b973cc056..b30369302 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -1182,7 +1182,7 @@ static int readit(void) // read (maybe cursor) key from stdin | |||
1182 | // on nonblocking stdin. | 1182 | // on nonblocking stdin. |
1183 | // Note: read_key sets errno to 0 on success. | 1183 | // Note: read_key sets errno to 0 on success. |
1184 | again: | 1184 | again: |
1185 | c = read_key(STDIN_FILENO, readbuffer, /*timeout:*/ -1); | 1185 | c = safe_read_key(STDIN_FILENO, readbuffer, /*timeout:*/ -1); |
1186 | if (c == -1) { // EOF/error | 1186 | if (c == -1) { // EOF/error |
1187 | if (errno == EAGAIN) // paranoia | 1187 | if (errno == EAGAIN) // paranoia |
1188 | goto again; | 1188 | goto again; |
@@ -4930,7 +4930,7 @@ static void edit_file(char *fn) | |||
4930 | uint64_t k; | 4930 | uint64_t k; |
4931 | write1(ESC"[999;999H" ESC"[6n"); | 4931 | write1(ESC"[999;999H" ESC"[6n"); |
4932 | fflush_all(); | 4932 | fflush_all(); |
4933 | k = read_key(STDIN_FILENO, readbuffer, /*timeout_ms:*/ 100); | 4933 | k = safe_read_key(STDIN_FILENO, readbuffer, /*timeout_ms:*/ 100); |
4934 | if ((int32_t)k == KEYCODE_CURSOR_POS) { | 4934 | if ((int32_t)k == KEYCODE_CURSOR_POS) { |
4935 | uint32_t rc = (k >> 32); | 4935 | uint32_t rc = (k >> 32); |
4936 | columns = (rc & 0x7fff); | 4936 | columns = (rc & 0x7fff); |