added "more" command
[unix-history] / usr / src / usr.bin / window / char.h
CommitLineData
d5d80ef9 1/*
60de5df9
EW
2 * @(#)char.h 3.3 %G%
3 */
4
5/*
6 * Copyright (c) 1983 Regents of the University of California,
7 * All rights reserved. Redistribution permitted subject to
8 * the terms of the Berkeley Software License Agreement.
d5d80ef9
EW
9 */
10
11/*
12 * Macros and things to deal with control characters.
13 *
14 * Unctrl() is just like the standard function, except we don't want
15 * to include curses.
16 * Isctrl() returns true for all characters less than space and
17 * greater than or equal to delete.
18 * Isprt() is tab and all characters not isctrl(). It's used
19 * by wwwrite().
20 * Isunctrl() includes all characters that should be expanded
21 * using unctrl() by wwwrite() if ww_unctrl is set.
22 */
23
24char *_unctrl[];
25char _cmap[];
26#define ctrl(c) ('c' & 0x1f)
27#define unctrl(c) (_unctrl[(unsigned char) (c)])
28#define _C 0x01
29#define _P 0x02
30#define _U 0x04
31#define isctrl(c) (_cmap[(unsigned char) (c)] & _C)
32#define isprt(c) (_cmap[(unsigned char) (c)] & _P)
33#define isunctrl(c) (_cmap[(unsigned char) (c)] & _U)