160786Sps/*
2240121Sdelphij * Copyright (C) 1984-2012  Mark Nudelman
360786Sps *
460786Sps * You may distribute under the terms of either the GNU General Public
560786Sps * License or the Less License, as specified in the README file.
660786Sps *
7240121Sdelphij * For more information, see the README file.
860786Sps */
960786Sps
1060786Sps
1160786Sps/*
1260786Sps * Format of a lesskey file:
1360786Sps *
1460786Sps *	LESSKEY_MAGIC (4 bytes)
1560786Sps *	 sections...
1660786Sps *	END_LESSKEY_MAGIC (4 bytes)
1760786Sps *
1860786Sps * Each section is:
1960786Sps *
2060786Sps *	section_MAGIC (1 byte)
2160786Sps *	section_length (2 bytes)
2260786Sps *	key table (section_length bytes)
2360786Sps */
2460786Sps#define	C0_LESSKEY_MAGIC	'\0'
2560786Sps#define	C1_LESSKEY_MAGIC	'M'
2660786Sps#define	C2_LESSKEY_MAGIC	'+'
2760786Sps#define	C3_LESSKEY_MAGIC	'G'
2860786Sps
2960786Sps#define	CMD_SECTION		'c'
3060786Sps#define	EDIT_SECTION		'e'
3160786Sps#define	VAR_SECTION		'v'
3260786Sps#define	END_SECTION		'x'
3360786Sps
3460786Sps#define	C0_END_LESSKEY_MAGIC	'E'
3560786Sps#define	C1_END_LESSKEY_MAGIC	'n'
3660786Sps#define	C2_END_LESSKEY_MAGIC	'd'
3760786Sps
3860786Sps/* */
3960786Sps#define	KRADIX		64
40