4 * Wrapper functions which call analogous functions in rawdsp.c
5 * or cursesdsp.c depending on the interface.
7 * ----------------------------------------------------------------------
8 * Copyright (c) 1993, 1994, 1995 Matthias Mutz
9 * Copyright (c) 1999 Michael Vanier and the Free Software Foundation
11 * GNU SHOGI is based on GNU CHESS
13 * Copyright (c) 1988, 1989, 1990 John Stanback
14 * Copyright (c) 1992 Free Software Foundation
16 * This file is part of GNU SHOGI.
18 * GNU Shogi is free software; you can redistribute it and/or modify it
19 * under the terms of the GNU General Public License as published by the
20 * Free Software Foundation; either version 3 of the License,
21 * or (at your option) any later version.
23 * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT
24 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
25 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
28 * You should have received a copy of the GNU General Public License along
29 * with GNU Shogi; see the file COPYING. If not, see
30 * <http://www.gnu.org/licenses/>.
31 * ----------------------------------------------------------------------
36 #include "dspwrappers.h"
38 #include "cursesdsp.h"
42 #define CASE_DSP_RAW(func,args) \
49 #define CASE_DSP_CURSES(func,args) \
50 case DISPLAY_CURSES: \
54 #define CASE_DSP_CURSES(func,args)
57 #define DISPLAY_FUNC(func,argsdecl,args) \
60 switch (display_type) { \
61 CASE_DSP_RAW(Raw_ ## func, args); \
62 CASE_DSP_CURSES(Curses_ ## func, args); \
65 #define DISPLAY_VOIDFUNC(func) \
66 DISPLAY_FUNC(func,(void),())
68 #define DISPLAY_STDARGFUNC(func,argsdecl,last,args) \
73 switch (display_type) { \
74 CASE_DSP_RAW(Raw_ ## func, args); \
75 CASE_DSP_CURSES(Curses_ ## func, args); \
80 DISPLAY_VOIDFUNC(ChangeAlphaWindow)
81 DISPLAY_VOIDFUNC(ChangeBetaWindow)
82 DISPLAY_VOIDFUNC(ChangeHashDepth)
83 DISPLAY_VOIDFUNC(ChangeSearchDepth)
84 DISPLAY_VOIDFUNC(ChangeXwindow)
85 DISPLAY_VOIDFUNC(ClearScreen)
86 DISPLAY_VOIDFUNC(DoDebug)
87 DISPLAY_FUNC(DoTable, (short table[NO_SQUARES]), (table))
88 DISPLAY_VOIDFUNC(EditBoard)
89 DISPLAY_VOIDFUNC(ExitShogi)
90 DISPLAY_VOIDFUNC(GiveHint)
91 DISPLAY_VOIDFUNC(Initialize)
92 DISPLAY_VOIDFUNC(OutputMove)
93 DISPLAY_VOIDFUNC(SetContempt)
94 DISPLAY_FUNC(SearchStartStuff, (short side), (side))
95 DISPLAY_FUNC(SelectLevel, (char *sx), (sx))
96 DISPLAY_FUNC(ShowCurrentMove, (short pnt, short f, short t), (pnt, f, t))
97 DISPLAY_FUNC(ShowDepth, (char ch), (ch))
98 DISPLAY_VOIDFUNC(ShowGameType)
99 DISPLAY_FUNC(ShowLine, (unsigned short *bstline), (bstline))
100 DISPLAY_FUNC(ShowMessage, (char *s), (s))
101 DISPLAY_STDARGFUNC(Printf, (const char *format, ...), format, (format, ap))
102 DISPLAY_FUNC(RequestInputString, (char* buffer), (buffer))
103 DISPLAY_FUNC(ShowPatternCount, (short side, short n), (side, n))
104 DISPLAY_FUNC(ShowPostnValue, (short sq), (sq))
105 DISPLAY_VOIDFUNC(ShowPostnValues)
106 DISPLAY_VOIDFUNC(ShowResponseTime)
107 DISPLAY_FUNC(ShowResults, (short score, unsigned short *bstline, char ch), (score, bstline, ch))
108 DISPLAY_VOIDFUNC(ShowSidetoMove)
109 DISPLAY_VOIDFUNC(ShowStage)
110 DISPLAY_FUNC(TerminateSearch, (int sig), (sig))
111 DISPLAY_FUNC(UpdateDisplay, (short f, short t, short redraw, short isspec), (f, t, redraw, isspec))
112 DISPLAY_VOIDFUNC(help)