X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fdspwrappers.c;h=b29afbe08f0a1381713a05cf4750d9dce7548e14;hb=cbf4ad5e9942032a96215a4c7f095a4777bf0021;hp=8a7a0cf59a096203cfc811036b4a12e7a6b0eae4;hpb=2bd15473d35a00d107923dabc82b5a6ae12afd92;p=gnushogi.git diff --git a/gnushogi/dspwrappers.c b/gnushogi/dspwrappers.c index 8a7a0cf..b29afbe 100644 --- a/gnushogi/dspwrappers.c +++ b/gnushogi/dspwrappers.c @@ -37,7 +37,6 @@ #include "rawdsp.h" #include "cursesdsp.h" -#include #include #define CASE_DSP_RAW(func,args) \ @@ -86,23 +85,28 @@ DISPLAY_VOIDFUNC(ChangeXwindow) DISPLAY_VOIDFUNC(ClearScreen) DISPLAY_VOIDFUNC(DoDebug) DISPLAY_FUNC(DoTable, (short table[NO_SQUARES]), (table)) +DISPLAY_FUNC(ElapsedTime, (ElapsedTime_mode iop), (iop)) DISPLAY_VOIDFUNC(EditBoard) DISPLAY_VOIDFUNC(ExitShogi) DISPLAY_VOIDFUNC(GiveHint) DISPLAY_VOIDFUNC(Initialize) +DISPLAY_FUNC(ShowNodeCnt, (long NodeCnt), (NodeCnt)) DISPLAY_VOIDFUNC(OutputMove) DISPLAY_VOIDFUNC(SetContempt) DISPLAY_FUNC(SearchStartStuff, (short side), (side)) DISPLAY_FUNC(SelectLevel, (char *sx), (sx)) +DISPLAY_VOIDFUNC(SetupBoard) DISPLAY_FUNC(ShowCurrentMove, (short pnt, short f, short t), (pnt, f, t)) DISPLAY_FUNC(ShowDepth, (char ch), (ch)) DISPLAY_VOIDFUNC(ShowGameType) DISPLAY_FUNC(ShowLine, (unsigned short *bstline), (bstline)) DISPLAY_FUNC(ShowMessage, (char *s), (s)) +DISPLAY_STDARGFUNC(AlwaysShowMessage, (const char *format, ...), format, (format, ap)) DISPLAY_STDARGFUNC(Printf, (const char *format, ...), format, (format, ap)) DISPLAY_FUNC(ShowPatternCount, (short side, short n), (side, n)) DISPLAY_FUNC(ShowPostnValue, (short sq), (sq)) DISPLAY_VOIDFUNC(ShowPostnValues) +DISPLAY_VOIDFUNC(ShowPrompt) DISPLAY_VOIDFUNC(ShowResponseTime) DISPLAY_FUNC(ShowResults, (short score, unsigned short *bstline, char ch), (score, bstline, ch)) DISPLAY_VOIDFUNC(ShowSidetoMove) @@ -124,3 +128,32 @@ void RequestInputString(char* buffer, unsigned bufsize) } doRequestInputString(fmt, buffer); } + +/*********/ + +#define CASE_DSPFUNC_RAW(func,args) \ + case DISPLAY_RAW: \ + case DISPLAY_X: \ + return (func args); \ + break + +#ifdef HAVE_LIBCURSES +#define CASE_DSPFUNC_CURSES(func,args) \ + case DISPLAY_CURSES: \ + return (func args); \ + break; +#else +#define CASE_DSPFUNC_CURSES(func,args) +#endif + +#define DISPLAY_INTFUNC(func,argsdecl,args) \ + int func argsdecl \ + { \ + switch (display_type) { \ + CASE_DSPFUNC_RAW(Raw_ ## func, args); \ + CASE_DSPFUNC_CURSES(Curses_ ## func, args); \ + } \ + assert(0); \ + } + +DISPLAY_INTFUNC(GetString, (char* sx), (sx))