xref: /original-bsd/usr.bin/more/less.h (revision b0ceb3f2)
1 /*
2  * Copyright (c) 1988 Mark Nudleman
3  * Copyright (c) 1988 Regents of the University of California.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms are permitted
7  * provided that the above copyright notice and this paragraph are
8  * duplicated in all such forms and that any documentation,
9  * advertising materials, and other materials related to such
10  * distribution and use acknowledge that the software was developed
11  * by Mark Nudleman and the University of California, Berkeley.  The
12  * name of Mark Nudleman or the
13  * University may not be used to endorse or promote products derived
14  * from this software without specific prior written permission.
15  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18  *
19  *	@(#)less.h	5.8 (Berkeley) 12/06/88
20  */
21 
22 #define	RECOMP
23 
24 #define	NULL_POSITION	((off_t)(-1))
25 
26 #define	EOI		(0)
27 #define	READ_INTR	(-2)
28 
29 /* Special chars used to tell put_line() to do something special */
30 #define	UL_CHAR		'\201'		/* Enter underline mode */
31 #define	UE_CHAR		'\202'		/* Exit underline mode */
32 #define	BO_CHAR		'\203'		/* Enter boldface mode */
33 #define	BE_CHAR		'\204'		/* Exit boldface mode */
34 
35 #define	CONTROL_CHAR(c)		(iscntrl(c))
36 #define	CARAT_CHAR(c)		((c == '\177') ? '?' : (c | 0100))
37 
38 #define	TOP		(0)
39 #define	TOP_PLUS_ONE	(1)
40 #define	BOTTOM		(-1)
41 #define	BOTTOM_PLUS_ONE	(-2)
42 #define	MIDDLE		(-3)
43 
44 #define	A_INVALID		-1
45 
46 #define	A_AGAIN_SEARCH		1
47 #define	A_B_LINE		2
48 #define	A_B_SCREEN		3
49 #define	A_B_SCROLL		4
50 #define	A_B_SEARCH		5
51 #define	A_DIGIT			6
52 #define	A_EXAMINE		7
53 #define	A_FREPAINT		8
54 #define	A_F_LINE		9
55 #define	A_F_SCREEN		10
56 #define	A_F_SCROLL		11
57 #define	A_F_SEARCH		12
58 #define	A_GOEND			13
59 #define	A_GOLINE		14
60 #define	A_GOMARK		15
61 #define	A_HELP			16
62 #define	A_NEXT_FILE		17
63 #define	A_PERCENT		18
64 #define	A_PREFIX		19
65 #define	A_PREV_FILE		20
66 #define	A_QUIT			21
67 #define	A_REPAINT		22
68 #define	A_SETMARK		23
69 #define	A_STAT			24
70 #define	A_VISUAL		25
71 #define	A_TAGFILE		26
72 #define	A_FILE_LIST		27
73