c/3881: Interal compilter error on Sun with ImageMagic 5.3.7

Harry Edmon harry@atmos.washington.edu
Mon Jul 30 10:46:00 GMT 2001


>Number:         3881
>Category:       c
>Synopsis:       Internal compiler error on Sun with ImageMagick 5.3.7
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 30 10:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Harry Edmon
>Release:        3.0
>Organization:
University of Washington
>Environment:
System: SunOS damp.atmos.washington.edu 5.8 Generic_108528-08 sun4u sparc SUNW,Ultra-1
Architecture: sun4

	
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
configured with: /usr/local/src/gcc-3.0/configure 
>Description:
	Trying to compile ImageMagick 5.2.7, compile of coders/fits.c fails
>How-To-Repeat:
	Here is the compiler command line:

gcc -DHAVE_CONFIG_H -I../ -I.. -I../magick
-I/usr/local/include/freetype2 -I/usr/local/include/freetype2
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/local/include -I/usr/openwin/include -I/usr/openwin/include/X11
-g -O2 -Wall -c fits.c -Wp,-MD,.deps/fits.TPlo -o fits.o

I produced preprocessed source, and it compiles with no options, and
with -g, but fails with -O2 or -O1 with the following message:

fits.c: In function `ReadFITSImage':
fits.c:482: Internal compiler error in change_address, at emit-rtl.c:1635
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

Here is the preprocessed source:

# 55 "fits.c"
# 1 "../magick/magick.h" 1
# 19 "../magick/magick.h"
# 1 "../magick/config.h" 1
# 20 "../magick/magick.h" 2




# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 1 3
# 14 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdarg.h" 1 3
# 43 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 15 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 2 3
# 34 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
#pragma ident "@(#)stdio.h	1.78	99/12/08 SMI"

# 1 "/usr/include/iso/stdio_iso.h" 1 3
# 32 "/usr/include/iso/stdio_iso.h" 3
#pragma ident "@(#)stdio_iso.h	1.2	99/10/25 SMI"


# 1 "/usr/include/sys/feature_tests.h" 1 3
# 13 "/usr/include/sys/feature_tests.h" 3
#pragma ident "@(#)feature_tests.h	1.18	99/07/26 SMI"

# 1 "/usr/include/sys/isa_defs.h" 1 3
# 9 "/usr/include/sys/isa_defs.h" 3
#pragma ident "@(#)isa_defs.h	1.20	99/05/04 SMI"
# 16 "/usr/include/sys/feature_tests.h" 2 3
# 36 "/usr/include/iso/stdio_iso.h" 2 3
# 1 "/usr/include/sys/va_list.h" 1 3
# 9 "/usr/include/sys/va_list.h" 3
#pragma ident "@(#)va_list.h	1.12	99/05/04 SMI"
# 26 "/usr/include/sys/va_list.h" 3
typedef void *__va_list;
# 37 "/usr/include/iso/stdio_iso.h" 2 3
# 1 "/usr/include/stdio_tag.h" 1 3
# 9 "/usr/include/stdio_tag.h" 3
#pragma ident "@(#)stdio_tag.h	1.3	98/04/20 SMI"
# 21 "/usr/include/stdio_tag.h" 3
typedef struct __FILE __FILE;
# 38 "/usr/include/iso/stdio_iso.h" 2 3
# 1 "/usr/include/stdio_impl.h" 1 3
# 9 "/usr/include/stdio_impl.h" 3
#pragma ident "@(#)stdio_impl.h	1.8	99/06/10 SMI"

# 1 "/usr/include/sys/isa_defs.h" 1 3
# 12 "/usr/include/stdio_impl.h" 2 3
# 22 "/usr/include/stdio_impl.h" 3
typedef int ssize_t;
# 38 "/usr/include/stdio_impl.h" 3
struct __FILE
{




        ssize_t _cnt;
        unsigned char *_ptr;

        unsigned char *_base;
        unsigned char _flag;
        unsigned char _file;
        unsigned __orientation:2;
        unsigned __ionolock:1;
        unsigned __filler:5;
};
# 39 "/usr/include/iso/stdio_iso.h" 2 3
# 59 "/usr/include/iso/stdio_iso.h" 3
typedef long long __longlong_t;
# 75 "/usr/include/iso/stdio_iso.h" 3
typedef __FILE FILE;







typedef unsigned int size_t;






typedef __longlong_t fpos_t;
# 147 "/usr/include/iso/stdio_iso.h" 3
extern __FILE __iob[20];
# 164 "/usr/include/iso/stdio_iso.h" 3
extern int remove(const char *);
extern int rename(const char *, const char *);
extern FILE *tmpfile(void);
extern char *tmpnam(char *);
extern int fclose(FILE *);
extern int fflush(FILE *);
extern FILE *fopen(const char *, const char *);
extern FILE *freopen(const char *, const char *, FILE *);
extern void setbuf(FILE *, char *);
extern int setvbuf(FILE *, char *, int, size_t);

extern int fprintf(FILE *, const char *, ...);

extern int fscanf(FILE *, const char *, ...);

extern int printf(const char *, ...);

extern int scanf(const char *, ...);

extern int sprintf(char *, const char *, ...);

extern int sscanf(const char *, const char *, ...);
extern int vfprintf(FILE *, const char *, __va_list);
extern int vprintf(const char *, __va_list);
extern int vsprintf(char *, const char *, __va_list);
extern int fgetc(FILE *);
extern char *fgets(char *, int, FILE *);
extern int fputc(int, FILE *);
extern int fputs(const char *, FILE *);


extern int getc(FILE *);
extern int putc(int, FILE *);



extern int getchar(void);
extern int putchar(int);

extern char *gets(char *);
extern int puts(const char *);
extern int ungetc(int, FILE *);
extern size_t fread(void *, size_t, size_t, FILE *);
extern size_t fwrite(const void *, size_t, size_t, FILE *);
extern int fgetpos(FILE *, fpos_t *);
extern int fseek(FILE *, long, int);
extern int fsetpos(FILE *, const fpos_t *);
extern long ftell(FILE *);
extern void rewind(FILE *);


extern void clearerr(FILE *);
extern int feof(FILE *);
extern int ferror(FILE *);

extern void perror(const char *);


extern int __filbuf(FILE *);
extern int __flsbuf(int, FILE *);
# 37 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 2 3
# 107 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
typedef __longlong_t off_t;
# 134 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
typedef __va_list __not_va_list__;
# 151 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern unsigned char _sibuf[], _sobuf[];
# 168 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern FILE *fopen64(const char *, const char *);
extern FILE *freopen64(const char *, const char *, FILE *);
extern FILE *tmpfile64(void);
extern int fgetpos64(FILE *, fpos_t *);
extern int fsetpos64(FILE *, const fpos_t *);
# 193 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern unsigned char *_bufendtab[];
extern FILE *_lastbuf;
# 225 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern char *tmpnam_r(char *);
# 236 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern int snprintf(char *, size_t, const char *, ...);




extern int vsnprintf(char *, size_t, const char *, __gnuc_va_list);
# 250 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern FILE *fdopen(int, const char *);
extern char *ctermid(char *);
extern int fileno(FILE *);
# 261 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern void flockfile(FILE *);
extern int ftrylockfile(FILE *);
extern void funlockfile(FILE *);
extern int getc_unlocked(FILE *);
extern int getchar_unlocked(void);
extern int putc_unlocked(int, FILE *);
extern int putchar_unlocked(int);
# 276 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdio.h" 3
extern FILE *popen(const char *, const char *);
extern char *cuserid(char *);
extern char *tempnam(const char *, const char *);
extern int getopt(int, char *const *, const char *);



extern char *optarg;
extern int optind, opterr, optopt;
extern int getw(FILE *);
extern int putw(int, FILE *);
extern int pclose(FILE *);







extern int fseeko64(FILE *, off_t, int);
extern off_t ftello64(FILE *);
# 25 "../magick/magick.h" 2
# 1 "/usr/include/stdlib.h" 1 3
# 16 "/usr/include/stdlib.h" 3
#pragma ident "@(#)stdlib.h	1.47	99/11/03 SMI"

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/iso/stdlib_iso.h" 1 3
# 37 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/iso/stdlib_iso.h" 3
#pragma ident "@(#)stdlib_iso.h	1.1	99/08/09 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 40 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/iso/stdlib_iso.h" 2 3
# 49 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/iso/stdlib_iso.h" 3
typedef struct {
        int quot;
        int rem;
} div_t;

typedef struct {
        long quot;
        long rem;
} ldiv_t;
# 88 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/iso/stdlib_iso.h" 3
typedef long wchar_t;






extern unsigned char __ctype[];


extern void abort(void);
extern int abs(int);
extern int atexit(void (*)(void));
extern double atof(const char *);
extern int atoi(const char *);
extern long int atol(const char *);
extern void *bsearch(const void *, const void *, size_t, size_t,
        int (*)(const void *, const void *));
extern void *calloc(size_t, size_t);
extern div_t div(int, int);
extern void exit(int);
extern void free(void *);
extern char *getenv(const char *);
extern long int labs(long);
extern ldiv_t ldiv(long, long);
extern void *malloc(size_t);
extern int mblen(const char *, size_t);
extern size_t mbstowcs(wchar_t *, const char *, size_t);
extern int mbtowc(wchar_t *, const char *, size_t);
extern void qsort(void *, size_t, size_t,
        int (*)(const void *, const void *));
extern int rand(void);
extern void *realloc(void *, size_t);
extern void srand(unsigned int);
extern double strtod(const char *, char **);
extern long int strtol(const char *, char **, int);
extern unsigned long int strtoul(const char *, char **, int);
extern int system(const char *);
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
# 19 "/usr/include/stdlib.h" 2 3



# 1 "/usr/include/sys/wait.h" 1 3
# 16 "/usr/include/sys/wait.h" 3
#pragma ident "@(#)wait.h	1.21	97/04/08 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/wait.h" 2 3

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 25 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
#pragma ident "@(#)types.h	1.66	00/02/14 SMI"

# 1 "/usr/include/sys/isa_defs.h" 1 3
# 28 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 2 3
# 1 "/usr/include/sys/feature_tests.h" 1 3
# 29 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 2 3




# 1 "/usr/include/sys/machtypes.h" 1 3
# 16 "/usr/include/sys/machtypes.h" 3
#pragma ident "@(#)machtypes.h	1.13	99/05/04 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/machtypes.h" 2 3
# 37 "/usr/include/sys/machtypes.h" 3
typedef unsigned char lock_t;
# 34 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 2 3
# 45 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
# 1 "/usr/include/sys/int_types.h" 1 3
# 9 "/usr/include/sys/int_types.h" 3
#pragma ident "@(#)int_types.h	1.6	97/08/20 SMI"
# 42 "/usr/include/sys/int_types.h" 3
# 1 "/usr/include/sys/isa_defs.h" 1 3
# 43 "/usr/include/sys/int_types.h" 2 3
# 62 "/usr/include/sys/int_types.h" 3
typedef char int8_t;





typedef short int16_t;
typedef int int32_t;




typedef long long int64_t;



typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;




typedef unsigned long long uint64_t;
# 94 "/usr/include/sys/int_types.h" 3
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# 110 "/usr/include/sys/int_types.h" 3
typedef int intptr_t;
typedef unsigned int uintptr_t;







typedef char int_least8_t;





typedef short int_least16_t;
typedef int int_least32_t;




typedef long long int_least64_t;



typedef unsigned char uint_least8_t;
typedef unsigned short uint_least16_t;
typedef unsigned int uint_least32_t;




typedef unsigned long long uint_least64_t;
# 46 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 2 3
# 62 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef long long longlong_t;
typedef unsigned long long u_longlong_t;
# 85 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef long t_scalar_t;
typedef unsigned long t_uscalar_t;





typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;

typedef char *caddr_t;
typedef long daddr_t;
typedef short cnt_t;


typedef ulong_t paddr_t;
# 118 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef int ptrdiff_t;
# 127 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef ulong_t pfn_t;
typedef ulong_t pgcnt_t;
typedef long spgcnt_t;

typedef uchar_t use_t;
typedef short sysid_t;
typedef short index_t;
typedef void *timeout_id_t;
typedef void *bufcall_id_t;
# 170 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef u_longlong_t ino_t;
typedef longlong_t blkcnt_t;
typedef u_longlong_t fsblkcnt_t;
typedef u_longlong_t fsfilcnt_t;
# 193 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef long blksize_t;



typedef enum { _B_FALSE, _B_TRUE } boolean_t;
# 210 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef int64_t pad64_t;
typedef uint64_t upad64_t;
# 223 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef longlong_t offset_t;
typedef u_longlong_t u_offset_t;
typedef u_longlong_t len_t;
typedef longlong_t diskaddr_t;
# 244 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef union {
        offset_t _f;
        struct {
                int32_t _u;
                int32_t _l;
        } _p;
} lloff_t;
# 264 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef union {
        diskaddr_t _f;
        struct {
                int32_t _u;
                int32_t _l;
        } _p;
} lldaddr_t;


typedef uint_t k_fltset_t;
# 287 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef long id_t;






typedef uint_t useconds_t;



typedef long suseconds_t;
# 308 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef ulong_t major_t;
typedef ulong_t minor_t;





typedef short pri_t;
# 328 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef ushort_t o_mode_t;
typedef short o_dev_t;
typedef ushort_t o_uid_t;
typedef o_uid_t o_gid_t;
typedef short o_nlink_t;
typedef short o_pid_t;
typedef ushort_t o_ino_t;





typedef int key_t;



typedef ulong_t mode_t;







typedef long uid_t;



typedef uid_t gid_t;

typedef id_t taskid_t;
typedef id_t projid_t;






typedef unsigned int pthread_t;
typedef unsigned int pthread_key_t;

typedef struct _pthread_mutex {
        struct {
                uint16_t __pthread_mutex_flag1;
                uint8_t __pthread_mutex_flag2;
                uint8_t __pthread_mutex_ceiling;
                uint32_t __pthread_mutex_type;
        } __pthread_mutex_flags;
        union {
                struct {
                        uint8_t __pthread_mutex_pad[8];
                } __pthread_mutex_lock64;
                upad64_t __pthread_mutex_owner64;
        } __pthread_mutex_lock;
        upad64_t __pthread_mutex_data;
} pthread_mutex_t;

typedef struct _pthread_cond {
        struct {
                uint8_t __pthread_cond_flag[4];
                uint32_t __pthread_cond_type;
        } __pthread_cond_flags;
        upad64_t __pthread_cond_data;
} pthread_cond_t;




typedef struct _pthread_rwlock {
        int32_t __pthread_rwlock_readers;
        uint16_t __pthread_rwlock_type;
        uint16_t __pthread_rwlock_magic;
        upad64_t __pthread_rwlock_pad1[3];
        upad64_t __pthread_rwlock_pad2[2];
        upad64_t __pthread_rwlock_pad3[2];
} pthread_rwlock_t;




typedef struct _pthread_attr {
        void *__pthread_attrp;
} pthread_attr_t;





typedef struct _pthread_mutexattr {
        void *__pthread_mutexattrp;
} pthread_mutexattr_t;





typedef struct _pthread_condattr {
        void *__pthread_condattrp;
} pthread_condattr_t;




typedef struct _once {
        upad64_t __pthread_once_pad[4];
} pthread_once_t;





typedef struct _pthread_rwlockattr {
        void *__pthread_rwlockattrp;
} pthread_rwlockattr_t;

typedef ulong_t dev_t;





typedef ulong_t nlink_t;
typedef long pid_t;
# 481 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 3
typedef long time_t;




typedef long clock_t;




typedef int clockid_t;




typedef int timer_t;
# 21 "/usr/include/sys/wait.h" 2 3



# 1 "/usr/include/sys/resource.h" 1 3
# 16 "/usr/include/sys/resource.h" 3
#pragma ident "@(#)resource.h	1.25	98/06/30 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/resource.h" 2 3

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 21 "/usr/include/sys/resource.h" 2 3
# 1 "/usr/include/sys/time.h" 1 3
# 22 "/usr/include/sys/time.h" 3
#pragma ident "@(#)time.h	2.66	01/01/17 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 25 "/usr/include/sys/time.h" 2 3
# 49 "/usr/include/sys/time.h" 3
struct timeval {
        time_t tv_sec;
        suseconds_t tv_usec;
};
# 100 "/usr/include/sys/time.h" 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 101 "/usr/include/sys/time.h" 2 3
# 155 "/usr/include/sys/time.h" 3
struct itimerval {
        struct timeval it_interval;
        struct timeval it_value;
};
# 203 "/usr/include/sys/time.h" 3
typedef longlong_t hrtime_t;
# 331 "/usr/include/sys/time.h" 3
int getitimer(int, struct itimerval *);
int utimes(const char *, const struct timeval *);

int setitimer(int, const struct itimerval *, struct itimerval *);
# 389 "/usr/include/sys/time.h" 3
int gettimeofday(struct timeval *, void *);
# 423 "/usr/include/sys/time.h" 3
# 1 "/usr/include/sys/select.h" 1 3
# 12 "/usr/include/sys/select.h" 3
#pragma ident "@(#)select.h	1.16	98/04/27 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 15 "/usr/include/sys/select.h" 2 3


# 1 "/usr/include/sys/time.h" 1 3
# 18 "/usr/include/sys/select.h" 2 3
# 47 "/usr/include/sys/select.h" 3
typedef long fds_mask;
# 75 "/usr/include/sys/select.h" 3
typedef struct __fd_set {

        long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) * 8)))];
} fd_set;
# 97 "/usr/include/sys/select.h" 3
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
# 424 "/usr/include/sys/time.h" 2 3
# 22 "/usr/include/sys/resource.h" 2 3
# 75 "/usr/include/sys/resource.h" 3
typedef u_longlong_t rlim_t;
# 102 "/usr/include/sys/resource.h" 3
struct rlimit {
        rlim_t rlim_cur;
        rlim_t rlim_max;
};
# 143 "/usr/include/sys/resource.h" 3
struct rusage {
        struct timeval ru_utime;
        struct timeval ru_stime;
        long ru_maxrss;
        long ru_ixrss;
        long ru_idrss;
        long ru_isrss;
        long ru_minflt;
        long ru_majflt;
        long ru_nswap;
        long ru_inblock;
        long ru_oublock;
        long ru_msgsnd;
        long ru_msgrcv;
        long ru_nsignals;
        long ru_nvcsw;
        long ru_nivcsw;
};
# 193 "/usr/include/sys/resource.h" 3
extern int setrlimit64(int, const struct rlimit64 *);
extern int getrlimit64(int, struct rlimit64 *);
# 203 "/usr/include/sys/resource.h" 3
extern int getpriority(int, id_t);
extern int setpriority(int, id_t, int);
extern int getrusage(int, struct rusage *);
# 25 "/usr/include/sys/wait.h" 2 3
# 1 "/usr/include/sys/siginfo.h" 1 3
# 16 "/usr/include/sys/siginfo.h" 3
#pragma ident "@(#)siginfo.h	1.54	98/03/27 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/siginfo.h" 2 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 20 "/usr/include/sys/siginfo.h" 2 3
# 34 "/usr/include/sys/siginfo.h" 3
union sigval {
        int sival_int;
        void *sival_ptr;
};
# 69 "/usr/include/sys/siginfo.h" 3
struct sigevent {
        int sigev_notify;
        int sigev_signo;
        union sigval sigev_value;
        void (*sigev_notify_function)(union sigval);
        pthread_attr_t *sigev_notify_attributes;
        int __sigev_pad2;
};
# 126 "/usr/include/sys/siginfo.h" 3
# 1 "/usr/include/sys/machsig.h" 1 3
# 16 "/usr/include/sys/machsig.h" 3
#pragma ident "@(#)machsig.h	1.15	99/08/15 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/machsig.h" 2 3
# 127 "/usr/include/sys/siginfo.h" 2 3
# 208 "/usr/include/sys/siginfo.h" 3
# 1 "/usr/include/sys/time_std_impl.h" 1 3
# 19 "/usr/include/sys/time_std_impl.h" 3
#pragma ident "@(#)time_std_impl.h	1.2	98/02/13 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 22 "/usr/include/sys/time_std_impl.h" 2 3
# 32 "/usr/include/sys/time_std_impl.h" 3
typedef struct _timespec {
        time_t __tv_sec;
        long __tv_nsec;
} _timespec_t;

typedef struct _timespec _timestruc_t;
# 209 "/usr/include/sys/siginfo.h" 2 3
# 217 "/usr/include/sys/siginfo.h" 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 218 "/usr/include/sys/siginfo.h" 2 3





typedef struct {

        int si_signo;
        int si_code;
        int si_errno;



        union {

                int __pad[((128 / sizeof (int)) - 3)];

                struct {
                        pid_t __pid;
                        union {
                                struct {
                                        uid_t __uid;


                                        union sigval __value;



                                } __kill;
                                struct {
                                        clock_t __utime;
                                        int __status;
                                        clock_t __stime;
                                } __cld;
                        } __pdata;
                } __proc;

                struct {
                        void *__addr;
                        int __trapno;
                        caddr_t __pc;
                } __fault;

                struct {

                        int __fd;
                        long __band;
                } __file;

                struct {
                        caddr_t __faddr;




                        _timestruc_t __tstamp;

                        short __syscall;
                        char __nsysarg;
                        char __fault;
                        long __sysarg[8];
                        int __mstate[10];
                } __prof;

        } __data;

} siginfo_t;
# 26 "/usr/include/sys/wait.h" 2 3
# 1 "/usr/include/sys/procset.h" 1 3
# 16 "/usr/include/sys/procset.h" 3
#pragma ident "@(#)procset.h	1.20	00/02/14 SMI"





# 1 "/usr/include/sys/feature_tests.h" 1 3
# 23 "/usr/include/sys/procset.h" 2 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 24 "/usr/include/sys/procset.h" 2 3
# 41 "/usr/include/sys/procset.h" 3
typedef enum



                {
        P_PID,
        P_PPID,
        P_PGID,

        P_SID,
        P_CID,
        P_UID,
        P_GID,
        P_ALL,
        P_LWPID,
        P_TASKID,
        P_PROJID
} idtype_t;
# 27 "/usr/include/sys/wait.h" 2 3
# 86 "/usr/include/sys/wait.h" 3
extern pid_t wait(int *);
extern pid_t waitpid(pid_t, int *, int);


extern int waitid(idtype_t, id_t, siginfo_t *, int);
extern pid_t wait3(int *, int, struct rusage *);
# 23 "/usr/include/stdlib.h" 2 3
# 68 "/usr/include/stdlib.h" 3
typedef struct {
        long long quot;
        long long rem;
} lldiv_t;
# 109 "/usr/include/stdlib.h" 3
extern int rand_r(unsigned int *);


extern void _exithandle(void);




extern double drand48(void);
extern double erand48(unsigned short *);
extern long jrand48(unsigned short *);
extern void lcong48(unsigned short *);
extern long lrand48(void);
extern long mrand48(void);
extern long nrand48(unsigned short *);
extern unsigned short *seed48(unsigned short *);
extern void srand48(long);
extern int putenv(char *);
extern void setkey(const char *);
# 150 "/usr/include/stdlib.h" 3
extern int mkstemp64(char *);
# 161 "/usr/include/stdlib.h" 3
extern long a64l(const char *);
extern char *ecvt(double, int, int *, int *);
extern char *fcvt(double, int, int *, int *);
extern char *gcvt(double, int, char *);
extern int getsubopt(char **, char *const *, char **);
extern int grantpt(int);
extern char *initstate(unsigned, char *, size_t);
extern char *l64a(long);
extern char *mktemp(char *);
extern char *ptsname(int);
extern long random(void);
extern char *realpath(const char *, char *);
extern char *setstate(const char *);
extern void srandom(unsigned);
extern int ttyslot(void);
extern int unlockpt(int);
extern void *valloc(size_t);
# 26 "../magick/magick.h" 2
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdarg.h" 1 3
# 90 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/stdarg.h" 3
typedef __gnuc_va_list va_list;
# 27 "../magick/magick.h" 2

# 1 "/usr/include/unistd.h" 1 3
# 16 "/usr/include/unistd.h" 3
#pragma ident "@(#)unistd.h	1.58	99/11/11 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/unistd.h" 2 3

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 21 "/usr/include/unistd.h" 2 3
# 1 "/usr/include/sys/unistd.h" 1 3
# 25 "/usr/include/sys/unistd.h" 3
#pragma ident "@(#)unistd.h	1.37	98/10/28 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 28 "/usr/include/sys/unistd.h" 2 3
# 22 "/usr/include/unistd.h" 2 3
# 171 "/usr/include/unistd.h" 3
extern int access(const char *, int);




extern unsigned alarm(unsigned);


extern int brk(void *);

extern int chdir(const char *);
extern int chown(const char *, uid_t, gid_t);


extern int chroot(const char *);

extern int close(int);


extern size_t confstr(int, char *, size_t);
extern char *crypt(const char *, const char *);



extern char *ctermid(char *);


extern char *ctermid_r(char *);

extern char *cuserid(char *);
extern int dup(int);
extern int dup2(int, int);


extern void encrypt(char *, int);

extern int execl(const char *, const char *, ...);
extern int execle(const char *, const char *, ...);
extern int execlp(const char *, const char *, ...);
extern int execv(const char *, char *const *);
extern int execve(const char *, char *const *, char *const *);
extern int execvp(const char *, char *const *);
extern void _exit(int);
# 225 "/usr/include/unistd.h" 3
extern int fchdir(int);
extern int fchown(int, uid_t, gid_t);







extern int fdatasync(int);
# 245 "/usr/include/unistd.h" 3
extern pid_t fork(void);




extern long fpathconf(int, int);


extern int fsync(int);




extern int ftruncate64(int, off_t);

extern char *getcwd(char *, size_t);


extern int getdtablesize(void);

extern gid_t getegid(void);
extern uid_t geteuid(void);
extern gid_t getgid(void);
extern int getgroups(int, gid_t *);


extern long gethostid(void);


extern int gethostname(char *, size_t);




extern char *getlogin(void);


extern int getopt(int, char *const *, const char *);
extern char *optarg;
extern int opterr, optind, optopt;
extern char *getpass(const char *);



extern int getpagesize(void);
extern pid_t getpgid(pid_t);

extern pid_t getpid(void);
extern pid_t getppid(void);
extern pid_t getpgrp(void);






extern pid_t getsid(pid_t);

extern uid_t getuid(void);


extern char *getwd(char *);
# 321 "/usr/include/unistd.h" 3
extern int isatty(int);
extern int link(const char *, const char *);


extern int lchown(const char *, uid_t, gid_t);




extern int lockf64(int, int, off_t);



extern int readlink(const char *, char *, size_t);

extern off_t lseek64(int, off_t, int);


extern int nice(int);

extern long pathconf(const char *, int);
extern int pause(void);
extern int pipe(int *);







extern off_t tell64(int);
# 360 "/usr/include/unistd.h" 3
extern ssize_t pread64(int, void *, size_t, off_t);







extern int pthread_atfork(void (*) (void), void (*) (void), void (*) (void));
# 377 "/usr/include/unistd.h" 3
extern ssize_t pwrite64(int, const void *, size_t, off_t);

extern ssize_t read(int, void *, size_t);
# 388 "/usr/include/unistd.h" 3
extern int rmdir(const char *);


extern void *sbrk(intptr_t);

extern int setgid(gid_t);
# 402 "/usr/include/unistd.h" 3
extern int setpgid(pid_t, pid_t);


extern pid_t setpgrp(void);
extern int setregid(gid_t, gid_t);
extern int setreuid(uid_t, uid_t);

extern pid_t setsid(void);
extern int setuid(uid_t);




extern unsigned sleep(unsigned);






extern void swab(const void *, void *, ssize_t);



extern int symlink(const char *, const char *);
extern void sync(void);

extern long sysconf(int);




extern long __sysconf_xpg5(int);



extern pid_t tcgetpgrp(int);
extern int tcsetpgrp(int, pid_t);







extern int truncate64(const char *, off_t);

extern char *ttyname(int);


extern useconds_t ualarm(useconds_t, useconds_t);

extern int unlink(const char *);


extern int usleep(useconds_t);



extern pid_t vfork(void);





extern ssize_t write(int, const void *, size_t);
# 834 "/usr/include/unistd.h" 3
static int
getlogin_r(char *__name, int __len)
{
        extern int __posix_getlogin_r(char *, int);
        return (__posix_getlogin_r(__name, __len));
}
static int
ttyname_r(int __fildes, char *__buf, size_t __size)
{
        extern int __posix_ttyname_r(int, char *, size_t);
        return (__posix_ttyname_r(__fildes, __buf, __size));
}
# 29 "../magick/magick.h" 2
# 39 "../magick/magick.h"
# 1 "/usr/include/string.h" 1 3
# 16 "/usr/include/string.h" 3
#pragma ident "@(#)string.h	1.24	99/08/10 SMI"

# 1 "/usr/include/iso/string_iso.h" 1 3
# 28 "/usr/include/iso/string_iso.h" 3
#pragma ident "@(#)string_iso.h	1.2	99/11/09 SMI"


# 1 "/usr/include/sys/feature_tests.h" 1 3
# 32 "/usr/include/iso/string_iso.h" 2 3
# 60 "/usr/include/iso/string_iso.h" 3
extern int memcmp(const void *, const void *, size_t);
extern void *memcpy(void *, const void *, size_t);
extern void *memmove(void *, const void *, size_t);
extern void *memset(void *, int, size_t);
extern char *strcat(char *, const char *);
extern int strcmp(const char *, const char *);
extern char *strcpy(char *, const char *);
extern int strcoll(const char *, const char *);
extern size_t strcspn(const char *, const char *);
extern char *strerror(int);
extern size_t strlen(const char *);
extern char *strncat(char *, const char *, size_t);
extern int strncmp(const char *, const char *, size_t);
extern char *strncpy(char *, const char *, size_t);
extern size_t strspn(const char *, const char *);
extern char *strtok(char *, const char *);
extern size_t strxfrm(char *, const char *, size_t);
# 112 "/usr/include/iso/string_iso.h" 3
extern void *memchr(const void *, int, size_t);
extern char *strchr(const char *, int);
extern char *strpbrk(const char *, const char *);
extern char *strrchr(const char *, int);
extern char *strstr(const char *, const char *);
# 19 "/usr/include/string.h" 2 3
# 58 "/usr/include/string.h" 3
extern char *strtok_r(char *, const char *, char **);




extern void *memccpy(void *, const void *, int, size_t);
# 79 "/usr/include/string.h" 3
extern char *strdup(const char *);
# 40 "../magick/magick.h" 2
# 1 "/usr/include/ctype.h" 1 3
# 16 "/usr/include/ctype.h" 3
#pragma ident "@(#)ctype.h	1.33	99/08/10 SMI"

# 1 "/usr/include/iso/ctype_iso.h" 1 3
# 28 "/usr/include/iso/ctype_iso.h" 3
#pragma ident "@(#)ctype_iso.h	1.1	99/08/09 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 31 "/usr/include/iso/ctype_iso.h" 2 3
# 63 "/usr/include/iso/ctype_iso.h" 3
extern int isalnum(int);
extern int isalpha(int);
extern int iscntrl(int);
extern int isdigit(int);
extern int isgraph(int);
extern int islower(int);
extern int isprint(int);
extern int ispunct(int);
extern int isspace(int);
extern int isupper(int);
extern int isxdigit(int);







extern int tolower(int);
extern int toupper(int);





extern unsigned char __ctype[];
extern unsigned int *__ctype_mask;
extern int *__trans_upper;
extern int *__trans_lower;
# 19 "/usr/include/ctype.h" 2 3
# 49 "/usr/include/ctype.h" 3
extern int isascii(int);
extern int toascii(int);
extern int _tolower(int);
extern int _toupper(int);
# 41 "../magick/magick.h" 2
# 1 "/usr/include/locale.h" 1 3
# 9 "/usr/include/locale.h" 3
#pragma ident "@(#)locale.h	1.19	99/08/10 SMI"
# 46 "/usr/include/locale.h" 3
# 1 "/usr/include/iso/locale_iso.h" 1 3
# 45 "/usr/include/iso/locale_iso.h" 3
#pragma ident "@(#)locale_iso.h	1.1	99/08/09 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 48 "/usr/include/iso/locale_iso.h" 2 3
# 57 "/usr/include/iso/locale_iso.h" 3
struct lconv {
        char *decimal_point;
        char *thousands_sep;
        char *grouping;
        char *int_curr_symbol;
        char *currency_symbol;
        char *mon_decimal_point;
        char *mon_thousands_sep;
        char *mon_grouping;
        char *positive_sign;
        char *negative_sign;
        char int_frac_digits;
        char frac_digits;
        char p_cs_precedes;
        char p_sep_by_space;
        char n_cs_precedes;
        char n_sep_by_space;
        char p_sign_posn;
        char n_sign_posn;
};
# 95 "/usr/include/iso/locale_iso.h" 3
extern char *setlocale(int, const char *);
extern struct lconv *localeconv(void);
# 47 "/usr/include/locale.h" 2 3
# 42 "../magick/magick.h" 2
# 1 "/usr/include/errno.h" 1 3
# 17 "/usr/include/errno.h" 3
#pragma ident "@(#)errno.h	1.16	99/07/26 SMI"





# 1 "/usr/include/sys/errno.h" 1 3
# 11 "/usr/include/sys/errno.h" 3
#pragma ident "@(#)errno.h	1.20	00/02/14 SMI"
# 24 "/usr/include/errno.h" 2 3
# 38 "/usr/include/errno.h" 3
extern int *___errno();
# 43 "../magick/magick.h" 2
# 1 "/usr/include/fcntl.h" 1 3
# 16 "/usr/include/fcntl.h" 3
#pragma ident "@(#)fcntl.h	1.14	97/12/05 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/fcntl.h" 2 3


# 1 "/usr/include/sys/stat.h" 1 3
# 18 "/usr/include/sys/stat.h" 3
#pragma ident "@(#)stat.h	1.2	99/05/19 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 21 "/usr/include/sys/stat.h" 2 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 22 "/usr/include/sys/stat.h" 2 3
# 44 "/usr/include/sys/stat.h" 3
# 1 "/usr/include/sys/time_std_impl.h" 1 3
# 45 "/usr/include/sys/stat.h" 2 3
# 234 "/usr/include/sys/stat.h" 3
struct stat64 {
        dev_t st_dev;
        long st_pad1[3];
        ino_t st_ino;
        mode_t st_mode;
        nlink_t st_nlink;
        uid_t st_uid;
        gid_t st_gid;
        dev_t st_rdev;
        long st_pad2[2];
        off_t st_size;
# 254 "/usr/include/sys/stat.h" 3
        _timestruc_t st_atim;
        _timestruc_t st_mtim;
        _timestruc_t st_ctim;

        blksize_t st_blksize;
        blkcnt_t st_blocks;
        char st_fstype[16];
        long st_pad4[8];
};
# 470 "/usr/include/sys/stat.h" 3
extern int fchmod(int, mode_t);


extern int chmod(const char *, mode_t);
extern int mkdir(const char *, mode_t);
extern int mkfifo(const char *, mode_t);
extern mode_t umask(mode_t);
# 509 "/usr/include/sys/stat.h" 3
# 1 "/usr/include/sys/stat_impl.h" 1 3
# 9 "/usr/include/sys/stat_impl.h" 3
#pragma ident "@(#)stat_impl.h	1.1	99/05/04 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 12 "/usr/include/sys/stat_impl.h" 2 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 13 "/usr/include/sys/stat_impl.h" 2 3
# 26 "/usr/include/sys/stat_impl.h" 3
extern int fstat64(int, struct stat64 *);
extern int stat64(const char *, struct stat64 *);



extern int lstat64(const char *, struct stat64 *);
extern int mknod(const char *, mode_t, dev_t);
# 510 "/usr/include/sys/stat.h" 2 3
# 22 "/usr/include/fcntl.h" 2 3

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 24 "/usr/include/fcntl.h" 2 3
# 1 "/usr/include/sys/fcntl.h" 1 3
# 16 "/usr/include/sys/fcntl.h" 3
#pragma ident "@(#)fcntl.h	1.45	98/07/17 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/fcntl.h" 2 3

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 21 "/usr/include/sys/fcntl.h" 2 3
# 164 "/usr/include/sys/fcntl.h" 3
typedef struct flock {
        short l_type;
        short l_whence;
        off_t l_start;
        off_t l_len;
        int l_sysid;
        pid_t l_pid;
        long l_pad[4];
} flock_t;
# 25 "/usr/include/fcntl.h" 2 3
# 72 "/usr/include/fcntl.h" 3
extern int fcntl(int, int, ...);
extern int open64(const char *, int, ...);
extern int creat64(const char *, mode_t);
# 44 "../magick/magick.h" 2
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/math.h" 1 3
# 23 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/math.h" 3
#pragma ident "@(#)math.h	2.10	99/07/29 SMI"

# 1 "/usr/include/iso/math_iso.h" 1 3







#pragma ident "@(#)math_iso.h	1.1	99/07/30 SMI"
# 20 "/usr/include/iso/math_iso.h" 3
typedef union _h_val {
        unsigned long _i[sizeof(double) / sizeof(unsigned long)];
        double _d;
} _h_val;


extern const _h_val __huge_val;
# 37 "/usr/include/iso/math_iso.h" 3
extern double acos (double);
extern double asin (double);
extern double atan (double);
extern double atan2 (double, double);
extern double cos (double);
extern double sin (double);
extern double tan (double);

extern double cosh (double);
extern double sinh (double);
extern double tanh (double);

extern double exp (double);
extern double frexp (double, int *);
extern double ldexp (double, int);
extern double log (double);
extern double log10 (double);
extern double modf (double, double *);

extern double pow (double, double);
extern double sqrt (double);

extern double ceil (double);
extern double fabs (double);
extern double floor (double);
extern double fmod (double, double);
# 26 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/math.h" 2 3
# 89 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/math.h" 3
extern int signgam;
# 145 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/math.h" 3
extern double erf (double);
extern double erfc (double);
extern double gamma (double);
extern double hypot (double, double);
extern int isnan (double);
extern double j0 (double);
extern double j1 (double);
extern double jn (int, double);
extern double lgamma (double);
extern double y0 (double);
extern double y1 (double);
extern double yn (int, double);
# 172 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/math.h" 3
extern double acosh (double);
extern double asinh (double);
extern double atanh (double);
extern double cbrt (double);
extern double logb (double);
extern double nextafter (double, double);
extern double remainder (double, double);
extern double scalb (double, double);
# 192 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/math.h" 3
extern double expm1 (double);
extern int ilogb (double);
extern double log1p (double);
extern double rint (double);
# 45 "../magick/magick.h" 2
# 1 "/usr/include/time.h" 1 3
# 16 "/usr/include/time.h" 3
#pragma ident "@(#)time.h	1.39	99/08/10 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/time.h" 2 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 20 "/usr/include/time.h" 2 3
# 1 "/usr/include/iso/time_iso.h" 1 3
# 28 "/usr/include/iso/time_iso.h" 3
#pragma ident "@(#)time_iso.h	1.1	99/08/09 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 31 "/usr/include/iso/time_iso.h" 2 3
# 69 "/usr/include/iso/time_iso.h" 3
struct tm {
        int tm_sec;
        int tm_min;
        int tm_hour;
        int tm_mday;
        int tm_mon;
        int tm_year;
        int tm_wday;
        int tm_yday;
        int tm_isdst;
};




extern char *asctime(const struct tm *);
extern clock_t clock(void);
extern char *ctime(const time_t *);
extern double difftime(time_t, time_t);
extern struct tm *gmtime(const time_t *);
extern struct tm *localtime(const time_t *);
extern time_t mktime(struct tm *);
extern time_t time(time_t *);
extern size_t strftime(char *, size_t, const char *, const struct tm *);
# 21 "/usr/include/time.h" 2 3
# 60 "/usr/include/time.h" 3
extern struct tm *gmtime_r(const time_t *, struct tm *);
extern struct tm *localtime_r(const time_t *, struct tm *);





extern char *strptime(const char *, const char *, struct tm *);
# 83 "/usr/include/time.h" 3
# 1 "/usr/include/sys/time_impl.h" 1 3
# 15 "/usr/include/sys/time_impl.h" 3
#pragma ident "@(#)time_impl.h	1.5	99/10/05 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 18 "/usr/include/sys/time_impl.h" 2 3
# 36 "/usr/include/sys/time_impl.h" 3
typedef struct timespec {
        time_t tv_sec;
        long tv_nsec;
} timespec_t;
# 60 "/usr/include/sys/time_impl.h" 3
typedef struct timespec timestruc_t;
# 79 "/usr/include/sys/time_impl.h" 3
typedef struct itimerspec {
        struct timespec it_interval;
        struct timespec it_value;
} itimerspec_t;
# 84 "/usr/include/time.h" 2 3
# 116 "/usr/include/time.h" 3
extern int clock_getres(clockid_t, struct timespec *);
extern int clock_gettime(clockid_t, struct timespec *);
extern int clock_settime(clockid_t, const struct timespec *);
extern int timer_create(clockid_t, struct sigevent *, timer_t *);
extern int timer_delete(timer_t);
extern int timer_getoverrun(timer_t);
extern int timer_gettime(timer_t, struct itimerspec *);
extern int timer_settime(timer_t, int, const struct itimerspec *,
                struct itimerspec *);
extern int nanosleep(const struct timespec *, struct timespec *);




extern void tzset(void);

extern char *tzname[2];


extern long _sysconf(int);






extern long timezone;
extern int daylight;
# 156 "/usr/include/time.h" 3
extern struct tm *getdate(const char *);




extern int *_getdate_err_addr(void);
# 256 "/usr/include/time.h" 3
static char *
asctime_r(const struct tm *__tm, char *__buf)
{
        extern char *__posix_asctime_r(const struct tm *, char *);
        return (__posix_asctime_r(__tm, __buf));
}
static char *
ctime_r(const time_t *__time, char *__buf)
{
        extern char *__posix_ctime_r(const time_t *, char *);
        return (__posix_ctime_r(__time, __buf));
}
# 46 "../magick/magick.h" 2
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/limits.h" 1 3
# 11 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/limits.h" 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 1 3
# 25 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 3
#pragma ident "@(#)limits.h	1.51	99/10/08 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 28 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 2 3
# 1 "/usr/include/sys/isa_defs.h" 1 3
# 29 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 2 3
# 1 "/usr/include/iso/limits_iso.h" 1 3
# 28 "/usr/include/iso/limits_iso.h" 3
#pragma ident "@(#)limits_iso.h	1.1	99/08/09 SMI"
# 30 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 2 3
# 41 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 3
# 1 "/usr/include/sys/int_limits.h" 1 3
# 9 "/usr/include/sys/int_limits.h" 3
#pragma ident "@(#)int_limits.h	1.6	99/08/06 SMI"
# 44 "/usr/include/sys/int_limits.h" 3
# 1 "/usr/include/sys/isa_defs.h" 1 3
# 45 "/usr/include/sys/int_limits.h" 2 3
# 42 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 2 3
# 268 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 3
# 1 "/usr/include/sys/unistd.h" 1 3
# 269 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 2 3
# 279 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/syslimits.h" 3
extern long _sysconf(int);
# 12 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/limits.h" 2 3
# 47 "../magick/magick.h" 2
# 1 "/usr/local/include/assert.h" 1
# 29 "/usr/local/include/assert.h"
extern void __eprintf (const char *, const char *, unsigned, const char *);
# 48 "../magick/magick.h" 2


# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 51 "../magick/magick.h" 2
# 1 "/usr/include/sys/stat.h" 1 3
# 52 "../magick/magick.h" 2
# 66 "../magick/magick.h"
# 1 "/usr/include/dirent.h" 1 3
# 16 "/usr/include/dirent.h" 3
#pragma ident "@(#)dirent.h	1.29	99/03/11 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/dirent.h" 2 3

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 21 "/usr/include/dirent.h" 2 3
# 1 "/usr/include/sys/dirent.h" 1 3
# 16 "/usr/include/sys/dirent.h" 3
#pragma ident "@(#)dirent.h	1.32	99/05/04 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/sys/dirent.h" 2 3
# 28 "/usr/include/sys/dirent.h" 3
typedef struct dirent {
        ino_t d_ino;
        off_t d_off;
        unsigned short d_reclen;
        char d_name[1];
} dirent_t;
# 22 "/usr/include/dirent.h" 2 3
# 47 "/usr/include/dirent.h" 3
typedef struct {
        int d_fd;
        int d_loc;
        int d_size;
        char *d_buf;
} DIR;
# 76 "/usr/include/dirent.h" 3
extern DIR *opendir(const char *);
extern struct dirent *readdir64(DIR *);


extern long telldir(DIR *);
extern void seekdir(DIR *, long);

extern void rewinddir(DIR *);
extern int closedir(DIR *);
# 175 "/usr/include/dirent.h" 3
extern int readdir64_r(DIR *, struct dirent *, struct dirent **);
# 67 "../magick/magick.h" 2


# 1 "/usr/include/pwd.h" 1 3
# 16 "/usr/include/pwd.h" 3
#pragma ident "@(#)pwd.h	1.19	96/03/12 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 19 "/usr/include/pwd.h" 2 3

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 21 "/usr/include/pwd.h" 2 3
# 31 "/usr/include/pwd.h" 3
struct passwd {
        char *pw_name;
        char *pw_passwd;
        uid_t pw_uid;
        gid_t pw_gid;
        char *pw_age;
        char *pw_comment;
        char *pw_gecos;
        char *pw_dir;
        char *pw_shell;
};
# 55 "/usr/include/pwd.h" 3
extern struct passwd *getpwuid(uid_t);
extern struct passwd *getpwnam(const char *);
# 69 "/usr/include/pwd.h" 3
extern void endpwent(void);
extern struct passwd *getpwent(void);
extern void setpwent(void);
# 148 "/usr/include/pwd.h" 3
static int
getpwuid_r(uid_t __uid, struct passwd *__pwd, char *__buf, int __len,
                                                        struct passwd **__res)
{
        extern int __posix_getpwuid_r(uid_t, struct passwd *, char *, int,
                                                        struct passwd **);
        return (__posix_getpwuid_r(__uid, __pwd, __buf, __len, __res));
}
static int
getpwnam_r(const char *__cb, struct passwd *__pwd, char *__buf, int __len,
                                                        struct passwd **__res)
{
        extern int __posix_getpwnam_r(const char *, struct passwd *, char *,
                                                        int, struct passwd **);
        return (__posix_getpwnam_r(__cb, __pwd, __buf, __len, __res));
}
# 70 "../magick/magick.h" 2




# 1 "../magick/api.h" 1
# 84 "../magick/api.h"
# 1 "../magick/classify.h" 1
# 14 "../magick/classify.h"
typedef enum
{
  UndefinedCache,
  MemoryCache,
  DiskCache,
  MemoryMappedCache
} CacheType;

typedef enum
{
  UndefinedChannel,
  RedChannel,
  GreenChannel,
  BlueChannel,
  MatteChannel
} ChannelType;

typedef enum
{
  UndefinedClass,
  DirectClass,
  PseudoClass
} ClassType;

typedef enum
{
  UndefinedColorspace,
  RGBColorspace,
  GRAYColorspace,
  TransparentColorspace,
  OHTAColorspace,
  XYZColorspace,
  YCbCrColorspace,
  YCCColorspace,
  YIQColorspace,
  YPbPrColorspace,
  YUVColorspace,
  CMYKColorspace,
  sRGBColorspace
} ColorspaceType;

typedef enum
{
  AllCompliance,
  SVGCompliance,
  X11Compliance
} ComplianceType;

typedef enum
{
  UndefinedCompositeOp = 0,
  OverCompositeOp,
  InCompositeOp,
  OutCompositeOp,
  AtopCompositeOp,
  XorCompositeOp,
  PlusCompositeOp,
  MinusCompositeOp,
  AddCompositeOp,
  SubtractCompositeOp,
  DifferenceCompositeOp,
  MultiplyCompositeOp,
  BumpmapCompositeOp,
  CopyCompositeOp,
  CopyRedCompositeOp,
  CopyGreenCompositeOp,
  CopyBlueCompositeOp,
  CopyOpacityCompositeOp,
  ClearCompositeOp,
  DissolveCompositeOp,
  DisplaceCompositeOp,
  ModulateCompositeOp,
  ThresholdCompositeOp
} CompositeOperator;

typedef enum
{
  UndefinedCompression,
  NoCompression,
  BZipCompression,
  FaxCompression,
  Group4Compression,
  JPEGCompression,
  LosslessJPEGCompression,
  LZWCompression,
  RunlengthEncodedCompression,
  ZipCompression
} CompressionType;

typedef enum
{
  NoDecoration,
  UnderlineDecoration,
  OverlineDecoration,
  LineThroughDecoration
} DecorationType;

typedef enum
{
  UndefinedException,
  ResourceLimitWarning = 300,
  XServerWarning = 305,
  OptionWarning = 310,
  DelegateWarning = 315,
  MissingDelegateWarning = 320,
  CorruptImageWarning = 325,
  FileOpenWarning = 330,
  BlobWarning = 335,
  CacheWarning = 340,
  StreamWarning = 345,
  FatalException = 400,
  ResourceLimitError = 400,
  XServerError = 405,
  OptionError = 410,
  DelegateError = 415,
  MissingDelegateError = 420,
  CorruptImageError = 425,
  FileOpenError = 430,
  BlobError = 435,
  CacheError = 440,
  StreamError = 445
} ExceptionType;

typedef enum
{
  UndefinedRule,

  EvenOddRule,
  NonZeroRule
} FillRule;

typedef enum
{
  UndefinedFilter,
  PointFilter,
  BoxFilter,
  TriangleFilter,
  HermiteFilter,
  HanningFilter,
  HammingFilter,
  BlackmanFilter,
  GaussianFilter,
  QuadraticFilter,
  CubicFilter,
  CatromFilter,
  MitchellFilter,
  LanczosFilter,
  BesselFilter,
  SincFilter
} FilterTypes;

typedef enum
{

  NoValue = 0x0000,

  XValue = 0x0001,

  YValue = 0x0002,

  WidthValue = 0x0004,

  HeightValue = 0x0008,

  AllValues = 0x000F,

  XNegative = 0x0010,

  YNegative = 0x0020,
  AspectValue = 0x2000,
  GreaterValue = 0x8000,
  LessValue = 0x4000,
  PercentValue = 0x1000
} GeometryFlags;

typedef enum
{

  ForgetGravity,

  NorthWestGravity,

  NorthGravity,

  NorthEastGravity,

  WestGravity,

  CenterGravity,

  EastGravity,

  SouthWestGravity,

  SouthGravity,

  SouthEastGravity,

  StaticGravity
} GravityType;

typedef enum
{
  UndefinedType,
  BilevelType,
  GrayscaleType,
  GrayscaleMatteType,
  PaletteType,
  PaletteMatteType,
  TrueColorType,
  TrueColorMatteType,
  ColorSeparationType,
  ColorSeparationMatteType
} ImageType;

typedef enum
{
  UndefinedInterlace,
  NoInterlace,
  LineInterlace,
  PlaneInterlace,
  PartitionInterlace
} InterlaceType;

typedef enum
{
  UndefinedCap,
  ButtCap,
  RoundCap,
  SquareCap
} LineCap;

typedef enum
{
  UndefinedJoin,
  MiterJoin,
  RoundJoin,
  BevelJoin
} LineJoin;

typedef enum
{
  UndefinedMagicMethod,
  StringMagicMethod
} MagicMethod;

typedef enum
{
  ReadMode,
  WriteMode,
  IOMode
} MapMode;

typedef enum
{
  UndefinedMode,
  FrameMode,
  UnframeMode,
  ConcatenateMode
} MontageMode;

typedef enum
{
  UniformNoise,
  GaussianNoise,
  MultiplicativeGaussianNoise,
  ImpulseNoise,
  LaplacianNoise,
  PoissonNoise
} NoiseType;

typedef enum
{
  PointMethod = 0,
  ReplaceMethod,
  FloodfillMethod,
  FillToBorderMethod,
  ResetMethod
} PaintMethod;

typedef enum
{
  RootPath,
  HeadPath,
  TailPath,
  BasePath,
  ExtensionPath
} PathType;

typedef enum
{
  UndefinedProfile,
  ICMProfile,
  IPTCProfile
} ProfileType;

typedef enum
{
  UndefinedPreview = 0,
  RotatePreview,
  ShearPreview,
  RollPreview,
  HuePreview,
  SaturationPreview,
  BrightnessPreview,
  GammaPreview,
  SpiffPreview,
  DullPreview,
  GrayscalePreview,
  QuantizePreview,
  DespecklePreview,
  ReduceNoisePreview,
  AddNoisePreview,
  SharpenPreview,
  BlurPreview,
  ThresholdPreview,
  EdgeDetectPreview,
  SpreadPreview,
  SolarizePreview,
  ShadePreview,
  RaisePreview,
  SegmentPreview,
  SwirlPreview,
  ImplodePreview,
  WavePreview,
  OilPaintPreview,
  CharcoalDrawingPreview,
  JPEGPreview
} PreviewType;

typedef enum
{
  UndefinedPrimitive = 0,
  PointPrimitive,
  LinePrimitive,
  RectanglePrimitive,
  RoundRectanglePrimitive,
  ArcPrimitive,
  EllipsePrimitive,
  CirclePrimitive,
  PolylinePrimitive,
  PolygonPrimitive,
  BezierPrimitive,
  ColorPrimitive,
  MattePrimitive,
  TextPrimitive,
  ImagePrimitive,
  PathPrimitive
} PrimitiveType;

typedef enum
{
  IndexQuantum,
  GrayQuantum,
  IndexAlphaQuantum,
  GrayAlphaQuantum,
  RedQuantum,
  CyanQuantum,
  GreenQuantum,
  YellowQuantum,
  BlueQuantum,
  MagentaQuantum,
  AlphaQuantum,
  BlackQuantum,
  RGBQuantum,
  RGBAQuantum,
  CMYKQuantum,
  CMYKAQuantum
} QuantumType;

typedef enum
{
  UndefinedIntent,
  SaturationIntent,
  PerceptualIntent,
  AbsoluteIntent,
  RelativeIntent
} RenderingIntent;

typedef enum
{
  UndefinedResolution,
  PixelsPerInchResolution,
  PixelsPerCentimeterResolution
} ResolutionType;

typedef enum
{
  CharPixel,
  ShortPixel,
  IntegerPixel,
  FloatPixel,
  DoublePixel
} StorageType;

typedef enum
{
  UndefinedTimerState,
  StoppedTimerState,
  RunningTimerState
} TimerState;

typedef enum
{
  UndefinedTransmitType,
  FileTransmitType,
  BlobTransmitType,
  StreamTransmitType,
  ImageTransmitType
} TransmitType;

typedef enum
{
  ControlState = 0x0001,
  InactiveWidgetState = 0x0004,
  JumpListState = 0x0008,
  RedrawActionState = 0x0010,
  RedrawListState = 0x0020,
  RedrawWidgetState = 0x0040,
  UpdateListState = 0x0100
} WidgetState;

typedef enum
{

  DoRed = 0x0001,

  DoGreen = 0x0002,

  DoBlue = 0x0004,
  DoMatte = 0x0008
} XColorFlags;

typedef enum
{
  DefaultState = 0x0000,
  EscapeState = 0x0001,
  ExitState = 0x0002,
  FormerImageState = 0x0004,
  ModifierState = 0x0008,
  MontageImageState = 0x0010,
  NextImageState = 0x0020,
  RetainColorsState = 0x0040,
  SuspendTime = 50,
  UpdateConfigurationState = 0x0080,
  UpdateRegionState = 0x0100
} XState;
# 85 "../magick/api.h" 2
# 1 "../magick/image.h" 1
# 22 "../magick/image.h"
typedef unsigned short Quantum;
# 51 "../magick/image.h"
typedef struct _AffineMatrix
{
  double
    sx,
    rx,
    ry,
    sy,
    tx,
    ty;
} AffineMatrix;

typedef struct _Ascii85Info
{
  int
    offset,
    line_break;

  unsigned char
    buffer[10];
} Ascii85Info;

typedef struct _PointInfo
{
  double
    x,
    y,
    z;
} PointInfo;

typedef struct _PixelPacket
{

  Quantum
    red,
    green,
    blue,
    opacity;
# 103 "../magick/image.h"
} PixelPacket;

typedef struct _RectangleInfo
{
  unsigned int
    width,
    height;

  int
    x,
    y;
} RectangleInfo;

typedef struct _BoundingBox
{
  double
    width,
    height,
    x,
    y;
} BoundingBox;

typedef struct _BlobInfo
{
  unsigned int
    mapped;

  unsigned char
    *data;

  off_t
    offset;

  size_t
    length,
    extent,
    quantum;

  unsigned long
    signature;
} BlobInfo;

typedef struct _ChromaticityInfo
{
  PointInfo
    red_primary,
    green_primary,
    blue_primary,
    white_point;
} ChromaticityInfo;

typedef struct _ExceptionInfo
{
  ExceptionType
    severity;

  char
    *reason,
    *description;

  unsigned long
    signature;
} ExceptionInfo;

typedef struct _FrameInfo
{
  unsigned int
    width,
    height;

  int
    x,
    y,
    inner_bevel,
    outer_bevel;
} FrameInfo;

typedef struct _ImageAttribute
{
  char
    *key,
    *value;

  unsigned int
    compression;

  struct _ImageAttribute
    *previous,
    *next;
} ImageAttribute;

typedef Quantum IndexPacket;

typedef struct _MontageInfo
{
  char
    filename[2053],
    *geometry,
    *tile,
    *title,
    *frame,
    *texture,
    *font;

  double
    pointsize;

  GravityType
    gravity;

  unsigned int
    border_width,
    shadow;

  CompositeOperator
    compose;

  PixelPacket
    fill,
    stroke,
    background_color,
    border_color,
    matte_color;

  unsigned long
    signature;
} MontageInfo;

typedef struct _ProfileInfo
{
  unsigned int
    length;

  char
    *name;

  unsigned char
    *info;
} ProfileInfo;

typedef struct _SegmentInfo
{
  double
    x1,
    y1,
    x2,
    y2;
} SegmentInfo;

typedef struct _Timer
{
  double
    start,
    stop,
    total;
} Timer;

typedef struct _TimerInfo
{
  Timer
    user,
    elapsed;

  TimerState
    state;

  unsigned long
    signature;
} TimerInfo;

typedef struct _Image
{
  int
    exempt,
    status,
    temporary;

  char
    filename[2053];

  FILE
    *file;

  size_t
    filesize;

  int
    pipet;

  char
    magick[2053];

  ClassType
    class;

  unsigned int
    matte;

  CompressionType
    compression;

  unsigned int
    columns,
    rows,
    depth;

  int
    offset;

  RectangleInfo
    tile_info;

  InterlaceType
    interlace;

  unsigned int
    scene;

  char
    *montage,
    *directory;

  PixelPacket
    *colormap;

  unsigned int
    colors;

  ColorspaceType
    colorspace;

  RenderingIntent
    rendering_intent;

  double
    gamma;

  ChromaticityInfo
    chromaticity;

  ProfileInfo
    color_profile,
    iptc_profile;

  unsigned int
    generic_profiles;

  ProfileInfo
    *generic_profile;

  ResolutionType
    units;

  double
    x_resolution,
    y_resolution;

  PixelPacket
    background_color,
    border_color,
    matte_color;

  char
    *geometry;

  RectangleInfo
    page;

  unsigned int
    dispose,
    delay,
    iterations;

  double
    fuzz;

  FilterTypes
    filter;

  double
    blur;

  size_t
    total_colors;

  unsigned int
    mean_error_per_pixel;

  double
    normalized_mean_error,
    normalized_maximum_error;

  char
    magick_filename[2053];

  unsigned int
    magick_columns,
    magick_rows;

  int
    start_loop,
    taint;

  TimerInfo
    timer;

  ExceptionInfo
    exception;

  Ascii85Info
    ascii85;

  BlobInfo
    blob;

  ImageAttribute
    *attributes;

  void
    *cache;

  int
    (*fifo)(const struct _Image *,const void *,const size_t);

  void
    *client_data;

  unsigned int
    orphan;

  struct _Image
    *previous,
    *list,
    *next;

  unsigned long
    signature;
} Image;

typedef struct _ImageInfo
{



  BlobInfo
    blob;




  FILE
    *file;

  char
    filename[2053],
    magick[2053],
    unique[2053],
    zero[2053];

  unsigned int
    temporary,
    adjoin,
    subimage,
    subrange,
    depth;

  char
    *size,
    *tile,
    *page;

  InterlaceType
    interlace;

  ResolutionType
    units;




  CompressionType
    compression;

  unsigned int
    quality;




  char
    *server_name,
    *font,
    *texture,
    *density;

  unsigned int
    antialias;

  double
    pointsize;

  double
    fuzz;

  PixelPacket
    pen,
    background_color,
    border_color,
    matte_color;




  unsigned int
    dither,
    monochrome;

  ColorspaceType
    colorspace;




  PreviewType
    preview_type;

  char
    *view;

  long
    group;

  unsigned int
    ping,
    verbose,
    debug;

  int
    (*fifo)(const Image *,const void *,const size_t);

  void
    *client_data;

  unsigned long
    signature;
} ImageInfo;

typedef struct _MagickInfo
{
  char
    *name;

  ImageInfo
    *image_info;

  Image
    *(*decoder)(const ImageInfo *,ExceptionInfo *);

  unsigned int
    (*encoder)(const ImageInfo *,Image *),
    (*magick)(const unsigned char *,const unsigned int),
    adjoin,
    blob_support,
    raw,
    stealth;

  char
    *description,
    *module;

  void
    *client_data;

  struct _MagickInfo
    *previous,
    *next;

  unsigned long
    signature;
} MagickInfo;




extern const char
  *Alphabet,
  *AppendBinaryType,
  *BackgroundColor,
  *BorderColor,
  *DefaultPointSize,
  *DefaultTileFrame,
  *DefaultTileGeometry,
  *DefaultTileLabel,
  *ForegroundColor,
  *MatteColor,
  *LoadImageText,
  *LoadImagesText,
  *PSDensityGeometry,
  *PSPageGeometry,
  *ReadBinaryType,
  *ReadBinaryUnbufferedType,
  *SaveImageText,
  *SaveImagesText,
  *WriteBinaryType;




extern char
  *GetImageMagick(const unsigned char *,const unsigned int),
  *GetMagickConfigurePath(const char *),
  *GetMagickVersion(unsigned int *);

extern Image
  *AddNoiseImage(Image *,const NoiseType,ExceptionInfo *),
  *AllocateImage(const ImageInfo *),
  *AppendImages(Image *,const unsigned int,ExceptionInfo *),
  *AverageImages(Image *,ExceptionInfo *),
  *BlurImage(Image *,const double,const double,ExceptionInfo *),
  *BorderImage(Image *,const RectangleInfo *,ExceptionInfo *),
  *ChopImage(Image *,const RectangleInfo *,ExceptionInfo *),
  *CloneImage(Image *,const unsigned int,const unsigned int,const unsigned int,
    ExceptionInfo *),
  *CoalesceImages(Image *,ExceptionInfo *),
  *ColorizeImage(Image *,const char *,const PixelPacket,ExceptionInfo *),
  *ConstituteImage(const unsigned int,const unsigned int,const char *,
    const StorageType,const void *,ExceptionInfo *),
  *ConvolveImage(Image *,const unsigned int,const double *,ExceptionInfo *),
  *CropImage(Image *,const RectangleInfo *,ExceptionInfo *),
  *DeconstructImages(Image *,ExceptionInfo *),
  *DespeckleImage(Image *,ExceptionInfo *),
  *EdgeImage(Image *,const double,ExceptionInfo *),
  *EmbossImage(Image *,const double,const double,ExceptionInfo *),
  *EnhanceImage(Image *,ExceptionInfo *),
  *FlattenImages(Image *,ExceptionInfo *),
  *FlipImage(Image *,ExceptionInfo *),
  *FlopImage(Image *,ExceptionInfo *),
  *FrameImage(Image *,const FrameInfo *,ExceptionInfo *),
  *GetNextImage(Image *),
  *GaussianBlurImage(Image *,const double,const double,ExceptionInfo *),
  *ImplodeImage(Image *,const double,ExceptionInfo *),
  **ListToGroupImage(Image *,unsigned int *),
  *MagnifyImage(Image *,ExceptionInfo *),
  *MedianFilterImage(Image *,const double,ExceptionInfo *),
  *MinifyImage(Image *,ExceptionInfo *),
  *MontageImages(Image *,const MontageInfo *,ExceptionInfo *),
  *MorphImages(Image *,const unsigned int,ExceptionInfo *),
  *MosaicImages(Image *,ExceptionInfo *),
  *MotionBlurImage(Image *,const double,const double,const double,
    ExceptionInfo *),
  *OilPaintImage(Image *,const double,ExceptionInfo *),
  *PingImage(const ImageInfo *,ExceptionInfo *),
  *ReadImage(const ImageInfo *,ExceptionInfo *),
  *ReduceNoiseImage(Image *,const double,ExceptionInfo *),
  *ResizeImage(Image *,const unsigned int,const unsigned int,const FilterTypes,
    const double,ExceptionInfo *),
  *RollImage(Image *,const int,const int,ExceptionInfo *),
  *RotateImage(Image *,const double,ExceptionInfo *),
  *SampleImage(Image *,const unsigned int,const unsigned int,ExceptionInfo *),
  *ScaleImage(Image *,const unsigned int,const unsigned int,ExceptionInfo *),
  *ShadeImage(Image *,const unsigned int,double,double,ExceptionInfo *),
  *SharpenImage(Image *,const double,const double,ExceptionInfo *),
  *ShaveImage(Image *,const RectangleInfo *,ExceptionInfo *),
  *ShearImage(Image *,const double,const double,ExceptionInfo *),
  *SpreadImage(Image *,const unsigned int,ExceptionInfo *),
  *SteganoImage(Image *,Image *,ExceptionInfo *),
  *StereoImage(Image *,Image *,ExceptionInfo *),
  *SwirlImage(Image *,double,ExceptionInfo *),
  *UnsharpMaskImage(Image *,const double,const double,const double,const double,
    ExceptionInfo *),
  *WaveImage(Image *,const double,const double,ExceptionInfo *),
  *ZoomImage(Image *,const unsigned int,const unsigned int,ExceptionInfo *);

extern ImageInfo
  *CloneImageInfo(const ImageInfo *);

extern ImageType
  GetImageType(Image *);

extern IndexPacket
  *(*GetIndexes)(const Image *);

extern int
  ParseGeometry(const char *,int *,int *,unsigned int *,unsigned int *),
  ParseImageGeometry(const char *,int *,int *,unsigned int *,unsigned int *);

extern MagickInfo
  *GetMagickInfo(const char *,ExceptionInfo *exception),
  *RegisterMagickInfo(MagickInfo *),
  *SetMagickInfo(const char *);

extern MontageInfo
  *CloneMontageInfo(const ImageInfo *,const MontageInfo *);

extern PixelPacket
  *(*GetImagePixels)
    (Image *,const int,const int,const unsigned int,const unsigned int),
  (*GetOnePixel)(Image *,const int,const int),
  *(*GetPixels)(const Image *),
  *(*SetImagePixels)
    (Image *,const int,const int,const unsigned int,const unsigned int);

extern RectangleInfo
  GetImageBoundingBox(Image *);

extern unsigned int
  AllocateImageColormap(Image *,const unsigned int),
  AnimateImages(const ImageInfo *image_info,Image *image),
  ChannelImage(Image *,const ChannelType),
  CompositeImage(Image *,const CompositeOperator,Image *,const int,const int),
  ContrastImage(Image *,const unsigned int),
  DispatchImage(Image *,const int,const int,const unsigned int,
    const unsigned int,const char *,const StorageType,void *),
  DisplayImages(const ImageInfo *image_info,Image *image),
  EqualizeImage(Image *),
  GammaImage(Image *,const char *),
  GetImageDepth(Image *),
  GetNumberScenes(const Image *),
  IsGeometry(const char *),
  IsImagesEqual(Image *,Image *),
  IsMagickConflict(const char *),
  IsSubimage(const char *,const unsigned int),
  IsImageTainted(const Image *),
  ListMagickInfo(FILE *,ExceptionInfo *),
  ModulateImage(Image *,const char *),
  MogrifyImage(const ImageInfo *,const int,char **,Image **),
  MogrifyImages(const ImageInfo *,const int,char **,Image **),
  NegateImage(Image *,const unsigned int),
  NormalizeImage(Image *),
  OpaqueImage(Image *,const PixelPacket,const PixelPacket),
  PlasmaImage(Image *,const SegmentInfo *,int,int),
  PopImagePixels(Image *,const QuantumType,unsigned char *),
  ProfileImage(Image *,const char *,const char *),
  PushImagePixels(Image *,const QuantumType,const unsigned char *),
  RaiseImage(Image *,const RectangleInfo *,const int),
  ReadStream(const ImageInfo *,int (*)(const Image *,const void *,const size_t),
    ExceptionInfo *),
  RGBTransformImage(Image *,const ColorspaceType),
  SetImageDepth(Image *,const unsigned int),
  SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
  SignatureImage(Image *),
  SortColormapByIntensity(Image *),
  (*SyncImagePixels)(Image *),
  ThresholdImage(Image *,const double),
  TransformRGBImage(Image *,const ColorspaceType),
  TransmitImage(Image *,ImageInfo *,const TransmitType,void *,void *),
  TransparentImage(Image *,const PixelPacket,const unsigned int),
  UnregisterMagickInfo(const char *),
  WriteImage(const ImageInfo *,Image *),
  WriteStream(ImageInfo *,Image *,
    int (*)(const Image *,const void *,const size_t));

extern void
  AllocateNextImage(const ImageInfo *,Image *),
  (*CloseImagePixels)(Image *),
  CompressColormap(Image *),
  CycleColormapImage(Image *,const int),
  DescribeImage(Image *,FILE *,const unsigned int),
  DestroyImage(Image *),
  DestroyImageInfo(ImageInfo *),
  (*DestroyImagePixels)(Image *),
  DestroyImages(Image *),
  DestroyMontageInfo(MontageInfo *),
  GetImageInfo(ImageInfo *),
  GetMontageInfo(const ImageInfo *,MontageInfo *),
  MagickIncarnate(const char *),
  Register8BIMImage(void),
  RegisterARTImage(void),
  RegisterAVIImage(void),
  RegisterAVSImage(void),
  RegisterBIEImage(void),
  RegisterBMPImage(void),
  RegisterCMYKImage(void),
  RegisterCUTImage(void),
  RegisterDCMImage(void),
  RegisterDCXImage(void),
  RegisterDIBImage(void),
  RegisterDPSImage(void),
  RegisterDPXImage(void),
  RegisterEPDFImage(void),
  RegisterEPIImage(void),
  RegisterEPSImage(void),
  RegisterEPS2Image(void),
  RegisterEPSFImage(void),
  RegisterEPSIImage(void),
  RegisterEPTImage(void),
  RegisterFAXImage(void),
  RegisterFITSImage(void),
  RegisterFPXImage(void),
  RegisterG3Image(void),
  RegisterGIFImage(void),
  RegisterGIF87Image(void),
  RegisterGRADIENTImage(void),
  RegisterGRANITEImage(void),
  RegisterGRAYImage(void),
  RegisterHImage(void),
  RegisterHDFImage(void),
  RegisterHISTOGRAMImage(void),
  RegisterHTMImage(void),
  RegisterHTMLImage(void),
  RegisterICBImage(void),
  RegisterICMImage(void),
  RegisterICONImage(void),
  RegisterIMPLICITImage(void),
  RegisterIPTCImage(void),
  RegisterJBGImage(void),
  RegisterJBIGImage(void),
  RegisterJPGImage(void),
  RegisterJPEGImage(void),
  RegisterJP2Image(void),
  RegisterLABELImage(void),
  RegisterLOGOImage(void),
  RegisterMAPImage(void),
  RegisterMATTEImage(void),
  RegisterMIFFImage(void),
  RegisterMNGImage(void),
  RegisterMONOImage(void),
  RegisterMPCImage(void),
  RegisterMTVImage(void),
  RegisterMVGImage(void),
  RegisterNETSCAPEImage(void),
  RegisterNULLImage(void),
  RegisterP7Image(void),
  RegisterPBMImage(void),
  RegisterPCDImage(void),
  RegisterPCDSImage(void),
  RegisterPCLImage(void),
  RegisterPCTImage(void),
  RegisterPCXImage(void),
  RegisterPDBImage(void),
  RegisterPDFImage(void),
  RegisterPICImage(void),
  RegisterPICTImage(void),
  RegisterPIXImage(void),
  RegisterPLASMAImage(void),
  RegisterPGMImage(void),
  RegisterPMImage(void),
  RegisterPNGImage(void),
  RegisterPNMImage(void),
  RegisterPPMImage(void),
  RegisterPREVIEWImage(void),
  RegisterPSImage(void),
  RegisterPS2Image(void),
  RegisterPS3Image(void),
  RegisterPSDImage(void),
  RegisterPTIFImage(void),
  RegisterPWPImage(void),
  RegisterRASImage(void),
  RegisterRGBImage(void),
  RegisterRGBAImage(void),
  RegisterRLAImage(void),
  RegisterRLEImage(void),
  RegisterSCTImage(void),
  RegisterSFWImage(void),
  RegisterSGIImage(void),
  RegisterSHTMLImage(void),
  RegisterSTEGANOImage(void),
  RegisterSUNImage(void),
  RegisterSVGImage(void),
  RegisterTEXTImage(void),
  RegisterTGAImage(void),
  RegisterTIFImage(void),
  RegisterTIFFImage(void),
  RegisterTILEImage(void),
  RegisterTIMImage(void),
  RegisterTTFImage(void),
  RegisterTXTImage(void),
  RegisterUILImage(void),
  RegisterURLImage(void),
  RegisterUYVYImage(void),
  RegisterVDAImage(void),
  RegisterVICARImage(void),
  RegisterVIDImage(void),
  RegisterVIFFImage(void),
  RegisterVSTImage(void),
  RegisterWBMPImage(void),
  RegisterWMFImage(void),
  RegisterWPGImage(void),
  RegisterXImage(void),
  RegisterXBMImage(void),
  RegisterXCImage(void),
  RegisterXPMImage(void),
  RegisterXVImage(void),
  RegisterXWDImage(void),
  RegisterYUVImage(void),
  SetImage(Image *,const Quantum),
  SetImageOpacity(Image *,const unsigned int),
  SetImageType(Image *,const ImageType),
  SolarizeImage(Image *,const double),
  SyncImage(Image *),
  TextureImage(Image *,Image *),
  TransformHSL(const Quantum,const Quantum,const Quantum,double *,double *,
    double *),
  TransformImage(Image **,const char *,const char *),
  Unregister8BIMImage(void),
  UnregisterARTImage(void),
  UnregisterAVIImage(void),
  UnregisterAVSImage(void),
  UnregisterBIEImage(void),
  UnregisterBMPImage(void),
  UnregisterCMYKImage(void),
  UnregisterCUTImage(void),
  UnregisterDCMImage(void),
  UnregisterDCXImage(void),
  UnregisterDIBImage(void),
  UnregisterDPSImage(void),
  UnregisterDPXImage(void),
  UnregisterEPDFImage(void),
  UnregisterEPIImage(void),
  UnregisterEPSImage(void),
  UnregisterEPS2Image(void),
  UnregisterEPSFImage(void),
  UnregisterEPSIImage(void),
  UnregisterEPTImage(void),
  UnregisterFAXImage(void),
  UnregisterFITSImage(void),
  UnregisterFPXImage(void),
  UnregisterG3Image(void),
  UnregisterGIFImage(void),
  UnregisterGIF87Image(void),
  UnregisterGRADIENTImage(void),
  UnregisterGRANITEImage(void),
  UnregisterGRAYImage(void),
  UnregisterHImage(void),
  UnregisterHDFImage(void),
  UnregisterHISTOGRAMImage(void),
  UnregisterHTMImage(void),
  UnregisterHTMLImage(void),
  UnregisterICBImage(void),
  UnregisterICMImage(void),
  UnregisterICONImage(void),
  UnregisterIMPLICITImage(void),
  UnregisterIPTCImage(void),
  UnregisterJBGImage(void),
  UnregisterJBIGImage(void),
  UnregisterJPGImage(void),
  UnregisterJPEGImage(void),
  UnregisterJP2Image(void),
  UnregisterLABELImage(void),
  UnregisterLOGOImage(void),
  UnregisterMAPImage(void),
  UnregisterMATTEImage(void),
  UnregisterMIFFImage(void),
  UnregisterMNGImage(void),
  UnregisterMONOImage(void),
  UnregisterMPCImage(void),
  UnregisterMTVImage(void),
  UnregisterMVGImage(void),
  UnregisterNETSCAPEImage(void),
  UnregisterNULLImage(void),
  UnregisterP7Image(void),
  UnregisterPBMImage(void),
  UnregisterPCDImage(void),
  UnregisterPCDSImage(void),
  UnregisterPCLImage(void),
  UnregisterPCTImage(void),
  UnregisterPCXImage(void),
  UnregisterPDBImage(void),
  UnregisterPDFImage(void),
  UnregisterPICImage(void),
  UnregisterPICTImage(void),
  UnregisterPIXImage(void),
  UnregisterPLASMAImage(void),
  UnregisterPGMImage(void),
  UnregisterPMImage(void),
  UnregisterPNGImage(void),
  UnregisterPNMImage(void),
  UnregisterPPMImage(void),
  UnregisterPREVIEWImage(void),
  UnregisterPSImage(void),
  UnregisterPS2Image(void),
  UnregisterPS3Image(void),
  UnregisterPSDImage(void),
  UnregisterPTIFImage(void),
  UnregisterPWPImage(void),
  UnregisterRASImage(void),
  UnregisterRGBImage(void),
  UnregisterRGBAImage(void),
  UnregisterRLAImage(void),
  UnregisterRLEImage(void),
  UnregisterSCTImage(void),
  UnregisterSFWImage(void),
  UnregisterSGIImage(void),
  UnregisterSHTMLImage(void),
  UnregisterSTEGANOImage(void),
  UnregisterSUNImage(void),
  UnregisterSVGImage(void),
  UnregisterTEXTImage(void),
  UnregisterTGAImage(void),
  UnregisterTIFImage(void),
  UnregisterTIFFImage(void),
  UnregisterTILEImage(void),
  UnregisterTIMImage(void),
  UnregisterTTFImage(void),
  UnregisterTXTImage(void),
  UnregisterUILImage(void),
  UnregisterURLImage(void),
  UnregisterUYVYImage(void),
  UnregisterVDAImage(void),
  UnregisterVICARImage(void),
  UnregisterVIDImage(void),
  UnregisterVIFFImage(void),
  UnregisterVSTImage(void),
  UnregisterWBMPImage(void),
  UnregisterWMFImage(void),
  UnregisterWPGImage(void),
  UnregisterXImage(void),
  UnregisterXBMImage(void),
  UnregisterXCImage(void),
  UnregisterXPMImage(void),
  UnregisterXVImage(void),
  UnregisterXWDImage(void),
  UnregisterYUVImage(void);
# 86 "../magick/api.h" 2
# 1 "../magick/colors.h" 1
# 14 "../magick/colors.h"
typedef struct _ColorInfo
{
  char
    *filename,
    *name;

  ComplianceType
    compliance;

  PixelPacket
    color;

  struct _ColorInfo
    *previous,
    *next;
} ColorInfo;




extern IndexPacket
  ValidateColormapIndex(Image *,const int);

extern char
  **GetColorList(const char *,int *);

extern ColorInfo
  *GetColorInfo(const char *,ExceptionInfo *);

extern size_t
  GetNumberColors(Image *,FILE *);

extern unsigned int
  IsGrayImage(Image *),
  IsMonochromeImage(Image *),
  IsOpaqueImage(Image *),
  IsPseudoClass(Image *),
  ListColorInfo(FILE *,ExceptionInfo *),
  QueryColorDatabase(const char *,PixelPacket *),
  QueryColorname(Image *,const PixelPacket *,const ComplianceType,char *);

extern void
  DestroyColorInfo(void);
# 87 "../magick/api.h" 2
# 1 "../magick/draw.h" 1
# 14 "../magick/draw.h"
typedef struct _EdgeInfo
{
  SegmentInfo
    bounds;

  double
    scanline;

  PointInfo
    *points;

  int
    number_points,
    direction,
    ghostline,
    highwater;
} EdgeInfo;

typedef struct _PolygonInfo
{
  EdgeInfo
    *edges;

  int
    number_edges;
} PolygonInfo;

typedef struct _DrawInfo
{
  char
    *primitive,
    *text,
    *geometry;

  AffineMatrix
    affine;

  GravityType
    gravity;

  Quantum
    opacity;

  Image
    *tile;

  PixelPacket
    fill,
    stroke;

  unsigned int
    stroke_antialias;

  double
    stroke_width;

  FillRule
    fill_rule;

  LineCap
    linecap;

  LineJoin
    linejoin;

  unsigned int
    miterlimit,
    dash_offset;

  DecorationType
    decorate;

  char
    *font,
    *density;

  unsigned int
    text_antialias;

  double
    pointsize;

  PixelPacket
    box,
    border_color;

  CompositeOperator
    compose;

  char
    *server_name;

  unsigned int
    *dash_pattern;

  PolygonInfo
    clip_path;

  unsigned int
    debug;

  unsigned long
    signature;
} DrawInfo;

typedef struct _FontInfo
{
  char
    *filename,
    *name,
    *family,
    *alias,
    *description,
    *format,
    *weight,
    *glyphs,
    *metrics,
    *version;

  struct _FontInfo
    *previous,
    *next;
} FontInfo;

typedef struct _FontMetric
{
  PointInfo
    pixels_per_em;

  int
    ascent,
    descent;

  unsigned int
    width,
    height,
    max_advance;
} FontMetric;

typedef struct _PrimitiveInfo
{
  PointInfo
    point;

  PrimitiveType
    primitive;

  unsigned int
    coordinates;

  PaintMethod
    method;

  char
    *text;
} PrimitiveInfo;




extern DrawInfo
  *CloneDrawInfo(const ImageInfo *,const DrawInfo *);

extern FontInfo
  *GetFontInfo(const char *,ExceptionInfo *);

extern unsigned int
  AnnotateImage(Image *,const DrawInfo *),
  ColorFloodfillImage(Image *,const DrawInfo *,const PixelPacket,const int x,
    const int y,const PaintMethod),
  DrawImage(Image *,const DrawInfo *),
  GetFontMetrics(Image *,const DrawInfo *,FontMetric *),
  ListFontInfo(FILE *,ExceptionInfo *),
  MatteFloodfillImage(Image *,const PixelPacket,const unsigned int,const int x,
    const int y,const PaintMethod);

extern void
  DestroyDrawInfo(DrawInfo *),
  DestroyFontInfo(void),
  GetDrawInfo(const ImageInfo *,DrawInfo *);
# 88 "../magick/api.h" 2
# 1 "../magick/gems.h" 1
# 14 "../magick/gems.h"
extern double
  ExpandAffine(const AffineMatrix *),
  Permutate(int,int);

extern int
  GetOptimalKernelWidth(const double,const double),
  GetOptimalKernelWidth1D(const double,const double),
  GetOptimalKernelWidth2D(const double,const double);

extern PixelPacket
  AlphaComposite(const CompositeOperator,const PixelPacket *,const double,
    const PixelPacket *,const double),
  InterpolateColor(Image *,const double,const double);

extern Quantum
  GenerateNoise(const Quantum,const NoiseType);

extern void
  Contrast(const int,Quantum *,Quantum *,Quantum *),
  HSLTransform(const double,const double,const double,Quantum *,Quantum *,
    Quantum *),
  Hull(const int,const int,const int,const unsigned int,const unsigned int,
    Quantum *,Quantum *),
  IdentityAffine(AffineMatrix *),
  Modulate(double,double,double,Quantum *,Quantum *,Quantum *),
  TransformHSL(const Quantum,const Quantum,const Quantum,double *,double *,
    double *),
  Upsample(const unsigned int,const unsigned int,const unsigned int,
    unsigned char *);
# 89 "../magick/api.h" 2
# 1 "../magick/quantize.h" 1
# 20 "../magick/quantize.h"
typedef struct _QuantizeInfo
{
  unsigned int
    number_colors,
    tree_depth,
    dither;

  ColorspaceType
    colorspace;

  unsigned int
    measure_error;

  unsigned long
    signature;
} QuantizeInfo;




extern QuantizeInfo
  *CloneQuantizeInfo(const QuantizeInfo *);

extern unsigned int
  MapImage(Image *,Image *,const unsigned int),
  MapImages(Image *,Image *,const unsigned int),
  OrderedDitherImage(Image *),
  QuantizationError(Image *),
  QuantizeImage(const QuantizeInfo *,Image *),
  QuantizeImages(const QuantizeInfo *,Image *),
  SegmentImage(Image *,const ColorspaceType,const unsigned int,const double,
    const double);

extern void
  CompressColormap(Image *),
  DestroyQuantizeInfo(QuantizeInfo *),
  GetQuantizeInfo(QuantizeInfo *);
# 90 "../magick/api.h" 2
# 1 "../magick/compress.h" 1
# 11 "../magick/compress.h"
extern unsigned int
  HuffmanDecodeImage(Image *),
  HuffmanEncodeImage(const ImageInfo *,Image *),
  Huffman2DEncodeImage(ImageInfo *,Image *),
  LZWEncodeImage(Image *,const unsigned int,unsigned char *),
  PackbitsEncodeImage(Image *,const unsigned int,unsigned char *),
  ZLIBEncodeImage(Image *,const unsigned long,const unsigned int,
    unsigned char *);

extern void
  Ascii85Encode(Image *,const unsigned int),
  Ascii85Flush(Image *),
  Ascii85Initialize(Image *);
# 91 "../magick/api.h" 2
# 1 "../magick/attributes.h" 1
# 14 "../magick/attributes.h"
extern ImageAttribute
  *GetImageAttribute(const Image *,const char *),
  *GetImageInfoAttribute(const ImageInfo *,Image *,const char *);

extern unsigned int
  SetImageAttribute(Image *,const char *,const char *);

extern void
  DestroyImageAttributes(Image *),
  StoreImageAttribute(Image *,char *);
# 92 "../magick/api.h" 2
# 1 "../magick/utility.h" 1
# 15 "../magick/utility.h"
typedef struct _TokenInfo
{
  int
    state;

  unsigned
    flag;

  char
    quote;

  int
    offset;
} TokenInfo;




extern char
  *AllocateString(const char *),
  *GetExecutionPath(const char *),
  **ListFiles(const char *,const char *,int *),
  *PostscriptGeometry(const char *),
  *SetClientName(const char *),
  *SetClientPath(const char *),
  **StringToArgv(const char *,int *),
  **StringToList(const char *),
  *TranslateText(const ImageInfo *,Image *,const char *);

extern int
  GetGeometry(const char *,int *,int *,unsigned int *,unsigned int *),
  GlobExpression(const char *,const char *),
  LocaleNCompare(const char *,const char *,size_t),
  LocaleCompare(const char *,const char *),
  MultilineCensus(const char *),
  SystemCommand(const unsigned int,const char *),
  Tokenizer(TokenInfo *,unsigned,char *,int,char *,char *,char *,char *,
    char,char *,int *,char *);

extern unsigned int
  CloneString(char **,const char *),
  ConcatenateString(char **,const char *),
  ExecutePostscriptInterpreter(const unsigned int,const char *),
  ExpandFilenames(int *,char ***),
  IsAccessible(const char *);

extern unsigned short
  *ConvertTextToUnicode(const char *,int *);

extern void
  *AcquireMemory(const size_t),
  AppendImageFormat(const char *,char *),
  ExpandFilename(char *),
  GetPathComponent(const char *,PathType,char *),
  FormatString(char *,const char *,...),
  LiberateMemory(void **),
  LocaleLower(char *),
  LocaleUpper(char *),
  ReacquireMemory(void **,const size_t),
  Strip(char *),
  TemporaryFilename(char *);
# 93 "../magick/api.h" 2
# 1 "../magick/blob.h" 1
# 15 "../magick/blob.h"
extern char
  *ReadBlobString(Image *,char *);

extern Image
  *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *);

extern int
  EOFBlob(const Image *),
  ReadBlobByte(Image *),
  SyncBlob(const Image *);

extern off_t
  SeekBlob(Image *,const off_t,const int),
  SizeBlob(Image *image),
  TellBlob(Image *image);

extern size_t
  ReadBlob(Image *,const size_t,void *),
  ReadBlobBlock(Image *,unsigned char *),
  WriteBlob(Image *,const size_t,const void *),
  WriteBlobByte(Image *,const int),
  WriteBlobLSBLong(Image *,const unsigned long),
  WriteBlobLSBShort(Image *,const unsigned int),
  WriteBlobMSBLong(Image *,const unsigned long),
  WriteBlobMSBShort(Image *,const unsigned int),
  WriteBlobString(Image *,const char *);

extern unsigned int
  OpenBlob(const ImageInfo *,Image *,const char *),
  UnmapBlob(void *,const size_t);

extern unsigned short
  ReadBlobLSBShort(Image *),
  ReadBlobMSBShort(Image *);

extern unsigned long
  ReadBlobLSBLong(Image *),
  ReadBlobMSBLong(Image *);

extern void
  CloseBlob(Image *),
  DestroyBlobInfo(BlobInfo *),
  GetBlobInfo(BlobInfo *),
  *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *),
  *MapBlob(int,const MapMode,size_t *),
  MSBOrderLong(char *,const size_t),
  MSBOrderShort(char *,const size_t),
  SetBlobQuantum(BlobInfo *,const size_t);
# 94 "../magick/api.h" 2
# 1 "../magick/cache.h" 1
# 18 "../magick/cache.h"
typedef void* Cache;

typedef struct _NexusInfo
{
  unsigned int
    available,
    columns,
    rows;

  int
    x,
    y;

  off_t
    length;

  void
    *line;

  PixelPacket
    *pixels;

  IndexPacket
    *indexes;
} NexusInfo;

typedef struct _CacheInfo
{
  ClassType
    class;

  ColorspaceType
    colorspace;

  CacheType
    type;

  unsigned int
    columns,
    rows;

  PixelPacket
    *pixels;

  IndexPacket
    *indexes;

  char
    cache_filename[2053],
    meta_filename[2053];

  int
    file;

  unsigned int
    persist;

  NexusInfo
    *nexus;

  unsigned long
    signature;
} CacheInfo;




extern ClassType
  GetCacheClass(const Cache);

extern ColorspaceType
  GetCacheColorspace(const Cache);

extern IndexPacket
  *GetNexusIndexes(const Cache,const unsigned int);

extern PixelPacket
  *GetNexusPixels(const Cache,const unsigned int),
  *SetCacheNexus(Cache,const unsigned int,const RectangleInfo *);

extern unsigned int
  GetCacheNexus(Cache),
  IsNexusInCore(const Cache,const unsigned int),
  OpenCache(Image *),
  ReadCachePixels(Cache,const unsigned int),
  ReadCacheIndexes(Cache,const unsigned int),
  WriteCacheInfo(Image *),
  WriteCachePixels(Cache,const unsigned int),
  WriteCacheIndexes(Cache,const unsigned int);

extern void
  AllocateCacheNexus(CacheInfo *),
  DestroyCacheNexus(Cache,const unsigned int),
  GetCacheInfo(Cache *),
  SetCacheThreshold(const off_t),
  SetPixelCacheMethods(void);
# 95 "../magick/api.h" 2
# 1 "../magick/cache_view.h" 1
# 14 "../magick/cache_view.h"
typedef struct _ViewInfo
{
  unsigned int
    id;

  Image
    *image;

  unsigned long
    signature;
} ViewInfo;




extern IndexPacket
  *GetCacheViewIndexes(const ViewInfo *);

extern PixelPacket
  *GetCacheViewPixels(const ViewInfo *),
  *GetCacheView(ViewInfo *,const int,const int,const unsigned int,
    const unsigned int),
  *SetCacheView(ViewInfo *,const int,const int,const unsigned int,
    const unsigned int);

extern unsigned int
  SyncCacheView(ViewInfo *);

extern ViewInfo
  *OpenCacheView(Image *);

extern void
  CloseCacheView(ViewInfo *);
# 96 "../magick/api.h" 2
# 1 "../magick/magic.h" 1
# 14 "../magick/magic.h"
typedef struct _MagicInfo
{
  char
    *filename,
    *name,
    *target;

  unsigned char
    *magic;

  unsigned int
    length,
    offset;

  struct _MagicInfo
    *previous,
    *next;
} MagicInfo;




extern MagicInfo
  *GetMagicInfo(const unsigned char *,const unsigned int,ExceptionInfo *);

extern unsigned int
  ListMagicInfo(FILE *,ExceptionInfo *);

extern void
  DestroyMagicInfo(void);
# 97 "../magick/api.h" 2
# 1 "../magick/delegates.h" 1
# 14 "../magick/delegates.h"
typedef struct _DelegateInfo
{
  char
    *filename,
    *decode,
    *encode,
    *commands;

  int
    mode;

  unsigned int
    restrain,
    spawn;

  struct _DelegateInfo
    *previous,
    *next;
} DelegateInfo;




extern char
  *GetDelegateCommand(const ImageInfo *,Image *,const char *,const char *);

extern DelegateInfo
  *GetDelegateInfo(const char *,const char *,ExceptionInfo *exception),
  *SetDelegateInfo(DelegateInfo *);

extern unsigned int
  InvokeDelegate(const ImageInfo *,Image *,const char *,const char *),
  ListDelegateInfo(FILE *,ExceptionInfo *);
# 98 "../magick/api.h" 2
# 1 "../magick/modules.h" 1
# 11 "../magick/modules.h"
typedef struct _ModuleAlias
{
  char
    *filename,
    *name,
    *alias;

  struct _ModuleAlias
    *previous,
    *next;
} ModuleAlias;

typedef struct _ModuleInfo
{
  char
    *tag;

  void
    *handle;

  time_t
    load_time;

  unsigned long
    signature;

  struct _ModuleInfo
    *previous,
    *next;
} ModuleInfo;




extern ModuleAlias
  *GetModuleAlias(const char *,ExceptionInfo *);

extern ModuleInfo
  *GetModuleInfo(const char *,ExceptionInfo *);

extern unsigned int
  ExecuteModuleProcess(const char *,Image *,const int,char **),
  ListModuleAliases(FILE *,ExceptionInfo *),
  OpenModule(const char *,ExceptionInfo *),
  OpenModules(ExceptionInfo *);
# 99 "../magick/api.h" 2
# 1 "../magick/timer.h" 1
# 14 "../magick/timer.h"
extern double
  GetElapsedTime(TimerInfo *),
  GetUserTime(TimerInfo *);

extern unsigned int
  ContinueTimer(TimerInfo *);

extern void
  GetTimerInfo(TimerInfo *),
  ResetTimer(TimerInfo *),
  StartTimer(TimerInfo *,const unsigned int),
  StopTimer(TimerInfo *);
# 100 "../magick/api.h" 2
# 1 "../magick/semaphore.h" 1
# 15 "../magick/semaphore.h"
struct
  SemaphoreInfo;

typedef struct SemaphoreInfo SemaphoreInfo;




extern int
  LockSemaphore(SemaphoreInfo *),
  UnlockSemaphore(SemaphoreInfo *);

extern SemaphoreInfo
  *AllocateSemaphoreInfo(void);

extern void
  DestroySemaphoreInfo(SemaphoreInfo *),
  AcquireSemaphore(SemaphoreInfo **),
  LiberateSemaphore(SemaphoreInfo **);
# 101 "../magick/api.h" 2
# 1 "../magick/monitor.h" 1
# 14 "../magick/monitor.h"
typedef void
  (*MonitorHandler)(const char *,const off_t,const off_t);




extern MonitorHandler
  SetMonitorHandler(MonitorHandler);

extern void
  MagickMonitor(const char *,const off_t,const off_t);
# 102 "../magick/api.h" 2
# 1 "../magick/error.h" 1
# 50 "../magick/error.h"
typedef void
  (*ErrorHandler)(const ExceptionType,const char *,const char *);

typedef void
  (*WarningHandler)(const ExceptionType,const char *,const char *);




extern ErrorHandler
  SetErrorHandler(ErrorHandler);

extern void
  CatchImageException(Image *),
  DestroyExceptionInfo(ExceptionInfo *),
  GetImageException(Image *,ExceptionInfo *),
  GetExceptionInfo(ExceptionInfo *),
  MagickError(const ExceptionType,const char *,const char *),
  MagickWarning(const ExceptionType,const char *,const char *),
  ThrowException(ExceptionInfo *,const ExceptionType,const char *,const char *);

extern WarningHandler
  SetWarningHandler(WarningHandler);
# 103 "../magick/api.h" 2
# 1 "../magick/version.h" 1
# 104 "../magick/api.h" 2
# 75 "../magick/magick.h" 2

# 1 "/usr/include/sys/time.h" 1 3
# 77 "../magick/magick.h" 2
# 1 "/usr/include/sys/times.h" 1 3
# 11 "/usr/include/sys/times.h" 3
#pragma ident "@(#)times.h	1.10	97/08/12 SMI"

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 14 "/usr/include/sys/times.h" 2 3
# 22 "/usr/include/sys/times.h" 3
struct tms {
        clock_t tms_utime;
        clock_t tms_stime;
        clock_t tms_cutime;
        clock_t tms_cstime;
};
# 44 "/usr/include/sys/times.h" 3
clock_t times(struct tms *);
# 78 "../magick/magick.h" 2
# 91 "../magick/magick.h"
# 1 "/usr/include/sys/mman.h" 1 3
# 34 "/usr/include/sys/mman.h" 3
#pragma ident "@(#)mman.h	1.38	99/05/19 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3
# 37 "/usr/include/sys/mman.h" 2 3
# 106 "/usr/include/sys/mman.h" 3
# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 107 "/usr/include/sys/mman.h" 2 3
# 137 "/usr/include/sys/mman.h" 3
extern void *mmap64(void *, size_t, int, int, int, off_t);
extern int munmap(void *, size_t);
extern int mprotect(void *, size_t, int);
extern int msync(void *, size_t, int);

extern int mlock(const void *, size_t);
extern int munlock(const void *, size_t);
extern int shm_open(const char *, int, mode_t);
extern int shm_unlink(const char *);
# 169 "/usr/include/sys/mman.h" 3
extern int mlockall(int);
extern int munlockall(void);
# 92 "../magick/magick.h" 2


# 1 "/usr/include/pthread.h" 1 3
# 9 "/usr/include/pthread.h" 3
#pragma ident "@(#)pthread.h	1.28	99/11/15 SMI"


# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 13 "/usr/include/pthread.h" 2 3
# 1 "/usr/include/time.h" 1 3
# 14 "/usr/include/pthread.h" 2 3
# 1 "/usr/include/sched.h" 1 3
# 11 "/usr/include/sched.h" 3
#pragma ident "@(#)sched.h	1.9	98/01/16 SMI"

# 1 "/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0/include/sys/types.h" 1 3
# 14 "/usr/include/sched.h" 2 3
# 1 "/usr/include/time.h" 1 3
# 15 "/usr/include/sched.h" 2 3





struct sched_param {
        int sched_priority;
        int sched_nicelim;
        int sched_nice;
        int sched_pad[6];



};
# 44 "/usr/include/sched.h" 3
int sched_getparam(pid_t pid, struct sched_param *param);
int sched_setparam(pid_t pid, const struct sched_param *param);
int sched_getscheduler(pid_t pid);
int sched_setscheduler(pid_t pid, int policy,
                const struct sched_param *param);
int sched_yield(void);
int sched_get_priority_max(int policy);
int sched_get_priority_min(int policy);
int sched_rr_get_interval(pid_t pid, struct timespec *interval);
# 15 "/usr/include/pthread.h" 2 3
# 108 "/usr/include/pthread.h" 3
typedef struct _cleanup {
        uintptr_t pthread_cleanup_pad[4];
} _cleanup_t;



void __pthread_cleanup_push(void (*routine)(void *), void *args,
                                        caddr_t fp, _cleanup_t *info);
void __pthread_cleanup_pop(int ex, _cleanup_t *info);
caddr_t _getfp(void);
# 142 "/usr/include/pthread.h" 3
extern int pthread_attr_init(pthread_attr_t *);
extern int pthread_attr_destroy(pthread_attr_t *);
extern int pthread_attr_setstacksize(pthread_attr_t *, size_t);
extern int pthread_attr_getstacksize(const pthread_attr_t *, size_t *);
extern int pthread_attr_setstackaddr(pthread_attr_t *, void *);
extern int pthread_attr_getstackaddr(const pthread_attr_t *, void **);
extern int pthread_attr_setdetachstate(pthread_attr_t *, int);
extern int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
extern int pthread_attr_setscope(pthread_attr_t *, int);
extern int pthread_attr_getscope(const pthread_attr_t *, int *);
extern int pthread_attr_setinheritsched(pthread_attr_t *, int);
extern int pthread_attr_getinheritsched(const pthread_attr_t *, int *);
extern int pthread_attr_setschedpolicy(pthread_attr_t *, int);
extern int pthread_attr_getschedpolicy(const pthread_attr_t *, int *);
extern int pthread_attr_setschedparam(pthread_attr_t *,
                                        const struct sched_param *);
extern int pthread_attr_getschedparam(const pthread_attr_t *,
                                        struct sched_param *);
extern int pthread_create(pthread_t *, const pthread_attr_t *,
                                void * (*)(void *), void *);
extern int pthread_once(pthread_once_t *, void (*)(void));
extern int pthread_join(pthread_t, void **);
extern int pthread_detach(pthread_t);
extern void pthread_exit(void *);
extern int pthread_cancel(pthread_t);
extern int pthread_setschedparam(pthread_t, int, const struct sched_param *);
extern int pthread_getschedparam(pthread_t, int *, struct sched_param *);
extern int pthread_setcancelstate(int, int *);
extern int pthread_setcanceltype(int, int *);
extern void pthread_testcancel(void);
extern int pthread_equal(pthread_t, pthread_t);
extern int pthread_key_create(pthread_key_t *, void (*)(void *));
extern int pthread_key_delete(pthread_key_t);
extern int pthread_setspecific(pthread_key_t, const void *);
extern void *pthread_getspecific(pthread_key_t);
extern pthread_t pthread_self(void);




extern int pthread_mutexattr_init(pthread_mutexattr_t *);
extern int pthread_mutexattr_destroy(pthread_mutexattr_t *);
extern int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
extern int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, int *);
extern int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
extern int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *, int *);
extern int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
extern int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *, int *);
extern int pthread_mutexattr_setrobust_np(pthread_mutexattr_t *, int);
extern int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *, int *);
extern int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *);
extern int pthread_mutex_consistent_np(pthread_mutex_t *);
extern int pthread_mutex_destroy(pthread_mutex_t *);
extern int pthread_mutex_lock(pthread_mutex_t *);
extern int pthread_mutex_unlock(pthread_mutex_t *);
extern int pthread_mutex_trylock(pthread_mutex_t *);
extern int pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *);
extern int pthread_mutex_getprioceiling(const pthread_mutex_t *, int *);
extern int pthread_condattr_init(pthread_condattr_t *);
extern int pthread_condattr_destroy(pthread_condattr_t *);
extern int pthread_condattr_setpshared(pthread_condattr_t *, int);
extern int pthread_condattr_getpshared(const pthread_condattr_t *, int *);
extern int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *);
extern int pthread_cond_destroy(pthread_cond_t *);
extern int pthread_cond_broadcast(pthread_cond_t *);
extern int pthread_cond_signal(pthread_cond_t *);
extern int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
extern int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *,
                                        const struct timespec *);
extern int pthread_attr_getguardsize(const pthread_attr_t *, size_t *);
extern int pthread_attr_setguardsize(pthread_attr_t *, size_t);
extern int pthread_getconcurrency(void);
extern int pthread_setconcurrency(int newval);
extern int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
extern int pthread_mutexattr_gettype(const pthread_mutexattr_t *, int *);
extern int pthread_rwlock_init(pthread_rwlock_t *,
                                const pthread_rwlockattr_t *);
extern int pthread_rwlock_destroy(pthread_rwlock_t *);
extern int pthread_rwlock_rdlock(pthread_rwlock_t *);
extern int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
extern int pthread_rwlock_wrlock(pthread_rwlock_t *);
extern int pthread_rwlock_trywrlock(pthread_rwlock_t *);
extern int pthread_rwlock_unlock(pthread_rwlock_t *);
extern int pthread_rwlockattr_init(pthread_rwlockattr_t *);
extern int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
extern int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, int *);
extern int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
# 95 "../magick/magick.h" 2


# 1 "/usr/include/sys/poll.h" 1 3
# 16 "/usr/include/sys/poll.h" 3
#pragma ident "@(#)poll.h	1.28	98/11/23 SMI"
# 26 "/usr/include/sys/poll.h" 3
typedef struct pollfd {
        int fd;
        short events;
        short revents;
} pollfd_t;

typedef unsigned long nfds_t;
# 124 "/usr/include/sys/poll.h" 3
int poll(struct pollfd *, nfds_t, int);
# 98 "../magick/magick.h" 2
# 56 "fits.c" 2
# 1 "../magick/defines.h" 1
# 57 "fits.c" 2




static unsigned int
  WriteFITSImage(const ImageInfo *,Image *);
# 94 "fits.c"
static unsigned int IsFITS(const unsigned char *magick,
  const unsigned int length)
{
  if (length < 6)
    return(0);
  if (LocaleNCompare((char *) magick,"IT0",3) == 0)
    return(1);
  if (LocaleNCompare((char *) magick,"SIMPLE",6) == 0)
    return(1);
  return(0);
}
# 138 "fits.c"
static Image *ReadFITSImage(const ImageInfo *image_info,
  ExceptionInfo *exception)
{
  typedef struct _FITSInfo
  {
    unsigned int
      simple;

    int
      bits_per_pixel;

    unsigned int
      columns,
      rows,
      number_axes,
      number_scenes;

    double
      min_data,
      max_data,
      zero,
      scale;
  } FITSInfo;

  char
    long_quantum[8],
    keyword[2053],
    value[2053];

  double
    pixel,
    scale,
    scaled_pixel;

  FITSInfo
    fits_info;

  Image
    *image;

  IndexPacket
    index;

  int
    c,
    j,
    packet_size,
    y;

  long
    count,
    quantum;

  register IndexPacket
    *indexes;

  register int
    i,
    x;

  register PixelPacket
    *q;

  register unsigned char
    *p;

  unsigned char
    *fits_pixels;

  unsigned int
    scene,
    status,
    value_expected;




  image=AllocateImage(image_info);
  status=OpenBlob(image_info,image,ReadBinaryType);
  if (status == 0)
    { if (image == (Image *) 0) ThrowException(exception,FileOpenWarning,"Unable to open file",(char *) 0); else { ThrowException(exception,FileOpenWarning,"Unable to open file",image->filename); DestroyImages(image); } return((Image *) 0); };



  fits_info.simple=0;
  fits_info.bits_per_pixel=8;
  fits_info.columns=1;
  fits_info.rows=1;
  fits_info.number_scenes=1;
  fits_info.min_data=0.0;
  fits_info.max_data=0.0;
  fits_info.zero=0.0;
  fits_info.scale=1.0;



  c=ReadBlobByte(image);
  count=1;
  if (c == (-1))
    {
      DestroyImage(image);
      return((Image *) 0);
    }
  for ( ; ; )
  {
    if (!(__ctype_mask[c] & (0x00004000 | 0x00000004)))
      {
        c=ReadBlobByte(image);
        count++;
      }
    else
      {
        register char
          *p;




        p=keyword;
        do
        {
          if ((p-keyword) < (2053 -1))
            *p++=c;
          c=ReadBlobByte(image);
          count++;
        } while ((__ctype_mask[c] & (0x00004000 | 0x00000004)) || (c == '_'));
        *p='\0';
        if (LocaleCompare(keyword,"END") == 0)
          break;
        value_expected=0;
        while ((__ctype_mask[c] & 0x00000008) || (c == '='))
        {
          if (c == '=')
            value_expected=1;
          c=ReadBlobByte(image);
          count++;
        }
        if (value_expected == 0)
          continue;
        p=value;
        while ((__ctype_mask[c] & (0x00004000 | 0x00000004)) || (c == '-') || (c == '+') || (c == '.'))
        {
          if ((p-value) < (2053 -1))
            *p++=c;
          c=ReadBlobByte(image);
          count++;
        }
        *p='\0';



        if (LocaleCompare(keyword,"SIMPLE") == 0)
          fits_info.simple=(*value == 'T') || (*value == 't');
        if (LocaleCompare(keyword,"BITPIX") == 0)
          fits_info.bits_per_pixel=(unsigned int) atoi(value);
        if (LocaleCompare(keyword,"NAXIS") == 0)
          fits_info.number_axes=(unsigned int) atoi(value);
        if (LocaleCompare(keyword,"NAXIS1") == 0)
          fits_info.columns=(unsigned int) atoi(value);
        if (LocaleCompare(keyword,"NAXIS2") == 0)
          fits_info.rows=(unsigned int) atoi(value);
        if (LocaleCompare(keyword,"NAXIS3") == 0)
          fits_info.number_scenes=(unsigned int) atoi(value);
        if (LocaleCompare(keyword,"DATAMAX") == 0)
          fits_info.max_data=atof(value);
        if (LocaleCompare(keyword,"DATAMIN") == 0)
          fits_info.min_data=atof(value);
        if (LocaleCompare(keyword,"BZERO") == 0)
          fits_info.zero=atof(value);
        if (LocaleCompare(keyword,"BSCALE") == 0)
          fits_info.scale=atof(value);
      }
    while ((__ctype_mask[c] & 0x00000008))
    {
      c=ReadBlobByte(image);
      count++;
    }
  }
  while (count > 2880)
    count-=2880;
  for ( ; count < 2880; count++)
    (void) ReadBlobByte(image);



  if ((!fits_info.simple) || (fits_info.number_axes < 1) ||
      (fits_info.number_axes > 4) ||
      (fits_info.columns*fits_info.rows) == 0)
    { if (image == (Image *) 0) ThrowException(exception,CorruptImageWarning,"image type not supported",(char *) 0); else { ThrowException(exception,CorruptImageWarning,"image type not supported",image->filename); DestroyImages(image); } return((Image *) 0); };
  for (scene=0; scene < fits_info.number_scenes; scene++)
  {



    image->columns=fits_info.columns;
    image->rows=fits_info.rows;
    image->depth=fits_info.bits_per_pixel <= 8 ? 8 : 16;
    image->class=PseudoClass;
    image->scene=scene;
    if (!AllocateImageColormap(image,1 << image->depth))
      { if (image == (Image *) 0) ThrowException(exception,FileOpenWarning,"Unable to open file",(char *) 0); else { ThrowException(exception,FileOpenWarning,"Unable to open file",image->filename); DestroyImages(image); } return((Image *) 0); };
    if (image_info->ping)
      {
        CloseBlob(image);
        return(image);
      }



    packet_size=fits_info.bits_per_pixel/8;
    if (packet_size < 0)
      packet_size=(-packet_size);
    fits_pixels=(unsigned char *)
      AcquireMemory(packet_size*image->columns*image->rows);
    if (fits_pixels == (unsigned char *) 0)
      { if (image == (Image *) 0) ThrowException(exception,ResourceLimitWarning,"Memory allocation failed",(char *) 0); else { ThrowException(exception,ResourceLimitWarning,"Memory allocation failed",image->filename); DestroyImages(image); } return((Image *) 0); };




    status=ReadBlob(image,packet_size*image->columns*image->rows,fits_pixels);
    if (status == 0)
      { if (image == (Image *) 0) ThrowException(exception,CorruptImageWarning,"Insufficient image data in file",(char *) 0); else { ThrowException(exception,CorruptImageWarning,"Insufficient image data in file",image->filename); DestroyImages(image); } return((Image *) 0); };

    if ((fits_info.min_data == 0.0) && (fits_info.max_data == 0.0))
      {



        p=fits_pixels;
        long_quantum[0]=(*p);
        quantum=(*p++);
        for (j=0; j < (packet_size-1); j++)
        {
          long_quantum[j+1]=(*p);
          quantum=(quantum << 8) | (*p++);
        }
        pixel=(double) quantum;
        if (fits_info.bits_per_pixel == 16)
          if (pixel > 32767)
            pixel-=65536;
        if (fits_info.bits_per_pixel == -32)
          pixel=(double) (*((float *) &quantum));
        if (fits_info.bits_per_pixel == -64)
          pixel=(double) (*((double *) long_quantum));
        fits_info.min_data=pixel*fits_info.scale-fits_info.zero;
        fits_info.max_data=pixel*fits_info.scale-fits_info.zero;
        for (i=1; i < (int) (image->columns*image->rows); i++)
        {
          long_quantum[0]=(*p);
          quantum=(*p++);
          for (j=0; j < (packet_size-1); j++)
          {
            long_quantum[j+1]=(*p);
            quantum=(quantum << 8) | (*p++);
          }
          pixel=(double) quantum;
          if (fits_info.bits_per_pixel == 16)
            if (pixel > 32767)
              pixel-=65536;
          if (fits_info.bits_per_pixel == -32)
            pixel=(double) (*((float *) &quantum));
          if (fits_info.bits_per_pixel == -64)
            pixel=(double) (*((double *) long_quantum));
          scaled_pixel=pixel*fits_info.scale-fits_info.zero;
          if (scaled_pixel < fits_info.min_data)
            fits_info.min_data=scaled_pixel;
          if (scaled_pixel > fits_info.max_data)
            fits_info.max_data=scaled_pixel;
        }
      }



    scale=1.0;
    if (((fits_info.max_data-fits_info.min_data) <= 1.0) ||
        ((fits_info.max_data-fits_info.min_data) > ((1 << image->depth)-1)))
      scale=((1 << image->depth)-1)/(fits_info.max_data-fits_info.min_data);
    p=fits_pixels;
    for (y=image->rows-1; y >= 0; y--)
    {
      q=SetImagePixels(image,0,y,image->columns,1);
      if (q == (PixelPacket *) 0)
        break;
      indexes=GetIndexes(image);
      for (x=0; x < (int) image->columns; x++)
      {
        long_quantum[0]=(*p);
        quantum=(*p++);
        for (j=0; j < (packet_size-1); j++)
        {
          long_quantum[j+1]=(*p);
          quantum=(quantum << 8) | (*p++);
        }
        pixel=(double) quantum;
        if (fits_info.bits_per_pixel == 16)
          if (pixel > 32767)
            pixel-=65536;
        if (fits_info.bits_per_pixel == -32)
          pixel=(double) (*((float *) &quantum));
        if (fits_info.bits_per_pixel == -64)
          pixel=(double) (*((double *) long_quantum));
        scaled_pixel=scale*
          (pixel*fits_info.scale-fits_info.min_data-fits_info.zero);
        index=(IndexPacket) ((scaled_pixel < 0) ? 0 :
          (scaled_pixel > ((1 << image->depth)-1)) ? ((1 << image->depth)-1) :
          scaled_pixel+0.5);
        index=ValidateColormapIndex(image,index);
        indexes[x]=index;
        *q++=image->colormap[index];
      }
      if (!SyncImagePixels(image))
        break;
      if ((((~((image->rows)-y-1) & ((image->rows)-y-2))+1) == ((image->rows)-y-1)))
        MagickMonitor(LoadImageText,y,image->rows);
    }
    LiberateMemory((void **) &fits_pixels);



    if (EOFBlob(image))
      break;
    if (image_info->subrange != 0)
      if (image->scene >= (image_info->subimage+image_info->subrange-1))
        break;
    if (scene < (fits_info.number_scenes-1))
      {



        AllocateNextImage(image_info,image);
        if (image->next == (Image *) 0)
          {
            DestroyImages(image);
            return((Image *) 0);
          }
        image=image->next;
        MagickMonitor(LoadImagesText,TellBlob(image),image->filesize);
      }
  }
  while (image->previous != (Image *) 0)
    image=image->previous;
  CloseBlob(image);
  return(image);
}
# 507 "fits.c"
             void RegisterFITSImage(void)
{
  MagickInfo
    *entry;

  entry=SetMagickInfo("FITS");
  entry->decoder=ReadFITSImage;
  entry->encoder=WriteFITSImage;
  entry->magick=IsFITS;
  entry->adjoin=0;
  entry->description=AllocateString("Flexible Image Transport System");
  entry->module=AllocateString("FITS");
  RegisterMagickInfo(entry);
}
# 541 "fits.c"
             void UnregisterFITSImage(void)
{
  UnregisterMagickInfo("FITS");
}
# 576 "fits.c"
static unsigned int WriteFITSImage(const ImageInfo *image_info,Image *image)
{
  char
    buffer[81],
    *fits_info;

  int
    y;

  register int
    i;

  register PixelPacket
    *p;

  unsigned char
    *pixels;

  unsigned int
    packet_size,
    status;




  status=OpenBlob(image_info,image,WriteBinaryType);
  if (status == 0)
    { ((void) ((image != (Image *) 0) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "fits.c", 603, "image != (Image *) NULL"), 0))); ThrowException(&image->exception,FileOpenWarning,"Unable to open file",image->filename); if (image_info->adjoin) while (image->previous != (Image *) 0) image=image->previous; CloseBlob(image); return(0); };
  TransformRGBImage(image,RGBColorspace);



  packet_size=image->depth > 8 ? 2 : 1;
  fits_info=(char *) AcquireMemory(2880);
  pixels=(unsigned char *) AcquireMemory(packet_size*image->columns);
  if ((fits_info == (char *) 0) || (pixels == (unsigned char *) 0))
    { ((void) ((image != (Image *) 0) ? 0 : (__eprintf ("%s:%u: failed assertion `%s'\n", "fits.c", 612, "image != (Image *) NULL"), 0))); ThrowException(&image->exception,ResourceLimitWarning,"Memory allocation failed",image->filename); if (image_info->adjoin) while (image->previous != (Image *) 0) image=image->previous; CloseBlob(image); return(0); };



  for (i=0; i < 2880; i++)
    fits_info[i]=' ';
  (void) strcpy(buffer,"SIMPLE  =                    T");
  (void) strncpy(fits_info+0,buffer,((int) strlen(buffer)));
  FormatString(buffer,"BITPIX  =                    %d",image->depth);
  (void) strncpy(fits_info+80,buffer,((int) strlen(buffer)));
  (void) strcpy(buffer,"NAXIS   =                    2");
  (void) strncpy(fits_info+160,buffer,((int) strlen(buffer)));
  FormatString(buffer,"NAXIS1  =           %10u",image->columns);
  (void) strncpy(fits_info+240,buffer,((int) strlen(buffer)));
  FormatString(buffer,"NAXIS2  =           %10u",image->rows);
  (void) strncpy(fits_info+320,buffer,((int) strlen(buffer)));
  FormatString(buffer,"DATAMIN =           %10u",0);
  (void) strncpy(fits_info+400,buffer,((int) strlen(buffer)));
  FormatString(buffer,"DATAMAX =           %10u",(1 << image->depth)-1);
  (void) strncpy(fits_info+480,buffer,((int) strlen(buffer)));
  (void) strcpy(buffer,"HISTORY Created by ImageMagick.");
  (void) strncpy(fits_info+560,buffer,((int) strlen(buffer)));
  (void) strcpy(buffer,"END");
  (void) strncpy(fits_info+640,buffer,((int) strlen(buffer)));
  (void) WriteBlob(image,2880,(char *) fits_info);
  LiberateMemory((void **) &fits_info);



  for (y=image->rows-1; y >= 0; y--)
  {
    p=GetImagePixels(image,0,y,image->columns,1);
    if (p == (PixelPacket *) 0)
      break;
    (void) PopImagePixels(image,GrayQuantum,pixels);
    (void) WriteBlob(image,packet_size*image->columns,pixels);
    if ((((~((image->rows)-image->rows-y-1 -1) & ((image->rows)-image->rows-y-1 -2))+1) == ((image->rows)-image->rows-y-1 -1)))
      MagickMonitor(SaveImageText,image->rows-y-1,image->rows);
  }
  LiberateMemory((void **) &pixels);
  CloseBlob(image);
  return(1);
}

>Fix:
	Compiles with Sun compiler, but I have other problems with
ImageMagick with the Sun compiler.  Or compile without -O2
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list