From: Linus Torvalds Date: Mon, 27 Aug 2012 22:36:27 +0000 (-0700) Subject: Merge branch 'trips' of git://git.hohndel.org/subsurface X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=c89f88378a0a19d6b7e0771b6fd8dc31acfaf2f7;p=ext%2Fsubsurface.git Merge branch 'trips' of git://git.hohndel.org/subsurface Merge the initial 'track trips explicitly' code from Dirk Hohndel. Fix up trivial conflicts in save-xml.c due to the new 'is_attribute' flag. * 'trips' of git://git.hohndel.org/subsurface: Fix an issue with trips that have dives from multiple input files Some simple test dives for the trips code First cut of explicit trip tracking --- c89f88378a0a19d6b7e0771b6fd8dc31acfaf2f7 diff --cc save-xml.c index 3464cd6,9ba7a54..b797475 --- a/save-xml.c +++ b/save-xml.c @@@ -284,6 -281,18 +284,18 @@@ static void save_events(FILE *f, struc } } + static void save_trip(FILE *f, struct dive *trip) + { + struct tm *tm = gmtime(&trip->when); + + fprintf(f, "tm_year+1900, tm->tm_mon+1, tm->tm_mday); + if (trip->location) - show_utf8(f, trip->location, " location=\'","\'"); ++ show_utf8(f, trip->location, " location=\'","\'", 1); + fprintf(f, " />\n"); + } + static void save_dive(FILE *f, struct dive *dive) { int i;