there's newer code for wanderer at the original author's git repo,
this fixes the issues we're now running into, however needs hitting
with something to get it to build as there are a bunch of undefined
symbol errors for functions in source files other than the main one,
not quite sure how to fix.

i.e. this sort of thing:

ld.lld: warning: wanderer.c(/tmp/wanderer-c893b1.o:(show_credits)): warning: 
sprintf() is often misused, please use snprintf()
ld.lld: warning: wanderer.c(/tmp/wanderer-c893b1.o:(main)): warning: strcpy() 
is almost always misused, please use strlcpy()
ld.lld: error: undefined symbol: rscreen
>>> referenced by wanderer.c
>>>               /tmp/wanderer-c893b1.o:(main)
>>> referenced by wanderer.c
>>>               /tmp/wanderer-c893b1.o:(main)
>>> referenced by wanderer.c
>>>               /tmp/wanderer-c893b1.o:(main)
>>> did you mean: screen
>>> defined in: /tmp/wanderer-c893b1.o

this is what i have in case anyone would like to take a look.


Index: Makefile
===================================================================
RCS file: /cvs/ports/games/wanderer/Makefile,v
diff -u -p -r1.17 Makefile
--- Makefile    26 Sep 2023 09:41:43 -0000      1.17
+++ Makefile    6 Jun 2026 13:17:41 -0000
@@ -1,7 +1,10 @@
 COMMENT=       Rogue like adventure game

-DISTNAME=      wanderer-3.2
-REVISION=      5
+# newer code at https://github.com/sshipway/wanderer (original author's repo)
+GH_ACCOUNT=    sshipway
+GH_PROJECT=    wanderer
+GH_COMMIT=     3c12a8fffc3a3b76224c75e3bd452974a7a07c14
+DISTNAME=      wanderer-3.2pl20240816

 CATEGORIES=    games

@@ -9,14 +12,10 @@ HOMEPAGE=    http://www.e271.net/~marina/wa

 # GPL
 PERMIT_PACKAGE=        Yes
-WANTLIB=       c curses

-SITES=         http://www.e271.net/~marina/
+WANTLIB=       c curses

 NO_TEST=       Yes
-
-pre-patch:
-       @rm ${WRKSRC}/Makefile.orig

 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/wanderer
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/wanderer/distinfo,v
diff -u -p -r1.4 distinfo
--- distinfo    18 Jan 2015 03:14:02 -0000      1.4
+++ distinfo    6 Jun 2026 13:17:41 -0000
@@ -1,2 +1,2 @@
-SHA256 (wanderer-3.2.tar.gz) = a6ZZAQGMcUnu773magQOrEagLXGBqSOVgNEgRzJgato=
-SIZE (wanderer-3.2.tar.gz) = 99191
+SHA256 (wanderer-3.2pl20240816-3c12a8ff.tar.gz) = 
lnf9hDbSWlmMWOchIf7bWesjXWgUs608dNmJenE68Qo=
+SIZE (wanderer-3.2pl20240816-3c12a8ff.tar.gz) = 63711
Index: patches/patch-display_c
===================================================================
RCS file: patches/patch-display_c
diff -N patches/patch-display_c
--- patches/patch-display_c     11 Mar 2022 19:05:09 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: display.c
---- display.c.orig
-+++ display.c
-@@ -203,7 +203,7 @@ void redraw_screen(bell,maxmoves,num,score,nf,diamonds
-     move(1,48);
-     (void) addstr("\tFound\tTotal");
-     move(3,48);
--    (void) sprintf(buffer,"%d\t %d\t %d  ",score,nf,diamonds);
-+    (void) sprintf(buffer,"%ld\t %d\t %d  ",score,nf,diamonds);
-     (void) addstr(buffer);
-     if(! edit_mode) {
-         move(6,48);
Index: patches/patch-edit_c
===================================================================
RCS file: /cvs/ports/games/wanderer/patches/patch-edit_c,v
diff -u -p -r1.3 patch-edit_c
--- patches/patch-edit_c        11 Mar 2022 19:05:09 -0000      1.3
+++ patches/patch-edit_c        6 Jun 2026 13:17:41 -0000
@@ -1,28 +1,12 @@
 Index: edit.c
 --- edit.c.orig
 +++ edit.c
-@@ -61,6 +61,7 @@ static char *inst[] = { "    O  Boulder",
- *                    exit and player numbers,            *
- *                    hanging boulders/arrows etc         *
- **********************************************************/
-+void
- check_legality()
- {
- int ercount,cages,hanging,bmons,tele,arrival,you,mons,exits;
-@@ -256,6 +257,7 @@ edit_screen = oldname;
- /*********************************************
- *                 screen_read                *
- **********************************************/
-+void
- screen_read(maxmoves)
-     int *maxmoves;
- {
-@@ -455,7 +457,7 @@ while(!quit)
-         addstr("New name: ");
-         refresh();
-         readstring(screen_name,58);
--        screen_name[61] = '\0';
-+        screen_name[60] = '\0';
-         instruct();
-         move(19,0);
-         addstr("                                                              
            ");
+@@ -535,7 +535,7 @@ void editscreen(int num, long *score, int *bell, int m
+             addstr("New name: ");
+             refresh();
+             readstring(screen_name, 58);
+-            screen_name[61] = '\0';
++            screen_name[60] = '\0';
+             instruct();
+             move(19, 0);
+             printw("%74s", "");
Index: patches/patch-game_c
===================================================================
RCS file: patches/patch-game_c
diff -N patches/patch-game_c
--- patches/patch-game_c        11 Mar 2022 19:05:09 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-Index: game.c
---- game.c.orig
-+++ game.c
-@@ -400,7 +400,7 @@ char *playscreen(int *num, long *score, int *bell, int
-         #endif
-             case ':': *score+=1;
-                 move(3,48);
--                sprintf(buffer,"%d\t %d",*score,nf);
-+                sprintf(buffer,"%ld\t %d",*score,nf);
-                 (void) addstr(buffer);
-             case ' ':
-                 screen[y][x] = ' ';
-@@ -431,7 +431,7 @@ char *playscreen(int *num, long *score, int *bell, int
-                     mx = my = -1;
-                     *score+=100;
-                     move(3,48);
--                    sprintf(buffer,"%d\t %d\t %d ",*score,nf,diamonds);
-+                    sprintf(buffer,"%ld\t %d\t %d ",*score,nf,diamonds);
-                     (void) addstr(buffer);
-                     draw_symbol(50,11,' ');
-                     move(12,56); addstr("              ");
-@@ -514,7 +514,7 @@ char *playscreen(int *num, long *score, int *bell, int
-                     mx = my = -1;
-                     *score+=100;
-                     move(3,48);
--                    sprintf(buffer,"%d\t %d\t %d ",*score,nf,diamonds);
-+                    sprintf(buffer,"%ld\t %d\t %d ",*score,nf,diamonds);
-                     (void) addstr(buffer);
-                     draw_symbol(50,11,' ');
-                        move(12,56); addstr("              ");
-@@ -562,7 +562,7 @@ char *playscreen(int *num, long *score, int *bell, int
-                     mx = my = -1;
-                     *score+=100;
-                     move(3,48);
--                    sprintf(buffer,"%d\t %d\t %d ",*score,nf,diamonds);
-+                    sprintf(buffer,"%ld\t %d\t %d ",*score,nf,diamonds);
-                     (void) addstr(buffer);
-                     draw_symbol(50,11,' ');
-                        move(12,56); addstr("              ");
-@@ -636,7 +636,7 @@ char *playscreen(int *num, long *score, int *bell, int
-                     sy = y;
-                     *score += 20;
-                     move(3,48);
--                    sprintf(buffer,"%d\t %d\t %d ",*score,nf,diamonds);
-+                    sprintf(buffer,"%ld\t %d\t %d ",*score,nf,diamonds);
-                     (void) addstr(buffer);
-                     if(!debug_disp)
-                         display(sx,sy,frow,*score);
Index: patches/patch-m_c
===================================================================
RCS file: patches/patch-m_c
diff -N patches/patch-m_c
--- patches/patch-m_c   11 Mar 2022 19:05:09 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,74 +0,0 @@
-Index: m.c
---- m.c.orig
-+++ m.c
-@@ -21,6 +21,7 @@
-
-
- #include <sys/time.h>
-+#include <termcap.h>
- #include "wand_head.h"
-
- #define SCROLLING 0
-@@ -147,23 +148,24 @@ char *get_name(void)
- char *name;
- char *endchar;
-
--    if((name = (char *)getenv("NEWNAME")) == NULL)
--        if((name = (char *)getenv("NAME")) == NULL)
--            if((name = (char *)getenv("FULLNAME")) == NULL)
--                if((name = (char *)getenv("USER")) == NULL)
--                          if((name = (char *)getenv("LOGNAME")) == NULL)
-+    if((name = getenv("NEWNAME")) == NULL)
-+        if((name = getenv("NAME")) == NULL)
-+            if((name = getenv("FULLNAME")) == NULL)
-+                if((name = getenv("USER")) == NULL)
-+                          if((name = getenv("LOGNAME")) == NULL)
- #define ASKNAME /* Marina */
- #ifdef        ASKNAME        /* M001 */
-                     {
--                        name = (char *)malloc(80);
-+                        name = malloc(80);
-                         if (name == NULL) {
-                             printf("malloc error\n"); /* Replace with Err* */
-                             exit(1);
-                         }
-                         printf("Name? "); fflush(stdout);
-                         fgets(name,80,stdin); /* get rid of gets Marina*/
--                        endchar=strchr(name,'\0');
--                        endchar='\0';
-+                        endchar=strchr(name,'\n');
-+                      if (endchar)
-+                          *endchar='\0';
-                         if (name[0] == '\0')
-                             name = "noname";
-                     }
-@@ -181,9 +183,9 @@ char *get_keys()
- {
-     char *keys = NULL;
-     if( ! keys ) {
--        if((keys = (char *)getenv("NEWKEYS")) == NULL)
-+        if((keys = getenv("NEWKEYS")) == NULL)
-             {
--            keys = (char *)malloc(5);
-+            keys = malloc(5);
-            strcpy(keys,"kjhl");
-             }
-     }
-@@ -200,7 +202,7 @@ extern char *optarg;
- /***************************************
- *  Main Program  -- Comment by Marina  *
- ****************************************/
--main(int argc,char **argv)
-+int main(int argc,char **argv)
- {
- char (*frow)[ROWLEN+1] = screen;
- long score = 0;
-@@ -214,7 +216,7 @@ char howdead[25],
-      *name,
-      *keys,
-      *dead,ch;
--char c;
-+int c;
-
- while(( c = getopt(argc,argv,"01k:et:r:fmCcvsi")) != -1 )
- {
Index: patches/patch-monsters_c
===================================================================
RCS file: patches/patch-monsters_c
diff -N patches/patch-monsters_c
--- patches/patch-monsters_c    11 Mar 2022 19:05:09 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Index: monsters.c
---- monsters.c.orig
-+++ monsters.c
-@@ -51,7 +51,6 @@ extern struct mon_rec start_of_list;
- struct mon_rec *make_monster(x,y)
- int x,y;
- {
--    char *malloc();
-     #define MALLOC (struct mon_rec *)malloc(sizeof(struct mon_rec))
-     struct mon_rec *monster;
-     if(tail_of_list->next == NULL)
Index: patches/patch-read_c
===================================================================
RCS file: /cvs/ports/games/wanderer/patches/patch-read_c,v
diff -u -p -r1.2 patch-read_c
--- patches/patch-read_c        11 Mar 2022 19:05:09 -0000      1.2
+++ patches/patch-read_c        6 Jun 2026 13:17:41 -0000
@@ -1,12 +1,12 @@
 Index: read.c
 --- read.c.orig
 +++ read.c
-@@ -70,7 +70,7 @@ int *maxmoves, num;
-             row_ptr++;
-         };
-         fgets(screen_name,60,fp);
+@@ -66,7 +66,7 @@ int rscreen(int num, int *maxmoves)
+             fprintf(stderr, "fgets error\n");
+             exit(EXIT_FAILURE);
+         }
 -        screen_name[61] = '\0';
 +        screen_name[60] = '\0';
-         screen_name[strlen(screen_name)-1] = '\0';
-         if(fscanf(fp,"%d",maxmoves) != 1)
-             *maxmoves=0;
+         screen_name[strlen(screen_name) - 1] = '\0';
+         if (fscanf(fp, "%d", maxmoves) != 1)
+             *maxmoves = 0;
Index: patches/patch-scores_c
===================================================================
RCS file: patches/patch-scores_c
diff -N patches/patch-scores_c
--- patches/patch-scores_c      11 Mar 2022 19:05:09 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-Index: scores.c
---- scores.c.orig
-+++ scores.c
-@@ -28,20 +28,10 @@
- #define UNLOCK
-
- #else
--/*#define LOCK     flock( fp->_cnt , LOCK_EX ) /* peeked at stdio.h ! */
--/*#define UNLOCK   flock( fp->_cnt , LOCK_UN ) /*                     */
--/* #define LOCK while((lock = creat(LOCKFILE,0))==-1) Not a good way  */
--
- #define LOCK if((lock = open(LOCKFILE, O_CREAT | O_TRUNC | O_WRONLY, 
"r"))==-1){errx (1,"%s","Lockfile creation failed\n"); exit(1);} /* Marina */
-
- #define UNLOCK unlink(LOCKFILE)
-
--#endif
--
--#ifndef   MSDOS        /* M001 */
--extern int getuid();
--#else
--#define   getuid()        0
- #endif
-
- #ifdef    COMPARE_BY_NAME
Index: patches/patch-wand_head_h
===================================================================
RCS file: patches/patch-wand_head_h
diff -N patches/patch-wand_head_h
--- patches/patch-wand_head_h   11 Mar 2022 19:05:09 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-Index: wand_head.h
---- wand_head.h.orig
-+++ wand_head.h
-@@ -21,9 +21,12 @@
-
-
- #include <stdio.h>
--#include <ncurses.h>
-+#include <stdlib.h>
-+#include <curses.h>
- #include <string.h>
- #include <fcntl.h>
-+#include <unistd.h>
-+#include <err.h>
-
- #undef MSDOS /* Marina */
-
-@@ -57,8 +60,8 @@
-
- /* To disable the recording of hiscores from games restored from saves        
 */
- /* #define NO_RESTORED_GAME_HISCORES  */
--/* #define COMPARE_BY_NAME  /* define this to compare by name, not uid        
 */
--/* #define NO_ENCRYPTION /* define this to disable the savefile encryptor */
-+/* #define COMPARE_BY_NAME  * define this to compare by name, not uid         
*/
-+/* #define NO_ENCRYPTION * define this to disable the savefile encryptor */
- #define NOISY    /* do we want bells in the game ? */
-
-                 /****** OTHER PARAMETERS ******/
Index: patches/patch-wanderer_6
===================================================================
RCS file: patches/patch-wanderer_6
diff -N patches/patch-wanderer_6
--- patches/patch-wanderer_6    11 Mar 2022 19:05:09 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
---- wanderer.6.orig    Wed Dec 19 03:20:35 2001
-+++ wanderer.6 Tue Feb 17 19:00:26 2015
-@@ -65,8 +65,8 @@ By pressing 'W' you can redraw the screen, and '#' wil
- icon style and single character. '!' wil display the map in icon mode, and '?'
- will display the help screen. Finally, '~' will prompt for a password to jump
- levels. The masterpassword will give a prompt for the required level
--number, and then respond with the correct password before jumping. If the file
--'no_pws' is readable in the screens directory, then pressing '~' will just
-+number, and then respond with the correct password before jumping. If the
-+file 'no_pws' is readable in the screens directory, then pressing '~' will 
just
- cause a request for the required screen number. On no account may anyone
- who has not given the masterpassword jump back a level.
- .SH THE EDITOR
-@@ -84,12 +84,12 @@ of the screen with their meanings.
- .PP
- To play the game, press either 'p' to play with the iconic screen, or 'n'
- to play with the full screen. When you are in the game, you will recieve an
--extra 'memory' option on the righthand side of the screen. This allows you to
--'record' moves in a solution to be replayed after changes to the screen.
-+extra 'memory' option on the righthand side of the screen. This allows you
-+to 'record' moves in a solution to be replayed after changes to the screen.
- .PP
- Pressing '(' will start recording from the beginning of the memory, and ')'
--will stop recording. At any point during recording, '-' will add a
--'checkpoint'. This will cause the program to return control to the user during
-+will stop recording. At any point during recording, '-' will add a 
'checkpoint'.
-+This will cause the program to return control to the user during
- playback when it reaches this point, without moving the memory pointer.
- Pressing '+' will then continue playing, or '&' will start recording from this
- point, leaving the previous data unaffected.
Index: patches/patch-wanderer_c
===================================================================
RCS file: patches/patch-wanderer_c
diff -N patches/patch-wanderer_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-wanderer_c    6 Jun 2026 13:17:41 -0000
@@ -0,0 +1,11 @@
+Index: wanderer.c
+--- wanderer.c.orig
++++ wanderer.c
+@@ -7,6 +7,7 @@
+ #include "read.h"
+ #include "scores.h"
+ #include <curses.h>
++#include <termcap.h>
+ #include <getopt.h>
+ #include <stdio.h>
+ #include <stdlib.h>

Reply via email to