]> git.tdb.fi Git - ext/subsurface.git/blobdiff - file.c
Add some more cochran data parsing code/comments
[ext/subsurface.git] / file.c
diff --git a/file.c b/file.c
index 2e46f94fd1ac2009a707507e8abdbee98b2bb7ad..aff1d51f2d2c87b470f2b61b23d6c8b945870f73 100644 (file)
--- a/file.c
+++ b/file.c
@@ -6,11 +6,7 @@
 #include <errno.h>
 
 #include "dive.h"
-
-struct memblock {
-       void *buffer;
-       size_t size;
-};
+#include "file.h"
 
 static int readfile(const char *filename, struct memblock *mem)
 {
@@ -104,6 +100,10 @@ static int open_by_filename(const char *filename, const char *fmt, struct memblo
        if (!strcasecmp(fmt, "SDE"))
                return try_to_open_suunto(filename, mem, error);
 
+       /* Truly nasty intentionally obfuscated Cochran Anal software */
+       if (!strcasecmp(fmt, "CAN"))
+               return try_to_open_cochran(filename, mem, error);
+
        return 0;
 }