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