mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-15 01:13:33 +00:00
system/readline: check the control ascii only to support multi-languages
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
bd9174a3b6
commit
54bbfee30e
1 changed files with 3 additions and 3 deletions
|
|
@ -733,11 +733,11 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf,
|
|||
return nch;
|
||||
}
|
||||
|
||||
/* Otherwise, check if the character is printable and, if so, put the
|
||||
* character in the line buffer
|
||||
/* Otherwise, put the character in the line buffer if the
|
||||
* character is not a control byte
|
||||
*/
|
||||
|
||||
else if (isprint(ch))
|
||||
else if (!iscntrl(ch & 0xff))
|
||||
{
|
||||
buf[nch++] = ch;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue