From 10271cfda48d67b46afd4b66ce17a4cb45115d02 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 26 Feb 2023 13:37:45 +0100 Subject: [PATCH] Fix some external declarations and disable PNG saving 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 | 2 +- draw.c | 4 ++-- evalgraph.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend.h b/backend.h index 738947d..51b4f8f 100644 --- 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 --- 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; diff --git a/evalgraph.h b/evalgraph.h index f4b4f92..2ab0e3c 100644 --- a/evalgraph.h +++ b/evalgraph.h @@ -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; -- 1.7.0.4