From ce0ed771043ebf7384f83200429f08d56e5b82cf Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 16:47:48 +0100 Subject: [PATCH 1/8] configure: improve compatility for /bin/dash --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 167f6fb..074cb27 100755 --- a/configure +++ b/configure @@ -218,7 +218,7 @@ else break fi done - if [ "x$CC" == "x" ]; then + if [ -z "$CC" ]; then echo "error: none of (clang, egcc, gcc, c89, cc) work, is your PATH set right?" 1>&2 exit 1 fi @@ -282,7 +282,7 @@ else break fi done - if [ "x$CXX" == "x" ]; then + if [ -z "$CXX" ]; then echo "error: none of (clang++, eg++, g++, c++, cxx) work, is your PATH set right?" 1>&2 exit 1 fi From 9d6eeb3ccae52929bcfb8ce2087753347ae8e6ad Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 16:54:41 +0100 Subject: [PATCH 2/8] help2: utf8 chars don't render well with bitmap fonts --- docsrc/copyright | 4 ++-- src/help2.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docsrc/copyright b/docsrc/copyright index aa5a17f..7781846 100755 --- a/docsrc/copyright +++ b/docsrc/copyright @@ -1,6 +1,6 @@ Gregor Best 2010-2016 GPL Apted Andrew 2000-2001 GPL -Majorel André 1997-2003 GPL +Majorel Andre 1997-2003 GPL Miller Matthew W. 2000 GPL -Quinet Raphaël 1993-1994 PD +Quinet Raphael 1993-1994 PD Wyber Brendon 1993-1994 PD diff --git a/src/help2.cc b/src/help2.cc index c65e326..4b73b0e 100644 --- a/src/help2.cc +++ b/src/help2.cc @@ -161,7 +161,7 @@ void about_yadex () push_colour (WINFG_HL); DrawScreenText (-1, -1, "Maintainer :"); pop_colour (); - DrawScreenText (-1, -1, "André Majorel (http://www.teaser.fr/~amajorel/)"); + DrawScreenText (-1, -1, "Andre Majorel (http://www.teaser.fr/~amajorel/)"); DrawScreenText (-1, -1, "Send all email to you-know-what@freelists.org, NOT to me."); DrawScreenText (-1, -1, ""); DrawScreenText (-1, -1, ""); From 95ac2e045fa235475e3341779298ac0d02232c35 Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 17:00:45 +0100 Subject: [PATCH 3/8] checks: mitigate format-truncation --- src/checks.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checks.cc b/src/checks.cc index 1d716a7..72fcd62 100644 --- a/src/checks.cc +++ b/src/checks.cc @@ -522,7 +522,7 @@ void CheckTextures () /* SWAP! */ int n; int sd1, sd2; int s1, s2; - char msg1[80]; + char msg1[85]; string msg2; bool first_time = true; From b19aef92ac04b7eba33a60ef931c93340a8bfcdb Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 17:09:26 +0100 Subject: [PATCH 4/8] editloop: mitigate format-truncation --- src/editsave.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/editsave.cc b/src/editsave.cc index 0e31c00..34ba454 100644 --- a/src/editsave.cc +++ b/src/editsave.cc @@ -127,7 +127,7 @@ string GetWadFileName (string levelname) { if (rename (outfile.c_str(), wf->filename.c_str()) != 0) { verbmsg ("removing %s\n", wf->filename.c_str()); // DEBUG if (remove (wf->filename.c_str()) != 0 && errno != ENOENT) { - char buf1[81]; + char buf1[84]; char buf2[81]; snprintf (buf1, sizeof buf1, "Could not delete \"%.64s\"", wf->filename.c_str()); snprintf (buf2, sizeof buf2, "(%.64s)", strerror (errno)); @@ -136,8 +136,8 @@ string GetWadFileName (string levelname) { } verbmsg ("renaming %s -> %s\n", outfile.c_str(), wf->filename.c_str()); // DEBUG if (rename (outfile.c_str(), wf->filename.c_str())) { - char buf1[81]; - char buf2[81]; + char buf1[84]; + char buf2[137]; snprintf (buf1, sizeof buf1, "Could not rename \"%.64s\"", outfile.c_str()); snprintf (buf2, sizeof buf2, "as \"%.64s\" (%.64s)", wf->filename.c_str(), strerror (errno)); Notify (-1, -1, buf1, buf2); @@ -147,7 +147,7 @@ string GetWadFileName (string levelname) { verbmsg ("opening %s\n", wf->filename.c_str()); // DEBUG wf->fp = fopen (wf->filename.c_str(), "rb"); if (wf->fp == 0) { - char buf1[81]; + char buf1[84]; char buf2[81]; snprintf (buf1, sizeof buf1, "Could not reopen \"%.64s\"", wf->filename.c_str()); snprintf (buf2, sizeof buf2, "(%.64s)", strerror (errno)); From 915bbd542e19dc15e627829cb0f8fbaa7b6cd2db Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 17:05:19 +0100 Subject: [PATCH 5/8] editloop: fix class-memaccess --- src/editloop.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editloop.cc b/src/editloop.cc index 2598989..ea8ded1 100644 --- a/src/editloop.cc +++ b/src/editloop.cc @@ -189,7 +189,7 @@ void EditorLoop (string levelname) /* SWAP! */ Objid object; // The object under the pointer const Objid CANVAS (OBJ_NONE, OBJ_NO_CANVAS); - memset (&e, 0, sizeof e); /* Catch-all */ + e = {}; /* Catch-all */ e.move_speed = 20; e.extra_zoom = 0; // If you change this, don't forget to change From fe21fd6eeea14a2dca5c46c84b4bca2fde76c646 Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 17:13:09 +0100 Subject: [PATCH 6/8] GNUmakefile: ignore misleading-indentation --- GNUmakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/GNUmakefile b/GNUmakefile index f22c74e..ea6c4d2 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -97,6 +97,7 @@ CXXFLAGS += -pedantic CXXFLAGS += -Wall CXXFLAGS += -Werror CXXFLAGS += -Wno-variadic-macros +CXXFLAGS += -Wno-misleading-indentation #CXXFLAGS += -DWHITE_BACKGROUND LDFLAGS = -g From bb25bf518aeefdf719f914261df8a7ca1b8ade03 Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 17:53:07 +0100 Subject: [PATCH 7/8] GNUmakefile: stop ignoring variadic-macros --- GNUmakefile | 1 - 1 file changed, 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index ea6c4d2..2c98f8a 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -96,7 +96,6 @@ CXXFLAGS = -std=c++11 CXXFLAGS += -pedantic CXXFLAGS += -Wall CXXFLAGS += -Werror -CXXFLAGS += -Wno-variadic-macros CXXFLAGS += -Wno-misleading-indentation #CXXFLAGS += -DWHITE_BACKGROUND LDFLAGS = -g From a5c09b1f573dad99b02c78501a0e634bfc091fea Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Mon, 22 Dec 2025 18:18:16 +0100 Subject: [PATCH 8/8] editloop: utf8 chars don't render well with bitmap fonts --- src/editloop.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/editloop.cc b/src/editloop.cc index ea8ded1..a11f044 100644 --- a/src/editloop.cc +++ b/src/editloop.cc @@ -348,8 +348,8 @@ void EditorLoop (string levelname) /* SWAP! */ e.mb_menu[MBM_MISC_T] = new Menu ("Misc. operations", "Find first free ~tag number", YK_, 0, "~Rotate and scale things...", YK_, 0, - "~Spin things 45° clockwise", 'x', 0, - "Spin things 45° ~counter-clockwise", 'w', 0, + "~Spin things 45 deg. clockwise", 'x', 0, + "Spin things 45 deg. ~counter-clockwise", 'w', 0, "~Mirror horizontally", YK_, 0, "Mirror ~vertically", YK_, 0, NULL); @@ -358,8 +358,8 @@ void EditorLoop (string levelname) /* SWAP! */ e.mb_menu[MBM_MISC_T] = new Menu ("Misc. operations", "Find first free ~tag number", YK_, 0, "Find first free T~ID", YK_, 0, - "~Spin things 45° clockwise", 'x', 0, - "Spin things 45° ~counter-clockwise", 'w', 0, + "~Spin things 45 deg. clockwise", 'x', 0, + "Spin things 45 deg. ~counter-clockwise", 'w', 0, "~Mirror horizontally", YK_, 0, "Mirror ~vertically", YK_, 0, NULL);