A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 78 lines 2.3 kB view raw
1#ifndef _CTYPE_H_ 2#ifdef __cplusplus 3extern "C" { 4#endif 5#define _CTYPE_H_ 6 7#include "_ansi.h" 8 9int _EXFUN(isalnum, (int __c)); 10int _EXFUN(isalpha, (int __c)); 11int _EXFUN(iscntrl, (int __c)); 12int _EXFUN(isdigit, (int __c)); 13int _EXFUN(isgraph, (int __c)); 14int _EXFUN(islower, (int __c)); 15int _EXFUN(isprint, (int __c)); 16int _EXFUN(ispunct, (int __c)); 17int _EXFUN(isspace, (int __c)); 18int _EXFUN(isupper, (int __c)); 19int _EXFUN(isxdigit,(int __c)); 20int _EXFUN(tolower, (int __c)); 21int _EXFUN(toupper, (int __c)); 22 23#ifndef __STRICT_ANSI__ 24int _EXFUN(isascii, (int __c)); 25int _EXFUN(toascii, (int __c)); 26int _EXFUN(_tolower, (int __c)); 27int _EXFUN(_toupper, (int __c)); 28#endif 29 30#define _U 01 31#define _L 02 32#define _N 04 33#define _S 010 34#define _P 020 35#define _C 040 36#define _X 0100 37#define _B 0200 38 39#ifdef PLUGIN 40#define _ctype_ (rb->_rbctype_) 41#else 42extern const unsigned char _ctype_[257]; 43#endif 44 45#ifndef __cplusplus 46#define isalpha(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L)) 47#define isupper(c) ((_ctype_+1)[(unsigned char)(c)]&_U) 48#define islower(c) ((_ctype_+1)[(unsigned char)(c)]&_L) 49/*#define isdigit(c) ((_ctype_+1)[(unsigned char)(c)]&_N)*/ 50#define isxdigit(c) ((_ctype_+1)[(unsigned char)(c)]&(_X|_N)) 51#define isspace(c) ((_ctype_+1)[(unsigned char)(c)]&_S) 52#define ispunct(c) ((_ctype_+1)[(unsigned char)(c)]&_P) 53#define isalnum(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L|_N)) 54#define isprint(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N|_B)) 55#define isgraph(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N)) 56#define iscntrl(c) ((_ctype_+1)[(unsigned char)(c)]&_C) 57 58/* should be slightly faster without array access */ 59#define isdigit(c) (((unsigned int) (c) - '0') < 10) 60/* Non-gcc versions will get the library versions, and will be 61 slightly slower */ 62#ifdef __GNUC__ 63# define toupper(c) \ 64 __extension__ ({ int __x = (unsigned char) (c); islower(__x) ? (__x - 'a' + 'A') : __x;}) 65# define tolower(c) \ 66 __extension__ ({ int __x = (unsigned char) (c); isupper(__x) ? (__x - 'A' + 'a') : __x;}) 67#endif 68#endif /* !__cplusplus */ 69 70#ifndef __STRICT_ANSI__ 71#define isascii(c) ((unsigned char)(c)<=0177) 72#define toascii(c) ((c)&0177) 73#endif 74 75#ifdef __cplusplus 76} 77#endif 78#endif /* _CTYPE_H_ */