summaryrefslogtreecommitdiffstats
path: root/core/file.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-02-27 21:10:26 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-02-28 07:27:10 -0800
commit416401a301d405a2d2224943efb6e8356b8bbbf8 (patch)
treebaf338c50aa4dcf28a7643272ea1508cafa8d68c /core/file.h
parent155260e6d9cdc10fc76eeabcbccceb040cea6b3d (diff)
downloadsubsurface-416401a301d405a2d2224943efb6e8356b8bbbf8.tar.gz
Cleanup: put all function declarations in file.h in extern "C"
Some of the functions declarations were not in 'extern "C"', despite being C functions. This worked only because they weren't called from C++. Nevertheless, it seems like a dangerous proposition to have the same function declared once as C and once as C++. Therefore, always put them in extern "C" (if compiling in C++ mode, evidently). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/file.h')
-rw-r--r--core/file.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/file.h b/core/file.h
index fbb6d221d..d16a94f40 100644
--- a/core/file.h
+++ b/core/file.h
@@ -7,14 +7,14 @@ struct memblock {
size_t size;
};
+#ifdef __cplusplus
+extern "C" {
+#endif
extern int try_to_open_cochran(const char *filename, struct memblock *mem, struct dive_table *table, struct trip_table *trips);
extern int try_to_open_liquivision(const char *filename, struct memblock *mem, struct dive_table *table, struct trip_table *trips);
extern int datatrak_import(struct memblock *mem, struct dive_table *table, struct trip_table *trips);
extern void ostctools_import(const char *file, struct dive_table *table, struct trip_table *trips);
-#ifdef __cplusplus
-extern "C" {
-#endif
extern int readfile(const char *filename, struct memblock *mem);
extern int try_to_open_zip(const char *filename, struct dive_table *table, struct trip_table *trips);
#ifdef __cplusplus