mirror of
https://github.com/rfivet/uemacs.git
synced 2025-11-23 11:41:15 -05:00
Use binary search for name to function lookup. Fix name mapping table order. Rework test scripts.
This commit is contained in:
18
input.c
18
input.c
@@ -157,24 +157,6 @@ int ectoc( int c) {
|
||||
return c ;
|
||||
}
|
||||
|
||||
/*
|
||||
* match fname to a function in the names table
|
||||
* and return any match or NULL if none
|
||||
*
|
||||
* char *fname; name to attempt to match
|
||||
*/
|
||||
const name_bind *fncmatch( char *fname) {
|
||||
const name_bind *ffp ; /* pointer to entry in name binding table */
|
||||
|
||||
/* scan through the table, returning any match */
|
||||
for( ffp = names ; ffp->n_func != NULL ; ffp++)
|
||||
if( strcmp( fname, bind_name( ffp)) == 0)
|
||||
break ;
|
||||
|
||||
return ffp ;
|
||||
}
|
||||
|
||||
|
||||
const name_bind *getfncnb( fnp_t func) {
|
||||
const name_bind *nptr ; /* pointer into the name binding table */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user