static int game_fetch_preset(int i, char **name, game_params **params)
{
static struct {
- char *title;
+ const char *title;
game_params params;
- } presets[] = {
+ } const presets[] = {
{ "2x2 Trivial", { 2, 2, SYMM_ROT2, DIFF_BLOCK, DIFF_KMINMAX, FALSE, FALSE } },
{ "2x3 Basic", { 2, 3, SYMM_ROT2, DIFF_SIMPLE, DIFF_KMINMAX, FALSE, FALSE } },
{ "3x3 Trivial", { 3, 3, SYMM_ROT2, DIFF_BLOCK, DIFF_KMINMAX, FALSE, FALSE } },
*/
struct solver_scratch;
static int solver_elim(struct solver_usage *usage, int *indices,
- char *fmt, ...) __attribute__((format(printf,3,4)));
+ const char *fmt, ...)
+ __attribute__((format(printf,3,4)));
static int solver_intersect(struct solver_usage *usage,
- int *indices1, int *indices2, char *fmt, ...)
+ int *indices1, int *indices2, const char *fmt, ...)
__attribute__((format(printf,4,5)));
static int solver_set(struct solver_usage *usage,
struct solver_scratch *scratch,
- int *indices, char *fmt, ...)
+ int *indices, const char *fmt, ...)
__attribute__((format(printf,4,5)));
#endif
static int solver_elim(struct solver_usage *usage, int *indices
#ifdef STANDALONE_SOLVER
- , char *fmt, ...
+ , const char *fmt, ...
#endif
)
{
static int solver_intersect(struct solver_usage *usage,
int *indices1, int *indices2
#ifdef STANDALONE_SOLVER
- , char *fmt, ...
+ , const char *fmt, ...
#endif
)
{
struct solver_scratch *scratch,
int *indices
#ifdef STANDALONE_SOLVER
- , char *fmt, ...
+ , const char *fmt, ...
#endif
)
{
(ondiag1(yt*cr+xt) && ondiag1(y*cr+x)))))) {
#ifdef STANDALONE_SOLVER
if (solver_show_working) {
- char *sep = "";
+ const char *sep = "";
int xl, yl;
printf("%*sforcing chain, %d at ends of ",
solver_recurse_depth*4, "", orign);
#ifdef STANDALONE_SOLVER
if (solver_show_working) {
- char *sep = "";
+ const char *sep = "";
printf("%*srecursing on (%d,%d) [",
solver_recurse_depth*4, "", x + 1, y + 1);
for (i = 0; i < j; i++) {
static char *encode_solve_move(int cr, digit *grid)
{
int i, len;
- char *ret, *p, *sep;
+ char *ret, *p;
+ const char *sep;
/*
* It's surprisingly easy to work out _exactly_ how long this