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.
This commit is contained in:
Simon Tatham
2018-11-13 21:44:02 +00:00
parent 064da87682
commit a550ea0a47
64 changed files with 2111 additions and 2118 deletions

View File

@ -216,7 +216,7 @@ int jcallback_resize(int width, int height)
int x, y;
x = width;
y = height;
midend_size(fe->me, &x, &y, TRUE);
midend_size(fe->me, &x, &y, true);
fe->ox = (width - x) / 2;
fe->oy = (height - y) / 2;
fe->w = x;
@ -244,7 +244,7 @@ void deactivate_timer(frontend *fe)
{
if (fe->timer_active)
_call_java(4, 13, 0, 0);
fe->timer_active = FALSE;
fe->timer_active = false;
}
void activate_timer(frontend *fe)
@ -253,7 +253,7 @@ void activate_timer(frontend *fe)
_call_java(4, 12, 0, 0);
gettimeofday(&fe->last_time, NULL);
}
fe->timer_active = TRUE;
fe->timer_active = true;
}
void jcallback_config_ok()
@ -266,7 +266,7 @@ void jcallback_config_ok()
if (err)
_call_java(2, (int) "Error", (int)err, 1);
else {
fe->cfgret = TRUE;
fe->cfgret = true;
}
}
@ -282,7 +282,7 @@ void jcallback_config_set_string(int item_ptr, int char_ptr) {
void jcallback_config_set_boolean(int item_ptr, int selected) {
config_item *i = (config_item *)item_ptr;
assert(i->type == C_BOOLEAN);
i->u.boolean.bval = selected != 0 ? TRUE : FALSE;
i->u.boolean.bval = selected != 0 ? true : false;
}
void jcallback_config_set_choice(int item_ptr, int selected) {
@ -297,7 +297,7 @@ static int get_config(frontend *fe, int which)
config_item *i;
fe->cfg = midend_get_config(fe->me, which, &title);
fe->cfg_which = which;
fe->cfgret = FALSE;
fe->cfgret = false;
_call_java(10, (int)title, 0, 0);
for (i = fe->cfg; i->type != C_END; i++) {
_call_java(5, (int)i, i->type, (int)i->name);
@ -357,7 +357,7 @@ static void resize_fe(frontend *fe)
x = INT_MAX;
y = INT_MAX;
midend_size(fe->me, &x, &y, FALSE);
midend_size(fe->me, &x, &y, false);
_call_java(3, x, y, 0);
}
@ -443,7 +443,7 @@ int main(int argc, char **argv)
float* colours;
_fe = snew(frontend);
_fe->timer_active = FALSE;
_fe->timer_active = false;
_fe->me = midend_new(_fe, &thegame, &nestedvm_drawing, _fe);
if (argc > 1)
midend_game_id(_fe->me, argv[1]); /* ignore failure */