diff --git a/bind.c b/bind.c index 4db42ce..534132b 100644 --- a/bind.c +++ b/bind.c @@ -23,6 +23,7 @@ #include "input.h" #include "line.h" #include "main.h" +#include "names.h" #include "window.h" diff --git a/edef.h b/edef.h index 052ed90..a70f71c 100644 --- a/edef.h +++ b/edef.h @@ -33,7 +33,6 @@ extern int flickcode; /* do flicker supression? */ extern char *modename[]; /* text names of modes */ extern char *mode2name[]; /* text names of modes */ extern char modecode[]; /* letters to represent modes */ -extern struct name_bind names[];/* name to function table */ extern int gmode; /* global editor mode */ extern int gflags; /* global control flag */ extern int gfcolor; /* global forgrnd color (white) */ diff --git a/estruct.h b/estruct.h index 0f34e72..dd7a83d 100644 --- a/estruct.h +++ b/estruct.h @@ -561,12 +561,6 @@ struct terminal { #define TTbacg (*term.t_setback) #endif -/* Structure for the name binding table. */ -struct name_bind { - char *n_name; /* name of function key */ - int (*n_func)(int, int); /* function name is bound to */ -}; - /* The editor holds deleted text chunks in the struct kill buffer. The * kill buffer is logically a stream of ascii characters, however * due to its unpredicatable size, it gets implemented as a linked diff --git a/input.c b/input.c index f817a8e..43291c4 100644 --- a/input.c +++ b/input.c @@ -19,6 +19,7 @@ #include "edef.h" #include "exec.h" #include "main.h" +#include "names.h" #include "wrapper.h" #if PKCODE diff --git a/names.c b/names.c index 3a8629d..17c9cf3 100644 --- a/names.c +++ b/names.c @@ -1,7 +1,10 @@ +/* names.c -- implements names.h */ +#include "names.h" + /* Name to function binding table. * * This table gives the names of all the bindable functions - * end their C function address. These are used for the bind-to-key + * and their C function address. These are used for the bind-to-key * function. */ @@ -12,8 +15,6 @@ #include "eval.h" #include "exec.h" #include "crypt.h" -#include "estruct.h" -#include "edef.h" #include "file.h" #include "isearch.h" #include "line.h" diff --git a/names.h b/names.h new file mode 100644 index 0000000..700b304 --- /dev/null +++ b/names.h @@ -0,0 +1,8 @@ +/* Structure for the name binding table. */ +struct name_bind { + char *n_name; /* name of function key */ + int (*n_func)(int, int); /* function name is bound to */ +}; + +extern struct name_bind names[];/* name to function table */ +