+extern void parse_xml_file(const char *filename, GError **error);
+extern void set_filename(const char *filename);
+
+#ifdef XSLT
+extern xmlDoc *test_xslt_transforms(xmlDoc *doc);
+#endif
+
+extern void show_dive_info(struct dive *);
+extern void flush_dive_info_changes(struct dive *);
+
+extern void show_dive_equipment(struct dive *);
+extern void flush_dive_equipment_changes(struct dive *);
+
+extern void show_dive_stats(struct dive *);
+
+extern void update_dive(struct dive *new_dive);
+extern void save_dives(const char *filename);
+
+static inline unsigned int dive_size(int samples)
+{
+ return sizeof(struct dive) + samples*sizeof(struct sample);
+}
+
+extern time_t utc_mktime(struct tm *tm);
+
+extern struct dive *alloc_dive(void);
+extern void record_dive(struct dive *dive);
+
+extern struct sample *prepare_sample(struct dive **divep);
+extern void finish_sample(struct dive *dive, struct sample *sample);
+
+extern void report_dives(gboolean imported);
+extern struct dive *fixup_dive(struct dive *dive);
+extern struct dive *try_to_merge(struct dive *a, struct dive *b);
+
+extern void renumber_dives(int nr);
+
+extern void add_event(struct dive *dive, int time, int type, int flags, int value, const char *name);
+
+/* UI related protopypes */
+
+extern void init_ui(int *argcp, char ***argvp);
+
+extern void run_ui(void);
+
+extern void report_error(GError* error);
+
+extern void add_cylinder_description(cylinder_type_t *);
+extern void add_people(const char *string);
+extern void add_location(const char *string);
+extern void remember_event(const char *eventname);
+extern void evn_foreach(void (*callback)(const char *, int *, void *), void *data);
+
+extern void dive_list_update_dives(void);
+extern void flush_divelist(struct dive *dive);
+
+#define DIVE_ERROR_PARSE 1
+
+const char *weekday(int wday);
+const char *monthname(int mon);
+
+#define UTF8_DEGREE "\xc2\xb0"
+#define UTF8_SUBSCRIPT_2 "\xe2\x82\x82"