From f66235effbef49509455b6d536cbaccbc6ada1bd Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Sep 2024 10:11:30 -0400 Subject: [PATCH 1/6] backport the updated Ixoth tile to 3.6 Reported by Shrigis1. the tile for Ixoth (knight's quest nemesis) depicted a demon rather than a dragon; change it to be a red dragon References: https://github.com/NetHack/NetHack/issues/1239 https://github.com/NetHack/NetHack/commit/5abd1be1754ae1dbb0a0b7c74597c2d5668f28e9 --- win/share/monsters.txt | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/win/share/monsters.txt b/win/share/monsters.txt index f2b81fc6e..78e856adc 100644 --- a/win/share/monsters.txt +++ b/win/share/monsters.txt @@ -7059,22 +7059,22 @@ Z = (195, 195, 195) } # tile 370 (Ixoth) { - ....O......O.... - ....O......O.... - ...LOOCDDCOOL... - ...DDDDDDDDDDD.. - .CCDDDGDDGDDDCC. - CCDKDDDDDDDDJCCC - CDDKKKDIIDJJDCCD - CDDKDDKJJJDDDCDD - CCDKDDDDDDDDKCDD - .CCDKKDDDDKKCDDD - .CCDADKDDKDACDD. - .DDDADDDDDDADDD. - ....CCDDDDKKAA.. - ...CDDDAADDDKAA. - ..CDDDAAA.DDDK.. - ................ + ......IIIDA..... + .....GDGDDDA.... + ....IDDDDDDA.... + ..DCHHD..DDA.... + CHCHCD..IDDA.... + HD.D...IDDA..... + ......HIDAAAAAA. + ....IHIDAAAAAAAA + ..IHHIDAJDDJAAA. + .IHHHIDDDDDDJAA. + .IHHHIDDDDDDDAA. + DDHHIIDDDDDDDDA. + ID.HIDDHHDDJDJA. + IDAAID.AADDADDA. + ....IDAAJJJDDJA. + ........DDDDJA.. } # tile 371 (Master Kaen) { From 178f823304cf4604909f5c0e654447438955d1c3 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Sep 2024 10:24:30 -0400 Subject: [PATCH 2/6] backport 3.7 makedefs options for producing individual files This may be useful for some build environments to avoid parallel make issues, and artificially-concocted order dependencies, leaving the ordering up to that specified in the Makefile. This does not update the 3.6 sys/unix/Makefile.dat, since there's already a workaround in place in that file. The related makedefs options are: -s Generate the bogusmon , engrave and epitaph files. -1 Generate the epitaph file. -2 Generate the engrave file. -3 Generate the bogusmon file. --- doc/makedefs.6 | 24 +++++++++++++++---- util/makedefs.c | 61 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 61 insertions(+), 24 deletions(-) diff --git a/doc/makedefs.6 b/doc/makedefs.6 index 79179969f..cf78b6d90 100644 --- a/doc/makedefs.6 +++ b/doc/makedefs.6 @@ -125,11 +125,25 @@ file. .TP .B -s Generate the -.I bogusmon -, -.I engrave -and -.IR epitaph files. +.IR bogusmon ", " engrave ", and " epitaph " files." +.br +.TP +.B -1 +Generate the +.IR epitaph +file. +.br +.TP +.B -2 +Generate the +.IR engrave +file. +.br +.TP +.B -3 +Generate the +.IR bogusmon +file. .br .TP .B -h diff --git a/util/makedefs.c b/util/makedefs.c index 4437c58f6..5fff4f412 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -201,6 +201,7 @@ static void FDECL(do_qt_control, (char *)); static void FDECL(do_qt_text, (char *)); static void NDECL(adjust_qt_hdrs); static void NDECL(put_qt_hdrs); +static void FDECL(rafile, (int)); #ifdef VISION_TABLES static void NDECL(H_close_gen); @@ -363,25 +364,14 @@ char *options; break; case 's': case 'S': - /* - * post-3.6.5: - * File must not be empty to avoid divide by 0 - * in core's rn2(), so provide a default entry. - * [Second argument is used to construct a temporary file name - * without worrying about whether the file name macros from - * global.h have been modified with port-specific punctuation.] - */ - do_rnd_access_file(EPITAPHFILE, "epitaph", - /* default epitaph: parody of the default engraving */ - "No matter where I went, here I am."); - do_rnd_access_file(ENGRAVEFILE, "engrave", - /* default engraving: popularized by "The Adventures of - Buckaroo Bonzai Across the 8th Dimenstion" but predates - that 1984 movie; some attribute it to Confucius */ - "No matter where you go, there you are."); - do_rnd_access_file(BOGUSMONFILE, "bogusmon", - /* default bogusmon: iconic monster that isn't in nethack */ - "grue"); + rafile('1'); + rafile('2'); + rafile('3'); + break; + case '1': + case '2': + case '3': + rafile(*options); break; case 'h': case 'H': @@ -424,6 +414,39 @@ const char *tag; Unlink(name); } +void +rafile(whichone) +int whichone; +{ + switch(whichone) { + /* + * post-3.6.5: + * File must not be empty to avoid divide by 0 + * in core's rn2(), so provide a default entry. + * [Second argument is used to construct a temporary file name + * without worrying about whether the file name macros from + * global.h have been modified with port-specific punctuation.] + */ + case '1': + do_rnd_access_file(EPITAPHFILE, "epitaph", + /* default epitaph: parody of the default engraving */ + "No matter where I went, here I am."); + break; + case '2': + do_rnd_access_file(ENGRAVEFILE, "engrave", + /* default engraving: popularized by "The Adventures of + Buckaroo Bonzai Across the 8th Dimenstion" but predates + that 1984 movie; some attribute it to Confucius */ + "No matter where you go, there you are."); + break; + case '3': + do_rnd_access_file(BOGUSMONFILE, "bogusmon", + /* default bogusmon: iconic monster that isn't in nethack */ + "grue"); + break; + } +} + static FILE * getfp(template, tag, mode) const char *template; From f85cebdf2ab3334fd2c012c799ac05c207d7892c Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Sep 2024 10:28:06 -0400 Subject: [PATCH 3/6] update fixes36.7 on 2024-09-04 --- doc/fixes36.7 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/fixes36.7 b/doc/fixes36.7 index be02e9c11..8987decc1 100644 --- a/doc/fixes36.7 +++ b/doc/fixes36.7 @@ -54,4 +54,6 @@ unix: update Makefile.dat so that if parallel make is used, it will build each other's results fix the mingw32 build of NetHack 3.6.7 by updating sys/winnt/Makefile.gcc, sys/winnt/winnt.c and sys/winnt/stubs.c +correct the Ixoth tile +makedefs can produce individual bogusmon, epitaph and bogusmon files From 0689b716a366e4733d27169fd01cdc86a50575f1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 4 Sep 2024 20:01:32 -0400 Subject: [PATCH 4/6] make a correction to latest fixes36.7 entry --- doc/fixes36.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fixes36.7 b/doc/fixes36.7 index 8987decc1..53b0c046f 100644 --- a/doc/fixes36.7 +++ b/doc/fixes36.7 @@ -55,5 +55,5 @@ unix: update Makefile.dat so that if parallel make is used, it will build fix the mingw32 build of NetHack 3.6.7 by updating sys/winnt/Makefile.gcc, sys/winnt/winnt.c and sys/winnt/stubs.c correct the Ixoth tile -makedefs can produce individual bogusmon, epitaph and bogusmon files +makedefs can produce individual bogusmon, engrave and epitaph files From 52f107e99db11eab8fd5b001fd7a189d097bca71 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2024 12:58:42 -0500 Subject: [PATCH 5/6] build of 3.6.7 with clang-18 The build of the current release of NetHack 3.6.7 has gotten extremely noisy with Ubuntu clang version 18.1.3 (1ubuntu1) and the hints file sys/unix/hints/linux, resulting in hundreds of these warnings: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C23 [-Wdeprecated-non-prototype] --- sys/unix/hints/linux | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index 862915053..573ae1d6c 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -34,6 +34,16 @@ CFLAGS+=-DCURSES_GRAPHICS #CFLAGS+=-DSCORE_ON_BOTL #CFLAGS+=-DMSGHANDLER #CFLAGS+=-DTTY_TILES_ESCCODES +#detection of clang vs gcc +CCISCLANG := $(shell echo `$(CC) --version` | grep clang) +ifneq "$(CCISCLANG)" "" +# clang-specific follows +CLANGGTEQ18 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 18) +ifeq "$(CLANGGTEQ18)" "1" +CFLAGS+=-Wno-deprecated-non-prototype +endif +endif # clang-specific ends here + LINK=$(CC) # Only needed for GLIBC stack trace: From 55561da637a565bfda0e5fab0f52e6329b939087 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 6 Nov 2024 13:11:43 -0500 Subject: [PATCH 6/6] README.linux: make prerequisites more explicit --- sys/unix/README.linux | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/unix/README.linux b/sys/unix/README.linux index 24ab94905..864da755a 100644 --- a/sys/unix/README.linux +++ b/sys/unix/README.linux @@ -61,6 +61,12 @@ If you have problems, send us some email. nethack-bugs@nethack.org +Prerequisite installations that are needed: + libncurses-dev + flex + bison + clang or gcc + Recommended steps: 1. cd sys/unix