/usr/include/freecell-solver/fcs_user.h is in libfreecell-solver-dev 3.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | /* Copyright (c) 2000 Shlomi Fish
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* move.h - main header file for the Freecell Solver library.
*
*/
#ifndef FC_SOLVE__FCS_USER_H
#define FC_SOLVE__FCS_USER_H
#include "fcs_dllexport.h"
#include "fcs_enums.h"
#include "fcs_move.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef FC_SOLVE_STRINGS_COMPAT
typedef char * freecell_solver_str_t;
#else
typedef const char * freecell_solver_str_t;
#endif
DLLEXPORT extern void * freecell_solver_user_alloc(void);
DLLEXPORT extern int freecell_solver_user_apply_preset(
void * instance,
const char * preset_name
);
DLLEXPORT extern void freecell_solver_user_limit_iterations(
void * user_instance,
int max_iters
);
DLLEXPORT extern int freecell_solver_user_set_tests_order(
void * user_instance,
const char * tests_order,
char * * error_string
);
DLLEXPORT extern int freecell_solver_user_solve_board(
void * user_instance,
const char * state_as_string
);
DLLEXPORT extern int freecell_solver_user_resume_solution(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_get_next_move(
void * user_instance,
fcs_move_t * move
);
DLLEXPORT extern char * freecell_solver_user_current_state_as_string(
void * user_instance,
int parseable_output,
int canonized_order_output,
int display_10_as_t
);
DLLEXPORT extern void freecell_solver_user_free(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_get_current_depth(
void * user_instance
);
DLLEXPORT extern void freecell_solver_user_set_solving_method(
void * user_instance,
int method
);
DLLEXPORT extern int freecell_solver_user_get_num_times(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_get_limit_iterations(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_get_moves_left(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_set_game(
void * user_instance,
int freecells_num,
int stacks_num,
int decks_num,
int sequences_are_built_by,
int unlimited_sequence_move,
int empty_stacks_fill
);
DLLEXPORT extern void freecell_solver_user_set_solution_optimization(
void * user_instance,
int optimize
);
DLLEXPORT extern char * freecell_solver_user_move_to_string(
fcs_move_t move,
int standard_notation
);
DLLEXPORT extern char * freecell_solver_user_move_to_string_w_state(
void * user_instance,
fcs_move_t move,
int standard_notation
);
DLLEXPORT extern void freecell_solver_user_limit_depth(
void * user_instance,
int max_depth
);
DLLEXPORT extern int freecell_solver_user_set_num_freecells(
void * user_instance,
int freecells_num
);
DLLEXPORT extern int freecell_solver_user_get_max_num_freecells(void);
DLLEXPORT extern int freecell_solver_user_set_num_stacks(
void * user_instance,
int stacks_num
);
DLLEXPORT extern int freecell_solver_user_get_max_num_stacks(void);
DLLEXPORT extern int freecell_solver_user_set_num_decks(
void * user_instance,
int decks_num
);
DLLEXPORT extern int freecell_solver_user_get_max_num_decks(void);
DLLEXPORT extern char * freecell_solver_user_get_invalid_state_error_string(
void * user_instance,
int print_ts
);
DLLEXPORT extern int freecell_solver_user_set_sequences_are_built_by_type(
void * user_instance,
int sbb
);
DLLEXPORT extern int freecell_solver_user_set_empty_stacks_filled_by(
void * user_instance,
int es_fill
);
DLLEXPORT extern int freecell_solver_user_set_sequence_move(
void * user_instance,
int unlimited_sequence_move
);
DLLEXPORT extern int freecell_solver_user_set_a_star_weight(
void * user_instance,
int index,
double weight
);
typedef void (*freecell_solver_user_iter_handler_t)
(
void * user_instance,
int iter_num,
int depth,
void * ptr_state,
int parent_iter_num,
void * context
);
DLLEXPORT extern void freecell_solver_user_set_iter_handler(
void * user_instance,
freecell_solver_user_iter_handler_t iter_handler,
void * iter_handler_context
);
DLLEXPORT extern char * freecell_solver_user_iter_state_as_string(
void * user_instance,
void * ptr_state,
int parseable_output,
int canonized_order_output,
int display_10_as_t
);
DLLEXPORT extern void freecell_solver_user_set_random_seed(
void * user_instance,
int seed
);
DLLEXPORT extern int freecell_solver_user_get_num_states_in_collection(
void * user_instance
);
DLLEXPORT extern void freecell_solver_user_limit_num_states_in_collection(
void * user_instance,
int max_num_states
);
DLLEXPORT extern void freecell_solver_set_stored_states_trimming_limit(
void * user_instance,
long max_num_states
);
DLLEXPORT extern int freecell_solver_user_next_soft_thread(
void * user_instance
);
DLLEXPORT extern void freecell_solver_user_set_soft_thread_step(
void * user_instance,
int num_times_step
);
DLLEXPORT extern int freecell_solver_user_next_hard_thread(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_get_num_soft_threads_in_instance(
void * user_instance
);
DLLEXPORT extern void freecell_solver_user_set_calc_real_depth(
void * user_instance,
int calc_real_depth
);
DLLEXPORT extern void freecell_solver_user_set_soft_thread_name(
void * user_instance,
freecell_solver_str_t name
);
DLLEXPORT extern void freecell_solver_user_set_flare_name(
void * user_instance,
freecell_solver_str_t name
);
DLLEXPORT extern int freecell_solver_user_set_hard_thread_prelude(
void * user_instance,
freecell_solver_str_t prelude
);
DLLEXPORT extern int freecell_solver_user_set_flares_plan(
void * api_instance,
freecell_solver_str_t prelude
);
DLLEXPORT extern void freecell_solver_user_recycle(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_set_optimization_scan_tests_order(
void * user_instance,
const char * tests_order,
char * * error_string
);
DLLEXPORT extern void freecell_solver_user_set_reparent_states(
void * user_instance,
int to_reparent_states
);
DLLEXPORT extern void freecell_solver_user_set_scans_synergy(
void * user_instance,
int synergy
);
DLLEXPORT extern void freecell_solver_user_limit_current_instance_iterations(
void * user_instance,
int max_iters
);
DLLEXPORT extern int freecell_solver_user_next_instance(
void * user_instance
);
DLLEXPORT extern int freecell_solver_user_next_flare(
void * api_instance
);
/*
* This function resets the user_instance, making it lose
* all the previous command line arguments it encountered
* */
DLLEXPORT extern int freecell_solver_user_reset(
void * user_instance
);
DLLEXPORT const char * freecell_solver_user_get_lib_version(
void * user_instance
);
DLLEXPORT const char * freecell_solver_user_get_current_soft_thread_name(
void * user_instance
);
/*
* This error string should be strdup()'ed or something if one wishes
* to reuse it. Otherwise, it is constant.
* */
DLLEXPORT const char * freecell_solver_user_get_last_error_string(
void * api_instance
);
/*
* This sets the tests_order from min_depth onwards.
* */
DLLEXPORT extern int freecell_solver_user_set_depth_tests_order(
void * user_instance,
int min_depth,
const char * tests_order,
char * * error_string
);
DLLEXPORT extern int freecell_solver_user_set_pruning(
void * user_instance,
const char * pruning,
char * * error_string
);
DLLEXPORT extern int freecell_solver_user_set_cache_limit(
void * user_instance,
long limit
);
#ifdef __cplusplus
}
#endif
#endif /* FC_SOLVE__FCS_USER_H */
|