00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00027 #ifndef _RTXCTYPE_H_
00028 #define _RTXCTYPE_H_
00029
00030
00031
00032 #define OS_ISASCII(c) ((unsigned)(c) < 0x80)
00033
00034 #define OS_ISUPPER(c) (c >= 'A' && c <= 'Z')
00035 #define OS_ISLOWER(c) (c >= 'a' && c <= 'z')
00036 #define OS_ISDIGIT(c) (c >= '0' && c <= '9')
00037 #define OS_ISALPHA(c) (OS_ISUPPER(c) || OS_ISLOWER(c))
00038 #define OS_ISSPACE(c) ((c >= 0x09 && c <= 0x0d) || (c == ' '))
00039 #define OS_ISPUNCT(c) (c >= 0 && c <= 0x20)
00040 #define OS_ISALNUM(c) (OS_ISALPHA(c) || OS_ISDIGIT(c))
00041 #define OS_ISPRINT(c) (c >= ' ' && c <= '~')
00042 #define OS_ISGRAPH(c) (c >= '!' && c <= '~')
00043 #define OS_ISCNTRL(c) ((c >= 0 && c <= 0x1F) || c == 0x7F)
00044 #define OS_ISXDIGIT(c) \
00045 (OS_ISDIGIT(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'))
00046 #define OS_ISBASE64(c) (OS_ISALNUM(c) || c == '+' || c == '/' || c == '=')
00047
00048 #define OS_TOLOWER(c) (OS_ISUPPER(c) ? (c) - 'A' + 'a' : (c))
00049 #define OS_TOUPPER(c) (OS_ISLOWER(c) ? (c) - 'a' + 'A' : (c))
00050
00051 #endif
00052