some livelog cleanup
The gamelog structure's type/flags field is 'long' but the corresponding livelog event type field and the argument passed to gamelog's logging were 'unsigned'. They take the same values and those values mean the same things so change them all to long. The actual livelog logging assumed that time_t is a long number of seconds, and was also using a boolean as an array index. Perform proper type conversions. sysconf parsing used 'int' to hold strtol() value; change to long. Also it was using raw_printf() instead of config_error_add() to complain about any problems. Clearly the livelog patch was not updated to the current code base before being incorporated.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 extern.h $NHDT-Date: 1646171621 2022/03/01 21:53:41 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1063 $ */
|
||||
/* NetHack 3.7 extern.h $NHDT-Date: 1646255373 2022/03/02 21:09:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1064 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -884,7 +884,7 @@ extern void reveal_paths(void);
|
||||
extern boolean read_tribute(const char *, const char *, int, char *, int,
|
||||
unsigned);
|
||||
extern boolean Death_quote(char *, int);
|
||||
extern void livelog_add(unsigned int ll_type, const char *);
|
||||
extern void livelog_add(long, const char *);
|
||||
|
||||
/* ### fountain.c ### */
|
||||
|
||||
@@ -2049,8 +2049,8 @@ extern void You_see(const char *, ...) PRINTF_F(1, 2);
|
||||
extern void pline_The(const char *, ...) PRINTF_F(1, 2);
|
||||
extern void There(const char *, ...) PRINTF_F(1, 2);
|
||||
extern void verbalize(const char *, ...) PRINTF_F(1, 2);
|
||||
extern void gamelog_add(unsigned int, long, const char *);
|
||||
extern void livelog_printf(unsigned int, const char *, ...) PRINTF_F(2, 3);
|
||||
extern void gamelog_add(long, long, const char *);
|
||||
extern void livelog_printf(long, const char *, ...) PRINTF_F(2, 3);
|
||||
extern void raw_printf(const char *, ...) PRINTF_F(1, 2);
|
||||
extern void impossible(const char *, ...) PRINTF_F(1, 2);
|
||||
extern void config_error_add(const char *, ...) PRINTF_F(1, 2);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 sys.h $NHDT-Date: 1596498561 2020/08/03 23:49:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */
|
||||
/* NetHack 3.7 sys.h $NHDT-Date: 1646255373 2022/03/02 21:09:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.38 $ */
|
||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -28,7 +28,7 @@ struct sysopt {
|
||||
int check_save_uid; /* restoring savefile checks UID? */
|
||||
int check_plname; /* use plname for checking wizards/explorers/shellers */
|
||||
int bones_pools;
|
||||
unsigned int livelog; /* LL_foo events to livelog */
|
||||
long livelog; /* LL_foo events to livelog */
|
||||
|
||||
/* record file */
|
||||
int persmax;
|
||||
|
||||
Reference in New Issue
Block a user