X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=blobdiff_plain;f=lasker-2.2.3%2Fsrc%2Fcommand.c;fp=lasker-2.2.3%2Fsrc%2Fcommand.c;h=2286cd6f23c653c9738352f0c38dc4f30eeb3d8f;hp=7d440c52b5680ab15219680fc1292f7b4e410531;hb=ba3ffb7d49d122559afbc591d56dc14074b841e6;hpb=7d037802a9d8567fd720a8b14b2345e5a3dbe947 diff --git a/lasker-2.2.3/src/command.c b/lasker-2.2.3/src/command.c index 7d440c5..2286cd6 100644 --- a/lasker-2.2.3/src/command.c +++ b/lasker-2.2.3/src/command.c @@ -695,12 +695,17 @@ static int process_password(int p, char *password) return 0; } +FILE *comlog = NULL; + static int process_prompt(int p, char *command) { struct player *pp = &player_globals.parray[p]; int retval; char *cmd = ""; + if(comlog == NULL) comlog = fopen("command.log", "a"); + if(comlog) fprintf(comlog, "p%d: '%s'\n", p, command), fflush(comlog); + command = eattailwhite(eatwhite(command)); if (!*command) { send_prompt(p);