From 95369c6cb63d6513f7381dc3cc92c1f34044c607 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sun, 3 Nov 2013 15:00:13 +0100 Subject: [PATCH] Move strings back into source code, from .lng support. * there is no point in translating the protocol * if someone wants to translate the curses UI, this should be done with gettext --- gnushogi/Makefile.in | 10 +-- gnushogi/book.c | 12 +-- gnushogi/commondsp.c | 213 ++++++++++++++++++++---------------------- gnushogi/cursesdsp.c | 196 ++++++++++++++++---------------------- gnushogi/globals.c | 5 + gnushogi/gnushogi.h | 13 ++- gnushogi/init.c | 255 +------------------------------------------------- gnushogi/main.c | 18 ++-- gnushogi/pat2inc.c | 8 -- gnushogi/rawdsp.c | 168 ++++++++++++--------------------- gnushogi/search.c | 6 +- gnushogi/util.c | 2 +- misc/gnushogi.lng | 234 --------------------------------------------- 13 files changed, 275 insertions(+), 865 deletions(-) delete mode 100644 misc/gnushogi.lng diff --git a/gnushogi/Makefile.in b/gnushogi/Makefile.in index 013beb6..7b75816 100644 --- a/gnushogi/Makefile.in +++ b/gnushogi/Makefile.in @@ -87,12 +87,6 @@ TEXTBOOK = -DBOOK=\"$(LIBDIR)/gnushogi.tbk\" BINBOOK = -DBINBOOK=\"$(LIBDIR)/gnushogi.bbk\" -# The language file describes capabilities of the program. It may -# be useful for customizing gnushogi for non-English-speaking players. - -LANGF = -DLANGFILE=\"../misc/gnushogi.lng\" - - # The pattern file contains various opening patterns. The program tries to # obtain such a pattern in the opening stage. Sequences of opening # patterns may be described in order to support the correct order of moves. @@ -177,7 +171,7 @@ eval.o: eval.c $(CC) $(CFLAGS) -c $< init.o: init.c - $(CC) $(CFLAGS) $(LANGF) -c $< + $(CC) $(CFLAGS) -c $< main.o: main.c $(CC) $(CFLAGS) $(BINBOOK) -c $< @@ -207,7 +201,7 @@ util.o: util.c # Files specific to particular targets. pat2inc.o: pat2inc.c - $(CC) $(CFLAGS) $(LANGF) $(BINBOOK) $(PATTERN) -c $< + $(CC) $(CFLAGS) $(BINBOOK) $(PATTERN) -c $< sizetest.o: sizetest.c $(CC) $(CFLAGS) -c $< diff --git a/gnushogi/book.c b/gnushogi/book.c index 08b2c47..ae3956f 100644 --- a/gnushogi/book.c +++ b/gnushogi/book.c @@ -292,8 +292,7 @@ BVerifyMove(char *s, unsigned short *mv, int moveno) UnmakeMove(opponent, &xnode, &tempb, &tempc, &tempsf, &tempst); /* Illegal move in check */ #if !defined QUIETBOOKGEN - /* 077: "Illegal move (in check) %s" */ - puts(CP[77]); + puts("Illegal move (in check) %s"); bkdisplay(s, cnt, moveno); #endif return false; @@ -313,8 +312,7 @@ BVerifyMove(char *s, unsigned short *mv, int moveno) /* Illegal move */ #if !defined QUIETBOOKGEN - /* 075: "Illegal move (no match)%s\n" */ - printf(CP[75], s); + printf("Illegal move (no match) %s\n", s); bkdisplay(s, cnt, moveno); #endif return false; @@ -877,8 +875,7 @@ GetOpenings(void) } - /* 213: "Book used %d(%d)." */ - sprintf(msg, CP[213], B.bookcount, B.booksize); + sprintf(msg, "Book used %d(%d).", B.bookcount, B.booksize); ShowMessage(msg); } @@ -889,8 +886,7 @@ GetOpenings(void) /* Now get ready to play .*/ if (!B.bookcount) { - /* 212: "Can't find book." */ - ShowMessage(CP[212]); + ShowMessage("Can't find book."); Book = 0; } } diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 39d8500..14df54c 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -297,7 +297,7 @@ VerifyMove(char *s, VerifyMove_mode iop, unsigned short *mv) if (SqAttacked(PieceList[opponent][0], computer, &blocked)) { UnmakeMove(opponent, &xnode, &tempb, &tempc, &tempsf, &tempst); - AlwaysShowMessage(CP[77], s); + AlwaysShowMessage("Illegal move (in check) %s", s); return false; } else @@ -339,11 +339,11 @@ VerifyMove(char *s, VerifyMove_mode iop, unsigned short *mv) } } - AlwaysShowMessage(CP[76], s); + AlwaysShowMessage("Illegal move (no match) %s", s); if (!barebones && (cnt > 1)) { - sprintf(buffer, CP[32], s); + sprintf(buffer, "Ambiguous Move %s!", s); ShowMessage(buffer); } @@ -423,14 +423,12 @@ GetGame(void) if (savefile[0]) { strcpy(fname, savefile); } else { - /* Enter file name */ - ShowMessage(CP[63]); + ShowMessage("Enter file name: "); RequestInputString(fname, sizeof(fname)-1); } - /* shogi.000 */ if (fname[0] == '\0') - strcpy(fname, CP[137]); + strcpy(fname, "shogi.000"); if ((fd = fopen(fname, "r")) != NULL) { @@ -607,7 +605,7 @@ GetGame(void) } skip(); - g->color = ((*InPtr == CP[119][0]) ? white : black); + g->color = ((*InPtr == 'W') ? white : black); skip(); g->piece = (*InPtr == '+' ? promoted[piece] @@ -648,30 +646,29 @@ SaveGame(void) if (savefile[0]) { strcpy(fname, savefile); } else { - /* Enter file name */ - ShowMessage(CP[63]); + ShowMessage("Enter file name: "); RequestInputString(fname, sizeof(fname)-1); } - if (fname[0] == '\0') /* shogi.000 */ - strcpy(fname, CP[137]); + if (fname[0] == '\0') + strcpy(fname, "shogi.000"); if ((fd = fopen(fname, "w")) != NULL) { char *b, *w; - b = w = CP[74]; + b = w = "Human "; if (computer == white) - w = CP[141]; + w = "computer"; if (computer == black) - b = CP[141]; + b = "computer"; - fprintf(fd, CP[37], w, b, Game50, + fprintf(fd, "White %s Black %s %d %s\n", w, b, Game50, flag.force ? "force" : ""); fputs(empty, fd); - fprintf(fd, CP[111], TCflag, OperatorTime); - fprintf(fd, CP[117], + fprintf(fd, "TimeControl %d Operator Time %d\n", TCflag, OperatorTime); + fprintf(fd, "Black Clock %ld Moves %d\nWhite Clock %ld Moves %d\n", TimeControl.clock[black], TimeControl.moves[black], TimeControl.clock[white], TimeControl.moves[white]); fputs(empty, fd); @@ -732,7 +729,7 @@ SaveGame(void) } fputs(empty, fd); - fputs(CP[126], fd); + fputs(" move score depth nodes time flags capture\n", fd); for (i = 1; i <= GameCnt; i++) { @@ -766,13 +763,11 @@ SaveGame(void) fclose(fd); - /* Game saved */ - ShowMessage(CP[70]); + ShowMessage("Game saved"); } else { - /* ShowMessage("Could not open file"); */ - ShowMessage(CP[48]); + ShowMessage("Could not open file"); } } @@ -792,12 +787,11 @@ GetXGame(void) short sq; short side, isp; - /* Enter file name */ - ShowMessage(CP[63]); + ShowMessage("Enter file name: "); RequestInputString(fname, sizeof(fname)-1); - if (fname[0] == '\0') /* XSHOGI.position.read */ - strcpy(fname, CP[205]); + if (fname[0] == '\0') + strcpy(fname, "xshogi.position.read"); if ((fd = fopen(fname, "r")) != NULL) { @@ -811,7 +805,7 @@ GetXGame(void) #ifdef notdef fname[6] = '\0'; - if (strcmp(fname, CP[206])) + if (strcmp(fname, "xshogi")) return; #endif @@ -920,20 +914,16 @@ SaveXGame(void) short sq, piece; short side, isp; - /* Enter file name */ - ShowMessage(CP[63]); + ShowMessage("Enter file name: "); RequestInputString(fname, sizeof(fname)-1); - if (fname[0] == '\0') /* XSHOGI.position.read */ - strcpy(fname, CP[205]); + if (fname[0] == '\0') + strcpy(fname, "xshogi.position.read"); if ((fd = fopen(fname, "w")) != NULL) { - /* xshogi position file ... */ fputs("# xshogi position file -- \n", fd); - /* -- empty line -- */ fputs("\n", fd); - /* -- empty line -- */ fputs("\n", fd); for (i = NO_ROWS - 1; i > -1; i--) @@ -999,7 +989,7 @@ BookSave(void) strcpy(fname, savefile); } else { /* Enter file name */ - ShowMessage(CP[63]); + ShowMessage("Enter file name: "); RequestInputString(fname, sizeof(fname)-1); } @@ -1071,13 +1061,11 @@ BookSave(void) fclose(fd); - /* Game saved */ - ShowMessage(CP[70]); + ShowMessage("Game saved"); } else { - /* ShowMessage("Could not open file"); */ - ShowMessage(CP[48]); + ShowMessage("Could not open file"); } } @@ -1126,14 +1114,13 @@ ListGame(void) if (!fd) { - printf(CP[219], fname); + printf("Open failure for file: %s", fname); exit(1); } - /* fprintf(fd, "gnushogi game %d\n", u); */ - fprintf(fd, CP[161], version, patchlevel); - fputs(CP[10], fd); - fputs(CP[11], fd); + fprintf(fd, "gnushogi %sp%s game\n", version, patchlevel); + fputs(" score depth nodes time ", fd); + fputs(" score depth nodes time\n", fd); for (i = 1; i <= GameCnt; i++) { @@ -1180,9 +1167,9 @@ ListGame(void) if (GameList[GameCnt].flags & draw) { - fprintf(fd, CP[54], DRAW); + fprintf(fd, "Draw %s\n", DRAW); - if (DRAW == CP[101]) + if (DRAW == DRAW_REPETITION) { short j; @@ -1451,7 +1438,7 @@ SetOppTime(char *s) int m, t, sec; sec = 0; - time = &s[strlen(CP[228])]; + time = &s[strlen("otime")]; t = (int)strtol(time, &time, 10); if (*time == ':') @@ -1485,7 +1472,7 @@ SetMachineTime(char *s) char *time; int m, t, sec; - time = &s[strlen(CP[197])]; + time = &s[strlen("time")]; sec = 0; t = (int)strtol(time, &time, 10); @@ -1641,7 +1628,7 @@ InputCommand(char *command) if (s[0] == '\0') continue; - if (strcmp(s, CP[131]) == 0) /* bd -- display board */ + if (strcmp(s, "bd") == 0) /* bd -- display board */ { /* FIXME: Hack alert! */ short old_xshogi = XSHOGI; @@ -1659,35 +1646,35 @@ InputCommand(char *command) { flag.post = !flag.post; } - else if (strcmp(s, CP[129]) == 0) + else if (strcmp(s, "alg") == 0) { /* noop */ ; /* alg */ } - else if ((strcmp(s, CP[180]) == 0) - || (strcmp(s, CP[216]) == 0)) /* quit exit */ + else if ((strcmp(s, "quit") == 0) + || (strcmp(s, "exit") == 0)) { flag.quit = true; } #if !defined NOPOST - else if (strcmp(s, CP[178]) == 0) /* post */ + else if (strcmp(s, "post") == 0) { flag.post = !flag.post; } #endif - else if ((strcmp(s, CP[191]) == 0) - || (strcmp(s, CP[154]) == 0)) /* set edit */ + else if ((strcmp(s, "set") == 0) + || (strcmp(s, "edit") == 0)) { EditBoard(); } - else if ((strcmp(s, CP[190]) == 0)) /* setup */ + else if ((strcmp(s, "setup") == 0)) { SetupBoard(); } - else if (strcmp(s, CP[156]) == 0) /* first */ + else if (strcmp(s, "first") == 0) { ok = true; } - else if (strcmp(s, CP[162]) == 0) /* go */ + else if (strcmp(s, "go") == 0) { ok = true; flag.force = false; @@ -1703,15 +1690,15 @@ InputCommand(char *command) opponent = white; } } - else if (strcmp(s, CP[166]) == 0) /* help */ + else if (strcmp(s, "help") == 0) { help(); } - else if (strcmp(s, CP[221]) == 0) /* material */ + else if (strcmp(s, "material") == 0) { flag.material = !flag.material; } - else if (strcmp(s, CP[157]) == 0) /* force */ + else if (strcmp(s, "force") == 0) { if (XSHOGI) { @@ -1724,61 +1711,61 @@ InputCommand(char *command) flag.bothsides = false; } } - else if (strcmp(s, CP[134]) == 0) /* book */ + else if (strcmp(s, "book") == 0) { Book = Book ? 0 : BOOKFAIL; } - else if (strcmp(s, CP[172]) == 0) /* new */ + else if (strcmp(s, "new") == 0) { NewGame(); UpdateDisplay(0, 0, 1, 0); } - else if (strcmp(s, CP[171]) == 0) /* list */ + else if (strcmp(s, "list") == 0) { ListGame(); } - else if ((strcmp(s, CP[169]) == 0) - || (strcmp(s, CP[217]) == 0)) /* level clock */ + else if ((strcmp(s, "level") == 0) + || (strcmp(s, "clock") == 0)) { SelectLevel(sx); } - else if (strcmp(s, CP[165]) == 0) /* hash */ + else if (strcmp(s, "hash") == 0) { flag.hash = !flag.hash; } - else if (strcmp(s, CP[227]) == 0) /* gamein */ + else if (strcmp(s, "gamein") == 0) { flag.gamein = !flag.gamein; } - else if (strcmp(s, CP[226]) == 0) /* beep */ + else if (strcmp(s, "beep") == 0) { flag.beep = !flag.beep; } - else if (strcmp(s, CP[197]) == 0) /* time */ + else if (strcmp(s, "time") == 0) { SetMachineTime(sx); } - else if (strcmp(s, CP[228]) == 0) /* otime */ + else if (strcmp(s, "otime") == 0) { SetOppTime(sx); } - else if (strcmp(s, CP[33]) == 0) /* Awindow */ + else if (strcmp(s, "Awindow") == 0) { ChangeAlphaWindow(); } - else if (strcmp(s, CP[39]) == 0) /* Bwindow */ + else if (strcmp(s, "Bwindow") == 0) { ChangeBetaWindow(); } - else if (strcmp(s, CP[183]) == 0) /* rcptr */ + else if (strcmp(s, "rcptr") == 0) { flag.rcptr = !flag.rcptr; } - else if (strcmp(s, CP[168]) == 0) /* hint */ + else if (strcmp(s, "hint") == 0) { GiveHint(); } - else if (strcmp(s, CP[135]) == 0) /* both */ + else if (strcmp(s, "both") == 0) { flag.bothsides = !flag.bothsides; flag.force = false; @@ -1787,13 +1774,13 @@ InputCommand(char *command) SelectMove(opponent, FOREGROUND_MODE); ok = true; } - else if (strcmp(s, CP[185]) == 0) /* reverse */ + else if (strcmp(s, "reverse") == 0) { flag.reverse = !flag.reverse; ClearScreen(); UpdateDisplay(0, 0, 1, 0); } - else if (strcmp(s, CP[195]) == 0) /* switch */ + else if (strcmp(s, "switch") == 0) { computer = computer ^ 1; opponent = opponent ^ 1; @@ -1802,7 +1789,7 @@ InputCommand(char *command) Sdepth = 0; ok = true; } - else if (strcmp(s, CP[203]) == 0) /* black */ + else if (strcmp(s, "black") == 0) { computer = white; opponent = black; @@ -1814,7 +1801,7 @@ InputCommand(char *command) * ok = true; don't automatically start with black command */ } - else if (strcmp(s, CP[133]) == 0) /* white */ + else if (strcmp(s, "white") == 0) { computer = black; opponent = white; @@ -1826,25 +1813,25 @@ InputCommand(char *command) * ok = true; don't automatically start with white command */ } - else if (strcmp(s, CP[201]) == 0 && GameCnt > 0) /* undo */ + else if (strcmp(s, "undo") == 0 && GameCnt > 0) { Undo(); } - else if (strcmp(s, CP[184]) == 0 && GameCnt > 1) /* remove */ + else if (strcmp(s, "remove") == 0 && GameCnt > 1) { Undo(); Undo(); } /* CHECKME: are these next three correct? */ - else if (!XSHOGI && strcmp(s, CP[207]) == 0) /* xget */ + else if (!XSHOGI && strcmp(s, "xget") == 0) { GetXGame(); } - else if (!XSHOGI && strcmp(s, "xsave") == 0) /* xsave */ + else if (!XSHOGI && strcmp(s, "xsave") == 0) { SaveXGame(); } - else if (!XSHOGI && strcmp(s, "bsave") == 0) /* bsave */ + else if (!XSHOGI && strcmp(s, "bsave") == 0) { BookSave(); } @@ -1859,62 +1846,62 @@ InputCommand(char *command) { FlagMove(*s); } - else if (strcmp(s, CP[160]) == 0) /* get */ + else if (strcmp(s, "get") == 0) { GetGame(); } - else if (strcmp(s, CP[189]) == 0) /* save */ + else if (strcmp(s, "save") == 0) { SaveGame(); } - else if (strcmp(s, CP[151]) == 0) /* depth */ + else if (strcmp(s, "depth") == 0) { ChangeSearchDepth(); } - else if (strcmp(s, CP[164]) == 0) /* hashdepth */ + else if (strcmp(s, "hashdepth") == 0) { ChangeHashDepth(); } - else if (strcmp(s, CP[182]) == 0) /* random */ + else if (strcmp(s, "random") == 0) { dither = DITHER; } - else if (strcmp(s, CP[229]) == 0) /* hard */ + else if (strcmp(s, "hard") == 0) { flag.easy = false; } - else if (strcmp(s, CP[152]) == 0) /* easy */ + else if (strcmp(s, "easy") == 0) { flag.easy = !flag.easy; } - else if (strcmp(s, CP[230]) == 0) /* tsume */ + else if (strcmp(s, "tsume") == 0) { flag.tsume = !flag.tsume; } - else if (strcmp(s, CP[143]) == 0) /* contempt */ + else if (strcmp(s, "contempt") == 0) { SetContempt(); } - else if (strcmp(s, CP[209]) == 0) /* xwndw */ + else if (strcmp(s, "xwndw") == 0) { ChangeXwindow(); } - else if (strcmp(s, CP[186]) == 0) /* rv */ + else if (strcmp(s, "rv") == 0) { flag.rv = !flag.rv; UpdateDisplay(0, 0, 1, 0); } - else if (strcmp(s, CP[145]) == 0) /* coords */ + else if (strcmp(s, "coords") == 0) { flag.coords = !flag.coords; UpdateDisplay(0, 0, 1, 0); } - else if (strcmp(s, CP[193]) == 0) /* stars */ + else if (strcmp(s, "stars") == 0) { flag.stars = !flag.stars; UpdateDisplay(0, 0, 1, 0); } - else if (!XSHOGI && strcmp(s, CP[5]) == 0) /* moves */ + else if (!XSHOGI && strcmp(s, "moves") == 0) { short temp; @@ -1930,42 +1917,42 @@ InputCommand(char *command) #endif SwagHt = 0; - ShowMessage(CP[108]); /* test movelist */ + ShowMessage("Testing MoveList Speed"); temp = generate_move_flags; generate_move_flags = true; TestSpeed(MoveList, 1); generate_move_flags = temp; - ShowMessage(CP[107]); /* test capturelist */ + ShowMessage("Testing CaptureList Speed"); TestSpeed(CaptureList, 1); - ShowMessage(CP[85]); /* test score position */ + ShowMessage("Testing Eval Speed"); ExaminePosition(opponent); TestPSpeed(ScorePosition, 1); } - else if (!XSHOGI && strcmp(s, CP[196]) == 0) /* test */ + else if (!XSHOGI && strcmp(s, "test") == 0) { #ifdef SLOW_CPU - ShowMessage(CP[108]); /* test movelist */ + ShowMessage("Testing MoveList Speed"); TestSpeed(MoveList, 2000); - ShowMessage(CP[107]); /* test capturelist */ + ShowMessage("Testing CaptureList Speed"); TestSpeed(CaptureList, 3000); - ShowMessage(CP[85]); /* test score position */ + ShowMessage("Testing Eval Speed"); ExaminePosition(opponent); TestPSpeed(ScorePosition, 1500); #else - ShowMessage(CP[108]); /* test movelist */ + ShowMessage("Testing MoveList Speed"); TestSpeed(MoveList, 20000); - ShowMessage(CP[107]); /* test capturelist */ + ShowMessage("Testing CaptureList Speed"); TestSpeed(CaptureList, 30000); - ShowMessage(CP[85]); /* test score position */ + ShowMessage("Testing Eval Speed"); ExaminePosition(opponent); TestPSpeed(ScorePosition, 15000); #endif } - else if (!XSHOGI && strcmp(s, CP[179]) == 0) /* p */ + else if (!XSHOGI && strcmp(s, "p") == 0) { ShowPostnValues(); } - else if (!XSHOGI && strcmp(s, CP[148]) == 0) /* debug */ + else if (!XSHOGI && strcmp(s, "debug") == 0) { DoDebug(); } @@ -1982,7 +1969,7 @@ InputCommand(char *command) if (rpt >= 3) { - DRAW = CP[101]; + DRAW = DRAW_REPETITION; ShowMessage(DRAW); GameList[GameCnt].flags |= draw; diff --git a/gnushogi/cursesdsp.c b/gnushogi/cursesdsp.c index 8e2c376..10eeae6 100644 --- a/gnushogi/cursesdsp.c +++ b/gnushogi/cursesdsp.c @@ -125,7 +125,7 @@ void Curses_ShowDepth(char ch) { gotoXY(TAB, 4); - printw(CP[53], Sdepth, ch); /* Depth = %d%c */ + printw("Depth= %d%c ", Sdepth, ch); ClearEoln(); } @@ -145,7 +145,7 @@ void ShowHeader(void) { gotoXY(TAB, 2); - printw(CP[69], version, patchlevel); + printw("GNU Shogi %s (pl %s)", version, patchlevel); } @@ -201,7 +201,7 @@ void Curses_ShowNodeCnt(long NodeCnt) { gotoXY(TAB, 22); - /* printw(CP[90], NodeCnt, (et > 100) ? NodeCnt / (et / 100) : 0); */ + /* printw("Nodes = %8ld, Nodes/Sec = %5ld", NodeCnt, (et > 100) ? NodeCnt / (et / 100) : 0); */ printw("n = %ld n/s = %ld", NodeCnt, (et > 100) ? NodeCnt / (et / 100) : 0); ClearEoln(); @@ -227,9 +227,9 @@ static void ShowPlayers(void) { gotoXY(5, ((flag.reverse) ? (5 + 2*NO_ROWS) : 2)); - printw("%s", (computer == white) ? CP[218] : CP[74]); + printw("%s", (computer == white) ? "Computer" : "Human "); gotoXY(5, ((flag.reverse) ? 2 : (5 + 2*NO_ROWS))); - printw("%s", (computer == black) ? CP[218] : CP[74]); + printw("%s", (computer == black) ? "Computer" : "Human "); } @@ -238,7 +238,7 @@ Curses_ShowPrompt(void) { Curses_ShowSidetoMove(); gotoXY(TAB, 17); - printw(CP[121]); /* Your move is? */ + printw("Your move is? "); ClearEoln(); } @@ -250,8 +250,6 @@ Curses_ShowResponseTime(void) { short TCC = TCcount; gotoXY(TAB, 21); - /* printw("RT = %ld TCC = %d TCL = %ld EX = %ld ET = %ld TO = %d", - ResponseTime, TCC, TCleft, ExtraTime, et, flag.timeout); */ printw("%ld, %d, %ld, %ld, %ld, %d", ResponseTime, TCC, TCleft, ExtraTime, et, flag.timeout); ClearEoln(); @@ -298,7 +296,7 @@ static void ShowScore(short score) { gotoXY(TAB, 5); - printw(CP[104], score); + printw("Score= %d", score); ClearEoln(); } @@ -359,10 +357,10 @@ Curses_Die(int sig) signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); - Curses_ShowMessage(CP[31]); /* Abort? */ + Curses_ShowMessage("Abort? "); FLUSH_SCANW("%s", s); - if (strcmp(s, CP[210]) == 0) /* yes */ + if (strcmp(s, "yes") == 0) Curses_ExitShogi(); signal(SIGINT, Curses_Die); @@ -390,76 +388,44 @@ void Curses_help(void) { Curses_ClearScreen(); - /* printw("GNU Shogi ??p? command summary\n"); */ - printw(CP[40], version, patchlevel); + printw("GNU Shogi %sp%s command summary\n", version, patchlevel); printw("-------------------------------" "---------------------------------\n"); - /* printw("7g7f move from 7g to 7f quit - * Exit Shogi\n"); */ - printw(CP[158]); - /* printw("S6h move silver to 6h beep - * turn %s\n", (flag.beep) ? "off" : "on"); */ - printw(CP[86], (flag.beep) ? CP[92] : CP[93]); - /* printw("2d2c+ move to 2c and promote\n"); */ - printw(CP[128], (flag.material) ? CP[92] : CP[93]); - /* printw("P*5e drop a pawn to 5e easy - * turn %s\n", (flag.easy) ? "off" : "on"); */ - printw(CP[173], (flag.easy) ? CP[92] : CP[93]); - /* printw(" hash - * turn %s\n", (flag.hash) ? "off" : "on"); */ - printw(CP[174], (flag.hash) ? CP[92] : CP[93]); - /* printw("bd redraw board reverse - * board display\n"); */ - printw(CP[130]); - /* printw("list game to shogi.lst book - * turn %s used %d of %d\n", (Book) ? "off" : "on", book - count, booksize); */ - printw(CP[170], (Book) ? CP[92] : CP[93], bookcount, BOOKSIZE); - /* printw("undo undo last ply remove - * take back a move\n"); */ - printw(CP[200]); - /* printw("edit edit board force - * enter game moves\n"); */ - printw(CP[153]); - /* printw("switch sides with computer both - * computer match\n"); */ - printw(CP[194]); - /* printw("black computer plays black white - * computer plays white\n"); */ - printw(CP[202]); - /* printw("depth set search depth clock - * set time control\n"); */ - printw(CP[149]); - /* printw("hint suggest a move post - * turn %s principle variation\n", (flag.post) ? "off" : - * "on"); */ - printw(CP[177], (flag.post) ? CP[92] : CP[93]); - /* printw("save game to file get - * game from file\n"); */ - printw(CP[188]); - /* printw("random randomize play new - * start new game\n"); */ - printw(CP[181]); + printw("7g7f move from 7g to 7f quit Exit Shogi\n"); + printw("S6h move silver to 6h beep turn %s\n", (flag.beep) ? "OFF" : "ON"); + printw("2d2c+ move to 2c and promote material turn %s\n", (flag.material) ? "OFF" : "ON"); + printw("P*5e drop pawn to 5e easy turn %s\n", (flag.easy) ? "OFF" : "ON"); + printw("tsume toggle tsume mode hash turn %s\n", (flag.hash) ? "OFF" : "ON"); + printw("bd redraw board reverse board display\n"); + printw("list game to shogi.lst book turn %s used %d of %d\n", (Book) ? "OFF" : "ON", bookcount, BOOKSIZE); + printw("undo undo last ply remove take back a move\n"); + printw("edit edit board force toggle manual move mode\n"); + printw("switch sides with computer both computer match\n"); + printw("black computer plays black white computer plays white\n"); + printw("depth set search depth clock set time control\n"); + printw("post principle variation hint suggest a move\n", (flag.post) ? "OFF" : "ON"); + printw("save game to file get game from file\n"); + printw("random randomize play new start new game\n"); gotoXY(10, 20); - printw(CP[47], ColorStr[computer]); + printw("Computer: %s", ColorStr[computer]); gotoXY(10, 21); - printw(CP[97], ColorStr[opponent]); + printw("Opponent: %s", ColorStr[opponent]); gotoXY(10, 22); - printw(CP[79], MaxResponseTime/100); + printw("Level: %ld", MaxResponseTime/100); gotoXY(10, 23); - printw(CP[59], (flag.easy) ? CP[93] : CP[92]); + printw("Easy mode: %s", (flag.easy) ? "ON" : "OFF"); gotoXY(25, 23); - printw(CP[231], (flag.tsume) ? CP[93] : CP[92]); + printw("Tsume: %s", (flag.tsume) ? "ON" : "OFF"); gotoXY(40, 20); - printw(CP[52], MaxSearchDepth); + printw("Depth: %d", MaxSearchDepth); gotoXY(40, 21); - printw(CP[100], (dither) ? CP[93] : CP[92]); + printw("Random: %s", (dither) ? "ON" : "OFF"); gotoXY(40, 22); - printw(CP[112], (flag.hash) ? CP[93] : CP[92]); + printw("Transposition table: %s", (flag.hash) ? "ON" : "OFF"); gotoXY(40, 23); - printw(CP[73]); + printw("Hit to return: "); gotoXY(10, 24); - printw(CP[110], (TCflag) ? CP[93] : CP[92], + printw("Time Control %s %d moves %d sec %d add %d depth\n", (TCflag) ? "ON" : "OFF", TimeControl.moves[black], TimeControl.clock[black] / 100, OperatorTime, MaxSearchDepth); @@ -498,24 +464,24 @@ Curses_EditBoard(void) Curses_ClearScreen(); Curses_UpdateDisplay(0, 0, 1, 0); gotoXY(TAB, 3); - printw(CP[29]); + printw(". Exit to main\n"); gotoXY(TAB, 4); - printw(CP[28]); + printw("# Clear board\n"); gotoXY(TAB, 5); - printw(CP[136]); + printw("c Change sides\n"); gotoXY(TAB, 7); - printw(CP[64]); + printw("Enter piece & location: "); a = black; do { gotoXY(TAB, 6); - printw(CP[60], ColorStr[a]); /* Editing %s */ + printw("Editing: %s", ColorStr[a]); gotoXY(TAB + 24, 7); ClearEoln(); FLUSH_SCANW("%s", s); - if (s[0] == CP[28][0]) /* # */ + if (s[0] == '#') { for (sq = 0; sq < NO_SQUARES; sq++) { @@ -528,7 +494,7 @@ Curses_EditBoard(void) UpdateCatched(); } - if (s[0] == CP[136][0]) /* c */ + if (s[0] == 'c') a = otherside[a]; if (s[1] == '*') @@ -569,7 +535,7 @@ Curses_EditBoard(void) DrawPiece(sq); } } - while (s[0] != CP[29][0]); /* . */ + while (s[0] != '.'); for (sq = 0; sq < NO_SQUARES; sq++) Mvboard[sq] = ((board[sq] != Stboard[sq]) ? 10 : 0); @@ -660,11 +626,11 @@ Curses_OutputMove(void) if (flag.illegal) { - printw(CP[225]); + printw("Illegal position."); return; } - printw(CP[84], mvstr[0]); /* My move is %s */ + printw("My move is: %5s", mvstr[0]); if (flag.beep) putchar(7); @@ -674,16 +640,16 @@ Curses_OutputMove(void) gotoXY(TAB, 18); if (root->flags & draw) - printw(CP[58]); + printw("Drawn game!"); else if (root->score == -(SCORE_LIMIT + 999)) - printw(CP[95]); + printw("Opponent mates!"); else if (root->score == SCORE_LIMIT + 998) - printw(CP[44]); + printw("Computer mates!"); #ifdef VERYBUGGY else if (root->score < -SCORE_LIMIT) - printw(CP[96], SCORE_LIMIT + 999 + root->score - 1); + printw("Opp: mate in %d!", SCORE_LIMIT + 999 + root->score - 1); else if (root->score > SCORE_LIMIT) - printw(CP[45], SCORE_LIMIT + 998 - root->score - 1); + printw("Comp: mate in %d!", SCORE_LIMIT + 998 - root->score - 1); #endif /* VERYBUGGY */ ClearEoln(); @@ -708,7 +674,7 @@ Curses_OutputMove(void) ShowNodeCnt(NodeCnt); gotoXY(TAB, 23); - printw(CP[81], t); /* Max Tree= */ + printw("Max Tree = %5d", t); ClearEoln(); } @@ -832,7 +798,7 @@ Curses_ShowPostnValues(void) score = ScorePosition(opponent); gotoXY(TAB, 5); - printw(CP[103], score, + printw("S%d m%d ps%d gt%c m%d ps%d gt%c", score, mtl[computer], pscore[computer], GameType[computer], mtl[opponent], pscore[opponent], GameType[opponent]); @@ -889,9 +855,9 @@ Curses_UpdateDisplay(short f, short t, short redraw, short isspec) printw(" "); if (flag.reverse) - printw(CP[16]); + printw(" 1 2 3 4 5 6 7 8 9"); else - printw(CP[15]); + printw(" 9 8 7 6 5 4 3 2 1"); for (sq = 0; sq < NO_SQUARES; sq++) DrawPiece(sq); @@ -954,9 +920,9 @@ Curses_UpdateDisplay(short f, short t, short redraw, short isspec) void Curses_ChangeAlphaWindow(void) { - Curses_ShowMessage(CP[114]); + Curses_ShowMessage("WAwindow = "); FLUSH_SCANW("%hd", &WAwindow); - Curses_ShowMessage(CP[34]); + Curses_ShowMessage("BAwindow = "); FLUSH_SCANW("%hd", &BAwindow); } @@ -964,9 +930,9 @@ Curses_ChangeAlphaWindow(void) void Curses_ChangeBetaWindow(void) { - Curses_ShowMessage(CP[115]); + Curses_ShowMessage("WBwindow = "); FLUSH_SCANW("%hd", &WBwindow); - Curses_ShowMessage(CP[35]); + Curses_ShowMessage("BBwindow = "); FLUSH_SCANW("%hd", &BBwindow); } @@ -979,13 +945,13 @@ Curses_GiveHint(void) if (hint) { algbr((short) (hint >> 8), (short) (hint & 0xFF), false); - strcpy(s, CP[198]); /* try */ + strcpy(s, "try "); strcat(s, mvstr[0]); Curses_ShowMessage(s); } else { - Curses_ShowMessage(CP[223]); + Curses_ShowMessage("I have no idea.\n"); } } @@ -993,7 +959,7 @@ Curses_GiveHint(void) void Curses_ChangeSearchDepth(void) { - Curses_ShowMessage(CP[150]); + Curses_ShowMessage("depth = "); FLUSH_SCANW("%hd", &MaxSearchDepth); TCflag = !(MaxSearchDepth > 0); } @@ -1002,9 +968,9 @@ Curses_ChangeSearchDepth(void) void Curses_ChangeHashDepth(void) { - Curses_ShowMessage(CP[163]); + Curses_ShowMessage("hashdepth = "); FLUSH_SCANW("%hd", &HashDepth); - Curses_ShowMessage(CP[82]); + Curses_ShowMessage("MoveLimit = "); FLUSH_SCANW("%hd", &HashMoveLimit); } @@ -1012,7 +978,7 @@ Curses_ChangeHashDepth(void) void Curses_SetContempt(void) { - Curses_ShowMessage(CP[142]); + Curses_ShowMessage("contempt = "); FLUSH_SCANW("%hd", &contempt); } @@ -1020,7 +986,7 @@ Curses_SetContempt(void) void Curses_ChangeXwindow(void) { - Curses_ShowMessage(CP[208]); + Curses_ShowMessage("xwndw= "); FLUSH_SCANW("%hd", &xwndw); } @@ -1032,27 +998,27 @@ Curses_SelectLevel(char *sx) Curses_ClearScreen(); gotoXY(32, 2); - printw(CP[41], version, patchlevel); + printw("GNU Shogi %sp%s", version, patchlevel); gotoXY(20, 4); - printw(CP[18]); + printw(" 1. 40 moves in 5 minutes"); gotoXY(20, 5); - printw(CP[19]); + printw(" 2. 40 moves in 15 minutes"); gotoXY(20, 6); - printw(CP[20]); + printw(" 3. 40 moves in 30 minutes"); gotoXY(20, 7); - printw(CP[21]); + printw(" 4. all moves in 15 minutes"); gotoXY(20, 8); - printw(CP[22]); + printw(" 5. all moves in 30 minutes"); gotoXY(20, 9); - printw(CP[23]); + printw(" 6. all moves in 15 minutes, 30 seconds fischer clock"); gotoXY(20, 10); - printw(CP[24]); + printw(" 7. all moves in 30 minutes, 30 seconds fischer clock"); gotoXY(20, 11); - printw(CP[25]); + printw(" 8. 1 move in 1 minute"); gotoXY(20, 12); - printw(CP[26]); + printw(" 9. 1 move in 15 minutes"); gotoXY(20, 13); - printw(CP[27]); + printw("10. 1 move in 30 minutes"); OperatorTime = 0; TCmoves = 40; @@ -1060,7 +1026,7 @@ Curses_SelectLevel(char *sx) TCseconds = 0; gotoXY(20, 17); - printw(CP[62]); + printw("Enter Level: "); refresh(); FLUSH_SCANW("%d", &item); @@ -1142,14 +1108,14 @@ Curses_DoDebug(void) char s[40]; ExaminePosition(opponent); - Curses_ShowMessage(CP[65]); + Curses_ShowMessage("Enter piece: "); FLUSH_SCANW("%s", s); c = neutral; - if ((s[0] == CP[9][0]) || (s[0] == CP[9][1])) /* b B */ + if ((s[0] == 'b') || (s[0] == 'B')) c = black; - if ((s[0] == CP[9][2]) || (s[0] == CP[9][3])) /* w W */ + if ((s[0] == 'w') || (s[0] == 'W')) c = white; for (p = king; p > no_piece; p--) @@ -1174,7 +1140,7 @@ Curses_DoDebug(void) score = ScorePosition(opponent); gotoXY(TAB, 5); - printw(CP[103], score, + printw("S%d m%d ps%d gt%c m%d ps%d gt%c", score, mtl[computer], pscore[computer], GameType[computer], mtl[opponent], pscore[opponent], GameType[opponent]); diff --git a/gnushogi/globals.c b/gnushogi/globals.c index dbde302..d44d720 100644 --- a/gnushogi/globals.c +++ b/gnushogi/globals.c @@ -179,3 +179,8 @@ short use_ttable = true; unsigned int ttblsize = ttblsz; struct hashentry *ttable[2] = { NULL, NULL }; #endif + +char *DRAW; +char *DRAW_REPETITION = "Repetition"; +char *DRAW_MAXMOVES = "Max Moves"; +char *DRAW_JUSTDRAW = "Drawn game!"; diff --git a/gnushogi/gnushogi.h b/gnushogi/gnushogi.h index a244428..64fb5b2 100644 --- a/gnushogi/gnushogi.h +++ b/gnushogi/gnushogi.h @@ -300,10 +300,10 @@ enum { #endif /* move symbols */ -#define pxx (CP[2]) -#define qxx (CP[1]) -#define rxx (CP[4]) -#define cxx (CP[3]) +#define pxx (" PLNSGBRPLNSBRK ") +#define qxx (" plnsgbrplnsbrk ") +#define rxx ("ihgfedcba") +#define cxx ("987654321") /***************** Table limits ********************************************/ @@ -819,7 +819,6 @@ typedef struct hashval drop_hashcode_array[2][NO_PIECES][NO_SQUARES]; extern hashcode_array *hashcode; extern drop_hashcode_array *drop_hashcode; -extern char *CP[]; #ifdef QUIETBACKGROUND extern short background; @@ -862,6 +861,10 @@ extern struct hashentry *ttable[2]; extern short rpthash[2][256]; extern char *DRAW; +extern char* DRAW_REPETITION; +extern char *DRAW_MAXMOVES; +extern char *DRAW_JUSTDRAW; + #define row(a) ((a) / NO_COLS) #define column(a) ((a) % NO_COLS) #define locn(a, b) (((a) * NO_COLS) + b) diff --git a/gnushogi/init.c b/gnushogi/init.c index 7b9663b..3eeaef3 100644 --- a/gnushogi/init.c +++ b/gnushogi/init.c @@ -101,26 +101,6 @@ const small_short sweep[NO_PIECES] = }; -#if !defined EXTLANGFILE - -char *CP[CPSIZE] = - -{ -/* 000: eng: */ "", -#ifdef LANGFILE -#include LANGFILE -#else -#include "gnushogi.lng" -#endif -}; - -#else - -char *CP[CPSIZE]; - -#endif - - /* * Determine the minimum number of moves for a piece from * square "f" to square "t". If the piece cannot reach "t", @@ -765,7 +745,7 @@ NewGame(void) if (!InitFlag) { char sx[256]; - strcpy(sx, CP[169]); + strcpy(sx, "level"); if (TCflag) SetTimeControl(); @@ -1027,231 +1007,6 @@ Initialize_data(void) } -#if defined EXTLANGFILE - -#ifdef OLDLANGFILE - -void -InitConst(char *lang) -{ - FILE *constfile; - char s[256]; - char sl[5]; - char buffer[120]; - int len, entry; - char *p, *q; - constfile = fopen(LANGFILE, "r"); - - if (!constfile) - { - ShowMessage("NO LANGFILE"); - exit(1); - } - - while (fgets(s, sizeof(s), constfile)) - { - if (s[0] == '!') - continue; - - len = strlen(s); - - for (q = &s[len]; q > &s[8]; q--) - if (*q == '}') - break; - - if (q == &s[8]) - { - ShowMessage("{ error in cinstfile"); - exit(1); - } - - *q = '\0'; - - if ((s[3] != ':') || (s[7] != ':') || (s[8] != '{')) - { - sprintf(buffer, "Langfile format error %s", s); - ShowMessage(buffer); - exit(1); - } - - s[3] = s[7] = '\0'; - - if (lang == NULL) - { - lang = sl; - strcpy(sl, &s[4]); - } - - if (strcmp(&s[4], lang)) - continue; - - entry = atoi(s); - - if ((entry < 0) || (entry >= CPSIZE)) - { - ShowMessage("Langfile number error"); - exit(1); - } - - for (q = p = &s[9]; *p; p++) - { - if (*p != '\\') - { - *q++ = *p; - } - else if (*(p + 1) == 'n') - { - *q++ = '\n'; - p++; - } - } - - *q = '\0'; - - if ((entry < 0) || (entry > 255)) - { - sprintf(buffer, "Langfile error %d\n", entry); - ShowMessage(buffer); - exit(0); - } - - CP[entry] = (char *)GLOBAL_ALLOC((unsigned) strlen(&s[9]) + 1); - - if (CP[entry] == NULL) - { - char buffer[80]; - sprintf(buffer, "CP MALLOC, entry %d", entry); - perror(buffer); - exit(0); - } - - strcpy(CP[entry], &s[9]); - } - - fclose(constfile); -} - -#else - -void -InitConst(char *lang) -{ - FILE *constfile; - char s[256]; - char sl[5]; - char buffer[120]; - int len, entry; - char *p, *q; - constfile = fopen(LANGFILE, "r"); - - if (!constfile) - { - ShowMessage("NO LANGFILE"); - exit(1); - } - - while (fgets(s, sizeof(s), constfile)) - { - if (s[0] == '!') - continue; - - len = strlen(s); - - if ((len > 3) && (s[3] == ':') || (len > 7) && (s[7] == ':')) - { - ShowMessage("old Langfile error"); - exit(1); - } - - if (len <= 15) - { - ShowMessage("length error in Langfile"); - exit(1); - } - - for (q = &s[len]; q > &s[15]; q--) - { - if (*q == '"') - break; - } - - if (q == &s[15]) - { - ShowMessage("\" error in Langfile"); - exit(1); - } - - *q = '\0'; - - if ((s[6] != ':') || (s[10] != ':') || (s[15] != '"')) - { - sprintf(buffer, "Langfile format error %s", s); - ShowMessage(buffer); - exit(1); - } - - s[6] = s[10] = '\0'; - - if (lang == NULL) - { - lang = sl; - strcpy(sl, &s[7]); - } - - if (strcmp(&s[7], lang)) - continue; - - entry = atoi(&s[3]); - - if ((entry < 0) || (entry >= CPSIZE)) - { - ShowMessage("Langfile number error"); - exit(1); - } - - for (q = p = &s[16]; *p; p++) - { - if (*p != '\\') - { - *q++ = *p; - } - else if (*(p + 1) == 'n') - { - *q++ = '\n'; - p++; - } - } - - *q = '\0'; - - if ((entry < 0) || (entry > 255)) - { - sprintf(buffer, "Langfile error %d\n", entry); - ShowMessage(buffer); - exit(0); - } - - CP[entry] = (char *)GLOBAL_ALLOC((unsigned)strlen(&s[16]) + 1); - - if (CP[entry] == NULL) - { - char buffer[80]; - sprintf(buffer, "CP MALLOC, entry %d", entry); - perror(buffer); - exit(0); - } - - strcpy(CP[entry], &s[16]); - } - - fclose(constfile); -} - -#endif - -#endif - - int InitMain(void) { @@ -1265,12 +1020,8 @@ InitMain(void) if (Initialize_data() != 0) return 1; -#if defined EXTLANGFILE - InitConst(Lang); -#endif - - strcpy(ColorStr[0], CP[118]); - strcpy(ColorStr[1], CP[119]); + strcpy(ColorStr[0], "Black"); + strcpy(ColorStr[1], "White"); XC = 0; MaxResponseTime = 0; diff --git a/gnushogi/main.c b/gnushogi/main.c index dabb8eb..4910c4c 100644 --- a/gnushogi/main.c +++ b/gnushogi/main.c @@ -212,7 +212,7 @@ main (int argc, char **argv) long j; struct fileentry n; - fputs(CP[66], stdout); + fputs("Filling transposition file, wait!\n", stdout); n.f = n.t = 0; n.flags = 0; n.depth = 0; @@ -225,7 +225,7 @@ main (int argc, char **argv) } else { - printf(CP[50], HASHFILE); + printf("Create failed for %s\n", HASHFILE); } return 0; @@ -246,7 +246,7 @@ main (int argc, char **argv) int nr[MAXDEPTH]; struct fileentry n; - fputs(CP[49], stdout); + fputs("Counting transposition file entries, wait!\n", stdout); for (i = 0; i < MAXDEPTH; i++) nr[i] = 0; @@ -272,7 +272,7 @@ main (int argc, char **argv) } } - printf(CP[109], nr[0], i); + printf("The file contains %d entries out of max %d\n", nr[0], i); for (j = 1; j < MAXDEPTH; j++) printf("%d ", nr[j]); @@ -287,7 +287,7 @@ main (int argc, char **argv) #endif /* ttblsz */ case 'v': - fprintf(stderr, CP[102], version, patchlevel); + fprintf(stderr, "gnushogi version %s patchlevel %s\n", version, patchlevel); exit(1); @@ -309,7 +309,7 @@ main (int argc, char **argv) default: - fputs(CP[113], stderr); + fputs("Usage: gnushogi [-a] [-t] [-c size] [-s savefile][-l listfile] [-x xwndw]\n", stderr); exit(1); } @@ -341,7 +341,7 @@ main (int argc, char **argv) if (argc > 9) { - printf("%s\n", CP[220]); + printf("Time Control Error\n"); exit(1); } @@ -371,7 +371,7 @@ main (int argc, char **argv) XC++; else { - printf("%s\n", CP[220]); + printf("Time Control Error\n"); exit(1); } @@ -386,7 +386,7 @@ main (int argc, char **argv) * an error message and quit. */ - printf("%s\n", CP[233]); + printf("Invalid command-line arguments:\n"); print_arglist(argc, argv); exit(1); } diff --git a/gnushogi/pat2inc.c b/gnushogi/pat2inc.c index 945871e..01e4538 100644 --- a/gnushogi/pat2inc.c +++ b/gnushogi/pat2inc.c @@ -91,10 +91,6 @@ main(int argc, char **argv) short sq, side, max_pattern_data; -#if defined(EXTLANGFILE) - char *Lang = NULL; -#endif - #ifdef TEST_DISTANCE short d; char s[80]; @@ -102,10 +98,6 @@ main(int argc, char **argv) display_type = DISPLAY_RAW; -#if defined(EXTLANGFILE) - InitConst(Lang); -#endif - Initialize_data(); for (sq = 0; sq < NO_SQUARES; sq++) diff --git a/gnushogi/rawdsp.c b/gnushogi/rawdsp.c index 8bdc1a0..4125d47 100644 --- a/gnushogi/rawdsp.c +++ b/gnushogi/rawdsp.c @@ -67,8 +67,7 @@ Raw_ShowPrompt(void) { if (!barebones && !XSHOGI) { - /* printf("\nYour move is? "); */ - fputs(CP[124], stdout); + fputs("\nYour move is? ", stdout); } } @@ -84,7 +83,7 @@ Raw_ShowDepth(char ch) { if (!barebones && !XSHOGI) { - printf(CP[53], Sdepth, ch); /* Depth = %d%c */ + printf("Depth= %d%c ", Sdepth, ch); printf("\n"); } } @@ -161,7 +160,7 @@ Raw_GetString(char* sx) void Raw_ShowNodeCnt(long NodeCnt) { - printf(CP[91], + printf("Nodes = %ld Nodes/sec = %ld\n", NodeCnt, (((et) ? ((NodeCnt * 100) / et) : 0))); } @@ -256,10 +255,10 @@ Raw_Die(int sig) { char s[80]; - Raw_ShowMessage(CP[31]); /* Abort? */ + Raw_ShowMessage("Abort? "); scanf("%s", s); - if (strcmp(s, CP[210]) == 0) /* yes */ + if (strcmp(s, "yes") == 0) Raw_ExitShogi(); } @@ -282,77 +281,40 @@ void Raw_help(void) { Raw_ClearScreen(); - /* printf("SHOGI command summary\n"); */ - printf(CP[40], version, patchlevel); + printf("GNU Shogi %sp%s command summary\n", version, patchlevel); printf("----------------------------------" "------------------------------\n"); - /* printf("7g7f move from 7g to 7f quit - * Exit Shogi\n"); */ - fputs(CP[158], stdout); - /* printf("S6h move silver to 6h beep - * turn %s\n", (flag.beep) ? "off" : "on"); */ - printf(CP[86], (flag.beep) ? CP[92] : CP[93]); - /* printf("2d2c+ move from 2d to 2c and promote\n"); */ - printf(CP[128], (flag.material) ? CP[92] : CP[93]); - /* printf("P*5e drop pawn to 5e easy - * turn %s\n", (flag.easy) ? "off" : "on"); */ - printf(CP[173], (flag.easy) ? CP[92] : CP[93]); - /* printf(" hash - * turn %s\n", (flag.hash) ? "off" : "on"); */ - printf(CP[174], (flag.hash) ? CP[92] : CP[93]); - /* printf("bd redraw board reverse - * board display\n"); */ - fputs(CP[130], stdout); - /* printf("list game to shogi.lst book - * turn %s used %d of %d\n", (Book) ? "off" : "on", bookcount); */ - printf(CP[170], (Book) ? CP[92] : CP[93], bookcount, booksize); - /* printf("undo undo last ply remove - * take back a move\n"); */ - fputs(CP[200], stdout); - /* printf("edit edit board force - * enter game moves\n"); */ - fputs(CP[153], stdout); - /* printf("switch sides with computer both - * computer match\n"); */ - fputs(CP[194], stdout); - /* printf("black computer plays black white - * computer plays white\n"); */ - fputs(CP[202], stdout); - /* printf("depth set search depth clock - * set time control\n"); */ - fputs(CP[149], stdout); - /* printf("post principle variation hint - * suggest a move\n"); */ - fputs(CP[177], stdout); - /* printf("save game to file get - * game from file\n"); */ - fputs(CP[188], stdout); + fputs ("7g7f move from 7g to 7f quit Exit Shogi\n", stdout); + printf("S6h move silver to 6h beep turn %s\n", (flag.beep) ? "OFF" : "ON"); + printf("2d2c+ move to 2c and promote material turn %s\n", (flag.material) ? "OFF" : "ON"); + printf("P*5e drop pawn to 5e easy turn %s\n", (flag.easy) ? "OFF" : "ON"); + printf("tsume toggle tsume mode hash turn %s\n", (flag.hash) ? "OFF" : "ON"); + fputs ("bd redraw board reverse board display\n", stdout); + printf("list game to shogi.lst book turn %s used %d of %d\n", (Book) ? "OFF" : "ON", bookcount, booksize); + fputs ("undo undo last ply remove take back a move\n", stdout); + fputs ("edit edit board force toggle manual move mode\n", stdout); + fputs ("switch sides with computer both computer match\n", stdout); + fputs ("black computer plays black white computer plays white\n", stdout); + fputs ("depth set search depth clock set time control\n", stdout); + fputs ("post principle variation hint suggest a move\n", stdout); + fputs ("save game to file get game from file\n", stdout); printf("xsave pos. to xshogi file xget" " pos. from xshogi file\n"); - /* printf("random randomize play new - * start new game\n"); */ - fputs(CP[181], stdout); + fputs("random randomize play new start new game\n", stdout); printf("--------------------------------" "--------------------------------\n"); - /* printf("Computer: %-12s Opponent: %s\n", */ - printf(CP[46], + printf("Computer: %-12s Opponent: %s\n", ColorStr[computer], ColorStr[opponent]); - /* printf("Depth: %-12d Response time: %d sec\n", */ - printf(CP[51], + printf("Depth: %-12d Response time: %d sec\n", MaxSearchDepth, MaxResponseTime/100); - /* printf("Random: %-12s Easy mode: %s\n", */ - printf(CP[99], - (dither) ? CP[93] : CP[92], (flag.easy) ? CP[93] : CP[92]); - /* printf("Beep: %-12s Transposition file: %s\n", */ - printf(CP[36], - (flag.beep) ? CP[93] : CP[92], (flag.hash) ? CP[93] : CP[92]); - /* printf("Tsume: %-12s Force: %s\n")*/ - printf(CP[232], - (flag.tsume) ? CP[93] : CP[92], (flag.force) ? CP[93] : CP[92]); - /* printf("Time Control %s %d moves %d seconds %d opr %d - * depth\n", (TCflag) ? "ON" : "OFF", */ - printf(CP[110], - (TCflag) ? CP[93] : CP[92], + printf("Random: %-12s Easy mode: %s\n", + (dither) ? "ON" : "OFF", (flag.easy) ? "ON" : "OFF"); + printf("Beep: %-12s Transposition file: %s\n", + (flag.beep) ? "ON" : "OFF", (flag.hash) ? "ON" : "OFF"); + printf("Tsume: %-12s Force: %s\n", + (flag.tsume) ? "ON" : "OFF", (flag.force) ? "ON" : "OFF"); + printf("Time Control %s %d moves %d sec %d add %d depth\n", + (TCflag) ? "ON" : "OFF", TimeControl.moves[black], TimeControl.clock[black] / 100, TCadd/100, MaxSearchDepth); } @@ -372,14 +334,10 @@ Raw_EditBoard(void) Book = BOOKFAIL; Raw_ClearScreen(); Raw_UpdateDisplay(0, 0, 1, 0); - /* printf(". exit to main\n"); */ - fputs(CP[29], stdout); - /* printf("# clear board\n"); */ - fputs(CP[28], stdout); - /* printf("c change sides\n"); */ - fputs(CP[136], stdout); - /* printf("enter piece & location: \n"); */ - fputs(CP[155], stdout); + fputs(". Exit to main\n", stdout); + fputs("# Clear board\n", stdout); + fputs("c Change sides\n", stdout); + fputs("enter piece & location: \n", stdout); a = black; @@ -388,7 +346,7 @@ Raw_EditBoard(void) scanf("%s", s); found = 0; - if (s[0] == CP[28][0]) /*#*/ + if (s[0] == '#') { for (sq = 0; sq < NO_SQUARES; sq++) { @@ -399,7 +357,7 @@ Raw_EditBoard(void) ClearCaptured(); } - if (s[0] == CP[136][0]) /*c*/ + if (s[0] == 'c') a = otherside[a]; if (s[1] == '*') @@ -447,7 +405,7 @@ Raw_EditBoard(void) color[sq] = neutral; } } - while (s[0] != CP[29][0]); + while (s[0] != '.'); for (sq = 0; sq < NO_SQUARES; sq++) Mvboard[sq] = ((board[sq] != Stboard[sq]) ? 10 : 0); @@ -513,8 +471,7 @@ Raw_SetupBoard(void) InitializeStats(); Raw_ClearScreen(); Raw_UpdateDisplay(0, 0, 1, 0); - /* printf("Setup successful\n"); */ - fputs(CP[106], stdout); + fputs("Setup successful\n", stdout); } @@ -523,7 +480,7 @@ Raw_SearchStartStuff(short side) { if (flag.post) { - printf(CP[123], + printf("\nMove# %d Target = %ld Clock: %ld\n", GameCnt/2 + 1, ResponseTime, TimeControl.clock[side]); } @@ -535,7 +492,7 @@ Raw_OutputMove(void) { if (flag.illegal) { - printf("%s\n", CP[225]); + printf("Illegal position.\n"); return; } @@ -576,15 +533,11 @@ Raw_OutputMove(void) t = (l + h) >> 1; } - /* printf("Nodes %ld Tree %d Eval %ld - * Rate %ld RS high %ld low %ld\n", */ - printf(CP[89], GenCnt, NodeCnt, t, EvalNodes, + printf("Gen %ld Node %ld Tree %d Eval %ld Rate %ld EC %d/%d RS hi %ld lo %ld \n", GenCnt, NodeCnt, t, EvalNodes, (et > 100) ? (NodeCnt / (et / 100)) : 0, EADD, EGET, reminus, replus); - /* printf("Hin/Hout/Coll/Fin/Fout = - * %ld/%ld/%ld/%ld/%ld\n", */ - printf(CP[71], + printf("Hin/Hout/Tcol/Coll/Fin/Fout = %ld/%ld/%ld/%ld/%ld/%ld\n", HashAdd, HashCnt, THashCol, HashCol, FHashCnt, FHashAdd); } @@ -592,8 +545,7 @@ Raw_OutputMove(void) if (!XSHOGI) { - /* printf("My move is: %s\n", mvstr[0]); */ - printf(CP[83], mvstr[0]); + printf("My move is: %5s\n", mvstr[0]); if (flag.beep) printf("%c", 7); @@ -602,8 +554,7 @@ Raw_OutputMove(void) summary: if (root->flags & draw) { - /* printf("Drawn game!\n"); */ - fputs(CP[57], stdout); + fputs("Drawn game!\n", stdout); } else if (root->score == -(SCORE_LIMIT + 999)) { @@ -647,8 +598,7 @@ Raw_UpdateDisplay(short f, short t, short redraw, short isspec) c = (short)((TimeControl.clock[black] % 6000) / 100); l = (short)(TimeControl.clock[white] / 6000); m = (short)((TimeControl.clock[white] % 6000) / 100); - /* printf("Black %d:%02d White %d:%02d\n", r, c, l, m); */ - printf(CP[116], r, c, l, m); + printf("Black %d:%02d White %d:%02d\n", r, c, l, m); printf("\n"); for (r = (NO_ROWS - 1); r >= 0; r--) @@ -720,10 +670,10 @@ Raw_GiveHint(void) if (hint) { algbr((short) (hint >> 8), (short) (hint & 0xFF), false); - printf(CP[72], mvstr[0]); /*hint*/ + printf("Hint: %s\n", mvstr[0]); } else - fputs(CP[223], stdout); + fputs("I have no idea.\n", stdout); } @@ -733,10 +683,10 @@ Raw_SelectLevel(char *sx) char T[NO_SQUARES + 1], *p, *q; - if ((p = strstr(sx, CP[169])) != NULL) - p += strlen(CP[169]); - else if ((p = strstr(sx, CP[217])) != NULL) - p += strlen(CP[217]); + if ((p = strstr(sx, "level")) != NULL) + p += strlen("level"); + else if ((p = strstr(sx, "clock")) != NULL) + p += strlen("clock"); strcat(sx, "XX"); q = T; @@ -749,7 +699,7 @@ Raw_SelectLevel(char *sx) /* line empty ask for input */ if (!T[0]) { - fputs(CP[61], stdout); + fputs("Enter #moves #minutes: ", stdout); fgets(T, NO_SQUARES + 1, stdin); strcat(T, "XX"); } @@ -780,7 +730,7 @@ Raw_SelectLevel(char *sx) TCseconds = 0; #ifdef OPERATORTIME - fputs(CP[94], stdout); + fputs("Operator time (hundredths) = ", stdout); scanf("%hd", &OperatorTime); #endif @@ -876,14 +826,14 @@ Raw_DoDebug(void) char s[40]; ExaminePosition(opponent); - Raw_ShowMessage(CP[65]); + Raw_ShowMessage("Enter piece: "); scanf("%s", s); c = neutral; - if ((s[0] == CP[9][0]) || (s[0] == CP[9][1])) /* w W */ + if ((s[0] == 'b') || (s[0] == 'B')) c = black; - if ((s[0] == CP[9][2]) || (s[0] == CP[9][3])) /* b B */ + if ((s[0] == 'w') || (s[0] == 'W')) c = white; for (p = king; p > no_piece; p--) @@ -941,7 +891,7 @@ Raw_DoDebug(void) } printf("stage = %d\n", stage); - printf(CP[103], score, + printf("S%d m%d ps%d gt%c m%d ps%d gt%c", score, mtl[computer], pscore[computer], GameType[computer], mtl[opponent], pscore[opponent], GameType[opponent]); } @@ -984,7 +934,7 @@ Raw_ShowPostnValues(void) } score = ScorePosition(opponent); - printf(CP[103], score, + printf("S%d m%d ps%d gt%c m%d ps%d gt%c", score, mtl[computer], pscore[computer], GameType[computer], mtl[opponent], pscore[opponent], GameType[opponent]); printf("\nhung black %d hung white %d\n", hung[black], hung[white]); diff --git a/gnushogi/search.c b/gnushogi/search.c index 35c968a..060d958 100644 --- a/gnushogi/search.c +++ b/gnushogi/search.c @@ -407,7 +407,7 @@ SelectMove(short side, SelectMove_mode iop) if (rpt >= 3) { root->flags |= draw; - DRAW = CP[101]; /* Repetition */ + DRAW = DRAW_REPETITION; } else { @@ -419,7 +419,7 @@ SelectMove(short side, SelectMove_mode iop) if (GameCnt == MAXMOVES) { root->flags |= draw; - DRAW = CP[80]; /* Max Moves */ + DRAW = DRAW_MAXMOVES; } } @@ -911,7 +911,7 @@ search(short side, && !ChkFlag[ply]))) { node->flags |= (draw | exact); - DRAW = CP[58]; /* Draw */ + DRAW = DRAW_JUSTDRAW; node->score = ((side == computer) ? contempt : -contempt); } diff --git a/gnushogi/util.c b/gnushogi/util.c index b4a7998..af57cae 100644 --- a/gnushogi/util.c +++ b/gnushogi/util.c @@ -175,7 +175,7 @@ ProbeTTable (short side, if (!barebones) { - ShowMessage(CP[199]); /* ttable collision detected */ + ShowMessage("ttable collision detected"); ShowBD(ptbl->bd); printf("hashkey = 0x%x, hashbd = 0x%x\n", hashkey, hashbd); diff --git a/misc/gnushogi.lng b/misc/gnushogi.lng deleted file mode 100644 index ad09596..0000000 --- a/misc/gnushogi.lng +++ /dev/null @@ -1,234 +0,0 @@ -/* 001: eng: */ " plnsgbrplnsbrk ", -/* 002: eng: */ " PLNSGBRPLNSBRK ", -/* 003: eng: */ "987654321", -/* 004: eng: */ "ihgfedcba", -/* 005: eng: */ "moves", -/* 006: eng: */ "", -/* 007: eng: */ "", -/* 008: eng: */ "", -/* 009: eng: */ "bBwW", -/* 010: eng: */ " score depth nodes time ", -/* 011: eng: */ " score depth nodes time\n", -/* 012: eng: */ " ", -/* 013: eng: */ " ", -/* 014: eng: */ " %s\n", -/* 015: eng: */ " 9 8 7 6 5 4 3 2 1", -/* 016: eng: */ " 1 2 3 4 5 6 7 8 9", -/* 017: eng: */ " -", -/* 018: eng: */ " 1. 40 moves in 5 minutes", -/* 019: eng: */ " 2. 40 moves in 15 minutes", -/* 020: eng: */ " 3. 40 moves in 30 minutes", -/* 021: eng: */ " 4. all moves in 15 minutes", -/* 022: eng: */ " 5. all moves in 30 minutes", -/* 023: eng: */ " 6. all moves in 15 minutes, 30 seconds fischer clock", -/* 024: eng: */ " 7. all moves in 30 minutes, 30 seconds fischer clock", -/* 025: eng: */ " 8. 1 move in 1 minute", -/* 026: eng: */ " 9. 1 move in 15 minutes", -/* 027: eng: */ "10. 1 move in 30 minutes", -/* 028: eng: */ "# Clear board\n", -/* 029: eng: */ ". Exit to main\n", -/* 030: eng: */ "gnushogi.tbk", -/* 031: eng: */ "Abort? ", -/* 032: eng: */ "Ambiguous Move %s!", -/* 033: eng: */ "Awindow", -/* 034: eng: */ "BAwindow = ", -/* 035: eng: */ "BBwindow = ", -/* 036: eng: */ "Beep: %-12s Transposition file: %s\n", -/* 037: eng: */ "White %s Black %s %d %s\n", -/* 038: eng: */ "Bwindow: ", -/* 039: eng: */ "Bwindow", -/* 040: eng: */ "GNU Shogi %sp%s command summary\n", -/* 041: eng: */ "GNU Shogi %sp%s", -/* 042: eng: */ "Castled Black %s White %s\n", -/* 043: eng: */ "", -/* 044: eng: */ "Computer mates!", -/* 045: eng: */ "Comp: mate in %d!", -/* 046: eng: */ "Computer: %-12s Opponent: %s\n", -/* 047: eng: */ "Computer: %s", -/* 048: eng: */ "Could not open file", -/* 049: eng: */ "Counting transposition file entries, wait!\n", -/* 050: eng: */ "Create failed for %s\n", -/* 051: eng: */ "Depth: %-12d Response time: %d sec\n", -/* 052: eng: */ "Depth: %d", -/* 053: eng: */ "Depth= %d%c ", -/* 054: eng: */ "Draw %s\n", -/* 055: eng: */ "DrawPiece: color[sq] err", -/* 056: eng: */ "Drawn game! %s", -/* 057: eng: */ "Drawn game!\n", -/* 058: eng: */ "Drawn game!", -/* 059: eng: */ "Easy mode: %s", -/* 060: eng: */ "Editing: %s", -/* 061: eng: */ "Enter #moves #minutes: ", -/* 062: eng: */ "Enter Level: ", -/* 063: eng: */ "Enter file name: ", -/* 064: eng: */ "Enter piece & location: ", -/* 065: eng: */ "Enter piece: ", -/* 066: eng: */ "Filling transposition file, wait!\n", -/* 067: eng: */ "GNU Shogi display (MS-DOS, Mar 90)", -/* 068: eng: */ "GNU Shogi display (Nov 89)", -/* 069: eng: */ "GNU Shogi %s (pl %s)", -/* 070: eng: */ "Game saved", -/* 071: eng: */ "Hin/Hout/Tcol/Coll/Fin/Fout = %ld/%ld/%ld/%ld/%ld/%ld\n", -/* 072: eng: */ "Hint: %s\n", -/* 073: eng: */ "Hit to return: ", -/* 074: eng: */ "Human ", -/* 075: eng: */ "Illegal move (no match) %s\n", -/* 076: eng: */ "Illegal move (no match) %s", -/* 077: eng: */ "Illegal move (in check) %s", -/* 078: eng: */ "Illegal move.\n", -/* 079: eng: */ "Level: %ld", -/* 080: eng: */ "Max Moves", -/* 081: eng: */ "Max Tree = %5d", -/* 082: eng: */ "MoveLimit = ", -/* 083: eng: */ "My move is: %5s\n", -/* 084: eng: */ "My move is: %5s", -/* 085: eng: */ "Testing Eval Speed", -/* 086: eng: */ "S6h move silver to 6h beep turn %s\n", -/* 087: eng: */ "No moves", -/* 088: eng: */ "No pieces", -/* 089: eng: */ "Gen %ld Node %ld Tree %d Eval %ld Rate %ld EC %d/%d RS hi %ld lo %ld \n", -/* 090: eng: */ "Nodes = %8ld, Nodes/Sec = %5ld", -/* 091: eng: */ "Nodes = %ld Nodes/sec = %ld\n", -/* 092: eng: */ "OFF", -/* 093: eng: */ "ON", -/* 094: eng: */ "Operator time (hundredths) = ", -/* 095: eng: */ "Opponent mates!", -/* 096: eng: */ "Opp: mate in %d!", -/* 097: eng: */ "Opponent: %s", -/* 098: eng: */ "Playing without hashfile", -/* 099: eng: */ "Random: %-12s Easy mode: %s\n", -/* 100: eng: */ "Random: %s", -/* 101: eng: */ "Repetition", -/* 102: eng: */ "gnushogi version %s patchlevel %s\n", -/* 103: eng: */ "S%d m%d ps%d gt%c m%d ps%d gt%c", -/* 104: eng: */ "Score= %d", -/* 105: eng: */ "Score", -/* 106: eng: */ "Setup successful\n", -/* 107: eng: */ "Testing CaptureList Speed", -/* 108: eng: */ "Testing MoveList Speed", -/* 109: eng: */ "The file contains %d entries out of max %d\n", -/* 110: eng: */ "Time Control %s %d moves %d sec %d add %d depth\n", -/* 111: eng: */ "TimeControl %d Operator Time %d\n", -/* 112: eng: */ "Transposition table: %s", -/* 113: eng: */ "Usage: gnushogi [-a] [-t] [-c size] [-s savefile][-l listfile] [-x xwndw]\n", -/* 114: eng: */ "WAwindow = ", -/* 115: eng: */ "WBwindow = ", -/* 116: eng: */ "Black %d:%02d White %d:%02d\n", -/* 117: eng: */ "Black Clock %ld Moves %d\nWhite Clock %ld Moves %d\n", -/* 118: eng: */ "Black", -/* 119: eng: */ "White", -/* 120: eng: */ "Wwindow: ", -/* 121: eng: */ "Your move is? ", -/* 122: eng: */ "\n ", -/* 123: eng: */ "\nMove# %d Target = %ld Clock: %ld\n", -/* 124: eng: */ "\nYour move is? ", -/* 125: eng: */ "\n\n", -/* 126: eng: */ " move score depth nodes time flags capture\n", -/* 127: eng: */ "\n", -/* 128: eng: */ "2d2c+ move to 2c and promote material turn %s\n", -/* 129: eng: */ "alg", -/* 130: eng: */ "bd redraw board reverse board display\n", -/* 131: eng: */ "bd", -/* 132: eng: */ "beep", -/* 133: eng: */ "white", -/* 134: eng: */ "book", -/* 135: eng: */ "both", -/* 136: eng: */ "c Change sides\n", -/* 137: eng: */ "shogi.000", -/* 138: eng: */ "shogi.lst.%d", -/* 139: eng: */ "computer mates!\n", -/* 140: eng: */ "computer will soon mate!\n", -/* 141: eng: */ "computer", -/* 142: eng: */ "contempt = ", -/* 143: eng: */ "contempt", -/* 144: eng: */ "coords show coords rv reverse video\n", -/* 145: eng: */ "coords", -/* 146: eng: */ "debuglevel = ", -/* 147: eng: */ "debuglevel", -/* 148: eng: */ "debug", -/* 149: eng: */ "depth set search depth clock set time control\n", -/* 150: eng: */ "depth = ", -/* 151: eng: */ "depth", -/* 152: eng: */ "easy", -/* 153: eng: */ "edit edit board force toggle manual move mode\n", -/* 154: eng: */ "edit", -/* 155: eng: */ "enter piece & location: \n", -/* 156: eng: */ "first", -/* 157: eng: */ "force", -/* 158: eng: */ "7g7f move from 7g to 7f quit Exit Shogi\n", -/* 159: eng: */ "game file = ", -/* 160: eng: */ "get", -/* 161: eng: */ "gnushogi %sp%s game\n", -/* 162: eng: */ "go", -/* 163: eng: */ "hashdepth = ", -/* 164: eng: */ "hashdepth", -/* 165: eng: */ "hash", -/* 166: eng: */ "help", -/* 167: eng: */ "hint suggest a move post turn %s principle variation\n", -/* 168: eng: */ "hint", -/* 169: eng: */ "level", -/* 170: eng: */ "list game to shogi.lst book turn %s used %d of %d\n", -/* 171: eng: */ "list", -/* 172: eng: */ "new", -/* 173: eng: */ "P*5e drop pawn to 5e easy turn %s\n", -/* 174: eng: */ "tsume toggle tsume mode hash turn %s\n", -/* 175: eng: */ "opponent mates!\n", -/* 176: eng: */ "opponent will soon mate!\n", -/* 177: eng: */ "post principle variation hint suggest a move\n", -/* 178: eng: */ "post", -/* 179: eng: */ "p", -/* 180: eng: */ "quit", -/* 181: eng: */ "random randomize play new start new game\n", -/* 182: eng: */ "random", -/* 183: eng: */ "rcptr", -/* 184: eng: */ "remove", -/* 185: eng: */ "reverse", -/* 186: eng: */ "rv", -/* 187: eng: */ "r", -/* 188: eng: */ "save game to file get game from file\n", -/* 189: eng: */ "save", -/* 190: eng: */ "setup", -/* 191: eng: */ "set", -/* 192: eng: */ "shade toggle shade white stars toggle stars\n", -/* 193: eng: */ "stars", -/* 194: eng: */ "switch sides with computer both computer match\n", -/* 195: eng: */ "switch", -/* 196: eng: */ "test", -/* 197: eng: */ "time", -/* 198: eng: */ "try ", -/* 199: eng: */ "ttable collision detected", -/* 200: eng: */ "undo undo last ply remove take back a move\n", -/* 201: eng: */ "undo", -/* 202: eng: */ "black computer plays black white computer plays white\n", -/* 203: eng: */ "black", -/* 204: eng: */ "w", -/* 205: eng: */ "xshogi.position.read", -/* 206: eng: */ "xshogi", -/* 207: eng: */ "xget", -/* 208: eng: */ "xwndw= ", -/* 209: eng: */ "xwndw", -/* 210: eng: */ "yes", -/* 211: eng: */ "Illegal move in book %d %s %s", -/* 212: eng: */ "Can't find book.", -/* 213: eng: */ "Book used %d(%d).", -/* 214: eng: */ "true", -/* 215: eng: */ "false", -/* 216: eng: */ "exit", -/* 217: eng: */ "clock", -/* 218: eng: */ "Computer", -/* 219: eng: */ "Open failure for file: %s", -/* 220: eng: */ "Time Control Error", -/* 221: eng: */ "material", -/* 222: eng: */ "time %d %d\n", -/* 223: eng: */ "I have no idea.\n", -/* 224: eng: */ "Not Enough Material.", -/* 225: eng: */ "Illegal position.", -/* 226: eng: */ "beep", -/* 227: eng: */ "gamein", -/* 228: eng: */ "otime", -/* 229: eng: */ "hard", -/* 230: eng: */ "tsume", -/* 231: eng: */ "Tsume: %s", -/* 232: eng: */ "Tsume: %-12s Force: %s\n", -/* 233: eng: */ "Invalid command-line arguments:", -/* 234: eng: */ "", -- 1.7.0.4