116311Sedward /* 2*62455Sbostic * Copyright (c) 1983, 1993 3*62455Sbostic * The Regents of the University of California. All rights reserved. 433514Sbostic * 542954Sbostic * This code is derived from software contributed to Berkeley by 642954Sbostic * Edward Wang at The University of California, Berkeley. 742954Sbostic * 842835Sbostic * %sccs.include.redist.c% 933514Sbostic * 10*62455Sbostic * @(#)char.h 8.1 (Berkeley) 06/06/93 1116311Sedward */ 1216311Sedward 1316311Sedward /* 1416311Sedward * Macros and things to deal with control characters. 1516311Sedward * 1616311Sedward * Unctrl() is just like the standard function, except we don't want 1716311Sedward * to include curses. 1816311Sedward * Isctrl() returns true for all characters less than space and 1916311Sedward * greater than or equal to delete. 2016311Sedward * Isprt() is tab and all characters not isctrl(). It's used 2116311Sedward * by wwwrite(). 2216311Sedward * Isunctrl() includes all characters that should be expanded 2316311Sedward * using unctrl() by wwwrite() if ww_unctrl is set. 2416311Sedward */ 2516311Sedward 2636801Sedward extern char *_unctrl[]; 2736801Sedward extern char _cmap[]; 2833248Sbostic #define ctrl(c) (c & 0x1f) 2916311Sedward #define unctrl(c) (_unctrl[(unsigned char) (c)]) 3016311Sedward #define _C 0x01 3116311Sedward #define _P 0x02 3216311Sedward #define _U 0x04 3316311Sedward #define isctrl(c) (_cmap[(unsigned char) (c)] & _C) 3416311Sedward #define isprt(c) (_cmap[(unsigned char) (c)] & _P) 3516311Sedward #define isunctrl(c) (_cmap[(unsigned char) (c)] & _U) 36