diff options
Diffstat (limited to 'src/solve')
-rw-r--r-- | src/solve/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/solve/main.c b/src/solve/main.c index 140cfc5..b8b966f 100644 --- a/src/solve/main.c +++ b/src/solve/main.c @@ -7,11 +7,18 @@ static void solve_on_error( - const char * const err + const char * const err, + void *user_data ) { + UNUSED(user_data); die("Error solving level: %s", err); } +static const sok_solve_cbs_t +SOLVE_CBS = { + .on_error = solve_on_error, +}; + int main(int argc, char *argv[]) { // init context sok_ctx_t ctx; @@ -30,7 +37,7 @@ int main(int argc, char *argv[]) { } // solve level - if (!sok_solve(&ctx, solve_on_error)) { + if (!sok_solve(&ctx, &SOLVE_CBS, NULL)) { die("Couldn't solve level: %d", (int) level_num); } } |