aboutsummaryrefslogtreecommitdiff
path: root/latin.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-11-13 21:42:28 +0000
committerSimon Tatham <anakin@pobox.com>2018-11-13 21:48:24 +0000
commit08915945e64d2d3dfea7ec426228f814a6e65adf (patch)
tree9bb9fd997ac278a011acdc0a5f87aef4d92fdbd1 /latin.h
parent33b55db48e9573c6c825e3a222ff968f6a0bd4f4 (diff)
downloadpuzzles-08915945e64d2d3dfea7ec426228f814a6e65adf.zip
puzzles-08915945e64d2d3dfea7ec426228f814a6e65adf.tar.gz
puzzles-08915945e64d2d3dfea7ec426228f814a6e65adf.tar.bz2
puzzles-08915945e64d2d3dfea7ec426228f814a6e65adf.tar.xz
Adopt C99 bool in the shared Latin-square API.
latin_check now returns bool, and latin_solver_diff_set takes a bool 'extreme' flag. Should be non-disruptive.
Diffstat (limited to 'latin.h')
-rw-r--r--latin.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/latin.h b/latin.h
index 747cfb6..3c9e8e8 100644
--- a/latin.h
+++ b/latin.h
@@ -82,7 +82,7 @@ int latin_solver_diff_simple(struct latin_solver *solver);
* single-number elimination. */
int latin_solver_diff_set(struct latin_solver *solver,
struct latin_solver_scratch *scratch,
- int extreme);
+ bool extreme);
typedef int (*usersolver_t)(struct latin_solver *solver, void *ctx);
typedef void *(*ctxnew_t)(void *ctx);
@@ -115,7 +115,7 @@ digit *latin_generate(int o, random_state *rs);
/* The order of the latin rectangle is max(w,h). */
digit *latin_generate_rect(int w, int h, random_state *rs);
-int latin_check(digit *sq, int order); /* !0 => not a latin square */
+bool latin_check(digit *sq, int order); /* true => not a latin square */
void latin_debug(digit *sq, int order);