mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-19 07:46:24 -05:00
uemacs: convert typedef struct KEYTAB to struct key_tab.
Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e5e0fbd7e7
commit
8403b1d597
12
bind.c
12
bind.c
@ -91,7 +91,7 @@ int bindtokey(int f, int n)
|
||||
{
|
||||
unsigned int c; /* command key to bind */
|
||||
fn_t kfunc; /* ptr to the requested function to bind to */
|
||||
KEYTAB *ktp; /* pointer into the command table */
|
||||
struct key_tab *ktp; /* pointer into the command table */
|
||||
int found; /* matched command flag */
|
||||
char outseq[80]; /* output buffer for keystroke sequence */
|
||||
|
||||
@ -208,8 +208,8 @@ int unbindkey(int f, int n)
|
||||
*/
|
||||
int unbindchar(int c)
|
||||
{
|
||||
KEYTAB *ktp; /* pointer into the command table */
|
||||
KEYTAB *sktp; /* saved pointer into the command table */
|
||||
struct key_tab *ktp; /* pointer into the command table */
|
||||
struct key_tab *sktp; /* saved pointer into the command table */
|
||||
int found; /* matched command flag */
|
||||
|
||||
/* search the table to see if the key exists */
|
||||
@ -276,7 +276,7 @@ int buildlist(int type, char *mstring)
|
||||
#endif
|
||||
{
|
||||
window_t *wp; /* scanning pointer to windows */
|
||||
KEYTAB *ktp; /* pointer into the command table */
|
||||
struct key_tab *ktp; /* pointer into the command table */
|
||||
NBIND *nptr; /* pointer into the name binding table */
|
||||
struct buffer *bp; /* buffer to put binding list into */
|
||||
int cpos; /* current position to use in outseq */
|
||||
@ -596,7 +596,7 @@ void cmdstr(int c, char *seq)
|
||||
*/
|
||||
int (*getbind(int c))(int, int)
|
||||
{
|
||||
KEYTAB *ktp;
|
||||
struct key_tab *ktp;
|
||||
|
||||
ktp = &keytab[0]; /* Look in key table. */
|
||||
while (ktp->k_fp != NULL) {
|
||||
@ -612,7 +612,7 @@ int (*getbind(int c))(int, int)
|
||||
/*
|
||||
* getfname:
|
||||
* This function takes a ptr to function and gets the name
|
||||
* associated with it
|
||||
* associated with it.
|
||||
*/
|
||||
char *getfname(fn_t func)
|
||||
{
|
||||
|
7
ebind.h
7
ebind.h
@ -5,13 +5,16 @@
|
||||
* Modified by Petri Kutvonen
|
||||
*/
|
||||
|
||||
#ifndef EBIND_H_
|
||||
#define EBIND_H_
|
||||
|
||||
/*
|
||||
* Command table.
|
||||
* This table is *roughly* in ASCII order, left to right across the
|
||||
* characters of the command. This explains the funny location of the
|
||||
* control-X commands.
|
||||
*/
|
||||
KEYTAB keytab[NBINDS] = {
|
||||
struct key_tab keytab[NBINDS] = {
|
||||
{CONTROL | 'A', gotobol}
|
||||
,
|
||||
{CONTROL | 'B', backchar}
|
||||
@ -416,3 +419,5 @@ KEYTAB keytab[NBINDS] = {
|
||||
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
#endif /* EBIND_H_ */
|
||||
|
2
edef.h
2
edef.h
@ -32,7 +32,7 @@ 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 KEYTAB keytab[]; /* key bind to functions table */
|
||||
extern struct key_tab keytab[]; /* key bind to functions table */
|
||||
extern NBIND names[]; /* name to function table */
|
||||
extern int gmode; /* global editor mode */
|
||||
extern int gflags; /* global control flag */
|
||||
|
12
estruct.h
12
estruct.h
@ -597,18 +597,16 @@ typedef struct {
|
||||
#define TTbacg (*term.t_setback)
|
||||
#endif
|
||||
|
||||
/* structure for the table of initial key bindings */
|
||||
|
||||
typedef struct {
|
||||
/* Structure for the table of initial key bindings. */
|
||||
struct key_tab {
|
||||
short k_code; /* Key code */
|
||||
int (*k_fp)(int, int); /* Routine to handle it */
|
||||
} KEYTAB;
|
||||
|
||||
/* structure for the name binding table */
|
||||
};
|
||||
|
||||
/* Structure for the name binding table. */
|
||||
typedef struct {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user