From: Dirk Hohndel Date: Mon, 3 Oct 2011 00:47:20 +0000 (-0700) Subject: First steps towards integrating SDA files into the default XML loading X-Git-Url: http://git.tdb.fi/?p=ext%2Fsubsurface.git;a=commitdiff_plain;h=f2566ba561ff8eb560e71dd89de5e66e46e7143d First steps towards integrating SDA files into the default XML loading Signed-off-by: Dirk Hohndel --- diff --git a/parse-xml.c b/parse-xml.c index efae6b6..4e68e8e 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -8,6 +8,7 @@ #include #include "dive.h" +#include "uemis.h" int verbose; @@ -861,6 +862,7 @@ static int uemis_dive_match(struct dive *dive, const char *name, int len, char * MATCH(".nitrox_3.deco_tank.oxygen", uemis_percent, dive->cylinder + 5) || MATCH(".nitrox_3.travel_tank.size", uemis_cylindersize, dive->cylinder + 6) || MATCH(".nitrox_3.travel_tank.oxygen", uemis_percent, dive->cylinder + 6) || + MATCH(".dive.val.bin", uemis_parse_divelog_binary, &dive) || 0; } @@ -1365,6 +1367,7 @@ static struct nesting { { "SUUNTO", suunto_importer }, { "Divinglog", DivingLog_importer }, { "pre_dive", uemis_importer }, + { "dives", uemis_importer }, { "uddf", uddf_importer }, { NULL, } diff --git a/uemis.c b/uemis.c index 25d1b8a..259d30c 100644 --- a/uemis.c +++ b/uemis.c @@ -180,7 +180,7 @@ bail: /* * parse uemis base64 data blob into struct dive */ -static void parse_divelog_binary(char *base64, struct dive **divep) { +void uemis_parse_divelog_binary(char *base64, struct dive **divep) { int datalen; int i; uint8_t *data; @@ -271,7 +271,7 @@ parse_uemis_file(char *divelogfilename) { /* some error handling */ goto bail; } - parse_divelog_binary(found,&dive); + uemis_parse_divelog_binary(found,&dive); record_dive(dive); bail: if (found) diff --git a/uemis.h b/uemis.h index d694007..62aeb54 100644 --- a/uemis.h +++ b/uemis.h @@ -9,5 +9,6 @@ #define DEVICE_TYPE_UEMIS (-1) void uemis_import(); +void uemis_parse_divelog_binary(char *base64, struct dive **divep); #endif /* DIVE_H */