summaryrefslogtreecommitdiffstats
path: root/kpat/freecell-solver/fcs_isa.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /kpat/freecell-solver/fcs_isa.h
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpat/freecell-solver/fcs_isa.h')
-rw-r--r--kpat/freecell-solver/fcs_isa.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/kpat/freecell-solver/fcs_isa.h b/kpat/freecell-solver/fcs_isa.h
new file mode 100644
index 00000000..30a9a982
--- /dev/null
+++ b/kpat/freecell-solver/fcs_isa.h
@@ -0,0 +1,56 @@
+#ifndef FC_SOLVE__FCS_ISA_H
+#define FC_SOLVE__FCS_ISA_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "state.h"
+#include "fcs.h"
+
+extern void freecell_solver_state_ia_init(freecell_solver_hard_thread_t * hard_thread);
+#if 0
+extern fcs_state_with_locations_t * fcs_state_ia_alloc(freecell_solver_instance_t * instance);
+#else
+
+#define fcs_state_ia_alloc_into_var(ret, instance) \
+{ \
+ if ((instance)->num_states_in_last_pack == (instance)->state_pack_len) \
+ { \
+ if (instance->num_state_packs == instance->max_num_state_packs) \
+ { \
+ instance->max_num_state_packs += IA_STATE_PACKS_GROW_BY; \
+ instance->state_packs = (fcs_state_with_locations_t * *)realloc(instance->state_packs, sizeof(fcs_state_with_locations_t *) * instance->max_num_state_packs); \
+ } \
+ instance->state_packs[instance->num_state_packs] = malloc(instance->state_pack_len * sizeof(fcs_state_with_locations_t)); \
+ instance->num_state_packs++; \
+ instance->num_states_in_last_pack = 0; \
+ } \
+ ret = &(instance->state_packs[instance->num_state_packs-1][instance->num_states_in_last_pack++]); \
+}
+
+#endif
+
+
+#if 0
+extern void fcs_state_ia_release(freecell_solver_instance_t * instance);
+#else
+#define fcs_state_ia_release(instance) \
+{ \
+ (instance)->num_states_in_last_pack--; \
+}
+
+
+#endif
+extern void freecell_solver_state_ia_finish(freecell_solver_hard_thread_t * hard_thread);
+
+extern void freecell_solver_state_ia_foreach(
+ freecell_solver_hard_thread_t * hard_thread,
+ void (*ptr_function)(fcs_state_with_locations_t *, void *),
+ void * context
+ );
+#ifdef __cplusplus
+}
+#endif
+
+#endif