read_simplemail() when SERVER_ADMIN_MSG is defined

Some warnings were mentioned

Add a prototype ahead of the function
Use a non-const copy of SERVER_ADMIN_MSG

quick-tested by:
- uncommenting the following in include/unixconf.h
  /* #define SERVER_ADMIN_MSG "adminmsg" */
- building NetHack
- creating a test message:
  echo "server_admin: system is going down at 2 pm" >~/nh/install/games/lib/nethackdir/adminmsg
- playtested and received the desired message
This commit is contained in:
nhmall
2021-02-26 09:05:52 -05:00
parent 05da754b02
commit 558b7c27d8
3 changed files with 9 additions and 4 deletions

View File

@@ -940,7 +940,7 @@ extern void strbuf_append(strbuf_t *, const char *);
extern void strbuf_reserve(strbuf_t *, int);
extern void strbuf_empty(strbuf_t *);
extern void strbuf_nl_to_crlf(strbuf_t *);
extern char *nonconst(const char *, char *);
extern char *nonconst(const char *, char *, size_t);
extern int swapbits(int, int, int);
extern void shuffle_int_array(int *, int);
/* note: the snprintf CPP wrapper includes the "fmt" argument in "..."