diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-04-28 11:27:36 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-28 11:27:36 -0700 |
commit | f4677d760462e071e6e913cc9e64a051d16a9bbe (patch) | |
tree | a0be66b0df24ab68282d6103540fb3403dd49e65 | |
parent | c519d0b32fa7419f283aeaff9ce7dbd04f6216b4 (diff) | |
download | subsurface-f4677d760462e071e6e913cc9e64a051d16a9bbe.tar.gz |
Rename helper function and make it global
save_one_dive_to_mb() is very useful (but there was a namespace collision
with another helper in save_git.c)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | dive.h | 3 | ||||
-rw-r--r-- | save-xml.c | 10 |
2 files changed, 8 insertions, 5 deletions
@@ -661,6 +661,9 @@ extern int save_dives_logic(const char *filename, bool select_only); extern int save_dive(FILE *f, struct dive *dive); extern int export_dives_xslt(const char *filename, const bool selected, const int units, const char *export_xslt); +struct membuffer; +extern void save_one_dive_to_mb(struct membuffer *b, struct dive *dive); + struct git_oid; struct git_repository; #define dummy_git_repository ((git_repository *)3ul) /* Random bogus pointer, not NULL */ diff --git a/save-xml.c b/save-xml.c index c68b5b633..15c667d35 100644 --- a/save-xml.c +++ b/save-xml.c @@ -385,7 +385,7 @@ static void save_picture(struct membuffer *b, struct picture *pic) put_string(b, "/>\n"); } -void save_one_dive(struct membuffer *b, struct dive *dive) +void save_one_dive_to_mb(struct membuffer *b, struct dive *dive) { struct divecomputer *dc; @@ -420,7 +420,7 @@ int save_dive(FILE *f, struct dive *dive) { struct membuffer buf = { 0 }; - save_one_dive(&buf, dive); + save_one_dive_to_mb(&buf, dive); flush_buffer(&buf, f); /* Error handling? */ return 0; @@ -445,7 +445,7 @@ static void save_trip(struct membuffer *b, dive_trip_t *trip) */ for_each_dive(i, dive) { if (dive->divetrip == trip) - save_one_dive(b, dive); + save_one_dive_to_mb(b, dive); } put_format(b, "</trip>\n"); @@ -542,14 +542,14 @@ void save_dives_buffer(struct membuffer *b, const bool select_only) if (!dive->selected) continue; - save_one_dive(b, dive); + save_one_dive_to_mb(b, dive); } else { trip = dive->divetrip; /* Bare dive without a trip? */ if (!trip) { - save_one_dive(b, dive); + save_one_dive_to_mb(b, dive); continue; } |