#ifndef DIVE_H
#define DIVE_H
+#include <stdlib.h>
+#include <time.h>
+
/*
* Some silly typedefs to make our units very explicit.
*
struct dive {
const char *name;
time_t when;
+ char *location;
+ char *notes;
depth_t maxdepth, meandepth;
duration_t duration, surfacetime;
depth_t visibility;
extern void parse_xml_init(void);
extern void parse_xml_file(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);
+}
+
+extern struct dive *fixup_dive(struct dive *dive);
+extern struct dive *try_to_merge(struct dive *a, struct dive *b);
+
#endif /* DIVE_H */