From d9be07670c2a7e3d54b6defb5ce5334b41ae1d90 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 8 Dec 2014 11:26:03 -0800 Subject: Don't ignore when we can't parse a file We are quite inconsistent when it comes to reporting back errors. One case where this caused somewhat unexpected behavior was when the user would try to open a .csv file by passing it as command line argument. The file was silently ignored, but treated as if it had been opened successfully. Now we issue a somewhat reasonable error message. Signed-off-by: Dirk Hohndel --- dive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dive.h') diff --git a/dive.h b/dive.h index 95f4d6f68..f67c7368b 100644 --- a/dive.h +++ b/dive.h @@ -619,7 +619,7 @@ struct dive *find_dive_n_near(timestamp_t when, int n, timestamp_t offset); extern int match_one_dc(struct divecomputer *a, struct divecomputer *b); extern void parse_xml_init(void); -extern void 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, const char **params); extern void parse_xml_exit(void); extern void set_filename(const char *filename, bool force); -- cgit v1.2.3-70-g09d2