summaryrefslogtreecommitdiff
path: root/usr.bin/mg/kbd.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mg/kbd.h')
-rw-r--r--usr.bin/mg/kbd.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/usr.bin/mg/kbd.h b/usr.bin/mg/kbd.h
index 6b7f3845140..d51f5839898 100644
--- a/usr.bin/mg/kbd.h
+++ b/usr.bin/mg/kbd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: kbd.h,v 1.16 2005/06/14 18:14:40 kjell Exp $ */
+/* $OpenBSD: kbd.h,v 1.17 2005/11/18 20:56:53 deraadt Exp $ */
/* This file is in the public domain. */
@@ -6,14 +6,14 @@
* kbd.h: type definitions for symbol.c and kbd.c for mg experimental
*/
-typedef struct {
- KCHAR k_base; /* first key in element */
- KCHAR k_num; /* last key in element */
- PF *k_funcp; /* pointer to array of pointers */
+struct map_element {
+ KCHAR k_base; /* first key in element */
+ KCHAR k_num; /* last key in element */
+ PF *k_funcp; /* pointer to array of pointers */
/* to functions */
struct keymap_s *k_prefmap; /* keymap of ONLY prefix key in */
/* element */
-} MAP_ELEMENT;
+};
/*
* Predefined keymaps are NOT type KEYMAP because final array needs
@@ -22,10 +22,10 @@ typedef struct {
*/
#define KEYMAPE(NUM) { \
- short map_num; /* elements used */ \
- short map_max; /* elements allocated */ \
- PF map_default; /* default function */ \
- MAP_ELEMENT map_element[NUM]; /* really [e_max] */ \
+ short map_num; /* elements used */ \
+ short map_max; /* elements allocated */\
+ PF map_default; /* default function */ \
+ struct map_element map_element[NUM]; /* really [e_max] */ \
}
typedef struct keymap_s KEYMAPE(1) KEYMAP;
@@ -37,23 +37,23 @@ typedef struct keymap_s KEYMAPE(1) KEYMAP;
/* Max number of default bindings added to avoid creating new element */
#define MAPELEDEF 4
-typedef struct MAPS_S {
+struct maps_s {
KEYMAP *p_map;
const char *p_name;
- struct MAPS_S *p_next;
-} MAPS;
+ struct maps_s *p_next;
+};
-extern MAPS *maps;
-extern MAPS fundamental_mode;
+extern struct maps_s *maps;
+extern struct maps_s fundamental_mode;
#define fundamental_map (fundamental_mode.p_map)
-int dobindkey(KEYMAP *, const char *, const char *);
-KEYMAP *name_map(const char *);
-MAPS *name_mode(const char *);
-PF doscan(KEYMAP *, int, KEYMAP **);
-const char *map_name(KEYMAP *);
-void maps_init(void);
-int maps_add(KEYMAP *, const char *);
+int dobindkey(KEYMAP *, const char *, const char *);
+KEYMAP *name_map(const char *);
+struct maps_s *name_mode(const char *);
+PF doscan(KEYMAP *, int, KEYMAP **);
+const char *map_name(KEYMAP *);
+void maps_init(void);
+int maps_add(KEYMAP *, const char *);
-extern MAP_ELEMENT *ele;
-extern MAPS *defb_modes[];
+extern struct map_element *ele;
+extern struct maps_s *defb_modes[];