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>
This commit is contained in:
Miika Turkia 2014-12-27 22:10:44 +02:00 committed by Dirk Hohndel
parent 2461a731fc
commit ce1f69f025
3 changed files with 38 additions and 0 deletions

9
file.c
View file

@ -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;