Use C99 bool within source modules.

This is the main bulk of this boolification work, but although it's
making the largest actual change, it should also be the least
disruptive to anyone interacting with this code base downstream of me,
because it doesn't modify any interface between modules: all the
inter-module APIs were updated one by one in the previous commits.
This just cleans up the code within each individual source file to use
bool in place of int where I think that makes things clearer.
This commit is contained in:
Simon Tatham
2018-11-13 21:45:44 +00:00
parent a550ea0a47
commit 5f5b284c0b
61 changed files with 2297 additions and 1973 deletions

View File

@ -31,10 +31,11 @@ void fatal(const char *fmt, ...)
struct frontend {
// TODO kill unneeded members!
midend *me;
int timer_active;
bool timer_active;
struct timeval last_time;
config_item *cfg;
int cfg_which, cfgret;
int cfg_which;
bool cfgret;
int ox, oy, w, h;
};
@ -291,7 +292,7 @@ void jcallback_config_set_choice(int item_ptr, int selected) {
i->u.choices.selected = selected;
}
static int get_config(frontend *fe, int which)
static bool get_config(frontend *fe, int which)
{
char *title;
config_item *i;