mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
improve hist.c FUNCPTR type to use in arg
This commit is contained in:
9
hist.c
9
hist.c
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user