Skip to content

Commit

Permalink
[libfreecell-solver] rename ifded option and expose it
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Jun 13, 2024
1 parent 458aeed commit 6fc515a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fc-solve/scripts/Makefile.to-javascript.mak
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ INCLUDE_CFLAGS_FN = inc.cflags.txt
$(INCLUDE_CFLAGS_FN):
printf "%s\n" "$(INCLUDE_CFLAGS)" > $@

CFLAGS = $(OPT_FLAGS) `cat $(INCLUDE_CFLAGS_FN)` -m32 -std=gnu18 -DFC_SOLVE_JAVASCRIPT_QUERYING=1
CFLAGS = $(OPT_FLAGS) `cat $(INCLUDE_CFLAGS_FN)` -m32 -std=gnu18 -DFC_SOLVE_INSTANCE_PARAMS_QUERYING=1

# ASSERT_FLAGS = -s ASSERTIONS=1
ASSERT_FLAGS =
Expand Down
1 change: 1 addition & 0 deletions fc-solve/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ option (FCS_DBM_SINGLE_THREAD "single threaded DBM solvers")
option (SKIP_PERL_TESTING_TASK_CHECK "skip check on testing")
option (USE_SIGNED_CHARS "-fsigned-char")
option (USE_UNSIGNED_CHARS "-funsigned-char")
option (FC_SOLVE_INSTANCE_PARAMS_QUERYING "run-time API functions for querying game parameters (EXPERIMENTAL)")

IF (FCS_ZERO_FREECELLS_MODE)
SET (FCS_DBM_FREECELLS_NUM 0)
Expand Down
1 change: 1 addition & 0 deletions fc-solve/source/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ extern "C" {
#define FCS_RCS_CACHE_STORAGE ${FCS_RCS_CACHE_STORAGE}

#cmakedefine FCS_ZERO_FREECELLS_MODE
#cmakedefine FC_SOLVE_INSTANCE_PARAMS_QUERYING

#cmakedefine HAVE_STRNCASECMP
#cmakedefine HAVE_STRNDUP
Expand Down
10 changes: 5 additions & 5 deletions fc-solve/source/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -3676,7 +3676,7 @@ int DLLEXPORT freecell_solver_user_set_num_freecells(
return 0;
}

#ifdef FC_SOLVE_JAVASCRIPT_QUERYING
#ifdef FC_SOLVE_INSTANCE_PARAMS_QUERYING
int DLLEXPORT freecell_solver_user_get_num_freecells(void *const api_instance)
{
return (((fcs_user *const)api_instance)
Expand Down Expand Up @@ -3710,7 +3710,7 @@ int DLLEXPORT freecell_solver_user_set_num_stacks(
return 0;
}

#ifdef FC_SOLVE_JAVASCRIPT_QUERYING
#ifdef FC_SOLVE_INSTANCE_PARAMS_QUERYING
int DLLEXPORT freecell_solver_user_get_num_stacks(void *const api_instance)
{
return (
Expand Down Expand Up @@ -4012,7 +4012,7 @@ int DLLEXPORT freecell_solver_user_set_sequences_are_built_by_type(
return 0;
}

#ifdef FC_SOLVE_JAVASCRIPT_QUERYING
#ifdef FC_SOLVE_INSTANCE_PARAMS_QUERYING
int DLLEXPORT freecell_solver_user_get_sequences_are_built_by_type(
void *const api_instance)
{
Expand All @@ -4038,7 +4038,7 @@ int DLLEXPORT freecell_solver_user_set_sequence_move(
return 0;
}

#ifdef FC_SOLVE_JAVASCRIPT_QUERYING
#ifdef FC_SOLVE_INSTANCE_PARAMS_QUERYING
int DLLEXPORT freecell_solver_user_get_sequence_move(void *const api_instance)
{
return (((((fcs_user *const)api_instance)
Expand Down Expand Up @@ -4066,7 +4066,7 @@ int DLLEXPORT freecell_solver_user_set_empty_stacks_filled_by(
return 0;
}

#ifdef FC_SOLVE_JAVASCRIPT_QUERYING
#ifdef FC_SOLVE_INSTANCE_PARAMS_QUERYING
int DLLEXPORT freecell_solver_user_get_empty_stacks_filled_by(
void *const api_instance)
{
Expand Down

0 comments on commit 6fc515a

Please sign in to comment.