aboutsummaryrefslogtreecommitdiffstats
path: root/core/parse.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-09-06 12:39:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-06 12:59:54 -0700
commit7f1def86021eda8cc01911b4944be4bc38ae65fe (patch)
tree49eec74b2d0a4789e328f9f1728be3aeb882e72f /core/parse.h
parent55e42373066ade9ad2e1a51adf27a0a28cb0d02a (diff)
downloadsubsurface-7f1def86021eda8cc01911b4944be4bc38ae65fe.tar.gz
cleanup: use taxonomy_set_category() function
Instead of manipulating the taxonomy structures directly, use the taxonomy_set_category() function. This improves encapsulation and gives us the possibility to improve the taxonomy data structures. This concerns three places: 1) git parser 2) XML parser 3) reverse geo-lookup This improves the XML parser code slightly: The parser assumes that the value-attribute comes last (after origin and category). While it still does that, it now at least generates a warning if it encounters a value-attribute without origin- or category-attribute. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/parse.h')
-rw-r--r--core/parse.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/parse.h b/core/parse.h
index 350b98ed8..41c1f18ba 100644
--- a/core/parse.h
+++ b/core/parse.h
@@ -52,6 +52,7 @@ struct parser_state {
struct sample *cur_sample; /* non-owning */
struct picture cur_picture; /* owning */
char *country, *city; /* owning */
+ int taxonomy_category, taxonomy_origin;
bool in_settings;
bool in_userid;