summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-01-15 19:54:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-16 09:34:50 +0700
commit33391a77e9385cf403c2fb1b191b443fcf373294 (patch)
treef6f96b987f90419d4a2d6cfdec2f633d09252a07 /parse-xml.c
parentdca59f06d70bd36d10704a08f8444152a82e99b8 (diff)
downloadsubsurface-33391a77e9385cf403c2fb1b191b443fcf373294.tar.gz
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>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 04b6d4d7d..3845e424f 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -134,7 +134,7 @@ struct {
const char *nickname, *serial_nr, *firmware;
} dc;
} cur_settings;
-static bool in_settings = FALSE;
+static bool in_settings = false;
static struct tm cur_tm;
static int cur_cylinder_index, cur_ws_index;
static int lastndl, laststoptime, laststopdepth, lastcns, lastpo2, lastindeco;
@@ -266,7 +266,7 @@ enum number_type {
static enum number_type parse_float(const char *buffer, double *res, const char **endp)
{
double val;
- static bool first_time = TRUE;
+ static bool first_time = true;
errno = 0;
val = ascii_strtod(buffer, endp);
@@ -279,7 +279,7 @@ static enum number_type parse_float(const char *buffer, double *res, const char
* that information available */
if (first_time) {
fprintf(stderr, "Floating point value with decimal comma (%s)?\n", buffer);
- first_time = FALSE;
+ first_time = false;
}
/* Try again in permissive mode*/
val = strtod_flags(buffer, endp, 0);
@@ -1222,12 +1222,12 @@ static void reset_dc_settings(void)
static void settings_start(void)
{
- in_settings = TRUE;
+ in_settings = true;
}
static void settings_end(void)
{
- in_settings = FALSE;
+ in_settings = false;
}
static void dc_settings_start(void)