diff options
Diffstat (limited to 'kpat/freecell-solver')
| -rw-r--r-- | kpat/freecell-solver/USAGE | 4 | ||||
| -rw-r--r-- | kpat/freecell-solver/cmd_line.c | 15 | ||||
| -rw-r--r-- | kpat/freecell-solver/fcs_cl.h | 2 | ||||
| -rw-r--r-- | kpat/freecell-solver/pqueue.c | 10 | ||||
| -rw-r--r-- | kpat/freecell-solver/pqueue.h | 2 |
5 files changed, 15 insertions, 18 deletions
diff --git a/kpat/freecell-solver/USAGE b/kpat/freecell-solver/USAGE index 16f5c93d..f78295b2 100644 --- a/kpat/freecell-solver/USAGE +++ b/kpat/freecell-solver/USAGE @@ -502,7 +502,7 @@ If you are working on a UNIX or a similar system then you can set some run-time options in "fc-solve" by sending it some signal combinations. -If you send the signal USR1, without sending any other Q_SIGNALS before +If you send the signal USR1, without sending any other signals before that, then "fc-solve" will output the present number of iterations. This method is a good way to monitor an instance that takes a long time to solve. @@ -512,7 +512,7 @@ will print the iteration number and depth on every state that it checks. It is the equivalent of specifying (or unspecifying) the option -i/--iter-output. -If you send it two USR2 Q_SIGNALS and then USR1, then "fc-solve" +If you send it two USR2 signals and then USR1, then "fc-solve" will also print the board of every state. Again, this will only be done assuming the iteration output is turned on. diff --git a/kpat/freecell-solver/cmd_line.c b/kpat/freecell-solver/cmd_line.c index 63fbf6c9..2eaf524c 100644 --- a/kpat/freecell-solver/cmd_line.c +++ b/kpat/freecell-solver/cmd_line.c @@ -518,7 +518,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( { int a; const char * start_num; - char * end_num; + const char * end_num; char * num_copy; start_num = argv[arg]; for(a=0;a<5;a++) @@ -642,7 +642,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( *last_arg = arg-1; return FCS_CMD_LINE_PARAM_WITH_NO_ARG; } - freecell_solver_user_set_soft_thread_name(instance, argv[arg]); + freecell_solver_user_set_soft_thread_name(instance, (char*)argv[arg]); } else if ((!strcmp(argv[arg], "--prelude"))) { @@ -652,7 +652,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( *last_arg = arg-1; return FCS_CMD_LINE_PARAM_WITH_NO_ARG; } - freecell_solver_user_set_hard_thread_prelude(instance, argv[arg]); + freecell_solver_user_set_hard_thread_prelude(instance, (char*)argv[arg]); } else if ((!strcmp(argv[arg], "-opt-to")) || (!strcmp(argv[arg], "--optimization-tests-order"))) { @@ -746,7 +746,8 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( else { int num_to_skip = 0; - char * s, * buffer; + const char * s; + char * buffer; FILE * f; long file_len; int ret; @@ -842,7 +843,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( ret = freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( instance, args_man->argc - num_to_skip, - args_man->argv + num_to_skip, + (const char **)(args_man->argv + num_to_skip), 0, known_parameters, callback, @@ -879,7 +880,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( args_man_t * preset_args = 0; char * dir = NULL; - status = read_preset(argv[arg], &preset_args, &dir, NULL); + status = read_preset((char*)argv[arg], &preset_args, &dir, NULL); if (status != 0) { char * err_str; @@ -896,7 +897,7 @@ int freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( ret = freecell_solver_user_cmd_line_parse_args_with_file_nesting_count( instance, preset_args->argc, - preset_args->argv, + (const char**)preset_args->argv, 0, known_parameters, callback, diff --git a/kpat/freecell-solver/fcs_cl.h b/kpat/freecell-solver/fcs_cl.h index e739c98e..6dafaec6 100644 --- a/kpat/freecell-solver/fcs_cl.h +++ b/kpat/freecell-solver/fcs_cl.h @@ -12,7 +12,7 @@ typedef int (*freecell_solver_user_cmd_line_known_commands_callback_t) ( void * instance, int argc, - char * argv[], + const char * argv[], int arg_index, int * num_to_skip, int * ret, diff --git a/kpat/freecell-solver/pqueue.c b/kpat/freecell-solver/pqueue.c index 086cce96..e507a875 100644 --- a/kpat/freecell-solver/pqueue.c +++ b/kpat/freecell-solver/pqueue.c @@ -25,9 +25,6 @@ #include "dmalloc.h" #endif -#define TRUE 1 -#define FALSE 0 - /* initialise the priority queue with a maximum size of maxelements. maxrating is the highest or lowest value of an entry in the pqueue depending on whether it is ascending or descending respectively. Finally the bool32 tells you whether the list is sorted ascending or descending... */ @@ -50,10 +47,10 @@ void freecell_solver_PQueueInitialise( } /* join a priority queue - returns TRUE if successful, FALSE if fails. (You fail by filling the pqueue.) + 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( PQUEUE *pq, void *item, pq_rating_t r) +void freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r) { uint32 i; pq_element_t * Elements = pq->Elements; @@ -103,8 +100,7 @@ int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r) pq->CurrentSize = CurrentSize; - return TRUE; - + return; } #define PQueueIsEmpty(pq) ((pq)->CurrentSize == 0) diff --git a/kpat/freecell-solver/pqueue.h b/kpat/freecell-solver/pqueue.h index cf5f5372..252653d6 100644 --- a/kpat/freecell-solver/pqueue.h +++ b/kpat/freecell-solver/pqueue.h @@ -58,7 +58,7 @@ void freecell_solver_PQueueInitialise( void freecell_solver_PQueueFree( PQUEUE *pq ); -int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t); +void freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t); void *freecell_solver_PQueuePop( PQUEUE *pq); |
