--- psiconv/trunk/program/psiconv/magick-aux.c 2000/12/10 16:49:40 58 +++ psiconv/trunk/program/psiconv/magick-aux.c 2002/01/29 18:38:38 142 @@ -19,28 +19,28 @@ #include "config.h" -#if IMAGEMAGICK +#ifdef 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 -extern void OpenModules(void); +#ifdef DMALLOC +#include "dmalloc.h" +#endif -MagickInfo * GetMagickFileList(void) +#if IMAGEMAGICK + +/* This used to be very ugly, but nowadays it is much better */ + +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 */