summaryrefslogtreecommitdiffstats
path: root/core/dive.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2018-05-08 16:24:51 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-14 23:47:00 +0300
commit969dfee9ec088acb942e211cb90329d2b8c0751f (patch)
tree89571c94dde158e2027108ba3dde7c8468caf351 /core/dive.c
parent0b836f12fc714f0dfee6303699c9510f4cdf3b17 (diff)
downloadsubsurface-969dfee9ec088acb942e211cb90329d2b8c0751f.tar.gz
Rename enum dive_comp_type to divemode_t
...as the usuage is not anymore about a computer but a momentary dive mode. Rename the end indicator as well. Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/dive.c')
-rw-r--r--core/dive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/dive.c b/core/dive.c
index 9ec95c141..255631ec3 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -245,7 +245,7 @@ void add_extra_data(struct divecomputer *dc, const char *key, const char *value)
* saving the dive mode for each event. When the events occur AFTER 'time' seconds, the last stored divemode
* is returned. This function is self-tracking, relying on setting the event pointer 'evp' so that, in each iteration
* that calls this function, the search does not have to begin at the first event of the dive */
-enum dive_comp_type get_current_divemode(struct divecomputer *dc, int time, struct event **evp, enum dive_comp_type *divemode)
+enum divemode_t get_current_divemode(struct divecomputer *dc, int time, struct event **evp, enum divemode_t *divemode)
{
struct event *ev = *evp;
if (*divemode == UNDEF_COMP_TYPE) {
@@ -253,7 +253,7 @@ enum dive_comp_type get_current_divemode(struct divecomputer *dc, int time, stru
ev = dc ? get_next_event(dc->events, "modechange") : NULL;
}
while (ev && ev->time.seconds < time) {
- *divemode = (enum dive_comp_type) ev->value;
+ *divemode = (enum divemode_t) ev->value;
ev = get_next_event(ev->next, "modechange");
}
*evp = ev;
@@ -2071,7 +2071,7 @@ int gasmix_distance(const struct gasmix *a, const struct gasmix *b)
* divemode = the dive mode pertaining to this point in the dive profile.
* This function called by: calculate_gas_information_new() in profile.c; add_segment() in deco.c.
*/
-extern void fill_pressures(struct gas_pressures *pressures, const double amb_pressure, const struct gasmix *mix, double po2, enum dive_comp_type divemode)
+extern void fill_pressures(struct gas_pressures *pressures, const double amb_pressure, const struct gasmix *mix, double po2, enum divemode_t divemode)
{
if ((divemode != OC) && po2) { // This is a rebreather dive where pressures->o2 is defined
if (po2 >= amb_pressure) {