aboutsummaryrefslogtreecommitdiffstats
path: root/subsurfacestartup.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 /subsurfacestartup.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 'subsurfacestartup.c')
-rw-r--r--subsurfacestartup.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/subsurfacestartup.c b/subsurfacestartup.c
index 0640333d0..e85828508 100644
--- a/subsurfacestartup.c
+++ b/subsurfacestartup.c
@@ -8,28 +8,28 @@ struct preferences default_prefs = {
.units = SI_UNITS,
.unit_system = METRIC,
.pp_graphs = {
- .po2 = FALSE,
- .pn2 = FALSE,
- .phe = FALSE,
+ .po2 = false,
+ .pn2 = false,
+ .phe = false,
.po2_threshold = 1.6,
.pn2_threshold = 4.0,
.phe_threshold = 13.0,
},
- .mod = FALSE,
+ .mod = false,
.mod_ppO2 = 1.6,
- .ead = FALSE,
- .profile_dc_ceiling = TRUE,
- .profile_red_ceiling = FALSE,
- .profile_calc_ceiling = FALSE,
- .calc_ceiling_3m_incr = FALSE,
- .calc_ndl_tts = FALSE,
+ .ead = false,
+ .profile_dc_ceiling = true,
+ .profile_red_ceiling = false,
+ .profile_calc_ceiling = false,
+ .calc_ceiling_3m_incr = false,
+ .calc_ndl_tts = false,
.gflow = 30,
.gfhigh = 75,
- .gf_low_at_maxdepth = FALSE,
+ .gf_low_at_maxdepth = false,
.font_size = 14.0,
- .display_invalid_dives = FALSE,
- .show_sac = FALSE,
- .display_unused_tanks = FALSE
+ .display_invalid_dives = false,
+ .show_sac = false,
+ .display_unused_tanks = false
};
struct units *get_units()
@@ -77,7 +77,7 @@ const char *monthname(int mon)
/*
* track whether we switched to importing dives
*/
-bool imported = FALSE;
+bool imported = false;
static void print_version() {
printf("Subsurface v%s, ", VERSION_STRING);
@@ -116,7 +116,7 @@ void parse_argument(const char *arg)
exit(0);
}
if (strcmp(arg, "--import") == 0) {
- imported = TRUE; /* mark the dives so far as the base, * everything after is imported */
+ imported = true; /* mark the dives so far as the base, * everything after is imported */
return;
}
if (strcmp(arg, "--verbose") == 0) {
@@ -149,7 +149,7 @@ void renumber_dives(int nr)
struct dive *dive = dive_table.dives[i];
dive->number = nr + i;
}
- mark_divelist_changed(TRUE);
+ mark_divelist_changed(true);
}
/*