1 /*
2  * Copyright (c) 2006-2022, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2022-06-07     Meco Man     The first version.
9  */
10 
11 #include "posix/ctype.h"
12 
13 #if !(defined(__ICCARM__) && (__VER__ > 9000000)) /* IAR9.0 has defined */
14 #ifndef isascii /* some toolchain use macro to define it */
isascii(int c)15 int isascii(int c)
16 {
17     return c >= 0x00 && c <= 0x7f;
18 }
19 #endif
20 #endif /* !(defined(__ICCARM__) && (__VER__ > 9000000)) */
21 
22 #ifndef toascii
toascii(int c)23 int toascii(int c)
24 {
25     return (c)&0177;
26 }
27 #endif
28