tweaks: move a function to after the one that it calls

master
Benno Schulenberg 2020-01-26 15:41:09 +01:00
parent 5725336149
commit db10a421dc
2 changed files with 19 additions and 19 deletions

View File

@ -614,9 +614,9 @@ size_t get_key_buffer_len(void);
#ifdef ENABLE_NANORC
void implant(const char *string);
#endif
int get_kbinput(WINDOW *win, bool showcursor);
int parse_kbinput(WINDOW *win);
int parse_escape_sequence(WINDOW *win, int kbinput);
int get_kbinput(WINDOW *win, bool showcursor);
int get_byte_kbinput(int kbinput);
int get_control_kbinput(int kbinput);
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);

View File

@ -321,24 +321,6 @@ int *get_input(WINDOW *win, size_t input_len)
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
* sequences and extended keypad codes into their corresponding 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;
}
/* 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
* byte value. */
int get_byte_kbinput(int kbinput)