X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fgnushogi.h;h=4e2b23e44d9dcd04c5ae02582242a76623d49912;hb=b8e35b1d447cee3c38bc8177ea8609360a88872d;hp=7854113ced2ec3a3b0e7781dd335781c538ff5fd;hpb=7496586755298a8115a3988a8b52b32d41a4dcb7;p=gnushogi.git diff --git a/gnushogi/gnushogi.h b/gnushogi/gnushogi.h index 7854113..4e2b23e 100644 --- a/gnushogi/gnushogi.h +++ b/gnushogi/gnushogi.h @@ -66,6 +66,7 @@ extern display_t display_type; extern short hard_time_limit; /* If you exceed time limit, you lose. */ extern short nolist; /* Don't list game after exit. */ +extern short xboard; /* Use XBoard instead of xShogi protocol */ /* @@ -181,10 +182,11 @@ extern void movealgbr(short m, char *s); #endif #define NO_SQUARES (NO_COLS*NO_ROWS) -#define ROW_NAME(n) ('a' + NO_ROWS - 1 - n) -#define COL_NAME(n) ('1' + NO_COLS - 1 - n) -#define ROW_NUM(c) ('a' + NO_ROWS - 1 - c) -#define COL_NUM(c) ('1' + NO_COLS - 1 - c) +#define ROW_NAME(n) ( xboard ? '1' + n : ('a' + NO_ROWS - 1 - n) ) +#define COL_NAME(n) ( xboard ? 'a' + n : ('1' + NO_COLS - 1 - n) ) +#define ROW_NUM(c) ( xboard ? c - '1' : ('a' + NO_ROWS - 1 - c) ) +#define COL_NUM(c) ( xboard ? c - 'a' : ('1' + NO_COLS - 1 - c) ) + #if defined HASHFILE || defined CACHE # define PTBLBDSIZE (NO_SQUARES + NO_PIECES) @@ -1074,7 +1076,7 @@ extern void algbr(short f, short t, short flag); extern void OutputMove(void); extern void ShowCurrentMove(short pnt, short f, short t); extern void ListGame(void); -extern void ShowMessage(char *s); +extern void ShowMessage(char *s, ...); extern void ClearScreen(void); extern void DoDebug(void); extern void DoTable(short table[NO_SQUARES]); @@ -1140,7 +1142,7 @@ struct display void (*ShowDepth)(char ch); void (*ShowGameType)(void); void (*ShowLine)(unsigned short *bstline); - void (*ShowMessage)(char *s); + void (*ShowMessage)(char *s, ...); void (*AlwaysShowMessage)(const char *format, ...); void (*Printf)(const char *format, ...); void (*doRequestInputString)(const char* fmt, char* buffer);