aboutsummaryrefslogtreecommitdiffstats
path: root/core/load-git.c
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2017-10-02 17:24:26 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-02 09:52:39 -0700
commitf9a36132adbcb587f4810337700cf9a88044d337 (patch)
tree45d38be6f0720853d45d199cbf31bba14ee5ac46 /core/load-git.c
parent32e6ca49192a010b2c18d27a5eb5e9214bd4c098 (diff)
downloadsubsurface-f9a36132adbcb587f4810337700cf9a88044d337.tar.gz
[Divesite] Load / Save divesite country on git
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/load-git.c')
-rw-r--r--core/load-git.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/load-git.c b/core/load-git.c
index e7732a69f..c77d4c05d 100644
--- a/core/load-git.c
+++ b/core/load-git.c
@@ -293,6 +293,9 @@ static void parse_dive_notrip(char *line, struct membuffer *str, void *_dive)
struct dive *dive = _dive; dive->tripflag = NO_TRIP;
}
+static void parse_site_country(char *line, struct membuffer *str, void *_ds)
+{ (void) line; struct dive_site *ds = _ds; ds->country = strdup(mb_cstring(str)); }
+
static void parse_site_description(char *line, struct membuffer *str, void *_ds)
{ (void) line; struct dive_site *ds = _ds; ds->description = strdup(mb_cstring(str)); }
@@ -994,7 +997,7 @@ static void dive_parser(char *line, struct membuffer *str, void *_dive)
struct keyword_action site_action[] = {
#undef D
#define D(x) { #x, parse_site_ ## x }
- D(description), D(geo), D(gps), D(name), D(notes)
+ D(country), D(description), D(geo), D(gps), D(name), D(notes)
};
static void site_parser(char *line, struct membuffer *str, void *_ds)