X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=blobdiff_plain;f=lasker-2.2.3%2Fsrc%2Fmatchproc.c;h=70c12f4f90f968471c78636c6398577ec392c782;hp=88c03666c828a8ceb2a1307a95a10d7f110f6b9e;hb=285658a5ecdf03e2bbb39f8cf598bb9ce884d748;hpb=ec7b6bb32ba9632cda17b308808ce9ba1e27c090 diff --git a/lasker-2.2.3/src/matchproc.c b/lasker-2.2.3/src/matchproc.c index 88c0366..70c12f4 100644 --- a/lasker-2.2.3/src/matchproc.c +++ b/lasker-2.2.3/src/matchproc.c @@ -159,7 +159,7 @@ static void output_match_messages(int wp,int bp,int g, char* mess) //bstr[game_globals.garray[g].type], game_globals.garray[g].variant, game_globals.garray[g].wInitTime/600, - game_globals.garray[g].wIncrement); + game_globals.garray[g].wIncrement/10); pprintf(wp, "%s", outStr); pprintf(bp, "%s", outStr); free(outStr); @@ -442,7 +442,7 @@ int accept_match(struct pending *pend, int p, int p1) } /* board and category are initially empty strings */ -static int parse_match_string(int p, int* wt,int* bt,int* winc,int* binc, +int parse_match_string(int p, int* wt,int* bt,int* winc,int* binc, int* white,int* rated,char* category, char* board, char* mstring) { @@ -543,6 +543,9 @@ static int parse_match_string(int p, int* wt,int* bt,int* winc,int* binc, if(!strcmp("gr", category)) { strcpy(category, "great"); } else + if(!strcmp("sp", category)) { + strcpy(category, "spartan"); + } else if(!strcmp("xq", category)) { strcpy(category, "xiangqi"); } @@ -690,12 +693,17 @@ int com_match(int p, param_list param) g = game_new(); adjourned = (game_read(g, p, p1) >= 0) || (game_read(g, p1, p) >= 0); if (adjourned) { + char *q; type = game_globals.garray[g].type; wt = game_globals.garray[g].wInitTime / 600; bt = game_globals.garray[g].bInitTime / 600; winc = game_globals.garray[g].wIncrement / 10; binc = game_globals.garray[g].bIncrement / 10; rated = game_globals.garray[g].rated; + strcpy(category, game_globals.garray[g].variant); + if(q = strchr(category, '/')) { + *q = 0; strcpy(board, q+1); + } else strcpy(board, "0"); } game_remove(g);