mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 02:17:37 +08: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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user