#include <stdlib.h>
#include <time.h>
+#include <glib.h>
+
/*
* Some silly typedefs to make our units very explicit.
*
struct sample sample[];
};
+/*
+ * We keep our internal data in well-specified units, but
+ * the input and output may come in some random format. This
+ * keeps track of those units.
+ */
+struct units {
+ enum { METERS, FEET } length;
+ enum { LITER, CUFT } volume;
+ enum { BAR, PSI, PASCAL } pressure;
+ enum { CELSIUS, FAHRENHEIT, KELVIN } temperature;
+ enum { KG, LBS } weight;
+};
+
+extern const struct units SI_units, IMPERIAL_units;
+extern struct units input_units, output_units;
+
extern int verbose;
struct dive_table {
}
extern void parse_xml_init(void);
-extern void parse_xml_file(const char *filename);
+extern void parse_xml_file(const char *filename, GError **error);
extern void flush_dive_info_changes(void);
extern void save_dives(const char *filename);
extern struct dive *fixup_dive(struct dive *dive);
extern struct dive *try_to_merge(struct dive *a, struct dive *b);
+#define DIVE_ERROR_PARSE 1
+
#endif /* DIVE_H */