diff options
author | Darrell Anderson <[email protected]> | 2012-04-13 00:18:24 -0500 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2012-06-04 01:10:55 +0200 |
commit | d51ad47d3a47ca4c775ac3812361abdb4d0a908b (patch) | |
tree | 542e21cd7a21f370411ff096e38e170c56f4c12e /kpat | |
parent | abbad031ecb7c1263b0981c68b058554ab479f48 (diff) | |
download | tdegames-d51ad47d3a47ca4c775ac3812361abdb4d0a908b.tar.gz tdegames-d51ad47d3a47ca4c775ac3812361abdb4d0a908b.zip |
Fix inadvertent "TQ" changes.
(cherry picked from commit 1f0b774c59ea917f069fc5be95124afd89a8dd4c)
Diffstat (limited to 'kpat')
-rw-r--r-- | kpat/freecell-solver/fcs.h | 2 | ||||
-rw-r--r-- | kpat/freecell-solver/intrface.c | 2 | ||||
-rw-r--r-- | kpat/freecell-solver/main.c | 4 | ||||
-rw-r--r-- | kpat/freecell-solver/pqueue.c | 10 | ||||
-rw-r--r-- | kpat/freecell-solver/pqueue.h | 20 | ||||
-rw-r--r-- | kpat/freecell-solver/scans.c | 2 |
6 files changed, 20 insertions, 20 deletions
diff --git a/kpat/freecell-solver/fcs.h b/kpat/freecell-solver/fcs.h index 63db42a6..47b4b89d 100644 --- a/kpat/freecell-solver/fcs.h +++ b/kpat/freecell-solver/fcs.h @@ -582,7 +582,7 @@ struct freecell_solver_soft_thread_struct /* * The priority queue of the A* scan */ - PTQUEUE * a_star_pqueue; + PQUEUE * a_star_pqueue; double a_star_initial_cards_under_sequences; /* diff --git a/kpat/freecell-solver/intrface.c b/kpat/freecell-solver/intrface.c index 9fb09840..6551652b 100644 --- a/kpat/freecell-solver/intrface.c +++ b/kpat/freecell-solver/intrface.c @@ -214,7 +214,7 @@ static freecell_solver_soft_thread_t * alloc_soft_thread( freecell_solver_initialize_bfs_queue(soft_thread); /* Initialize the priotity queue of the A* scan */ - soft_thread->a_star_pqueue = malloc(sizeof(PTQUEUE)); + soft_thread->a_star_pqueue = malloc(sizeof(PQUEUE)); freecell_solver_PQueueInitialise( soft_thread->a_star_pqueue, 1024 diff --git a/kpat/freecell-solver/main.c b/kpat/freecell-solver/main.c index 4a47f300..d16468c4 100644 --- a/kpat/freecell-solver/main.c +++ b/kpat/freecell-solver/main.c @@ -658,12 +658,12 @@ int main(int argc, char * argv[]) if ((arg == argc) || (!strcmp(argv[arg], "-"))) { file = stdin; - if (!getenv("FREECELL_SOLVER_TQUIET")) + if (!getenv("FREECELL_SOLVER_QUIET")) { fprintf(stderr, "%s", "Reading the board from the standard input.\n" "Type \"fc-solve --help\" for more usage information.\n" - "To cancel this message set the FREECELL_SOLVER_TQUIET environment variable.\n" + "To cancel this message set the FREECELL_SOLVER_QUIET environment variable.\n" ); } } diff --git a/kpat/freecell-solver/pqueue.c b/kpat/freecell-solver/pqueue.c index 47e6280d..0e4df49b 100644 --- a/kpat/freecell-solver/pqueue.c +++ b/kpat/freecell-solver/pqueue.c @@ -33,7 +33,7 @@ the list is sorted ascending or descending... */ void freecell_solver_PQueueInitialise( - PTQUEUE *pq, + PQUEUE *pq, int32 MaxElements ) { @@ -53,7 +53,7 @@ void freecell_solver_PQueueInitialise( returns TRUE if successful, FALSE if fails. (You fail by filling the pqueue.) PGetRating is a function which returns the rating of the item you're adding for sorting purposes */ -int freecell_solver_PQueuePush( PTQUEUE *pq, void *item, pq_rating_t r) +int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r) { uint32 i; pq_element_t * Elements = pq->Elements; @@ -83,7 +83,7 @@ int freecell_solver_PQueuePush( PTQUEUE *pq, void *item, pq_rating_t r) { while( ( i==PTQ_FIRST_ENTRY ? - (PTQUEUE_MaxRating) /* return biggest possible rating if first element */ + (PQUEUE_MaxRating) /* return biggest possible rating if first element */ : (PGetRating(Elements[ PTQ_PARENT_INDEX(i) ]) ) ) @@ -110,14 +110,14 @@ int freecell_solver_PQueuePush( PTQUEUE *pq, void *item, pq_rating_t r) #define PQueueIsEmpty(pq) ((pq)->CurrentSize == 0) /* free up memory for pqueue */ -void freecell_solver_PQueueFree( PTQUEUE *pq ) +void freecell_solver_PQueueFree( PQUEUE *pq ) { free( pq->Elements ); } /* remove the first node from the pqueue and provide a pointer to it */ -void *freecell_solver_PQueuePop( PTQUEUE *pq) +void *freecell_solver_PQueuePop( PQUEUE *pq) { int32 i; int32 child; diff --git a/kpat/freecell-solver/pqueue.h b/kpat/freecell-solver/pqueue.h index cef1b854..f74068a8 100644 --- a/kpat/freecell-solver/pqueue.h +++ b/kpat/freecell-solver/pqueue.h @@ -11,8 +11,8 @@ http://www.geocities.com/jheyesjones/astar.html */ -#ifndef FC_SOLVE__PTQUEUE_H -#define FC_SOLVE__PTQUEUE_H +#ifndef FC_SOLVE__PQUEUE_H +#define FC_SOLVE__PQUEUE_H #ifdef __cplusplus extern "C" { @@ -22,7 +22,7 @@ extern "C" { #include "jhjtypes.h" -#define PTQUEUE_MaxRating INT_MAX +#define PQUEUE_MaxRating INT_MAX typedef int32 pq_rating_t; @@ -32,13 +32,13 @@ typedef struct struct_pq_element_t pq_rating_t rating; } pq_element_t; -typedef struct _PTQUEUE +typedef struct _PQUEUE { int32 MaxSize; int32 CurrentSize; pq_element_t * Elements; /* pointer to void pointers */ pq_rating_t MaxRating; /* biggest element possible */ -} PTQUEUE; +} PQUEUE; /* given an index to any element in a binary tree stored in a linear array with the root at 1 and a "sentinel" value at 0 these macros are useful in making the code clearer */ @@ -52,15 +52,15 @@ typedef struct _PTQUEUE #define PTQ_RIGHT_CHILD_INDEX(i) (((i)<<1)+1) void freecell_solver_PQueueInitialise( - PTQUEUE *pq, + PQUEUE *pq, int32 MaxElements ); -void freecell_solver_PQueueFree( PTQUEUE *pq ); +void freecell_solver_PQueueFree( PQUEUE *pq ); -int freecell_solver_PQueuePush( PTQUEUE *pq, void *item, pq_rating_t); +int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t); -void *freecell_solver_PQueuePop( PTQUEUE *pq); +void *freecell_solver_PQueuePop( PQUEUE *pq); #define PGetRating(elem) ((elem).rating) @@ -68,4 +68,4 @@ void *freecell_solver_PQueuePop( PTQUEUE *pq); } #endif -#endif /* #ifdef FC_SOLVE__PTQUEUE_H */ +#endif /* #ifdef FC_SOLVE__PQUEUE_H */ diff --git a/kpat/freecell-solver/scans.c b/kpat/freecell-solver/scans.c index a4368873..23279275 100644 --- a/kpat/freecell-solver/scans.c +++ b/kpat/freecell-solver/scans.c @@ -945,7 +945,7 @@ int freecell_solver_a_star_or_bfs_do_solve_or_resume( ); int scans_synergy = instance->scans_synergy; fcs_states_linked_list_item_t * bfs_queue = soft_thread->bfs_queue; - PTQUEUE * a_star_pqueue = soft_thread->a_star_pqueue; + PQUEUE * a_star_pqueue = soft_thread->a_star_pqueue; fcs_states_linked_list_item_t * bfs_queue_last_item = soft_thread->bfs_queue_last_item; derived.num_states = 0; |