Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (41 sloc) 2.072 kb
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
1 /* map.h */
2 /* Copyright 1995 by Steve Kirkendall */
3
4
5 /* The current state of the keystroke mapping queue */
6 typedef enum
7 {
8 MAP_CLEAR, /* not in the middle of any map */
9 MAP_USER, /* at least 1 unresolved user map */
10 MAP_KEY /* at least 1 unresolved key map, but no user maps */
11 } MAPSTATE;
12
13 /* This data type is a bitmap of the following flags. It is used to describe
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
14 * when a map takes effect, and how it is interpreted.
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
15 */
16 typedef unsigned int MAPFLAGS;
17 #define MAP_INPUT 0x0001 /* map when in input mode */
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
18 #define MAP_HISTORY 0x0002 /* map when in input on history buffer */
19 #define MAP_COMMAND 0x0004 /* map when in visual command mode */
20 #define MAP_MOTION 0x0008 /* map in command mode when motion expected */
21 #define MAP_SELECT 0x0010 /* map when visible selection is pending */
22 #define MAP_WHEN 0x00ff /* mask for all of the "map when" bits */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
23 #define MAP_ASCMD 0x0100 /* always execute map as visual commands */
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
24 #define MAP_ALL 0x011f /* all of the above */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
25 #define MAP_ABBR 0x0200 /* this is an abbr, not a map */
26 #define MAP_DISABLE 0x0400 /* disable all maps for next keystroke */
27 #define MAP_BREAK 0x0800 /* switch from "run" to "step" trace mode */
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
28 #define MAP_NOREMAP 0x1000 /* disable remaps for rhs of this map */
29 #define MAP_NOSAVE 0x2000 /* prevent :mkexrc from saving this map */
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
30
31 BEGIN_EXTERNC
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
32 extern void mapinsert P_((CHAR *rawin, int rawlen, CHAR *cooked, int cooklen, CHAR *label, MAPFLAGS flags, CHAR *mode));
33 extern ELVBOOL mapdelete P_((CHAR *rawin, int rawlen, MAPFLAGS flags, CHAR *mode, ELVBOOL del, ELVBOOL brk));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
34 extern MAPSTATE mapdo P_((CHAR *keys, int nkeys));
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
35 extern void mapunget P_((CHAR *keys, int nkeys, ELVBOOL remap));
36 extern CHAR *maplist P_((MAPFLAGS flags, CHAR *mode, int *reflen));
37 extern RESULT maplearn P_((_CHAR_ buf, ELVBOOL starting));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
38 extern CHAR maplrnchar P_((_CHAR_ dflt));
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
39 extern ELVBOOL mapbusy P_((void));
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
40 extern void mapalert P_((void));
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
41 extern CHAR *mapabbr P_((CHAR *bkwd, long *oldptr, long *newptr, ELVBOOL exline));
42 #ifdef FEATURE_MKEXRC
cf92e3b @mbert Import Elvis 2.0 (written by Steve Kirkendall)
authored
43 extern void mapsave P_((BUFFER buf));
44 #endif
45 END_EXTERNC
Something went wrong with that request. Please try again.