xref: /freebsd/contrib/less/lesskey.h (revision 40a8ac8f62b535d30349faf28cf47106b7041b83)
1 /*
2  * Copyright (C) 1984-2012  Mark Nudelman
3  *
4  * You may distribute under the terms of either the GNU General Public
5  * License or the Less License, as specified in the README file.
6  *
7  * For more information, see the README file.
8  */
9 
10 
11 /*
12  * Format of a lesskey file:
13  *
14  *	LESSKEY_MAGIC (4 bytes)
15  *	 sections...
16  *	END_LESSKEY_MAGIC (4 bytes)
17  *
18  * Each section is:
19  *
20  *	section_MAGIC (1 byte)
21  *	section_length (2 bytes)
22  *	key table (section_length bytes)
23  */
24 #define	C0_LESSKEY_MAGIC	'\0'
25 #define	C1_LESSKEY_MAGIC	'M'
26 #define	C2_LESSKEY_MAGIC	'+'
27 #define	C3_LESSKEY_MAGIC	'G'
28 
29 #define	CMD_SECTION		'c'
30 #define	EDIT_SECTION		'e'
31 #define	VAR_SECTION		'v'
32 #define	END_SECTION		'x'
33 
34 #define	C0_END_LESSKEY_MAGIC	'E'
35 #define	C1_END_LESSKEY_MAGIC	'n'
36 #define	C2_END_LESSKEY_MAGIC	'd'
37 
38 /* */
39 #define	KRADIX		64
40