X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fctype.h;fp=includes%2Fctype.h;h=a9ecc256456fc02c9fd7577fbc103a9428d0d25f;hb=1e221deb9ee725a14b3656f94e2763f8faeb18dc;hp=0000000000000000000000000000000000000000;hpb=9712362f98b90c1a2aeec9fd877b0b872b6378c7;p=pdclib diff --git a/includes/ctype.h b/includes/ctype.h new file mode 100644 index 0000000..a9ecc25 --- /dev/null +++ b/includes/ctype.h @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------- +// $Id$ +// ---------------------------------------------------------------------------- +// Public Domain C Library - http://pdclib.sourceforge.net +// This code is Public Domain. Use, modify, and redistribute at will. +// ---------------------------------------------------------------------------- +// Provides functions for determining the locale-dependent type of a character, +// plus locale-aware uppercase / lowercase conversions. (See also locale.h.) +// ---------------------------------------------------------------------------- + +#ifndef __CTYPE_H +#define __CTYPE_H __CTYPE_H + +// ---------------------------------------------------------------------------- +// FUNCTIONS + +// returns nonzero if c is alphanumeric in the locale. +int isalnum( int c ); + +// returns nonzero if c is alphabetic character in the locale. +int isalpha( int c ); + +// returns nonzero if c is a horizontal blank in the locale. +int isblank( int c ); + +// returns nonzero if c is a control character in the locale. +int iscntrl( int c ); + +// returns nonzero if c is a digit in the locale. +int isdigit( int c ); + +// returns nonzero if c is alphanumeric or a punctuation in the locale. +int isgraph( int c ); + +// returns nonzero if c is a lowercase alphabetic character in the locale. +int islower( int c ); + +// returns nonzero if c is a printable character ( isgraph( ) or isblank( ) ) in +// the locale. +int isprint( int c ); + +// returns nonzero if c is a punctuation in the locale. +int ispunct( int c ); + +// returns nonzero if c is a whitespace in the locale. +int isspace( int c ); + +// returns nonzero if c is an uppercase alphabetical character in the locale. +int isupper( int c ); + +// returns nonzero if c is a hexedecimal digit in the locale. +int isxdigit( int c ); + +// returns lowercase equivalent for c in locale. +int tolower( int c ); + +// returns uppercase equivalent for c in locale. +int toupper( int c ); + +#endif // __CTYPE_H