1. Shlomi Fish
  2. patsolve-shlomif

Commits

Shlomi Fish  committed 3b9c705

Convert Posbytes to a struct field.

  • Participants
  • Parent commits 8b975fe
  • Branches make-code-suitable-for-fc-solve

Comments (0)

Files changed (2)

File patsolve/pat.c

View file
 /* Test the current position to see if it's new (or better).  If it is, save
 it, along with the pointer to its parent and the move we used to get here. */
 
-int Posbytes;
-
 POSITION *new_position(fc_solve_soft_thread_t * soft_thread, POSITION *parent, MOVE *m)
 {
 	int i, t, depth, cluster;
 		p = (u_char *)soft_thread->Freepos;
 		soft_thread->Freepos = soft_thread->Freepos->queue;
 	} else {
-		p = new_from_block(soft_thread, Posbytes);
+		p = new_from_block(soft_thread, soft_thread->Posbytes);
 		if (p == NULL) {
 			return NULL;
 		}
 		Treebytes |= ALIGN_BITS;
 		Treebytes++;
 	}
-	Posbytes = sizeof(POSITION) + soft_thread->Ntpiles;
-	if (Posbytes & ALIGN_BITS) {
-		Posbytes |= ALIGN_BITS;
-		Posbytes++;
+	soft_thread->Posbytes = sizeof(POSITION) + soft_thread->Ntpiles;
+	if (soft_thread->Posbytes & ALIGN_BITS) {
+		soft_thread->Posbytes |= ALIGN_BITS;
+	    soft_thread->Posbytes++;
 	}
 }
 

File patsolve/pat.h

View file
 
     int Xparam[NXPARAM];
     double Yparam[NYPARAM];
+    int Posbytes;
 };
 
 typedef struct fc_solve_soft_thread_struct fc_solve_soft_thread_t;