1 /*- 2 * Copyright (c) 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)dctype.h 8.1 (Berkeley) 06/06/93 8 */ 9 10 #define INCLUDED_ECTYPE 11 12 #define D_UPPER 0x01 13 #define D_LOWER 0x02 14 #define D_DIGIT 0x04 15 #define D_SPACE 0x08 16 #define D_PUNCT 0x10 17 #define D_PRINT 0x20 18 19 #define Disalpha(c) (dctype[(c)]&(D_UPPER|D_LOWER)) 20 #define Disupper(c) (dctype[(c)]&D_UPPER) 21 #define Dislower(c) (dctype[(c)]&D_LOWER) 22 #define Disdigit(c) (dctype[(c)]&D_DIGIT) 23 #define Disalnum(c) (dctype[(c)]&(D_UPPER|D_LOWER|D_DIGIT)) 24 #define Disspace(c) (dctype[(c)]&D_SPACE) /* blank or null */ 25 #define Dispunct(c) (dctype[(c)]&D_PUNCT) 26 #define Disprint(c) (dctype[(c)]&D_PRINT) 27 28 extern unsigned char dctype[192]; 29