Straightforward, but there's a few of them, so a second pair of eyes
seems warranted.

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/gnugo/Makefile,v
retrieving revision 1.32
diff -u -p -r1.32 Makefile
--- Makefile    4 Feb 2021 20:09:32 -0000       1.32
+++ Makefile    10 Sep 2021 16:52:43 -0000
@@ -3,7 +3,7 @@
 COMMENT =      GNU version of Go
 
 DISTNAME =     gnugo-3.8
-REVISION =     2
+REVISION =     3
 CATEGORIES =   games
 
 HOMEPAGE =     https://www.gnu.org/software/gnugo/
Index: patches/patch-engine_readconnect_c
===================================================================
RCS file: patches/patch-engine_readconnect_c
diff -N patches/patch-engine_readconnect_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-engine_readconnect_c  10 Sep 2021 16:47:38 -0000
@@ -0,0 +1,42 @@
+$OpenBSD$
+
+Index: engine/readconnect.c
+--- engine/readconnect.c.orig
++++ engine/readconnect.c
+@@ -1879,11 +1879,11 @@ order_connection_moves(int *moves, int str1, int str2,
+     char buf[500];
+     char *pos;
+     int chars;
+-    sprintf(buf, "Move order for %s: %n", funcname, &chars);
++    chars = sprintf(buf, "Move order for %s: ", funcname);
+     pos = buf + chars;
+     for (i = 1; i <= moves[0]; i++) {
+-      sprintf(pos, "%c%d (%d) %n", J(moves[i]) + 'A' + (J(moves[i]) >= 8),
+-            board_size - I(moves[i]), scores[i], &chars);
++      chars = sprintf(pos, "%c%d (%d) ", J(moves[i]) + 'A' + (J(moves[i]) >= 
8),
++            board_size - I(moves[i]), scores[i]);
+       pos += chars;
+     }
+     sgftreeAddComment(sgf_dumptree, buf);
+@@ -2580,17 +2580,16 @@ find_connection_moves(int str1, int str2, int color_to
+     char buf[500];
+     char *pos;
+     int chars;
+-    sprintf(buf, "Move order for %sconnect: %n",
++    chars = sprintf(buf, "Move order for %sconnect: ",
+           connect_move ? "" : "dis", &chars);
+     pos = buf + chars;
+     for (i = 0; i < num_moves; i++) {
+-      sprintf(pos, "%c%d (%4.2f) %n", J(moves[i]) + 'A' + (J(moves[i]) >= 8),
+-            board_size - I(moves[i]), FIXED_TO_FLOAT(distances[i]),
+-            &chars);
++      chars = sprintf(pos, "%c%d (%4.2f) ", J(moves[i]) + 'A' + (J(moves[i]) 
>= 8),
++            board_size - I(moves[i]), FIXED_TO_FLOAT(distances[i]));
+       pos += chars;
+     }
+     if (cutoff < HUGE_CONNECTION_DISTANCE) {
+-      sprintf(pos, "(cutoff %f)%n", FIXED_TO_FLOAT(cutoff), &chars);
++      chars = sprintf(pos, "(cutoff %f)", FIXED_TO_FLOAT(cutoff));
+       pos += chars;
+     }
+     sgftreeAddComment(sgf_dumptree, buf);
Index: patches/patch-engine_reading_c
===================================================================
RCS file: patches/patch-engine_reading_c
diff -N patches/patch-engine_reading_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-engine_reading_c      10 Sep 2021 16:52:33 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+
+Index: engine/reading.c
+--- engine/reading.c.orig
++++ engine/reading.c
+@@ -5060,12 +5060,12 @@ sgf_dumpmoves(struct reading_moves *moves, const char 
+   char buf[500];
+   char *pos;
+   int i, chars;
+-  sprintf(buf, "Move order for %s: %n", funcname, &chars);
++  chars = sprintf(buf, "Move order for %s: ", funcname);
+   pos = buf + chars;
+   for (i = moves->num_tried; i < moves->num; i++) {
+-    sprintf(pos, "%c%d (%d) %n",
++    chars = sprintf(pos, "%c%d (%d) ",
+           J(moves->pos[i]) + 'A' + (J(moves->pos[i]) >= 8),
+-          board_size - I(moves->pos[i]), moves->score[i], &chars);
++          board_size - I(moves->pos[i]), moves->score[i]);
+     pos += chars;
+   }
+   sgftreeAddComment(sgf_dumptree, buf);

Reply via email to