Fix some external declarations and disable PNG saving
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 26 Feb 2023 12:37:45 +0000 (13:37 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 26 Feb 2023 12:37:45 +0000 (13:37 +0100)
A private hack that was never intended for inclusion, to create PNG image
files of the SVG pieces, had krept into the source. Two header files
failed to declare a common global as 'extern', and newer C compilers
did not like teh resulting double declaration.

backend.h
draw.c
evalgraph.h

index 738947d..51b4f8f 100644 (file)
--- a/backend.h
+++ b/backend.h
@@ -242,7 +242,7 @@ extern GameInfo gameInfo;
 
 /* ICS vars used with backend.c and zippy.c */
 enum ICS_TYPE { ICS_GENERIC, ICS_ICC, ICS_FICS, ICS_CHESSNET /* not really supported */ };
-enum ICS_TYPE ics_type;
+extern enum ICS_TYPE ics_type;
 
 /* pgntags.c prototypes
  */
diff --git a/draw.c b/draw.c
index 7d1792f..f51c771 100644 (file)
--- a/draw.c
+++ b/draw.c
@@ -459,8 +459,8 @@ ScaleOnePiece (int color, int piece, char *pieceDir)
   cairo_paint (cr);
   cairo_destroy (cr);
 if(appData.inscriptions[0]) InscribeKanji(cs, piece+BlackPawn*color, 0, 0);
-sprintf(buf, "%c2%d.png", color ? 'b' : 'w', piece);
-if(piece < 22) cairo_surface_write_to_png(cs, buf);
+//sprintf(buf, "%c2%d.png", color ? 'b' : 'w', piece);
+//if(piece < 66) cairo_surface_write_to_png(cs, buf);
 
   if(!appData.trueColors || !*pieceDir) { // operate on bitmap to color it (king-size hack...)
     int stride = cairo_image_surface_get_stride(cs)/4;
index f4b4f92..2ab0e3c 100644 (file)
@@ -34,7 +34,7 @@ typedef enum { PEN_NONE, PEN_BLACK, PEN_DOTTED, PEN_BLUEDOTTED, PEN_BOLDWHITE, P
 #define OPEN   0
 
 /* Module globals */
-ChessProgramStats_Move * currPvInfo;
+extern ChessProgramStats_Move * currPvInfo;
 extern int currFirst;
 extern int currLast;
 extern int currCurrent;