diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-10 09:42:14 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-10 10:53:03 -0700 |
commit | 3f3869ff650229e99262ee07b14e1d14ca973d10 (patch) | |
tree | 7508ff4e13d831855551d6737d0373e67e126470 /core/dive.c | |
parent | 34657f62ae5209b2f1c44efde053aba43e783e5e (diff) | |
download | subsurface-3f3869ff650229e99262ee07b14e1d14ca973d10.tar.gz |
media: move picture function from dive.c to picture.c
Currently, move only those functions that do not access dive
structures.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/core/dive.c b/core/dive.c index 732e9d5a5..c97c229f6 100644 --- a/core/dive.c +++ b/core/dive.c @@ -14,6 +14,7 @@ #include "qthelper.h" #include "metadata.h" #include "membuffer.h" +#include "picture.h" #include "tag.h" #include "trip.h" #include "structured_list.h" @@ -2697,14 +2698,6 @@ static void free_dc(struct divecomputer *dc) free(dc); } -void free_picture(struct picture *picture) -{ - if (picture) { - free(picture->filename); - free(picture); - } -} - static int same_sample(struct sample *a, struct sample *b) { if (a->time.seconds != b->time.seconds) @@ -3410,15 +3403,6 @@ void set_git_prefs(const char *prefs) git_prefs.pp_graphs.po2 = 1; } -struct picture *alloc_picture() -{ - struct picture *pic = malloc(sizeof(struct picture)); - if (!pic) - exit(1); - memset(pic, 0, sizeof(struct picture)); - return pic; -} - static bool new_picture_for_dive(struct dive *d, const char *filename) { FOR_EACH_PICTURE (d) { |