add code to keep log of user input
[capablanca.git] / lasker-2.2.3 / src / seekproc.c
index 43ffe66..94960c4 100644 (file)
@@ -207,6 +207,8 @@ int com_play(int p, param_list param)
 return 0;
 }
 
+extern FILE *comlog;
+
 int com_sought(int p, param_list param)
 {
        int             i;
@@ -214,6 +216,7 @@ int com_sought(int p, param_list param)
        for (i = 0; i < seek_globals.max_ads; i++) {
                if (seek_globals.ads[i].status == SEEKCLOSED) {
                        char *msgtxt = form_ad(&seek_globals.ads[i], i);
+if(comlog) fprintf(comlog, "msgtext = %s\n", msgtxt), fflush(comlog);
                        pprintf(p, "%s", msgtxt);
                        free(msgtxt);
                }
@@ -296,6 +299,7 @@ static char *form_ad(struct pending * ad, int i)
                 rating = player_globals.parray[ad->whofrom].b_stats.rating;
        }
 
+if(comlog) fprintf(comlog, "seek %d type = %d\n", i, type), fflush(comlog);
        if(ad->category[0]) { // [HGM] print category with seek ad
                sprintf(buf, " %s", ad->category);
                if(ad->board_type[0] && strcmp(ad->board_type, "0"))