summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-25 13:57:18 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-25 13:59:52 -0700
commit2b86fe84f9b2ac1edae47ff1dd8e5d34373ddff5 (patch)
tree5b7240a872c7169d1d97a58386d96589bb9d3f71 /core
parent17d21dbf40782b6eea58d6a6dffa38a5674cc0e0 (diff)
downloadsubsurface-2b86fe84f9b2ac1edae47ff1dd8e5d34373ddff5.tar.gz
cleanup: move application flags to core/subsurfacehelper.h
These flags are not dive-related, therefore move their declaration to the appropriate header file. Likewise, move their definition from parse-xml.c to subsurfacehelper.c Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/dive.h5
-rw-r--r--core/parse-xml.c1
-rw-r--r--core/subsurfacestartup.c3
-rw-r--r--core/subsurfacestartup.h4
4 files changed, 5 insertions, 8 deletions
diff --git a/core/dive.h b/core/dive.h
index f6ad9bf1c..6e49c2893 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -127,11 +127,6 @@ extern depth_t gas_mnd(struct gasmix mix, depth_t end, const struct dive *dive,
extern bool autogroup;
-extern int quit, force_root, ignore_bt;
-#ifdef SUBSURFACE_MOBILE_DESKTOP
-extern char *testqml;
-#endif
-
extern struct dive displayed_dive;
extern unsigned int dc_number;
extern struct dive *current_dive;
diff --git a/core/parse-xml.c b/core/parse-xml.c
index c6e5ea1be..2c20ad56c 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -36,7 +36,6 @@
#include "tag.h"
#include "xmlparams.h"
-int quit, force_root;
int last_xml_version = -1;
static xmlDoc *test_xslt_transforms(xmlDoc *doc, const struct xml_params *params);
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c
index c5fb7b611..bdb908ea5 100644
--- a/core/subsurfacestartup.c
+++ b/core/subsurfacestartup.c
@@ -5,7 +5,6 @@
#include <stdbool.h>
#include <string.h>
#include "errorhelper.h"
-#include "dive.h" // for quit and force_root
#include "gettext.h"
#include "qthelper.h"
#include "git-access.h"
@@ -103,7 +102,7 @@ struct preferences default_prefs = {
.extract_video_thumbnails_position = 20, // The first fifth seems like a reasonable place
};
-int ignore_bt;
+int quit, force_root, ignore_bt;
#ifdef SUBSURFACE_MOBILE_DESKTOP
char *testqml = NULL;
#endif
diff --git a/core/subsurfacestartup.h b/core/subsurfacestartup.h
index 5784178a7..d62a4b92e 100644
--- a/core/subsurfacestartup.h
+++ b/core/subsurfacestartup.h
@@ -9,6 +9,10 @@ extern "C" {
#endif
extern bool imported;
+extern int quit, force_root, ignore_bt;
+#ifdef SUBSURFACE_MOBILE_DESKTOP
+extern char *testqml;
+#endif
void setup_system_prefs(void);
void parse_argument(const char *arg);