summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-12-27 22:10:44 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-28 06:41:21 -0800
commitce1f69f025a6bd1a99deccfe906534fe2141d3c1 (patch)
tree76426bd6077bb7222a5cfd2267b1416bec5c6686 /file.c
parent2461a731fc4c485c3d54f4cd5def37aaaf6cb829 (diff)
downloadsubsurface-ce1f69f025a6bd1a99deccfe906534fe2141d3c1.tar.gz
Initial support for Divesoft Freedom
This parses the dive profile from Divesoft Freedom log file. Only the depth profile is currently supported. There is also something wrong as the log file cannot be given as parameter but must be opened or imported once Subsurface is running. Note that so far no metadata is parsed. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/file.c b/file.c
index 4b7a9d5f0..4ef223374 100644
--- a/file.c
+++ b/file.c
@@ -442,6 +442,15 @@ int parse_file(const char *filename)
}
}
+ /* Divesoft Freedom */
+ if (fmt && (!strcasecmp(fmt + 1, "DLF"))) {
+ if (!parse_dlf_buffer(mem.buffer, mem.size)) {
+ free(mem.buffer);
+ return 0;
+ }
+ return -1;
+ }
+
ret = parse_file_buffer(filename, &mem);
free(mem.buffer);
return ret;