--- psiconv/trunk/program/psiconv/magick-aux.c 2000/12/10 16:49:40 58 +++ psiconv/trunk/program/psiconv/magick-aux.c 2003/11/11 18:58:55 152 @@ -22,25 +22,23 @@ #if IMAGEMAGICK #include "magick-aux.h" -#include -#include -/* This is so ugly, but it is the only way to make ImageMagick 5 behave - * properly. It really needs a better interface. - * OpenModules makes sure all needed modules are loaded. But it may not - * be called until some things are initialized, hence the extra - * GetMagickInfo call. Ugh. - */ +#endif + +#ifdef DMALLOC +#include "dmalloc.h" +#endif -extern void OpenModules(void); +#if IMAGEMAGICK + +/* This used to be very ugly, but nowadays it is much better */ -MagickInfo * GetMagickFileList(void) +const MagickInfo * GetMagickFileList(void) { - GetMagickInfo(NULL); -#if defined(HasLTDL) - OpenModules(); -#endif - return GetMagickInfo(NULL); + ExceptionInfo exc; + GetExceptionInfo(&exc); + OpenModules(&exc); + return GetMagickInfo(NULL,&exc); } #endif /* IMAGEMAGICK */