From 89bfecaa5aa39469a3e368d44f517aff5c904354 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 4 May 2011 18:41:21 +0000 Subject: Portability fixes, mostly from James for Palm purposes. Mostly additions of missing 'static' and explicit 'void' in parameter lists, plus one or two other things like explicitly casting chars in variadic argument lists to int and using DBL_MAX if HUGE_VAL isn't available. [originally from svn r9166] --- loopy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loopy.c') diff --git a/loopy.c b/loopy.c index 8617c72..e7fb6cb 100644 --- a/loopy.c +++ b/loopy.c @@ -201,7 +201,7 @@ static char const diffchars[] = DIFFLIST(ENCODE); SOLVERLIST(SOLVER_FN_DECL) static int (*(solver_fns[]))(solver_state *) = { SOLVERLIST(SOLVER_FN) }; static int const solver_diffs[] = { SOLVERLIST(SOLVER_DIFF) }; -const int NUM_SOLVERS = sizeof(solver_diffs)/sizeof(*solver_diffs); +static const int NUM_SOLVERS = sizeof(solver_diffs)/sizeof(*solver_diffs); struct game_params { int w, h; @@ -1901,7 +1901,7 @@ static char *new_game_desc(game_params *params, random_state *rs, if (grid_desc) { retval = snewn(strlen(grid_desc) + 1 + strlen(game_desc) + 1, char); - sprintf(retval, "%s%c%s", grid_desc, GRID_DESC_SEP, game_desc); + sprintf(retval, "%s%c%s", grid_desc, (int)GRID_DESC_SEP, game_desc); sfree(grid_desc); sfree(game_desc); } else { -- cgit v1.1