]> git.tdb.fi Git - ext/subsurface.git/blobdiff - dive.h
Do a dive de-dup pass
[ext/subsurface.git] / dive.h
diff --git a/dive.h b/dive.h
index 15a357f8998ec32bc29ff02351d65c7712507403..eaafe8aeba7f4209719c2d079f4461067d4d1ef1 100644 (file)
--- a/dive.h
+++ b/dive.h
@@ -104,6 +104,8 @@ struct sample {
 struct dive {
        const char *name;
        time_t when;
+       char *location;
+       char *notes;
        depth_t maxdepth, meandepth;
        duration_t duration, surfacetime;
        depth_t visibility;
@@ -133,6 +135,12 @@ static inline struct dive *get_dive(unsigned int nr)
 extern void parse_xml_init(void);
 extern void parse_xml_file(const char *filename);
 
-void save_dives(const char *filename);
+extern void flush_dive_info_changes(void);
+extern void save_dives(const char *filename);
+
+static inline unsigned int dive_size(int samples)
+{
+       return sizeof(struct dive) + samples*sizeof(struct sample);
+}
 
 #endif /* DIVE_H */