diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-08-29 17:24:15 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-09-01 20:45:34 -0700 |
commit | a5f894d1d3b53a3a99580d2da467a46d04c65266 (patch) | |
tree | 7977610b21d8c6eafdbadc1df02c8fece3ceecdb /save-xml.c | |
parent | ca16f438ac74ae1c35824353d710e47aea6893c5 (diff) | |
download | subsurface-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 'save-xml.c')
-rw-r--r-- | save-xml.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c index b797475e5..3bea2adfa 100644 --- a/save-xml.c +++ b/save-xml.c @@ -291,6 +291,8 @@ static void save_trip(FILE *f, struct dive *trip) fprintf(f, "<trip"); fprintf(f, " date='%04u-%02u-%02u'", tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday); + fprintf(f, " time='%02u:%02u:%02u'", + tm->tm_hour, tm->tm_min, tm->tm_sec); if (trip->location) show_utf8(f, trip->location, " location=\'","\'", 1); fprintf(f, " />\n"); @@ -341,7 +343,7 @@ void save_dives(const char *filename) fprintf(f, "<dives>\n<program name='subsurface' version='%d'></program>\n", VERSION); /* save the trips */ - while ((trip = NEXT_TRIP(trip, dive_trip_list)) != 0) + while ((trip = NEXT_TRIP(trip)) != NULL) save_trip(f, trip->data); /* save the dives */ |