]> granicus.if.org Git - nethack/commitdiff
Merge changes from NetHack-3.6 into NetHack-3.7-Jan2020
authornhmall <nhmall@nethack.org>
Tue, 14 Jan 2020 14:28:38 +0000 (09:28 -0500)
committernhmall <nhmall@nethack.org>
Tue, 14 Jan 2020 14:28:38 +0000 (09:28 -0500)
1  2 
src/options.c
src/pline.c

diff --cc src/options.c
index 3210415138e87ba38e6c840b7c22f41cab4e03d9,1f8477193b4ceae470866f0d1c57637e140b987c..421f9b9f57050770efcf92132530d8cf9262ab9f
@@@ -1,4 -1,4 +1,4 @@@
- /* 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. */
@@@ -927,10 -950,10 +927,10 @@@ int maxlen
   * 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";
@@@ -2622,9 -2630,9 +2623,9 @@@ boolean tinitial, tfrom_file
          }
          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;
  
diff --cc src/pline.c
index 7eee2585f600eeb59804efd85605ba583c68e90c,9b5fc31de8eef38b8d30d683f3cd90c8f7c77827..4bf1419504a4b68a04bd5d11a668f0245f12f842
@@@ -6,6 -6,13 +6,10 @@@
  #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__))