diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-27 00:25:15 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-09 20:58:04 -0800 |
commit | 7e33369dc8b27b20385ab055b662e06bbf369784 (patch) | |
tree | af674ccdd1ccb67d4de84d68cb585b481d020fb3 /core/dive.h | |
parent | ec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c (diff) | |
download | subsurface-7e33369dc8b27b20385ab055b662e06bbf369784.tar.gz |
Parser: add trip_table parameter to parsing functions
To allow parsing into arbitrary trip_tables, add the corresponding
parameter to the parsing functions and the parser state. Currently,
all callers pass the global trip_table so there should be no change
in functionality. These arguments will be replaced in subsequent commits.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.h')
-rw-r--r-- | core/dive.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/core/dive.h b/core/dive.h index 1325a8bb9..f7cf060b7 100644 --- a/core/dive.h +++ b/core/dive.h @@ -475,19 +475,19 @@ struct dive *find_dive_n_near(timestamp_t when, int n, timestamp_t offset); 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, const char **params); +extern int parse_xml_buffer(const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips, const char **params); extern void parse_xml_exit(void); extern void set_filename(const char *filename); -extern int parse_dm4_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table); -extern int parse_dm5_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table); -extern int parse_shearwater_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table); -extern int parse_shearwater_cloud_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table); -extern int parse_cobalt_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table); -extern int parse_divinglog_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table); -extern int parse_dlf_buffer(unsigned char *buffer, size_t size, struct dive_table *table); +extern int parse_dm4_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips); +extern int parse_dm5_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips); +extern int parse_shearwater_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips); +extern int parse_shearwater_cloud_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips); +extern int parse_cobalt_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips); +extern int parse_divinglog_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table, struct trip_table *trips); +extern int parse_dlf_buffer(unsigned char *buffer, size_t size, struct dive_table *table, struct trip_table *trips); -extern int parse_file(const char *filename, struct dive_table *table); +extern int parse_file(const char *filename, struct dive_table *table, struct trip_table *trips); 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); @@ -498,7 +498,6 @@ extern void save_one_dive_to_mb(struct membuffer *b, struct dive *dive, bool ano int cylinderuse_from_text(const char *text); - struct user_info { char *name; char *email; |