// /usr/libexec/gcc/i686-pc-linux-gnu/3.4.1/cc1plus -quiet -I. -I/var/tmp/portage/groff-1.19/work/groff-1.19/src/preproc/pic -I/var/tmp/portage/groff-1.19/work/groff-1.19/src/include -I/var/tmp/portage/groff-1.19/work/groff-1.19/src/include -D_GNU_SOURCE -DHAVE_CONFIG_H object.cpp -fPIE -fstack-protector -fstack-protector-all -quiet -dumpbase object.cpp -march=pentium4 -auxbase object -O2 -fnew-ra -ftracer -o - -frandom-seed=0 # 1 "object.cpp" # 1 "" # 1 "" # 1 "object.cpp" # 22 "object.cpp" # 1 "pic.h" 1 # 22 "pic.h" # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 1 # 22 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/config.h" 1 # 23 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 2 extern "C" { const char *i_to_a(int); const char *ui_to_a(unsigned int); const char *if_to_a(int, int); } # 42 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/groff-getopt.h" 1 # 30 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/groff-getopt.h" extern "C" { extern char *optarg; extern int optind; extern int opterr; extern int optopt; struct option { const char *name; int has_arg; int *flag; int val; }; extern int getopt(int, char *const *, const char *); extern int getopt_long(int, char *const *, const char *, const struct option *, int *); extern int getopt_long_only(int, char *const *, const char *, const struct option *, int *); } # 43 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 2 # 1 "/usr/include/locale.h" 1 3 4 # 26 "/usr/include/locale.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/locale.h" 2 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 # 30 "/usr/include/locale.h" 2 3 4 # 1 "/usr/include/bits/locale.h" 1 3 4 # 27 "/usr/include/bits/locale.h" 3 4 enum { __LC_CTYPE = 0, __LC_NUMERIC = 1, __LC_TIME = 2, __LC_COLLATE = 3, __LC_MONETARY = 4, __LC_MESSAGES = 5, __LC_ALL = 6, __LC_PAPER = 7, __LC_NAME = 8, __LC_ADDRESS = 9, __LC_TELEPHONE = 10, __LC_MEASUREMENT = 11, __LC_IDENTIFICATION = 12 }; # 31 "/usr/include/locale.h" 2 3 4 extern "C" { # 52 "/usr/include/locale.h" 3 4 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; char int_p_cs_precedes; char int_p_sep_by_space; char int_n_cs_precedes; char int_n_sep_by_space; char int_p_sign_posn; char int_n_sign_posn; # 119 "/usr/include/locale.h" 3 4 }; extern char *setlocale (int __category, __const char *__locale) throw (); extern struct lconv *localeconv (void) throw (); # 146 "/usr/include/locale.h" 3 4 # 1 "/usr/include/xlocale.h" 1 3 4 # 28 "/usr/include/xlocale.h" 3 4 typedef struct __locale_struct { struct locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; # 147 "/usr/include/locale.h" 2 3 4 typedef __locale_t locale_t; extern __locale_t newlocale (int __category_mask, __const char *__locale, __locale_t __base) throw (); # 189 "/usr/include/locale.h" 3 4 extern __locale_t duplocale (__locale_t __dataset) throw (); extern void freelocale (__locale_t __dataset) throw (); extern __locale_t uselocale (__locale_t __dataset) throw (); } # 49 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 2 char *strsave(const char *s); int is_prime(unsigned); # 1 "/usr/include/stdio.h" 1 3 4 # 30 "/usr/include/stdio.h" 3 4 extern "C" { # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 # 213 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 3 4 typedef unsigned int size_t; # 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/i686-pc-linux-gnu/3.4.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 void * __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/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 # 354 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.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/i686-pc-linux-gnu/3.4.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/i686-pc-linux-gnu/3.4.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/i686-pc-linux-gnu/3.4.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/i686-pc-linux-gnu/3.4.1/include/stdarg.h" 1 3 4 # 43 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.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 *)]; }; 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); typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; typedef struct { __io_read_fn *read; __io_write_fn *write; __io_seek_fn *seek; __io_close_fn *close; } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); extern "C" { extern int __underflow (_IO_FILE *) throw (); extern int __uflow (_IO_FILE *) throw (); extern int __overflow (_IO_FILE *, int) throw (); extern wint_t __wunderflow (_IO_FILE *) throw (); extern wint_t __wuflow (_IO_FILE *) throw (); extern wint_t __woverflow (_IO_FILE *, wint_t) throw (); # 441 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp) throw (); extern int _IO_putc (int __c, _IO_FILE *__fp) throw (); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); extern int _IO_peekc_locked (_IO_FILE *__fp) throw (); extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); # 471 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict) throw (); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list) throw (); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) throw (); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) throw (); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) throw (); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) throw (); extern void _IO_free_backup_area (_IO_FILE *) throw (); # 529 "/usr/include/libio.h" 3 4 } # 73 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 86 "/usr/include/stdio.h" 3 4 typedef _G_fpos_t fpos_t; typedef _G_fpos64_t fpos64_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) throw (); extern int rename (__const char *__old, __const char *__new) throw (); extern FILE *tmpfile (void); # 174 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void); extern char *tmpnam (char *__s) throw (); extern char *tmpnam_r (char *__s) throw (); # 196 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) throw () __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); # 231 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); 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 extern FILE *fopen64 (__const char *__restrict __filename, __const char *__restrict __modes); extern FILE *freopen64 (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream); extern FILE *fdopen (int __fd, __const char *__modes) throw (); extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw (); extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw (); extern FILE *open_memstream (char **__restrict __bufloc, size_t *__restrict __sizeloc) throw (); extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); 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, ...) throw (); 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) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); 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, ...) throw (); extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))); extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))); extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); 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); # 543 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream); # 559 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream); extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream); extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream); 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); # 620 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 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); # 667 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (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 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream); extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); extern void clearerr (FILE *__stream) throw (); extern int feof (FILE *__stream) throw (); extern int ferror (FILE *__stream) throw (); extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw (); extern int ferror_unlocked (FILE *__stream) throw (); 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[]; extern int _sys_nerr; extern __const char *__const _sys_errlist[]; # 748 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) throw (); extern int fileno_unlocked (FILE *__stream) throw (); # 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) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw (); extern void funlockfile (FILE *__stream) throw (); # 828 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio.h" 1 3 4 # 33 "/usr/include/bits/stdio.h" 3 4 inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } inline int getchar (void) { return _IO_getc (stdin); } inline int getc_unlocked (FILE *__fp) { return (__builtin_expect ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end, 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } inline int getchar_unlocked (void) { return (__builtin_expect ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end, 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } inline int putchar (int __c) { return _IO_putc (__c, stdout); } inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putchar_unlocked (int __c) { return (__builtin_expect ((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end, 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } inline __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } inline int feof_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x10) != 0); } inline int ferror_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x20) != 0); } # 829 "/usr/include/stdio.h" 2 3 4 } # 57 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 2 # 1 "/usr/include/string.h" 1 3 4 # 28 "/usr/include/string.h" 3 4 extern "C" { # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 # 34 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw (); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw (); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw (); extern void *memset (void *__s, int __c, size_t __n) throw (); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)); extern void *memchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)); extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__)); extern void *memrchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw (); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw (); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw (); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw (); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw (); # 117 "/usr/include/string.h" 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw (); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)); # 160 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)); extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)); extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__)); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)); extern char *strpbrk (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)); extern char *strstr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw (); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw (); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw (); extern char *strcasestr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)); extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw (); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw (); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)); extern char *strerror (int __errnum) throw (); # 268 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw (); extern void __bzero (void *__s, size_t __n) throw (); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw (); extern void bzero (void *__s, size_t __n) throw (); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)); extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__)); extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__)); extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw (); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw (); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw (); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw (); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw (); extern char *strfry (char *__string) throw (); extern void *memfrob (void *__s, size_t __n) throw (); extern char *basename (__const char *__filename) throw (); # 400 "/usr/include/string.h" 3 4 } # 58 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 2 # 1 "/usr/include/strings.h" 1 3 4 # 60 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 2 # 77 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" int mksdir(char *tmpl); FILE *xtmpfile(char **namep = 0, const char *postfix_long = 0, const char *postfix_short = 0, int do_unlink = 1); char *xtmptemplate(const char *postfix_long, const char *postfix_short); # 92 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" size_t file_name_max(const char *fname); int interpret_lf_args(const char *p); extern char invalid_char_table[]; inline int invalid_input_char(int c) { return c >= 0 && invalid_char_table[c]; } # 132 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 1 3 4 # 11 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/syslimits.h" 1 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 1 3 4 # 122 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.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 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 # 34 "/usr/include/bits/xopen_lim.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 # 153 "/usr/include/limits.h" 2 3 4 # 123 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 2 3 4 # 8 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/syslimits.h" 2 3 4 # 12 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 2 3 4 # 133 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" 2 # 164 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/lib.h" const double PI = 3.14159265358979323846; # 23 "pic.h" 2 # 1 "/usr/include/math.h" 1 3 4 # 29 "/usr/include/math.h" 3 4 extern "C" { # 1 "/usr/include/bits/huge_val.h" 1 3 4 # 34 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_valf.h" 1 3 4 # 36 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_vall.h" 1 3 4 # 37 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/inf.h" 1 3 4 # 40 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/nan.h" 1 3 4 # 43 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/mathdef.h" 1 3 4 # 29 "/usr/include/bits/mathdef.h" 3 4 typedef long double float_t; typedef long double double_t; # 47 "/usr/include/math.h" 2 3 4 # 70 "/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) throw (); extern double __acos (double __x) throw (); extern double asin (double __x) throw (); extern double __asin (double __x) throw (); extern double atan (double __x) throw (); extern double __atan (double __x) throw (); extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); extern double cos (double __x) throw (); extern double __cos (double __x) throw (); extern double sin (double __x) throw (); extern double __sin (double __x) throw (); extern double tan (double __x) throw (); extern double __tan (double __x) throw (); extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw (); extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); extern double exp (double __x) throw (); extern double __exp (double __x) throw (); extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); extern double log (double __x) throw (); extern double __log (double __x) throw (); extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); extern double logb (double __x) throw (); extern double __logb (double __x) throw (); extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); extern int __isinf (double __value) throw () __attribute__ ((__const__)); extern int __finite (double __value) throw () __attribute__ ((__const__)); extern int isinf (double __value) throw () __attribute__ ((__const__)); extern int finite (double __value) throw () __attribute__ ((__const__)); extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); extern double significand (double __x) throw (); extern double __significand (double __x) throw (); extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnan (double __value) throw () __attribute__ ((__const__)); extern int isnan (double __value) throw () __attribute__ ((__const__)); extern double j0 (double) throw (); extern double __j0 (double) throw (); extern double j1 (double) throw (); extern double __j1 (double) throw (); extern double jn (int, double) throw (); extern double __jn (int, double) throw (); extern double y0 (double) throw (); extern double __y0 (double) throw (); extern double y1 (double) throw (); extern double __y1 (double) throw (); extern double yn (int, double) throw (); extern double __yn (int, double) throw (); extern double erf (double) throw (); extern double __erf (double) throw (); extern double erfc (double) throw (); extern double __erfc (double) throw (); extern double lgamma (double) throw (); extern double __lgamma (double) throw (); extern double tgamma (double) throw (); extern double __tgamma (double) throw (); extern double gamma (double) throw (); extern double __gamma (double) throw (); extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); extern double rint (double __x) throw (); extern double __rint (double __x) throw (); extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); extern int __signbit (double __value) throw () __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); # 71 "/usr/include/math.h" 2 3 4 # 93 "/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) throw (); extern float __acosf (float __x) throw (); extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw (); extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); extern float expf (float __x) throw (); extern float __expf (float __x) throw (); extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); extern float logf (float __x) throw (); extern float __logf (float __x) throw (); extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); extern int __isinff (float __value) throw () __attribute__ ((__const__)); extern int __finitef (float __value) throw () __attribute__ ((__const__)); extern int isinff (float __value) throw () __attribute__ ((__const__)); extern int finitef (float __value) throw () __attribute__ ((__const__)); extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanf (float __value) throw () __attribute__ ((__const__)); extern int isnanf (float __value) throw () __attribute__ ((__const__)); extern float j0f (float) throw (); extern float __j0f (float) throw (); extern float j1f (float) throw (); extern float __j1f (float) throw (); extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); extern float y0f (float) throw (); extern float __y0f (float) throw (); extern float y1f (float) throw (); extern float __y1f (float) throw (); extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); extern float erff (float) throw (); extern float __erff (float) throw (); extern float erfcf (float) throw (); extern float __erfcf (float) throw (); extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); extern float gammaf (float) throw (); extern float __gammaf (float) throw (); extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); extern int __signbitf (float __value) throw () __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); # 94 "/usr/include/math.h" 2 3 4 # 114 "/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) throw (); extern long double __acosl (long double __x) throw (); extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); extern int __finitel (long double __value) throw () __attribute__ ((__const__)); extern int isinfl (long double __value) throw () __attribute__ ((__const__)); extern int finitel (long double __value) throw () __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); extern int isnanl (long double __value) throw () __attribute__ ((__const__)); extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); extern int __signbitl (long double __value) throw () __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); # 115 "/usr/include/math.h" 2 3 4 # 130 "/usr/include/math.h" 3 4 extern int signgam; # 171 "/usr/include/math.h" 3 4 enum { FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL }; # 257 "/usr/include/math.h" 3 4 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 280 "/usr/include/math.h" 3 4 struct __exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct __exception *__exc) throw (); # 382 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathinline.h" 1 3 4 # 127 "/usr/include/bits/mathinline.h" 3 4 __inline int __signbitf (float __x) throw () { __extension__ union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; } __inline int __signbit (double __x) throw () { __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; return __u.__i[1] < 0; } __inline int __signbitl (long double __x) throw () { __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; return (__u.__i[2] & 0x8000) != 0; } # 291 "/usr/include/bits/mathinline.h" 3 4 __inline double __sgn (double) throw (); __inline double __sgn (double __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } __inline float __sgnf (float) throw (); __inline float __sgnf (float __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } __inline long double __sgnl (long double) throw (); __inline long double __sgnl (long double __x) throw () { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } # 433 "/usr/include/bits/mathinline.h" 3 4 __inline long double __atan2l (long double __y, long double __x) throw () { return __builtin_atan2l (__y, __x); } # 473 "/usr/include/bits/mathinline.h" 3 4 __inline double fabs (double __x) throw () { return __builtin_fabs (__x); } __inline float fabsf (float __x) throw () { return __builtin_fabsf (__x); } __inline long double fabsl (long double __x) throw () { return __builtin_fabsl (__x); } __inline long double __fabsl (long double __x) throw () { return __builtin_fabsl (__x); } # 506 "/usr/include/bits/mathinline.h" 3 4 __inline long double __sgn1l (long double) throw (); __inline long double __sgn1l (long double __x) throw () { __extension__ union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; __n.__xi[1] = 0x80000000; __n.__xi[0] = 0; return __n.__xld; } # 530 "/usr/include/bits/mathinline.h" 3 4 __inline double floor (double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline float floorf (float __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline long double floorl (long double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } # 541 "/usr/include/bits/mathinline.h" 3 4 __inline double ceil (double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline float ceilf (float __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } __inline long double ceill (long double __x) throw () { register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile ("fnstcw %0" : "=m" (__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800; __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); __asm __volatile ("fldcw %0" : : "m" (__cw)); return __value; } # 653 "/usr/include/bits/mathinline.h" 3 4 __inline long int lrintf (float __x) throw () { long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; } __inline long int lrint (double __x) throw () { long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; } __inline long int lrintl (long double __x) throw () { long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; } # 676 "/usr/include/bits/mathinline.h" 3 4 __inline long long int llrintf (float __x) throw () { long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; } __inline long long int llrint (double __x) throw () { long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; } __inline long long int llrintl (long double __x) throw () { long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; } # 713 "/usr/include/bits/mathinline.h" 3 4 __inline int __finite (double __x) throw () { return (__extension__ (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1] | 0x800fffffu) + 1) >> 31)); } # 383 "/usr/include/math.h" 2 3 4 # 438 "/usr/include/math.h" 3 4 } # 25 "pic.h" 2 # 1 "/usr/include/stdlib.h" 1 3 4 # 33 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 # 34 "/usr/include/stdlib.h" 2 3 4 extern "C" { # 1 "/usr/include/bits/waitflags.h" 1 3 4 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/bits/waitstatus.h" 1 3 4 # 63 "/usr/include/bits/waitstatus.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/endian.h" 1 3 4 # 38 "/usr/include/endian.h" 2 3 4 # 64 "/usr/include/bits/waitstatus.h" 2 3 4 union wait { int w_status; struct { unsigned int __w_termsig:7; unsigned int __w_coredump:1; unsigned int __w_retcode:8; unsigned int:16; } __wait_terminated; struct { unsigned int __w_stopval:8; unsigned int __w_stopsig:8; unsigned int:16; } __wait_stopped; }; # 44 "/usr/include/stdlib.h" 2 3 4 # 93 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 137 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) throw (); extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)); extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)); extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)); __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)); extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw (); extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw (); extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw (); extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw (); # 229 "/usr/include/stdlib.h" 3 4 extern long int strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw (); extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw (); __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw (); __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw (); extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw (); extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw (); extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw (); extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw (); extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw (); extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw (); extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw (); extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw (); __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw (); __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) throw (); extern __inline double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoul_internal (__nptr, __endptr, __base, 0); } extern __inline float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtof_internal (__nptr, __endptr, 0); } extern __inline long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double atof (__const char *__nptr) throw () { return strtod (__nptr, (char **) __null); } extern __inline int atoi (__const char *__nptr) throw () { return (int) strtol (__nptr, (char **) __null, 10); } extern __inline long int atol (__const char *__nptr) throw () { return strtol (__nptr, (char **) __null, 10); } __extension__ extern __inline long long int atoll (__const char *__nptr) throw () { return strtoll (__nptr, (char **) __null, 10); } # 408 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw (); extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)); # 1 "/usr/include/sys/types.h" 1 3 4 # 29 "/usr/include/sys/types.h" 3 4 extern "C" { typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 58 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 74 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 92 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 104 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 191 "/usr/include/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 216 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 31 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 23 "/usr/include/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 118 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 69 "/usr/include/bits/time.h" 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/sys/select.h" 2 3 4 # 55 "/usr/include/sys/select.h" 3 4 typedef long int __fd_mask; # 67 "/usr/include/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/sys/select.h" 3 4 extern "C" { # 109 "/usr/include/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "/usr/include/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); } # 217 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 29 "/usr/include/sys/sysmacros.h" 3 4 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 220 "/usr/include/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 258 "/usr/include/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 36 "/usr/include/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; typedef union { struct { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; int __spins; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; long int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; unsigned long long int __total_seq; unsigned long long int __wakeup_seq; unsigned long long int __woken_seq; void *__mutex; int __clock; unsigned int __broadcast_seq; } __data; char __size[48]; long long int __align; } pthread_cond_t; typedef union { char __size[4]; long int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; unsigned int __flags; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 267 "/usr/include/sys/types.h" 2 3 4 } # 417 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw (); extern char *setstate (char *__statebuf) throw (); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw (); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw (); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw (); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw (); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw (); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw (); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw (); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw (); extern void lcong48 (unsigned short int __param[7]) throw (); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw (); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw (); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw (); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw (); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw (); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw (); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw (); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw (); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw (); extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)); extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)); extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__malloc__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 25 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stddef.h" 1 3 4 # 26 "/usr/include/alloca.h" 2 3 4 extern "C" { extern void *alloca (size_t __size) throw (); } # 579 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)); extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__malloc__)); extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw (); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw (); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw (); extern char *__secure_getenv (__const char *__name) throw (); extern int putenv (char *__string) throw (); extern int setenv (__const char *__name, __const char *__value, int __replace) throw (); extern int unsetenv (__const char *__name) throw (); extern int clearenv (void) throw (); # 663 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw (); # 674 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template); # 683 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template); # 693 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) throw (); extern int system (__const char *__command); extern char *canonicalize_file_name (__const char *__name) throw (); # 720 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw (); typedef int (*__compar_fn_t) (__const void *, __const void *); typedef __compar_fn_t comparison_fn_t; extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar); extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar); extern int abs (int __x) throw () __attribute__ ((__const__)); extern long int labs (long int __x) throw () __attribute__ ((__const__)); __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)); extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)); extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)); __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)); # 784 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw (); extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw (); extern char *gcvt (double __value, int __ndigit, char *__buf) throw (); extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw (); extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw (); extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw (); extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw (); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw (); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw (); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw (); extern int mblen (__const char *__s, size_t __n) throw (); extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw (); extern int wctomb (char *__s, wchar_t __wchar) throw (); extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (__const char *__response) throw (); # 866 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) throw (); extern void setkey (__const char *__key) throw (); extern int posix_openpt (int __oflag); extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw (); extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw (); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw (); } # 26 "pic.h" 2 # 1 "/usr/include/errno.h" 1 3 4 # 32 "/usr/include/errno.h" 3 4 extern "C" { # 1 "/usr/include/bits/errno.h" 1 3 4 # 25 "/usr/include/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 # 1 "/usr/include/asm/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 # 5 "/usr/include/asm-generic/errno.h" 2 3 4 # 5 "/usr/include/asm/errno.h" 2 3 4 # 5 "/usr/include/linux/errno.h" 2 3 4 # 26 "/usr/include/bits/errno.h" 2 3 4 # 38 "/usr/include/bits/errno.h" 3 4 extern int *__errno_location (void) throw () __attribute__ ((__const__)); # 37 "/usr/include/errno.h" 2 3 4 # 55 "/usr/include/errno.h" 3 4 extern char *program_invocation_name, *program_invocation_short_name; } # 69 "/usr/include/errno.h" 3 4 typedef int error_t; # 27 "pic.h" 2 # 58 "pic.h" # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/assert.h" 1 # 24 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/assert.h" void assertion_failed(int, const char *); inline void do_assert(int expr, int line, const char *file) { if (!expr) assertion_failed(line, file); } # 59 "pic.h" 2 # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/cset.h" 1 # 22 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/cset.h" # 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/limits.h" 1 3 4 # 23 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/cset.h" 2 enum cset_builtin { CSET_BUILTIN }; class cset { public: cset(); cset(cset_builtin); cset(const char *); cset(const unsigned char *); int operator()(unsigned char) const; cset &operator|=(const cset &); cset &operator|=(unsigned char); friend class cset_init; private: char v[(127 * 2 + 1)+1]; void clear(); }; inline int cset::operator()(unsigned char c) const { return v[c]; } inline cset &cset::operator|=(unsigned char c) { v[c] = 1; return *this; } extern cset csalpha; extern cset csupper; extern cset cslower; extern cset csdigit; extern cset csxdigit; extern cset csspace; extern cset cspunct; extern cset csalnum; extern cset csprint; extern cset csgraph; extern cset cscntrl; static class cset_init { static int initialised; public: cset_init(); } _cset_init; # 60 "pic.h" 2 # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/stringclass.h" 1 # 23 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/stringclass.h" # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/assert.h" 1 # 24 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/stringclass.h" 2 class string; inline string operator+(const string &, const string &); inline string operator+(const string &, const char *); inline string operator+(const char *, const string &); inline string operator+(const string &, char); inline string operator+(char, const string &); inline int operator==(const string &, const string &); inline int operator!=(const string &, const string &); class string { public: string(); string(const string &); string(const char *); string(const char *, int); string(char); ~string(); string &operator=(const string &); string &operator=(const char *); string &operator=(char); string &operator+=(const string &); string &operator+=(const char *); string &operator+=(char); void append(const char *, int); int length() const; int empty() const; int operator*() const; string substring(int i, int n) const; char &operator[](int); char operator[](int) const; void set_length(int i); const char *contents() const; int search(char) const; char *extract() const; void remove_spaces(); void clear(); void move(string &); friend string operator+(const string &, const string &); friend string operator+(const string &, const char *); friend string operator+(const char *, const string &); friend string operator+(const string &, char); friend string operator+(char, const string &); friend int operator==(const string &, const string &); friend int operator!=(const string &, const string &); friend int operator<=(const string &, const string &); friend int operator<(const string &, const string &); friend int operator>=(const string &, const string &); friend int operator>(const string &, const string &); private: char *ptr; int len; int sz; string(const char *, int, const char *, int); void grow1(); }; inline char &string::operator[](int i) { do_assert(i >= 0 && i < len, 99, "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/stringclass.h"); return ptr[i]; } inline char string::operator[](int i) const { do_assert(i >= 0 && i < len, 105, "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/stringclass.h"); return ptr[i]; } inline int string::length() const { return len; } inline int string::empty() const { return len == 0; } inline int string::operator*() const { return len; } inline const char *string::contents() const { return ptr; } inline string operator+(const string &s1, const string &s2) { return string(s1.ptr, s1.len, s2.ptr, s2.len); } inline string operator+(const string &s1, const char *s2) { if (s2 == 0) return s1; else return string(s1.ptr, s1.len, s2, strlen(s2)); } inline string operator+(const char *s1, const string &s2) { if (s1 == 0) return s2; else return string(s1, strlen(s1), s2.ptr, s2.len); } inline string operator+(const string &s, char c) { return string(s.ptr, s.len, &c, 1); } inline string operator+(char c, const string &s) { return string(&c, 1, s.ptr, s.len); } inline int operator==(const string &s1, const string &s2) { return (s1.len == s2.len && (s1.len == 0 || memcmp(s1.ptr, s2.ptr, s1.len) == 0)); } inline int operator!=(const string &s1, const string &s2) { return (s1.len != s2.len || (s1.len != 0 && memcmp(s1.ptr, s2.ptr, s1.len) != 0)); } inline string string::substring(int i, int n) const { do_assert(i >= 0 && i + n <= len, 182, "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/stringclass.h"); return string(ptr + i, n); } inline string &string::operator+=(char c) { if (len >= sz) grow1(); ptr[len++] = c; return *this; } void put_string(const string &, FILE *); string as_string(int); # 61 "pic.h" 2 # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/errarg.h" 1 # 21 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/errarg.h" class errarg { enum { EMPTY, STRING, CHAR, INTEGER, UNSIGNED_INTEGER, DOUBLE } type; union { const char *s; int n; unsigned int u; char c; double d; }; public: errarg(); errarg(const char *); errarg(char); errarg(unsigned char); errarg(int); errarg(unsigned int); errarg(double); int empty() const; void print() const; }; extern errarg empty_errarg; extern void errprint(const char *, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); # 62 "pic.h" 2 # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/error.h" 1 # 21 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/error.h" extern void fatal_with_file_and_line(const char *filename, int lineno, const char *format, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); extern void error_with_file_and_line(const char *filename, int lineno, const char *format, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); extern void warning_with_file_and_line(const char *filename, int lineno, const char *format, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); extern void fatal(const char *, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); extern void error(const char *, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); extern void warning(const char *, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); extern const char *program_name; extern int current_lineno; extern const char *current_filename; extern const char *current_source_filename; # 63 "pic.h" 2 # 1 "position.h" 1 # 21 "position.h" struct place; struct position { double x; double y; position(double, double ); position(); position(const place &); position &operator+=(const position &); position &operator-=(const position &); position &operator*=(double); position &operator/=(double); }; position operator-(const position &); position operator+(const position &, const position &); position operator-(const position &, const position &); position operator/(const position &, double); position operator*(const position &, double); double operator*(const position &, const position &); int operator==(const position &, const position &); int operator!=(const position &, const position &); double hypot(const position &a); typedef position distance; # 64 "pic.h" 2 # 1 "text.h" 1 enum hadjustment { CENTER_ADJUST, LEFT_ADJUST, RIGHT_ADJUST }; enum vadjustment { NONE_ADJUST, ABOVE_ADJUST, BELOW_ADJUST }; struct adjustment { hadjustment h; vadjustment v; }; struct text_piece { char *text; adjustment adj; const char *filename; int lineno; text_piece(); ~text_piece(); }; # 65 "pic.h" 2 # 1 "output.h" 1 # 21 "output.h" struct line_type { enum { invisible, solid, dotted, dashed } type; double dash_width; double thickness; line_type(); }; class output { protected: char *args; double desired_height; double desired_width; double compute_scale(double, const position &, const position &); public: output(); virtual ~output(); void set_desired_width_height(double wid, double ht); void set_args(const char *); virtual void start_picture(double sc, const position &ll, const position &ur) = 0; virtual void finish_picture() = 0; virtual void circle(const position &, double rad, const line_type &, double) = 0; virtual void text(const position &, text_piece *, int, double) = 0; virtual void line(const position &, const position *, int n, const line_type &) = 0; virtual void polygon(const position *, int n, const line_type &, double) = 0; virtual void spline(const position &, const position *, int n, const line_type &) = 0; virtual void arc(const position &, const position &, const position &, const line_type &) = 0; virtual void ellipse(const position &, const distance &, const line_type &, double) = 0; virtual void rounded_box(const position &, const distance &, double, const line_type &, double) = 0; virtual void command(const char *, const char *, int) = 0; virtual void set_location(const char *, int) {} virtual void set_color(char *, char *) = 0; virtual void reset_color() = 0; virtual char *get_last_filled() = 0; virtual char *get_outline_color() = 0; virtual int supports_filled_polygons(); virtual void begin_block(const position &ll, const position &ur); virtual void end_block(); }; extern output *out; output *make_troff_output(); output *make_tex_output(); output *make_tpic_output(); # 66 "pic.h" 2 # 75 "pic.h" class input { input *next; public: input(); virtual ~input(); virtual int get() = 0; virtual int peek() = 0; virtual int get_location(const char **, int *); friend class input_stack; friend class copy_rest_thru_input; }; class file_input : public input { FILE *fp; const char *filename; int lineno; string line; const char *ptr; int read_line(); public: file_input(FILE *, const char *); ~file_input(); int get(); int peek(); int get_location(const char **, int *); }; void lex_init(input *); int get_location(char **, int *); void do_copy(const char *file); void parse_init(); void parse_cleanup(); void lex_error(const char *message, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); void lex_warning(const char *message, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); void lex_cleanup(); extern int flyback_flag; extern int command_char; extern int zero_length_line_flag; extern int driver_extension_flag; extern int compatible_flag; extern int safer_flag; extern char *graphname; # 23 "object.cpp" 2 # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/ptable.h" 1 # 21 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/ptable.h" # 1 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/assert.h" 1 # 22 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/ptable.h" 2 # 35 "/var/tmp/portage/groff-1.19/work/groff-1.19/src/include/ptable.h" extern unsigned next_ptable_size(unsigned); extern unsigned long hash_string(const char *); # 24 "object.cpp" 2 # 1 "object.h" 1 # 21 "object.h" struct place; enum object_type { OTHER_OBJECT, BOX_OBJECT, CIRCLE_OBJECT, ELLIPSE_OBJECT, ARC_OBJECT, SPLINE_OBJECT, LINE_OBJECT, ARROW_OBJECT, MOVE_OBJECT, TEXT_OBJECT, BLOCK_OBJECT, MARK_OBJECT }; struct bounding_box; struct object { object *prev; object *next; object(); virtual ~object(); virtual position origin(); virtual double width(); virtual double radius(); virtual double height(); virtual position north(); virtual position south(); virtual position east(); virtual position west(); virtual position north_east(); virtual position north_west(); virtual position south_east(); virtual position south_west(); virtual position start(); virtual position end(); virtual position center(); virtual place *find_label(const char *); virtual void move_by(const position &); virtual int blank(); virtual void update_bounding_box(bounding_box *); virtual object_type type() = 0; virtual void print(); virtual void print_text(); }; typedef position (object::*corner)(); struct place { object *obj; double x, y; }; struct string_list; class path { position pos; corner crn; string_list *label_list; path *ypath; int is_position; public: path(corner = 0); path(position); path(char *, corner = 0); ~path(); void append(corner); void append(char *); void set_ypath(path *); int follow(const place &, place *) const; }; struct object_list { object *head; object *tail; object_list(); void append(object *); void wrap_up_block(object_list *); }; struct place_passoc { char *key; place *val; place_passoc(); }; struct place_ptable; class place_ptable_iterator { place_ptable *p; unsigned i; public: place_ptable_iterator(place_ptable *); int next(const char **, place **); }; class place_ptable { place_passoc *v; unsigned size; unsigned used; enum { FULL_NUM = 2, FULL_DEN = 3, INITIAL_SIZE = 17 }; public: place_ptable(); ~place_ptable(); void define(const char *, place *); place *lookup(const char *); friend class place_ptable_iterator; }; enum direction { RIGHT_DIRECTION, UP_DIRECTION, LEFT_DIRECTION, DOWN_DIRECTION }; struct graphics_state { double x, y; direction dir; }; struct saved_state : public graphics_state { saved_state *prev; place_ptable *tbl; }; struct text_item { text_item *next; char *text; adjustment adj; const char *filename; int lineno; text_item(char *, const char *, int); ~text_item(); }; const unsigned long IS_DOTTED = 01; const unsigned long IS_DASHED = 02; const unsigned long IS_CLOCKWISE = 04; const unsigned long IS_INVISIBLE = 020; const unsigned long HAS_LEFT_ARROW_HEAD = 040; const unsigned long HAS_RIGHT_ARROW_HEAD = 0100; const unsigned long HAS_SEGMENT = 0200; const unsigned long IS_SAME = 0400; const unsigned long HAS_FROM = 01000; const unsigned long HAS_AT = 02000; const unsigned long HAS_WITH = 04000; const unsigned long HAS_HEIGHT = 010000; const unsigned long HAS_WIDTH = 020000; const unsigned long HAS_RADIUS = 040000; const unsigned long HAS_TO = 0100000; const unsigned long IS_CHOPPED = 0200000; const unsigned long IS_DEFAULT_CHOPPED = 0400000; const unsigned long HAS_THICKNESS = 01000000; const unsigned long IS_FILLED = 02000000; const unsigned long IS_DEFAULT_FILLED = 04000000; const unsigned long IS_ALIGNED = 010000000; const unsigned long IS_SHADED = 020000000; const unsigned long IS_OUTLINED = 040000000; struct segment { int is_absolute; position pos; segment *next; segment(const position &, int, segment *); }; struct rectangle_object; struct graphic_object; struct linear_object; struct object_spec { unsigned long flags; object_type type; object_list oblist; place_ptable *tbl; double dash_width; position from; position to; position at; position by; path *with; text_item *text; double height; double radius; double width; double segment_width; double segment_height; double start_chop; double end_chop; double thickness; double fill; char *shaded; char *outlined; direction dir; segment *segment_list; position segment_pos; int segment_is_absolute; object_spec(object_type); ~object_spec(); object *make_object(position *, direction *); graphic_object *make_box(position *, direction *); graphic_object *make_block(position *, direction *); graphic_object *make_text(position *, direction *); graphic_object *make_ellipse(position *, direction *); graphic_object *make_circle(position *, direction *); linear_object *make_line(position *, direction *); linear_object *make_arc(position *, direction *); graphic_object *make_linear(position *, direction *); graphic_object *make_move(position *, direction *); int position_rectangle(rectangle_object *p, position *curpos, direction *dirp); }; object *make_object(object_spec *, position *, direction *); object *make_mark_object(); object *make_command_object(char *, const char *, int); int lookup_variable(const char *name, double *val); void define_variable(const char *name, double val); void print_picture(object *); # 25 "object.cpp" 2 void print_object_list(object *); line_type::line_type() : type(solid), thickness(1.0) { } output::output() : args(0), desired_height(0.0), desired_width(0.0) { } output::~output() { delete [] args; } void output::set_desired_width_height(double wid, double ht) { desired_width = wid; desired_height = ht; } void output::set_args(const char *s) { delete [] args; if (s == 0 || *s == '\0') args = 0; else args = strsave(s); } int output::supports_filled_polygons() { return 0; } void output::begin_block(const position &, const position &) { } void output::end_block() { } double output::compute_scale(double sc, const position &ll, const position &ur) { distance dim = ur - ll; if (desired_width != 0.0 || desired_height != 0.0) { sc = 0.0; if (desired_width != 0.0) { if (dim.x == 0.0) error("width specified for picture with zero width"); else sc = dim.x/desired_width; } if (desired_height != 0.0) { if (dim.y == 0.0) error("height specified for picture with zero height"); else { double tem = dim.y/desired_height; if (tem > sc) sc = tem; } } return sc == 0.0 ? 1.0 : sc; } else { if (sc <= 0.0) sc = 1.0; distance sdim = dim/sc; double max_width = 0.0; lookup_variable("maxpswid", &max_width); double max_height = 0.0; lookup_variable("maxpsht", &max_height); if ((max_width > 0.0 && sdim.x > max_width) || (max_height > 0.0 && sdim.y > max_height)) { double xscale = dim.x/max_width; double yscale = dim.y/max_height; return xscale > yscale ? xscale : yscale; } else return sc; } } position::position(const place &pl) { if (pl.obj != 0) { object *tem = pl.obj; *this = tem->origin(); } else { x = pl.x; y = pl.y; } } position::position() : x(0.0), y(0.0) { } position::position(double a, double b) : x(a), y(b) { } int operator==(const position &a, const position &b) { return a.x == b.x && a.y == b.y; } int operator!=(const position &a, const position &b) { return a.x != b.x || a.y != b.y; } position &position::operator+=(const position &a) { x += a.x; y += a.y; return *this; } position &position::operator-=(const position &a) { x -= a.x; y -= a.y; return *this; } position &position::operator*=(double a) { x *= a; y *= a; return *this; } position &position::operator/=(double a) { x /= a; y /= a; return *this; } position operator-(const position &a) { return position(-a.x, -a.y); } position operator+(const position &a, const position &b) { return position(a.x + b.x, a.y + b.y); } position operator-(const position &a, const position &b) { return position(a.x - b.x, a.y - b.y); } position operator/(const position &a, double n) { return position(a.x/n, a.y/n); } position operator*(const position &a, double n) { return position(a.x*n, a.y*n); } double operator*(const position &a, const position &b) { return a.x*b.x + a.y*b.y; } double hypot(const position &a) { return hypot(a.x, a.y); } struct arrow_head_type { double height; double width; int solid; }; void draw_arrow(const position &pos, const distance &dir, const arrow_head_type &aht, const line_type <, char *outline_color_for_fill) { double hyp = hypot(dir); if (hyp == 0.0) { error("cannot draw arrow on object with zero length"); return; } position base = -dir; base *= aht.height/hyp; position n(dir.y, -dir.x); n *= aht.width/(hyp*2.0); line_type slt = lt; slt.type = line_type::solid; if (aht.solid && out->supports_filled_polygons()) { position v[3]; v[0] = pos; v[1] = pos + base + n; v[2] = pos + base - n; out->set_color(outline_color_for_fill, outline_color_for_fill); out->polygon(v, 3, slt, 1); } else { position v[2]; v[0] = pos; v[1] = pos + base + n; out->line(pos + base - n, v, 2, slt); } } object::object() : prev(0), next(0) { } object::~object() { } void object::move_by(const position &) { } void object::print() { } void object::print_text() { } int object::blank() { return 0; } struct bounding_box { int blank; position ll; position ur; bounding_box(); void encompass(const position &); }; bounding_box::bounding_box() : blank(1) { } void bounding_box::encompass(const position &pos) { if (blank) { ll = pos; ur = pos; blank = 0; } else { if (pos.x < ll.x) ll.x = pos.x; if (pos.y < ll.y) ll.y = pos.y; if (pos.x > ur.x) ur.x = pos.x; if (pos.y > ur.y) ur.y = pos.y; } } void object::update_bounding_box(bounding_box *) { } position object::origin() { return position(0.0,0.0); } position object::north() { return origin(); } position object::south() { return origin(); } position object::east() { return origin(); } position object::west() { return origin(); } position object::north_east() { return origin(); } position object::north_west() { return origin(); } position object::south_east() { return origin(); } position object::south_west() { return origin(); } position object::start() { return origin(); } position object::end() { return origin(); } position object::center() { return origin(); } double object::width() { return 0.0; } double object::radius() { return 0.0; } double object::height() { return 0.0; } place *object::find_label(const char *) { return 0; } segment::segment(const position &a, int n, segment *p) : is_absolute(n), pos(a), next(p) { } text_item::text_item(char *t, const char *fn, int ln) : next(0), text(t), filename(fn), lineno(ln) { adj.h = CENTER_ADJUST; adj.v = NONE_ADJUST; } text_item::~text_item() { delete [] text; } object_spec::object_spec(object_type t) : type(t) { flags = 0; tbl = 0; segment_list = 0; segment_width = segment_height = 0.0; segment_is_absolute = 0; text = 0; shaded = 0; outlined = 0; with = 0; dir = RIGHT_DIRECTION; } object_spec::~object_spec() { delete tbl; while (segment_list != 0) { segment *tem = segment_list; segment_list = segment_list->next; delete tem; } object *p = oblist.head; while (p != 0) { object *tem = p; p = p->next; delete tem; } while (text != 0) { text_item *tem = text; text = text->next; delete tem; } delete with; delete [] shaded; delete [] outlined; } class command_object : public object { char *s; const char *filename; int lineno; public: command_object(char *, const char *, int); ~command_object(); object_type type() { return OTHER_OBJECT; } void print(); }; command_object::command_object(char *p, const char *fn, int ln) : s(p), filename(fn), lineno(ln) { } command_object::~command_object() { delete [] s; } void command_object::print() { out->command(s, filename, lineno); } object *make_command_object(char *s, const char *fn, int ln) { return new command_object(s, fn, ln); } class mark_object : public object { public: mark_object(); object_type type(); }; object *make_mark_object() { return new mark_object(); } mark_object::mark_object() { } object_type mark_object::type() { return MARK_OBJECT; } object_list::object_list() : head(0), tail(0) { } void object_list::append(object *obj) { if (tail == 0) { obj->next = obj->prev = 0; head = tail = obj; } else { obj->prev = tail; obj->next = 0; tail->next = obj; tail = obj; } } void object_list::wrap_up_block(object_list *ol) { object *p; for (p = tail; p && p->type() != MARK_OBJECT; p = p->prev) ; do_assert(p != 0, 517, "object.cpp"); ol->head = p->next; if (ol->head) { ol->tail = tail; ol->head->prev = 0; } else ol->tail = 0; tail = p->prev; if (tail) tail->next = 0; else head = 0; delete p; } text_piece::text_piece() : text(0), filename(0), lineno(-1) { adj.h = CENTER_ADJUST; adj.v = NONE_ADJUST; } text_piece::~text_piece() { delete [] text; } class graphic_object : public object { int ntext; text_piece *text; int aligned; protected: line_type lt; char *outline_color; char *color_fill; public: graphic_object(); ~graphic_object(); object_type type() = 0; void print_text(); void add_text(text_item *, int); void set_dotted(double); void set_dashed(double); void set_thickness(double); void set_invisible(); void set_outline_color(char *); char *get_outline_color(); virtual void set_fill(double); virtual void set_fill_color(char *); }; graphic_object::graphic_object() : ntext(0), text(0), aligned(0), outline_color(0), color_fill(0) { } void graphic_object::set_dotted(double wid) { lt.type = line_type::dotted; lt.dash_width = wid; } void graphic_object::set_dashed(double wid) { lt.type = line_type::dashed; lt.dash_width = wid; } void graphic_object::set_thickness(double th) { lt.thickness = th; } void graphic_object::set_fill(double) { } void graphic_object::set_fill_color(char *c) { color_fill = strsave(c); } void graphic_object::set_outline_color(char *c) { outline_color = strsave(c); } char *graphic_object::get_outline_color() { return outline_color; } void graphic_object::set_invisible() { lt.type = line_type::invisible; } void graphic_object::add_text(text_item *t, int a) { aligned = a; int len = 0; text_item *p; for (p = t; p; p = p->next) len++; if (len == 0) text = 0; else { text = new text_piece[len]; for (p = t, len = 0; p; p = p->next, len++) { text[len].text = p->text; p->text = 0; text[len].adj = p->adj; text[len].filename = p->filename; text[len].lineno = p->lineno; } } ntext = len; } void graphic_object::print_text() { double angle = 0.0; if (aligned) { position d(end() - start()); if (d.x != 0.0 || d.y != 0.0) angle = atan2(d.y, d.x); } if (text != 0) { out->set_color(color_fill, get_outline_color()); out->text(center(), text, ntext, angle); out->reset_color(); } } graphic_object::~graphic_object() { if (text) delete [] text; } class rectangle_object : public graphic_object { protected: position cent; position dim; public: rectangle_object(const position &); double width() { return dim.x; } double height() { return dim.y; } position origin() { return cent; } position center() { return cent; } position north() { return position(cent.x, cent.y + dim.y/2.0); } position south() { return position(cent.x, cent.y - dim.y/2.0); } position east() { return position(cent.x + dim.x/2.0, cent.y); } position west() { return position(cent.x - dim.x/2.0, cent.y); } position north_east() { return position(cent.x + dim.x/2.0, cent.y + dim.y/2.0); } position north_west() { return position(cent.x - dim.x/2.0, cent.y + dim.y/2.0); } position south_east() { return position(cent.x + dim.x/2.0, cent.y - dim.y/2.0); } position south_west() { return position(cent.x - dim.x/2.0, cent.y - dim.y/2.0); } object_type type() = 0; void update_bounding_box(bounding_box *); void move_by(const position &); }; rectangle_object::rectangle_object(const position &d) : dim(d) { } void rectangle_object::update_bounding_box(bounding_box *p) { p->encompass(cent - dim/2.0); p->encompass(cent + dim/2.0); } void rectangle_object::move_by(const position &a) { cent += a; } class closed_object : public rectangle_object { public: closed_object(const position &); object_type type() = 0; void set_fill(double); void set_fill_color(char *fill); protected: double fill; char *color_fill; }; closed_object::closed_object(const position &pos) : rectangle_object(pos), fill(-1.0), color_fill(0) { } void closed_object::set_fill(double f) { do_assert(f >= 0.0, 715, "object.cpp"); fill = f; } void closed_object::set_fill_color(char *fill) { color_fill = strsave(fill); } class box_object : public closed_object { double xrad; double yrad; public: box_object(const position &, double); object_type type() { return BOX_OBJECT; } void print(); position north_east(); position north_west(); position south_east(); position south_west(); }; box_object::box_object(const position &pos, double r) : closed_object(pos), xrad(dim.x > 0 ? r : -r), yrad(dim.y > 0 ? r : -r) { } const double CHOP_FACTOR = 1.0 - 1.0/1.41421356237309504880; position box_object::north_east() { return position(cent.x + dim.x/2.0 - CHOP_FACTOR*xrad, cent.y + dim.y/2.0 - CHOP_FACTOR*yrad); } position box_object::north_west() { return position(cent.x - dim.x/2.0 + CHOP_FACTOR*xrad, cent.y + dim.y/2.0 - CHOP_FACTOR*yrad); } position box_object::south_east() { return position(cent.x + dim.x/2.0 - CHOP_FACTOR*xrad, cent.y - dim.y/2.0 + CHOP_FACTOR*yrad); } position box_object::south_west() { return position(cent.x - dim.x/2.0 + CHOP_FACTOR*xrad, cent.y - dim.y/2.0 + CHOP_FACTOR*yrad); } void box_object::print() { if (lt.type == line_type::invisible && fill < 0.0 && color_fill == 0) return; out->set_color(color_fill, graphic_object::get_outline_color()); if (xrad == 0.0) { distance dim2 = dim/2.0; position vec[4]; vec[0] = cent + position(dim2.x, -dim2.y); vec[1] = cent + position(dim2.x, dim2.y); vec[2] = cent + position(-dim2.x, dim2.y); vec[3] = cent + position(-dim2.x, -dim2.y); out->polygon(vec, 4, lt, fill); } else { distance abs_dim(fabs(dim.x), fabs(dim.y)); out->rounded_box(cent, abs_dim, fabs(xrad), lt, fill); } out->reset_color(); } graphic_object *object_spec::make_box(position *curpos, direction *dirp) { static double last_box_height; static double last_box_width; static double last_box_radius; static int have_last_box = 0; if (!(flags & HAS_HEIGHT)) { if ((flags & IS_SAME) && have_last_box) height = last_box_height; else lookup_variable("boxht", &height); } if (!(flags & HAS_WIDTH)) { if ((flags & IS_SAME) && have_last_box) width = last_box_width; else lookup_variable("boxwid", &width); } if (!(flags & HAS_RADIUS)) { if ((flags & IS_SAME) && have_last_box) radius = last_box_radius; else lookup_variable("boxrad", &radius); } last_box_width = width; last_box_height = height; last_box_radius = radius; have_last_box = 1; radius = fabs(radius); if (radius*2.0 > fabs(width)) radius = fabs(width/2.0); if (radius*2.0 > fabs(height)) radius = fabs(height/2.0); box_object *p = new box_object(position(width, height), radius); if (!position_rectangle(p, curpos, dirp)) { delete p; p = 0; } return p; } int object_spec::position_rectangle(rectangle_object *p, position *curpos, direction *dirp) { position pos; dir = *dirp; position motion; switch (dir) { case UP_DIRECTION: motion.y = p->height()/2.0; break; case DOWN_DIRECTION: motion.y = -p->height()/2.0; break; case LEFT_DIRECTION: motion.x = -p->width()/2.0; break; case RIGHT_DIRECTION: motion.x = p->width()/2.0; break; default: do_assert(0, 852, "object.cpp"); } if (flags & HAS_AT) { pos = at; if (flags & HAS_WITH) { place offset; place here; here.obj = p; if (!with->follow(here, &offset)) return 0; pos -= offset; } } else { pos = *curpos; pos += motion; } p->move_by(pos); pos += motion; *curpos = pos; return 1; } class block_object : public rectangle_object { object_list oblist; place_ptable *tbl; public: block_object(const position &, const object_list &ol, place_ptable *t); ~block_object(); place *find_label(const char *); object_type type(); void move_by(const position &); void print(); }; block_object::block_object(const position &d, const object_list &ol, place_ptable *t) : rectangle_object(d), oblist(ol), tbl(t) { } block_object::~block_object() { delete tbl; object *p = oblist.head; while (p != 0) { object *tem = p; p = p->next; delete tem; } } void block_object::print() { out->begin_block(south_west(), north_east()); print_object_list(oblist.head); out->end_block(); } static void adjust_objectless_places(place_ptable *tbl, const position &a) { place_ptable_iterator iter(tbl); const char *key; place *pl; while (iter.next(&key, &pl)) if (key && csupper(key[0]) && pl->obj == 0) { pl->x += a.x; pl->y += a.y; } } void block_object::move_by(const position &a) { cent += a; for (object *p = oblist.head; p; p = p->next) p->move_by(a); adjust_objectless_places(tbl, a); } place *block_object::find_label(const char *name) { return tbl->lookup(name); } object_type block_object::type() { return BLOCK_OBJECT; } graphic_object *object_spec::make_block(position *curpos, direction *dirp) { bounding_box bb; for (object *p = oblist.head; p; p = p->next) p->update_bounding_box(&bb); position dim; if (!bb.blank) { position m = -(bb.ll + bb.ur)/2.0; for (object *p = oblist.head; p; p = p->next) p->move_by(m); adjust_objectless_places(tbl, m); dim = bb.ur - bb.ll; } if (flags & HAS_WIDTH) dim.x = width; if (flags & HAS_HEIGHT) dim.y = height; block_object *block = new block_object(dim, oblist, tbl); if (!position_rectangle(block, curpos, dirp)) { delete block; block = 0; } tbl = 0; oblist.head = oblist.tail = 0; return block; } class text_object : public rectangle_object { public: text_object(const position &); object_type type() { return TEXT_OBJECT; } }; text_object::text_object(const position &d) : rectangle_object(d) { } graphic_object *object_spec::make_text(position *curpos, direction *dirp) { if (!(flags & HAS_HEIGHT)) { lookup_variable("textht", &height); int nitems = 0; for (text_item *t = text; t; t = t->next) nitems++; height *= nitems; } if (!(flags & HAS_WIDTH)) lookup_variable("textwid", &width); text_object *p = new text_object(position(width, height)); if (!position_rectangle(p, curpos, dirp)) { delete p; p = 0; } return p; } class ellipse_object : public closed_object { public: ellipse_object(const position &); position north_east() { return position(cent.x + dim.x/(1.41421356237309504880*2.0), cent.y + dim.y/(1.41421356237309504880*2.0)); } position north_west() { return position(cent.x - dim.x/(1.41421356237309504880*2.0), cent.y + dim.y/(1.41421356237309504880*2.0)); } position south_east() { return position(cent.x + dim.x/(1.41421356237309504880*2.0), cent.y - dim.y/(1.41421356237309504880*2.0)); } position south_west() { return position(cent.x - dim.x/(1.41421356237309504880*2.0), cent.y - dim.y/(1.41421356237309504880*2.0)); } double radius() { return dim.x/2.0; } object_type type() { return ELLIPSE_OBJECT; } void print(); }; ellipse_object::ellipse_object(const position &d) : closed_object(d) { } void ellipse_object::print() { if (lt.type == line_type::invisible && fill < 0.0 && color_fill == 0) return; out->set_color(color_fill, graphic_object::get_outline_color()); out->ellipse(cent, dim, lt, fill); out->reset_color(); } graphic_object *object_spec::make_ellipse(position *curpos, direction *dirp) { static double last_ellipse_height; static double last_ellipse_width; static int have_last_ellipse = 0; if (!(flags & HAS_HEIGHT)) { if ((flags & IS_SAME) && have_last_ellipse) height = last_ellipse_height; else lookup_variable("ellipseht", &height); } if (!(flags & HAS_WIDTH)) { if ((flags & IS_SAME) && have_last_ellipse) width = last_ellipse_width; else lookup_variable("ellipsewid", &width); } last_ellipse_width = width; last_ellipse_height = height; have_last_ellipse = 1; ellipse_object *p = new ellipse_object(position(width, height)); if (!position_rectangle(p, curpos, dirp)) { delete p; return 0; } return p; } class circle_object : public ellipse_object { public: circle_object(double); object_type type() { return CIRCLE_OBJECT; } void print(); }; circle_object::circle_object(double diam) : ellipse_object(position(diam, diam)) { } void circle_object::print() { if (lt.type == line_type::invisible && fill < 0.0 && color_fill == 0) return; out->set_color(color_fill, graphic_object::get_outline_color()); out->circle(cent, dim.x/2.0, lt, fill); out->reset_color(); } graphic_object *object_spec::make_circle(position *curpos, direction *dirp) { static double last_circle_radius; static int have_last_circle = 0; if (!(flags & HAS_RADIUS)) { if ((flags & IS_SAME) && have_last_circle) radius = last_circle_radius; else lookup_variable("circlerad", &radius); } last_circle_radius = radius; have_last_circle = 1; circle_object *p = new circle_object(radius*2.0); if (!position_rectangle(p, curpos, dirp)) { delete p; return 0; } return p; } class move_object : public graphic_object { position strt; position en; public: move_object(const position &s, const position &e); position origin() { return en; } object_type type() { return MOVE_OBJECT; } void update_bounding_box(bounding_box *); void move_by(const position &); }; move_object::move_object(const position &s, const position &e) : strt(s), en(e) { } void move_object::update_bounding_box(bounding_box *p) { p->encompass(strt); p->encompass(en); } void move_object::move_by(const position &a) { strt += a; en += a; } graphic_object *object_spec::make_move(position *curpos, direction *dirp) { static position last_move; static int have_last_move = 0; *dirp = dir; position startpos = (flags & HAS_FROM) ? from : *curpos; if (!(flags & HAS_SEGMENT)) { if ((flags & IS_SAME) && have_last_move) segment_pos = last_move; else { switch (dir) { case UP_DIRECTION: segment_pos.y = segment_height; break; case DOWN_DIRECTION: segment_pos.y = -segment_height; break; case LEFT_DIRECTION: segment_pos.x = -segment_width; break; case RIGHT_DIRECTION: segment_pos.x = segment_width; break; default: do_assert(0, 1153, "object.cpp"); } } } segment_list = new segment(segment_pos, segment_is_absolute, segment_list); segment *old = segment_list; segment_list = 0; while (old != 0) { segment *tem = old->next; old->next = segment_list; segment_list = old; old = tem; } position endpos = startpos; for (segment *s = segment_list; s; s = s->next) if (s->is_absolute) endpos = s->pos; else endpos += s->pos; have_last_move = 1; last_move = endpos - startpos; move_object *p = new move_object(startpos, endpos); *curpos = endpos; return p; } class linear_object : public graphic_object { protected: char arrow_at_start; char arrow_at_end; arrow_head_type aht; position strt; position en; public: linear_object(const position &s, const position &e); position start() { return strt; } position end() { return en; } void move_by(const position &); void update_bounding_box(bounding_box *) = 0; object_type type() = 0; void add_arrows(int at_start, int at_end, const arrow_head_type &); }; class line_object : public linear_object { protected: position *v; int n; public: line_object(const position &s, const position &e, position *, int); ~line_object(); position origin() { return strt; } position center() { return (strt + en)/2.0; } position north() { return (en.y - strt.y) > 0 ? en : strt; } position south() { return (en.y - strt.y) < 0 ? en : strt; } position east() { return (en.x - strt.x) > 0 ? en : strt; } position west() { return (en.x - strt.x) < 0 ? en : strt; } object_type type() { return LINE_OBJECT; } void update_bounding_box(bounding_box *); void print(); void move_by(const position &); }; class arrow_object : public line_object { public: arrow_object(const position &, const position &, position *, int); object_type type() { return ARROW_OBJECT; } }; class spline_object : public line_object { public: spline_object(const position &, const position &, position *, int); object_type type() { return SPLINE_OBJECT; } void print(); void update_bounding_box(bounding_box *); }; linear_object::linear_object(const position &s, const position &e) : arrow_at_start(0), arrow_at_end(0), strt(s), en(e) { } void linear_object::move_by(const position &a) { strt += a; en += a; } void linear_object::add_arrows(int at_start, int at_end, const arrow_head_type &a) { arrow_at_start = at_start; arrow_at_end = at_end; aht = a; } line_object::line_object(const position &s, const position &e, position *p, int i) : linear_object(s, e), v(p), n(i) { } void line_object::print() { if (lt.type == line_type::invisible) return; out->set_color(0, graphic_object::get_outline_color()); out->line(strt, v, n, lt); if (arrow_at_start) draw_arrow(strt, strt-v[0], aht, lt, graphic_object::get_outline_color()); if (arrow_at_end) draw_arrow(en, v[n-1] - (n > 1 ? v[n - 2] : strt), aht, lt, graphic_object::get_outline_color()); out->reset_color(); } void line_object::update_bounding_box(bounding_box *p) { p->encompass(strt); for (int i = 0; i < n; i++) p->encompass(v[i]); } void line_object::move_by(const position &pos) { linear_object::move_by(pos); for (int i = 0; i < n; i++) v[i] += pos; } void spline_object::update_bounding_box(bounding_box *p) { p->encompass(strt); p->encompass(en); # 1310 "object.cpp" for (int i = 1; i < n; i++) p->encompass((i == 1 ? strt : v[i-2])*.125 + v[i-1]*.75 + v[i]*.125); } arrow_object::arrow_object(const position &s, const position &e, position *p, int i) : line_object(s, e, p, i) { } spline_object::spline_object(const position &s, const position &e, position *p, int i) : line_object(s, e, p, i) { } void spline_object::print() { if (lt.type == line_type::invisible) return; out->set_color(0, graphic_object::get_outline_color()); out->spline(strt, v, n, lt); if (arrow_at_start) draw_arrow(strt, strt-v[0], aht, lt, graphic_object::get_outline_color()); if (arrow_at_end) draw_arrow(en, v[n-1] - (n > 1 ? v[n - 2] : strt), aht, lt, graphic_object::get_outline_color()); out->reset_color(); } line_object::~line_object() { delete [] v; } linear_object *object_spec::make_line(position *curpos, direction *dirp) { static position last_line; static int have_last_line = 0; *dirp = dir; position startpos = (flags & HAS_FROM) ? from : *curpos; if (!(flags & HAS_SEGMENT)) { if ((flags & IS_SAME) && (type == LINE_OBJECT || type == ARROW_OBJECT) && have_last_line) segment_pos = last_line; else switch (dir) { case UP_DIRECTION: segment_pos.y = segment_height; break; case DOWN_DIRECTION: segment_pos.y = -segment_height; break; case LEFT_DIRECTION: segment_pos.x = -segment_width; break; case RIGHT_DIRECTION: segment_pos.x = segment_width; break; default: do_assert(0, 1371, "object.cpp"); } } segment_list = new segment(segment_pos, segment_is_absolute, segment_list); segment *old = segment_list; segment_list = 0; while (old != 0) { segment *tem = old->next; old->next = segment_list; segment_list = old; old = tem; } position endpos = startpos; int nsegments = 0; segment *s; for (s = segment_list; s; s = s->next, nsegments++) if (s->is_absolute) endpos = s->pos; else { endpos += s->pos; s->pos = endpos; s->is_absolute = 1; } line_object *p = 0; position *v = new position[nsegments]; int i = 0; for (s = segment_list; s; s = s->next, i++) v[i] = s->pos; if (flags & IS_DEFAULT_CHOPPED) { lookup_variable("circlerad", &start_chop); end_chop = start_chop; flags |= IS_CHOPPED; } if (flags & IS_CHOPPED) { position start_chop_vec, end_chop_vec; if (start_chop != 0.0) { start_chop_vec = v[0] - startpos; start_chop_vec *= start_chop / hypot(start_chop_vec); } if (end_chop != 0.0) { end_chop_vec = (v[nsegments - 1] - (nsegments > 1 ? v[nsegments - 2] : startpos)); end_chop_vec *= end_chop / hypot(end_chop_vec); } startpos += start_chop_vec; v[nsegments - 1] -= end_chop_vec; endpos -= end_chop_vec; } switch (type) { case SPLINE_OBJECT: p = new spline_object(startpos, endpos, v, nsegments); break; case ARROW_OBJECT: p = new arrow_object(startpos, endpos, v, nsegments); break; case LINE_OBJECT: p = new line_object(startpos, endpos, v, nsegments); break; default: do_assert(0, 1433, "object.cpp"); } have_last_line = 1; last_line = endpos - startpos; *curpos = endpos; return p; } class arc_object : public linear_object { int clockwise; position cent; double rad; public: arc_object(int, const position &, const position &, const position &); position origin() { return cent; } position center() { return cent; } double radius() { return rad; } position north(); position south(); position east(); position west(); position north_east(); position north_west(); position south_east(); position south_west(); void update_bounding_box(bounding_box *); object_type type() { return ARC_OBJECT; } void print(); void move_by(const position &pos); }; arc_object::arc_object(int cw, const position &s, const position &e, const position &c) : linear_object(s, e), clockwise(cw), cent(c) { rad = hypot(c - s); } void arc_object::move_by(const position &pos) { linear_object::move_by(pos); cent += pos; } position arc_object::north() { position result(cent); result.y += rad; return result; } position arc_object::south() { position result(cent); result.y -= rad; return result; } position arc_object::east() { position result(cent); result.x += rad; return result; } position arc_object::west() { position result(cent); result.x -= rad; return result; } position arc_object::north_east() { position result(cent); result.x += rad/1.41421356237309504880; result.y += rad/1.41421356237309504880; return result; } position arc_object::north_west() { position result(cent); result.x -= rad/1.41421356237309504880; result.y += rad/1.41421356237309504880; return result; } position arc_object::south_east() { position result(cent); result.x += rad/1.41421356237309504880; result.y -= rad/1.41421356237309504880; return result; } position arc_object::south_west() { position result(cent); result.x -= rad/1.41421356237309504880; result.y -= rad/1.41421356237309504880; return result; } void arc_object::print() { if (lt.type == line_type::invisible) return; out->set_color(0, graphic_object::get_outline_color()); if (clockwise) out->arc(en, cent, strt, lt); else out->arc(strt, cent, en, lt); if (arrow_at_start) { position c = cent - strt; draw_arrow(strt, (clockwise ? position(c.y, -c.x) : position(-c.y, c.x)), aht, lt, graphic_object::get_outline_color()); } if (arrow_at_end) { position e = en - cent; draw_arrow(en, (clockwise ? position(e.y, -e.x) : position(-e.y, e.x)), aht, lt, graphic_object::get_outline_color()); } out->reset_color(); } inline double max(double a, double b) { return a > b ? a : b; } void arc_object::update_bounding_box(bounding_box *p) { p->encompass(strt); p->encompass(en); position start_offset = strt - cent; if (start_offset.x == 0.0 && start_offset.y == 0.0) return; position end_offset = en - cent; if (end_offset.x == 0.0 && end_offset.y == 0.0) return; double start_quad = atan2(start_offset.y, start_offset.x)/(3.14159265358979323846/2.0); double end_quad = atan2(end_offset.y, end_offset.x)/(3.14159265358979323846/2.0); if (clockwise) { double temp = start_quad; start_quad = end_quad; end_quad = temp; } if (start_quad < 0.0) start_quad += 4.0; while (end_quad <= start_quad) end_quad += 4.0; double radius = max(hypot(start_offset), hypot(end_offset)); for (int q = int(start_quad) + 1; q < end_quad; q++) { position offset; switch (q % 4) { case 0: offset.x = radius; break; case 1: offset.y = radius; break; case 2: offset.x = -radius; break; case 3: offset.y = -radius; break; } p->encompass(cent + offset); } } linear_object *object_spec::make_arc(position *curpos, direction *dirp) { *dirp = dir; int cw = (flags & IS_CLOCKWISE) != 0; position startpos; if (flags & HAS_FROM) startpos = from; else startpos = *curpos; if (!(flags & HAS_RADIUS)) lookup_variable("arcrad", &radius); position endpos; if (flags & HAS_TO) endpos = to; else { position m(radius, radius); if (cw) { if (dir == DOWN_DIRECTION || dir == LEFT_DIRECTION) m.x = -m.x; if (dir == DOWN_DIRECTION || dir == RIGHT_DIRECTION) m.y = -m.y; *dirp = direction((dir + 3) % 4); } else { if (dir == UP_DIRECTION || dir == LEFT_DIRECTION) m.x = -m.x; if (dir == DOWN_DIRECTION || dir == LEFT_DIRECTION) m.y = -m.y; *dirp = direction((dir + 1) % 4); } endpos = startpos + m; } position centerpos; if (flags & HAS_AT) centerpos = at; else if (startpos == endpos) centerpos = startpos; else { position h = (endpos - startpos)/2.0; double d = hypot(h); if (radius <= 0) radius = .25; while (radius < d) radius *= 2.0; double alpha = acos(d/radius); double theta = atan2(h.y, h.x); if (cw) theta -= alpha; else theta += alpha; centerpos = position(cos(theta), sin(theta))*radius + startpos; } arc_object *p = new arc_object(cw, startpos, endpos, centerpos); *curpos = endpos; return p; } graphic_object *object_spec::make_linear(position *curpos, direction *dirp) { linear_object *obj; if (type == ARC_OBJECT) obj = make_arc(curpos, dirp); else obj = make_line(curpos, dirp); if (type == ARROW_OBJECT && (flags & (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD)) == 0) flags |= HAS_RIGHT_ARROW_HEAD; if (obj && (flags & (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD))) { arrow_head_type a; int at_start = (flags & HAS_LEFT_ARROW_HEAD) != 0; int at_end = (flags & HAS_RIGHT_ARROW_HEAD) != 0; if (flags & HAS_HEIGHT) a.height = height; else lookup_variable("arrowht", &a.height); if (flags & HAS_WIDTH) a.width = width; else lookup_variable("arrowwid", &a.width); double solid; lookup_variable("arrowhead", &solid); a.solid = solid != 0.0; obj->add_arrows(at_start, at_end, a); } return obj; } object *object_spec::make_object(position *curpos, direction *dirp) { graphic_object *obj = 0; switch (type) { case BLOCK_OBJECT: obj = make_block(curpos, dirp); break; case BOX_OBJECT: obj = make_box(curpos, dirp); break; case TEXT_OBJECT: obj = make_text(curpos, dirp); break; case ELLIPSE_OBJECT: obj = make_ellipse(curpos, dirp); break; case CIRCLE_OBJECT: obj = make_circle(curpos, dirp); break; case MOVE_OBJECT: obj = make_move(curpos, dirp); break; case ARC_OBJECT: case LINE_OBJECT: case SPLINE_OBJECT: case ARROW_OBJECT: obj = make_linear(curpos, dirp); break; case MARK_OBJECT: case OTHER_OBJECT: default: do_assert(0, 1736, "object.cpp"); break; } if (obj) { if (flags & IS_INVISIBLE) obj->set_invisible(); if (text != 0) obj->add_text(text, (flags & IS_ALIGNED) != 0); if (flags & IS_DOTTED) obj->set_dotted(dash_width); else if (flags & IS_DASHED) obj->set_dashed(dash_width); double th; if (flags & HAS_THICKNESS) th = thickness; else lookup_variable("linethick", &th); obj->set_thickness(th); if (flags & IS_OUTLINED) obj->set_outline_color(outlined); if (flags & (IS_DEFAULT_FILLED|IS_FILLED)) { if (flags & IS_SHADED) obj->set_fill_color(shaded); else { if (flags & IS_DEFAULT_FILLED) lookup_variable("fillval", &fill); if (fill < 0.0) error("bad fill value %1", fill); else obj->set_fill(fill); } } } return obj; } struct string_list { string_list *next; char *str; string_list(char *); ~string_list(); }; string_list::string_list(char *s) : next(0), str(s) { } string_list::~string_list() { delete [] str; } # 1797 "object.cpp" path::path(corner c) : crn(c), label_list(0), ypath(0), is_position(0) { } path::path(position p) : crn(0), label_list(0), ypath(0), is_position(1) { pos.x = p.x; pos.y = p.y; } path::path(char *l, corner c) : crn(c), ypath(0), is_position(0) { label_list = new string_list(l); } path::~path() { while (label_list) { string_list *tem = label_list; label_list = label_list->next; delete tem; } delete ypath; } void path::append(corner c) { do_assert(crn == 0, 1827, "object.cpp"); crn = c; } void path::append(char *s) { string_list **p; for (p = &label_list; *p; p = &(*p)->next) ; *p = new string_list(s); } void path::set_ypath(path *p) { ypath = p; } int path::follow(const place &pl, place *result) const { if (is_position) { result->x = pos.x; result->y = pos.y; result->obj = 0; return 1; } const place *p = &pl; for (string_list *lb = label_list; lb; lb = lb->next) if (p->obj == 0 || (p = p->obj->find_label(lb->str)) == 0) { lex_error("object does not contain a place `%1'", lb->str); return 0; } if (crn == 0 || p->obj == 0) *result = *p; else { position ps = ((p->obj)->*(crn))(); result->x = ps.x; result->y = ps.y; result->obj = 0; } if (ypath) { place tem; if (!ypath->follow(pl, &tem)) return 0; result->y = tem.y; if (result->obj != tem.obj) result->obj = 0; } return 1; } void print_object_list(object *p) { for (; p; p = p->next) { p->print(); p->print_text(); } } void print_picture(object *obj) { bounding_box bb; for (object *p = obj; p; p = p->next) p->update_bounding_box(&bb); double scale; lookup_variable("scale", &scale); out->start_picture(scale, bb.ll, bb.ur); print_object_list(obj); out->finish_picture(); }