mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
3f3869ff65
Currently, move only those functions that do not access dive structures. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
21 lines
376 B
C
21 lines
376 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include "picture.h"
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
struct picture *alloc_picture()
|
|
{
|
|
struct picture *pic = malloc(sizeof(struct picture));
|
|
if (!pic)
|
|
exit(1);
|
|
memset(pic, 0, sizeof(struct picture));
|
|
return pic;
|
|
}
|
|
|
|
void free_picture(struct picture *picture)
|
|
{
|
|
if (picture) {
|
|
free(picture->filename);
|
|
free(picture);
|
|
}
|
|
}
|