summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/parse-xml.c13
-rw-r--r--core/parse.c13
-rw-r--r--core/parse.h2
3 files changed, 15 insertions, 13 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c
index f1da26e9a..372e81008 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -29,7 +29,6 @@
int verbose, quit, force_root;
int last_xml_version = -1;
-int diveid = -1;
static xmlDoc *test_xslt_transforms(xmlDoc *doc, const char **params);
@@ -1886,18 +1885,6 @@ extern int divinglog_cylinder(void *handle, int columns, char **data, char **col
return 0;
}
-static int atoi_n(char *ptr, unsigned int len)
-{
- if (len < 10) {
- char buf[10];
-
- memcpy(buf, ptr, len);
- buf[len] = 0;
- return atoi(buf);
- }
- return 0;
-}
-
extern int divinglog_profile(void *handle, int columns, char **data, char **column)
{
(void) handle;
diff --git a/core/parse.c b/core/parse.c
index 3335b8f57..57f6eb019 100644
--- a/core/parse.c
+++ b/core/parse.c
@@ -12,6 +12,7 @@
#include "gettext.h"
int metric = 1;
+int diveid = -1;
/*
static union {
@@ -516,3 +517,15 @@ void add_dive_site(char *ds_name, struct dive *dive)
free(to_free);
}
+int atoi_n(char *ptr, unsigned int len)
+{
+ if (len < 10) {
+ char buf[10];
+
+ memcpy(buf, ptr, len);
+ buf[len] = 0;
+ return atoi(buf);
+ }
+ return 0;
+}
+
diff --git a/core/parse.h b/core/parse.h
index f8af63d04..259cf5aaa 100644
--- a/core/parse.h
+++ b/core/parse.h
@@ -54,6 +54,7 @@ extern struct dive_table dive_table;
extern struct dive_table *target_table;
extern int metric;
+extern int diveid;
int trimspace(char *buffer);
void clear_table(struct dive_table *table);
@@ -96,5 +97,6 @@ void userid_stop(void);
void utf8_string(char *buffer, void *_res);
void add_dive_site(char *ds_name, struct dive *dive);
+int atoi_n(char *ptr, unsigned int len);
#endif