/[public]/psiconv/trunk/program/psiconv/magick-aux.c
ViewVC logotype

Diff of /psiconv/trunk/program/psiconv/magick-aux.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 142 Revision 270
1/* 1/*
2 magick-aux.c - Part of psiconv, a PSION 5 file formats converter 2 magick-aux.c - Part of psiconv, a PSION 5 file formats converter
3 Copyright (c) 2000 Frodo Looijaard <frodol@dds.nl> 3 Copyright (c) 2000-2005 Frodo Looijaard <frodo@frodo.looijaard.name>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*/ 18*/
19 19
20#include "config.h" 20#include "config.h"
21 21
22#ifdef IMAGEMAGICK 22#if IMAGEMAGICK
23 23
24#include "magick-aux.h" 24#include "magick-aux.h"
25#include <magick/magick.h>
26#include <magick/config.h>
27 25
28#endif 26#endif
29 27
30#ifdef DMALLOC 28#ifdef DMALLOC
31#include "dmalloc.h" 29#include "dmalloc.h"
33 31
34#if IMAGEMAGICK 32#if IMAGEMAGICK
35 33
36/* This used to be very ugly, but nowadays it is much better */ 34/* This used to be very ugly, but nowadays it is much better */
37 35
36#if IMAGEMAGICK_API == 1 || IMAGEMAGICK_API == 2
38const MagickInfo * GetMagickFileList(void) 37const MagickInfo * GetMagickFileList(void)
39{ 38{
40 ExceptionInfo exc; 39 ExceptionInfo exc;
41 GetExceptionInfo(&exc); 40 GetExceptionInfo(&exc);
42 OpenModules(&exc); 41 OpenModules(&exc);
43 return GetMagickInfo(NULL,&exc); 42 return GetMagickInfo(NULL,&exc);
44} 43}
45 44
45#elif IMAGEMAGICK_API == 3
46
47const MagickInfo * GetMagickFileList(void)
48{
49 MagickInfo **mi;
50 unsigned long nr;
51 int i;
52 ExceptionInfo exc;
53 GetExceptionInfo(&exc);
54 OpenModules(&exc);
55 mi = GetMagickInfoList("*",&nr);
56 for (i = 0; i < nr-1; i++) {
57 mi[i]->next = mi[i+1];
58 }
59 return *mi;
60}
61
62#elif IMAGEMAGICK_API == 4
63
64const MagickInfo * GetMagickFileList(void)
65{
66 MagickInfo **mi;
67 unsigned long nr;
68 int i;
69 ExceptionInfo exc;
70 GetExceptionInfo(&exc);
71 OpenModules(&exc);
72 mi = GetMagickInfoList("*",&nr,&exc);
73 for (i = 0; i < nr-1; i++) {
74 mi[i]->next = mi[i+1];
75 }
76 return *mi;
77}
78#endif
79
46#endif /* IMAGEMAGICK */ 80#endif /* IMAGEMAGICK */

Legend:
Removed from v.142  
changed lines
  Added in v.270

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26