]> granicus.if.org Git - nethack/commitdiff
Merge March 2020 changes into NetHack 3.7
authornhmall <nhmall@nethack.org>
Fri, 6 Mar 2020 15:59:50 +0000 (10:59 -0500)
committernhmall <nhmall@nethack.org>
Fri, 6 Mar 2020 15:59:50 +0000 (10:59 -0500)
1  2 
Files
README
doc/Guidebook.mn
doc/Guidebook.tex
doc/Guidebook.txt
include/patchlevel.h
src/rumors.c

diff --cc Files
index e72cda145a1c0b14edcda44d55fbb2eadeae7d8c,6208fb4758fe319fdaebda3b14abf74873974c54..2fb8424db3ee10f55c4630c8289841b9161054a8
--- 1/Files
--- 2/Files
+++ b/Files
@@@ -136,17 -114,18 +136,17 @@@ vault.c     version.c   vision.c    wea
  windows.c   wizard.c    worm.c      worn.c      write.c     zap.c
  
  sys/amiga:
- (files for Amiga versions - untested for 3.6.5)
+ (files for Amiga versions - untested for 3.6.6)
  Build.ami     Install.ami   Makefile.agc  Makefile.ami  NetHack.cnf
  amidos.c      amidos.p      amifont.uu    amifont8.uu   amigst.c
 -amii.hlp      amimenu.c     amirip.c      amisnd.c      amistack.c
 -amitty.c      amiwind.c     amiwind.p     clipwin.c     colorwin.c
 -cvtsnd.c      grave16.xpm   ifchange      mkdmake       txt2iff.c
 -winami.c      winami.p      winchar.c     windefs.h     winext.h
 -winfuncs.c    winkey.c      winmenu.c     winproto.h    winreq.c
 -winstr.c      xpm2iff.c
 +amii.hlp      amimenu.c     amirip.c      amistack.c    amitty.c
 +amiwind.c     amiwind.p     clipwin.c     colorwin.c    grave16.xpm
 +ifchange      mkdmake       txt2iff.c     winami.c      winami.p
 +winchar.c     windefs.h     winext.h      winfuncs.c    winkey.c
 +winmenu.c     winproto.h    winreq.c      winstr.c      xpm2iff.c
  
  sys/atari:
 -(files for Atari version - untested for 3.6.6)
 +(files for Atari version - untested for 3.7)
  Install.tos   atarifnt.uue  nethack.mnu   setup.g       tos.c
  unx2atar.sed
  
diff --cc README
index a3f43615eccf8fa76909120481386fb26133aed8,3b4ebacb795253759219b40f6bdffed0edad7152..77a09965dbe5f4b32d11d4eba215b14795e69fc6
--- 1/README
--- 2/README
+++ b/README
@@@ -1,66 -1,29 +1,66 @@@
 -         NetHack 3.6.6 -- General information March 2020
 +         NetHack 3.7.0 work-in-progress -- General information
  
 -NetHack 3.6 is an enhancement to the dungeon exploration game NetHack,
 +NetHack 3.7 is an enhancement to the dungeon exploration game NetHack,
  which is a distant descendent of Rogue and Hack, and a direct descendent of
 -NetHack 3.4 as there was no NetHack 3.5 release.
 +NetHack 3.6.
  
 -NetHack 3.6.6 is the official release of NetHack that follows NetHack 3.6.5
 -and contains bug fixes since 3.6.5, including a security fix that affected
 -versions 3.6.1, 3.6.2, 3.6.3, 3.6.4 and 3.6.5.
 +NetHack 3.7.0 work-in-progress is not a release of NetHack. As a .0 version,
 +and still very early in its development cycle, there has already been changes
 +made, and there will continue to be many more prior to an eventual release.
 +The file doc/fixes37.0 in the source distribution will be updated with a list
 +of fixes as they are committed.
  
 -The file doc/fixes36.6 in the source distribution has a full list of fixes.
 +In short -- there are likely to be bugs. Don't treat NetHack-3.7 branch as
 +released code, and if stability is paramount, then the most recent 
 +NetHack 3.6.5 release is safest for you.
 +
 +We're making the .0 work-in-progress available so that you can observe, test
 +out, and contribute to its development. Constructive suggestions, GitHub pull
 +requests, and bug reports are all welcome and encouraged.
 +
 +The file doc/fixes37.0 in the source distribution has a full list of bug-fixes
 +included so far, as well as brief mentions of some of the other code changes.
  The text in there was written for the development team's own use and is
 -provided "as is", so please do not ask us to further explain the entries in
 -that file.  Some entries might be considered "spoilers", particularly in the
 +provided  "as is", so please do not ask us to further explain the entries in
 +that file. Some entries might be considered "spoilers", particularly in the 
  "new features" section.
  
 -Below you will find some other general notes that were not considered
 -spoilers:
 -
 - *  invalid status highlight color could be maliciously used to corrupt memory
 - *  formatting corpse names used internal buffers differently from formatting
 - *      other objects and could potentially clobber memory
 - *  avoid divide by 0 crash if 'bogusmon' (file of bogus monster types) is empty
 - *  avoid #wizrumorcheck crash if either 'rumors.tru' or 'rumors.fal' or both
 - *      were empty when makedefs built 'rumors'
 +Along with the game improvements and bug fixes, NetHack 3.7 strives to make
 +some general architectural improvements to the game or to its building 
 +process. Among them:
 +
 + *  Remove barriers to building NetHack on one platform and operating system,
 +    for later execution on another (possibly quite different) platform and/or
 +    operating system. That capability is generally known as "cross-compiling."
 +    See the file "Cross-compiling" in the top-level folder for more information
 +    on that.
 +
 + *  Replace the build-time "yacc and lex"-based level compiler, the "yacc and 
 +    lex"-based dungeon compiler, and the quest text file processing done
 +    by NetHack's "makedefs" utility, with Lua text alternatives that are 
 +    loaded and processed by the game during play.
 +
 + *  Write game savefiles and bonesfiles in a more portable and consistent way
 +    to open up the possibility of utilizing them between different platforms,
 +    such as between your desktop computer and your hand-held device.
 +
 + *  Add support to make the game restartable without exit (a.k.a. "play again"
 +    support). Toward that end, many previously scattered and separate variables
 +    have been gathered into a central 'g' structure in decl.h/decl.c. That
 +    will benefit the porting effort to some platforms that are under
 +    consideration.
 +
 +Here are some other general notes on the changes in NetHack 3.7 that were not
 +considered spoilers:
 + -  automatic annotation "gateway to Moloch's Sanctum" for vibrating square
 +        level once that square's location becomes known (found or magic
 +        mapped); goes away once sanctum temple is found (entered or high altar
 +        mapped)
 + -  savefile: add support to deconstruct internal data structures down into
 +        their individual fields and save those fields instead of the entire
 +        struct
 + -  savefile: use little-endian format for fields where that makes a difference
+  
                          - - - - - - - - - - -
  
  Please read items (1), (2) and (3) BEFORE doing anything with your new code.
index b88d35d46844833ebb561ba13a259d2771802f90,bad63a86a1a3a1425ae2ff09f8f90fa4fdec20a7..4cd2b1476e7bb0bd798180567943f5b4f926ac00
@@@ -1,7 -1,7 +1,7 @@@
- .\" $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.372 $ $NHDT-Date: 1581817474 2020/02/16 01:44:34 $
 -.\" $NHDT-Branch: NetHack-3.6-Mar2020 $:$NHDT-Revision: 1.347 $ $NHDT-Date: 1583508684 2020/03/06 15:31:24 $
++.\" $NHDT-Branch: NetHack-3.7-Mar2020 $:$NHDT-Revision: 1.347 $ $NHDT-Date: 1583508684 2020/03/06 15:31:24 $
  .\"
  .\" This is an excerpt from the 'roff' man page from the 'groff' package.
 -.\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines.
 +.\" Guidebook.mn currently does *not* fully adhere to these guidelines.
  .\"|||
  .\"| o Never include empty or blank lines in a roff document.  Instead,  use
  .\"|   the empty request (a line consisting of a dot only) or a line comment
  .ds h0 "NetHack Guidebook
  .ds h1
  .ds h2 %
 -.ds vr "NetHack 3.6
 +.ds vr "NetHack 3.7
  .ds f0 "\*(vr
  .ds f1
- .ds f2 "February 17, 2020
+ .ds f2 "March 8, 2020
  .
  .\" A note on some special characters:
  .\" \(lq = left double quote
index c3aa22c94f93c287eeb8c962fbc8b6e30624b032,c34f6fa806e8412d11eea03dfd12dd9f098fd729..b734529618122836df082ac8864341b954cc43c9
@@@ -44,8 -44,8 +44,8 @@@
  
  %.au
  \author{Original version - Eric S. Raymond\\
 -(Edited and expanded for 3.6 by Mike Stephenson and others)}
 +(Edited and expanded for 3.7 by Mike Stephenson and others)}
- \date{February 17, 2020}
+ \date{March 8, 2020}
  
  \maketitle
  
index 58615d912534d37f4bf1af03212f187fdc3515e8,7a9234dbef028e34776f2bbf0fc90dc003fb8c39..12ba25c1eb19870d1a1e8fd9aeb31dff95903edd
@@@ -13,9 -13,9 +13,9 @@@
  
  
                           Original version - Eric S. Raymond
 -             (Edited and expanded for 3.6 by Mike Stephenson and others)
 +             (Edited and expanded for 3.7 by Mike Stephenson and others)
  
-                                   February 17, 2020
+                                     March 4, 2020
  
  
  
  
                                   - - - - - - - - - -
  
-                From time to time, some depraved  individual  out  there  in
-           netland  sends a particularly intriguing modification to help out
+                From  time  to  time,  some depraved individual out there in
+           netland sends a particularly intriguing modification to help  out
 -
 -
 -          NetHack 3.6                                         March 4, 2020
 -
 -
 -
 -
 -
 -          NetHack Guidebook                                              93
 -
 -
 -
            with the game.  The NetHack Development Team sometimes makes note
-           of  the  names of the worst of these miscreants in this, the list
+           of the names of the worst of these miscreants in this,  the  list
            of Dungeoneers:
                 Adam Aronow           J. Ali Harlow          Mikko Juola
                 Alex Kompel             Janet Walz           Nathan Eady
  
  
  
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +          NetHack 3.7                                     February 17, 2020
 +
Simple merge
diff --cc src/rumors.c
index 9a37dd220f940e5e98de8c1add9b704ac93ce0b8,ac82b44feeb559de643589afe1963ca02d42d45e..73ec5f4c01b71b353173cd944b934ab1e6d400a7
@@@ -1,4 -1,4 +1,4 @@@
- /* NetHack 3.6        rumors.c        $NHDT-Date: 1582364450 2020/02/22 09:40:50 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.51 $ */
 -/* NetHack 3.6        rumors.c        $NHDT-Date: 1583445339 2020/03/05 21:55:39 $  $NHDT-Branch: NetHack-3.6-Mar2020 $:$NHDT-Revision: 1.38 $ */
++/* NetHack 3.7        rumors.c        $NHDT-Date: 1583445339 2020/03/05 21:55:39 $  $NHDT-Branch: NetHack-3.6-Mar2020 $:$NHDT-Revision: 1.38 $ */
  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  /*-Copyright (c) Robert Patrick Rankin, 2012. */
  /* NetHack may be freely redistributed.  See license for details. */
@@@ -145,11 -157,12 +145,12 @@@ boolean exclude_cookie
              exercise(A_WIS, (adjtruth > 0));
      } else {
          couldnt_open_file(RUMORFILE);
 -        true_rumor_size = -1; /* don't try to open it again */
 +        g.true_rumor_size = -1; /* don't try to open it again */
      }
- /* this is safe either way, so do it always since we can't get the definition
-  * out of makedefs.c
-  */
+     /* this is safe either way, so do it always since we can't get the
+      * definition out of makedefs.c
+      */
  #define PAD_RUMORS_TO
  #ifdef PAD_RUMORS_TO
      /* remove padding */
@@@ -175,11 -188,9 +176,9 @@@ rumor_check(
      winid tmpwin;
      char *endp, line[BUFSZ], xbuf[BUFSZ], rumor_buf[BUFSZ];
  
 -    if (true_rumor_size < 0L) { /* we couldn't open RUMORFILE */
 +    if (g.true_rumor_size < 0L) { /* we couldn't open RUMORFILE */
-     no_rumors:
+  no_rumors:
          pline("rumors not accessible.");
-         if (rumors)
-             (void) dlb_fclose(rumors);
          return;
      }
  
          long ftell_rumor_start = 0L;
  
          rumor_buf[0] = '\0';
 -        if (true_rumor_size == 0L) { /* if this is 1st outrumor() */
 +        if (g.true_rumor_size == 0L) { /* if this is 1st outrumor() */
              init_rumors(rumors);
 -            if (true_rumor_size < 0L) {
 +            if (g.true_rumor_size < 0L)
+                 rumors = (dlb *) 0; /* init_rumors() closes it upon failure */
                  goto no_rumors; /* init failed */
+             }
          }
          tmpwin = create_nhwindow(NHW_TEXT);
  
          /*
           * reveal the values.
           */
-         Sprintf(
-             rumor_buf,
-             "T start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)",
-             (long) g.true_rumor_start, g.true_rumor_start, g.true_rumor_end,
-             (unsigned long) g.true_rumor_end, g.true_rumor_size,
-             (unsigned long) g.true_rumor_size);
+         Sprintf(rumor_buf,
+                "T start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)",
 -                (long) true_rumor_start, true_rumor_start,
 -                true_rumor_end, (unsigned long) true_rumor_end,
 -                true_rumor_size, (unsigned long) true_rumor_size);
++            (long) g.true_rumor_start, g.true_rumor_start,
++            g.true_rumor_end, (unsigned long) g.true_rumor_end,
++            g.true_rumor_size,(unsigned long) g.true_rumor_size);
          putstr(tmpwin, 0, rumor_buf);
-         Sprintf(
-             rumor_buf,
-             "F start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)",
-             (long) g.false_rumor_start, g.false_rumor_start, g.false_rumor_end,
-             (unsigned long) g.false_rumor_end, g.false_rumor_size,
-             (unsigned long) g.false_rumor_size);
+         Sprintf(rumor_buf,
+                "F start=%06ld (%06lx), end=%06ld (%06lx), size=%06ld (%06lx)",
 -                (long) false_rumor_start, false_rumor_start,
 -                false_rumor_end, (unsigned long) false_rumor_end,
 -                false_rumor_size, (unsigned long) false_rumor_size);
++            (long) g.false_rumor_start, g.false_rumor_start,
++            g.false_rumor_end,(unsigned long) g.false_rumor_end,
++            g.false_rumor_size,(unsigned long) g.false_rumor_size);
          putstr(tmpwin, 0, rumor_buf);
  
          /*