From cef15c978d466af37a0f453c50f2e8942ed7cdc2 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 14 Jun 2020 11:55:06 +0200 Subject: [PATCH] cleanup: move function declarations from dive.h to parse.h The parse_* functions should probably be declared in parse.h. Arguably, parse_xml_init() and parse_xml_exit() should be moved to an init.h file, however that doesn't yet exist. Signed-off-by: Berthold Stoeger --- core/dive.h | 4 ---- core/parse.h | 3 +++ subsurface-desktop-main.cpp | 1 + subsurface-mobile-main.cpp | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/dive.h b/core/dive.h index ff77edac5..735e760c1 100644 --- a/core/dive.h +++ b/core/dive.h @@ -275,10 +275,6 @@ extern bool time_during_dive_with_offset(const struct dive *dive, timestamp_t wh /* Check if two dive computer entries are the exact same dive (-1=no/0=maybe/1=yes) */ extern int match_one_dc(const struct divecomputer *a, const struct divecomputer *b); -extern void parse_xml_init(void); -extern int parse_xml_buffer(const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites, const char **params); -extern void parse_xml_exit(void); - extern int save_dives(const char *filename); extern int save_dives_logic(const char *filename, bool select_only, bool anonymize); extern int save_dive(FILE *f, struct dive *dive, bool anonymize); diff --git a/core/parse.h b/core/parse.h index 41c1f18ba..e291d7e2c 100644 --- a/core/parse.h +++ b/core/parse.h @@ -120,6 +120,9 @@ void utf8_string(char *buffer, void *_res); void add_dive_site(char *ds_name, struct dive *dive, struct parser_state *state); int atoi_n(char *ptr, unsigned int len); +void parse_xml_init(void); +int parse_xml_buffer(const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites, const char **params); +void parse_xml_exit(void); int parse_dm4_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites); int parse_dm5_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites); int parse_seac_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites); diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp index 33a424799..be5b7b7fe 100644 --- a/subsurface-desktop-main.cpp +++ b/subsurface-desktop-main.cpp @@ -9,6 +9,7 @@ #include "core/color.h" #include "core/downloadfromdcthread.h" // for fill_computer_list #include "core/errorhelper.h" +#include "core/parse.h" #include "core/qt-gui.h" #include "core/qthelper.h" #include "core/subsurfacestartup.h" diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp index 7cfcd778d..efaeeac36 100644 --- a/subsurface-mobile-main.cpp +++ b/subsurface-mobile-main.cpp @@ -9,6 +9,7 @@ #include "core/dive.h" #include "core/color.h" #include "core/downloadfromdcthread.h" +#include "core/parse.h" #include "core/qt-gui.h" #include "core/qthelper.h" #include "core/subsurfacestartup.h"