1
0
mirror of https://github.com/rfivet/uemacs.git synced 2025-11-23 11:41:15 -05:00

Cache the result of function to name mapping lookup when doing keycode to function mapping lookup.

This commit is contained in:
2021-07-20 17:34:35 +08:00
parent 4f90e847f8
commit c093b7064b
9 changed files with 254 additions and 259 deletions

View File

@@ -3,10 +3,11 @@
#include "names.h"
typedef enum {
STOP, PLAY, RECORD
} kbdstate ;
extern kbdstate kbdmode ; /* current keyboard macro mode */
extern int lastkey ; /* last keystoke */
extern int kbdrep ; /* number of repetitions */
@@ -28,9 +29,9 @@ int newmlargt( char **outbufref, const char *prompt, int size) ;
int ectoc( int c) ;
/* Look up in names to function association table */
const name_bind *fncmatch( char *) ;
const name_bind *getname( void) ;
const char *getfncname( fnp_t func) ;
const name_bind *fncmatch( char *name) ; /* by name */
const name_bind *getname( void) ; /* interactively */
const name_bind *getfncnb( fnp_t func) ; /* by function */
int tgetc( void) ;
int get1key( void) ;