tweaks: move a function to after the one that it calls
Этот коммит содержится в:
родитель
5725336149
Коммит
db10a421dc
@ -614,9 +614,9 @@ size_t get_key_buffer_len(void);
|
|||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
void implant(const char *string);
|
void implant(const char *string);
|
||||||
#endif
|
#endif
|
||||||
int get_kbinput(WINDOW *win, bool showcursor);
|
|
||||||
int parse_kbinput(WINDOW *win);
|
int parse_kbinput(WINDOW *win);
|
||||||
int parse_escape_sequence(WINDOW *win, int kbinput);
|
int parse_escape_sequence(WINDOW *win, int kbinput);
|
||||||
|
int get_kbinput(WINDOW *win, bool showcursor);
|
||||||
int get_byte_kbinput(int kbinput);
|
int get_byte_kbinput(int kbinput);
|
||||||
int get_control_kbinput(int kbinput);
|
int get_control_kbinput(int kbinput);
|
||||||
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
|
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
|
||||||
|
36
src/winio.c
36
src/winio.c
@ -321,24 +321,6 @@ int *get_input(WINDOW *win, size_t input_len)
|
|||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read in a single keystroke, ignoring any that are invalid. */
|
|
||||||
int get_kbinput(WINDOW *win, bool showcursor)
|
|
||||||
{
|
|
||||||
int kbinput = ERR;
|
|
||||||
|
|
||||||
reveal_cursor = showcursor;
|
|
||||||
|
|
||||||
/* Extract one keystroke from the input stream. */
|
|
||||||
while (kbinput == ERR)
|
|
||||||
kbinput = parse_kbinput(win);
|
|
||||||
|
|
||||||
/* If we read from the edit window, blank the status bar if needed. */
|
|
||||||
if (win == edit)
|
|
||||||
check_statusblank();
|
|
||||||
|
|
||||||
return kbinput;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Extract a single keystroke from the input stream. Translate escape
|
/* Extract a single keystroke from the input stream. Translate escape
|
||||||
* sequences and extended keypad codes into their corresponding values.
|
* sequences and extended keypad codes into their corresponding values.
|
||||||
* Set meta_key to TRUE when appropriate. Supported extended keypad values
|
* Set meta_key to TRUE when appropriate. Supported extended keypad values
|
||||||
@ -1334,6 +1316,24 @@ int parse_escape_sequence(WINDOW *win, int kbinput)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Read in a single keystroke, ignoring any that are invalid. */
|
||||||
|
int get_kbinput(WINDOW *win, bool showcursor)
|
||||||
|
{
|
||||||
|
int kbinput = ERR;
|
||||||
|
|
||||||
|
reveal_cursor = showcursor;
|
||||||
|
|
||||||
|
/* Extract one keystroke from the input stream. */
|
||||||
|
while (kbinput == ERR)
|
||||||
|
kbinput = parse_kbinput(win);
|
||||||
|
|
||||||
|
/* If we read from the edit window, blank the status bar if needed. */
|
||||||
|
if (win == edit)
|
||||||
|
check_statusblank();
|
||||||
|
|
||||||
|
return kbinput;
|
||||||
|
}
|
||||||
|
|
||||||
/* Turn a three-digit decimal number (from 000 to 255) into its corresponding
|
/* Turn a three-digit decimal number (from 000 to 255) into its corresponding
|
||||||
* byte value. */
|
* byte value. */
|
||||||
int get_byte_kbinput(int kbinput)
|
int get_byte_kbinput(int kbinput)
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user