2 * Character classification and conversion
3 * Copyright (C) 2000 Lineo, Inc.
4 * Written by Erik Andersen
5 * This file is part of the uClibc C library and is distributed
6 * under the GNU Library General Public License.
9 #define USE_CTYPE_C_FUNCTIONS
16 return (isalpha(c) || isdigit(c));
24 return (isupper(c) || islower(c));
32 return (c > 0 && c <= 0x7f);
40 return ((c > 0) && ((c <= 0x1f) || (c == 0x7f)));
48 return (c >= '0' && c <= '9');
56 return (c != ' ' && isprint(c));
64 return (c >= 'a' && c <= 'z');
72 return (c >= ' ' && c <= '~');
80 return ((c > ' ' && c <= '~') && !isalnum(c));
88 return (c == ' ' || c == '\f' || c == '\n' || c == '\r' ||
89 c == '\t' || c == '\v');
97 return (c >= 'A' && c <= 'Z');
105 return (isxupper(c) || isxlower(c));
113 return (isdigit(c) || (c >= 'a' && c <= 'f'));
121 return (isdigit(c) || (c >= 'A' && c <= 'F'));
137 return (isupper(c) ? ( c - 'A' + 'a') : (c));
145 return (islower(c) ? (c - 'a' + 'A') : (c));