Main Page | Alphabetical List | Class List | File List | Class Members | File Members

ctype.h

Go to the documentation of this file.
00001 
00024 #ifndef _CTYPE_H
00025 #define _CTYPE_H
00026 
00027 #include <nlibc.h>
00028 
00029 //------------------------------------------------------------------------------------------------
00059 #define isupper(c)  ((c) >= 'A' && (c) <= 'Z')                                                
00060 
00061 //------------------------------------------------------------------------------------------------
00096 #define islower(c) ((c)>=97 && (c)<=122)
00097 
00098 //------------------------------------------------------------------------------------------------
00135 #define isalpha(c) (isupper((c)) || islower((c)))                                            
00136 
00137 //--------------------------------------------------------------------------------------------
00170 #define isdigit(c) ((c)>='0' && (c)<='9')
00171 
00204 #define isalnum(c) ( (isalpha((c)) || isdigit((c)) )
00205 
00206 //-------------------------------------------------------------------------------------------------
00239 #define isblank(c) ((c)==' ' || (c)=='\t')
00240 
00241 //-------------------------------------------------------------------------------------------------
00274 #define isprint(c) (((c)>=32 && (c)<=126) || ((c)>=161 && (c)<=254))
00275 
00276 //-------------------------------------------------------------------------------------------------
00309 #define iscntrl(c) (!isprint(c))                                                              
00310 
00311 //-------------------------------------------------------------------------------------------------
00345 #define isgraph(c) (isprint(c) && (c)==' ')
00346 
00347 //-------------------------------------------------------------------------------------------------
00377 #define isspace(c) ((c)==' ' || (c)=='\f' || (c)=='\n' || (c)=='\r' || (c)=='\t' || (c)=='\v')
00378 
00379 //-------------------------------------------------------------------------------------------------
00411 #define ispunct(c) (isprint((c)) && !isalnum((c)) && !isspace((c)))
00412 
00413 //-------------------------------------------------------------------------------------------------
00442 #define isxdigit(c)  ( isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') )
00443 
00444 //-------------------------------------------------------------------------------------------------
00474 #ifndef __HAS_MAIN
00475 extern int tolower(int c);
00476 #else
00477 #if !defined(__cflow_processed) || defined(_uses_tolower_ctype_h)                              
00478 int tolower(int c)
00479 {                                                                                              
00480     return (c >= 'A' && c <= 'Z') ? (c+32) : (c);
00481 }
00482 #endif
00483 #endif // Has Main
00484 
00485 //-------------------------------------------------------------------------------------------------
00511 #if !defined(__cflow_processed) || defined(_uses_toupper_ctype_h)
00512 inline int toupper(int c)
00513 {
00514     return ( c >= 'a' && c <= 'z' ) ? (c-32) : c;
00515 }
00516 #endif
00517 
00518 #endif   /* ifndef _CTYPE_H  */
00519 

Generated on Tue Jan 10 12:43:38 2006 for nlibc by doxygen 1.3.5