From 5f6aaf39cff31f5f679fe07449a9e363dd474216 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 25 Oct 2008 23:27:29 +0000 Subject: less: reuse former vi's key reading code. Improve SIGWINCH handling. function old new delta less_main 2056 2097 +41 getch_nowait 248 273 +25 read_key 310 321 +11 static.esccmds 61 69 +8 count_lines 72 74 +2 less_gets 166 142 -24 less_getch 172 43 -129 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/5 up/down: 91/-170) Total: -79 bytes text data bss dec hex filename --- include/libbb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index 931710962..2a8b18336 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -950,6 +950,8 @@ enum { KEYCODE_FUN11 = -22, KEYCODE_FUN12 = -23, #endif + /* How long the longest ESC sequence we know? */ + KEYCODE_BUFFER_SIZE = 4 }; int read_key(int fd, smalluint *nbuffered, char *buffer) FAST_FUNC; -- cgit v1.2.3