- /* NetHack 3.7 options.c $NHDT-Date: 1577050473 2019/12/22 21:34:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.422 $ */
-/* NetHack 3.6 options.c $NHDT-Date: 1578996303 2020/01/14 10:05:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.396 $ */
++/* NetHack 3.7 options.c $NHDT-Date: 1578996303 2020/01/14 10:05:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.396 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2008. */
/* NetHack may be freely redistributed. See license for details. */
* an appropriate digit will also fall through to \<other> and yield 'X'
* or 'O', plus stop if the non-digit is end-of-string.
*/
-STATIC_OVL void
+static void
escapes(cp, tp)
- const char *cp;
- char *tp;
+ const char *cp; /* might be 'tp', updating in place */
+ char *tp; /* result is never longer than 'cp' */
{
static NEARDATA const char oct[] = "01234567", dec[] = "0123456789",
hex[] = "00112233445566778899aAbBcCdDeEfF";
}
if (op == empty_optstr)
return FALSE;
- /* stripped leading and trailing spaces, condensed internal ones in 3.6.2 */
+ /* strip leading/trailing spaces, condense internal ones (3.6.2) */
mungspaces(op);
- if (!initial) {
+ if (!g.opt_initial) {
struct fruit *f;
int fnum = 0;
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
#include "hack.h"
-static unsigned pline_flags = 0;
-static char prevmsg[BUFSZ];
-
+ #define BIGBUFSZ (5 * BUFSZ) /* big enough to format a 4*BUFSZ string (from
+ * config file parsing) with modest decoration;
+ * result will then be truncated to BUFSZ-1 */
+
static void FDECL(putmesg, (const char *));
static char *FDECL(You_buf, (int));
#if defined(MSGHANDLER) && (defined(POSIX_TYPES) || defined(__GNUC__))