#include <stdlib.h>
#include <time.h>
+#include <glib.h>
+
/*
* Some silly typedefs to make our units very explicit.
*
typedef struct {
cylinder_type_t type;
gasmix_t gasmix;
+ pressure_t start, end;
} cylinder_t;
static inline int to_feet(depth_t depth)
int cylinderindex;
};
-#define MAX_CYLINDERS (4)
+#define MAX_CYLINDERS (8)
struct dive {
- const char *name;
time_t when;
char *location;
char *notes;
duration_t duration, surfacetime;
depth_t visibility;
temperature_t airtemp, watertemp;
- pressure_t beginning_pressure, end_pressure;
cylinder_t cylinder[MAX_CYLINDERS];
int samples;
struct sample sample[];
}
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 */