]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Merge branch 'trips' of git://git.hohndel.org/subsurface
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Aug 2012 22:36:27 +0000 (15:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Aug 2012 22:36:27 +0000 (15:36 -0700)
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

1  2 
dive.h
divelist.c
gtk-gui.c
parse-xml.c
save-xml.c

diff --cc dive.h
Simple merge
diff --cc divelist.c
Simple merge
diff --cc gtk-gui.c
Simple merge
diff --cc parse-xml.c
Simple merge
diff --cc save-xml.c
index 3464cd6d31254f67f515b994c76cc14aca2de1bc,9ba7a54687d1d497024cc539fae066434fa82ecf..b797475e5362441b49bfe5cbf87a7a64d4259ae9
@@@ -284,6 -281,18 +284,18 @@@ static void save_events(FILE *f, struc
        }
  }
  
 -              show_utf8(f, trip->location, " location=\'","\'");
+ static void save_trip(FILE *f, struct dive *trip)
+ {
+       struct tm *tm = gmtime(&trip->when);
+       fprintf(f, "<trip");
+       fprintf(f, " date='%04u-%02u-%02u'",
+               tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday);
+       if (trip->location)
++              show_utf8(f, trip->location, " location=\'","\'", 1);
+       fprintf(f, " />\n");
+ }
  static void save_dive(FILE *f, struct dive *dive)
  {
        int i;