/* * c s i s . c */ /*)LIBRARY */ #ifdef DOCUMENTATION title csis Define Csets For Standard "is" Functions index Define csets for standard "is" functions synopsis #ifdef vms #include "c:cset.h" #include "c:csis.h" #else #include #include #endif extern CSET *csupper; extern CSET *cslower; extern CSET *csalpha; extern CSET *csdigit; extern CSET *csalnum; extern CSET *csxdigit; extern CSET *csspace; extern CSET *cspunct; extern CSET *csgraph; extern CSET *csprint; extern CSET *cscntrl; description Csis defines a group of csets that are based on the standard "is" functions, and the character table _ctype_. In fact, the csets defined use _ctype_ as their table. In general, isxxx(c) is equivalent to csmember(csxxx,c). The only exception is that there is no equivalent of isascii(), since that test is a range check to see if a reference to the table is meaningful, so there is no meaningful analogue. Further, meaningless results may be returned if c is EOF. Note that new csets can be built using the csets defined here as a base; however, if you apply csless() or cswith() to one of these csets, you will change the data base that all the "is" functions refer to, with unfortunate results. bugs author Jerry Leichter #endif /* )EDITLEVEL=03 * Edit history * 0.0 19-Jul-82 JSL Invention */ #ifdef vms #include "c:cset.h" #include "c:ctype.h" #else #include #include #endif static CSET _csupper = { _U, 0, &_ctype_ }; static CSET _cslower = { _L, 0, &_ctype_ }; static CSET _csalpha = { _UL, 0, &_ctype_ }; static CSET _csdigit = { _D, 0, &_ctype_ }; static CSET _csalnum = { _ULD, 0, &_ctype_ }; static CSET _csxdigit = { _X, 0, &_ctype_ }; static CSET _csspace = { _S, 0, &_ctype_ }; static CSET _cspunct = { _P, 0, &_ctype_ }; static CSET _csgraph = { _PULD, 0, &_ctype_ }; static CSET _csprint = { (_PULD|_B), 0, &_ctype_ }; static CSET _cscntrl = { _C, 0, &_ctype_ }; CSET *csupper = &_csupper; CSET *cslower = &_cslower; CSET *csalpha = &_csalpha; CSET *csdigit = &_csdigit; CSET *csalnum = &_csalnum; CSET *csxdigit = &_csxdigit; CSET *csspace = &_csspace; CSET *cspunct = &_cspunct; CSET *csgraph = &_csgraph; CSET *csprint = &_csprint; CSET *cscntrl = &_cscntrl;