void-packages/srcpkgs/gnushogi/patches/gcc-10-globals.patch

87 lines
2.4 KiB
Diff

Patch from https://salsa.debian.org/debian/gnushogi/-/commit/ae9ff5c5d4a047e895030add12cc0e75480026b5
Index: gnushogi-1.4.2/gnushogi/commondsp.c
===================================================================
--- gnushogi-1.4.2.orig/gnushogi/commondsp.c
+++ gnushogi-1.4.2/gnushogi/commondsp.c
@@ -53,6 +53,7 @@ char mvstr[4][6];
char *InPtr;
int InBackground = false;
+unsigned short MV[MAXDEPTH];
#if defined(BOOKTEST)
@@ -2034,7 +2035,7 @@ InputCommand(char *command)
{
int i;
- printf(" %6d ", MSCORE);
+ printf(" %6d ", 0);
for (i = 1; MV[i] > 0; i++)
{
Index: gnushogi-1.4.2/gnushogi/cursesdsp.c
===================================================================
--- gnushogi-1.4.2.orig/gnushogi/cursesdsp.c
+++ gnushogi-1.4.2/gnushogi/cursesdsp.c
@@ -62,18 +62,12 @@
#define FLUSH_SCANW fflush(stdout), scanw
-int mycnt1, mycnt2;
-
#define MARGIN (5)
#define TAB (58)
#define VIR_C(s) ((flag.reverse) ? (NO_COLS - 1 - column(s)) : column(s))
#define VIR_R(s) ((flag.reverse) ? (NO_ROWS - 1 - row(s)) : row(s))
-unsigned short MV[MAXDEPTH];
-int MSCORE;
-char *DRAW;
-
/* Forward declarations. */
/* FIXME: change this name, puh-leeze! */
Index: gnushogi-1.4.2/gnushogi/globals.c
===================================================================
--- gnushogi-1.4.2.orig/gnushogi/globals.c
+++ gnushogi-1.4.2/gnushogi/globals.c
@@ -201,3 +201,6 @@ char *DRAW;
char *DRAW_REPETITION = "Repetition";
char *DRAW_MAXMOVES = "Max Moves";
char *DRAW_JUSTDRAW = "Drawn game!";
+
+int mycnt1, mycnt2;
+
Index: gnushogi-1.4.2/gnushogi/gnushogi.h
===================================================================
--- gnushogi-1.4.2.orig/gnushogi/gnushogi.h
+++ gnushogi-1.4.2/gnushogi/gnushogi.h
@@ -685,8 +685,6 @@ extern long znodes;
extern char ColorStr[2][10];
extern char mvstr[4][6];
-extern unsigned short MV[MAXDEPTH];
-extern int MSCORE;
extern int mycnt1, mycnt2;
extern short ahead;
extern struct leaf rootnode;
Index: gnushogi-1.4.2/gnushogi/rawdsp.c
===================================================================
--- gnushogi-1.4.2.orig/gnushogi/rawdsp.c
+++ gnushogi-1.4.2/gnushogi/rawdsp.c
@@ -44,11 +44,6 @@
#include "gnushogi.h"
#include "rawdsp.h"
-unsigned short MV[MAXDEPTH];
-int MSCORE;
-
-int mycnt1, mycnt2;
-char *DRAW;
extern char *InPtr;
extern short pscore[];