diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/solve_generic.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/solve_generic.h b/src/solve_generic.h index c80f3ef..4e7833f 100644 --- a/src/solve_generic.h +++ b/src/solve_generic.h | |||
| @@ -235,12 +235,18 @@ int64_t | |||
| 235 | gendata(const char *solver, const char *options, void *data) | 235 | gendata(const char *solver, const char *options, void *data) |
| 236 | { | 236 | { |
| 237 | int64_t ret; | 237 | int64_t ret; |
| 238 | uint8_t maxdepth; | 238 | uint8_t maxdepth, h, i, j; |
| 239 | 239 | ||
| 240 | if (!strcmp(solver, "H48")) { | 240 | if (!strcmp(solver, "H48")) { |
| 241 | /* TODO: write a generic parser for options */ | 241 | /* |
| 242 | maxdepth = atoi(options); | 242 | TODO: write a generic parser for options |
| 243 | ret = gendata_h48(data, 0, maxdepth); | 243 | for now it accepts "h;maxdepth" |
| 244 | */ | ||
| 245 | for (i = 0; options[i] != ';'; i++) ; | ||
| 246 | for (j = i; options[j]; j++) ; | ||
| 247 | h = atoi(options); | ||
| 248 | maxdepth = atoi(&options[i+1]); | ||
| 249 | ret = gendata_h48(data, h, maxdepth); | ||
| 244 | } else { | 250 | } else { |
| 245 | DBG_LOG("gendata: implemented only for H48 solver\n"); | 251 | DBG_LOG("gendata: implemented only for H48 solver\n"); |
| 246 | ret = -1; | 252 | ret = -1; |
