]> granicus.if.org Git - nethack/commitdiff
cmdcount_t
authornhkeni <keni@his.com>
Mon, 28 Feb 2022 00:57:16 +0000 (19:57 -0500)
committernhkeni <keni@his.com>
Wed, 16 Mar 2022 21:33:44 +0000 (17:33 -0400)
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
src/cmd.c

index f4eca1cbfcf9b9532eecf009b04fcfb27599a773..8286d1079baf20d67245f38a9831b25a9e0bbf97 100644 (file)
@@ -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);
index 77380d533e4f1f0602e419ea939f5b7fd9fd6eb8..75dfe442306caf2d850d021141f7bbe050a15875 100644 (file)
--- 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;