Convert the C code to using stdbool and true/false

Earlier we converted the C++ code to using true/false, and this converts
the C code to using the same style.

We already depended on stdbool.h in subsurfacestartup.[ch], and we build
with -std=gnu99 so nobody could build subsurface without a c99 compiler.

[Dirk Hohndel: small change suggested by Thiago Macieira: don't include
               stdbool.h for C++]

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-01-15 19:54:41 +01:00 committed by Dirk Hohndel
parent dca59f06d7
commit 33391a77e9
14 changed files with 131 additions and 147 deletions

12
dive.c
View file

@ -570,12 +570,12 @@ static void sanitize_cylinder_info(struct dive *dive)
static bool is_potentially_redundant(struct event *event)
{
if (!strcmp(event->name, "gaschange"))
return FALSE;
return false;
if (!strcmp(event->name, "bookmark"))
return FALSE;
return false;
if (!strcmp(event->name, "heading"))
return FALSE;
return TRUE;
return false;
return true;
}
/* match just by name - we compare the details in the code that uses this helper */
@ -760,7 +760,7 @@ static void fixup_dc_events(struct divecomputer *dc)
if (prev && prev->value == event->value &&
prev->flags == event->flags &&
event->time.seconds - prev->time.seconds < 61)
event->deleted = TRUE;
event->deleted = true;
}
event = event->next;
}
@ -1053,7 +1053,7 @@ add_sample_b:
if (as->stopdepth.mm)
sample.stopdepth = as->stopdepth;
if (as->in_deco)
sample.in_deco = TRUE;
sample.in_deco = true;
merge_one_sample(&sample, at, res);