1. Shlomi Fish
  2. patsolve-shlomif

Commits

Shlomi Fish  committed f319d5c

Convert "Interactive" to a slot.

  • Participants
  • Parent commits 0695b05
  • Branches make-code-suitable-for-fc-solve

Comments (0)

Files changed (3)

File patsolve/pat.c

View file
 			}
 			Status = WIN;
 
-			if (Interactive) {
+			if (soft_thread->Interactive) {
 				exit(0);
 			}
 

File patsolve/pat.h

View file
 /* Command line flags. */
 
 extern int Cutoff;
-extern int Interactive;
 extern int Noexit;
 extern int Numsol;
 extern int Stack;
                        from the pile */
     BUCKETLIST *Pilebucket[NPILES]; 
     int Treebytes;
+    int Interactive; /* interactive mode. */
 };
 
 typedef struct fc_solve_soft_thread_struct fc_solve_soft_thread_t;

File patsolve/patmain.c

View file
   "-s implies -aw10 -t4, -f implies -aw8 -t4\n";
 #define USAGE() fc_solve_msg(Usage, Progname)
 
-int Interactive = TRUE; /* interactive mode. */
 int Noexit = FALSE;     /* -E means don't exit */
 int Numsol;             /* number of solutions found in -E mode */
 int Stack = FALSE;      /* -S means stack, not queue, the moves to be done */
 
     soft_thread = &soft_thread_struct;
 
+    soft_thread->Interactive = TRUE;
     soft_thread->Mem_remain = (50 * 1000 * 1000);
     soft_thread->Freepos = NULL;
     /* Default variation. */
 
 		/* Range mode.  Play lots of consecutive games. */
 
-		Interactive = FALSE;
+		soft_thread->Interactive = FALSE;
 		for (gn = Sgame; gn < Egame; gn++) {
 			printf("#%ld\n", (long)gn);
 			msdeal(soft_thread, gn);
 		printf("Mem_remain = %ld\n", Mem_remain);
 #endif
 	}
-	if (!Interactive) {
+	if (!soft_thread->Interactive) {
 		free_buckets(soft_thread);
 		free_clusters(soft_thread);
 		free_blocks(soft_thread);