X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=common.h;h=049d4283bfc89763667dc28b073c1321f32fc4d1;hb=30ded7c1180da9dc3dc703d92f4c0617ea092647;hp=68749f302b957e632ba8c1fe50e991dfc99ff429;hpb=15eab3074ed1dc476c19b48da66e82dea27399b5;p=xboard.git diff --git a/common.h b/common.h index 68749f3..049d428 100644 --- a/common.h +++ b/common.h @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -81,7 +81,14 @@ int pclose(FILE *); #endif #else +#ifdef X11 #include +#else +typedef char Boolean; +typedef char *String; +#define True 1 +#define False 0 +#endif #endif #endif @@ -218,6 +225,14 @@ int pclose(FILE *); #define ZIPPY_MAX_GAMES 0 #define ZIPPY_REPLAY_TIMEOUT 120 +typedef VOIDSTAR ProcRef; +#define NoProc ((ProcRef) 0) +typedef VOIDSTAR InputSourceRef; + +typedef void (*DelayedEventCallback) P((void)); + +typedef enum { Press, Release } ClickType; + typedef enum { BeginningOfGame, MachinePlaysWhite, MachinePlaysBlack, AnalyzeMode, AnalyzeFile, TwoMachinesPlay, @@ -323,6 +338,7 @@ typedef enum { VariantGreat, VariantTwilight, VariantMakruk, + VariantASEAN, VariantSChess, VariantGrand, VariantSpartan, @@ -369,6 +385,7 @@ typedef enum { "great",\ "twilight",\ "makruk",\ + "asean",\ "seirawan",\ "grand",\ "spartan",\ @@ -408,8 +425,9 @@ typedef struct { Boolean firstPlaysBlack; Boolean noChessProgram; char *host[ENGINES]; - char *pngDirectory; - char *svgDirectory; + char *themeNames; + char *pieceDirectory; + char *border; char *soundDirectory; char *remoteShell; char *remoteUser; @@ -417,6 +435,7 @@ typedef struct { char *timeControl; Boolean trueColors; Boolean icsActive; + Boolean autoBox; char *icsHost; char *icsPort; char *icsCommPort; /* if set, use serial port instead of tcp host/port */ @@ -432,6 +451,7 @@ typedef struct { int loadGameIndex; /* game # within file */ char *saveGameFile; Boolean autoSaveGames; + Boolean onlyOwn; /* [HGM] suppress auto-saving of observed games */ char *loadPositionFile; int loadPositionIndex; /* position # within file */ char *savePositionFile; @@ -467,6 +487,7 @@ typedef struct { Boolean ponderNextMove; Boolean periodicUpdates; Boolean autoObserve; + Boolean autoCreateLogon; Boolean autoComment; Boolean getMoveList; Boolean testLegality; @@ -535,6 +556,7 @@ typedef struct { Boolean showButtonBar; Boolean icsEngineAnalyze; Boolean variations; /* [HGM] enable variation-tree walking */ + Boolean autoExtend; /* [HGM] enable playing move(s) of right-clicked PV in analysis mode */ /* [AS] New properties (down to the "ZIPPY" part) */ Boolean scoreIsAbsolute[ENGINES]; /* If true, engine score is always from white side */ @@ -542,6 +564,7 @@ typedef struct { Boolean hideThinkingFromHuman; /* If true, program thinking is generated but not displayed in human/computer matches */ Boolean useBitmaps; Boolean useFont; + Boolean useBorder; char * liteBackTextureFile; /* Name of texture bitmap for lite squares */ char * darkBackTextureFile; /* Name of texture bitmap for dark squares */ int liteBackTextureMode; @@ -778,6 +801,11 @@ extern WindowPlacement wpTags; extern int chatCount; extern char chatPartner[MAX_CHAT][MSG_SIZ]; +// Some prototypes of routines so general they should be available everywhere +/* If status == 0, we are exiting with a benign message, not an error */ +void DisplayFatalError P((String message, int error, int status)); +void DisplayError P((String message, int error)); + // [HGM] generally useful macros; there are way too many memory leaks... #define FREE(x) if(x) free(x) #define ASSIGN(x, y) if(x) free(x); x = strdup(y) @@ -819,4 +847,3 @@ extern char chatPartner[MAX_CHAT][MSG_SIZ]; #define secondOptions engOptions[1] #endif -