usr.sbin/makefs/hammer2: Remove redundant hammer2_inode_modify()
[dragonfly.git] / contrib / less / lesskey.h
blob988c6aa50e17d85707b3295f7bc366318379566f
1 /*
2 * Copyright (C) 1984-2022 Mark Nudelman
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.
7 * For more information, see the README file.
8 */
10 #include "xbuf.h"
13 * Format of a lesskey file:
15 * LESSKEY_MAGIC (4 bytes)
16 * sections...
17 * END_LESSKEY_MAGIC (4 bytes)
19 * Each section is:
21 * section_MAGIC (1 byte)
22 * section_length (2 bytes)
23 * key table (section_length bytes)
25 #define C0_LESSKEY_MAGIC '\0'
26 #define C1_LESSKEY_MAGIC 'M'
27 #define C2_LESSKEY_MAGIC '+'
28 #define C3_LESSKEY_MAGIC 'G'
30 #define CMD_SECTION 'c'
31 #define EDIT_SECTION 'e'
32 #define VAR_SECTION 'v'
33 #define END_SECTION 'x'
35 #define C0_END_LESSKEY_MAGIC 'E'
36 #define C1_END_LESSKEY_MAGIC 'n'
37 #define C2_END_LESSKEY_MAGIC 'd'
39 /* */
40 #define KRADIX 64
42 struct lesskey_cmdname
44 char *cn_name;
45 int cn_action;
48 struct lesskey_table
50 struct lesskey_cmdname *names;
51 struct xbuffer buf;
52 int is_var;
55 struct lesskey_tables
57 struct lesskey_table *currtable;
58 struct lesskey_table cmdtable;
59 struct lesskey_table edittable;
60 struct lesskey_table vartable;
63 extern int parse_lesskey(char *infile, struct lesskey_tables *tables);