improve hist.c FUNCPTR type to use in arg

This commit is contained in:
Landon Curt Noll
2023-03-12 18:16:36 -07:00
parent 7c806f13ea
commit cce930987b

9
hist.c
View File

@@ -98,7 +98,7 @@ STATIC struct {
} HS; } HS;
typedef void (*FUNCPTR)(char *); typedef void (*FUNCPTR)(int);
typedef struct { typedef struct {
char *name; char *name;
@@ -650,12 +650,11 @@ read_key(void)
ent = &cur_map->default_ent; ent = &cur_map->default_ent;
if (ent->next) if (ent->next)
cur_map = ent->next; cur_map = ent->next;
if (ent->func) if (ent->func != NULL) {
/* ignore Saber-C warning #65 - has 1 arg, expecting 0 */
/* OK to ignore in proc read_key */
(*ent->func)(key); (*ent->func)(key);
else } else {
insert_char(key); insert_char(key);
}
} }