From d5950fc45c863579313dd37abff008838c10c5ce Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Wed, 6 Nov 2013 22:18:36 +0100 Subject: [PATCH] Whitespace and parenthesis cleanup. --- gnushogi/commondsp.c | 21 --------------------- gnushogi/main.c | 24 +----------------------- 2 files changed, 1 insertions(+), 44 deletions(-) diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index a5a3b42..36a5f8d 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -124,8 +124,6 @@ movealgbr(short m, char *s) #endif /* BOOKTEST */ - - /* * Generate move strings in different formats. * @@ -217,7 +215,6 @@ algbr(short f, short t, short flag) } - /* * Compare the string 's' to the list of legal moves available for the * opponent. If a match is found, make the move on the board. @@ -352,7 +349,6 @@ VerifyMove(char *s, VerifyMove_mode iop, unsigned short *mv) } - static int parser(char *f, int side, short *fpiece) { @@ -402,7 +398,6 @@ skip() } - void skipb() { @@ -652,7 +647,6 @@ GetGame(void) } - void SaveGame(void) { @@ -800,7 +794,6 @@ SaveGame(void) } - /* * GetXGame, SaveXGame and BookGame used to only be defined if * xshogi wasn't defined -- wonder why? @@ -1107,7 +1100,6 @@ BookSave(void) } - void ListGame(void) { @@ -1235,7 +1227,6 @@ ListGame(void) } - void FlagMove(char c) { @@ -1258,8 +1249,6 @@ FlagMove(char c) } - - /* * Undo the most recent half-move. */ @@ -1321,7 +1310,6 @@ Undo(void) } - void FlagString(unsigned short flags, char *s) { @@ -1374,7 +1362,6 @@ FlagString(unsigned short flags, char *s) } - void TestSpeed(void(*f)(short side, short ply, short in_check, short blockable), @@ -1429,7 +1416,6 @@ TestSpeed(void(*f)(short side, short ply, } - void TestPSpeed(short(*f) (short side), unsigned j) { @@ -1467,7 +1453,6 @@ TestPSpeed(short(*f) (short side), unsigned j) } - void SetOppTime(char *s) { @@ -1502,7 +1487,6 @@ SetOppTime(char *s) } - void SetMachineTime(char *s) { @@ -1537,9 +1521,6 @@ SetMachineTime(char *s) } - - - /* FIXME! This is truly the function from hell! */ /* @@ -2061,8 +2042,6 @@ InputCommand(char *command) } - - void SetTimeControl(void) { diff --git a/gnushogi/main.c b/gnushogi/main.c index b14016b..bcc3338 100644 --- a/gnushogi/main.c +++ b/gnushogi/main.c @@ -80,17 +80,14 @@ main (int argc, char **argv) binbookfile = NULL; #endif } - break; #ifdef BINBOOK case 'B': argc--; argv++; - if (argc > 0) binbookfile = argv[0]; - break; #endif @@ -107,17 +104,14 @@ main (int argc, char **argv) hash = ((argv[0][0] == '-') ? false : true); break; - case 'l': argc--; argv++; if (argc > 0) Lang = argv[0]; - break; - case 'L': argc--; argv++; @@ -126,34 +120,28 @@ main (int argc, char **argv) strcpy(listfile, argv[0]); break; - case 's': argc--; argv++; if (argc > 0) strcpy(savefile, argv[0]); - break; - case 'P': argc--; argv++; if (argc > 0) bookmaxply = atoi(argv[0]); - break; - case 'R': /* Raw text interface. */ display_type = DISPLAY_RAW; dsp = &raw_display; break; - case 'S': argc--; argv++; @@ -169,23 +157,18 @@ main (int argc, char **argv) if (argc > 0) rehash = atoi(argv[0]); - if (rehash > MAXrehash) rehash = MAXrehash; - break; - case 'T': argc--; argv++; if (argc > 0) ttblsize = atoi(argv[0]); - - if ((ttblsize <= MINTTABLE)) + if (ttblsize <= MINTTABLE) ttblsize = (MINTTABLE) + 1; - break; #ifdef HASHFILE @@ -229,7 +212,6 @@ main (int argc, char **argv) return 0; - case 't': /* Create or test persistent transposition table. */ hashfile = fopen(HASHFILE, RWA_ACC); @@ -281,7 +263,6 @@ main (int argc, char **argv) return 0; - #endif /* HASHFILE */ #endif /* ttblsz */ @@ -296,17 +277,14 @@ main (int argc, char **argv) dsp = &raw_display; break; - case 'x': argc--; argv++; if (argc > 0) xwin = argv[0]; - break; - default: fputs("Usage: gnushogi [-a] [-t] [-c size] [-s savefile][-l listfile] [-x xwndw]\n", stderr); exit(1); -- 1.7.0.4