mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-18 20:18:21 +00:00
apps/graphics/pdcurs34/nuttx and system/termcurses: This commit fixes two issues:
1. A memory corruption issue that occurs from a paste operation that would overflow the fixed buffer size for keyboard processing. 2. A stall in getch() processing when there are cached keycodes in the termcurses emulation (tcurses_vt100.c).
This commit is contained in:
parent
3cdb6ec4ba
commit
e1237bfefd
4 changed files with 91 additions and 3 deletions
|
|
@ -117,6 +117,10 @@ struct termcurses_ops_s
|
|||
/* Get a keycode value */
|
||||
|
||||
CODE int (*getkeycode)(FAR struct termcurses_s *dev, int *specialkey, int *keymodifers);
|
||||
|
||||
/* Check for cached keycode value */
|
||||
|
||||
CODE bool (*checkkey)(FAR struct termcurses_s *dev);
|
||||
};
|
||||
|
||||
struct termcurses_dev_s
|
||||
|
|
@ -229,6 +233,16 @@ int termcurses_getwinsize(FAR struct termcurses_s *term, FAR struct winsize *win
|
|||
int termcurses_getkeycode(FAR struct termcurses_s *term, FAR int *specialkey,
|
||||
FAR int *keymodifiers);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: termcurses_checkkey
|
||||
*
|
||||
* Description:
|
||||
* Check if there is a key waiting to be processed.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
bool termcurses_checkkey(FAR struct termcurses_s *term);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue