Fix unintended renaming

pull/1/head
Darrell Anderson 11 years ago
parent 3a2b903b2d
commit a4a1e079e3

@ -82,17 +82,17 @@ int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r)
{ {
while( ( i==PTQ_FIRST_ENTRY ? while( ( i==PQ_FIRST_ENTRY ?
(PQUEUE_MaxRating) /* return biggest possible rating if first element */ (PQUEUE_MaxRating) /* return biggest possible rating if first element */
: :
(PGetRating(Elements[ PTQ_PARENT_INDEX(i) ]) ) (PGetRating(Elements[ PQ_PARENT_INDEX(i) ]) )
) )
< r < r
) )
{ {
Elements[ i ] = Elements[ PTQ_PARENT_INDEX(i) ]; Elements[ i ] = Elements[ PQ_PARENT_INDEX(i) ];
i = PTQ_PARENT_INDEX(i); i = PQ_PARENT_INDEX(i);
} }
} }
@ -132,7 +132,7 @@ void *freecell_solver_PQueuePop( PQUEUE *pq)
return NULL; return NULL;
} }
pMaxElement = Elements[PTQ_FIRST_ENTRY]; pMaxElement = Elements[PQ_FIRST_ENTRY];
/* get pointer to last element in tree */ /* get pointer to last element in tree */
pLastElement = Elements[ CurrentSize-- ]; pLastElement = Elements[ CurrentSize-- ];
@ -143,7 +143,7 @@ void *freecell_solver_PQueuePop( PQUEUE *pq)
/* UNTESTED */ /* UNTESTED */
for( i=PTQ_FIRST_ENTRY; (child = PTQ_LEFT_CHILD_INDEX(i)) <= CurrentSize; i=child ) for( i=PQ_FIRST_ENTRY; (child = PQ_LEFT_CHILD_INDEX(i)) <= CurrentSize; i=child )
{ {
/* set child to the smaller of the two children... */ /* set child to the smaller of the two children... */

@ -44,12 +44,12 @@ typedef struct _PQUEUE
a "sentinel" value at 0 these macros are useful in making the code clearer */ a "sentinel" value at 0 these macros are useful in making the code clearer */
/* the parent is always given by index/2 */ /* the parent is always given by index/2 */
#define PTQ_PARENT_INDEX(i) ((i)>>1) #define PQ_PARENT_INDEX(i) ((i)>>1)
#define PTQ_FIRST_ENTRY (1) #define PQ_FIRST_ENTRY (1)
/* left and right children are index * 2 and (index * 2) +1 respectively */ /* left and right children are index * 2 and (index * 2) +1 respectively */
#define PTQ_LEFT_CHILD_INDEX(i) ((i)<<1) #define PQ_LEFT_CHILD_INDEX(i) ((i)<<1)
#define PTQ_RIGHT_CHILD_INDEX(i) (((i)<<1)+1) #define PQ_RIGHT_CHILD_INDEX(i) (((i)<<1)+1)
void freecell_solver_PQueueInitialise( void freecell_solver_PQueueInitialise(
PQUEUE *pq, PQUEUE *pq,

Loading…
Cancel
Save