summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/src/unfinished/sokoban.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/puzzles/src/unfinished/sokoban.c')
-rw-r--r--apps/plugins/puzzles/src/unfinished/sokoban.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/apps/plugins/puzzles/src/unfinished/sokoban.c b/apps/plugins/puzzles/src/unfinished/sokoban.c
index 2f0af35bc2..1264690416 100644
--- a/apps/plugins/puzzles/src/unfinished/sokoban.c
+++ b/apps/plugins/puzzles/src/unfinished/sokoban.c
@@ -210,19 +210,15 @@ static config_item *game_configure(const game_params *params)
210 ret[0].name = "Width"; 210 ret[0].name = "Width";
211 ret[0].type = C_STRING; 211 ret[0].type = C_STRING;
212 sprintf(buf, "%d", params->w); 212 sprintf(buf, "%d", params->w);
213 ret[0].sval = dupstr(buf); 213 ret[0].u.string.sval = dupstr(buf);
214 ret[0].ival = 0;
215 214
216 ret[1].name = "Height"; 215 ret[1].name = "Height";
217 ret[1].type = C_STRING; 216 ret[1].type = C_STRING;
218 sprintf(buf, "%d", params->h); 217 sprintf(buf, "%d", params->h);
219 ret[1].sval = dupstr(buf); 218 ret[1].u.string.sval = dupstr(buf);
220 ret[1].ival = 0;
221 219
222 ret[2].name = NULL; 220 ret[2].name = NULL;
223 ret[2].type = C_END; 221 ret[2].type = C_END;
224 ret[2].sval = NULL;
225 ret[2].ival = 0;
226 222
227 return ret; 223 return ret;
228} 224}
@@ -231,13 +227,13 @@ static game_params *custom_params(const config_item *cfg)
231{ 227{
232 game_params *ret = snew(game_params); 228 game_params *ret = snew(game_params);
233 229
234 ret->w = atoi(cfg[0].sval); 230 ret->w = atoi(cfg[0].u.string.sval);
235 ret->h = atoi(cfg[1].sval); 231 ret->h = atoi(cfg[1].u.string.sval);
236 232
237 return ret; 233 return ret;
238} 234}
239 235
240static char *validate_params(const game_params *params, int full) 236static const char *validate_params(const game_params *params, int full)
241{ 237{
242 if (params->w < 4 || params->h < 4) 238 if (params->w < 4 || params->h < 4)
243 return "Width and height must both be at least 4"; 239 return "Width and height must both be at least 4";
@@ -806,7 +802,7 @@ static char *new_game_desc(const game_params *params, random_state *rs,
806 return desc; 802 return desc;
807} 803}
808 804
809static char *validate_desc(const game_params *params, const char *desc) 805static const char *validate_desc(const game_params *params, const char *desc)
810{ 806{
811 int w = params->w, h = params->h; 807 int w = params->w, h = params->h;
812 int area = 0; 808 int area = 0;
@@ -903,7 +899,7 @@ static void free_game(game_state *state)
903} 899}
904 900
905static char *solve_game(const game_state *state, const game_state *currstate, 901static char *solve_game(const game_state *state, const game_state *currstate,
906 const char *aux, char **error) 902 const char *aux, const char **error)
907{ 903{
908 return NULL; 904 return NULL;
909} 905}