1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

wrlib: moved 'RShutdown' from 'load.c' to 'misc.c' for consistency

The cleanup function is actually not specific to loading images and could
do a lot more, so it is probably better placed in 'misc.c'
This commit is contained in:
Christophe CURIS
2014-05-08 20:16:03 +02:00
committed by Carlos R. Mafra
parent 8e0ec489a8
commit ebe7673bf6
4 changed files with 19 additions and 7 deletions

View File

@@ -75,6 +75,8 @@ RImage *RLoadWEBP(const char *file);
#ifdef USE_MAGICK #ifdef USE_MAGICK
RImage *RLoadMagick(const char *file_name); RImage *RLoadMagick(const char *file_name);
void RReleaseMagick(void);
#endif #endif
/* /*

View File

@@ -103,13 +103,6 @@ char **RSupportedFileFormats(void)
return tmp; return tmp;
} }
/* cleaning third-party libs at shutdown */
void RShutdown() {
#ifdef USE_MAGICK
MagickWandTerminus();
#endif
}
static void init_cache(void) static void init_cache(void)
{ {
char *tmp; char *tmp;

View File

@@ -86,3 +86,8 @@ bye:
return image; return image;
} }
void RReleaseMagick(void)
{
MagickWandTerminus();
}

View File

@@ -26,6 +26,8 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include "wraster.h" #include "wraster.h"
#include "imgformat.h"
void RBevelImage(RImage * image, int bevel_type) void RBevelImage(RImage * image, int bevel_type)
{ {
@@ -240,3 +242,13 @@ const char *RMessageForError(int errorCode)
return "internal error"; return "internal error";
} }
} }
/*
* cleaning third-party libs at shutdown
*/
void RShutdown(void)
{
#ifdef USE_MAGICK
RReleaseMagick();
#endif
}