Deal with simple compiler warnings: dead code, unused parameters, etc.
[gnushogi.git] / gnushogi / rawdsp.c
blobfa121b023d0134c74ad3f7aa3bf88f820ed6f996
1 /*
2 * FILE: rawdsp.c
4 * ----------------------------------------------------------------------
5 * Copyright (c) 1993, 1994, 1995 Matthias Mutz
6 * Copyright (c) 1999 Michael Vanier and the Free Software Foundation
8 * GNU SHOGI is based on GNU CHESS
10 * Copyright (c) 1988, 1989, 1990 John Stanback
11 * Copyright (c) 1992 Free Software Foundation
13 * This file is part of GNU SHOGI.
15 * GNU Shogi is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 3 of the License,
18 * or (at your option) any later version.
20 * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT
21 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * for more details.
25 * You should have received a copy of the GNU General Public License along
26 * with GNU Shogi; see the file COPYING. If not, see
27 * <http://www.gnu.org/licenses/>.
28 * ----------------------------------------------------------------------
32 #include <ctype.h>
33 #include <signal.h>
34 #include <stdarg.h>
35 #include <stdio.h>
36 #include <sys/param.h>
37 #include <sys/types.h>
38 #include <sys/file.h>
39 #ifndef WIN32
40 #include <poll.h>
41 #include <unistd.h>
42 #endif
44 #include "gnushogi.h"
46 unsigned short MV[MAXDEPTH];
47 int MSCORE;
49 int mycnt1, mycnt2;
50 char *DRAW;
51 extern char *InPtr;
52 extern short pscore[];
54 /****************************************
55 * forward declarations
56 ****************************************/
58 void Raw_UpdateDisplay(short f, short t, short redraw, short isspec);
60 /****************************************
61 * Trivial output functions.
62 ****************************************/
64 void
65 Raw_ClearScreen(void)
67 if (!barebones && !XSHOGI)
68 printf("\n");
72 void
73 Raw_ShowPrompt(void)
75 if (!barebones && !XSHOGI)
77 fputs("\nYour move is? ", stdout);
82 void
83 Raw_ShowCurrentMove(short pnt, short f, short t)
88 void
89 Raw_ShowDepth(char ch)
91 if (!barebones && !XSHOGI)
93 printf("Depth= %d%c ", Sdepth, ch);
94 printf("\n");
99 void
100 Raw_ShowGameType(void)
102 if (flag.post)
103 printf("%c vs. %c\n", GameType[black], GameType[white]);
107 void
108 Raw_ShowLine(unsigned short *bstline)
110 int i;
112 for (i = 1; bstline[i] > 0; i++)
114 if ((i > 1) && (i % 8 == 1))
115 printf("\n ");
117 algbr((short)(bstline[i] >> 8), (short)(bstline[i] & 0xFF), false);
118 printf("%5s ", mvstr[0]);
121 printf("\n");
125 void
126 Raw_ShowMessage(char *s)
128 if (!XSHOGI)
129 printf("%s\n", s);
133 void
134 Raw_AlwaysShowMessage(const char *format, ...)
136 va_list ap;
137 va_start(ap, format);
138 vprintf(format, ap);
139 printf("\n");
140 va_end(ap);
144 void
145 Raw_Printf(const char *format, ...)
147 va_list ap;
148 va_start(ap, format);
149 vprintf(format, ap);
150 va_end(ap);
154 void
155 Raw_doRequestInputString(const char* fmt, char* buffer)
157 scanf(fmt, buffer);
162 Raw_GetString(char* sx)
164 int eof = 0;
165 sx[0] = '\0';
167 while(!eof && !sx[0])
168 eof = (fgets(sx, 80, stdin) == NULL);
169 return eof;
173 void
174 Raw_ShowNodeCnt(long NodeCnt)
176 printf("Nodes = %ld Nodes/sec = %ld\n",
177 NodeCnt, (((et) ? ((NodeCnt * 100) / et) : 0)));
181 void
182 Raw_ShowPatternCount(short side, short n)
184 if (flag.post)
185 printf("%s matches %d pattern(s)\n", ColorStr[side], n);
189 void
190 Raw_ShowResponseTime(void)
195 void
196 Raw_ShowResults(short score, unsigned short *bstline, char ch)
198 if (flag.post && !XSHOGI)
200 ElapsedTime(2);
201 printf("%2d%c %6d %4ld %8ld ",
202 Sdepth, ch, score, et / 100, NodeCnt);
203 Raw_ShowLine(bstline);
208 void
209 Raw_ShowSidetoMove(void)
214 void
215 Raw_ShowStage(void)
217 printf("stage = %d\n", stage);
218 printf("balance[black] = %d balance[white] = %d\n",
219 balance[black], balance[white]);
222 /****************************************
223 * End of trivial output routines.
224 ****************************************/
226 void
227 Raw_Initialize(void)
229 mycnt1 = mycnt2 = 0;
231 if (XSHOGI)
233 #ifdef WIN32
234 /* needed because of inconsistency between MSVC run-time system and gcc includes */
235 setbuf(stdout, NULL);
236 #else
237 #ifdef HAVE_SETLINEBUF
238 setlinebuf(stdout);
239 #else
240 # ifdef HAVE_SETVBUF
241 setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
242 # else
243 # error "Need setlinebuf() or setvbuf() to compile gnushogi!"
244 # endif
245 #endif
246 #endif
247 printf("GNU Shogi %s\n", PACKAGE_VERSION);
250 if (hard_time_limit)
252 if (!TCflag && (MaxResponseTime == 0))
253 MaxResponseTime = 15L * 100L;
258 void
259 Raw_ExitShogi(void)
261 /* CHECKME: what purpose does this next statement serve? */
262 signal(SIGTERM, SIG_IGN);
264 if (!nolist)
265 ListGame();
267 exit(0);
271 void
272 Raw_Die(int sig)
274 char s[80];
276 Raw_ShowMessage("Abort? ");
277 scanf("%s", s);
279 if (strcmp(s, "yes") == 0)
280 Raw_ExitShogi();
284 void
285 Raw_TerminateSearch(int sig)
287 #ifdef INTERRUPT_TEST
288 ElapsedTime(INIT_INTERRUPT_MODE);
289 #endif
291 if (!flag.timeout)
292 flag.back = true; /* previous: flag.timeout = true; */
294 flag.bothsides = false;
298 void
299 Raw_help(void)
301 Raw_ClearScreen();
302 printf("GNU Shogi %s command summary\n", PACKAGE_VERSION);
303 printf("----------------------------------"
304 "------------------------------\n");
305 fputs ("7g7f move from 7g to 7f quit Exit Shogi\n", stdout);
306 printf("S6h move silver to 6h beep turn %s\n", (flag.beep) ? "OFF" : "ON");
307 printf("2d2c+ move to 2c and promote material turn %s\n", (flag.material) ? "OFF" : "ON");
308 printf("P*5e drop pawn to 5e easy turn %s\n", (flag.easy) ? "OFF" : "ON");
309 printf("tsume toggle tsume mode hash turn %s\n", (flag.hash) ? "OFF" : "ON");
310 fputs ("bd redraw board reverse board display\n", stdout);
311 printf("list game to shogi.lst book turn %s used %d of %d\n", (Book) ? "OFF" : "ON", bookcount, booksize);
312 fputs ("undo undo last ply remove take back a move\n", stdout);
313 fputs ("edit edit board force toggle manual move mode\n", stdout);
314 fputs ("switch sides with computer both computer match\n", stdout);
315 fputs ("black computer plays black white computer plays white\n", stdout);
316 fputs ("depth set search depth clock set time control\n", stdout);
317 fputs ("post principle variation hint suggest a move\n", stdout);
318 fputs ("save game to file get game from file\n", stdout);
319 printf("xsave pos. to xshogi file xget"
320 " pos. from xshogi file\n");
321 fputs("random randomize play new start new game\n", stdout);
322 printf("--------------------------------"
323 "--------------------------------\n");
324 printf("Computer: %-12s Opponent: %s\n",
325 ColorStr[computer], ColorStr[opponent]);
326 printf("Depth: %-12d Response time: %ld sec\n",
327 MaxSearchDepth, MaxResponseTime/100);
328 printf("Random: %-12s Easy mode: %s\n",
329 (dither) ? "ON" : "OFF", (flag.easy) ? "ON" : "OFF");
330 printf("Beep: %-12s Transposition file: %s\n",
331 (flag.beep) ? "ON" : "OFF", (flag.hash) ? "ON" : "OFF");
332 printf("Tsume: %-12s Force: %s\n",
333 (flag.tsume) ? "ON" : "OFF", (flag.force) ? "ON" : "OFF");
334 printf("Time Control %s %d moves %ld sec %d add %d depth\n",
335 (TCflag) ? "ON" : "OFF",
336 TimeControl.moves[black], TimeControl.clock[black] / 100,
337 TCadd/100, MaxSearchDepth);
342 * Set up a board position. Pieces are entered by typing the piece followed
343 * by the location. For example, Nf3 will place a knight on square f3.
345 void
346 Raw_EditBoard(void)
348 short a, r, c, sq, i, found;
349 char s[80];
351 flag.regularstart = true;
352 Book = BOOKFAIL;
353 Raw_ClearScreen();
354 Raw_UpdateDisplay(0, 0, 1, 0);
355 fputs(". Exit to main\n", stdout);
356 fputs("# Clear board\n", stdout);
357 fputs("c Change sides\n", stdout);
358 fputs("enter piece & location: \n", stdout);
360 a = black;
364 scanf("%s", s);
365 found = 0;
367 if (s[0] == '#')
369 for (sq = 0; sq < NO_SQUARES; sq++)
371 board[sq] = no_piece;
372 color[sq] = neutral;
375 ClearCaptured();
378 if (s[0] == 'c')
379 a = otherside[a];
381 if (s[1] == '*')
383 for (i = pawn; i <= king; i++)
385 if ((s[0] == pxx[i]) || (s[0] == qxx[i]))
387 Captured[a][i]++;
388 found = 1;
389 break;
393 c = -1;
394 r = -1;
396 else
398 c = COL_NAME(s[1]);
399 r = ROW_NAME(s[2]);
402 if ((c >= 0) && (c < NO_COLS) && (r >= 0) && (r < NO_ROWS))
404 sq = locn(r, c);
405 color[sq] = a;
406 board[sq] = no_piece;
408 for (i = no_piece; i <= king; i++)
410 if ((s[0] == pxx[i]) || (s[0] == qxx[i]))
412 if (s[3] == '+')
413 board[sq] = promoted[i];
414 else
415 board[sq] = i;
417 found = 1;
418 break;
422 if (found == 0)
423 color[sq] = neutral;
426 while (s[0] != '.');
428 for (sq = 0; sq < NO_SQUARES; sq++)
429 Mvboard[sq] = ((board[sq] != Stboard[sq]) ? 10 : 0);
431 GameCnt = 0;
432 Game50 = 1;
433 ZeroRPT();
434 Sdepth = 0;
435 InitializeStats();
436 Raw_ClearScreen();
437 Raw_UpdateDisplay(0, 0, 1, 0);
442 * Set up a board position.
443 * Nine lines of nine characters are used to setup the board. 9a-1a is the
444 * first line. White pieces are represented by uppercase characters.
446 void
447 Raw_SetupBoard(void)
449 short r, c, sq, i;
450 char ch;
451 char s[80];
453 NewGame();
455 fgets(s, 80, stdin); /* skip "setup" command */
457 for (r = NO_ROWS - 1; r >= 0; r--)
459 fgets(s, 80, stdin);
461 for (c = 0; c <= (NO_COLS - 1); c++)
463 ch = s[c];
464 sq = locn(r, c);
465 color[sq] = neutral;
466 board[sq] = no_piece;
468 for (i = no_piece; i <= king; i++)
470 if (ch == pxx[i])
472 color[sq] = white;
473 board[sq] = i;
474 break;
476 else if (ch == qxx[i])
478 color[sq] = black;
479 board[sq] = i;
480 break;
486 for (sq = 0; sq < NO_SQUARES; sq++)
487 Mvboard[sq] = ((board[sq] != Stboard[sq]) ? 10 : 0);
489 InitializeStats();
490 Raw_ClearScreen();
491 Raw_UpdateDisplay(0, 0, 1, 0);
492 fputs("Setup successful\n", stdout);
496 void
497 Raw_SearchStartStuff(short side)
499 if (flag.post)
501 printf("\nMove# %d Target = %ld Clock: %ld\n",
502 GameCnt/2 + 1,
503 ResponseTime, TimeControl.clock[side]);
508 void
509 Raw_OutputMove(void)
511 if (flag.illegal)
513 printf("Illegal position.\n");
514 return;
517 if (mvstr[0][0] == '\0')
518 goto nomove;
520 if (XSHOGI)
522 /* add remaining time in milliseconds to xshogi */
523 printf("%d. ... %s %ld\n", ++mycnt1, mvstr[0],
524 (TimeControl.clock[player] - et) * 10);
526 else
528 printf("%d. ... %s\n", ++mycnt1, mvstr[0]);
531 nomove:
532 if ((root->flags & draw) || (root->score == -(SCORE_LIMIT + 999))
533 || (root->score == (SCORE_LIMIT + 998)))
534 goto summary;
536 if (flag.post)
538 short h, l, t;
540 h = TREE;
541 l = 0;
542 t = TREE >> 1;
544 while (l != t)
546 if (Tree[t].f || Tree[t].t)
547 l = t;
548 else
549 h = t;
551 t = (l + h) >> 1;
554 printf("Gen %ld Node %ld Tree %d Eval %ld Rate %ld EC %d/%d RS hi %ld lo %ld \n", GenCnt, NodeCnt, t, EvalNodes,
555 (et > 100) ? (NodeCnt / (et / 100)) : 0,
556 EADD, EGET, reminus, replus);
558 printf("Hin/Hout/Tcol/Coll/Fin/Fout = %ld/%ld/%ld/%ld/%ld/%ld\n",
559 HashAdd, HashCnt, THashCol, HashCol, FHashCnt, FHashAdd);
562 Raw_UpdateDisplay(root->f, root->t, 0, root->flags);
564 if (!XSHOGI)
566 printf("My move is: %5s\n", mvstr[0]);
568 if (flag.beep)
569 printf("%c", 7);
572 summary:
573 if (root->flags & draw)
575 fputs("Drawn game!\n", stdout);
577 else if (root->score == -(SCORE_LIMIT + 999))
579 printf("%s mates!\n", ColorStr[opponent]);
581 else if (root->score == (SCORE_LIMIT + 998))
583 printf("%s mates!\n", ColorStr[computer]);
585 #ifdef VERYBUGGY
586 else if (!barebones && (root->score < -SCORE_LIMIT))
588 printf("%s has a forced mate in %d moves!\n",
589 ColorStr[opponent], SCORE_LIMIT + 999 + root->score - 1);
591 else if (!barebones && (root->score > SCORE_LIMIT))
593 printf("%s has a forced mate in %d moves!\n",
594 ColorStr[computer], SCORE_LIMIT + 998 - root->score - 1);
596 #endif /* VERYBUGGY */
600 void
601 Raw_UpdateClocks(void)
606 void
607 Raw_UpdateDisplay(short f, short t, short redraw, short isspec)
610 short r, c, l, m;
612 if (redraw && !XSHOGI)
614 printf("\n");
615 r = (short)(TimeControl.clock[black] / 6000);
616 c = (short)((TimeControl.clock[black] % 6000) / 100);
617 l = (short)(TimeControl.clock[white] / 6000);
618 m = (short)((TimeControl.clock[white] % 6000) / 100);
619 printf("Black %d:%02d White %d:%02d\n", r, c, l, m);
620 printf("\n");
622 for (r = (NO_ROWS - 1); r >= 0; r--)
624 for (c = 0; c <= (NO_COLS - 1); c++)
626 char pc;
627 l = ((flag.reverse)
628 ? locn((NO_ROWS - 1) - r, (NO_COLS - 1) - c)
629 : locn(r, c));
630 pc = (is_promoted[board[l]] ? '+' : ' ');
632 if (color[l] == neutral)
633 printf(" -");
634 else if (color[l] == black)
635 printf("%c%c", pc, qxx[board[l]]);
636 else
637 printf("%c%c", pc, pxx[board[l]]);
640 printf("\n");
643 printf("\n");
645 short side;
647 for (side = black; side <= white; side++)
649 short piece, c;
650 printf((side == black)?"black ":"white ");
652 for (piece = pawn; piece <= king; piece++)
654 if ((c = Captured[side][piece]))
655 printf("%i%c ", c, pxx[piece]);
658 printf("\n");
665 void
666 Raw_ChangeAlphaWindow(void)
668 printf("WAwindow: ");
669 scanf("%hd", &WAwindow);
670 printf("BAwindow: ");
671 scanf("%hd", &BAwindow);
675 void
676 Raw_ChangeBetaWindow(void)
678 printf("WBwindow: ");
679 scanf("%hd", &WBwindow);
680 printf("BBwindow: ");
681 scanf("%hd", &BBwindow);
685 void
686 Raw_GiveHint(void)
688 if (hint)
690 algbr((short) (hint >> 8), (short) (hint & 0xFF), false);
691 printf("Hint: %s\n", mvstr[0]);
693 else
694 fputs("I have no idea.\n", stdout);
698 void
699 Raw_SelectLevel(char *sx)
702 char T[NO_SQUARES + 1], *p, *q;
704 if ((p = strstr(sx, "level")) != NULL)
705 p += strlen("level");
706 else if ((p = strstr(sx, "clock")) != NULL)
707 p += strlen("clock");
709 strcat(sx, "XX");
710 q = T;
711 *q = '\0';
713 for (; *p != 'X'; *q++ = *p++);
715 *q = '\0';
717 /* line empty ask for input */
718 if (!T[0])
720 fputs("Enter #moves #minutes: ", stdout);
721 fgets(T, NO_SQUARES + 1, stdin);
722 strcat(T, "XX");
725 /* skip blackspace */
726 for (p = T; *p == ' '; p++) ;
728 /* could be moves or a fischer clock */
729 if (*p == 'f')
731 /* its a fischer clock game */
732 p++;
733 TCminutes = (short)strtol(p, &q, 10);
734 TCadd = (short)strtol(q, NULL, 10) *100;
735 TCseconds = 0;
736 TCmoves = 50;
738 else
740 /* regular game */
741 TCadd = 0;
742 TCmoves = (short)strtol(p, &q, 10);
743 TCminutes = (short)strtol(q, &q, 10);
745 if (*q == ':')
746 TCseconds = (short)strtol(q + 1, (char **) NULL, 10);
747 else
748 TCseconds = 0;
750 #ifdef OPERATORTIME
751 fputs("Operator time (hundredths) = ", stdout);
752 scanf("%hd", &OperatorTime);
753 #endif
755 if (TCmoves == 0)
757 TCflag = false;
758 MaxResponseTime = TCminutes*60L * 100L + TCseconds * 100L;
759 TCminutes = TCseconds = 0;
761 else
763 TCflag = true;
764 MaxResponseTime = 0;
768 TimeControl.clock[black] = TimeControl.clock[white] = 0;
769 SetTimeControl();
771 if (XSHOGI)
773 printf("Clocks: %ld %ld\n",
774 TimeControl.clock[black] * 10,
775 TimeControl.clock[white] * 10);
780 void
781 Raw_ChangeSearchDepth(void)
783 printf("depth = ");
784 scanf("%hd", &MaxSearchDepth);
785 TCflag = !(MaxSearchDepth > 0);
789 void
790 Raw_ChangeHashDepth(void)
792 printf("hashdepth = ");
793 scanf("%hd", &HashDepth);
794 printf("MoveLimit = ");
795 scanf("%hd", &HashMoveLimit);
799 void
800 Raw_SetContempt(void)
802 printf("contempt = ");
803 scanf("%hd", &contempt);
807 void
808 Raw_ChangeXwindow(void)
810 printf("xwndw = ");
811 scanf("%hd", &xwndw);
816 * Raw_ShowPostnValue(short sq)
817 * must have called ExaminePosition() first
819 void
820 Raw_ShowPostnValue(short sq)
822 (void) ScorePosition(color[sq]);
824 if (color[sq] != neutral)
826 #if defined SAVE_SVALUE
827 printf("???%c ", (color[sq] == white)?'b':'w');
828 #else
829 printf("%3d%c ", svalue[sq], (color[sq] == white)?'b':'w');
830 #endif
832 else
834 printf(" * ");
839 void
840 Raw_DoDebug(void)
842 short c, p, sq, tp, tc, tsq, score, j, k;
843 char s[40];
845 ExaminePosition(opponent);
846 Raw_ShowMessage("Enter piece: ");
847 scanf("%s", s);
848 c = neutral;
850 if ((s[0] == 'b') || (s[0] == 'B'))
851 c = black;
853 if ((s[0] == 'w') || (s[0] == 'W'))
854 c = white;
856 for (p = king; p > no_piece; p--)
858 if ((s[1] == pxx[p]) || (s[1] == qxx[p]))
859 break;
862 if (p > no_piece)
864 for (j = (NO_ROWS - 1); j >= 0; j--)
866 for (k = 0; k < (NO_COLS); k++)
868 sq = j*(NO_COLS) + k;
869 tp = board[sq];
870 tc = color[sq];
871 board[sq] = p;
872 color[sq] = c;
873 tsq = PieceList[c][1];
874 PieceList[c][1] = sq;
875 Raw_ShowPostnValue(sq);
876 PieceList[c][1] = tsq;
877 board[sq] = tp;
878 color[sq] = tc;
881 printf("\n");
885 score = ScorePosition(opponent);
887 for (j = (NO_ROWS - 1); j >= 0; j--)
889 for (k = 0; k < (NO_COLS); k++)
891 sq = j*(NO_COLS) + k;
893 if (color[sq] != neutral)
895 #if defined SAVE_SVALUE
896 printf("%?????%c ", (color[sq] == white)?'b':'w');
897 #else
898 printf("%5d%c ", svalue[sq], (color[sq] == white)?'b':'w');
899 #endif
901 else
903 printf(" * ");
907 printf("\n");
910 printf("stage = %d\n", stage);
911 printf("S%d m%d ps%d gt%c m%d ps%d gt%c", score,
912 mtl[computer], pscore[computer], GameType[computer],
913 mtl[opponent], pscore[opponent], GameType[opponent]);
917 void
918 Raw_DoTable(short table[NO_SQUARES])
920 short sq, j, k;
921 ExaminePosition(opponent);
923 for (j = (NO_ROWS - 1); j >= 0; j--)
925 for (k = 0; k < NO_COLS; k++)
927 sq = j*(NO_ROWS) + k;
928 printf("%3d ", table[sq]);
931 printf("\n");
936 void
937 Raw_ShowPostnValues(void)
939 short sq, score, j, k;
940 ExaminePosition(opponent);
942 for (j = (NO_ROWS - 1); j >= 0; j--)
944 for (k = 0; k < NO_COLS; k++)
946 sq = j * NO_COLS + k;
947 Raw_ShowPostnValue(sq);
950 printf("\n");
953 score = ScorePosition(opponent);
954 printf("S%d m%d ps%d gt%c m%d ps%d gt%c", score,
955 mtl[computer], pscore[computer], GameType[computer],
956 mtl[opponent], pscore[opponent], GameType[opponent]);
957 printf("\nhung black %d hung white %d\n", hung[black], hung[white]);
961 void
962 Raw_PollForInput(void)
964 #ifdef WIN32
965 DWORD cnt;
966 if (!PeekNamedPipe(GetStdHandle(STD_INPUT_HANDLE), NULL, 0, NULL, &cnt, NULL))
967 cnt = 1;
968 #else
969 static struct pollfd pollfds[1] = { [0] = { .fd = STDIN_FILENO,
970 .events = POLLIN } };
971 int cnt = poll(pollfds, sizeof(pollfds)/sizeof(pollfds[0]), 0);
972 if (cnt < 0) {
973 perror("polling standard input");
974 Raw_ExitShogi();
976 #endif
977 if (cnt) { /* if anything to read, or error occured */
978 if (!flag.timeout)
979 flag.back = true; /* previous: flag.timeout = true; */
980 flag.bothsides = false;
984 struct display raw_display =
986 .ChangeAlphaWindow = Raw_ChangeAlphaWindow,
987 .ChangeBetaWindow = Raw_ChangeBetaWindow,
988 .ChangeHashDepth = Raw_ChangeHashDepth,
989 .ChangeSearchDepth = Raw_ChangeSearchDepth,
990 .ChangeXwindow = Raw_ChangeXwindow,
991 .ClearScreen = Raw_ClearScreen,
992 .DoDebug = Raw_DoDebug,
993 .DoTable = Raw_DoTable,
994 .EditBoard = Raw_EditBoard,
995 .ExitShogi = Raw_ExitShogi,
996 .GiveHint = Raw_GiveHint,
997 .Initialize = Raw_Initialize,
998 .ShowNodeCnt = Raw_ShowNodeCnt,
999 .OutputMove = Raw_OutputMove,
1000 .PollForInput = Raw_PollForInput,
1001 .SetContempt = Raw_SetContempt,
1002 .SearchStartStuff = Raw_SearchStartStuff,
1003 .SelectLevel = Raw_SelectLevel,
1004 .ShowCurrentMove = Raw_ShowCurrentMove,
1005 .ShowDepth = Raw_ShowDepth,
1006 .ShowGameType = Raw_ShowGameType,
1007 .ShowLine = Raw_ShowLine,
1008 .ShowMessage = Raw_ShowMessage,
1009 .AlwaysShowMessage = Raw_AlwaysShowMessage,
1010 .Printf = Raw_Printf,
1011 .doRequestInputString = Raw_doRequestInputString,
1012 .GetString = Raw_GetString,
1013 .SetupBoard = Raw_SetupBoard,
1014 .ShowPatternCount = Raw_ShowPatternCount,
1015 .ShowPostnValue = Raw_ShowPostnValue,
1016 .ShowPostnValues = Raw_ShowPostnValues,
1017 .ShowPrompt = Raw_ShowPrompt,
1018 .ShowResponseTime = Raw_ShowResponseTime,
1019 .ShowResults = Raw_ShowResults,
1020 .ShowSidetoMove = Raw_ShowSidetoMove,
1021 .ShowStage = Raw_ShowStage,
1022 .TerminateSearch = Raw_TerminateSearch,
1023 .UpdateClocks = Raw_UpdateClocks,
1024 .UpdateDisplay = Raw_UpdateDisplay,
1025 .help = Raw_help,