summaryrefslogtreecommitdiffstats
path: root/core/file.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-17 12:32:22 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-24 09:51:37 -0700
commita2614665942959b95eef8453730cd3ac66ac42a3 (patch)
treee8491231112634e6fa188a605ddab47910cfe8c2 /core/file.h
parent41975435a2a93733a0e46a7e594ffba193be6e87 (diff)
downloadsubsurface-a2614665942959b95eef8453730cd3ac66ac42a3.tar.gz
parser: add device_table to parser state
If we want to avoid the parsers to directly modify global data, we have to provide a device_table to parse into. This adds such a state and the corresponding function parameters. However, for now this is unused. Adding new parameters is very painful and this commit shows that we urgently need a "struct divelog" collecting all those tables! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/file.h')
-rw-r--r--core/file.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/file.h b/core/file.h
index 00b1dcbde..e479cdaac 100644
--- a/core/file.h
+++ b/core/file.h
@@ -13,6 +13,7 @@ struct memblock {
};
struct trip_table;
+struct device_table;
struct dive_site_table;
struct dive_table;
struct zip;
@@ -26,8 +27,10 @@ extern int datatrak_import(struct memblock *mem, struct memblock *wl_mem, struct
extern void ostctools_import(const char *file, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites);
extern int readfile(const char *filename, struct memblock *mem);
-extern int parse_file(const char *filename, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites, struct filter_preset_table *filter_presets);
-extern int try_to_open_zip(const char *filename, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites, struct filter_preset_table *filter_presets);
+extern int parse_file(const char *filename, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites,
+ struct device_table *devices, struct filter_preset_table *filter_presets);
+extern int try_to_open_zip(const char *filename, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites,
+ struct device_table *devices, struct filter_preset_table *filter_presets);
// Platform specific functions
extern int subsurface_rename(const char *path, const char *newpath);