From 16ea5e7fa6523db066a285bc6b6baded97cefb70 Mon Sep 17 00:00:00 2001 From: nhkeni Date: Sun, 27 Feb 2022 19:57:16 -0500 Subject: [PATCH] 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. --- include/extern.h | 2 +- src/cmd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;