uemacs: convert typedef struct NBIND to struct name_bind.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Thiago Farina 2010-07-02 16:37:45 -03:00 committed by Linus Torvalds
parent 8403b1d597
commit 724c4efc5f
6 changed files with 11 additions and 11 deletions

6
bind.c
View File

@ -277,7 +277,7 @@ int buildlist(int type, char *mstring)
{ {
window_t *wp; /* scanning pointer to windows */ window_t *wp; /* scanning pointer to windows */
struct key_tab *ktp; /* pointer into the command table */ struct key_tab *ktp; /* pointer into the command table */
NBIND *nptr; /* pointer into the name binding table */ struct name_bind *nptr; /* pointer into the name binding table */
struct buffer *bp; /* buffer to put binding list into */ struct buffer *bp; /* buffer to put binding list into */
int cpos; /* current position to use in outseq */ int cpos; /* current position to use in outseq */
char outseq[80]; /* output buffer for keystroke sequence */ char outseq[80]; /* output buffer for keystroke sequence */
@ -616,7 +616,7 @@ int (*getbind(int c))(int, int)
*/ */
char *getfname(fn_t func) char *getfname(fn_t func)
{ {
NBIND *nptr; /* pointer into the name binding table */ struct name_bind *nptr; /* pointer into the name binding table */
/* skim through the table, looking for a match */ /* skim through the table, looking for a match */
nptr = &names[0]; nptr = &names[0];
@ -636,7 +636,7 @@ char *getfname(fn_t func)
*/ */
int (*fncmatch(char *fname)) (int, int) int (*fncmatch(char *fname)) (int, int)
{ {
NBIND *ffp; /* pointer to entry in name binding table */ struct name_bind *ffp; /* pointer to entry in name binding table */
/* scan through the table, returning any match */ /* scan through the table, returning any match */
ffp = &names[0]; ffp = &names[0];

2
edef.h
View File

@ -33,7 +33,7 @@ extern char *modename[]; /* text names of modes */
extern char *mode2name[]; /* text names of modes */ extern char *mode2name[]; /* text names of modes */
extern char modecode[]; /* letters to represent modes */ extern char modecode[]; /* letters to represent modes */
extern struct key_tab keytab[]; /* key bind to functions table */ extern struct key_tab keytab[]; /* key bind to functions table */
extern NBIND names[]; /* name to function table */ extern struct name_bind names[]; /* name to function table */
extern int gmode; /* global editor mode */ extern int gmode; /* global editor mode */
extern int gflags; /* global control flag */ extern int gflags; /* global control flag */
extern int gfcolor; /* global forgrnd color (white) */ extern int gfcolor; /* global forgrnd color (white) */

View File

@ -375,7 +375,7 @@ extern int unlock(char *fname);
extern void lckerror(char *errstr); extern void lckerror(char *errstr);
/* names.c */ /* names.c */
extern NBIND names[]; extern struct name_bind names[];
/* pklock.c */ /* pklock.c */
extern char *dolock(char *fname); extern char *dolock(char *fname);

View File

@ -604,10 +604,10 @@ struct key_tab {
}; };
/* Structure for the name binding table. */ /* Structure for the name binding table. */
typedef struct { struct name_bind {
char *n_name; /* name of function key */ char *n_name; /* name of function key */
int (*n_func)(int, int); /* function name is bound to */ int (*n_func)(int, int); /* function name is bound to */
} NBIND; };
/* The editor holds deleted text chunks in the KILL buffer. The /* The editor holds deleted text chunks in the KILL buffer. The
kill buffer is logically a stream of ascii characters, however kill buffer is logically a stream of ascii characters, however

View File

@ -108,9 +108,9 @@ fn_t getname(void)
int cpos; /* current column on screen output */ int cpos; /* current column on screen output */
int c; int c;
char *sp; /* pointer to string for output */ char *sp; /* pointer to string for output */
NBIND *ffp; /* first ptr to entry in name binding table */ struct name_bind *ffp; /* first ptr to entry in name binding table */
NBIND *cffp; /* current ptr to entry in name binding table */ struct name_bind *cffp; /* current ptr to entry in name binding table */
NBIND *lffp; /* last ptr to entry in name binding table */ struct name_bind *lffp; /* last ptr to entry in name binding table */
char buf[NSTRING]; /* buffer to hold tentative command name */ char buf[NSTRING]; /* buffer to hold tentative command name */
/* starting at the beginning of the string buffer */ /* starting at the beginning of the string buffer */

View File

@ -9,7 +9,7 @@
#include "edef.h" #include "edef.h"
#include "efunc.h" #include "efunc.h"
NBIND names[] = { struct name_bind names[] = {
{"abort-command", ctrlg}, {"abort-command", ctrlg},
{"add-mode", setmode}, {"add-mode", setmode},
{"add-global-mode", setgmode}, {"add-global-mode", setgmode},