diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-14 19:08:49 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-06 13:58:09 -0700 |
commit | db24f16686b7e704e625f499140848681b31cfde (patch) | |
tree | 59ae7a6ed2218c1137f7da1ee6ccd6ef3b1425c0 /core/picture.h | |
parent | 4e25912fd335159f6bd5d27eb423c5289e35cba5 (diff) | |
download | subsurface-db24f16686b7e704e625f499140848681b31cfde.tar.gz |
core: add get_picture_idx() function
A function that gets the index of a picture in a picture table
given its filename. Since we are going to identify pictures by
their filename, we will need this function in the undo code.
Use the function in the remove_picture() function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/picture.h')
-rw-r--r-- | core/picture.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/picture.h b/core/picture.h index da1a42acd..4e42052a4 100644 --- a/core/picture.h +++ b/core/picture.h @@ -34,6 +34,7 @@ extern void add_to_picture_table(struct picture_table *, int idx, struct picture extern void copy_pictures(const struct picture_table *s, struct picture_table *d); extern void add_picture(struct picture_table *, struct picture newpic); extern bool remove_picture(struct picture_table *, const char *filename); +extern int get_picture_idx(const struct picture_table *, const char *filename); /* Return -1 if not found */ #ifdef __cplusplus } |