[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#319087: internal compiler errors with -O and -mno-ieee-fp/-ffast-math while building xaos



Package: gcc-4.0
Version: 4.0.1-2
Severity: normal
File: /usr/bin/gcc

I ran into an ICE while building xaos with gcc 4.0 (after working around
several other changes that make it FTBFS). 

joey@dragon:~>gcc -O2 -mno-ieee-fp -c fractal.c -o fractal.o
fractal.c: In function ‘combine_methods’:
fractal.c:219: internal compiler error: in redirect_branch_edge, at cfgrtl.c:935
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
zsh: exit 1     gcc -O -mno-ieee-fp -c fractal.c -o fractal.o

I've attached fractal.c, which is a preprocessed version of the one
from xaos. If I remove either the -O2 or the -mno-ieee-fp options the build
succeeds. Other -O options cause the same problem with combined with -mno-ieee-fp,
including -Os and regular -O.

Another ICE is triggered if I combine a -O flag with -ffast-math:

fjoey@dragon:~>gcc -O2 -ffast-math -c fractal.c -o fractal.o
fractal.c: In function ‘set_fractalc’:
fractal.c:314: internal compiler error: in expand_simple_unop, at optabs.c:2049
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
zsh: exit 1     gcc -O2 -ffast-math -c fractal.c -o fractal.o

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages gcc-4.0 depends on:
ii  binutils                    2.16.1-2     The GNU assembler, linker and bina
ii  cpp-4.0                     4.0.1-2      The GNU C preprocessor
ii  gcc-4.0-base                4.0.1-2      The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libgcc1                     1:4.0.1-2    GCC support library

Versions of packages gcc-4.0 recommends:
ii  libc6-dev                   2.3.2.ds1-22 GNU C Library: Development Librari
pn  libmudflap0-dev             <none>       (no description available)

-- no debconf information

-- 
see shy jo
# 1 "fractal.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "fractal.c"
# 23 "fractal.c"
# 1 "/home/joey/src/packages/xaos/src/include/aconfig.h" 1
# 24 "fractal.c" 2
# 1 "/usr/include/string.h" 1 3 4
# 26 "/usr/include/string.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 295 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 296 "/usr/include/features.h" 2 3 4
# 318 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4
# 319 "/usr/include/features.h" 2 3 4
# 27 "/usr/include/string.h" 2 3 4






# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 214 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 3 4
typedef unsigned int size_t;
# 34 "/usr/include/string.h" 2 3 4




extern void *memcpy (void *__restrict __dest,
       __const void *__restrict __src, size_t __n) ;


extern void *memmove (void *__dest, __const void *__src, size_t __n)
     ;






extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
        int __c, size_t __n)
     ;





extern void *memset (void *__s, int __c, size_t __n) ;


extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__pure__));


extern void *memchr (__const void *__s, int __c, size_t __n)
      __attribute__ ((__pure__));

# 80 "/usr/include/string.h" 3 4


extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
     ;

extern char *strncpy (char *__restrict __dest,
        __const char *__restrict __src, size_t __n) ;


extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
     ;

extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
        size_t __n) ;


extern int strcmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__pure__));

extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__pure__));


extern int strcoll (__const char *__s1, __const char *__s2)
     __attribute__ ((__pure__));

extern size_t strxfrm (char *__restrict __dest,
         __const char *__restrict __src, size_t __n) ;

# 126 "/usr/include/string.h" 3 4
extern char *strdup (__const char *__s) __attribute__ ((__malloc__));
# 160 "/usr/include/string.h" 3 4


extern char *strchr (__const char *__s, int __c) __attribute__ ((__pure__));

extern char *strrchr (__const char *__s, int __c) __attribute__ ((__pure__));











extern size_t strcspn (__const char *__s, __const char *__reject)
     __attribute__ ((__pure__));


extern size_t strspn (__const char *__s, __const char *__accept)
     __attribute__ ((__pure__));

extern char *strpbrk (__const char *__s, __const char *__accept)
     __attribute__ ((__pure__));

extern char *strstr (__const char *__haystack, __const char *__needle)
     __attribute__ ((__pure__));



extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
     ;




extern char *__strtok_r (char *__restrict __s,
    __const char *__restrict __delim,
    char **__restrict __save_ptr) ;

extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
         char **__restrict __save_ptr) ;
# 228 "/usr/include/string.h" 3 4


extern size_t strlen (__const char *__s) __attribute__ ((__pure__));

# 241 "/usr/include/string.h" 3 4


extern char *strerror (int __errnum) ;




extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) ;




extern void __bzero (void *__s, size_t __n) ;



extern void bcopy (__const void *__src, void *__dest, size_t __n) ;


extern void bzero (void *__s, size_t __n) ;


extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
     __attribute__ ((__pure__));


extern char *index (__const char *__s, int __c) __attribute__ ((__pure__));


extern char *rindex (__const char *__s, int __c) __attribute__ ((__pure__));



extern int ffs (int __i) __attribute__ ((__const__));
# 287 "/usr/include/string.h" 3 4
extern int strcasecmp (__const char *__s1, __const char *__s2)
     __attribute__ ((__pure__));


extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     __attribute__ ((__pure__));
# 309 "/usr/include/string.h" 3 4
extern char *strsep (char **__restrict __stringp,
       __const char *__restrict __delim) ;
# 379 "/usr/include/string.h" 3 4

# 25 "fractal.c" 2
# 1 "/home/joey/src/packages/xaos/src/include/config.h" 1
# 60 "/home/joey/src/packages/xaos/src/include/config.h"
# 1 "/home/joey/src/packages/xaos/src/include/gccaccel.h" 1
# 61 "/home/joey/src/packages/xaos/src/include/config.h" 2
# 26 "fractal.c" 2
# 1 "/home/joey/src/packages/xaos/src/include/fconfig.h" 1
# 53 "/home/joey/src/packages/xaos/src/include/fconfig.h"
typedef long double number_t;
# 27 "fractal.c" 2





# 1 "/usr/include/stdio.h" 1 3 4
# 30 "/usr/include/stdio.h" 3 4




# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 35 "/usr/include/stdio.h" 2 3 4

# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4


# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 32 "/usr/include/bits/types.h" 2 3 4


typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;


typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;




__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;







__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
# 129 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 130 "/usr/include/bits/types.h" 2 3 4






__extension__ typedef unsigned long long int __dev_t;
__extension__ typedef unsigned int __uid_t;
__extension__ typedef unsigned int __gid_t;
__extension__ typedef unsigned long int __ino_t;
__extension__ typedef unsigned long long int __ino64_t;
__extension__ typedef unsigned int __mode_t;
__extension__ typedef unsigned int __nlink_t;
__extension__ typedef long int __off_t;
__extension__ typedef long long int __off64_t;
__extension__ typedef int __pid_t;
__extension__ typedef struct { int __val[2]; } __fsid_t;
__extension__ typedef long int __clock_t;
__extension__ typedef unsigned long int __rlim_t;
__extension__ typedef unsigned long long int __rlim64_t;
__extension__ typedef unsigned int __id_t;
__extension__ typedef long int __time_t;
__extension__ typedef unsigned int __useconds_t;
__extension__ typedef long int __suseconds_t;

__extension__ typedef int __daddr_t;
__extension__ typedef long int __swblk_t;
__extension__ typedef int __key_t;


__extension__ typedef int __clockid_t;


__extension__ typedef int __timer_t;


__extension__ typedef long int __blksize_t;




__extension__ typedef long int __blkcnt_t;
__extension__ typedef long long int __blkcnt64_t;


__extension__ typedef unsigned long int __fsblkcnt_t;
__extension__ typedef unsigned long long int __fsblkcnt64_t;


__extension__ typedef unsigned long int __fsfilcnt_t;
__extension__ typedef unsigned long long int __fsfilcnt64_t;

__extension__ typedef int __ssize_t;



typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;


__extension__ typedef int __intptr_t;


__extension__ typedef unsigned int __socklen_t;
# 37 "/usr/include/stdio.h" 2 3 4









typedef struct _IO_FILE FILE;





# 62 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 72 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 14 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 326 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 3 4
typedef int wchar_t;
# 355 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 3 4
typedef unsigned int wint_t;
# 15 "/usr/include/_G_config.h" 2 3 4
# 24 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4

# 1 "/usr/include/bits/wchar.h" 1 3 4
# 51 "/usr/include/wchar.h" 2 3 4
# 76 "/usr/include/wchar.h" 3 4
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    char __wchb[4];
  } __value;
} __mbstate_t;
# 25 "/usr/include/_G_config.h" 2 3 4

typedef struct
{
  __off_t __pos;
  __mbstate_t __state;
} _G_fpos_t;
typedef struct
{
  __off64_t __pos;
  __mbstate_t __state;
} _G_fpos64_t;
# 44 "/usr/include/_G_config.h" 3 4
# 1 "/usr/include/gconv.h" 1 3 4
# 28 "/usr/include/gconv.h" 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 48 "/usr/include/wchar.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 49 "/usr/include/wchar.h" 2 3 4
# 29 "/usr/include/gconv.h" 2 3 4


# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 32 "/usr/include/gconv.h" 2 3 4





enum
{
  __GCONV_OK = 0,
  __GCONV_NOCONV,
  __GCONV_NODB,
  __GCONV_NOMEM,

  __GCONV_EMPTY_INPUT,
  __GCONV_FULL_OUTPUT,
  __GCONV_ILLEGAL_INPUT,
  __GCONV_INCOMPLETE_INPUT,

  __GCONV_ILLEGAL_DESCRIPTOR,
  __GCONV_INTERNAL_ERROR
};



enum
{
  __GCONV_IS_LAST = 0x0001,
  __GCONV_IGNORE_ERRORS = 0x0002
};



struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
struct __gconv_trans_data;



typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
       __const unsigned char **, __const unsigned char *,
       unsigned char **, size_t *, int, int);


typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);


typedef int (*__gconv_init_fct) (struct __gconv_step *);
typedef void (*__gconv_end_fct) (struct __gconv_step *);



typedef int (*__gconv_trans_fct) (struct __gconv_step *,
      struct __gconv_step_data *, void *,
      __const unsigned char *,
      __const unsigned char **,
      __const unsigned char *, unsigned char **,
      size_t *);


typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
       __const unsigned char *,
       unsigned char *, unsigned char *);


typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
     size_t *);


typedef int (*__gconv_trans_init_fct) (void **, const char *);
typedef void (*__gconv_trans_end_fct) (void *);

struct __gconv_trans_data
{

  __gconv_trans_fct __trans_fct;
  __gconv_trans_context_fct __trans_context_fct;
  __gconv_trans_end_fct __trans_end_fct;
  void *__data;
  struct __gconv_trans_data *__next;
};



struct __gconv_step
{
  struct __gconv_loaded_object *__shlib_handle;
  __const char *__modname;

  int __counter;

  char *__from_name;
  char *__to_name;

  __gconv_fct __fct;
  __gconv_btowc_fct __btowc_fct;
  __gconv_init_fct __init_fct;
  __gconv_end_fct __end_fct;



  int __min_needed_from;
  int __max_needed_from;
  int __min_needed_to;
  int __max_needed_to;


  int __stateful;

  void *__data;
};



struct __gconv_step_data
{
  unsigned char *__outbuf;
  unsigned char *__outbufend;



  int __flags;



  int __invocation_counter;



  int __internal_use;

  __mbstate_t *__statep;
  __mbstate_t __state;



  struct __gconv_trans_data *__trans;
};



typedef struct __gconv_info
{
  size_t __nsteps;
  struct __gconv_step *__steps;
  __extension__ struct __gconv_step_data __data [];
} *__gconv_t;
# 45 "/usr/include/_G_config.h" 2 3 4
typedef union
{
  struct __gconv_info __cd;
  struct
  {
    struct __gconv_info __cd;
    struct __gconv_step_data __data;
  } __combined;
} _G_iconv_t;

typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stdarg.h" 1 3 4
# 43 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 163 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 173 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;





struct _IO_marker {
  struct _IO_marker *_next;
  struct _IO_FILE *_sbuf;



  int _pos;
# 196 "/usr/include/libio.h" 3 4
};


enum __codecvt_result
{
  __codecvt_ok,
  __codecvt_partial,
  __codecvt_error,
  __codecvt_noconv
};
# 264 "/usr/include/libio.h" 3 4
struct _IO_FILE {
  int _flags;




  char* _IO_read_ptr;
  char* _IO_read_end;
  char* _IO_read_base;
  char* _IO_write_base;
  char* _IO_write_ptr;
  char* _IO_write_end;
  char* _IO_buf_base;
  char* _IO_buf_end;

  char *_IO_save_base;
  char *_IO_backup_base;
  char *_IO_save_end;

  struct _IO_marker *_markers;

  struct _IO_FILE *_chain;

  int _fileno;



  int _flags2;

  __off_t _old_offset;



  unsigned short _cur_column;
  signed char _vtable_offset;
  char _shortbuf[1];



  _IO_lock_t *_lock;
# 312 "/usr/include/libio.h" 3 4
  __off64_t _offset;





  void *__pad1;
  void *__pad2;

  int _mode;

  char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];

};


typedef struct _IO_FILE _IO_FILE;


struct _IO_FILE_plus;

extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 351 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);







typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
     size_t __n);







typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);


typedef int __io_close_fn (void *__cookie);
# 403 "/usr/include/libio.h" 3 4
extern int __underflow (_IO_FILE *) ;
extern int __uflow (_IO_FILE *) ;
extern int __overflow (_IO_FILE *, int) ;
extern wint_t __wunderflow (_IO_FILE *) ;
extern wint_t __wuflow (_IO_FILE *) ;
extern wint_t __woverflow (_IO_FILE *, wint_t) ;
# 433 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp) ;
extern int _IO_putc (int __c, _IO_FILE *__fp) ;
extern int _IO_feof (_IO_FILE *__fp) ;
extern int _IO_ferror (_IO_FILE *__fp) ;

extern int _IO_peekc_locked (_IO_FILE *__fp) ;





extern void _IO_flockfile (_IO_FILE *) ;
extern void _IO_funlockfile (_IO_FILE *) ;
extern int _IO_ftrylockfile (_IO_FILE *) ;
# 463 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
   __gnuc_va_list, int *__restrict) ;
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
    __gnuc_va_list) ;
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) ;
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) ;

extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) ;
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) ;

extern void _IO_free_backup_area (_IO_FILE *) ;
# 73 "/usr/include/stdio.h" 2 3 4
# 86 "/usr/include/stdio.h" 3 4


typedef _G_fpos_t fpos_t;




# 138 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 139 "/usr/include/stdio.h" 2 3 4



extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;







extern int remove (__const char *__filename) ;

extern int rename (__const char *__old, __const char *__new) ;









extern FILE *tmpfile (void);
# 178 "/usr/include/stdio.h" 3 4
extern char *tmpnam (char *__s) ;





extern char *tmpnam_r (char *__s) ;
# 196 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
     __attribute__ ((__malloc__));








extern int fclose (FILE *__stream);




extern int fflush (FILE *__stream);

# 221 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 235 "/usr/include/stdio.h" 3 4






extern FILE *fopen (__const char *__restrict __filename,
      __const char *__restrict __modes);




extern FILE *freopen (__const char *__restrict __filename,
        __const char *__restrict __modes,
        FILE *__restrict __stream);
# 262 "/usr/include/stdio.h" 3 4

# 273 "/usr/include/stdio.h" 3 4
extern FILE *fdopen (int __fd, __const char *__modes) ;
# 294 "/usr/include/stdio.h" 3 4



extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ;



extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
      int __modes, size_t __n) ;





extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
         size_t __size) ;


extern void setlinebuf (FILE *__stream) ;








extern int fprintf (FILE *__restrict __stream,
      __const char *__restrict __format, ...);




extern int printf (__const char *__restrict __format, ...);

extern int sprintf (char *__restrict __s,
      __const char *__restrict __format, ...) ;





extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg);




extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);

extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
       __gnuc_va_list __arg) ;





extern int snprintf (char *__restrict __s, size_t __maxlen,
       __const char *__restrict __format, ...)
     __attribute__ ((__format__ (__printf__, 3, 4)));

extern int vsnprintf (char *__restrict __s, size_t __maxlen,
        __const char *__restrict __format, __gnuc_va_list __arg)
     __attribute__ ((__format__ (__printf__, 3, 0)));

# 388 "/usr/include/stdio.h" 3 4





extern int fscanf (FILE *__restrict __stream,
     __const char *__restrict __format, ...);




extern int scanf (__const char *__restrict __format, ...);

extern int sscanf (__const char *__restrict __s,
     __const char *__restrict __format, ...) ;

# 430 "/usr/include/stdio.h" 3 4





extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);





extern int getchar (void);

# 454 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 465 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);











extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);





extern int putchar (int __c);

# 498 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);







extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);






extern int getw (FILE *__stream);


extern int putw (int __w, FILE *__stream);








extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);






extern char *gets (char *__s);

# 578 "/usr/include/stdio.h" 3 4





extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);





extern int puts (__const char *__s);






extern int ungetc (int __c, FILE *__stream);






extern size_t fread (void *__restrict __ptr, size_t __size,
       size_t __n, FILE *__restrict __stream);




extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
        size_t __n, FILE *__restrict __s);

# 631 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
         size_t __n, FILE *__restrict __stream);
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
          size_t __n, FILE *__restrict __stream);








extern int fseek (FILE *__stream, long int __off, int __whence);




extern long int ftell (FILE *__stream);




extern void rewind (FILE *__stream);

# 686 "/usr/include/stdio.h" 3 4






extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);




extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 709 "/usr/include/stdio.h" 3 4

# 718 "/usr/include/stdio.h" 3 4


extern void clearerr (FILE *__stream) ;

extern int feof (FILE *__stream) ;

extern int ferror (FILE *__stream) ;




extern void clearerr_unlocked (FILE *__stream) ;
extern int feof_unlocked (FILE *__stream) ;
extern int ferror_unlocked (FILE *__stream) ;








extern void perror (__const char *__s);






# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];
# 748 "/usr/include/stdio.h" 2 3 4




extern int fileno (FILE *__stream) ;




extern int fileno_unlocked (FILE *__stream) ;
# 767 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes);





extern int pclose (FILE *__stream);





extern char *ctermid (char *__s) ;
# 807 "/usr/include/stdio.h" 3 4
extern void flockfile (FILE *__stream) ;



extern int ftrylockfile (FILE *__stream) ;


extern void funlockfile (FILE *__stream) ;
# 831 "/usr/include/stdio.h" 3 4

# 33 "fractal.c" 2


# 1 "/usr/include/malloc.h" 1 3 4
# 46 "/usr/include/malloc.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 1 3 4
# 152 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 47 "/usr/include/malloc.h" 2 3 4
# 118 "/usr/include/malloc.h" 3 4
extern void * malloc (size_t __size) __attribute__ ((__malloc__));


extern void * calloc (size_t __nmemb, size_t __size)
       __attribute__ ((__malloc__));



extern void * realloc (void * __ptr, size_t __size)

       __attribute__ ((__malloc__));


extern void free (void * __ptr) ;


extern void cfree (void * __ptr) ;


extern void * memalign (size_t __alignment, size_t __size) ;


extern void * valloc (size_t __size) __attribute__ ((__malloc__));



extern void * pvalloc (size_t __size)
       __attribute__ ((__malloc__));



extern void * (*__morecore) (ptrdiff_t __size);


extern void * __default_morecore (ptrdiff_t __size)
       __attribute__ ((__malloc__));



struct mallinfo {
  int arena;
  int ordblks;
  int smblks;
  int hblks;
  int hblkhd;
  int usmblks;
  int fsmblks;
  int uordblks;
  int fordblks;
  int keepcost;
};


extern struct mallinfo mallinfo (void) ;
# 195 "/usr/include/malloc.h" 3 4
extern int mallopt (int __param, int __val) ;



extern int malloc_trim (size_t __pad) ;



extern size_t malloc_usable_size (void * __ptr) ;


extern void malloc_stats (void) ;


extern void * malloc_get_state (void) ;



extern int malloc_set_state (void * __ptr) ;




extern void (*__malloc_initialize_hook) (void);

extern void (*__free_hook) (void * __ptr, __const void *);

extern void * (*__malloc_hook) (size_t __size, __const void *);

extern void * (*__realloc_hook) (void * __ptr, size_t __size, __const void *);


extern void * (*__memalign_hook) (size_t __alignment, size_t __size, __const void *);


extern void (*__after_morecore_hook) (void);


extern void __malloc_check_init (void) ;
# 36 "fractal.c" 2



# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/limits.h" 1 3 4
# 11 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/limits.h" 3 4
# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/syslimits.h" 1 3 4






# 1 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/limits.h" 1 3 4
# 122 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/limits.h" 3 4
# 1 "/usr/include/limits.h" 1 3 4
# 144 "/usr/include/limits.h" 3 4
# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
# 130 "/usr/include/bits/posix1_lim.h" 3 4
# 1 "/usr/include/bits/local_lim.h" 1 3 4
# 36 "/usr/include/bits/local_lim.h" 3 4
# 1 "/usr/include/linux/limits.h" 1 3 4
# 37 "/usr/include/bits/local_lim.h" 2 3 4
# 131 "/usr/include/bits/posix1_lim.h" 2 3 4
# 145 "/usr/include/limits.h" 2 3 4



# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
# 149 "/usr/include/limits.h" 2 3 4
# 123 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/limits.h" 2 3 4
# 8 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/syslimits.h" 2 3 4
# 12 "/usr/lib/gcc/i486-linux-gnu/4.0.1/include/limits.h" 2 3 4
# 40 "fractal.c" 2
# 1 "/usr/include/assert.h" 1 3 4
# 41 "fractal.c" 2
# 1 "/usr/include/math.h" 1 3 4
# 29 "/usr/include/math.h" 3 4




# 1 "/usr/include/bits/huge_val.h" 1 3 4
# 34 "/usr/include/math.h" 2 3 4






# 1 "/usr/include/bits/mathdef.h" 1 3 4
# 41 "/usr/include/math.h" 2 3 4
# 65 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern double acos (double __x) ; extern double __acos (double __x) ;

extern double asin (double __x) ; extern double __asin (double __x) ;

extern double atan (double __x) ; extern double __atan (double __x) ;

extern double atan2 (double __y, double __x) ; extern double __atan2 (double __y, double __x) ;


extern double cos (double __x) ; extern double __cos (double __x) ;

extern double sin (double __x) ; extern double __sin (double __x) ;

extern double tan (double __x) ; extern double __tan (double __x) ;




extern double cosh (double __x) ; extern double __cosh (double __x) ;

extern double sinh (double __x) ; extern double __sinh (double __x) ;

extern double tanh (double __x) ; extern double __tanh (double __x) ;

# 87 "/usr/include/bits/mathcalls.h" 3 4


extern double acosh (double __x) ; extern double __acosh (double __x) ;

extern double asinh (double __x) ; extern double __asinh (double __x) ;

extern double atanh (double __x) ; extern double __atanh (double __x) ;







extern double exp (double __x) ; extern double __exp (double __x) ;


extern double frexp (double __x, int *__exponent) ; extern double __frexp (double __x, int *__exponent) ;


extern double ldexp (double __x, int __exponent) ; extern double __ldexp (double __x, int __exponent) ;


extern double log (double __x) ; extern double __log (double __x) ;


extern double log10 (double __x) ; extern double __log10 (double __x) ;


extern double modf (double __x, double *__iptr) ; extern double __modf (double __x, double *__iptr) ;

# 127 "/usr/include/bits/mathcalls.h" 3 4


extern double expm1 (double __x) ; extern double __expm1 (double __x) ;


extern double log1p (double __x) ; extern double __log1p (double __x) ;


extern double logb (double __x) ; extern double __logb (double __x) ;

# 152 "/usr/include/bits/mathcalls.h" 3 4


extern double pow (double __x, double __y) ; extern double __pow (double __x, double __y) ;


extern double sqrt (double __x) ; extern double __sqrt (double __x) ;





extern double hypot (double __x, double __y) ; extern double __hypot (double __x, double __y) ;






extern double cbrt (double __x) ; extern double __cbrt (double __x) ;








extern double ceil (double __x) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__const__));


extern double fabs (double __x) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__const__));


extern double floor (double __x) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__const__));


extern double fmod (double __x, double __y) ; extern double __fmod (double __x, double __y) ;




extern int __isinf (double __value) __attribute__ ((__const__));


extern int __finite (double __value) __attribute__ ((__const__));





extern int isinf (double __value) __attribute__ ((__const__));


extern int finite (double __value) __attribute__ ((__const__));


extern double drem (double __x, double __y) ; extern double __drem (double __x, double __y) ;



extern double significand (double __x) ; extern double __significand (double __x) ;





extern double copysign (double __x, double __y) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__const__));

# 231 "/usr/include/bits/mathcalls.h" 3 4
extern int __isnan (double __value) __attribute__ ((__const__));



extern int isnan (double __value) __attribute__ ((__const__));


extern double j0 (double) ; extern double __j0 (double) ;
extern double j1 (double) ; extern double __j1 (double) ;
extern double jn (int, double) ; extern double __jn (int, double) ;
extern double y0 (double) ; extern double __y0 (double) ;
extern double y1 (double) ; extern double __y1 (double) ;
extern double yn (int, double) ; extern double __yn (int, double) ;






extern double erf (double) ; extern double __erf (double) ;
extern double erfc (double) ; extern double __erfc (double) ;
extern double lgamma (double) ; extern double __lgamma (double) ;

# 265 "/usr/include/bits/mathcalls.h" 3 4
extern double gamma (double) ; extern double __gamma (double) ;






extern double lgamma_r (double, int *__signgamp) ; extern double __lgamma_r (double, int *__signgamp) ;







extern double rint (double __x) ; extern double __rint (double __x) ;


extern double nextafter (double __x, double __y) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__const__));





extern double remainder (double __x, double __y) ; extern double __remainder (double __x, double __y) ;



extern double scalbn (double __x, int __n) ; extern double __scalbn (double __x, int __n) ;



extern int ilogb (double __x) ; extern int __ilogb (double __x) ;
# 66 "/usr/include/math.h" 2 3 4
# 88 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern float acosf (float __x) ; extern float __acosf (float __x) ;

extern float asinf (float __x) ; extern float __asinf (float __x) ;

extern float atanf (float __x) ; extern float __atanf (float __x) ;

extern float atan2f (float __y, float __x) ; extern float __atan2f (float __y, float __x) ;


extern float cosf (float __x) ; extern float __cosf (float __x) ;

extern float sinf (float __x) ; extern float __sinf (float __x) ;

extern float tanf (float __x) ; extern float __tanf (float __x) ;




extern float coshf (float __x) ; extern float __coshf (float __x) ;

extern float sinhf (float __x) ; extern float __sinhf (float __x) ;

extern float tanhf (float __x) ; extern float __tanhf (float __x) ;

# 87 "/usr/include/bits/mathcalls.h" 3 4


extern float acoshf (float __x) ; extern float __acoshf (float __x) ;

extern float asinhf (float __x) ; extern float __asinhf (float __x) ;

extern float atanhf (float __x) ; extern float __atanhf (float __x) ;







extern float expf (float __x) ; extern float __expf (float __x) ;


extern float frexpf (float __x, int *__exponent) ; extern float __frexpf (float __x, int *__exponent) ;


extern float ldexpf (float __x, int __exponent) ; extern float __ldexpf (float __x, int __exponent) ;


extern float logf (float __x) ; extern float __logf (float __x) ;


extern float log10f (float __x) ; extern float __log10f (float __x) ;


extern float modff (float __x, float *__iptr) ; extern float __modff (float __x, float *__iptr) ;

# 127 "/usr/include/bits/mathcalls.h" 3 4


extern float expm1f (float __x) ; extern float __expm1f (float __x) ;


extern float log1pf (float __x) ; extern float __log1pf (float __x) ;


extern float logbf (float __x) ; extern float __logbf (float __x) ;

# 152 "/usr/include/bits/mathcalls.h" 3 4


extern float powf (float __x, float __y) ; extern float __powf (float __x, float __y) ;


extern float sqrtf (float __x) ; extern float __sqrtf (float __x) ;





extern float hypotf (float __x, float __y) ; extern float __hypotf (float __x, float __y) ;






extern float cbrtf (float __x) ; extern float __cbrtf (float __x) ;








extern float ceilf (float __x) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__const__));


extern float fabsf (float __x) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__const__));


extern float floorf (float __x) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__const__));


extern float fmodf (float __x, float __y) ; extern float __fmodf (float __x, float __y) ;




extern int __isinff (float __value) __attribute__ ((__const__));


extern int __finitef (float __value) __attribute__ ((__const__));





extern int isinff (float __value) __attribute__ ((__const__));


extern int finitef (float __value) __attribute__ ((__const__));


extern float dremf (float __x, float __y) ; extern float __dremf (float __x, float __y) ;



extern float significandf (float __x) ; extern float __significandf (float __x) ;





extern float copysignf (float __x, float __y) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__const__));

# 231 "/usr/include/bits/mathcalls.h" 3 4
extern int __isnanf (float __value) __attribute__ ((__const__));



extern int isnanf (float __value) __attribute__ ((__const__));


extern float j0f (float) ; extern float __j0f (float) ;
extern float j1f (float) ; extern float __j1f (float) ;
extern float jnf (int, float) ; extern float __jnf (int, float) ;
extern float y0f (float) ; extern float __y0f (float) ;
extern float y1f (float) ; extern float __y1f (float) ;
extern float ynf (int, float) ; extern float __ynf (int, float) ;






extern float erff (float) ; extern float __erff (float) ;
extern float erfcf (float) ; extern float __erfcf (float) ;
extern float lgammaf (float) ; extern float __lgammaf (float) ;

# 265 "/usr/include/bits/mathcalls.h" 3 4
extern float gammaf (float) ; extern float __gammaf (float) ;






extern float lgammaf_r (float, int *__signgamp) ; extern float __lgammaf_r (float, int *__signgamp) ;







extern float rintf (float __x) ; extern float __rintf (float __x) ;


extern float nextafterf (float __x, float __y) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__const__));





extern float remainderf (float __x, float __y) ; extern float __remainderf (float __x, float __y) ;



extern float scalbnf (float __x, int __n) ; extern float __scalbnf (float __x, int __n) ;



extern int ilogbf (float __x) ; extern int __ilogbf (float __x) ;
# 89 "/usr/include/math.h" 2 3 4
# 109 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4


extern long double acosl (long double __x) ; extern long double __acosl (long double __x) ;

extern long double asinl (long double __x) ; extern long double __asinl (long double __x) ;

extern long double atanl (long double __x) ; extern long double __atanl (long double __x) ;

extern long double atan2l (long double __y, long double __x) ; extern long double __atan2l (long double __y, long double __x) ;


extern long double cosl (long double __x) ; extern long double __cosl (long double __x) ;

extern long double sinl (long double __x) ; extern long double __sinl (long double __x) ;

extern long double tanl (long double __x) ; extern long double __tanl (long double __x) ;




extern long double coshl (long double __x) ; extern long double __coshl (long double __x) ;

extern long double sinhl (long double __x) ; extern long double __sinhl (long double __x) ;

extern long double tanhl (long double __x) ; extern long double __tanhl (long double __x) ;

# 87 "/usr/include/bits/mathcalls.h" 3 4


extern long double acoshl (long double __x) ; extern long double __acoshl (long double __x) ;

extern long double asinhl (long double __x) ; extern long double __asinhl (long double __x) ;

extern long double atanhl (long double __x) ; extern long double __atanhl (long double __x) ;







extern long double expl (long double __x) ; extern long double __expl (long double __x) ;


extern long double frexpl (long double __x, int *__exponent) ; extern long double __frexpl (long double __x, int *__exponent) ;


extern long double ldexpl (long double __x, int __exponent) ; extern long double __ldexpl (long double __x, int __exponent) ;


extern long double logl (long double __x) ; extern long double __logl (long double __x) ;


extern long double log10l (long double __x) ; extern long double __log10l (long double __x) ;


extern long double modfl (long double __x, long double *__iptr) ; extern long double __modfl (long double __x, long double *__iptr) ;

# 127 "/usr/include/bits/mathcalls.h" 3 4


extern long double expm1l (long double __x) ; extern long double __expm1l (long double __x) ;


extern long double log1pl (long double __x) ; extern long double __log1pl (long double __x) ;


extern long double logbl (long double __x) ; extern long double __logbl (long double __x) ;

# 152 "/usr/include/bits/mathcalls.h" 3 4


extern long double powl (long double __x, long double __y) ; extern long double __powl (long double __x, long double __y) ;


extern long double sqrtl (long double __x) ; extern long double __sqrtl (long double __x) ;





extern long double hypotl (long double __x, long double __y) ; extern long double __hypotl (long double __x, long double __y) ;






extern long double cbrtl (long double __x) ; extern long double __cbrtl (long double __x) ;








extern long double ceill (long double __x) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__const__));


extern long double fabsl (long double __x) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__const__));


extern long double floorl (long double __x) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__const__));


extern long double fmodl (long double __x, long double __y) ; extern long double __fmodl (long double __x, long double __y) ;




extern int __isinfl (long double __value) __attribute__ ((__const__));


extern int __finitel (long double __value) __attribute__ ((__const__));





extern int isinfl (long double __value) __attribute__ ((__const__));


extern int finitel (long double __value) __attribute__ ((__const__));


extern long double dreml (long double __x, long double __y) ; extern long double __dreml (long double __x, long double __y) ;



extern long double significandl (long double __x) ; extern long double __significandl (long double __x) ;





extern long double copysignl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__const__));

# 231 "/usr/include/bits/mathcalls.h" 3 4
extern int __isnanl (long double __value) __attribute__ ((__const__));



extern int isnanl (long double __value) __attribute__ ((__const__));


extern long double j0l (long double) ; extern long double __j0l (long double) ;
extern long double j1l (long double) ; extern long double __j1l (long double) ;
extern long double jnl (int, long double) ; extern long double __jnl (int, long double) ;
extern long double y0l (long double) ; extern long double __y0l (long double) ;
extern long double y1l (long double) ; extern long double __y1l (long double) ;
extern long double ynl (int, long double) ; extern long double __ynl (int, long double) ;






extern long double erfl (long double) ; extern long double __erfl (long double) ;
extern long double erfcl (long double) ; extern long double __erfcl (long double) ;
extern long double lgammal (long double) ; extern long double __lgammal (long double) ;

# 265 "/usr/include/bits/mathcalls.h" 3 4
extern long double gammal (long double) ; extern long double __gammal (long double) ;






extern long double lgammal_r (long double, int *__signgamp) ; extern long double __lgammal_r (long double, int *__signgamp) ;







extern long double rintl (long double __x) ; extern long double __rintl (long double __x) ;


extern long double nextafterl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__const__));





extern long double remainderl (long double __x, long double __y) ; extern long double __remainderl (long double __x, long double __y) ;



extern long double scalbnl (long double __x, int __n) ; extern long double __scalbnl (long double __x, int __n) ;



extern int ilogbl (long double __x) ; extern int __ilogbl (long double __x) ;
# 110 "/usr/include/math.h" 2 3 4
# 125 "/usr/include/math.h" 3 4
extern int signgam;
# 252 "/usr/include/math.h" 3 4
typedef enum
{
  _IEEE_ = -1,
  _SVID_,
  _XOPEN_,
  _POSIX_,
  _ISOC_
} _LIB_VERSION_TYPE;




extern _LIB_VERSION_TYPE _LIB_VERSION;
# 277 "/usr/include/math.h" 3 4
struct exception

  {
    int type;
    char *name;
    double arg1;
    double arg2;
    double retval;
  };




extern int matherr (struct exception *__exc);
# 423 "/usr/include/math.h" 3 4

# 42 "fractal.c" 2






# 1 "/home/joey/src/packages/xaos/src/include/filter.h" 1


# 1 "/home/joey/src/packages/xaos/src/include/fconfig.h" 1
# 4 "/home/joey/src/packages/xaos/src/include/filter.h" 2





  typedef unsigned char pixel_t;
  typedef unsigned char rgb_t[4];
  struct truec
  {
    int rshift, gshift, bshift;
    int rprec, gprec, bprec;
    unsigned int rmask, gmask, bmask;
    unsigned int mask1, mask2, allmask;

    int byteexact;
    int missingbyte;

  };
  union paletteinfo
  {
    struct truec truec;
  };
  struct palette
  {
    int start;
    int end;
    int maxentries;
    int version;
    int type;
    unsigned int *pixels;
    int npreallocated;
    rgb_t *rgb;
    int flags;
    int (*alloccolor) (struct palette * pal, int init, int r, int g, int b);
    void (*setpalette) (struct palette * pal, int start, int end,
   rgb_t * rgb);
    void (*allocfinished) (struct palette * pal);
    void (*cyclecolors) (struct palette * pal, int direction);
    int size;
    void *data;

    int ncells;
    unsigned int *index;
    const rgb_t *prergb;
    union paletteinfo info;
  };
  struct image
  {
    float pixelwidth, pixelheight;
    pixel_t **oldlines;
    pixel_t **currlines;
    void (*flip) (struct image * img);
    int width, height, nimages;
    int bytesperpixel;
    int currimage;
    int flags;
    int scanline;
    int version;
    struct palette *palette;
    void *data;
  };
# 139 "/home/joey/src/packages/xaos/src/include/filter.h"
# 1 "/home/joey/src/packages/xaos/src/include/pixel_t.h" 1

typedef unsigned int pixel32_t;







typedef unsigned short pixel16_t;






typedef unsigned char pixel8_t;
typedef unsigned char ppixel24_t[3];
typedef pixel8_t *ppixel8_t;
typedef pixel16_t *ppixel16_t;
typedef pixel32_t *ppixel32_t;
# 140 "/home/joey/src/packages/xaos/src/include/filter.h" 2


  struct requirements
  {
    int nimages;
    int supportedmask;
    int flags;
  };
  struct filter
  {
    struct filter *next, *previous;
    struct queue *queue;
    const struct filteraction *action;
    struct image *image, *childimage;
    struct requirements req;
    struct fractal_context *fractalc;
    void *data;
    const char *name;
    int flags;
    int imageversion;
    void (*wait_function) (struct filter * f);

    int pos, max, incalculation, readyforinterrupt, interrupt;
    const char *pass;
  };
  struct initdata
  {
    void (*wait_function) (struct filter * f);
    struct image *image;
    struct fractal_context *fractalc;
    int flags;
  };
  struct filteraction
  {
    const char *name;
    const char *shortname;
    int flags;
    struct filter *(*getinstance) (const struct filteraction * a);
    void (*destroyinstance) (struct filter * f);
    int (*doit) (struct filter * f, int flags, int time);
    int (*requirement) (struct filter * f, struct requirements * r);
    int (*initialize) (struct filter * f, struct initdata * i);
    void (*convertup) (struct filter * f, int *x, int *y);
    void (*convertdown) (struct filter * f, int *x, int *y);
    void (*removefilter) (struct filter * f);
  };
  struct queue
  {
    struct filter *first, *last;
    int isinitialized;
    struct filter *palettechg;
    struct image *saveimage;
  };





  extern unsigned int col_diff[3][512];
  struct filter *createfilter (const struct filteraction *fa);
  struct queue *create_queue (struct filter *f);
  void insertfilter (struct filter *f1, struct filter *f2);
  void removefilter (struct filter *f);
  void addfilter (struct filter *f1, struct filter *f2);
  int initqueue (struct queue *q);


  int reqimage (struct filter *f, struct requirements *req, int supportedmask,
  int flags);
  int inherimage (struct filter *f, struct initdata *data, int flags,
    int width, int height, struct palette *palette,
    float pixelwidth, float pixelheight);
  void destroyinheredimage (struct filter *f);
  void updateinheredimage (struct filter *f);

  void inhermisc (struct filter *f, const struct initdata *i);



  void flipgeneric (struct image *img);
  struct image *create_image_lines (int width, int height,
        int nimages, pixel_t ** lines1,
        pixel_t ** lines2,
        struct palette *palette,
        void (*flip) (struct image * img),
        int flags, float pixelwidth,
        float pixelheight);
  struct image *create_image_cont (int width, int height, int scanlinesize,
       int nimages, pixel_t * buf1,
       pixel_t * buf2, struct palette *palette,
       void (*flip) (struct image * img),
       int flags, float pixelwidth,
       float pixelheight);
  struct image *create_image_mem (int width, int height, int nimages,
      struct palette *palette, float pixelwidth,
      float pixelheight);
  struct image *create_subimage (struct image *simg, int width, int height,
     int nimages, struct palette *palette,
     float pixelwidth, float pixelheight);

  void destroy_image (struct image *img);
  void clear_image (struct image *img);



  int bytesperpixel (int type) __attribute__ ((__const__));
  void bestfit_init (void);
  struct palette *createpalette (int start, int end, int type, int flags,
     int maxentries,
     int (*alloccolor) (struct palette * pal,
          int init, int r, int g,
          int b),
     void (*setcolor) (struct palette * pal,
         int start, int end,
         rgb_t * rgb),
     void (*allocfinished) (struct palette * pal),
     void (*cyclecolors) (struct palette * pal,
            int direction),
     union paletteinfo *info);
  void destroypalette (struct palette *palette);
  int mkdefaultpalette (struct palette *palette);
  int mkstereogrampalette (struct palette *palette);
  int mkstarfieldpalette (struct palette *palette);
  int mkblurpalette (struct palette *palette);
  int mkgraypalette (struct palette *palette);
  int mkrgb (struct palette *palette);
  int mkpalette (struct palette *palette, int seed, int algorithm);
  int shiftpalette (struct palette *palette, int n);
  void preallocpalette (struct palette *pal);
  struct palette *clonepalette (struct palette *palette);
  void restorepalette (struct palette *dest, struct palette *src);
  void convertupgeneric (struct filter *f, int *x, int *y);
  void convertdowngeneric (struct filter *f, int *x, int *y);
  int fixedalloccolor (struct palette *palette, int init, int r, int g,
         int b) __attribute__ ((__const__));
# 319 "/home/joey/src/packages/xaos/src/include/filter.h"
# 1 "/home/joey/src/packages/xaos/src/include/fractal.h" 1
# 30 "/home/joey/src/packages/xaos/src/include/fractal.h"
# 1 "/home/joey/src/packages/xaos/src/include/config.h" 1
# 31 "/home/joey/src/packages/xaos/src/include/fractal.h" 2
# 1 "/home/joey/src/packages/xaos/src/include/fconfig.h" 1
# 32 "/home/joey/src/packages/xaos/src/include/fractal.h" 2
# 1 "/home/joey/src/packages/xaos/src/include/formulas.h" 1
# 26 "/home/joey/src/packages/xaos/src/include/formulas.h"
# 1 "/home/joey/src/packages/xaos/src/include/fractal.h" 1
# 27 "/home/joey/src/packages/xaos/src/include/formulas.h" 2
# 38 "/home/joey/src/packages/xaos/src/include/formulas.h"
  extern const char *const incolorname[];
  extern const char *const outcolorname[];
  extern const char *const tcolorname[];
  extern const int nformulas;
# 33 "/home/joey/src/packages/xaos/src/include/fractal.h" 2




  typedef struct
  {
    number_t y0, k;
  }
  symetrytype;

  struct symetryinfo
  {
    number_t xsym, ysym;
    int nsymetries;
    const symetrytype *symetry;
  };
  typedef struct
  {
    number_t mc, nc;
    number_t mi, ni;
  }
  vrect;
  typedef struct
  {
    number_t cr, ci;
    number_t rr, ri;
  }
  vinfo;
  typedef unsigned int (*iterationfunc) (number_t, number_t, number_t,
      number_t) __attribute__ ((__const__)) __attribute__ ((__regparm__(3)));
  struct formula
  {
    int magic;

    iterationfunc calculate, calculate_periodicity, smooth_calculate,
      smooth_calculate_periodicity;

    void (*calculate_julia) (struct image * img, register number_t pre,
        register number_t pim);
    const char *name[2];
    const char *shortname;
    vinfo v;
    int hasperiodicity;
    int mandelbrot;
    number_t pre, pim;
    struct symetryinfo (out[11 + 1]);
    struct symetryinfo (in[11 + 1]);
    int flags;
  };

  struct fractal_context
  {
    number_t pre, pim;
    number_t bre, bim;
    const struct formula *currentformula;
    number_t angle;
    int periodicity;
    unsigned int maxiter;
    number_t bailout;
    int coloringmode, incoloringmode;
    int intcolor, outtcolor;
    int mandelbrot;
    int plane;
    int version;
    int range;
    float windowwidth, windowheight;
    vinfo s;
    vrect rs;
    number_t sin, cos;
    int slowmode;

    iterationfunc calculate[2];
    number_t periodicity_limit;
    struct palette *palette;
  };
  typedef struct fractal_context fractal_context;
  typedef struct
  {
    double y0, k, kk, y0k;
  }
  symetry2;

  struct symetryinfo2
  {
    number_t xsym, ysym;
    int nsymetries;
    symetry2 *symetry;
    number_t xmul, ymul, xdist, ydist;
  };
# 139 "/home/joey/src/packages/xaos/src/include/fractal.h"
  extern struct symetryinfo2 cursymetry;
  extern struct fractal_context cfractalc;
  extern struct formula cformula;
  extern struct palette cpalette;
  extern struct image cimage;
# 160 "/home/joey/src/packages/xaos/src/include/fractal.h"
  void set_formula (fractal_context *, int);
  void set_fractalc (fractal_context *, struct image *img);
  void fractalc_resize_to (fractal_context *, float, float);
  void update_view (fractal_context *);
  void free_fractalc (fractal_context *);
  fractal_context *make_fractalc (const int, float, float);
  void speed_test (fractal_context *, struct image *img);
  unsigned int calculateswitch (register number_t x1, register number_t y1,
    register number_t x2, register number_t y2,
    int periodicity) __attribute__ ((__regparm__(3)));
# 320 "/home/joey/src/packages/xaos/src/include/filter.h" 2
# 49 "fractal.c" 2
# 1 "/home/joey/src/packages/xaos/src/include/complex.h" 1
# 60 "/home/joey/src/packages/xaos/src/include/complex.h"
# 1 "/home/joey/src/packages/xaos/src/include/gccbuild.h" 1
# 31 "/home/joey/src/packages/xaos/src/include/gccbuild.h"
# 1 "/home/joey/src/packages/xaos/src/include/aconfig.h" 1
# 32 "/home/joey/src/packages/xaos/src/include/gccbuild.h" 2
# 61 "/home/joey/src/packages/xaos/src/include/complex.h" 2
# 50 "fractal.c" 2
# 1 "/home/joey/src/packages/xaos/src/include/plane.h" 1
# 26 "/home/joey/src/packages/xaos/src/include/plane.h"
# 1 "/home/joey/src/packages/xaos/src/include/zoom.h" 1
# 33 "/home/joey/src/packages/xaos/src/include/zoom.h"
  extern const struct filteraction zoom_filter;
  extern struct filter cfilter;
  extern const struct filteraction subwindow_filter;
  void subwindow_setsecond (struct filter *f, struct filter *f1);
# 27 "/home/joey/src/packages/xaos/src/include/plane.h" 2
# 42 "/home/joey/src/packages/xaos/src/include/plane.h"
  extern void recalculate (int plane, number_t *, number_t *) __attribute__ ((__regparm__(3)));

  extern const char *const planename[];
# 51 "fractal.c" 2
# 1 "../include/timers.h" 1
# 25 "../include/timers.h"
# 1 "../include/config.h" 1
# 26 "../include/timers.h" 2





  struct timer;
  struct timeemulator;
  typedef struct timer tl_timer;
  typedef struct timer tl_group;

  void tl_update_time (void);
  tl_timer *tl_create_timer (void);
  tl_group *tl_create_group (void);
  void tl_set_interval (tl_timer * timer, int interval);
  void tl_set_handler (tl_timer * timer, void (*handler) (void *),
         void *userdata);
  void tl_set_multihandler (tl_timer * timer, void (*handler) (void *, int),
       void *userdata);
  void tl_add_timer (tl_group * group, tl_timer * timer);
  void tl_remove_timer (tl_timer * timer);
  void tl_free_timer (tl_timer * timer);
  void tl_free_group (tl_group * timer);
  void tl_stop_timer (tl_timer * t);
  void tl_resume_timer (tl_timer * t);
  void tl_slowdown_timer (tl_timer * t, int time);
  int tl_process_group (tl_group * group, int *activated);
  extern tl_group *syncgroup, *asyncgroup;
  void tl_sleep (int);
  void tl_allegromode (int mode);
  int tl_lookup_timer (tl_timer * t) __attribute__ ((__regparm__(3)));
  void tl_reset_timer (tl_timer * t) __attribute__ ((__regparm__(3)));

  struct timeemulator *tl_create_emulator (void);
  void tl_free_emulator (struct timeemulator *t);
  void tl_elpased (struct timeemulator *t, int elpased);
  void tl_emulate_timer (struct timer *t, struct timeemulator *e);
  void tl_unemulate_timer (struct timer *t);
# 52 "fractal.c" 2



# 1 "/home/joey/src/packages/xaos/src/include/i386/ctrl87.h" 1
# 103 "/home/joey/src/packages/xaos/src/include/i386/ctrl87.h"
extern unsigned short _control87 (unsigned short, unsigned short);
# 56 "fractal.c" 2
# 67 "fractal.c"
# 1 "/home/joey/src/packages/xaos/src/include/xerror.h" 1






  void x_message (const char *text, ...);
  void x_error (const char *text, ...);
  void x_fatalerror (const char *text, ...);
# 68 "fractal.c" 2

struct symetryinfo2 cursymetry;
struct palette cpalette;
struct image cimage;
struct fractal_context cfractalc;
struct formula cformula;

static symetry2 sym_lines[100];

extern const struct formula formulas[];

static void
precalculate_rotation (fractal_context * c)
{
  c->sin = __builtin_sin((c->angle) * 3.14159265358979323846 / 180);
  c->cos = __builtin_cos((c->angle) * 3.14159265358979323846 / 180);
}
static void
recalc_view (fractal_context * c)
{
  number_t
    xs = c->s.rr, ys = c->s.ri * c->windowwidth / c->windowheight,
    xc = c->s.cr, yc = c->s.ci, size;
  precalculate_rotation (c);
  { number_t tmp; tmp=(xc)*(*c).cos-(yc)*(*c).sin; yc=(xc)*(*c).sin+(yc)*(*c).cos; xc=tmp; };



  xs = __builtin_fabsl((number_t)(xs));
  ys = __builtin_fabsl((number_t)(ys));
  if (xs > ys)
    size = xs;
  else
    size = ys;
  c->rs.nc = xc - size / 2;
  c->rs.mc = xc + size / 2;
  c->rs.ni = yc - size * c->windowheight / c->windowwidth / 2;
  c->rs.mi = yc + size * c->windowheight / c->windowwidth / 2;
  if (c->rs.nc > c->rs.mc)
    xc = c->rs.nc, c->rs.nc = c->rs.mc, c->rs.mc = xc;
  if (c->rs.ni > c->rs.mi)
    xc = c->rs.ni, c->rs.ni = c->rs.mi, c->rs.mi = xc;
}
static void
set_view (fractal_context * c, const vinfo * s)
{
  c->s = *s;
  recalc_view (c);
}


static void
combine_methods (void)
{



  int angle = (int) cfractalc.angle;
  const struct symetryinfo *s1 =
    cfractalc.currentformula->out + cfractalc.coloringmode, *s2 =
    cfractalc.currentformula->in + cfractalc.incoloringmode;
  if (angle < 0)
    {
      angle = 360 - ((-angle) % 360);
    }
  else
    angle %= 360;
  if (cfractalc.mandelbrot != cfractalc.currentformula->mandelbrot ||
      cfractalc.bre || cfractalc.bim)
    {
      cursymetry.xsym = (number_t) 2147483647;
      cursymetry.ysym = (number_t) 2147483647;
      cursymetry.nsymetries = 0;
      return;
    }






  if (s1->xsym == s2->xsym)
    cursymetry.xsym = s1->xsym;
  else
    cursymetry.xsym = (number_t) 2147483647;
  if (s1->ysym == s2->ysym)
    cursymetry.ysym = s1->ysym;
  else
    cursymetry.ysym = (number_t) 2147483647;
  switch (cfractalc.plane)
    {
    case 2:
      cursymetry.xsym = (number_t) 2147483647;
      break;
    case 3:
      if (cursymetry.xsym == 0 && cursymetry.ysym == 0)
 cursymetry.xsym = (number_t) 1;
      else
 cursymetry.xsym = (number_t) 2147483647;
      break;
    case 4:
      cursymetry.xsym = (number_t) 2147483647;
      break;
    case 5:
      if (cursymetry.xsym != 0 || cursymetry.ysym != 0)
 cursymetry.xsym = (number_t) 2147483647;
      break;
    case 6:
      cursymetry.xsym = (number_t) 2147483647;
      break;
    }
  cursymetry.symetry = sym_lines;
  cursymetry.nsymetries = 0;
  if ((number_t) angle == cfractalc.angle)
    {
      switch (angle)
 {
 case 0:
   break;
 case 180:
   cursymetry.xsym = -cursymetry.xsym;
   cursymetry.ysym = -cursymetry.ysym;
   break;
 case 90:
   {
     number_t tmp = cursymetry.xsym;
     cursymetry.xsym = -cursymetry.ysym;
     cursymetry.ysym = tmp;
   }
   break;
 case 210:
   {
     number_t tmp = cursymetry.xsym;
     cursymetry.xsym = cursymetry.ysym;
     cursymetry.ysym = -tmp;
   }
   break;
 default:
   cursymetry.xsym = (number_t) 2147483647;
   cursymetry.ysym = (number_t) 2147483647;
 }
    }
  else
    {
      cursymetry.xsym = (number_t) 2147483647;
      cursymetry.ysym = (number_t) 2147483647;
    }
  if (cursymetry.xsym == -(number_t) 2147483647)
    cursymetry.xsym = (number_t) 2147483647;
  if (cursymetry.ysym == -(number_t) 2147483647)
    cursymetry.ysym = (number_t) 2147483647;
}

void
update_view (fractal_context * context)
{
  set_view (context, &context->s);
}

void
set_fractalc (fractal_context * context, struct image *img)
{
  update_view (context);
  precalculate_rotation (context);
  cfractalc = *context;
  cpalette = *img->palette;
  cimage = *img;
  cformula = *context->currentformula;

  if (cfractalc.maxiter < 1)
    cfractalc.maxiter = 1;

  if (cfractalc.bailout < 0)
    cfractalc.bailout = 0;

  if (cfractalc.periodicity)
    {
      if (!cformula.hasperiodicity || cfractalc.incoloringmode
   || !cfractalc.mandelbrot)
 cfractalc.periodicity = 0;
      else if (!cfractalc.plane)
 cfractalc.periodicity_limit =
   (context->rs.mc - context->rs.nc) / (double) img->width;
      else
 {
   int x, y;
   number_t xstep =
     ((context->rs.mc - context->rs.nc) / (double) img->width);
   number_t ystep =
     ((context->rs.mc - context->rs.nc) / (double) img->height);
   number_t xstep2 = ((context->rs.mc - context->rs.nc) / 5);
   number_t ystep2 = ((context->rs.mc - context->rs.nc) / 5);

   for (x = 0; x < 5; x++)
     for (y = 0; y < 5; y++)
       {
  number_t x1 = context->rs.mc + xstep2 * x;
  number_t y1 = context->rs.mi + ystep2 * y;
  number_t x2 = context->rs.mc + xstep2 * x + xstep;
  number_t y2 = context->rs.mi + ystep2 * y + ystep;

  recalculate (cfractalc.plane, &x1, &y1);
  recalculate (cfractalc.plane, &x2, &y2);

  x1 = __builtin_fabsl((number_t)(x2 - x1));
  y1 = __builtin_fabsl((number_t)(y2 - y1));

  if (x == y && x == 0)
    cfractalc.periodicity_limit = x1;
  if (cfractalc.periodicity > x1)
    cfractalc.periodicity_limit = x1;
  if (cfractalc.periodicity > y1)
    cfractalc.periodicity_limit = y1;
       }
 }
    }

  combine_methods ();

  if (cursymetry.xsym == (number_t) 2147483647)
    cursymetry.xsym = cfractalc.rs.mc + 2147483647;

  if (cursymetry.ysym == (number_t) 2147483647)
    cursymetry.ysym = cfractalc.rs.mi + 2147483647;


  if (cfractalc.coloringmode == 9 && cformula.smooth_calculate != ((void *)0)
      && (cpalette.type & (16 | 4 | 8 | 2 |
      32)))
    {
      cfractalc.calculate[0] = cformula.smooth_calculate;
      if (cformula.smooth_calculate_periodicity && cfractalc.periodicity)
 cfractalc.calculate[1] = cformula.smooth_calculate_periodicity;
      else
 cfractalc.calculate[1] = cformula.smooth_calculate;
    }
  else
    {
      cfractalc.calculate[0] = cformula.calculate;
      if (cformula.calculate_periodicity && cfractalc.periodicity)
 cfractalc.calculate[1] = cformula.calculate_periodicity;
      else
 cfractalc.calculate[1] = cformula.calculate;
    }


}




void
set_formula (fractal_context * c, int num)
{
  ((void) (0));
  ((void) (0));
  if (num >= nformulas)
    num = 0;
  if (c->currentformula != formulas + num)
    {
      c->currentformula = formulas + num;
      c->version++;
    }
  if (c->mandelbrot != c->currentformula->mandelbrot)
    {
      c->mandelbrot = c->currentformula->mandelbrot;
      c->version++;
    }
  if (c->currentformula->pre != c->pre)
    {
      c->pre = c->currentformula->pre;
      if (!c->mandelbrot)
 c->version++;
    }
  if (c->currentformula->pim != c->pim)
    {
      c->pim = c->currentformula->pim;
      if (!c->mandelbrot)
 c->version++;
    }
  if (c->angle)
    {
      c->angle = 0;
      c->version++;
    }
  if (c->s.cr != c->currentformula->v.cr ||
      c->s.ci != c->currentformula->v.ci ||
      c->s.rr != c->currentformula->v.rr ||
      c->s.ri != c->currentformula->v.ri)
    {
      c->s = c->currentformula->v;
      c->version++;
    }
  if (c->bre && c->bim)
    {
      c->bre = c->bim = 0;
      if (c->mandelbrot)
 c->version++;
    }
}


void
fractalc_resize_to (fractal_context * c, float wi, float he)
{
  c->windowwidth = wi;
  c->windowheight = he;
  recalc_view (c);
  return;
}



fractal_context *
make_fractalc (const int formula, float wi, float he)
{
  fractal_context *new_ctxt;





  _control87 (0x0300 | 0x003f | 0x0c00, 0x0300 | 0x003f | 0x0c00);
# 410 "fractal.c"
  new_ctxt = (fractal_context *) calloc (1, sizeof (fractal_context));
  if (new_ctxt == ((void *)0))
    return 0;
  new_ctxt->windowwidth = wi;
  new_ctxt->periodicity = 1;
  new_ctxt->windowheight = he;
  new_ctxt->maxiter = 170;
  new_ctxt->bailout = 4;
  new_ctxt->coloringmode = 0;
  new_ctxt->intcolor = 1;
  new_ctxt->outtcolor = 1;
  new_ctxt->slowmode = 0;
  new_ctxt->range = 3;
  new_ctxt->angle = 0;
  set_formula (new_ctxt, formula);
  return (new_ctxt);
}

void
free_fractalc (fractal_context * c)
{
  free (c);
}







void
speed_test (fractal_context * c, struct image *img)
{
  unsigned int sum;
  tl_timer *t;
  int time;
  unsigned int i;
  set_fractalc (c, img);
  t = tl_create_timer ();
  cfractalc.maxiter = 100;



  cfractalc.currentformula->calculate (0.0, 0.0, 0.0, 0.0);
  if (cfractalc.currentformula->calculate_periodicity != ((void *)0))
    cfractalc.currentformula->calculate_periodicity (0.0, 0.0, 0.0, 0.0);
  if (cfractalc.currentformula->smooth_calculate != ((void *)0))
    cfractalc.currentformula->smooth_calculate (0.0, 0.0, 0.0, 0.0);
  if (cfractalc.currentformula->smooth_calculate_periodicity != ((void *)0))
    cfractalc.currentformula->smooth_calculate_periodicity (0.0, 0.0, 0.0,
           0.0);

  cfractalc.maxiter = 20000000;

  tl_update_time ();
  tl_reset_timer (t);




  i = cfractalc.currentformula->calculate (0.0, 0.0, 0.0, 0.0);



  tl_update_time ();
  time = tl_lookup_timer (t);
  x_message ("Result:%i Formulaname:%s Time:%i Mloops per sec:%.2f",
      (int) i,
      cfractalc.currentformula->name[0], time,
      cfractalc.maxiter / (double) time);




  if (cfractalc.currentformula->smooth_calculate != ((void *)0))
    {
      tl_update_time ();
      tl_reset_timer (t);
      i = cfractalc.currentformula->smooth_calculate (0.0, 0.0, 0.0, 0.0);
      tl_update_time ();
      time = tl_lookup_timer (t);
      x_message ("Result:%i Formulaname:%s Time:%i Mloops per sec:%.2f",
   (int) i,
   cfractalc.currentformula->name[0],
   time, cfractalc.maxiter / (double) time);
    }



  tl_free_timer (t);
}

Attachment: signature.asc
Description: Digital signature


Reply to: