X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fdspwrappers.c;h=dc139ce3148c0baa9a0f3aa27c04fb8360599432;hb=f30d0521d5d0847df94b8785d350281cb54fae1e;hp=87959ed1a816ad557a4f9166190731ec992421af;hpb=b18dc4fd00c0055eae9128c28a36412f83b998b4;p=gnushogi.git diff --git a/gnushogi/dspwrappers.c b/gnushogi/dspwrappers.c index 87959ed..dc139ce 100644 --- a/gnushogi/dspwrappers.c +++ b/gnushogi/dspwrappers.c @@ -100,10 +100,12 @@ 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) @@ -125,3 +127,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))