diff options
| author | Simon Tatham <anakin@pobox.com> | 2018-11-13 21:44:02 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2018-11-13 21:48:24 +0000 |
| commit | a550ea0a47374705a37f36b0f05ffe9e4c8161fb (patch) | |
| tree | a4664ac4d90cdeb581ddd2bf41ccda7b0d45855c /magnets.c | |
| parent | 064da876828ea3079d5d7be5849b693f4d55364b (diff) | |
| download | puzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.zip puzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.tar.gz puzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.tar.bz2 puzzles-a550ea0a47374705a37f36b0f05ffe9e4c8161fb.tar.xz | |
Replace TRUE/FALSE with C99 true/false throughout.
This commit removes the old #defines of TRUE and FALSE from puzzles.h,
and does a mechanical search-and-replace throughout the code to
replace them with the C99 standard lowercase spellings.
Diffstat (limited to 'magnets.c')
| -rw-r--r-- | magnets.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -118,7 +118,7 @@ static bool game_fetch_preset(int i, char **name, game_params **params) game_params *ret; char buf[64]; - if (i < 0 || i >= lenof(magnets_presets)) return FALSE; + if (i < 0 || i >= lenof(magnets_presets)) return false; ret = default_params(); *ret = magnets_presets[i]; /* struct copy */ @@ -130,7 +130,7 @@ static bool game_fetch_preset(int i, char **name, game_params **params) magnets_presets[i].stripclues ? ", strip clues" : ""); *name = dupstr(buf); - return TRUE; + return true; } static void free_params(game_params *params) @@ -601,7 +601,7 @@ static void game_text_hborder(const game_state *state, char **p_r) static bool game_can_format_as_text_now(const game_params *params) { - return TRUE; + return true; } static char *game_text_format(const game_state *state) @@ -1767,9 +1767,9 @@ static int is_clue(const game_state *state, int x, int y) if (((x == -1 || x == w) && y >= 0 && y < h) || ((y == -1 || y == h) && x >= 0 && x < w)) - return TRUE; + return true; - return FALSE; + return false; } static int clue_index(const game_state *state, int x, int y) @@ -1865,7 +1865,7 @@ static game_state *execute_move(const game_state *state, const char *move) while (*move) { c = *move++; if (c == 'S') { - ret->solved = TRUE; + ret->solved = true; n = 0; } else if (c == '+' || c == '-' || c == '.' || c == ' ' || c == '?') { @@ -2286,7 +2286,7 @@ static int game_status(const game_state *state) static bool game_timing_state(const game_state *state, game_ui *ui) { - return TRUE; + return true; } static void game_print_size(const game_params *params, float *x, float *y) @@ -2396,15 +2396,15 @@ const struct game thegame = { encode_params, free_params, dup_params, - TRUE, game_configure, custom_params, + true, game_configure, custom_params, validate_params, new_game_desc, validate_desc, new_game, dup_game, free_game, - TRUE, solve_game, - TRUE, game_can_format_as_text_now, game_text_format, + true, solve_game, + true, game_can_format_as_text_now, game_text_format, new_ui, free_ui, encode_ui, @@ -2421,9 +2421,9 @@ const struct game thegame = { game_anim_length, game_flash_length, game_status, - TRUE, FALSE, game_print_size, game_print, - FALSE, /* wants_statusbar */ - FALSE, game_timing_state, + true, false, game_print_size, game_print, + false, /* wants_statusbar */ + false, game_timing_state, REQUIRE_RBUTTON, /* flags */ }; |