Adopt C99 bool in the midend API.

This changes parameters of midend_size and midend_print_puzzle, the
return types of midend_process_key, midend_wants_statusbar,
midend_can_format_as_text_now and midend_can_{undo,redo}, the 'bval'
field in struct config_item, and finally the return type of the
function pointer passed to midend_deserialise and identify_game.

The last of those changes requires a corresponding fix in clients of
midend_deserialise and identify_game, so in this commit I've also
updated all the in-tree front ends to match. I expect downstream front
ends will need to do the same when they merge this change.
This commit is contained in:
Simon Tatham
2018-11-13 21:37:09 +00:00
parent a76d269cf2
commit cd6cadbecf
7 changed files with 50 additions and 51 deletions

View File

@ -1557,7 +1557,7 @@ static void savefile_write(void *wctx, const void *buf, int len)
fwrite(buf, 1, len, fp);
}
static int savefile_read(void *wctx, void *buf, int len)
static bool savefile_read(void *wctx, void *buf, int len)
{
FILE *fp = (FILE *)wctx;
int ret;