aboutsummaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-29 17:24:15 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-01 20:45:34 -0700
commita5f894d1d3b53a3a99580d2da467a46d04c65266 (patch)
tree7977610b21d8c6eafdbadc1df02c8fece3ceecdb /parse-xml.c
parentca16f438ac74ae1c35824353d710e47aea6893c5 (diff)
downloadsubsurface-a5f894d1d3b53a3a99580d2da467a46d04c65266.tar.gz
Clean up macros and auxiliary functions
In preparation for the next stage of the trips handling this commit makes the macros used to access trips (and some frequently used variables for the tree and list models) more consistent. This also changes the way we display un-grouped dives in the dive list, i.e. dives that are not part of a dive trip. Their dive number is now printed bold. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 5159a334f..1569c8c5c 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -41,7 +41,7 @@ void record_dive(struct dive *dive)
void record_trip(struct dive *trip)
{
- dive_trip_list = insert_trip(trip, dive_trip_list);
+ insert_trip(trip);
}
static void delete_dive_renumber(struct dive **dives, int i, int nr)
@@ -1165,10 +1165,10 @@ static void try_to_fill_trip(struct dive **divep, const char *name, char *buf)
struct dive *dive = *divep;
- if (MATCH(".date", divedate, &dive->when)) {
- dive->when = utc_mktime(&cur_tm);
+ if (MATCH(".date", divedate, &dive->when))
+ return;
+ if (MATCH(".time", divetime, &dive->when))
return;
- }
if (MATCH(".location", utf8_string, &dive->location))
return;
if (MATCH(".notes", utf8_string, &dive->notes))