Clarify names interface (only used in bind and input).

This commit is contained in:
Renaud 2013-05-31 13:18:10 +08:00
parent c4a5c31d42
commit cae7222493
6 changed files with 14 additions and 10 deletions

1
bind.c
View File

@ -23,6 +23,7 @@
#include "input.h"
#include "line.h"
#include "main.h"
#include "names.h"
#include "window.h"

1
edef.h
View File

@ -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) */

View File

@ -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

View File

@ -19,6 +19,7 @@
#include "edef.h"
#include "exec.h"
#include "main.h"
#include "names.h"
#include "wrapper.h"
#if PKCODE

View File

@ -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"

8
names.h Normal file
View File

@ -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 */