1 /* 2 * Copyright (c) 1988 Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that this notice is preserved and that due credit is given 7 * to the University of California at Berkeley. The name of the University 8 * may not be used to endorse or promote products derived from this 9 * software without specific prior written permission. This software 10 * is provided ``as is'' without express or implied warranty. 11 * 12 * @(#)dctype.h 3.2 (Berkeley) 03/28/88 13 */ 14 15 #define INCLUDED_ECTYPE 16 17 #define D_UPPER 0x01 18 #define D_LOWER 0x02 19 #define D_DIGIT 0x04 20 #define D_SPACE 0x08 21 #define D_PUNCT 0x10 22 #define D_PRINT 0x20 23 24 #define Disalpha(c) (dctype[(c)]&(D_UPPER|D_LOWER)) 25 #define Disupper(c) (dctype[(c)]&D_UPPER) 26 #define Dislower(c) (dctype[(c)]&D_LOWER) 27 #define Disdigit(c) (dctype[(c)]&D_DIGIT) 28 #define Disalnum(c) (dctype[(c)]&(D_UPPER|D_LOWER|D_DIGIT)) 29 #define Disspace(c) (dctype[(c)]&D_SPACE) /* blank or null */ 30 #define Dispunct(c) (dctype[(c)]&D_PUNCT) 31 #define Disprint(c) (dctype[(c)]&D_PRINT) 32 33 extern unsigned char dctype[192]; 34