summaryrefslogtreecommitdiff
path: root/usr.bin/mg/kbd.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-04-13 06:12:19 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-04-13 06:12:19 +0000
commit731317961dd78a8a6a84be2b662b9691fcf40d5a (patch)
tree642f051b45a10e806a55322912dad11e53435ab7 /usr.bin/mg/kbd.h
parentf54a169ac01105217cbf6e3dfa39f465f0bde571 (diff)
The start of KNF + -Wall. The code has been run through indent but
needs hand fixup. I stopped at keymap.c...
Diffstat (limited to 'usr.bin/mg/kbd.h')
-rw-r--r--usr.bin/mg/kbd.h81
1 files changed, 39 insertions, 42 deletions
diff --git a/usr.bin/mg/kbd.h b/usr.bin/mg/kbd.h
index 1816fc6462c..b121f0e19a3 100644
--- a/usr.bin/mg/kbd.h
+++ b/usr.bin/mg/kbd.h
@@ -2,62 +2,59 @@
* 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 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
- * dimension. If any changes are made to this struct, they must be
- * reflected in all keymap declarations.
+typedef struct {
+ 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
+ * dimension. If any changes are made to this struct, they must be reflected
+ * in all keymap declarations.
*/
-#define KEYMAPE(NUM) {\
- short map_num;\
- short map_max;\
- PF map_default;\
- MAP_ELEMENT map_element[NUM];\
+#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] */ \
}
- /* elements used */
- /* elements allocated */
- /* default function */
- /* realy [e_max] */
-typedef struct keymap_s KEYMAPE(1) KEYMAP;
+typedef struct keymap_s KEYMAPE(1) KEYMAP;
#define none ctrlg
#define prefix (PF)NULL
-/* number of map_elements to grow an overflowed keymap by */
+/* Number of map_elements to grow an overflowed keymap by */
#define IMAPEXT 0
#define MAPGROW 3
#define MAPINIT (MAPGROW+1)
-/* max number of default bindings added to avoid creating new element */
+/* Max number of default bindings added to avoid creating new element */
#define MAPELEDEF 4
typedef struct MAPS_S {
- KEYMAP *p_map;
- char *p_name;
-} MAPS;
+ KEYMAP *p_map;
+ char *p_name;
+} MAPS;
-extern MAPS map_table[];
+extern MAPS map_table[];
typedef struct {
- PF n_funct;
- char *n_name;
-} FUNCTNAMES;
-
-extern FUNCTNAMES functnames[];
-extern int nfunct;
-
-extern PF doscan();
-extern PF name_function();
-extern char *function_name();
-extern int complete_function();
-extern KEYMAP *name_map();
-extern char *map_name();
-extern MAPS *name_mode();
-
-extern MAP_ELEMENT *ele;
+ PF n_funct;
+ char *n_name;
+} FUNCTNAMES;
+
+PF doscan __P((KEYMAP *, int));
+PF name_function __P((char *));
+char *function_name __P((PF));
+KEYMAP *name_map __P((char *));
+char *map_name __P((KEYMAP *));
+MAPS *name_mode __P((char *));
+
+extern FUNCTNAMES functnames[];
+extern int nfunct;
+extern MAP_ELEMENT *ele;