+extern int verbose;
+
+struct dive_table {
+ int nr, allocated;
+ struct dive **dives;
+};
+
+extern struct dive_table dive_table;
+
+static inline struct dive *get_dive(unsigned int nr)
+{
+ if (nr >= dive_table.nr)
+ return NULL;
+ return dive_table.dives[nr];
+}
+
+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);
+