#include "rawdsp.h"
#include "cursesdsp.h"
-#include <stdarg.h>
#include <stdio.h>
#define CASE_DSP_RAW(func,args) \
DISPLAY_VOIDFUNC(Initialize)
DISPLAY_FUNC(ShowNodeCnt, (long NodeCnt), (NodeCnt))
DISPLAY_VOIDFUNC(OutputMove)
+DISPLAY_VOIDFUNC(PollForInput)
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(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)
DISPLAY_VOIDFUNC(ShowStage)
DISPLAY_FUNC(TerminateSearch, (int sig), (sig))
+DISPLAY_VOIDFUNC(UpdateClocks)
DISPLAY_FUNC(UpdateDisplay, (short f, short t, short redraw, short isspec), (f, t, redraw, isspec))
DISPLAY_VOIDFUNC(help)
}
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))