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]
This commit is contained in:
Simon Tatham
2011-05-04 18:41:21 +00:00
parent e7b2a9dd8d
commit 89bfecaa5a
5 changed files with 69 additions and 54 deletions

View File

@ -1496,7 +1496,7 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
if (state->prev[si] == -1 && state->next[si] == -1)
return "";
sprintf(buf, "%c%d,%d",
ui->drag_is_from ? 'C' : 'X', ui->sx, ui->sy);
(int)(ui->drag_is_from ? 'C' : 'X'), ui->sx, ui->sy);
return dupstr(buf);
}
@ -1515,7 +1515,7 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
if (state->prev[si] == -1 && state->next[si] == -1)
return "";
sprintf(buf, "%c%d,%d",
(button == 'x') ? 'C' : 'X', ui->cx, ui->cy);
(int)((button == 'x') ? 'C' : 'X'), ui->cx, ui->cy);
return dupstr(buf);
}