From: nhkeni Date: Mon, 28 Feb 2022 00:57:16 +0000 (-0500) Subject: cmdcount_t X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16ea5e7fa6523db066a285bc6b6baded97cefb70;p=nethack cmdcount_t Add a type to force g.{command_count,last_command_count,multi} to have the same type (because cmd.c: g.multi = g.command_count;) and some resulting cleanup. --- diff --git a/include/extern.h b/include/extern.h index f4eca1cbf..8286d1079 100644 --- a/include/extern.h +++ b/include/extern.h @@ -247,7 +247,7 @@ extern const char *cmdname_from_func(int(*)(void), char *, boolean); extern boolean redraw_cmd(char); extern const char *levltyp_to_name(int); extern void reset_occupations(void); -extern void set_occupation(int(*)(void), const char *, int); +extern void set_occupation(int(*)(void), const char *, cmdcount_t); extern void cmdq_add_ec(int(*)(void)); extern void cmdq_add_key(char); extern struct _cmd_queue *cmdq_pop(void); diff --git a/src/cmd.c b/src/cmd.c index 77380d533..75dfe4423 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -214,7 +214,7 @@ reset_occupations(void) * function times out by its own means. */ void -set_occupation(int (*fn)(void), const char *txt, int xtime) +set_occupation(int (*fn)(void), const char *txt, cmdcount_t xtime) { if (xtime) { g.occupation = timed_occupation;