diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-11-23 16:51:27 -1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-23 19:36:27 -0800 |
commit | 25b4fee655e847081031fffb60d0d4d04ab1a8ee (patch) | |
tree | 0217294aa7b15b55ea170294126ed86937eda271 /parse-xml.c | |
parent | a9786564c23fbf032f47096f543699c8c402785b (diff) | |
download | subsurface-25b4fee655e847081031fffb60d0d4d04ab1a8ee.tar.gz |
Move events and samples into a 'struct divecomputer'
For now we only have one fixed divecomputer associated with each dive,
so this doesn't really change any current semantics. But it will make
it easier for us to associate a dive with multiple dive computers.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/parse-xml.c b/parse-xml.c index 2593ed399..57649f7ed 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1199,7 +1199,7 @@ static void try_to_fill_trip(dive_trip_t **dive_trip_p, const char *name, char * static gboolean is_dive(void) { return (cur_dive && - (cur_dive->location || cur_dive->when || cur_dive->samples)); + (cur_dive->location || cur_dive->when || cur_dive->dc.samples)); } static void dive_start(void) @@ -1254,7 +1254,7 @@ static void event_start(void) static void event_end(void) { if (cur_event.name && strcmp(cur_event.name, "surface") != 0) - add_event(cur_dive, cur_event.time.seconds, + add_event(&cur_dive->dc, cur_event.time.seconds, cur_event.type, cur_event.flags, cur_event.value, cur_event.name); cur_event.active = 0; @@ -1280,7 +1280,7 @@ static void ws_end(void) static void sample_start(void) { - cur_sample = prepare_sample(cur_dive); + cur_sample = prepare_sample(&cur_dive->dc); } static void sample_end(void) @@ -1288,7 +1288,7 @@ static void sample_end(void) if (!cur_dive) return; - finish_sample(cur_dive); + finish_sample(&cur_dive->dc); cur_sample = NULL; } |