aboutsummaryrefslogtreecommitdiff
path: root/nestedvm.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-11-13 21:44:02 +0000
committerSimon Tatham <anakin@pobox.com>2018-11-13 21:48:24 +0000
commita550ea0a47374705a37f36b0f05ffe9e4c8161fb (patch)
treea4664ac4d90cdeb581ddd2bf41ccda7b0d45855c /nestedvm.c
parent064da876828ea3079d5d7be5849b693f4d55364b (diff)
downloadpuzzles-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 'nestedvm.c')
-rw-r--r--nestedvm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nestedvm.c b/nestedvm.c
index 0ad0f3f..6356678 100644
--- a/nestedvm.c
+++ b/nestedvm.c
@@ -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 */