X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=common.h;h=71f6c49ad255ea5c741e0c52a2fc73c59eecf2d8;hb=0a3919ff10a347a8d840f75fd2c816efe52e5098;hp=68749f302b957e632ba8c1fe50e991dfc99ff429;hpb=15eab3074ed1dc476c19b48da66e82dea27399b5;p=xboard.git diff --git a/common.h b/common.h index 68749f3..71f6c49 100644 --- a/common.h +++ b/common.h @@ -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, @@ -408,8 +423,7 @@ typedef struct { Boolean firstPlaysBlack; Boolean noChessProgram; char *host[ENGINES]; - char *pngDirectory; - char *svgDirectory; + char *pieceDirectory; char *soundDirectory; char *remoteShell; char *remoteUser; @@ -778,6 +792,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)