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:
committed by
Carlos R. Mafra
parent
8e0ec489a8
commit
ebe7673bf6
@@ -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
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -86,3 +86,8 @@ bye:
|
|||||||
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RReleaseMagick(void)
|
||||||
|
{
|
||||||
|
MagickWandTerminus();
|
||||||
|
}
|
||||||
|
|||||||
12
wrlib/misc.c
12
wrlib/misc.c
@@ -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
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user