Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 41539 Details for
Bug 67085
segfault of gcc while trying to 'emerge system' during compilation of groff
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
The requested /var/tmp/portage/groff-1.18.1-r4/temp/ccnO7jFw.out file
ccnO7jFw.out (text/plain), 267.31 KB, created by
Markus Müller
on 2004-10-11 06:35:30 UTC
(
hide
)
Description:
The requested /var/tmp/portage/groff-1.18.1-r4/temp/ccnO7jFw.out file
Filename:
MIME Type:
Creator:
Markus Müller
Created:
2004-10-11 06:35:30 UTC
Size:
267.31 KB
patch
obsolete
>// /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/cc1plus -quiet -I. -I/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/roff/troff -I/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include -I/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=3 -D_GNU_SOURCE -DHAVE_CONFIG_H node.cc -D__GNUG__=3 -quiet -dumpbase node.cc -march=pentium3 -auxbase node -O2 -fomit-frame-pointer -o - -frandom-seed=0 ># 1 "node.cc" ># 1 "<built-in>" ># 1 "<command line>" ># 1 "node.cc" ># 22 "node.cc" ># 1 "troff.h" 1 ># 23 "troff.h" ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/lib.h" 1 ># 22 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/lib.h" ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/config.h" 1 ># 23 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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.18.1-r4/work/groff-1.18.1/src/include/lib.h" ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/groff-getopt.h" 1 ># 30 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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.18.1-r4/work/groff-1.18.1/src/include/lib.h" 2 > > > > >char *strsave(const char *s); >int is_prime(unsigned); > ># 1 "/usr/include/stdio.h" 1 3 4 ># 28 "/usr/include/stdio.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 ># 29 "/usr/include/stdio.h" 2 3 4 > >extern "C" { > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 1 3 4 ># 213 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/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-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 1 3 4 ># 32 "/usr/include/bits/types.h" 2 3 4 > > >typedef unsigned char __u_char; >typedef unsigned short int __u_short; >typedef unsigned int __u_int; >typedef unsigned long int __u_long; > > >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef signed short int __int16_t; >typedef unsigned short int __uint16_t; >typedef signed int __int32_t; >typedef unsigned int __uint32_t; > > > > >__extension__ typedef signed long long int __int64_t; >__extension__ typedef unsigned long long int __uint64_t; > > > > > > > >__extension__ typedef long long int __quad_t; >__extension__ typedef unsigned long long int __u_quad_t; ># 129 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 130 "/usr/include/bits/types.h" 2 3 4 > > > > > > >__extension__ typedef unsigned long long int __dev_t; >__extension__ typedef unsigned int __uid_t; >__extension__ typedef unsigned int __gid_t; >__extension__ typedef unsigned long int __ino_t; >__extension__ typedef unsigned long long int __ino64_t; >__extension__ typedef unsigned int __mode_t; >__extension__ typedef unsigned int __nlink_t; >__extension__ typedef long int __off_t; >__extension__ typedef long long int __off64_t; >__extension__ typedef int __pid_t; >__extension__ typedef struct { int __val[2]; } __fsid_t; >__extension__ typedef long int __clock_t; >__extension__ typedef unsigned long int __rlim_t; >__extension__ typedef unsigned long long int __rlim64_t; >__extension__ typedef unsigned int __id_t; >__extension__ typedef long int __time_t; >__extension__ typedef unsigned int __useconds_t; >__extension__ typedef long int __suseconds_t; > >__extension__ typedef int __daddr_t; >__extension__ typedef long int __swblk_t; >__extension__ typedef int __key_t; > > >__extension__ typedef int __clockid_t; > > >__extension__ typedef int __timer_t; > > >__extension__ typedef long int __blksize_t; > > > > >__extension__ typedef long int __blkcnt_t; >__extension__ typedef long long int __blkcnt64_t; > > >__extension__ typedef unsigned long int __fsblkcnt_t; >__extension__ typedef unsigned long long int __fsblkcnt64_t; > > >__extension__ typedef unsigned long int __fsfilcnt_t; >__extension__ typedef unsigned long long int __fsfilcnt64_t; > >__extension__ typedef int __ssize_t; > > > >typedef __off64_t __loff_t; >typedef __quad_t *__qaddr_t; >typedef char *__caddr_t; > > >__extension__ typedef int __intptr_t; > > >__extension__ typedef unsigned int __socklen_t; ># 37 "/usr/include/stdio.h" 2 3 4 > > > > > > > > > >typedef struct _IO_FILE FILE; > > > > > ># 62 "/usr/include/stdio.h" 3 4 >typedef struct _IO_FILE __FILE; ># 72 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/libio.h" 1 3 4 ># 32 "/usr/include/libio.h" 3 4 ># 1 "/usr/include/_G_config.h" 1 3 4 ># 14 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 1 3 4 ># 354 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/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-lib/i686-pc-linux-gnu/3.3.3/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-lib/i686-pc-linux-gnu/3.3.3/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-lib/i686-pc-linux-gnu/3.3.3/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-lib/i686-pc-linux-gnu/3.3.3/include/stdarg.h" 1 3 4 ># 43 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/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 > > >} ># 51 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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-lib/i686-pc-linux-gnu/3.3.3/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 (); > > > > > > ># 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; ># 115 "/usr/include/string.h" 2 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 >} ># 52 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/lib.h" 2 > ># 1 "/usr/include/strings.h" 1 3 4 ># 54 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/lib.h" 2 ># 70 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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); ># 85 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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]; >} ># 125 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/lib.h" ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/limits.h" 1 3 4 ># 11 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/limits.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/syslimits.h" 1 3 4 > > > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/limits.h" 1 3 4 ># 122 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/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-lib/i686-pc-linux-gnu/3.3.3/include/limits.h" 2 3 4 ># 8 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/syslimits.h" 2 3 4 ># 12 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/limits.h" 2 3 4 ># 126 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/lib.h" 2 ># 157 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/lib.h" >const double PI = 3.14159265358979323846; ># 24 "troff.h" 2 > ># 1 "/usr/include/ctype.h" 1 3 4 ># 30 "/usr/include/ctype.h" 3 4 >extern "C" { ># 41 "/usr/include/ctype.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 ># 42 "/usr/include/ctype.h" 2 3 4 > > > > > > >enum >{ > _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), > _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), > _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), > _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), > _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), > _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), > _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), > _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), > _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), > _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), > _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), > _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) >}; ># 81 "/usr/include/ctype.h" 3 4 >extern __const unsigned short int **__ctype_b_loc (void) > __attribute__ ((__const)); >extern __const __int32_t **__ctype_tolower_loc (void) > __attribute__ ((__const)); >extern __const __int32_t **__ctype_toupper_loc (void) > __attribute__ ((__const)); ># 96 "/usr/include/ctype.h" 3 4 > > > > > > >extern int isalnum (int) throw (); >extern int isalpha (int) throw (); >extern int iscntrl (int) throw (); >extern int isdigit (int) throw (); >extern int islower (int) throw (); >extern int isgraph (int) throw (); >extern int isprint (int) throw (); >extern int ispunct (int) throw (); >extern int isspace (int) throw (); >extern int isupper (int) throw (); >extern int isxdigit (int) throw (); > > > >extern int tolower (int __c) throw (); > > >extern int toupper (int __c) throw (); > > > > > > > > >extern int isblank (int) throw (); > > > > > > >extern int isctype (int __c, int __mask) throw (); > > > > > > >extern int isascii (int __c) throw (); > > > >extern int toascii (int __c) throw (); > > > >extern int _toupper (int) throw (); >extern int _tolower (int) throw (); ># 247 "/usr/include/ctype.h" 3 4 >extern int isalnum_l (int, __locale_t) throw (); >extern int isalpha_l (int, __locale_t) throw (); >extern int iscntrl_l (int, __locale_t) throw (); >extern int isdigit_l (int, __locale_t) throw (); >extern int islower_l (int, __locale_t) throw (); >extern int isgraph_l (int, __locale_t) throw (); >extern int isprint_l (int, __locale_t) throw (); >extern int ispunct_l (int, __locale_t) throw (); >extern int isspace_l (int, __locale_t) throw (); >extern int isupper_l (int, __locale_t) throw (); >extern int isxdigit_l (int, __locale_t) throw (); > >extern int isblank_l (int, __locale_t) throw (); > > > >extern int __tolower_l (int __c, __locale_t __l) throw (); >extern int tolower_l (int __c, __locale_t __l) throw (); > > >extern int __toupper_l (int __c, __locale_t __l) throw (); >extern int toupper_l (int __c, __locale_t __l) throw (); ># 323 "/usr/include/ctype.h" 3 4 >} ># 26 "troff.h" 2 ># 1 "/usr/include/time.h" 1 3 4 ># 30 "/usr/include/time.h" 3 4 >extern "C" { > > > > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 1 3 4 ># 39 "/usr/include/time.h" 2 3 4 > > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 43 "/usr/include/time.h" 2 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; ># 118 "/usr/include/time.h" 3 4 >struct timespec > { > __time_t tv_sec; > long int tv_nsec; > }; > > > > > > > > >struct tm >{ > int tm_sec; > int tm_min; > int tm_hour; > int tm_mday; > int tm_mon; > int tm_year; > int tm_wday; > int tm_yday; > int tm_isdst; > > > long int tm_gmtoff; > __const char *tm_zone; > > > > >}; > > > > > > > > >struct itimerspec > { > struct timespec it_interval; > struct timespec it_value; > }; > > >struct sigevent; > > > > > >typedef __pid_t pid_t; > > > > > > > > >extern clock_t clock (void) throw (); > > >extern time_t time (time_t *__timer) throw (); > > >extern double difftime (time_t __time1, time_t __time0) > throw () __attribute__ ((__const__)); > > >extern time_t mktime (struct tm *__tp) throw (); > > > > > >extern size_t strftime (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp) throw (); > > > > > >extern char *strptime (__const char *__restrict __s, > __const char *__restrict __fmt, struct tm *__tp) > throw (); > > > > > > > >extern size_t strftime_l (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp, > __locale_t __loc) throw (); > >extern char *strptime_l (__const char *__restrict __s, > __const char *__restrict __fmt, struct tm *__tp, > __locale_t __loc) throw (); > > > > > > >extern struct tm *gmtime (__const time_t *__timer) throw (); > > > >extern struct tm *localtime (__const time_t *__timer) throw (); > > > > > >extern struct tm *gmtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) throw (); > > > >extern struct tm *localtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) throw (); > > > > > >extern char *asctime (__const struct tm *__tp) throw (); > > >extern char *ctime (__const time_t *__timer) throw (); > > > > > > > >extern char *asctime_r (__const struct tm *__restrict __tp, > char *__restrict __buf) throw (); > > >extern char *ctime_r (__const time_t *__restrict __timer, > char *__restrict __buf) throw (); > > > > >extern char *__tzname[2]; >extern int __daylight; >extern long int __timezone; > > > > >extern char *tzname[2]; > > > >extern void tzset (void) throw (); > > > >extern int daylight; >extern long int timezone; > > > > > >extern int stime (__const time_t *__when) throw (); ># 309 "/usr/include/time.h" 3 4 >extern time_t timegm (struct tm *__tp) throw (); > > >extern time_t timelocal (struct tm *__tp) throw (); > > >extern int dysize (int __year) throw () __attribute__ ((__const__)); ># 324 "/usr/include/time.h" 3 4 >extern int nanosleep (__const struct timespec *__requested_time, > struct timespec *__remaining); > > > >extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); > > >extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); > > >extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) > throw (); > > > > > > >extern int clock_nanosleep (clockid_t __clock_id, int __flags, > __const struct timespec *__req, > struct timespec *__rem); > > >extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); > > > > >extern int timer_create (clockid_t __clock_id, > struct sigevent *__restrict __evp, > timer_t *__restrict __timerid) throw (); > > >extern int timer_delete (timer_t __timerid) throw (); > > >extern int timer_settime (timer_t __timerid, int __flags, > __const struct itimerspec *__restrict __value, > struct itimerspec *__restrict __ovalue) throw (); > > >extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) > throw (); > > >extern int timer_getoverrun (timer_t __timerid) throw (); ># 386 "/usr/include/time.h" 3 4 >extern int getdate_err; ># 395 "/usr/include/time.h" 3 4 >extern struct tm *getdate (__const char *__string); ># 409 "/usr/include/time.h" 3 4 >extern int getdate_r (__const char *__restrict __string, > struct tm *__restrict __resbufp); > > >} ># 27 "troff.h" 2 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 1 3 4 ># 151 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 3 4 >typedef int ptrdiff_t; ># 28 "troff.h" 2 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/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 ># 65 "/usr/include/bits/waitstatus.h" 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; ># 105 "/usr/include/sys/types.h" 3 4 >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; ># 137 "/usr/include/sys/types.h" 3 4 >typedef __useconds_t useconds_t; > > > >typedef __suseconds_t suseconds_t; > > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/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/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 ># 23 "/usr/include/bits/pthreadtypes.h" 3 4 ># 1 "/usr/include/bits/sched.h" 1 3 4 ># 83 "/usr/include/bits/sched.h" 3 4 >struct __sched_param > { > int __sched_priority; > }; ># 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 > > >struct _pthread_fastlock >{ > long int __status; > int __spinlock; > >}; > > > >typedef struct _pthread_descr_struct *_pthread_descr; > > > > > >typedef struct __pthread_attr_s >{ > int __detachstate; > int __schedpolicy; > struct __sched_param __schedparam; > int __inheritsched; > int __scope; > size_t __guardsize; > int __stackaddr_set; > void *__stackaddr; > size_t __stacksize; >} pthread_attr_t; > > > > > >__extension__ typedef long long __pthread_cond_align_t; > > > > >typedef struct >{ > struct _pthread_fastlock __c_lock; > _pthread_descr __c_waiting; > char __padding[48 - sizeof (struct _pthread_fastlock) > - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)]; > __pthread_cond_align_t __align; >} pthread_cond_t; > > > >typedef struct >{ > int __dummy; >} pthread_condattr_t; > > >typedef unsigned int pthread_key_t; > > > > > >typedef struct >{ > int __m_reserved; > int __m_count; > _pthread_descr __m_owner; > int __m_kind; > struct _pthread_fastlock __m_lock; >} pthread_mutex_t; > > > >typedef struct >{ > int __mutexkind; >} pthread_mutexattr_t; > > > >typedef int pthread_once_t; > > > > >typedef struct _pthread_rwlock_t >{ > struct _pthread_fastlock __rw_lock; > int __rw_readers; > _pthread_descr __rw_writer; > _pthread_descr __rw_read_waiting; > _pthread_descr __rw_write_waiting; > int __rw_kind; > int __rw_pshared; >} pthread_rwlock_t; > > > >typedef struct >{ > int __lockkind; > int __pshared; >} pthread_rwlockattr_t; > > > > >typedef volatile int pthread_spinlock_t; > > >typedef struct { > struct _pthread_fastlock __ba_lock; > int __ba_required; > int __ba_present; > _pthread_descr __ba_waiting; >} pthread_barrier_t; > > >typedef struct { > int __pshared; >} pthread_barrierattr_t; > > > > > >typedef unsigned long int pthread_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-lib/i686-pc-linux-gnu/3.3.3/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 (); > > > > > >} ># 29 "troff.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 ># 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; ># 30 "troff.h" 2 > ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/assert.h" 1 ># 24 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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); >} ># 32 "troff.h" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/color.h" 1 ># 26 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/color.h" ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 1 3 4 ># 27 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/color.h" 2 > >enum color_scheme {DEFAULT, CMY, CMYK, RGB, GRAY}; > >class color { >private: > color_scheme scheme; > unsigned int components[4]; > > int read_encoding(const color_scheme, const char * const, > const size_t); > >public: > enum {MAX_COLOR_VAL = 0xffff}; > color() : scheme(DEFAULT){} > color(const color * const); > > int operator==(const color & c) const; > int operator!=(const color & c) const; > > int is_default() { return scheme == DEFAULT; } > > > void set_default(); > void set_rgb(const unsigned int r, const unsigned int g, > const unsigned int b); > void set_cmy(const unsigned int c, const unsigned int m, > const unsigned int y); > void set_cmyk(const unsigned int c, const unsigned int m, > const unsigned int y, const unsigned int k); > void set_gray(const unsigned int g); > > > int read_rgb(const char * const s); > int read_cmy(const char * const s); > int read_cmyk(const char * const s); > int read_gray(const char * const s); > > > > color_scheme get_components(unsigned int *c) const; > > > void get_rgb(unsigned int *r, unsigned int *g, unsigned int *b) const; > void get_cmy(unsigned int *c, unsigned int *m, unsigned int *y) const; > void get_cmyk(unsigned int *c, unsigned int *m, > unsigned int *y, unsigned int *k) const; > void get_gray(unsigned int *g) const; >}; ># 87 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/color.h" >extern color default_color; ># 33 "troff.h" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/device.h" 1 ># 21 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/device.h" >extern const char *device; ># 34 "troff.h" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/searchpath.h" 1 ># 21 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/searchpath.h" >class search_path { > char *dirs; > unsigned init_len; >public: > search_path(const char *envvar, const char *standard, > int add_home, int add_current); > ~search_path(); > void command_line_dir(const char *); > FILE *open_file(const char *, char **); >}; ># 35 "troff.h" 2 > >void cleanup_and_exit(int n); > >typedef int units; > >extern units scale(units n, units x, units y); > >extern units units_per_inch; > >extern int ascii_output_flag; >extern int suppress_output_flag; >extern int color_flag; >extern int is_html; > >extern int tcommand_flag; >extern int vresolution; >extern int hresolution; >extern int sizescale; > >extern search_path *mac_path; > ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/cset.h" 1 ># 22 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/cset.h" ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/limits.h" 1 3 4 ># 23 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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; ># 57 "troff.h" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/cmap.h" 1 ># 25 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/cmap.h" >enum cmap_builtin { CMAP_BUILTIN }; > >class cmap { >public: > cmap(); > cmap(cmap_builtin); > int operator()(unsigned char) const; > unsigned char &operator[](unsigned char); > > friend class cmap_init; >private: > unsigned char v[(127 * 2 + 1)+1]; >}; > >inline int cmap::operator()(unsigned char c) const >{ > return v[c]; >} > >inline unsigned char &cmap::operator[](unsigned char c) >{ > return v[c]; >} > >extern cmap cmlower; >extern cmap cmupper; > >static class cmap_init { > static int initialised; >public: > cmap_init(); >} _cmap_init; ># 58 "troff.h" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/errarg.h" 1 ># 21 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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); ># 59 "troff.h" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/error.h" 1 ># 21 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/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; ># 60 "troff.h" 2 > >enum warning_type { > WARN_CHAR = 01, > WARN_NUMBER = 02, > WARN_BREAK = 04, > WARN_DELIM = 010, > WARN_EL = 020, > WARN_SCALE = 040, > WARN_RANGE = 0100, > WARN_SYNTAX = 0200, > WARN_DI = 0400, > WARN_MAC = 01000, > WARN_REG = 02000, > WARN_TAB = 04000, > WARN_RIGHT_BRACE = 010000, > WARN_MISSING = 020000, > WARN_INPUT = 040000, > WARN_ESCAPE = 0100000, > WARN_SPACE = 0200000, > WARN_FONT = 0400000, > WARN_IG = 01000000, > WARN_COLOR = 02000000 > >}; > >const int WARN_TOTAL = 02777777; > >int warning(warning_type, const char *, > const errarg & = empty_errarg, > const errarg & = empty_errarg, > const errarg & = empty_errarg); >int output_warning(warning_type, const char *, > const errarg & = empty_errarg, > const errarg & = empty_errarg, > const errarg & = empty_errarg); ># 23 "node.cc" 2 > > ># 1 "/usr/include/unistd.h" 1 3 4 ># 28 "/usr/include/unistd.h" 3 4 >extern "C" { ># 171 "/usr/include/unistd.h" 3 4 ># 1 "/usr/include/bits/posix_opt.h" 1 3 4 ># 172 "/usr/include/unistd.h" 2 3 4 > > > ># 1 "/usr/include/bits/environments.h" 1 3 4 ># 23 "/usr/include/bits/environments.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 24 "/usr/include/bits/environments.h" 2 3 4 ># 176 "/usr/include/unistd.h" 2 3 4 ># 195 "/usr/include/unistd.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/stddef.h" 1 3 4 ># 196 "/usr/include/unistd.h" 2 3 4 ># 236 "/usr/include/unistd.h" 3 4 >typedef __intptr_t intptr_t; > > > > > > >typedef __socklen_t socklen_t; ># 256 "/usr/include/unistd.h" 3 4 >extern int access (__const char *__name, int __type) throw (); > > > > >extern int euidaccess (__const char *__name, int __type) throw (); ># 286 "/usr/include/unistd.h" 3 4 >extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); ># 298 "/usr/include/unistd.h" 3 4 >extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) throw (); > > > > > > >extern int close (int __fd); > > > > > > >extern ssize_t read (int __fd, void *__buf, size_t __nbytes); > > > > > >extern ssize_t write (int __fd, __const void *__buf, size_t __n); ># 328 "/usr/include/unistd.h" 3 4 >extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, > __off_t __offset); > > > > > > >extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, > __off_t __offset); ># 356 "/usr/include/unistd.h" 3 4 >extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, > __off64_t __offset); > > >extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, > __off64_t __offset); > > > > > > > >extern int pipe (int __pipedes[2]) throw (); ># 378 "/usr/include/unistd.h" 3 4 >extern unsigned int alarm (unsigned int __seconds) throw (); ># 390 "/usr/include/unistd.h" 3 4 >extern unsigned int sleep (unsigned int __seconds); > > > > > > >extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) > throw (); > > > > > > >extern int usleep (__useconds_t __useconds); ># 414 "/usr/include/unistd.h" 3 4 >extern int pause (void); > > > >extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) > throw (); > > > >extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw (); > > > > >extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) > throw (); > > > > >extern int chdir (__const char *__path) throw (); > > > >extern int fchdir (int __fd) throw (); ># 448 "/usr/include/unistd.h" 3 4 >extern char *getcwd (char *__buf, size_t __size) throw (); > > > > > >extern char *get_current_dir_name (void) throw (); > > > > > > >extern char *getwd (char *__buf) throw (); > > > > >extern int dup (int __fd) throw (); > > >extern int dup2 (int __fd, int __fd2) throw (); > > >extern char **__environ; > >extern char **environ; > > > > > >extern int execve (__const char *__path, char *__const __argv[], > char *__const __envp[]) throw (); > > > > >extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) > throw (); > > > > >extern int execv (__const char *__path, char *__const __argv[]) throw (); > > > >extern int execle (__const char *__path, __const char *__arg, ...) throw (); > > > >extern int execl (__const char *__path, __const char *__arg, ...) throw (); > > > >extern int execvp (__const char *__file, char *__const __argv[]) throw (); > > > > >extern int execlp (__const char *__file, __const char *__arg, ...) throw (); > > > > >extern int nice (int __inc) throw (); > > > > >extern void _exit (int __status) __attribute__ ((__noreturn__)); > > > > > ># 1 "/usr/include/bits/confname.h" 1 3 4 ># 26 "/usr/include/bits/confname.h" 3 4 >enum > { > _PC_LINK_MAX, > > _PC_MAX_CANON, > > _PC_MAX_INPUT, > > _PC_NAME_MAX, > > _PC_PATH_MAX, > > _PC_PIPE_BUF, > > _PC_CHOWN_RESTRICTED, > > _PC_NO_TRUNC, > > _PC_VDISABLE, > > _PC_SYNC_IO, > > _PC_ASYNC_IO, > > _PC_PRIO_IO, > > _PC_SOCK_MAXBUF, > > _PC_FILESIZEBITS, > > _PC_REC_INCR_XFER_SIZE, > > _PC_REC_MAX_XFER_SIZE, > > _PC_REC_MIN_XFER_SIZE, > > _PC_REC_XFER_ALIGN, > > _PC_ALLOC_SIZE_MIN, > > _PC_SYMLINK_MAX, > > _PC_2_SYMLINKS > > }; > > >enum > { > _SC_ARG_MAX, > > _SC_CHILD_MAX, > > _SC_CLK_TCK, > > _SC_NGROUPS_MAX, > > _SC_OPEN_MAX, > > _SC_STREAM_MAX, > > _SC_TZNAME_MAX, > > _SC_JOB_CONTROL, > > _SC_SAVED_IDS, > > _SC_REALTIME_SIGNALS, > > _SC_PRIORITY_SCHEDULING, > > _SC_TIMERS, > > _SC_ASYNCHRONOUS_IO, > > _SC_PRIORITIZED_IO, > > _SC_SYNCHRONIZED_IO, > > _SC_FSYNC, > > _SC_MAPPED_FILES, > > _SC_MEMLOCK, > > _SC_MEMLOCK_RANGE, > > _SC_MEMORY_PROTECTION, > > _SC_MESSAGE_PASSING, > > _SC_SEMAPHORES, > > _SC_SHARED_MEMORY_OBJECTS, > > _SC_AIO_LISTIO_MAX, > > _SC_AIO_MAX, > > _SC_AIO_PRIO_DELTA_MAX, > > _SC_DELAYTIMER_MAX, > > _SC_MQ_OPEN_MAX, > > _SC_MQ_PRIO_MAX, > > _SC_VERSION, > > _SC_PAGESIZE, > > > _SC_RTSIG_MAX, > > _SC_SEM_NSEMS_MAX, > > _SC_SEM_VALUE_MAX, > > _SC_SIGQUEUE_MAX, > > _SC_TIMER_MAX, > > > > > _SC_BC_BASE_MAX, > > _SC_BC_DIM_MAX, > > _SC_BC_SCALE_MAX, > > _SC_BC_STRING_MAX, > > _SC_COLL_WEIGHTS_MAX, > > _SC_EQUIV_CLASS_MAX, > > _SC_EXPR_NEST_MAX, > > _SC_LINE_MAX, > > _SC_RE_DUP_MAX, > > _SC_CHARCLASS_NAME_MAX, > > > _SC_2_VERSION, > > _SC_2_C_BIND, > > _SC_2_C_DEV, > > _SC_2_FORT_DEV, > > _SC_2_FORT_RUN, > > _SC_2_SW_DEV, > > _SC_2_LOCALEDEF, > > > _SC_PII, > > _SC_PII_XTI, > > _SC_PII_SOCKET, > > _SC_PII_INTERNET, > > _SC_PII_OSI, > > _SC_POLL, > > _SC_SELECT, > > _SC_UIO_MAXIOV, > > _SC_IOV_MAX = _SC_UIO_MAXIOV, > > _SC_PII_INTERNET_STREAM, > > _SC_PII_INTERNET_DGRAM, > > _SC_PII_OSI_COTS, > > _SC_PII_OSI_CLTS, > > _SC_PII_OSI_M, > > _SC_T_IOV_MAX, > > > > _SC_THREADS, > > _SC_THREAD_SAFE_FUNCTIONS, > > _SC_GETGR_R_SIZE_MAX, > > _SC_GETPW_R_SIZE_MAX, > > _SC_LOGIN_NAME_MAX, > > _SC_TTY_NAME_MAX, > > _SC_THREAD_DESTRUCTOR_ITERATIONS, > > _SC_THREAD_KEYS_MAX, > > _SC_THREAD_STACK_MIN, > > _SC_THREAD_THREADS_MAX, > > _SC_THREAD_ATTR_STACKADDR, > > _SC_THREAD_ATTR_STACKSIZE, > > _SC_THREAD_PRIORITY_SCHEDULING, > > _SC_THREAD_PRIO_INHERIT, > > _SC_THREAD_PRIO_PROTECT, > > _SC_THREAD_PROCESS_SHARED, > > > _SC_NPROCESSORS_CONF, > > _SC_NPROCESSORS_ONLN, > > _SC_PHYS_PAGES, > > _SC_AVPHYS_PAGES, > > _SC_ATEXIT_MAX, > > _SC_PASS_MAX, > > > _SC_XOPEN_VERSION, > > _SC_XOPEN_XCU_VERSION, > > _SC_XOPEN_UNIX, > > _SC_XOPEN_CRYPT, > > _SC_XOPEN_ENH_I18N, > > _SC_XOPEN_SHM, > > > _SC_2_CHAR_TERM, > > _SC_2_C_VERSION, > > _SC_2_UPE, > > > _SC_XOPEN_XPG2, > > _SC_XOPEN_XPG3, > > _SC_XOPEN_XPG4, > > > _SC_CHAR_BIT, > > _SC_CHAR_MAX, > > _SC_CHAR_MIN, > > _SC_INT_MAX, > > _SC_INT_MIN, > > _SC_LONG_BIT, > > _SC_WORD_BIT, > > _SC_MB_LEN_MAX, > > _SC_NZERO, > > _SC_SSIZE_MAX, > > _SC_SCHAR_MAX, > > _SC_SCHAR_MIN, > > _SC_SHRT_MAX, > > _SC_SHRT_MIN, > > _SC_UCHAR_MAX, > > _SC_UINT_MAX, > > _SC_ULONG_MAX, > > _SC_USHRT_MAX, > > > _SC_NL_ARGMAX, > > _SC_NL_LANGMAX, > > _SC_NL_MSGMAX, > > _SC_NL_NMAX, > > _SC_NL_SETMAX, > > _SC_NL_TEXTMAX, > > > _SC_XBS5_ILP32_OFF32, > > _SC_XBS5_ILP32_OFFBIG, > > _SC_XBS5_LP64_OFF64, > > _SC_XBS5_LPBIG_OFFBIG, > > > _SC_XOPEN_LEGACY, > > _SC_XOPEN_REALTIME, > > _SC_XOPEN_REALTIME_THREADS, > > > _SC_ADVISORY_INFO, > > _SC_BARRIERS, > > _SC_BASE, > > _SC_C_LANG_SUPPORT, > > _SC_C_LANG_SUPPORT_R, > > _SC_CLOCK_SELECTION, > > _SC_CPUTIME, > > _SC_THREAD_CPUTIME, > > _SC_DEVICE_IO, > > _SC_DEVICE_SPECIFIC, > > _SC_DEVICE_SPECIFIC_R, > > _SC_FD_MGMT, > > _SC_FIFO, > > _SC_PIPE, > > _SC_FILE_ATTRIBUTES, > > _SC_FILE_LOCKING, > > _SC_FILE_SYSTEM, > > _SC_MONOTONIC_CLOCK, > > _SC_MULTI_PROCESS, > > _SC_SINGLE_PROCESS, > > _SC_NETWORKING, > > _SC_READER_WRITER_LOCKS, > > _SC_SPIN_LOCKS, > > _SC_REGEXP, > > _SC_REGEX_VERSION, > > _SC_SHELL, > > _SC_SIGNALS, > > _SC_SPAWN, > > _SC_SPORADIC_SERVER, > > _SC_THREAD_SPORADIC_SERVER, > > _SC_SYSTEM_DATABASE, > > _SC_SYSTEM_DATABASE_R, > > _SC_TIMEOUTS, > > _SC_TYPED_MEMORY_OBJECTS, > > _SC_USER_GROUPS, > > _SC_USER_GROUPS_R, > > _SC_2_PBS, > > _SC_2_PBS_ACCOUNTING, > > _SC_2_PBS_LOCATE, > > _SC_2_PBS_MESSAGE, > > _SC_2_PBS_TRACK, > > _SC_SYMLOOP_MAX, > > _SC_STREAMS, > > _SC_2_PBS_CHECKPOINT, > > > _SC_V6_ILP32_OFF32, > > _SC_V6_ILP32_OFFBIG, > > _SC_V6_LP64_OFF64, > > _SC_V6_LPBIG_OFFBIG, > > > _SC_HOST_NAME_MAX, > > _SC_TRACE, > > _SC_TRACE_EVENT_FILTER, > > _SC_TRACE_INHERIT, > > _SC_TRACE_LOG, > > > _SC_LEVEL1_ICACHE_SIZE, > > _SC_LEVEL1_ICACHE_ASSOC, > > _SC_LEVEL1_ICACHE_LINESIZE, > > _SC_LEVEL1_DCACHE_SIZE, > > _SC_LEVEL1_DCACHE_ASSOC, > > _SC_LEVEL1_DCACHE_LINESIZE, > > _SC_LEVEL2_CACHE_SIZE, > > _SC_LEVEL2_CACHE_ASSOC, > > _SC_LEVEL2_CACHE_LINESIZE, > > _SC_LEVEL3_CACHE_SIZE, > > _SC_LEVEL3_CACHE_ASSOC, > > _SC_LEVEL3_CACHE_LINESIZE, > > _SC_LEVEL4_CACHE_SIZE, > > _SC_LEVEL4_CACHE_ASSOC, > > _SC_LEVEL4_CACHE_LINESIZE > > > }; > > >enum > { > _CS_PATH, > > > _CS_V6_WIDTH_RESTRICTED_ENVS, > > > _CS_GNU_LIBC_VERSION, > > _CS_GNU_LIBPTHREAD_VERSION, > > > _CS_LFS_CFLAGS = 1000, > > _CS_LFS_LDFLAGS, > > _CS_LFS_LIBS, > > _CS_LFS_LINTFLAGS, > > _CS_LFS64_CFLAGS, > > _CS_LFS64_LDFLAGS, > > _CS_LFS64_LIBS, > > _CS_LFS64_LINTFLAGS, > > > _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, > > _CS_XBS5_ILP32_OFF32_LDFLAGS, > > _CS_XBS5_ILP32_OFF32_LIBS, > > _CS_XBS5_ILP32_OFF32_LINTFLAGS, > > _CS_XBS5_ILP32_OFFBIG_CFLAGS, > > _CS_XBS5_ILP32_OFFBIG_LDFLAGS, > > _CS_XBS5_ILP32_OFFBIG_LIBS, > > _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, > > _CS_XBS5_LP64_OFF64_CFLAGS, > > _CS_XBS5_LP64_OFF64_LDFLAGS, > > _CS_XBS5_LP64_OFF64_LIBS, > > _CS_XBS5_LP64_OFF64_LINTFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_CFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, > > _CS_XBS5_LPBIG_OFFBIG_LIBS, > > _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, > > > _CS_POSIX_V6_ILP32_OFF32_CFLAGS, > > _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, > > _CS_POSIX_V6_ILP32_OFF32_LIBS, > > _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, > > _CS_POSIX_V6_ILP32_OFFBIG_LIBS, > > _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, > > _CS_POSIX_V6_LP64_OFF64_CFLAGS, > > _CS_POSIX_V6_LP64_OFF64_LDFLAGS, > > _CS_POSIX_V6_LP64_OFF64_LIBS, > > _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, > > _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS > > }; ># 526 "/usr/include/unistd.h" 2 3 4 > > >extern long int pathconf (__const char *__path, int __name) throw (); > > >extern long int fpathconf (int __fd, int __name) throw (); > > >extern long int sysconf (int __name) throw () __attribute__ ((__const__)); > > > >extern size_t confstr (int __name, char *__buf, size_t __len) throw (); > > > > >extern __pid_t getpid (void) throw (); > > >extern __pid_t getppid (void) throw (); > > > > >extern __pid_t getpgrp (void) throw (); ># 561 "/usr/include/unistd.h" 3 4 >extern __pid_t __getpgid (__pid_t __pid) throw (); > >extern __pid_t getpgid (__pid_t __pid) throw (); > > > > > > >extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); ># 587 "/usr/include/unistd.h" 3 4 >extern int setpgrp (void) throw (); ># 605 "/usr/include/unistd.h" 3 4 >extern __pid_t setsid (void) throw (); > > > >extern __pid_t getsid (__pid_t __pid) throw (); > > > >extern __uid_t getuid (void) throw (); > > >extern __uid_t geteuid (void) throw (); > > >extern __gid_t getgid (void) throw (); > > >extern __gid_t getegid (void) throw (); > > > > >extern int getgroups (int __size, __gid_t __list[]) throw (); > > > >extern int group_member (__gid_t __gid) throw (); > > > > > > >extern int setuid (__uid_t __uid) throw (); > > > > >extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); > > > > >extern int seteuid (__uid_t __uid) throw (); > > > > > > >extern int setgid (__gid_t __gid) throw (); > > > > >extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); > > > > >extern int setegid (__gid_t __gid) throw (); > > > > > >extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid); > > > >extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid); > > > >extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid); > > > >extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid); > > > > > > >extern __pid_t fork (void) throw (); > > > > > > >extern __pid_t vfork (void) throw (); > > > > > >extern char *ttyname (int __fd) throw (); > > > >extern int ttyname_r (int __fd, char *__buf, size_t __buflen) throw (); > > > >extern int isatty (int __fd) throw (); > > > > > >extern int ttyslot (void) throw (); > > > > >extern int link (__const char *__from, __const char *__to) throw (); > > > >extern int symlink (__const char *__from, __const char *__to) throw (); > > > > >extern int readlink (__const char *__restrict __path, char *__restrict __buf, > size_t __len) throw (); > > > >extern int unlink (__const char *__name) throw (); > > >extern int rmdir (__const char *__path) throw (); > > > >extern __pid_t tcgetpgrp (int __fd) throw (); > > >extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); > > > > > > >extern char *getlogin (void); > > > > > > > >extern int getlogin_r (char *__name, size_t __name_len); > > > > >extern int setlogin (__const char *__name) throw (); ># 775 "/usr/include/unistd.h" 3 4 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/getopt.h" 1 3 4 ># 38 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/getopt.h" 3 4 >extern "C" { ># 47 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/getopt.h" 3 4 >extern char *optarg; ># 61 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/getopt.h" 3 4 >extern int optind; > > > > >extern int opterr; > > > >extern int optopt; ># 145 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/getopt.h" 3 4 >extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); ># 175 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/getopt.h" 3 4 >} ># 776 "/usr/include/unistd.h" 2 3 4 > > > > > > > >extern int gethostname (char *__name, size_t __len) throw (); > > > > > > >extern int sethostname (__const char *__name, size_t __len) throw (); > > > >extern int sethostid (long int __id) throw (); > > > > > >extern int getdomainname (char *__name, size_t __len) throw (); >extern int setdomainname (__const char *__name, size_t __len) throw (); > > > > > >extern int vhangup (void) throw (); > > >extern int revoke (__const char *__file) throw (); > > > > > > > >extern int profil (unsigned short int *__sample_buffer, size_t __size, > size_t __offset, unsigned int __scale) throw (); > > > > > >extern int acct (__const char *__name) throw (); > > > >extern char *getusershell (void) throw (); >extern void endusershell (void) throw (); >extern void setusershell (void) throw (); > > > > > >extern int daemon (int __nochdir, int __noclose) throw (); > > > > > > >extern int chroot (__const char *__path) throw (); > > > >extern char *getpass (__const char *__prompt); ># 857 "/usr/include/unistd.h" 3 4 >extern int fsync (int __fd); > > > > > > >extern long int gethostid (void); > > >extern void sync (void) throw (); > > > > >extern int getpagesize (void) throw () __attribute__ ((__const__)); > > > > >extern int truncate (__const char *__file, __off_t __length) throw (); ># 888 "/usr/include/unistd.h" 3 4 >extern int truncate64 (__const char *__file, __off64_t __length) throw (); > > > > >extern int ftruncate (int __fd, __off_t __length) throw (); ># 903 "/usr/include/unistd.h" 3 4 >extern int ftruncate64 (int __fd, __off64_t __length) throw (); > > > > > >extern int getdtablesize (void) throw (); ># 918 "/usr/include/unistd.h" 3 4 >extern int brk (void *__addr) throw (); > > > > > >extern void *sbrk (intptr_t __delta) throw (); ># 939 "/usr/include/unistd.h" 3 4 >extern long int syscall (long int __sysno, ...) throw (); ># 962 "/usr/include/unistd.h" 3 4 >extern int lockf (int __fd, int __cmd, __off_t __len); ># 972 "/usr/include/unistd.h" 3 4 >extern int lockf64 (int __fd, int __cmd, __off64_t __len); ># 993 "/usr/include/unistd.h" 3 4 >extern int fdatasync (int __fildes) throw (); > > > > > > > >extern char *crypt (__const char *__key, __const char *__salt) throw (); > > > >extern void encrypt (char *__block, int __edflag) throw (); > > > > > > >extern void swab (__const void *__restrict __from, void *__restrict __to, > ssize_t __n) throw (); > > > > > > > >extern char *ctermid (char *__s) throw (); > > >} ># 26 "node.cc" 2 > > ># 1 "symbol.h" 1 ># 24 "symbol.h" >class symbol { > static const char **table; > static int table_used; > static int table_size; > static char *block; > static int block_size; > const char *s; >public: > symbol(const char *p, int how = 0); > symbol(); > unsigned long hash() const; > int operator ==(symbol) const; > int operator !=(symbol) const; > const char *contents() const; > int is_null() const; > int is_empty() const; >}; > > >extern const symbol NULL_SYMBOL; >extern const symbol EMPTY_SYMBOL; > >inline symbol::symbol() : s(0) >{ >} > >inline int symbol::operator==(symbol p) const >{ > return s == p.s; >} > >inline int symbol::operator!=(symbol p) const >{ > return s != p.s; >} > >inline unsigned long symbol::hash() const >{ > return (unsigned long)s; >} > >inline const char *symbol::contents() const >{ > return s; >} > >inline int symbol::is_null() const >{ > return s == 0; >} > >inline int symbol::is_empty() const >{ > return s != 0 && *s == 0; >} > >symbol concat(symbol, symbol); ># 29 "node.cc" 2 ># 1 "dictionary.h" 1 ># 26 "dictionary.h" >struct association { > symbol s; > void *v; > association() : v(0) {} >}; > >class dictionary; > >class dictionary_iterator { > dictionary *dict; > int i; >public: > dictionary_iterator(dictionary &); > int get(symbol *, void **); >}; > >class dictionary { > int size; > int used; > double threshold; > double factor; > association *table; > void rehash(int); >public: > dictionary(int); > void *lookup(symbol s, void *v=0); > void *lookup(const char *); > > void *remove(symbol); > friend class dictionary_iterator; >}; > >class object { > int rcount; > public: > object(); > virtual ~object(); > void add_reference(); > void remove_reference(); >}; > >class object_dictionary; > >class object_dictionary_iterator { > dictionary_iterator di; >public: > object_dictionary_iterator(object_dictionary &); > int get(symbol *, object **); >}; > >class object_dictionary { > dictionary d; >public: > object_dictionary(int); > object *lookup(symbol nm); > void define(symbol nm, object *obj); > void rename(symbol oldnm, symbol newnm); > void remove(symbol nm); > int alias(symbol newnm, symbol oldnm); > friend class object_dictionary_iterator; >}; > > >inline int object_dictionary_iterator::get(symbol *sp, object **op) >{ > return di.get(sp, (void **)op); >} ># 30 "node.cc" 2 ># 1 "hvunits.h" 1 ># 22 "hvunits.h" >class vunits { > int n; >public: > vunits(); > vunits(units); > units to_units(); > int is_zero(); > vunits& operator+=(const vunits&); > vunits& operator-=(const vunits&); > friend inline vunits scale(vunits n, units x, units y); > friend inline vunits scale(vunits n, vunits x, vunits y); > friend inline vunits operator +(const vunits&, const vunits&); > friend inline vunits operator -(const vunits&, const vunits&); > friend inline vunits operator -(const vunits&); > friend inline int operator /(const vunits&, const vunits&); > friend inline vunits operator /(const vunits&, int); > friend inline vunits operator *(const vunits&, int); > friend inline vunits operator *(int, const vunits&); > friend inline int operator <(const vunits&, const vunits&); > friend inline int operator >(const vunits&, const vunits&); > friend inline int operator <=(const vunits&, const vunits&); > friend inline int operator >=(const vunits&, const vunits&); > friend inline int operator ==(const vunits&, const vunits&); > friend inline int operator !=(const vunits&, const vunits&); >}; > >extern vunits V0; > > >class hunits { > int n; >public: > hunits(); > hunits(units); > units to_units(); > int is_zero(); > hunits& operator+=(const hunits&); > hunits& operator-=(const hunits&); > friend inline hunits scale(hunits n, units x, units y); > friend inline hunits scale(hunits n, double x); > friend inline hunits operator +(const hunits&, const hunits&); > friend inline hunits operator -(const hunits&, const hunits&); > friend inline hunits operator -(const hunits&); > friend inline int operator /(const hunits&, const hunits&); > friend inline hunits operator /(const hunits&, int); > friend inline hunits operator *(const hunits&, int); > friend inline hunits operator *(int, const hunits&); > friend inline int operator <(const hunits&, const hunits&); > friend inline int operator >(const hunits&, const hunits&); > friend inline int operator <=(const hunits&, const hunits&); > friend inline int operator >=(const hunits&, const hunits&); > friend inline int operator ==(const hunits&, const hunits&); > friend inline int operator !=(const hunits&, const hunits&); >}; > >extern hunits H0; > >extern int get_vunits(vunits *, unsigned char si); >extern int get_hunits(hunits *, unsigned char si); >extern int get_vunits(vunits *, unsigned char si, vunits prev_value); >extern int get_hunits(hunits *, unsigned char si, hunits prev_value); > >inline vunits:: vunits() : n(0) >{ >} > >inline units vunits::to_units() >{ > return n*vresolution; >} > >inline int vunits::is_zero() >{ > return n == 0; >} > >inline vunits operator +(const vunits & x, const vunits & y) >{ > vunits r; > r = x; > r.n += y.n; > return r; >} > >inline vunits operator -(const vunits & x, const vunits & y) >{ > vunits r; > r = x; > r.n -= y.n; > return r; >} > >inline vunits operator -(const vunits & x) >{ > vunits r; > r.n = -x.n; > return r; >} > >inline int operator /(const vunits & x, const vunits & y) >{ > return x.n/y.n; >} > >inline vunits operator /(const vunits & x, int n) >{ > vunits r; > r = x; > r.n /= n; > return r; >} > >inline vunits operator *(const vunits & x, int n) >{ > vunits r; > r = x; > r.n *= n; > return r; >} > >inline vunits operator *(int n, const vunits & x) >{ > vunits r; > r = x; > r.n *= n; > return r; >} > >inline int operator <(const vunits & x, const vunits & y) >{ > return x.n < y.n; >} > >inline int operator >(const vunits & x, const vunits & y) >{ > return x.n > y.n; >} > >inline int operator <=(const vunits & x, const vunits & y) >{ > return x.n <= y.n; >} > >inline int operator >=(const vunits & x, const vunits & y) >{ > return x.n >= y.n; >} > >inline int operator ==(const vunits & x, const vunits & y) >{ > return x.n == y.n; >} > >inline int operator !=(const vunits & x, const vunits & y) >{ > return x.n != y.n; >} > > >inline vunits& vunits::operator+=(const vunits & x) >{ > n += x.n; > return *this; >} > >inline vunits& vunits::operator-=(const vunits & x) >{ > n -= x.n; > return *this; >} > >inline hunits:: hunits() : n(0) >{ >} > >inline units hunits::to_units() >{ > return n*hresolution; >} > >inline int hunits::is_zero() >{ > return n == 0; >} > >inline hunits operator +(const hunits & x, const hunits & y) >{ > hunits r; > r = x; > r.n += y.n; > return r; >} > >inline hunits operator -(const hunits & x, const hunits & y) >{ > hunits r; > r = x; > r.n -= y.n; > return r; >} > >inline hunits operator -(const hunits & x) >{ > hunits r; > r = x; > r.n = -x.n; > return r; >} > >inline int operator /(const hunits & x, const hunits & y) >{ > return x.n/y.n; >} > >inline hunits operator /(const hunits & x, int n) >{ > hunits r; > r = x; > r.n /= n; > return r; >} > >inline hunits operator *(const hunits & x, int n) >{ > hunits r; > r = x; > r.n *= n; > return r; >} > >inline hunits operator *(int n, const hunits & x) >{ > hunits r; > r = x; > r.n *= n; > return r; >} > >inline int operator <(const hunits & x, const hunits & y) >{ > return x.n < y.n; >} > >inline int operator >(const hunits & x, const hunits & y) >{ > return x.n > y.n; >} > >inline int operator <=(const hunits & x, const hunits & y) >{ > return x.n <= y.n; >} > >inline int operator >=(const hunits & x, const hunits & y) >{ > return x.n >= y.n; >} > >inline int operator ==(const hunits & x, const hunits & y) >{ > return x.n == y.n; >} > >inline int operator !=(const hunits & x, const hunits & y) >{ > return x.n != y.n; >} > > >inline hunits& hunits::operator+=(const hunits & x) >{ > n += x.n; > return *this; >} > >inline hunits& hunits::operator-=(const hunits & x) >{ > n -= x.n; > return *this; >} > >inline hunits scale(hunits n, units x, units y) >{ > hunits r; > r.n = scale(n.n, x, y); > return r; >} > >inline vunits scale(vunits n, units x, units y) >{ > vunits r; > r.n = scale(n.n, x, y); > return r; >} > >inline vunits scale(vunits n, vunits x, vunits y) >{ > vunits r; > r.n = scale(n.n, x.n, y.n); > return r; >} > >inline hunits scale(hunits n, double x) >{ > hunits r; > r.n = int(n.n*x); > return r; >} > >inline units scale(units n, double x) >{ > return int(n*x); >} > >inline units points_to_units(units n) >{ > return scale(n, units_per_inch, 72); >} ># 31 "node.cc" 2 ># 1 "env.h" 1 ># 22 "env.h" >struct size_range { > int min; > int max; >}; > >class font_size { > static size_range *size_table; > static int nranges; > int p; >public: > font_size(); > font_size(int points); > int to_points(); > int to_scaled_points(); > int to_units(); > int operator==(font_size); > int operator!=(font_size); > static void init_size_table(int *sizes); >}; > >inline font_size::font_size() : p(0) >{ >} > >inline int font_size::operator==(font_size fs) >{ > return p == fs.p; >} > >inline int font_size::operator!=(font_size fs) >{ > return p != fs.p; >} > >inline int font_size::to_scaled_points() >{ > return p; >} > >inline int font_size::to_points() >{ > return p/sizescale; >} > >struct environment; > >hunits env_digit_width(environment *); >hunits env_space_width(environment *); >hunits env_sentence_space_width(environment *); >hunits env_narrow_space_width(environment *); >hunits env_half_narrow_space_width(environment *); > >struct tab; > >enum tab_type { TAB_NONE, TAB_LEFT, TAB_CENTER, TAB_RIGHT }; > >class tab_stops { > tab *initial_list; > tab *repeated_list; >public: > tab_stops(); > tab_stops(hunits distance, tab_type type); > tab_stops(const tab_stops &); > ~tab_stops(); > void operator=(const tab_stops &); > tab_type distance_to_next_tab(hunits pos, hunits *distance); > tab_type distance_to_next_tab(hunits curpos, hunits *distance, hunits *leftpos); > void clear(); > void add_tab(hunits pos, tab_type type, int repeated); > const char *to_string(); >}; > >const unsigned MARGIN_CHARACTER_ON = 1; >const unsigned MARGIN_CHARACTER_NEXT = 2; > >struct charinfo; >struct node; >struct breakpoint; >struct font_family; >struct pending_output_line; > >class environment { > int dummy; > hunits prev_line_length; > hunits line_length; > hunits prev_title_length; > hunits title_length; > font_size prev_size; > font_size size; > int requested_size; > int prev_requested_size; > int char_height; > int char_slant; > int prev_fontno; > int fontno; > font_family *prev_family; > font_family *family; > int space_size; > int sentence_space_size; > int adjust_mode; > int fill; > int interrupted; > int prev_line_interrupted; > int center_lines; > int right_justify_lines; > vunits prev_vertical_spacing; > vunits vertical_spacing; > vunits prev_post_vertical_spacing; > vunits post_vertical_spacing; > int prev_line_spacing; > int line_spacing; > hunits prev_indent; > hunits indent; > hunits temporary_indent; > int have_temporary_indent; > hunits saved_indent; > hunits target_text_length; > int pre_underline_fontno; > int underline_lines; > int underline_spaces; > symbol input_trap; > int input_trap_count; > int continued_input_trap; > node *line; > hunits prev_text_length; > hunits width_total; > int space_total; > hunits input_line_start; > tab_stops tabs; > node *tab_contents; > hunits tab_width; > hunits tab_distance; > int line_tabs; > tab_type current_tab; > node *leader_node; > charinfo *tab_char; > charinfo *leader_char; > int current_field; > hunits field_distance; > hunits pre_field_width; > int field_spaces; > int tab_field_spaces; > int tab_precedes_field; > int discarding; > int spread_flag; > unsigned margin_character_flags; > node *margin_character_node; > hunits margin_character_distance; > node *numbering_nodes; > hunits line_number_digit_width; > int number_text_separation; > int line_number_indent; > int line_number_multiple; > int no_number_count; > unsigned hyphenation_flags; > int hyphen_line_count; > int hyphen_line_max; > hunits hyphenation_space; > hunits hyphenation_margin; > int composite; > pending_output_line *pending_lines; > > > > int ignore_next_eol; > int emitted_node; > color *glyph_color; > color *prev_glyph_color; > color *fill_color; > color *prev_fill_color; > > tab_type distance_to_next_tab(hunits *); > tab_type distance_to_next_tab(hunits *distance, hunits *leftpos); > void start_line(); > void output_line(node *, hunits); > void output(node *nd, int retain_size, vunits vs, vunits post_vs, > hunits width); > void output_title(node *nd, int retain_size, vunits vs, vunits post_vs, > hunits width); > > > > breakpoint *choose_breakpoint(); > void hyphenate_line(int start_here = 0); > void start_field(); > void wrap_up_field(); > void add_padding(); > node *make_tab_node(hunits d, node *next = 0); > node *get_prev_char(); >public: > const symbol name; > unsigned char control_char; > unsigned char no_break_control_char; > charinfo *hyphen_indicator_char; > > environment(symbol); > environment(const environment *); > ~environment(); > void copy(const environment *); > int is_dummy() { return dummy; } > int is_empty(); > int is_composite() { return composite; } > void set_composite() { composite = 1; } > vunits get_vertical_spacing(); > vunits get_post_vertical_spacing(); > int get_line_spacing(); > vunits total_post_vertical_spacing(); > int get_point_size() { return size.to_scaled_points(); } > font_size get_font_size() { return size; } > int get_size() { return size.to_units(); } > int get_requested_point_size() { return requested_size; } > int get_char_height() { return char_height; } > int get_char_slant() { return char_slant; } > hunits get_digit_width(); > int get_font() { return fontno; }; > font_family *get_family() { return family; } > int get_bold(); > int get_adjust_mode(); > int get_fill(); > hunits get_indent(); > hunits get_temporary_indent(); > hunits get_line_length(); > hunits get_saved_line_length(); > hunits get_saved_indent(); > hunits get_title_length(); > hunits get_prev_char_width(); > hunits get_prev_char_skew(); > vunits get_prev_char_height(); > vunits get_prev_char_depth(); > hunits get_text_length(); > hunits get_prev_text_length(); > hunits get_space_width() { return env_space_width(this); } > int get_space_size() { return space_size; } > int get_sentence_space_size() { return sentence_space_size; } > hunits get_narrow_space_width() { return env_narrow_space_width(this); } > hunits get_half_narrow_space_width() > { return env_half_narrow_space_width(this); } > hunits get_input_line_position(); > const char *get_tabs(); > int get_line_tabs(); > int get_hyphenation_flags(); > int get_hyphen_line_max(); > int get_hyphen_line_count(); > hunits get_hyphenation_space(); > hunits get_hyphenation_margin(); > int get_center_lines(); > int get_right_justify_lines(); > int get_prev_line_interrupted() { return prev_line_interrupted; } > color *get_fill_color(); > color *get_glyph_color(); > color *get_prev_glyph_color(); > color *get_prev_fill_color(); > void set_glyph_color(color *c); > void set_fill_color(color *c); > node *make_char_node(charinfo *); > node *extract_output_line(); > void width_registers(); > void wrap_up_tab(); > void set_font(int); > void set_font(symbol); > void set_family(symbol); > void set_size(int); > void set_char_height(int); > void set_char_slant(int); > void set_input_line_position(hunits); > void interrupt(); > void spread() { spread_flag = 1; } > void possibly_break_line(int start_here = 0, int forced = 0); > void do_break(int spread = 0); > void final_break(); > void add_html_tag(int, const char *); > void add_html_tag(int, const char *, int); > void add_html_tag_tabs(int); > node *make_html_tag(const char *name, int i); > node *make_html_tag(const char *); > void newline(); > void handle_tab(int is_leader = 0); > void add_node(node *); > void add_char(charinfo *); > void add_hyphen_indicator(); > void add_italic_correction(); > void space(); > void space(hunits, hunits); > void space_newline(); > const char *get_font_family_string(); > const char *get_font_name_string(); > const char *get_name_string(); > const char *get_point_size_string(); > const char *get_requested_point_size_string(); > void output_pending_lines(); > > friend void title_length(); > friend void space_size(); > friend void fill(); > friend void no_fill(); > friend void adjust(); > friend void no_adjust(); > friend void center(); > friend void right_justify(); > friend void vertical_spacing(); > friend void post_vertical_spacing(); > friend void line_spacing(); > friend void line_length(); > friend void indent(); > friend void temporary_indent(); > friend void do_underline(int); > friend void do_input_trap(int); > friend void set_tabs(); > friend void margin_character(); > friend void no_number(); > friend void number_lines(); > friend void leader_character(); > friend void tab_character(); > friend void hyphenate_request(); > friend void no_hyphenate(); > friend void hyphen_line_max_request(); > friend void hyphenation_space_request(); > friend void hyphenation_margin_request(); > friend void line_width(); > > > > > friend void line_tabs_request(); > friend void title(); > > > > > friend void do_divert(int append, int boxing); >}; > >extern environment *curenv; >extern void pop_env(); >extern void push_env(int); > >void init_environments(); >void read_hyphen_file(const char *name); >void title(); > >extern double spread_limit; > >extern int break_flag; >extern symbol default_family; >extern int translate_space_to_dummy; > >extern unsigned char hpf_code_table[]; ># 32 "node.cc" 2 ># 1 "request.h" 1 ># 22 "request.h" >typedef void (*REQUEST_FUNCP)(); > >class macro; > >class request_or_macro : public object { >public: > request_or_macro(); > virtual void invoke(symbol s) = 0; > virtual macro *to_macro(); >}; > >class request : public request_or_macro { > REQUEST_FUNCP p; >public: > void invoke(symbol); > request(REQUEST_FUNCP); >}; > >void delete_request_or_macro(request_or_macro *); > >extern object_dictionary request_dictionary; > >struct macro_header; >struct node; > >class macro : public request_or_macro { > macro_header *p; > const char *filename; > int lineno; > int len; > int empty_macro; >public: > macro(); > ~macro(); > macro(const macro &); > macro &operator=(const macro &); > void append(unsigned char); > void append(node *); > void append_unsigned(unsigned int i); > void append_int(int i); > void append_str(const char *); > void set(unsigned char, int); > unsigned char get(int); > int length(); > void invoke(symbol); > macro *to_macro(); > void print_size(); > int empty(); > friend class string_iterator; > friend void chop_macro(); > friend void substring_request(); > friend int operator==(const macro &, const macro &); >}; > >extern void init_input_requests(); >extern void init_markup_requests(); >extern void init_div_requests(); >extern void init_node_requests(); >extern void init_reg_requests(); >extern void init_env_requests(); >extern void init_hyphen_requests(); >extern void init_request(const char *s, REQUEST_FUNCP f); > >class charinfo; >class environment; > >node *charinfo_to_node_list(charinfo *, const environment *); ># 33 "node.cc" 2 ># 1 "node.h" 1 ># 23 "node.h" >struct hyphen_list { > unsigned char hyphen; > unsigned char breakable; > unsigned char hyphenation_code; > hyphen_list *next; > hyphen_list(unsigned char code, hyphen_list *p = 0); >}; > >void hyphenate(hyphen_list *, unsigned); > >enum hyphenation_type { HYPHEN_MIDDLE, HYPHEN_BOUNDARY, HYPHEN_INHIBIT }; > >class ascii_output_file; > >struct breakpoint; >struct vertical_size; >struct charinfo; > >class macro; > >class troff_output_file; >class tfont; >class environment; > >class glyph_node; >class diverted_space_node; >class token_node; > >struct node { > node *next; > node *last; > node(); > node(node *n); > node *add_char(charinfo *c, environment *, hunits *widthp, int *spacep); > > virtual ~node(); > virtual node *copy() = 0; > virtual int set_unformat_flag(); > virtual int force_tprint() = 0; > virtual hunits width(); > virtual hunits subscript_correction(); > virtual hunits italic_correction(); > virtual hunits left_italic_correction(); > virtual hunits skew(); > virtual int nspaces(); > virtual int merge_space(hunits, hunits, hunits); > virtual vunits vertical_width(); > virtual node *last_char_node(); > virtual void vertical_extent(vunits *min, vunits *max); > virtual int character_type(); > virtual void set_vertical_size(vertical_size *); > virtual int ends_sentence(); > virtual node *merge_self(node *); > virtual node *add_discretionary_hyphen(); > virtual node *add_self(node *, hyphen_list **); > virtual hyphen_list *get_hyphen_list(hyphen_list *s = 0); > virtual void ascii_print(ascii_output_file *); > virtual void asciify(macro *); > virtual int discardable(); > virtual void spread_space(int *, hunits *); > virtual void freeze_space(); > virtual void is_escape_colon(); > virtual breakpoint *get_breakpoints(hunits width, int nspaces, > breakpoint *rest = 0, > int is_inner = 0); > virtual int nbreaks(); > virtual void split(int, node **, node **); > virtual hyphenation_type get_hyphenation_type(); > virtual int reread(int *); > virtual token_node *get_token_node(); > virtual int overlaps_vertically(); > virtual int overlaps_horizontally(); > virtual units size(); > virtual int interpret(macro *); > > virtual node *merge_glyph_node(glyph_node *); > virtual tfont *get_tfont(); > virtual color *get_glyph_color(); > virtual color *get_fill_color(); > virtual void tprint(troff_output_file *); > virtual void zero_width_tprint(troff_output_file *); > > node *add_italic_correction(hunits *); > > virtual int same(node *) = 0; > virtual const char *type() = 0; >}; > >inline node::node() >: next(0), last(0) >{ >} > >inline node::node(node *n) >: next(n), last(0) >{ >} > >inline node::~node() >{ >} > > > >int node_list_ends_sentence(node *); > >struct breakpoint { > breakpoint *next; > hunits width; > int nspaces; > node *nd; > int index; > char hyphenated; >}; > >class line_start_node : public node { >public: > line_start_node() {} > node *copy() { return new line_start_node; } > int same(node *); > int force_tprint(); > const char *type(); > void asciify(macro *); >}; > >class space_node : public node { >private: > > > > > >protected: > hunits n; > char set; > char was_escape_colon; > color *col; > space_node(hunits, int, int, color *, node * = 0); >public: > space_node(hunits, color *, node * = 0); > > > > > node *copy(); > int nspaces(); > hunits width(); > int discardable(); > int merge_space(hunits, hunits, hunits); > void freeze_space(); > void is_escape_colon(); > void spread_space(int *, hunits *); > void tprint(troff_output_file *); > breakpoint *get_breakpoints(hunits width, int nspaces, breakpoint *rest = 0, > int is_inner = 0); > int nbreaks(); > void split(int, node **, node **); > void ascii_print(ascii_output_file *); > int same(node *); > void asciify(macro *); > const char *type(); > int force_tprint(); > hyphenation_type get_hyphenation_type(); >}; > >struct width_list { > hunits width; > hunits sentence_width; > width_list *next; > width_list(hunits, hunits); > width_list(width_list *); >}; > >class word_space_node : public space_node { >protected: > width_list *orig_width; > unsigned char unformat; > word_space_node(hunits, int, color *, width_list *, int, node * = 0); >public: > word_space_node(hunits, color *, width_list *, node * = 0); > ~word_space_node(); > node *copy(); > int reread(int *); > int set_unformat_flag(); > void tprint(troff_output_file *); > int same(node *); > void asciify(macro *); > const char *type(); > int merge_space(hunits, hunits, hunits); > int force_tprint(); >}; > >class unbreakable_space_node : public word_space_node { > unbreakable_space_node(hunits, int, color *, node * = 0); >public: > unbreakable_space_node(hunits, color *, node * = 0); > node *copy(); > int reread(int *); > int same(node *); > void asciify(macro *); > const char *type(); > int force_tprint(); > breakpoint *get_breakpoints(hunits width, int nspaces, breakpoint *rest = 0, > int is_inner = 0); > int nbreaks(); > void split(int, node **, node **); > int merge_space(hunits, hunits, hunits); > node *add_self(node *, hyphen_list **); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > hyphenation_type get_hyphenation_type(); >}; > >class diverted_space_node : public node { >public: > vunits n; > diverted_space_node(vunits d, node *p = 0); > node *copy(); > int reread(int *); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class diverted_copy_file_node : public node { > symbol filename; >public: > vunits n; > diverted_copy_file_node(symbol s, node *p = 0); > node *copy(); > int reread(int *); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class extra_size_node : public node { > vunits n; >public: > extra_size_node(vunits i) : n(i) {} > void set_vertical_size(vertical_size *); > node *copy(); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class vertical_size_node : public node { > vunits n; >public: > vertical_size_node(vunits i) : n(i) {} > void set_vertical_size(vertical_size *); > void asciify(macro *); > node *copy(); > int set_unformat_flag(); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class hmotion_node : public node { >protected: > hunits n; > unsigned char was_tab; > unsigned char unformat; > color *col; >public: > hmotion_node(hunits i, color *c, node *next = 0) > : node(next), n(i), was_tab(0), unformat(0), col(c) {} > hmotion_node(hunits i, int flag1, int flag2, color *c, node *next = 0) > : node(next), n(i), was_tab(flag1), unformat(flag2), col(c) {} > node *copy(); > int reread(int *); > int set_unformat_flag(); > void asciify(macro *); > void tprint(troff_output_file *); > hunits width(); > void ascii_print(ascii_output_file *); > int same(node *); > const char *type(); > int force_tprint(); > node *add_self(node *, hyphen_list **); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > hyphenation_type get_hyphenation_type(); >}; > >class space_char_hmotion_node : public hmotion_node { >public: > space_char_hmotion_node(hunits, color *, node * = 0); > node *copy(); > void ascii_print(ascii_output_file *); > void asciify(macro *); > int same(node *); > const char *type(); > int force_tprint(); > node *add_self(node *, hyphen_list **); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > hyphenation_type get_hyphenation_type(); >}; > >class vmotion_node : public node { > vunits n; > color *col; >public: > vmotion_node(vunits i, color *c) : n(i), col(c) {} > void tprint(troff_output_file *); > node *copy(); > vunits vertical_width(); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class hline_node : public node { > hunits x; > node *n; >public: > hline_node(hunits i, node *c, node *next = 0) : node(next), x(i), n(c) {} > ~hline_node(); > node *copy(); > hunits width(); > void tprint(troff_output_file *); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class vline_node : public node { > vunits x; > node *n; >public: > vline_node(vunits i, node *c, node *next= 0) : node(next), x(i), n(c) {} > ~vline_node(); > node *copy(); > void tprint(troff_output_file *); > hunits width(); > vunits vertical_width(); > void vertical_extent(vunits *, vunits *); > int same(node *); > const char *type(); > int force_tprint(); >}; > > >class dummy_node : public node { >public: > dummy_node(node *nd = 0) : node(nd) {} > node *copy(); > int same(node *); > const char *type(); > int force_tprint(); > hyphenation_type get_hyphenation_type(); >}; > >class transparent_dummy_node : public node { >public: > transparent_dummy_node(node *nd = 0) : node(nd) {} > node *copy(); > int same(node *); > const char *type(); > int force_tprint(); > int ends_sentence(); > hyphenation_type get_hyphenation_type(); >}; > >class zero_width_node : public node { > node *n; >public: > zero_width_node(node *gn); > ~zero_width_node(); > node *copy(); > void tprint(troff_output_file *); > int same(node *); > const char *type(); > int force_tprint(); > void append(node *); > int character_type(); > void vertical_extent(vunits *min, vunits *max); >}; > >class left_italic_corrected_node : public node { > node *n; > hunits x; >public: > left_italic_corrected_node(node * = 0); > ~left_italic_corrected_node(); > void tprint(troff_output_file *); > void ascii_print(ascii_output_file *); > void asciify(macro *); > node *copy(); > int same(node *); > const char *type(); > int force_tprint(); > hunits width(); > node *last_char_node(); > void vertical_extent(vunits *, vunits *); > int ends_sentence(); > int overlaps_horizontally(); > int overlaps_vertically(); > hyphenation_type get_hyphenation_type(); > tfont *get_tfont(); > int character_type(); > hunits skew(); > hunits italic_correction(); > hunits subscript_correction(); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > node *add_self(node *, hyphen_list **); > node *merge_glyph_node(glyph_node *); >}; > >class overstrike_node : public node { > node *list; > hunits max_width; >public: > overstrike_node(); > ~overstrike_node(); > node *copy(); > void tprint(troff_output_file *); > void overstrike(node *); > hunits width(); > int same(node *); > const char *type(); > int force_tprint(); > node *add_self(node *, hyphen_list **); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > hyphenation_type get_hyphenation_type(); >}; > >class bracket_node : public node { > node *list; > hunits max_width; >public: > bracket_node(); > ~bracket_node(); > node *copy(); > void tprint(troff_output_file *); > void bracket(node *); > hunits width(); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class special_node : public node { > macro mac; > tfont *tf; > color *gcol; > color *fcol; > int no_init_string; > void tprint_start(troff_output_file *); > void tprint_char(troff_output_file *, unsigned char); > void tprint_end(troff_output_file *); >public: > special_node(const macro &, int = 0); > special_node(const macro &, tfont *, color *, color *, int = 0); > node *copy(); > void tprint(troff_output_file *); > int same(node *); > const char *type(); > int force_tprint(); > int ends_sentence(); > tfont *get_tfont(); >}; > >class suppress_node : public node { > int is_on; > int emit_limits; > symbol filename; > char position; > int image_id; >public: > suppress_node(int, int); > suppress_node(symbol f, char p, int id); > suppress_node(int, int, symbol f, char p, int id); > node *copy(); > void tprint(troff_output_file *); > hunits width(); > int same(node *); > const char *type(); > int force_tprint(); >private: > void put(troff_output_file *out, const char *s); >}; > >struct hvpair { > hunits h; > vunits v; > hvpair(); >}; > >class draw_node : public node { > int npoints; > font_size sz; > color *gcol; > color *fcol; > char code; > hvpair *point; >public: > draw_node(char, hvpair *, int, font_size, color *, color *); > ~draw_node(); > hunits width(); > vunits vertical_width(); > node *copy(); > void tprint(troff_output_file *); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class charinfo; >node *make_node(charinfo *ci, environment *); >int character_exists(charinfo *, environment *); > >int same_node_list(node *n1, node *n2); >node *reverse_node_list(node *n); >void delete_node_list(node *); >node *copy_node_list(node *); > >int get_bold_fontno(int f); > >inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p) >: hyphen(0), breakable(0), hyphenation_code(code), next(p) >{ >} > >extern void read_desc(); >extern int mount_font(int n, symbol, symbol = NULL_SYMBOL); >extern void mount_style(int n, symbol); >extern int is_good_fontno(int n); >extern int symbol_fontno(symbol); >extern int next_available_font_position(); >extern void init_size_table(int *); >extern int get_underline_fontno(); > >class output_file { > char make_g_plus_plus_shut_up; >public: > output_file(); > virtual ~output_file(); > virtual void trailer(vunits page_length); > virtual void flush() = 0; > virtual void transparent_char(unsigned char) = 0; > virtual void print_line(hunits x, vunits y, node *n, > vunits before, vunits after, hunits width) = 0; > virtual void begin_page(int pageno, vunits page_length) = 0; > virtual void copy_file(hunits x, vunits y, const char *filename) = 0; > virtual int is_printing() = 0; > virtual void put_filename(const char *filename); > virtual void on(); > virtual void off(); > > > >}; > > >extern char *pipe_command; > > >extern output_file *the_output; >extern void init_output(); >int in_output_page_list(int n); > >class font_family { > int *map; > int map_size; >public: > const symbol nm; > font_family(symbol); > ~font_family(); > int make_definite(int); > static void invalidate_fontno(int); >}; > >font_family *lookup_family(symbol); >symbol get_font_name(int, environment *); ># 34 "node.cc" 2 ># 1 "token.h" 1 ># 23 "token.h" >struct charinfo; >struct node; >struct vunits; > >class token { > symbol nm; > node *nd; > unsigned char c; > int val; > units dim; > enum token_type { > TOKEN_BACKSPACE, > TOKEN_BEGIN_TRAP, > TOKEN_CHAR, > TOKEN_DUMMY, > TOKEN_EMPTY, > TOKEN_END_TRAP, > TOKEN_ESCAPE, > TOKEN_HYPHEN_INDICATOR, > TOKEN_INTERRUPT, > TOKEN_ITALIC_CORRECTION, > TOKEN_LEADER, > TOKEN_LEFT_BRACE, > TOKEN_MARK_INPUT, > TOKEN_NEWLINE, > TOKEN_NODE, > TOKEN_NUMBERED_CHAR, > TOKEN_PAGE_EJECTOR, > TOKEN_REQUEST, > TOKEN_RIGHT_BRACE, > TOKEN_SPACE, > TOKEN_SPECIAL, > TOKEN_SPREAD, > TOKEN_STRETCHABLE_SPACE, > TOKEN_UNSTRETCHABLE_SPACE, > TOKEN_TAB, > TOKEN_TRANSPARENT, > TOKEN_TRANSPARENT_DUMMY, > TOKEN_ZERO_WIDTH_BREAK, > TOKEN_EOF > } type; >public: > token(); > ~token(); > token(const token &); > void operator=(const token &); > void next(); > void process(); > void skip(); > int eof(); > int nspaces(); > int space(); > int stretchable_space(); > int unstretchable_space(); > int white_space(); > int special(); > int newline(); > int tab(); > int leader(); > int backspace(); > int delimiter(int warn = 0); > int dummy(); > int transparent_dummy(); > int transparent(); > int left_brace(); > int right_brace(); > int page_ejector(); > int hyphen_indicator(); > int zero_width_break(); > int operator==(const token &); > int operator!=(const token &); > unsigned char ch(); > charinfo *get_char(int required = 0); > int add_to_node_list(node **); > int title(); > void make_space(); > void make_newline(); > const char *description(); > > friend void process_input_stack(); >}; > >extern token tok; > >extern symbol get_name(int required = 0); >extern symbol get_long_name(int required = 0); >extern charinfo *get_optional_char(); >extern char *read_string(); >extern void check_missing_character(); >extern void skip_line(); >extern void handle_initial_title(); > >struct hunits; >extern void read_title_parts(node **part, hunits *part_width); > >extern int get_number_rigidly(units *result, unsigned char si); > >extern int get_number(units *result, unsigned char si); >extern int get_integer(int *result); > >extern int get_number(units *result, unsigned char si, units prev_value); >extern int get_integer(int *result, int prev_value); > >void interpolate_number_reg(symbol, int); > >const char *asciify(int c); > >inline int token::newline() >{ > return type == TOKEN_NEWLINE; >} > >inline int token::space() >{ > return type == TOKEN_SPACE; >} > >inline int token::stretchable_space() >{ > return type == TOKEN_STRETCHABLE_SPACE; >} > >inline int token::unstretchable_space() >{ > return type == TOKEN_UNSTRETCHABLE_SPACE; >} > >inline int token::special() >{ > return type == TOKEN_SPECIAL; >} > >inline int token::nspaces() >{ > if (type == TOKEN_SPACE) > return 1; > else > return 0; >} > >inline int token::white_space() >{ > return type == TOKEN_SPACE || type == TOKEN_TAB; >} > >inline int token::transparent() >{ > return type == TOKEN_TRANSPARENT; >} > >inline int token::page_ejector() >{ > return type == TOKEN_PAGE_EJECTOR; >} > >inline unsigned char token::ch() >{ > return type == TOKEN_CHAR ? c : 0; >} > >inline int token::eof() >{ > return type == TOKEN_EOF; >} > >inline int token::dummy() >{ > return type == TOKEN_DUMMY; >} > >inline int token::transparent_dummy() >{ > return type == TOKEN_TRANSPARENT_DUMMY; >} > >inline int token::left_brace() >{ > return type == TOKEN_LEFT_BRACE; >} > >inline int token::right_brace() >{ > return type == TOKEN_RIGHT_BRACE; >} > >inline int token::tab() >{ > return type == TOKEN_TAB; >} > >inline int token::leader() >{ > return type == TOKEN_LEADER; >} > >inline int token::backspace() >{ > return type == TOKEN_BACKSPACE; >} > >inline int token::hyphen_indicator() >{ > return type == TOKEN_HYPHEN_INDICATOR; >} > >inline int token::zero_width_break() >{ > return type == TOKEN_ZERO_WIDTH_BREAK; >} > >int has_arg(); ># 35 "node.cc" 2 ># 1 "charinfo.h" 1 ># 22 "charinfo.h" >class macro; > >class charinfo { > static int next_index; > charinfo *translation; > int index; > int number; > macro *mac; > unsigned char special_translation; > unsigned char hyphenation_code; > unsigned char flags; > unsigned char ascii_code; > unsigned char asciify_code; > char not_found; > char transparent_translate; > > char translate_input; > > char fallback; >public: > enum { > ENDS_SENTENCE = 1, > BREAK_BEFORE = 2, > BREAK_AFTER = 4, > OVERLAPS_HORIZONTALLY = 8, > OVERLAPS_VERTICALLY = 16, > TRANSPARENT = 32, > NUMBERED = 64 > }; > enum { > TRANSLATE_NONE, > TRANSLATE_SPACE, > TRANSLATE_DUMMY, > TRANSLATE_STRETCHABLE_SPACE, > TRANSLATE_HYPHEN_INDICATOR > }; > symbol nm; > charinfo(symbol s); > int get_index(); > int ends_sentence(); > int overlaps_vertically(); > int overlaps_horizontally(); > int can_break_before(); > int can_break_after(); > int transparent(); > unsigned char get_hyphenation_code(); > unsigned char get_ascii_code(); > unsigned char get_asciify_code(); > void set_hyphenation_code(unsigned char); > void set_ascii_code(unsigned char); > void set_asciify_code(unsigned char); > void set_translation_input(); > int get_translation_input(); > charinfo *get_translation(int = 0); > void set_translation(charinfo *, int, int); > void set_flags(unsigned char); > void set_special_translation(int, int); > int get_special_translation(int = 0); > macro *set_macro(macro *, int = 0); > macro *get_macro(); > int first_time_not_found(); > void set_number(int); > int get_number(); > int numbered(); > int is_fallback(); > symbol *get_symbol(); >}; > >charinfo *get_charinfo(symbol); >extern charinfo *charset_table[]; >charinfo *get_charinfo_by_number(int); > >inline int charinfo::overlaps_horizontally() >{ > return flags & OVERLAPS_HORIZONTALLY; >} > >inline int charinfo::overlaps_vertically() >{ > return flags & OVERLAPS_VERTICALLY; >} > >inline int charinfo::can_break_before() >{ > return flags & BREAK_BEFORE; >} > >inline int charinfo::can_break_after() >{ > return flags & BREAK_AFTER; >} > >inline int charinfo::ends_sentence() >{ > return flags & ENDS_SENTENCE; >} > >inline int charinfo::transparent() >{ > return flags & TRANSPARENT; >} > >inline int charinfo::numbered() >{ > return flags & NUMBERED; >} > >inline int charinfo::is_fallback() >{ > return fallback; >} > >inline charinfo *charinfo::get_translation(int transparent_throughput) >{ > return (transparent_throughput && !transparent_translate > ? 0 > : translation); >} > >inline unsigned char charinfo::get_hyphenation_code() >{ > return hyphenation_code; >} > >inline unsigned char charinfo::get_ascii_code() >{ > return ascii_code; >} > >inline unsigned char charinfo::get_asciify_code() >{ > return (translate_input ? asciify_code : 0); >} > >inline void charinfo::set_flags(unsigned char c) >{ > flags = c; >} > >inline int charinfo::get_index() >{ > return index; >} > >inline void charinfo::set_translation_input() >{ > translate_input = 1; >} > >inline int charinfo::get_translation_input() >{ > return translate_input; >} > >inline int charinfo::get_special_translation(int transparent_throughput) >{ > return (transparent_throughput && !transparent_translate > ? int(TRANSLATE_NONE) > : special_translation); >} > >inline macro *charinfo::get_macro() >{ > return mac; >} > >inline int charinfo::first_time_not_found() >{ > if (not_found) > return 0; > else { > not_found = 1; > return 1; > } >} > >inline symbol *charinfo::get_symbol() >{ > return( &nm ); >} ># 36 "node.cc" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/font.h" 1 ># 21 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/font.h" >typedef void (*FONT_COMMAND_HANDLER)(const char *, const char *, > const char *, int); > >struct font_kern_list; >struct font_char_metric; >struct font_widths_cache; > >class font { >public: > enum { > LIG_ff = 1, > LIG_fi = 2, > LIG_fl = 4, > LIG_ffi = 8, > LIG_ffl = 16 > }; > > virtual ~font(); > int contains(int index); > int is_special(); > int get_width(int index, int point_size); > int get_height(int index, int point_size); > int get_depth(int index, int point_size); > int get_space_width(int point_size); > int get_character_type(int index); > int get_kern(int index1, int index2, int point_size); > int get_skew(int index, int point_size, int slant); > int has_ligature(int); > int get_italic_correction(int index, int point_size); > int get_left_italic_correction(int index, int point_size); > int get_subscript_correction(int index, int point_size); > int get_code(int i); > const char *get_special_device_encoding(int index); > const char *get_name(); > const char *get_internal_name(); > > static int scan_papersize(const char *, const char **, double *, double *); > > static font *load_font(const char *, int *not_found = 0); > static void command_line_font_dir(const char *path); > static FILE *open_file(const char *name, char **pathp); > static int load_desc(); > static int name_to_index(const char *); > static int number_to_index(int); > static FONT_COMMAND_HANDLER > set_unknown_desc_command_handler(FONT_COMMAND_HANDLER); > > static int res; > static int hor; > static int vert; > static int unitwidth; > static int paperwidth; > static int paperlength; > static const char *papersize; > static int biggestfont; > static int spare2; > static int sizescale; > static int tcommand; > static int pass_filenames; > static int use_charnames_in_special; > > static const char **font_name_table; > static const char **style_table; > static const char *family; > static int *sizes; >private: > unsigned ligatures; > font_kern_list **kern_hash_table; > int space_width; > short *ch_index; > int nindices; > font_char_metric *ch; > int ch_used; > int ch_size; > int special; > char *name; > char *internalname; > double slant; > font_widths_cache *widths_cache; > static FONT_COMMAND_HANDLER unknown_desc_command_handler; > > enum { KERN_HASH_TABLE_SIZE = 503 }; > > void add_entry(int index, const font_char_metric &); > void copy_entry(int new_index, int old_index); > void add_kern(int index1, int index2, int amount); > static int hash_kern(int i1, int i2); > void alloc_ch_index(int); > void extend_ch(); > void compact(); > > static int scale(int w, int pointsize); > static int unit_scale(double *value, char unit); > virtual void handle_unknown_font_command(const char *command, > const char *arg, > const char *file, int lineno); >protected: > font(const char *); > int load(int *not_found = 0); >}; ># 37 "node.cc" 2 ># 1 "reg.h" 1 ># 23 "reg.h" >class reg : public object { >public: > virtual const char *get_string() = 0; > virtual int get_value(units *); > virtual void increment(); > virtual void decrement(); > virtual void set_increment(units); > virtual void alter_format(char f, int w = 0); > virtual const char *get_format(); > virtual void set_value(units); >}; > >class constant_int_reg : public reg { > int *p; >public: > constant_int_reg(int *); > const char *get_string(); >}; > >class general_reg : public reg { > char format; > int width; > int inc; >public: > general_reg(); > const char *get_string(); > void increment(); > void decrement(); > void alter_format(char f, int w = 0); > void set_increment(units); > const char *get_format(); > void add_value(units); > > void set_value(units) = 0; > int get_value(units *) = 0; >}; > >class variable_reg : public general_reg { > units *ptr; >public: > variable_reg(int *); > void set_value(units); > int get_value(units *); >}; > >extern object_dictionary number_reg_dictionary; >extern void set_number_reg(symbol nm, units n); >extern void check_output_limits(int x, int y); >extern void reset_output_registers (int miny); > >reg *lookup_number_reg(symbol); ># 38 "node.cc" 2 ># 1 "input.h" 1 ># 26 "input.h" >const int ESCAPE_QUESTION = 015; >const int BEGIN_TRAP = 016; >const int END_TRAP = 017; >const int PAGE_EJECTOR = 020; >const int ESCAPE_NEWLINE = 021; >const int ESCAPE_AMPERSAND = 022; >const int ESCAPE_UNDERSCORE = 023; >const int ESCAPE_BAR = 024; >const int ESCAPE_CIRCUMFLEX = 025; >const int ESCAPE_LEFT_BRACE = 026; >const int ESCAPE_RIGHT_BRACE = 027; >const int ESCAPE_LEFT_QUOTE = 030; >const int ESCAPE_RIGHT_QUOTE = 031; >const int ESCAPE_HYPHEN = 032; >const int ESCAPE_BANG = 033; >const int ESCAPE_c = 034; >const int ESCAPE_e = 035; >const int ESCAPE_PERCENT = 036; >const int ESCAPE_SPACE = 037; > >const int TITLE_REQUEST = 0200; >const int COPY_FILE_REQUEST = 0201; >const int TRANSPARENT_FILE_REQUEST = 0202; > > > >const int ESCAPE_E = 0204; >const int LAST_PAGE_EJECTOR = 0205; >const int ESCAPE_RIGHT_PARENTHESIS = 0206; >const int ESCAPE_TILDE = 0207; >const int ESCAPE_COLON = 0210; >const int COMPATIBLE_SAVE = 0211; >const int COMPATIBLE_RESTORE = 0212; ># 39 "node.cc" 2 ># 1 "div.h" 1 ># 21 "div.h" >class diversion { > friend void do_divert(int append, int boxing); > friend void end_diversions(); > diversion *prev; > node *saved_line; > hunits saved_width_total; > int saved_space_total; > hunits saved_saved_indent; > hunits saved_target_text_length; > int saved_prev_line_interrupted; >protected: > symbol nm; > vunits vertical_position; > vunits high_water_mark; >public: > int no_space_mode; > vunits marked_place; > diversion(symbol s = NULL_SYMBOL); > virtual ~diversion(); > virtual void output(node *nd, int retain_size, vunits vs, vunits post_vs, > hunits width) = 0; > virtual void transparent_output(unsigned char) = 0; > virtual void transparent_output(node *) = 0; > virtual void space(vunits distance, int forced = 0) = 0; > > > > vunits get_vertical_position() { return vertical_position; } > vunits get_high_water_mark() { return high_water_mark; } > virtual vunits distance_to_next_trap() = 0; > void need(vunits); > const char *get_diversion_name() { return nm.contents(); } > virtual void set_diversion_trap(symbol, vunits) = 0; > virtual void clear_diversion_trap() = 0; > virtual void copy_file(const char *filename) = 0; >}; > >class macro; > >class macro_diversion : public diversion { > macro *mac; > hunits max_width; > symbol diversion_trap; > vunits diversion_trap_pos; >public: > macro_diversion(symbol, int); > ~macro_diversion(); > void output(node *nd, int retain_size, vunits vs, vunits post_vs, > hunits width); > void transparent_output(unsigned char); > void transparent_output(node *); > void space(vunits distance, int forced = 0); > > > > vunits distance_to_next_trap(); > void set_diversion_trap(symbol, vunits); > void clear_diversion_trap(); > void copy_file(const char *filename); >}; > >struct trap { > trap *next; > vunits position; > symbol nm; > trap(symbol, vunits, trap *); >}; > >struct output_file; > >class top_level_diversion : public diversion { > int page_number; > int page_count; > int last_page_count; > vunits page_length; > hunits prev_page_offset; > hunits page_offset; > trap *page_trap_list; > trap *find_next_trap(vunits *); > int have_next_page_number; > int next_page_number; > int ejecting_page; >public: > int before_first_page; > top_level_diversion(); > void output(node *nd, int retain_size, vunits vs, vunits post_vs, > hunits width); > void transparent_output(unsigned char); > void transparent_output(node *); > void space(vunits distance, int forced = 0); > > > > hunits get_page_offset() { return page_offset; } > vunits get_page_length() { return page_length; } > vunits distance_to_next_trap(); > void add_trap(symbol nm, vunits pos); > void change_trap(symbol nm, vunits pos); > void remove_trap(symbol); > void remove_trap_at(vunits pos); > void print_traps(); > int get_page_count() { return page_count; } > int get_page_number() { return page_number; } > int get_next_page_number(); > void set_page_number(int n) { page_number = n; } > int begin_page(); > void set_next_page_number(int); > void set_page_length(vunits); > void copy_file(const char *filename); > int get_ejecting() { return ejecting_page; } > void set_ejecting() { ejecting_page = 1; } > friend void page_offset(); > void set_diversion_trap(symbol, vunits); > void clear_diversion_trap(); > void set_last_page() { last_page_count = page_count; } >}; > >extern top_level_diversion *topdiv; >extern diversion *curdiv; > >extern int exit_started; >extern int done_end_macro; >extern int last_page_number; >extern int seen_last_page_ejector; > >void spring_trap(symbol); >extern int trap_sprung_flag; >void postpone_traps(); >int unpostpone_traps(); > >void push_page_ejector(); >void continue_page_eject(); >void handle_first_page_transition(); >void blank_line(); >void begin_page(); >void end_diversions(); > >extern void cleanup_and_exit(int); ># 40 "node.cc" 2 ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/geometry.h" 1 ># 21 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/geometry.h" >int adjust_arc_center(const int *, double *); >void check_output_arc_limits(int x, int y, > int xv1, int yv1, > int xv2, int yv2, > double c0, double c1, > int *minx, int *maxx, > int *miny, int *maxy); ># 41 "node.cc" 2 > ># 1 "/var/tmp/portage/groff-1.18.1-r4/work/groff-1.18.1/src/include/nonposix.h" 1 ># 43 "node.cc" 2 > > > ># 1 "/usr/include/sys/wait.h" 1 3 4 ># 28 "/usr/include/sys/wait.h" 3 4 >extern "C" { > ># 1 "/usr/include/signal.h" 1 3 4 ># 31 "/usr/include/signal.h" 3 4 >extern "C" { > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 103 "/usr/include/bits/sigset.h" 3 4 >extern int __sigismember (__const __sigset_t *, int); >extern int __sigaddset (__sigset_t *, int); >extern int __sigdelset (__sigset_t *, int); ># 117 "/usr/include/bits/sigset.h" 3 4 >extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } >extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } >extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } ># 34 "/usr/include/signal.h" 2 3 4 > > > > > > > >typedef __sig_atomic_t sig_atomic_t; > ># 58 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/signum.h" 1 3 4 ># 59 "/usr/include/signal.h" 2 3 4 ># 73 "/usr/include/signal.h" 3 4 >typedef void (*__sighandler_t) (int); > > > > >extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) > throw (); > >extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) > throw (); > > > > > > > >extern __sighandler_t signal (int __sig, __sighandler_t __handler) throw (); ># 102 "/usr/include/signal.h" 3 4 > > > > > >extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) throw (); > > > > > > >extern int kill (__pid_t __pid, int __sig) throw (); > > > > > > >extern int killpg (__pid_t __pgrp, int __sig) throw (); > > > > >extern int raise (int __sig) throw (); > > > > >extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) throw (); >extern int gsignal (int __sig) throw (); > > > > >extern void psignal (int __sig, __const char *__s); ># 149 "/usr/include/signal.h" 3 4 >extern int __sigpause (int __sig_or_mask, int __is_sig); > > > > >extern int sigpause (int __mask) throw (); ># 177 "/usr/include/signal.h" 3 4 >extern int sigblock (int __mask) throw (); > > >extern int sigsetmask (int __mask) throw (); > > >extern int siggetmask (void) throw (); ># 192 "/usr/include/signal.h" 3 4 >typedef __sighandler_t sighandler_t; > > > > >typedef __sighandler_t sig_t; ># 208 "/usr/include/signal.h" 3 4 ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 26 "/usr/include/bits/siginfo.h" 2 3 4 > > > > > > > >typedef union sigval > { > int sival_int; > void *sival_ptr; > } sigval_t; ># 51 "/usr/include/bits/siginfo.h" 3 4 >typedef struct siginfo > { > int si_signo; > int si_errno; > > int si_code; > > union > { > int _pad[((128 / sizeof (int)) - 3)]; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > } _kill; > > > struct > { > int si_tid; > int si_overrun; > sigval_t si_sigval; > } _timer; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > sigval_t si_sigval; > } _rt; > > > struct > { > __pid_t si_pid; > __uid_t si_uid; > int si_status; > __clock_t si_utime; > __clock_t si_stime; > } _sigchld; > > > struct > { > void *si_addr; > } _sigfault; > > > struct > { > long int si_band; > int si_fd; > } _sigpoll; > } _sifields; > } siginfo_t; ># 129 "/usr/include/bits/siginfo.h" 3 4 >enum >{ > SI_ASYNCNL = -60, > > SI_TKILL = -6, > > SI_SIGIO, > > SI_ASYNCIO, > > SI_MESGQ, > > SI_TIMER, > > SI_QUEUE, > > SI_USER, > > SI_KERNEL = 0x80 > >}; > > > >enum >{ > ILL_ILLOPC = 1, > > ILL_ILLOPN, > > ILL_ILLADR, > > ILL_ILLTRP, > > ILL_PRVOPC, > > ILL_PRVREG, > > ILL_COPROC, > > ILL_BADSTK > >}; > > >enum >{ > FPE_INTDIV = 1, > > FPE_INTOVF, > > FPE_FLTDIV, > > FPE_FLTOVF, > > FPE_FLTUND, > > FPE_FLTRES, > > FPE_FLTINV, > > FPE_FLTSUB > >}; > > >enum >{ > SEGV_MAPERR = 1, > > SEGV_ACCERR > >}; > > >enum >{ > BUS_ADRALN = 1, > > BUS_ADRERR, > > BUS_OBJERR > >}; > > >enum >{ > TRAP_BRKPT = 1, > > TRAP_TRACE > >}; > > >enum >{ > CLD_EXITED = 1, > > CLD_KILLED, > > CLD_DUMPED, > > CLD_TRAPPED, > > CLD_STOPPED, > > CLD_CONTINUED > >}; > > >enum >{ > POLL_IN = 1, > > POLL_OUT, > > POLL_MSG, > > POLL_ERR, > > POLL_PRI, > > POLL_HUP > >}; ># 273 "/usr/include/bits/siginfo.h" 3 4 >typedef struct sigevent > { > sigval_t sigev_value; > int sigev_signo; > int sigev_notify; > > union > { > int _pad[((64 / sizeof (int)) - 3)]; > > > > __pid_t _tid; > > struct > { > void (*_function) (sigval_t); > void *_attribute; > } _sigev_thread; > } _sigev_un; > } sigevent_t; > > > > > > >enum >{ > SIGEV_SIGNAL = 0, > > SIGEV_NONE, > > SIGEV_THREAD, > > > SIGEV_THREAD_ID = 4 > >}; ># 209 "/usr/include/signal.h" 2 3 4 > > > >extern int sigemptyset (sigset_t *__set) throw (); > > >extern int sigfillset (sigset_t *__set) throw (); > > >extern int sigaddset (sigset_t *__set, int __signo) throw (); > > >extern int sigdelset (sigset_t *__set, int __signo) throw (); > > >extern int sigismember (__const sigset_t *__set, int __signo) throw (); > > > >extern int sigisemptyset (__const sigset_t *__set) throw (); > > >extern int sigandset (sigset_t *__set, __const sigset_t *__left, > __const sigset_t *__right) throw (); > > >extern int sigorset (sigset_t *__set, __const sigset_t *__left, > __const sigset_t *__right) throw (); > > > > ># 1 "/usr/include/bits/sigaction.h" 1 3 4 ># 25 "/usr/include/bits/sigaction.h" 3 4 >struct sigaction > { > > > union > { > > __sighandler_t sa_handler; > > void (*sa_sigaction) (int, siginfo_t *, void *); > } > __sigaction_handler; > > > > > > > > __sigset_t sa_mask; > > > int sa_flags; > > > void (*sa_restorer) (void); > }; ># 242 "/usr/include/signal.h" 2 3 4 > > >extern int sigprocmask (int __how, __const sigset_t *__restrict __set, > sigset_t *__restrict __oset) throw (); > > > > > > >extern int sigsuspend (__const sigset_t *__set); > > >extern int sigaction (int __sig, __const struct sigaction *__restrict __act, > struct sigaction *__restrict __oact) throw (); > > >extern int sigpending (sigset_t *__set) throw (); > > > > > > >extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig); > > > > > > >extern int sigwaitinfo (__const sigset_t *__restrict __set, > siginfo_t *__restrict __info); > > > > > > >extern int sigtimedwait (__const sigset_t *__restrict __set, > siginfo_t *__restrict __info, > __const struct timespec *__restrict __timeout); > > > >extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) > throw (); ># 297 "/usr/include/signal.h" 3 4 >extern __const char *__const _sys_siglist[65]; >extern __const char *__const sys_siglist[65]; > > >struct sigvec > { > __sighandler_t sv_handler; > int sv_mask; > > int sv_flags; > > }; ># 321 "/usr/include/signal.h" 3 4 >extern int sigvec (int __sig, __const struct sigvec *__vec, > struct sigvec *__ovec) throw (); > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 28 "/usr/include/bits/sigcontext.h" 3 4 ># 1 "/usr/include/asm/sigcontext.h" 1 3 4 ># 18 "/usr/include/asm/sigcontext.h" 3 4 >struct _fpreg { > unsigned short significand[4]; > unsigned short exponent; >}; > >struct _fpxreg { > unsigned short significand[4]; > unsigned short exponent; > unsigned short padding[3]; >}; > >struct _xmmreg { > unsigned long element[4]; >}; > >struct _fpstate { > > unsigned long cw; > unsigned long sw; > unsigned long tag; > unsigned long ipoff; > unsigned long cssel; > unsigned long dataoff; > unsigned long datasel; > struct _fpreg _st[8]; > unsigned short status; > unsigned short magic; > > > unsigned long _fxsr_env[6]; > unsigned long mxcsr; > unsigned long reserved; > struct _fpxreg _fxsr_st[8]; > struct _xmmreg _xmm[8]; > unsigned long padding[56]; >}; > > > >struct sigcontext { > unsigned short gs, __gsh; > unsigned short fs, __fsh; > unsigned short es, __esh; > unsigned short ds, __dsh; > unsigned long edi; > unsigned long esi; > unsigned long ebp; > unsigned long esp; > unsigned long ebx; > unsigned long edx; > unsigned long ecx; > unsigned long eax; > unsigned long trapno; > unsigned long err; > unsigned long eip; > unsigned short cs, __csh; > unsigned long eflags; > unsigned long esp_at_signal; > unsigned short ss, __ssh; > struct _fpstate * fpstate; > unsigned long oldmask; > unsigned long cr2; >}; ># 29 "/usr/include/bits/sigcontext.h" 2 3 4 ># 327 "/usr/include/signal.h" 2 3 4 > > >extern int sigreturn (struct sigcontext *__scp) throw (); ># 339 "/usr/include/signal.h" 3 4 >extern int siginterrupt (int __sig, int __interrupt) throw (); > ># 1 "/usr/include/bits/sigstack.h" 1 3 4 ># 26 "/usr/include/bits/sigstack.h" 3 4 >struct sigstack > { > void *ss_sp; > int ss_onstack; > }; > > > >enum >{ > SS_ONSTACK = 1, > > SS_DISABLE > >}; ># 50 "/usr/include/bits/sigstack.h" 3 4 >typedef struct sigaltstack > { > void *ss_sp; > int ss_flags; > size_t ss_size; > } stack_t; ># 342 "/usr/include/signal.h" 2 3 4 > > ># 1 "/usr/include/sys/ucontext.h" 1 3 4 ># 23 "/usr/include/sys/ucontext.h" 3 4 ># 1 "/usr/include/signal.h" 1 3 4 ># 24 "/usr/include/sys/ucontext.h" 2 3 4 > > > ># 1 "/usr/include/bits/sigcontext.h" 1 3 4 ># 28 "/usr/include/sys/ucontext.h" 2 3 4 > > > >typedef int greg_t; > > > > > >typedef greg_t gregset_t[19]; > > > >enum >{ > REG_GS = 0, > > REG_FS, > > REG_ES, > > REG_DS, > > REG_EDI, > > REG_ESI, > > REG_EBP, > > REG_ESP, > > REG_EBX, > > REG_EDX, > > REG_ECX, > > REG_EAX, > > REG_TRAPNO, > > REG_ERR, > > REG_EIP, > > REG_CS, > > REG_EFL, > > REG_UESP, > > REG_SS > >}; > > > >struct _libc_fpreg >{ > unsigned short int significand[4]; > unsigned short int exponent; >}; > >struct _libc_fpstate >{ > unsigned long int cw; > unsigned long int sw; > unsigned long int tag; > unsigned long int ipoff; > unsigned long int cssel; > unsigned long int dataoff; > unsigned long int datasel; > struct _libc_fpreg _st[8]; > unsigned long int status; >}; > > >typedef struct _libc_fpstate *fpregset_t; > > >typedef struct > { > gregset_t gregs; > > > fpregset_t fpregs; > unsigned long int oldmask; > unsigned long int cr2; > } mcontext_t; > > >typedef struct ucontext > { > unsigned long int uc_flags; > struct ucontext *uc_link; > stack_t uc_stack; > mcontext_t uc_mcontext; > __sigset_t uc_sigmask; > struct _libc_fpstate __fpregs_mem; > } ucontext_t; ># 345 "/usr/include/signal.h" 2 3 4 > > > > > >extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) throw (); > > > >extern int sigaltstack (__const struct sigaltstack *__restrict __ss, > struct sigaltstack *__restrict __oss) throw (); > > > > > > > >extern int sighold (int __sig) throw (); > > >extern int sigrelse (int __sig) throw (); > > >extern int sigignore (int __sig) throw (); > > >extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); > > > > > ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 379 "/usr/include/signal.h" 2 3 4 ># 1 "/usr/include/bits/sigthread.h" 1 3 4 ># 31 "/usr/include/bits/sigthread.h" 3 4 >extern int pthread_sigmask (int __how, > __const __sigset_t *__restrict __newmask, > __sigset_t *__restrict __oldmask)throw (); > > >extern int pthread_kill (pthread_t __threadid, int __signo) throw (); ># 380 "/usr/include/signal.h" 2 3 4 > > > > > > >extern int __libc_current_sigrtmin (void) throw (); > >extern int __libc_current_sigrtmax (void) throw (); > > > >} ># 31 "/usr/include/sys/wait.h" 2 3 4 ># 1 "/usr/include/sys/resource.h" 1 3 4 ># 25 "/usr/include/sys/resource.h" 3 4 ># 1 "/usr/include/bits/resource.h" 1 3 4 ># 32 "/usr/include/bits/resource.h" 3 4 >enum __rlimit_resource >{ > > RLIMIT_CPU = 0, > > > > RLIMIT_FSIZE = 1, > > > > RLIMIT_DATA = 2, > > > > RLIMIT_STACK = 3, > > > > RLIMIT_CORE = 4, > > > > > > > RLIMIT_RSS = 5, > > > > RLIMIT_NOFILE = 7, > RLIMIT_OFILE = RLIMIT_NOFILE, > > > > > RLIMIT_AS = 9, > > > > RLIMIT_NPROC = 6, > > > > RLIMIT_MEMLOCK = 8, > > > > RLIMIT_LOCKS = 10, > > > RLIMIT_NLIMITS = 11, > RLIM_NLIMITS = RLIMIT_NLIMITS > > >}; ># 107 "/usr/include/bits/resource.h" 3 4 >typedef __rlim_t rlim_t; > > > > >typedef __rlim64_t rlim64_t; > > >struct rlimit > { > > rlim_t rlim_cur; > > rlim_t rlim_max; > }; > > >struct rlimit64 > { > > rlim64_t rlim_cur; > > rlim64_t rlim_max; > }; > > > >enum __rusage_who >{ > > RUSAGE_SELF = 0, > > > > RUSAGE_CHILDREN = -1, > > > > RUSAGE_BOTH = -2 > >}; > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 151 "/usr/include/bits/resource.h" 2 3 4 > > >struct rusage > { > > struct timeval ru_utime; > > struct timeval ru_stime; > > long int ru_maxrss; > > > long int ru_ixrss; > > long int ru_idrss; > > long int ru_isrss; > > > long int ru_minflt; > > long int ru_majflt; > > long int ru_nswap; > > > long int ru_inblock; > > long int ru_oublock; > > long int ru_msgsnd; > > long int ru_msgrcv; > > long int ru_nsignals; > > > > long int ru_nvcsw; > > > long int ru_nivcsw; > }; > > > > > > > >enum __priority_which >{ > PRIO_PROCESS = 0, > > PRIO_PGRP = 1, > > PRIO_USER = 2 > >}; ># 26 "/usr/include/sys/resource.h" 2 3 4 > > > > > > >extern "C" { ># 43 "/usr/include/sys/resource.h" 3 4 >typedef int __rlimit_resource_t; >typedef int __rusage_who_t; >typedef int __priority_which_t; > > > > > >extern int getrlimit (__rlimit_resource_t __resource, > struct rlimit *__rlimits) throw (); ># 63 "/usr/include/sys/resource.h" 3 4 >extern int getrlimit64 (__rlimit_resource_t __resource, > struct rlimit64 *__rlimits) throw (); > > > > > > >extern int setrlimit (__rlimit_resource_t __resource, > __const struct rlimit *__rlimits) throw (); ># 83 "/usr/include/sys/resource.h" 3 4 >extern int setrlimit64 (__rlimit_resource_t __resource, > __const struct rlimit64 *__rlimits) throw (); > > > > >extern int getrusage (__rusage_who_t __who, struct rusage *__usage) throw (); > > > > > >extern int getpriority (__priority_which_t __which, id_t __who) throw (); > > > >extern int setpriority (__priority_which_t __which, id_t __who, int __prio) > throw (); > >} ># 32 "/usr/include/sys/wait.h" 2 3 4 ># 98 "/usr/include/sys/wait.h" 3 4 >typedef enum >{ > P_ALL, > P_PID, > P_PGID >} idtype_t; ># 112 "/usr/include/sys/wait.h" 3 4 >extern __pid_t wait (void * __stat_loc); ># 135 "/usr/include/sys/wait.h" 3 4 >extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); > > > ># 1 "/usr/include/bits/siginfo.h" 1 3 4 ># 25 "/usr/include/bits/siginfo.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 26 "/usr/include/bits/siginfo.h" 2 3 4 ># 140 "/usr/include/sys/wait.h" 2 3 4 ># 151 "/usr/include/sys/wait.h" 3 4 >extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, > int __options); > > > > > >struct rusage; > > > > > > >extern __pid_t wait3 (void * __stat_loc, int __options, > struct rusage * __usage) throw (); > > > > > >struct rusage; > > >extern __pid_t wait4 (__pid_t __pid, void * __stat_loc, int __options, > struct rusage *__usage) throw (); > > > >} ># 47 "node.cc" 2 ># 66 "node.cc" >int image_no = 0; >static int suppress_start_page = 0; > > > >symbol HYPHEN_SYMBOL("hy"); > > >static charinfo *soft_hyphen_char; > >enum constant_space_type { > CONSTANT_SPACE_NONE, > CONSTANT_SPACE_RELATIVE, > CONSTANT_SPACE_ABSOLUTE > }; > >struct special_font_list { > int n; > special_font_list *next; >}; > >special_font_list *global_special_fonts; >static int global_ligature_mode = 1; >static int global_kern_mode = 1; > >class track_kerning_function { > int non_zero; > units min_size; > hunits min_amount; > units max_size; > hunits max_amount; >public: > track_kerning_function(); > track_kerning_function(units, hunits, units, hunits); > int operator==(const track_kerning_function &); > int operator!=(const track_kerning_function &); > hunits compute(int point_size); >}; > > > >struct conditional_bold { > conditional_bold *next; > int fontno; > hunits offset; > conditional_bold(int, hunits, conditional_bold * = 0); >}; > >struct tfont; > >class font_info { > tfont *last_tfont; > int number; > font_size last_size; > int last_height; > int last_slant; > symbol internal_name; > symbol external_name; > font *fm; > char is_bold; > hunits bold_offset; > track_kerning_function track_kern; > constant_space_type is_constant_spaced; > units constant_space; > int last_ligature_mode; > int last_kern_mode; > conditional_bold *cond_bold_list; > void flush(); >public: > special_font_list *sf; > font_info(symbol nm, int n, symbol enm, font *f); > int contains(charinfo *); > void set_bold(hunits); > void unbold(); > void set_conditional_bold(int, hunits); > void conditional_unbold(int); > void set_track_kern(track_kerning_function &); > void set_constant_space(constant_space_type, units = 0); > int is_named(symbol); > symbol get_name(); > tfont *get_tfont(font_size, int, int, int); > hunits get_space_width(font_size, int); > hunits get_narrow_space_width(font_size); > hunits get_half_narrow_space_width(font_size); > int get_bold(hunits *); > int is_special(); > int is_style(); > friend symbol get_font_name(int, environment *); >}; > >class tfont_spec { >protected: > symbol name; > int input_position; > font *fm; > font_size size; > char is_bold; > char is_constant_spaced; > int ligature_mode; > int kern_mode; > hunits bold_offset; > hunits track_kern; > hunits constant_space_width; > int height; > int slant; >public: > tfont_spec(symbol nm, int pos, font *, font_size, int, int); > tfont_spec(const tfont_spec &spec) { *this = spec; } > tfont_spec plain(); > int operator==(const tfont_spec &); > friend tfont *font_info::get_tfont(font_size fs, int, int, int); >}; > >class tfont : public tfont_spec { > static tfont *tfont_list; > tfont *next; > tfont *plain_version; >public: > tfont(tfont_spec &); > int contains(charinfo *); > hunits get_width(charinfo *c); > int get_bold(hunits *); > int get_constant_space(hunits *); > hunits get_track_kern(); > tfont *get_plain(); > font_size get_size(); > symbol get_name(); > charinfo *get_lig(charinfo *c1, charinfo *c2); > int get_kern(charinfo *c1, charinfo *c2, hunits *res); > int get_input_position(); > int get_character_type(charinfo *); > int get_height(); > int get_slant(); > vunits get_char_height(charinfo *); > vunits get_char_depth(charinfo *); > hunits get_char_skew(charinfo *); > hunits get_italic_correction(charinfo *); > hunits get_left_italic_correction(charinfo *); > hunits get_subscript_correction(charinfo *); > friend tfont *make_tfont(tfont_spec &); >}; > >inline int env_definite_font(environment *env) >{ > return env->get_family()->make_definite(env->get_font()); >} > > > >static font_info **font_table = 0; >static int font_table_size = 0; > >font_info::font_info(symbol nm, int n, symbol enm, font *f) >: last_tfont(0), number(n), last_size(0), > internal_name(nm), external_name(enm), fm(f), > is_bold(0), is_constant_spaced(CONSTANT_SPACE_NONE), last_ligature_mode(1), > last_kern_mode(1), cond_bold_list(0), sf(0) >{ >} > >inline int font_info::contains(charinfo *ci) >{ > return fm != 0 && fm->contains(ci->get_index()); >} > >inline int font_info::is_special() >{ > return fm != 0 && fm->is_special(); >} > >inline int font_info::is_style() >{ > return fm == 0; >} > >tfont *make_tfont(tfont_spec &spec) >{ > for (tfont *p = tfont::tfont_list; p; p = p->next) > if (*p == spec) > return p; > return new tfont(spec); >} > > > > >tfont *font_info::get_tfont(font_size fs, int height, int slant, int fontno) >{ > if (last_tfont == 0 || fs != last_size > || height != last_height || slant != last_slant > || global_ligature_mode != last_ligature_mode > || global_kern_mode != last_kern_mode > || fontno != number) { > font_info *f = font_table[fontno]; > tfont_spec spec(f->external_name, f->number, f->fm, fs, height, slant); > for (conditional_bold *p = cond_bold_list; p; p = p->next) > if (p->fontno == fontno) { > spec.is_bold = 1; > spec.bold_offset = p->offset; > break; > } > if (!spec.is_bold && is_bold) { > spec.is_bold = 1; > spec.bold_offset = bold_offset; > } > spec.track_kern = track_kern.compute(fs.to_scaled_points()); > spec.ligature_mode = global_ligature_mode; > spec.kern_mode = global_kern_mode; > switch (is_constant_spaced) { > case CONSTANT_SPACE_NONE: > break; > case CONSTANT_SPACE_ABSOLUTE: > spec.is_constant_spaced = 1; > spec.constant_space_width = constant_space; > break; > case CONSTANT_SPACE_RELATIVE: > spec.is_constant_spaced = 1; > spec.constant_space_width > = scale(constant_space*fs.to_scaled_points(), > units_per_inch, > 36*72*sizescale); > break; > default: > do_assert(0, 289, "node.cc"); > } > if (fontno != number) > return make_tfont(spec); > last_tfont = make_tfont(spec); > last_size = fs; > last_height = height; > last_slant = slant; > last_ligature_mode = global_ligature_mode; > last_kern_mode = global_kern_mode; > } > return last_tfont; >} > >int font_info::get_bold(hunits *res) >{ > if (is_bold) { > *res = bold_offset; > return 1; > } > else > return 0; >} > >void font_info::unbold() >{ > if (is_bold) { > is_bold = 0; > flush(); > } >} > >void font_info::set_bold(hunits offset) >{ > if (!is_bold || offset != bold_offset) { > is_bold = 1; > bold_offset = offset; > flush(); > } >} > >void font_info::set_conditional_bold(int fontno, hunits offset) >{ > for (conditional_bold *p = cond_bold_list; p; p = p->next) > if (p->fontno == fontno) { > if (offset != p->offset) { > p->offset = offset; > flush(); > } > return; > } > cond_bold_list = new conditional_bold(fontno, offset, cond_bold_list); >} > >conditional_bold::conditional_bold(int f, hunits h, conditional_bold *x) >: next(x), fontno(f), offset(h) >{ >} > >void font_info::conditional_unbold(int fontno) >{ > for (conditional_bold **p = &cond_bold_list; *p; p = &(*p)->next) > if ((*p)->fontno == fontno) { > conditional_bold *tem = *p; > *p = (*p)->next; > delete tem; > flush(); > return; > } >} > >void font_info::set_constant_space(constant_space_type type, units x) >{ > if (type != is_constant_spaced > || (type != CONSTANT_SPACE_NONE && x != constant_space)) { > flush(); > is_constant_spaced = type; > constant_space = x; > } >} > >void font_info::set_track_kern(track_kerning_function &tk) >{ > if (track_kern != tk) { > track_kern = tk; > flush(); > } >} > >void font_info::flush() >{ > last_tfont = 0; >} > >int font_info::is_named(symbol s) >{ > return internal_name == s; >} > >symbol font_info::get_name() >{ > return internal_name; >} > >symbol get_font_name(int fontno, environment *env) >{ > symbol f = font_table[fontno]->get_name(); > if (font_table[fontno]->is_style()) { > return concat(env->get_family()->nm, f); > } > return f; >} > >hunits font_info::get_space_width(font_size fs, int space_size) >{ > if (is_constant_spaced == CONSTANT_SPACE_NONE) > return scale(hunits(fm->get_space_width(fs.to_scaled_points())), > space_size, 12); > else if (is_constant_spaced == CONSTANT_SPACE_ABSOLUTE) > return constant_space; > else > return scale(constant_space*fs.to_scaled_points(), > units_per_inch, 36*72*sizescale); >} > >hunits font_info::get_narrow_space_width(font_size fs) >{ > charinfo *ci = get_charinfo(symbol("|")); > if (fm->contains(ci->get_index())) > return hunits(fm->get_width(ci->get_index(), fs.to_scaled_points())); > else > return hunits(fs.to_units()/6); >} > >hunits font_info::get_half_narrow_space_width(font_size fs) >{ > charinfo *ci = get_charinfo(symbol("^")); > if (fm->contains(ci->get_index())) > return hunits(fm->get_width(ci->get_index(), fs.to_scaled_points())); > else > return hunits(fs.to_units()/12); >} > > > >tfont_spec::tfont_spec(symbol nm, int n, font *f, > font_size s, int h, int sl) >: name(nm), input_position(n), fm(f), size(s), > is_bold(0), is_constant_spaced(0), ligature_mode(1), kern_mode(1), > height(h), slant(sl) >{ > if (height == size.to_scaled_points()) > height = 0; >} > >int tfont_spec::operator==(const tfont_spec &spec) >{ > if (fm == spec.fm > && size == spec.size > && input_position == spec.input_position > && name == spec.name > && height == spec.height > && slant == spec.slant > && (is_bold > ? (spec.is_bold && bold_offset == spec.bold_offset) > : !spec.is_bold) > && track_kern == spec.track_kern > && (is_constant_spaced > ? (spec.is_constant_spaced > && constant_space_width == spec.constant_space_width) > : !spec.is_constant_spaced) > && ligature_mode == spec.ligature_mode > && kern_mode == spec.kern_mode) > return 1; > else > return 0; >} > >tfont_spec tfont_spec::plain() >{ > return tfont_spec(name, input_position, fm, size, height, slant); >} > >hunits tfont::get_width(charinfo *c) >{ > if (is_constant_spaced) > return constant_space_width; > else if (is_bold) > return (hunits(fm->get_width(c->get_index(), size.to_scaled_points())) > + track_kern + bold_offset); > else > return (hunits(fm->get_width(c->get_index(), size.to_scaled_points())) > + track_kern); >} > >vunits tfont::get_char_height(charinfo *c) >{ > vunits v = fm->get_height(c->get_index(), size.to_scaled_points()); > if (height != 0 && height != size.to_scaled_points()) > return scale(v, height, size.to_scaled_points()); > else > return v; >} > >vunits tfont::get_char_depth(charinfo *c) >{ > vunits v = fm->get_depth(c->get_index(), size.to_scaled_points()); > if (height != 0 && height != size.to_scaled_points()) > return scale(v, height, size.to_scaled_points()); > else > return v; >} > >hunits tfont::get_char_skew(charinfo *c) >{ > return hunits(fm->get_skew(c->get_index(), size.to_scaled_points(), slant)); >} > >hunits tfont::get_italic_correction(charinfo *c) >{ > return hunits(fm->get_italic_correction(c->get_index(), size.to_scaled_points())); >} > >hunits tfont::get_left_italic_correction(charinfo *c) >{ > return hunits(fm->get_left_italic_correction(c->get_index(), > size.to_scaled_points())); >} > >hunits tfont::get_subscript_correction(charinfo *c) >{ > return hunits(fm->get_subscript_correction(c->get_index(), > size.to_scaled_points())); >} > >inline int tfont::get_input_position() >{ > return input_position; >} > >inline int tfont::contains(charinfo *ci) >{ > return fm->contains(ci->get_index()); >} > >inline int tfont::get_character_type(charinfo *ci) >{ > return fm->get_character_type(ci->get_index()); >} > >inline int tfont::get_bold(hunits *res) >{ > if (is_bold) { > *res = bold_offset; > return 1; > } > else > return 0; >} > >inline int tfont::get_constant_space(hunits *res) >{ > if (is_constant_spaced) { > *res = constant_space_width; > return 1; > } > else > return 0; >} > >inline hunits tfont::get_track_kern() >{ > return track_kern; >} > >inline tfont *tfont::get_plain() >{ > return plain_version; >} > >inline font_size tfont::get_size() >{ > return size; >} > >inline symbol tfont::get_name() >{ > return name; >} > >inline int tfont::get_height() >{ > return height; >} > >inline int tfont::get_slant() >{ > return slant; >} > >symbol SYMBOL_ff("ff"); >symbol SYMBOL_fi("fi"); >symbol SYMBOL_fl("fl"); >symbol SYMBOL_Fi("Fi"); >symbol SYMBOL_Fl("Fl"); > >charinfo *tfont::get_lig(charinfo *c1, charinfo *c2) >{ > if (ligature_mode == 0) > return 0; > charinfo *ci = 0; > if (c1->get_ascii_code() == 'f') { > switch (c2->get_ascii_code()) { > case 'f': > if (fm->has_ligature(font::LIG_ff)) > ci = get_charinfo(SYMBOL_ff); > break; > case 'i': > if (fm->has_ligature(font::LIG_fi)) > ci = get_charinfo(SYMBOL_fi); > break; > case 'l': > if (fm->has_ligature(font::LIG_fl)) > ci = get_charinfo(SYMBOL_fl); > break; > } > } > else if (ligature_mode != 2 && c1->nm == SYMBOL_ff) { > switch (c2->get_ascii_code()) { > case 'i': > if (fm->has_ligature(font::LIG_ffi)) > ci = get_charinfo(SYMBOL_Fi); > break; > case 'l': > if (fm->has_ligature(font::LIG_ffl)) > ci = get_charinfo(SYMBOL_Fl); > break; > } > } > if (ci != 0 && fm->contains(ci->get_index())) > return ci; > return 0; >} > >inline int tfont::get_kern(charinfo *c1, charinfo *c2, hunits *res) >{ > if (kern_mode == 0) > return 0; > else { > int n = fm->get_kern(c1->get_index(), > c2->get_index(), > size.to_scaled_points()); > if (n) { > *res = hunits(n); > return 1; > } > else > return 0; > } >} > >tfont *tfont::tfont_list = 0; > >tfont::tfont(tfont_spec &spec) : tfont_spec(spec) >{ > next = tfont_list; > tfont_list = this; > tfont_spec plain_spec = plain(); > tfont *p; > for (p = tfont_list; p; p = p->next) > if (*p == plain_spec) { > plain_version = p; > break; > } > if (!p) > plain_version = new tfont(plain_spec); >} > > > >class real_output_file : public output_file { > > int piped; > > int printing; > int output_on; > virtual void really_transparent_char(unsigned char) = 0; > virtual void really_print_line(hunits x, vunits y, node *n, > vunits before, vunits after, hunits width) = 0; > virtual void really_begin_page(int pageno, vunits page_length) = 0; > virtual void really_copy_file(hunits x, vunits y, const char *filename); > virtual void really_put_filename(const char *filename); > virtual void really_on(); > virtual void really_off(); >protected: > FILE *fp; >public: > real_output_file(); > ~real_output_file(); > void flush(); > void transparent_char(unsigned char); > void print_line(hunits x, vunits y, node *n, vunits before, vunits after, hunits width); > void begin_page(int pageno, vunits page_length); > void put_filename(const char *filename); > void on(); > void off(); > int is_on(); > int is_printing(); > void copy_file(hunits x, vunits y, const char *filename); >}; > >class suppress_output_file : public real_output_file { >public: > suppress_output_file(); > void really_transparent_char(unsigned char); > void really_print_line(hunits x, vunits y, node *n, vunits, vunits, hunits width); > void really_begin_page(int pageno, vunits page_length); >}; > >class ascii_output_file : public real_output_file { >public: > ascii_output_file(); > void really_transparent_char(unsigned char); > void really_print_line(hunits x, vunits y, node *n, vunits, vunits, hunits width); > void really_begin_page(int pageno, vunits page_length); > void outc(unsigned char c); > void outs(const char *s); >}; > >void ascii_output_file::outc(unsigned char c) >{ > fputc(c, fp); >} > >void ascii_output_file::outs(const char *s) >{ > fputc('<', fp); > if (s) > fputs(s, fp); > fputc('>', fp); >} > >struct hvpair; > >class troff_output_file : public real_output_file { > units hpos; > units vpos; > units output_vpos; > units output_hpos; > int force_motion; > int current_size; > int current_slant; > int current_height; > tfont *current_tfont; > color *current_fill_color; > color *current_glyph_color; > int current_font_number; > symbol *font_position; > int nfont_positions; > enum { TBUF_SIZE = 256 }; > char tbuf[TBUF_SIZE]; > int tbuf_len; > int tbuf_kern; > int begun_page; > void do_motion(); > void put(char c); > void put(unsigned char c); > void put(int i); > void put(unsigned int i); > void put(const char *s); > void set_font(tfont *tf); > void flush_tbuf(); >public: > troff_output_file(); > ~troff_output_file(); > void trailer(vunits page_length); > void put_char(charinfo *, tfont *, color *, color *); > void put_char_width(charinfo *, tfont *, color *, color *, hunits, hunits); > void right(hunits); > void down(vunits); > void moveto(hunits, vunits); > void start_special(tfont *, color *, color *, int = 0); > void start_special(); > void special_char(unsigned char c); > void end_special(); > void word_marker(); > void really_transparent_char(unsigned char c); > void really_print_line(hunits x, vunits y, node *n, vunits before, vunits after, hunits width); > void really_begin_page(int pageno, vunits page_length); > void really_copy_file(hunits x, vunits y, const char *filename); > void really_put_filename(const char *filename); > void really_on(); > void really_off(); > void draw(char, hvpair *, int, font_size, color *, color *); > void determine_line_limits (char code, hvpair *point, int npoints); > void check_charinfo(tfont *tf, charinfo *ci); > void glyph_color(color *c); > void fill_color(color *c); > int get_hpos() { return hpos; } > int get_vpos() { return vpos; } >}; > >static void put_string(const char *s, FILE *fp) >{ > for (; *s != '\0'; ++s) > _IO_putc (*s, fp); >} > >inline void troff_output_file::put(char c) >{ > _IO_putc (c, fp); >} > >inline void troff_output_file::put(unsigned char c) >{ > _IO_putc (c, fp); >} > >inline void troff_output_file::put(const char *s) >{ > put_string(s, fp); >} > >inline void troff_output_file::put(int i) >{ > put_string(i_to_a(i), fp); >} > >inline void troff_output_file::put(unsigned int i) >{ > put_string(ui_to_a(i), fp); >} > >void troff_output_file::start_special(tfont *tf, color *gcol, color *fcol, > int no_init_string) >{ > flush_tbuf(); > do_motion(); > if (tf != current_tfont) > set_font(tf); > glyph_color(gcol); > fill_color(fcol); > if (!no_init_string) > put("x X "); >} > >void troff_output_file::start_special() >{ > flush_tbuf(); > do_motion(); > put("x X "); >} > >void troff_output_file::special_char(unsigned char c) >{ > put(c); > if (c == '\n') > put('+'); >} > >void troff_output_file::end_special() >{ > put('\n'); >} > >inline void troff_output_file::moveto(hunits h, vunits v) >{ > hpos = h.to_units(); > vpos = v.to_units(); >} > >void troff_output_file::really_print_line(hunits x, vunits y, node *n, > vunits before, vunits after, hunits width) >{ > moveto(x, y); > while (n != 0) { > n->tprint(this); > n = n->next; > } > flush_tbuf(); > > > do_motion(); > force_motion = 1; > hpos = 0; > put('n'); > put(before.to_units()); > put(' '); > put(after.to_units()); > put('\n'); >} > >inline void troff_output_file::word_marker() >{ > flush_tbuf(); > if (is_on()) > put('w'); >} > >inline void troff_output_file::right(hunits n) >{ > hpos += n.to_units(); >} > >inline void troff_output_file::down(vunits n) >{ > vpos += n.to_units(); >} > >void troff_output_file::do_motion() >{ > if (force_motion) { > put('V'); > put(vpos); > put('\n'); > put('H'); > put(hpos); > put('\n'); > } > else { > if (hpos != output_hpos) { > units n = hpos - output_hpos; > if (n > 0 && n < hpos) { > put('h'); > put(n); > } > else { > put('H'); > put(hpos); > } > put('\n'); > } > if (vpos != output_vpos) { > units n = vpos - output_vpos; > if (n > 0 && n < vpos) { > put('v'); > put(n); > } > else { > put('V'); > put(vpos); > } > put('\n'); > } > } > output_vpos = vpos; > output_hpos = hpos; > force_motion = 0; >} > >void troff_output_file::flush_tbuf() >{ > if (!is_on()) { > tbuf_len = 0; > return; > } > > if (tbuf_len == 0) > return; > if (tbuf_kern == 0) > put('t'); > else { > put('u'); > put(tbuf_kern); > put(' '); > } > check_output_limits(hpos, vpos); > check_output_limits(hpos, vpos - current_size); > > for (int i = 0; i < tbuf_len; i++) > put(tbuf[i]); > put('\n'); > tbuf_len = 0; >} > >void troff_output_file::check_charinfo(tfont *tf, charinfo *ci) >{ > if (!is_on()) > return; > > int height = tf->get_char_height(ci).to_units(); > int width = tf->get_width(ci).to_units() > + tf->get_italic_correction(ci).to_units(); > int depth = tf->get_char_depth(ci).to_units(); > check_output_limits(output_hpos, output_vpos - height); > check_output_limits(output_hpos + width, output_vpos + depth); >} > >void troff_output_file::put_char_width(charinfo *ci, tfont *tf, > color *gcol, color *fcol, > hunits w, hunits k) >{ > int kk = k.to_units(); > if (!is_on()) { > flush_tbuf(); > hpos += w.to_units() + kk; > return; > } > if (tf != current_tfont) { > flush_tbuf(); > set_font(tf); > } > char c = ci->get_ascii_code(); > if (c == '\0') { > flush_tbuf(); > do_motion(); > if (gcol) > glyph_color(gcol); > if (fcol) > fill_color(fcol); > check_charinfo(tf, ci); > if (ci->numbered()) { > put('N'); > put(ci->get_number()); > } > else { > put('C'); > const char *s = ci->nm.contents(); > if (s[1] == 0) { > put('\\'); > put(s[0]); > } > else > put(s); > } > put('\n'); > hpos += w.to_units() + kk; > } > else if (tcommand_flag) { > if (tbuf_len > 0 && hpos == output_hpos && vpos == output_vpos > && gcol == current_glyph_color && fcol == current_fill_color > && kk == tbuf_kern > && tbuf_len < TBUF_SIZE) { > check_charinfo(tf, ci); > tbuf[tbuf_len++] = c; > output_hpos += w.to_units() + kk; > hpos = output_hpos; > return; > } > flush_tbuf(); > do_motion(); > glyph_color(gcol); > fill_color(fcol); > check_charinfo(tf, ci); > tbuf[tbuf_len++] = c; > output_hpos += w.to_units() + kk; > tbuf_kern = kk; > hpos = output_hpos; > } > else { > > int n = hpos - output_hpos; > check_charinfo(tf, ci); > > if (vpos == output_vpos > && gcol == current_glyph_color && fcol == current_fill_color > && n > 0 && n < 100 && !force_motion) { > put(char(n/10 + '0')); > put(char(n%10 + '0')); > put(c); > output_hpos = hpos; > } > else { > do_motion(); > put('c'); > put(c); > } > hpos += w.to_units() + kk; > } >} > >void troff_output_file::put_char(charinfo *ci, tfont *tf, > color *gcol, color *fcol) >{ > flush_tbuf(); > if (!is_on()) > return; > if (tf != current_tfont) > set_font(tf); > char c = ci->get_ascii_code(); > if (c == '\0') { > do_motion(); > glyph_color(gcol); > fill_color(fcol); > if (ci->numbered()) { > put('N'); > put(ci->get_number()); > } > else { > put('C'); > const char *s = ci->nm.contents(); > if (s[1] == 0) { > put('\\'); > put(s[0]); > } > else > put(s); > } > put('\n'); > } > else { > int n = hpos - output_hpos; > if (vpos == output_vpos > && gcol == current_glyph_color && fcol == current_fill_color > && n > 0 && n < 100) { > put(char(n/10 + '0')); > put(char(n%10 + '0')); > put(c); > output_hpos = hpos; > } > else { > do_motion(); > glyph_color(gcol); > fill_color(fcol); > put('c'); > put(c); > } > } >} > >void troff_output_file::set_font(tfont *tf) >{ > if (current_tfont == tf) > return; > int n = tf->get_input_position(); > symbol nm = tf->get_name(); > if (n >= nfont_positions || font_position[n] != nm) { > put("x font "); > put(n); > put(' '); > put(nm.contents()); > put('\n'); > if (n >= nfont_positions) { > int old_nfont_positions = nfont_positions; > symbol *old_font_position = font_position; > nfont_positions *= 3; > nfont_positions /= 2; > if (nfont_positions <= n) > nfont_positions = n + 10; > font_position = new symbol[nfont_positions]; > memcpy(font_position, old_font_position, > old_nfont_positions*sizeof(symbol)); > delete [] old_font_position; > } > font_position[n] = nm; > } > if (current_font_number != n) { > put('f'); > put(n); > put('\n'); > current_font_number = n; > } > int size = tf->get_size().to_scaled_points(); > if (current_size != size) { > put('s'); > put(size); > put('\n'); > current_size = size; > } > int slant = tf->get_slant(); > if (current_slant != slant) { > put("x Slant "); > put(slant); > put('\n'); > current_slant = slant; > } > int height = tf->get_height(); > if (current_height != height) { > put("x Height "); > put(height == 0 ? current_size : height); > put('\n'); > current_height = height; > } > current_tfont = tf; >} > >void troff_output_file::fill_color(color *col) >{ > if ((current_fill_color == col) || !color_flag || !col) > return; > flush_tbuf(); > put("DF"); > unsigned int components[4]; > color_scheme cs; > cs = col->get_components(components); > switch (cs) { > case DEFAULT: > put('d'); > break; > case RGB: > put("r "); > put(components[0]); > put(' '); > put(components[1]); > put(' '); > put(components[2]); > break; > case CMY: > put("c "); > put(components[0]); > put(' '); > put(components[1]); > put(' '); > put(components[2]); > break; > case CMYK: > put("k "); > put(components[0]); > put(' '); > put(components[1]); > put(' '); > put(components[2]); > put(' '); > put(components[3]); > break; > case GRAY: > put("g "); > put(components[0]); > break; > } > put('\n'); > current_fill_color = col; >} > >void troff_output_file::glyph_color(color *col) >{ > if ((current_glyph_color == col) || !color_flag || !col) > return; > flush_tbuf(); > put("m"); > unsigned int components[4]; > color_scheme cs; > cs = col->get_components(components); > switch (cs) { > case DEFAULT: > put('d'); > break; > case RGB: > put("r "); > put(components[0]); > put(' '); > put(components[1]); > put(' '); > put(components[2]); > break; > case CMY: > put("c "); > put(components[0]); > put(' '); > put(components[1]); > put(' '); > put(components[2]); > break; > case CMYK: > put("k "); > put(components[0]); > put(' '); > put(components[1]); > put(' '); > put(components[2]); > put(' '); > put(components[3]); > break; > case GRAY: > put("g "); > put(components[0]); > break; > } > put('\n'); > current_glyph_color = col; >} > > > >void troff_output_file::determine_line_limits(char code, hvpair *point, > int npoints) >{ > int i, x, y; > > if (!is_on()) > return; > > switch (code) { > case 'c': > case 'C': > > check_output_limits(output_hpos, > output_vpos - point[0].h.to_units()/2); > check_output_limits(output_hpos + point[0].h.to_units(), > output_vpos + point[0].h.to_units()/2); > break; > case 'E': > case 'e': > check_output_limits(output_hpos, > output_vpos - point[0].v.to_units()/2); > check_output_limits(output_hpos + point[0].h.to_units(), > output_vpos + point[0].v.to_units()/2); > break; > case 'P': > case 'p': > x = output_hpos; > y = output_vpos; > check_output_limits(x, y); > for (i = 0; i < npoints; i++) { > x += point[i].h.to_units(); > y += point[i].v.to_units(); > check_output_limits(x, y); > } > break; > case 't': > x = output_hpos; > y = output_vpos; > for (i = 0; i < npoints; i++) { > x += point[i].h.to_units(); > y += point[i].v.to_units(); > check_output_limits(x, y); > } > break; > case 'a': > double c[2]; > int p[4]; > int minx, miny, maxx, maxy; > x = output_hpos; > y = output_vpos; > p[0] = point[0].h.to_units(); > p[1] = point[0].v.to_units(); > p[2] = point[1].h.to_units(); > p[3] = point[1].v.to_units(); > if (adjust_arc_center(p, c)) { > check_output_arc_limits(x, y, > p[0], p[1], p[2], p[3], > c[0], c[1], > &minx, &maxx, &miny, &maxy); > check_output_limits(minx, miny); > check_output_limits(maxx, maxy); > break; > } > > case 'l': > x = output_hpos; > y = output_vpos; > check_output_limits(x, y); > for (i = 0; i < npoints; i++) { > x += point[i].h.to_units(); > y += point[i].v.to_units(); > check_output_limits(x, y); > } > break; > default: > x = output_hpos; > y = output_vpos; > for (i = 0; i < npoints; i++) { > x += point[i].h.to_units(); > y += point[i].v.to_units(); > check_output_limits(x, y); > } > } >} > >void troff_output_file::draw(char code, hvpair *point, int npoints, > font_size fsize, color *gcol, color *fcol) >{ > int i; > flush_tbuf(); > do_motion(); > glyph_color(gcol); > fill_color(fcol); > if (is_on()) { > int size = fsize.to_scaled_points(); > if (current_size != size) { > put('s'); > put(size); > put('\n'); > current_size = size; > current_tfont = 0; > } > put('D'); > put(code); > if (code == 'c') { > put(' '); > put(point[0].h.to_units()); > } > else > for (i = 0; i < npoints; i++) { > put(' '); > put(point[i].h.to_units()); > put(' '); > put(point[i].v.to_units()); > } > determine_line_limits(code, point, npoints); > } > > for (i = 0; i < npoints; i++) > output_hpos += point[i].h.to_units(); > hpos = output_hpos; > if (code != 'e') { > for (i = 0; i < npoints; i++) > output_vpos += point[i].v.to_units(); > vpos = output_vpos; > } > if (is_on()) > put('\n'); >} > >void troff_output_file::really_on() >{ > flush_tbuf(); > force_motion = 1; > do_motion(); >} > >void troff_output_file::really_off() >{ > flush_tbuf(); >} > >void troff_output_file::really_put_filename(const char *filename) >{ > flush_tbuf(); > put("F "); > put(filename); > put('\n'); >} > >void troff_output_file::really_begin_page(int pageno, vunits page_length) >{ > flush_tbuf(); > if (begun_page) { > if (page_length > V0) { > put('V'); > put(page_length.to_units()); > put('\n'); > } > } > else > begun_page = 1; > current_tfont = 0; > current_font_number = -1; > current_size = 0; > > > hpos = 0; > vpos = 0; > output_hpos = 0; > output_vpos = 0; > force_motion = 1; > for (int i = 0; i < nfont_positions; i++) > font_position[i] = NULL_SYMBOL; > put('p'); > put(pageno); > put('\n'); >} > >void troff_output_file::really_copy_file(hunits x, vunits y, const char *filename) >{ > moveto(x, y); > flush_tbuf(); > do_motion(); > (*__errno_location ()) = 0; > FILE *ifp = fopen(filename, "r"); > if (ifp == 0) > error("can't open `%1': %2", filename, strerror((*__errno_location ()))); > else { > int c; > while ((c = _IO_getc (ifp)) != (-1)) > put(char(c)); > fclose(ifp); > } > force_motion = 1; > current_size = 0; > current_tfont = 0; > current_font_number = -1; > for (int i = 0; i < nfont_positions; i++) > font_position[i] = NULL_SYMBOL; >} > >void troff_output_file::really_transparent_char(unsigned char c) >{ > put(c); >} > >troff_output_file::~troff_output_file() >{ > delete [] font_position; >} > >void troff_output_file::trailer(vunits page_length) >{ > flush_tbuf(); > if (page_length > V0) { > put("x trailer\n"); > put('V'); > put(page_length.to_units()); > put('\n'); > } > put("x stop\n"); >} > >troff_output_file::troff_output_file() >: current_slant(0), current_height(0), nfont_positions(10), tbuf_len(0), > begun_page(0) >{ > font_position = new symbol[nfont_positions]; > put("x T "); > put(device); > put('\n'); > put("x res "); > put(units_per_inch); > put(' '); > put(hresolution); > put(' '); > put(vresolution); > put('\n'); > put("x init\n"); >} > > > >output_file *the_output = 0; > >output_file::output_file() >{ >} > >output_file::~output_file() >{ >} > >void output_file::trailer(vunits) >{ >} > >void output_file::put_filename(const char *filename) >{ >} > >void output_file::on() >{ >} > >void output_file::off() >{ >} > >real_output_file::real_output_file() >: printing(0), output_on(1) >{ > > if (pipe_command) { > if ((fp = popen(pipe_command, "w")) != 0) { > piped = 1; > return; > } > error("pipe open failed: %1", strerror((*__errno_location ()))); > } > piped = 0; > > fp = stdout; >} > >real_output_file::~real_output_file() >{ > if (!fp) > return; > > if (ferror(fp) || fflush(fp) < 0) { > fp = 0; > fatal("error writing output file"); > } > > if (piped) { > int result = pclose(fp); > fp = 0; > if (result < 0) > fatal("pclose failed"); > if (!((((*(int *) &(result))) & 0x7f) == 0)) > error("output process `%1' got fatal signal %2", > pipe_command, > (__extension__ ({ int __status = ((*(int *) &(result))); !(((__status) & 0xff) == 0x7f) && !(((__status) & 0x7f) == 0); })) ? (((*(int *) &(result))) & 0x7f) : ((((*(int *) &(result))) & 0xff00) >> 8)); > else { > int exit_status = ((((*(int *) &(result))) & 0xff00) >> 8); > if (exit_status != 0) > error("output process `%1' exited with status %2", > pipe_command, exit_status); > } > } > else > > if (fclose(fp) < 0) { > fp = 0; > fatal("error closing output file"); > } >} > >void real_output_file::flush() >{ > if (fflush(fp) < 0) > fatal("error writing output file"); >} > >int real_output_file::is_printing() >{ > return printing; >} > >void real_output_file::begin_page(int pageno, vunits page_length) >{ > printing = in_output_page_list(pageno); > if (printing) > really_begin_page(pageno, page_length); >} > >void real_output_file::copy_file(hunits x, vunits y, const char *filename) >{ > if (printing && output_on) > really_copy_file(x, y, filename); > check_output_limits(x.to_units(), y.to_units()); >} > >void real_output_file::transparent_char(unsigned char c) >{ > if (printing && output_on) > really_transparent_char(c); >} > >void real_output_file::print_line(hunits x, vunits y, node *n, > vunits before, vunits after, hunits width) >{ > if (printing) > really_print_line(x, y, n, before, after, width); > delete_node_list(n); >} > >void real_output_file::really_copy_file(hunits, vunits, const char *) >{ > >} > >void real_output_file::put_filename(const char *filename) >{ > really_put_filename(filename); >} > >void real_output_file::really_put_filename(const char *filename) >{ >} > >void real_output_file::on() >{ > really_on(); > if (output_on == 0) > output_on = 1; >} > >void real_output_file::off() >{ > really_off(); > output_on = 0; >} > >int real_output_file::is_on() >{ > return output_on; >} > >void real_output_file::really_on() >{ >} > >void real_output_file::really_off() >{ >} > > > >void ascii_output_file::really_transparent_char(unsigned char c) >{ > _IO_putc (c, fp); >} > >void ascii_output_file::really_print_line(hunits, vunits, node *n, vunits, vunits, hunits width) >{ > while (n != 0) { > n->ascii_print(this); > n = n->next; > } > fputc('\n', fp); >} > >void ascii_output_file::really_begin_page(int , vunits ) >{ > fputs("<beginning of page>\n", fp); >} > >ascii_output_file::ascii_output_file() >{ >} > > > >suppress_output_file::suppress_output_file() >{ >} > >void suppress_output_file::really_print_line(hunits, vunits, node *, vunits, vunits, hunits) >{ >} > >void suppress_output_file::really_begin_page(int, vunits) >{ >} > >void suppress_output_file::really_transparent_char(unsigned char) >{ >} > > > >class charinfo_node : public node { >protected: > charinfo *ci; >public: > charinfo_node(charinfo *, node * = 0); > int ends_sentence(); > int overlaps_vertically(); > int overlaps_horizontally(); >}; > >charinfo_node::charinfo_node(charinfo *c, node *x) >: node(x), ci(c) >{ >} > >int charinfo_node::ends_sentence() >{ > if (ci->ends_sentence()) > return 1; > else if (ci->transparent()) > return 2; > else > return 0; >} > >int charinfo_node::overlaps_horizontally() >{ > return ci->overlaps_horizontally(); >} > >int charinfo_node::overlaps_vertically() >{ > return ci->overlaps_vertically(); >} > >class glyph_node : public charinfo_node { > static glyph_node *free_list; >protected: > tfont *tf; > color *gcol; > color *fcol; > > hunits wid; > glyph_node(charinfo *, tfont *, color *, color *, hunits, node * = 0); > >public: > void *operator new(size_t); > void operator delete(void *); > glyph_node(charinfo *, tfont *, color *, color *, node * = 0); > ~glyph_node() {} > node *copy(); > node *merge_glyph_node(glyph_node *); > node *merge_self(node *); > hunits width(); > node *last_char_node(); > units size(); > void vertical_extent(vunits *, vunits *); > hunits subscript_correction(); > hunits italic_correction(); > hunits left_italic_correction(); > hunits skew(); > hyphenation_type get_hyphenation_type(); > tfont *get_tfont(); > color *get_glyph_color(); > color *get_fill_color(); > void tprint(troff_output_file *); > void zero_width_tprint(troff_output_file *); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > node *add_self(node *, hyphen_list **); > void ascii_print(ascii_output_file *); > void asciify(macro *); > int character_type(); > int same(node *); > const char *type(); > int force_tprint(); >}; > >glyph_node *glyph_node::free_list = 0; > >class ligature_node : public glyph_node { > node *n1; > node *n2; > > ligature_node(charinfo *, tfont *, color *, color *, hunits, > node *, node *, node * = 0); > >public: > void *operator new(size_t); > void operator delete(void *); > ligature_node(charinfo *, tfont *, color *, color *, > node *, node *, node * = 0); > ~ligature_node(); > node *copy(); > node *add_self(node *, hyphen_list **); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > void ascii_print(ascii_output_file *); > void asciify(macro *); > int same(node *); > const char *type(); > int force_tprint(); >}; > >class kern_pair_node : public node { > hunits amount; > node *n1; > node *n2; >public: > kern_pair_node(hunits n, node *first, node *second, node *x = 0); > ~kern_pair_node(); > node *copy(); > node *merge_glyph_node(glyph_node *); > node *add_self(node *, hyphen_list **); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > node *add_discretionary_hyphen(); > hunits width(); > node *last_char_node(); > hunits italic_correction(); > hunits subscript_correction(); > void tprint(troff_output_file *); > hyphenation_type get_hyphenation_type(); > int ends_sentence(); > void ascii_print(ascii_output_file *); > void asciify(macro *); > int same(node *); > const char *type(); > int force_tprint(); > void vertical_extent(vunits *, vunits *); >}; > >class dbreak_node : public node { > node *none; > node *pre; > node *post; >public: > dbreak_node(node *n, node *p, node *x = 0); > ~dbreak_node(); > node *copy(); > node *merge_glyph_node(glyph_node *); > node *add_discretionary_hyphen(); > hunits width(); > node *last_char_node(); > hunits italic_correction(); > hunits subscript_correction(); > void tprint(troff_output_file *); > breakpoint *get_breakpoints(hunits width, int ns, breakpoint *rest = 0, > int is_inner = 0); > int nbreaks(); > int ends_sentence(); > void split(int, node **, node **); > hyphenation_type get_hyphenation_type(); > void ascii_print(ascii_output_file *); > void asciify(macro *); > int same(node *); > const char *type(); > int force_tprint(); >}; > >void *glyph_node::operator new(size_t n) >{ > do_assert(n == sizeof(glyph_node), 1866, "node.cc"); > if (!free_list) { > const int BLOCK = 1024; > free_list = (glyph_node *)new char[sizeof(glyph_node)*BLOCK]; > for (int i = 0; i < BLOCK - 1; i++) > free_list[i].next = free_list + i + 1; > free_list[BLOCK-1].next = 0; > } > glyph_node *p = free_list; > free_list = (glyph_node *)(free_list->next); > p->next = 0; > return p; >} > >void *ligature_node::operator new(size_t n) >{ > return new char[n]; >} > >void glyph_node::operator delete(void *p) >{ > if (p) { > ((glyph_node *)p)->next = free_list; > free_list = (glyph_node *)p; > } >} > >void ligature_node::operator delete(void *p) >{ > delete[] (char *)p; >} > >glyph_node::glyph_node(charinfo *c, tfont *t, color *gc, color *fc, node *x) >: charinfo_node(c, x), tf(t), gcol(gc), fcol(fc) >{ > > wid = tf->get_width(ci); > >} > > >glyph_node::glyph_node(charinfo *c, tfont *t, > color *gc, color *fc, hunits w, node *x) >: charinfo_node(c, x), tf(t), gcol(gc), fcol(fc), wid(w) >{ >} > > >node *glyph_node::copy() >{ > > return new glyph_node(ci, tf, gcol, fcol, wid); > > > >} > >node *glyph_node::merge_self(node *nd) >{ > return nd->merge_glyph_node(this); >} > >int glyph_node::character_type() >{ > return tf->get_character_type(ci); >} > >node *glyph_node::add_self(node *n, hyphen_list **p) >{ > do_assert(ci->get_hyphenation_code() == (*p)->hyphenation_code, 1935, "node.cc"); > next = 0; > node *nn; > if (n == 0 || (nn = n->merge_glyph_node(this)) == 0) { > next = n; > nn = this; > } > if ((*p)->hyphen) > nn = nn->add_discretionary_hyphen(); > hyphen_list *pp = *p; > *p = (*p)->next; > delete pp; > return nn; >} > >units glyph_node::size() >{ > return tf->get_size().to_units(); >} > >hyphen_list *glyph_node::get_hyphen_list(hyphen_list *tail) >{ > return new hyphen_list(ci->get_hyphenation_code(), tail); >} > >tfont *node::get_tfont() >{ > return 0; >} > >tfont *glyph_node::get_tfont() >{ > return tf; >} > >color *node::get_glyph_color() >{ > return 0; >} > >color *glyph_node::get_glyph_color() >{ > return gcol; >} > >color *node::get_fill_color() >{ > return 0; >} > >color *glyph_node::get_fill_color() >{ > return fcol; >} > >node *node::merge_glyph_node(glyph_node * ) >{ > return 0; >} > >node *glyph_node::merge_glyph_node(glyph_node *gn) >{ > if (tf == gn->tf && gcol == gn->gcol && fcol == gn->fcol) { > charinfo *lig; > if ((lig = tf->get_lig(ci, gn->ci)) != 0) { > node *next1 = next; > next = 0; > return new ligature_node(lig, tf, gcol, fcol, this, gn, next1); > } > hunits kern; > if (tf->get_kern(ci, gn->ci, &kern)) { > node *next1 = next; > next = 0; > return new kern_pair_node(kern, this, gn, next1); > } > } > return 0; >} > > >inline > >hunits glyph_node::width() >{ > > return wid; > > > >} > >node *glyph_node::last_char_node() >{ > return this; >} > >void glyph_node::vertical_extent(vunits *min, vunits *max) >{ > *min = -tf->get_char_height(ci); > *max = tf->get_char_depth(ci); >} > >hunits glyph_node::skew() >{ > return tf->get_char_skew(ci); >} > >hunits glyph_node::subscript_correction() >{ > return tf->get_subscript_correction(ci); >} > >hunits glyph_node::italic_correction() >{ > return tf->get_italic_correction(ci); >} > >hunits glyph_node::left_italic_correction() >{ > return tf->get_left_italic_correction(ci); >} > >hyphenation_type glyph_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >void glyph_node::ascii_print(ascii_output_file *ascii) >{ > unsigned char c = ci->get_ascii_code(); > if (c != 0) > ascii->outc(c); > else > ascii->outs(ci->nm.contents()); >} > >ligature_node::ligature_node(charinfo *c, tfont *t, color *gc, color *fc, > node *gn1, node *gn2, node *x) >: glyph_node(c, t, gc, fc, x), n1(gn1), n2(gn2) >{ >} > > >ligature_node::ligature_node(charinfo *c, tfont *t, color *gc, color *fc, > hunits w, node *gn1, node *gn2, node *x) >: glyph_node(c, t, gc, fc, w, x), n1(gn1), n2(gn2) >{ >} > > >ligature_node::~ligature_node() >{ > delete n1; > delete n2; >} > >node *ligature_node::copy() >{ > > return new ligature_node(ci, tf, gcol, fcol, wid, n1->copy(), n2->copy()); > > > >} > >void ligature_node::ascii_print(ascii_output_file *ascii) >{ > n1->ascii_print(ascii); > n2->ascii_print(ascii); >} > >hyphen_list *ligature_node::get_hyphen_list(hyphen_list *tail) >{ > return n1->get_hyphen_list(n2->get_hyphen_list(tail)); >} > >node *ligature_node::add_self(node *n, hyphen_list **p) >{ > n = n1->add_self(n, p); > n = n2->add_self(n, p); > n1 = n2 = 0; > delete this; > return n; >} > >kern_pair_node::kern_pair_node(hunits n, node *first, node *second, node *x) >: node(x), amount(n), n1(first), n2(second) >{ >} > >dbreak_node::dbreak_node(node *n, node *p, node *x) >: node(x), none(n), pre(p), post(0) >{ >} > >node *dbreak_node::merge_glyph_node(glyph_node *gn) >{ > glyph_node *gn2 = (glyph_node *)gn->copy(); > node *new_none = none ? none->merge_glyph_node(gn) : 0; > node *new_post = post ? post->merge_glyph_node(gn2) : 0; > if (new_none == 0 && new_post == 0) { > delete gn2; > return 0; > } > if (new_none != 0) > none = new_none; > else { > gn->next = none; > none = gn; > } > if (new_post != 0) > post = new_post; > else { > gn2->next = post; > post = gn2; > } > return this; >} > >node *kern_pair_node::merge_glyph_node(glyph_node *gn) >{ > node *nd = n2->merge_glyph_node(gn); > if (nd == 0) > return 0; > n2 = nd; > nd = n2->merge_self(n1); > if (nd) { > nd->next = next; > n1 = 0; > n2 = 0; > delete this; > return nd; > } > return this; >} > >hunits kern_pair_node::italic_correction() >{ > return n2->italic_correction(); >} > >hunits kern_pair_node::subscript_correction() >{ > return n2->subscript_correction(); >} > >void kern_pair_node::vertical_extent(vunits *min, vunits *max) >{ > n1->vertical_extent(min, max); > vunits min2, max2; > n2->vertical_extent(&min2, &max2); > if (min2 < *min) > *min = min2; > if (max2 > *max) > *max = max2; >} > >node *kern_pair_node::add_discretionary_hyphen() >{ > tfont *tf = n2->get_tfont(); > if (tf) { > if (tf->contains(soft_hyphen_char)) { > color *gcol = n2->get_glyph_color(); > color *fcol = n2->get_fill_color(); > node *next1 = next; > next = 0; > node *n = copy(); > glyph_node *gn = new glyph_node(soft_hyphen_char, tf, gcol, fcol); > node *nn = n->merge_glyph_node(gn); > if (nn == 0) { > gn->next = n; > nn = gn; > } > return new dbreak_node(this, nn, next1); > } > } > return this; >} > >kern_pair_node::~kern_pair_node() >{ > if (n1 != 0) > delete n1; > if (n2 != 0) > delete n2; >} > >dbreak_node::~dbreak_node() >{ > delete_node_list(pre); > delete_node_list(post); > delete_node_list(none); >} > >node *kern_pair_node::copy() >{ > return new kern_pair_node(amount, n1->copy(), n2->copy()); >} > >node *copy_node_list(node *n) >{ > node *p = 0; > while (n != 0) { > node *nn = n->copy(); > nn->next = p; > p = nn; > n = n->next; > } > while (p != 0) { > node *pp = p->next; > p->next = n; > n = p; > p = pp; > } > return n; >} > >void delete_node_list(node *n) >{ > while (n != 0) { > node *tem = n; > n = n->next; > delete tem; > } >} > >node *dbreak_node::copy() >{ > dbreak_node *p = new dbreak_node(copy_node_list(none), copy_node_list(pre)); > p->post = copy_node_list(post); > return p; >} > >hyphen_list *node::get_hyphen_list(hyphen_list *tail) >{ > return tail; >} > >hyphen_list *kern_pair_node::get_hyphen_list(hyphen_list *tail) >{ > return n1->get_hyphen_list(n2->get_hyphen_list(tail)); >} > >class hyphen_inhibitor_node : public node { >public: > hyphen_inhibitor_node(node *nd = 0); > node *copy(); > int same(node *); > const char *type(); > int force_tprint(); > hyphenation_type get_hyphenation_type(); >}; > >hyphen_inhibitor_node::hyphen_inhibitor_node(node *nd) : node(nd) >{ >} > >node *hyphen_inhibitor_node::copy() >{ > return new hyphen_inhibitor_node; >} > >int hyphen_inhibitor_node::same(node *) >{ > return 1; >} > >const char *hyphen_inhibitor_node::type() >{ > return "hyphen_inhibitor_node"; >} > >int hyphen_inhibitor_node::force_tprint() >{ > return 0; >} > >hyphenation_type hyphen_inhibitor_node::get_hyphenation_type() >{ > return HYPHEN_INHIBIT; >} > > > >node *dbreak_node::add_discretionary_hyphen() >{ > if (post) > post = post->add_discretionary_hyphen(); > if (none) > none = none->add_discretionary_hyphen(); > return this; >} > >node *node::add_discretionary_hyphen() >{ > tfont *tf = get_tfont(); > if (!tf) > return new hyphen_inhibitor_node(this); > if (tf->contains(soft_hyphen_char)) { > color *gcol = get_glyph_color(); > color *fcol = get_fill_color(); > node *next1 = next; > next = 0; > node *n = copy(); > glyph_node *gn = new glyph_node(soft_hyphen_char, tf, gcol, fcol); > node *n1 = n->merge_glyph_node(gn); > if (n1 == 0) { > gn->next = n; > n1 = gn; > } > return new dbreak_node(this, n1, next1); > } > return this; >} > >node *node::merge_self(node *) >{ > return 0; >} > >node *node::add_self(node *n, hyphen_list ** ) >{ > next = n; > return this; >} > >node *kern_pair_node::add_self(node *n, hyphen_list **p) >{ > n = n1->add_self(n, p); > n = n2->add_self(n, p); > n1 = n2 = 0; > delete this; > return n; >} > >hunits node::width() >{ > return H0; >} > >node *node::last_char_node() >{ > return 0; >} > >int node::force_tprint() >{ > return 0; >} > >hunits hmotion_node::width() >{ > return n; >} > >units node::size() >{ > return points_to_units(10); >} > >hunits kern_pair_node::width() >{ > return n1->width() + n2->width() + amount; >} > >node *kern_pair_node::last_char_node() >{ > node *nd = n2->last_char_node(); > if (nd) > return nd; > return n1->last_char_node(); >} > >hunits dbreak_node::width() >{ > hunits x = H0; > for (node *n = none; n != 0; n = n->next) > x += n->width(); > return x; >} > >node *dbreak_node::last_char_node() >{ > for (node *n = none; n; n = n->next) { > node *last = n->last_char_node(); > if (last) > return last; > } > return 0; >} > >hunits dbreak_node::italic_correction() >{ > return none ? none->italic_correction() : H0; >} > >hunits dbreak_node::subscript_correction() >{ > return none ? none->subscript_correction() : H0; >} > >class italic_corrected_node : public node { > node *n; > hunits x; >public: > italic_corrected_node(node *, hunits, node * = 0); > ~italic_corrected_node(); > node *copy(); > void ascii_print(ascii_output_file *); > void asciify(macro *); > hunits width(); > node *last_char_node(); > void vertical_extent(vunits *, vunits *); > int ends_sentence(); > int overlaps_horizontally(); > int overlaps_vertically(); > int same(node *); > hyphenation_type get_hyphenation_type(); > tfont *get_tfont(); > hyphen_list *get_hyphen_list(hyphen_list *ss = 0); > int character_type(); > void tprint(troff_output_file *); > hunits subscript_correction(); > hunits skew(); > node *add_self(node *, hyphen_list **); > const char *type(); > int force_tprint(); >}; > >node *node::add_italic_correction(hunits *width) >{ > hunits ic = italic_correction(); > if (ic.is_zero()) > return this; > else { > node *next1 = next; > next = 0; > *width += ic; > return new italic_corrected_node(this, ic, next1); > } >} > >italic_corrected_node::italic_corrected_node(node *nn, hunits xx, node *p) >: node(p), n(nn), x(xx) >{ > do_assert(n != 0, 2480, "node.cc"); >} > >italic_corrected_node::~italic_corrected_node() >{ > delete n; >} > >node *italic_corrected_node::copy() >{ > return new italic_corrected_node(n->copy(), x); >} > >hunits italic_corrected_node::width() >{ > return n->width() + x; >} > >void italic_corrected_node::vertical_extent(vunits *min, vunits *max) >{ > n->vertical_extent(min, max); >} > >void italic_corrected_node::tprint(troff_output_file *out) >{ > n->tprint(out); > out->right(x); >} > >hunits italic_corrected_node::skew() >{ > return n->skew() - x/2; >} > >hunits italic_corrected_node::subscript_correction() >{ > return n->subscript_correction() - x; >} > >void italic_corrected_node::ascii_print(ascii_output_file *out) >{ > n->ascii_print(out); >} > >int italic_corrected_node::ends_sentence() >{ > return n->ends_sentence(); >} > >int italic_corrected_node::overlaps_horizontally() >{ > return n->overlaps_horizontally(); >} > >int italic_corrected_node::overlaps_vertically() >{ > return n->overlaps_vertically(); >} > >node *italic_corrected_node::last_char_node() >{ > return n->last_char_node(); >} > >tfont *italic_corrected_node::get_tfont() >{ > return n->get_tfont(); >} > >hyphenation_type italic_corrected_node::get_hyphenation_type() >{ > return n->get_hyphenation_type(); >} > >node *italic_corrected_node::add_self(node *nd, hyphen_list **p) >{ > nd = n->add_self(nd, p); > hunits not_interested; > nd = nd->add_italic_correction(¬_interested); > n = 0; > delete this; > return nd; >} > >hyphen_list *italic_corrected_node::get_hyphen_list(hyphen_list *tail) >{ > return n->get_hyphen_list(tail); >} > >int italic_corrected_node::character_type() >{ > return n->character_type(); >} > >class break_char_node : public node { > node *ch; > char break_code; > color *col; >public: > break_char_node(node *, int, color *, node * = 0); > ~break_char_node(); > node *copy(); > hunits width(); > vunits vertical_width(); > node *last_char_node(); > int character_type(); > int ends_sentence(); > node *add_self(node *, hyphen_list **); > hyphen_list *get_hyphen_list(hyphen_list *s = 0); > void tprint(troff_output_file *); > void zero_width_tprint(troff_output_file *); > void ascii_print(ascii_output_file *); > void asciify(macro *); > hyphenation_type get_hyphenation_type(); > int overlaps_vertically(); > int overlaps_horizontally(); > units size(); > tfont *get_tfont(); > int same(node *); > const char *type(); > int force_tprint(); >}; > >break_char_node::break_char_node(node *n, int bc, color *c, node *x) >: node(x), ch(n), break_code(bc), col(c) >{ >} > >break_char_node::~break_char_node() >{ > delete ch; >} > >node *break_char_node::copy() >{ > return new break_char_node(ch->copy(), break_code, col); >} > >hunits break_char_node::width() >{ > return ch->width(); >} > >vunits break_char_node::vertical_width() >{ > return ch->vertical_width(); >} > >node *break_char_node::last_char_node() >{ > return ch->last_char_node(); >} > >int break_char_node::character_type() >{ > return ch->character_type(); >} > >int break_char_node::ends_sentence() >{ > return ch->ends_sentence(); >} > >node *break_char_node::add_self(node *n, hyphen_list **p) >{ > do_assert((*p)->hyphenation_code == 0, 2645, "node.cc"); > if ((*p)->breakable && (break_code & 1)) { > n = new space_node(H0, col, n); > n->freeze_space(); > } > next = n; > n = this; > if ((*p)->breakable && (break_code & 2)) { > n = new space_node(H0, col, n); > n->freeze_space(); > } > hyphen_list *pp = *p; > *p = (*p)->next; > delete pp; > return n; >} > >hyphen_list *break_char_node::get_hyphen_list(hyphen_list *tail) >{ > return new hyphen_list(0, tail); >} > >hyphenation_type break_char_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >void break_char_node::ascii_print(ascii_output_file *ascii) >{ > ch->ascii_print(ascii); >} > >int break_char_node::overlaps_vertically() >{ > return ch->overlaps_vertically(); >} > >int break_char_node::overlaps_horizontally() >{ > return ch->overlaps_horizontally(); >} > >units break_char_node::size() >{ > return ch->size(); >} > >tfont *break_char_node::get_tfont() >{ > return ch->get_tfont(); >} > >node *extra_size_node::copy() >{ > return new extra_size_node(n); >} > >node *vertical_size_node::copy() >{ > return new vertical_size_node(n); >} > >node *hmotion_node::copy() >{ > return new hmotion_node(n, was_tab, unformat, col); >} > >node *space_char_hmotion_node::copy() >{ > return new space_char_hmotion_node(n, col); >} > >node *vmotion_node::copy() >{ > return new vmotion_node(n, col); >} > >node *dummy_node::copy() >{ > return new dummy_node; >} > >node *transparent_dummy_node::copy() >{ > return new transparent_dummy_node; >} > >hline_node::~hline_node() >{ > if (n) > delete n; >} > >node *hline_node::copy() >{ > return new hline_node(x, n ? n->copy() : 0); >} > >hunits hline_node::width() >{ > return x < H0 ? H0 : x; >} > >vline_node::~vline_node() >{ > if (n) > delete n; >} > >node *vline_node::copy() >{ > return new vline_node(x, n ? n->copy() : 0); >} > >hunits vline_node::width() >{ > return n == 0 ? H0 : n->width(); >} > >zero_width_node::zero_width_node(node *nd) : n(nd) >{ >} > >zero_width_node::~zero_width_node() >{ > delete_node_list(n); >} > >node *zero_width_node::copy() >{ > return new zero_width_node(copy_node_list(n)); >} > >int node_list_character_type(node *p) >{ > int t = 0; > for (; p; p = p->next) > t |= p->character_type(); > return t; >} > >int zero_width_node::character_type() >{ > return node_list_character_type(n); >} > >void node_list_vertical_extent(node *p, vunits *min, vunits *max) >{ > *min = V0; > *max = V0; > vunits cur_vpos = V0; > vunits v1, v2; > for (; p; p = p->next) { > p->vertical_extent(&v1, &v2); > v1 += cur_vpos; > if (v1 < *min) > *min = v1; > v2 += cur_vpos; > if (v2 > *max) > *max = v2; > cur_vpos += p->vertical_width(); > } >} > >void zero_width_node::vertical_extent(vunits *min, vunits *max) >{ > node_list_vertical_extent(n, min, max); >} > >overstrike_node::overstrike_node() : list(0), max_width(H0) >{ >} > >overstrike_node::~overstrike_node() >{ > delete_node_list(list); >} > >node *overstrike_node::copy() >{ > overstrike_node *on = new overstrike_node; > for (node *tem = list; tem; tem = tem->next) > on->overstrike(tem->copy()); > return on; >} > >void overstrike_node::overstrike(node *n) >{ > if (n == 0) > return; > hunits w = n->width(); > if (w > max_width) > max_width = w; > node **p; > for (p = &list; *p; p = &(*p)->next) > ; > n->next = 0; > *p = n; >} > >hunits overstrike_node::width() >{ > return max_width; >} > >bracket_node::bracket_node() : list(0), max_width(H0) >{ >} > >bracket_node::~bracket_node() >{ > delete_node_list(list); >} > >node *bracket_node::copy() >{ > bracket_node *on = new bracket_node; > node *last = 0; > node *tem; > if (list) > list->last = 0; > for (tem = list; tem; tem = tem->next) { > if (tem->next) > tem->next->last = tem; > last = tem; > } > for (tem = last; tem; tem = tem->last) > on->bracket(tem->copy()); > return on; >} > >void bracket_node::bracket(node *n) >{ > if (n == 0) > return; > hunits w = n->width(); > if (w > max_width) > max_width = w; > n->next = list; > list = n; >} > >hunits bracket_node::width() >{ > return max_width; >} > >int node::nspaces() >{ > return 0; >} > >int node::merge_space(hunits, hunits, hunits) >{ > return 0; >} ># 2929 "node.cc" >space_node::space_node(hunits nn, color *c, node *p) >: node(p), n(nn), set(0), was_escape_colon(0), col(c) >{ >} > >space_node::space_node(hunits nn, int s, int flag, color *c, node *p) >: node(p), n(nn), set(s), was_escape_colon(flag), col(c) >{ >} > > > > > > > >node *space_node::copy() >{ > return new space_node(n, set, was_escape_colon, col); >} > >int space_node::force_tprint() >{ > return 0; >} > >int space_node::nspaces() >{ > return set ? 0 : 1; >} > >int space_node::merge_space(hunits h, hunits, hunits) >{ > n += h; > return 1; >} > >hunits space_node::width() >{ > return n; >} > >void node::spread_space(int*, hunits*) >{ >} > >void space_node::spread_space(int *nspaces, hunits *desired_space) >{ > if (!set) { > do_assert(*nspaces > 0, 2978, "node.cc"); > if (*nspaces == 1) { > n += *desired_space; > *desired_space = H0; > } > else { > hunits extra = *desired_space / *nspaces; > *desired_space -= extra; > n += extra; > } > *nspaces -= 1; > set = 1; > } >} > >void node::freeze_space() >{ >} > >void space_node::freeze_space() >{ > set = 1; >} > >void node::is_escape_colon() >{ >} > >void space_node::is_escape_colon() >{ > was_escape_colon = 1; >} > >diverted_space_node::diverted_space_node(vunits d, node *p) >: node(p), n(d) >{ >} > >node *diverted_space_node::copy() >{ > return new diverted_space_node(n); >} > >diverted_copy_file_node::diverted_copy_file_node(symbol s, node *p) >: node(p), filename(s) >{ >} > >node *diverted_copy_file_node::copy() >{ > return new diverted_copy_file_node(filename); >} > >int node::ends_sentence() >{ > return 0; >} > >int kern_pair_node::ends_sentence() >{ > switch (n2->ends_sentence()) { > case 0: > return 0; > case 1: > return 1; > case 2: > break; > default: > do_assert(0, 3046, "node.cc"); > } > return n1->ends_sentence(); >} > >int node_list_ends_sentence(node *n) >{ > for (; n != 0; n = n->next) > switch (n->ends_sentence()) { > case 0: > return 0; > case 1: > return 1; > case 2: > break; > default: > do_assert(0, 3062, "node.cc"); > } > return 2; >} > >int dbreak_node::ends_sentence() >{ > return node_list_ends_sentence(none); >} > >int node::overlaps_horizontally() >{ > return 0; >} > >int node::overlaps_vertically() >{ > return 0; >} > >int node::discardable() >{ > return 0; >} > >int space_node::discardable() >{ > return set ? 0 : 1; >} > >vunits node::vertical_width() >{ > return V0; >} > >vunits vline_node::vertical_width() >{ > return x; >} > >vunits vmotion_node::vertical_width() >{ > return n; >} > >int node::set_unformat_flag() >{ > return 1; >} > >int node::character_type() >{ > return 0; >} > >hunits node::subscript_correction() >{ > return H0; >} > >hunits node::italic_correction() >{ > return H0; >} > >hunits node::left_italic_correction() >{ > return H0; >} > >hunits node::skew() >{ > return H0; >} > > > >void node::vertical_extent(vunits *min, vunits *max) >{ > vunits v = vertical_width(); > if (v < V0) { > *min = v; > *max = V0; > } > else { > *max = v; > *min = V0; > } >} > >void vline_node::vertical_extent(vunits *min, vunits *max) >{ > if (n == 0) > node::vertical_extent(min, max); > else { > vunits cmin, cmax; > n->vertical_extent(&cmin, &cmax); > vunits h = n->size(); > if (x < V0) { > if (-x < h) { > *min = x; > *max = V0; > } > else { > > *max = cmax; > > *min = cmin + h; > if (*min > V0) > *min = V0; > *min += x; > } > } > else { > if (x < h) { > *max = x; > *min = V0; > } > else { > > *min = cmin + h; > if (*min > V0) > *min = V0; > *max = x + cmax; > } > } > } >} > > > >static void ascii_print_reverse_node_list(ascii_output_file *ascii, node *n) >{ > if (n == 0) > return; > ascii_print_reverse_node_list(ascii, n->next); > n->ascii_print(ascii); >} > >void dbreak_node::ascii_print(ascii_output_file *ascii) >{ > ascii_print_reverse_node_list(ascii, none); >} > >void kern_pair_node::ascii_print(ascii_output_file *ascii) >{ > n1->ascii_print(ascii); > n2->ascii_print(ascii); >} > >void node::ascii_print(ascii_output_file *) >{ >} > >void space_node::ascii_print(ascii_output_file *ascii) >{ > if (!n.is_zero()) > ascii->outc(' '); >} > >void hmotion_node::ascii_print(ascii_output_file *ascii) >{ > > if (n >= points_to_units(2)) > ascii->outc(' '); >} > >void space_char_hmotion_node::ascii_print(ascii_output_file *ascii) >{ > ascii->outc(' '); >} > > > >void node::asciify(macro *m) >{ > m->append(this); >} > >void glyph_node::asciify(macro *m) >{ > unsigned char c = ci->get_asciify_code(); > if (c == 0) > c = ci->get_ascii_code(); > if (c != 0) { > m->append(c); > delete this; > } > else > m->append(this); >} > >void kern_pair_node::asciify(macro *m) >{ > n1->asciify(m); > n2->asciify(m); > n1 = n2 = 0; > delete this; >} > >static void asciify_reverse_node_list(macro *m, node *n) >{ > if (n == 0) > return; > asciify_reverse_node_list(m, n->next); > n->asciify(m); >} > >void dbreak_node::asciify(macro *m) >{ > asciify_reverse_node_list(m, none); > none = 0; > delete this; >} > >void ligature_node::asciify(macro *m) >{ > n1->asciify(m); > n2->asciify(m); > n1 = n2 = 0; > delete this; >} > >void break_char_node::asciify(macro *m) >{ > ch->asciify(m); > ch = 0; > delete this; >} > >void italic_corrected_node::asciify(macro *m) >{ > n->asciify(m); > n = 0; > delete this; >} > >void left_italic_corrected_node::asciify(macro *m) >{ > if (n) { > n->asciify(m); > n = 0; > } > delete this; >} > >void hmotion_node::asciify(macro *m) >{ > if (was_tab) { > m->append('\t'); > delete this; > } > else > m->append(this); >} > >space_char_hmotion_node::space_char_hmotion_node(hunits i, color *c, > node *next) >: hmotion_node(i, c, next) >{ >} > >void space_char_hmotion_node::asciify(macro *m) >{ > m->append(ESCAPE_SPACE); > delete this; >} > >void space_node::asciify(macro *m) >{ > if (was_escape_colon) { > m->append(ESCAPE_COLON); > delete this; > } > else > m->append(this); >} > >void word_space_node::asciify(macro *m) >{ > for (width_list *w = orig_width; w; w = w->next) > m->append(' '); > delete this; >} > >void unbreakable_space_node::asciify(macro *m) >{ > m->append(ESCAPE_TILDE); > delete this; >} > >void line_start_node::asciify(macro *) >{ > delete this; >} > >void vertical_size_node::asciify(macro *) >{ > delete this; >} > >breakpoint *node::get_breakpoints(hunits , int , > breakpoint *rest, int ) >{ > return rest; >} > >int node::nbreaks() >{ > return 0; >} > >breakpoint *space_node::get_breakpoints(hunits width, int ns, > breakpoint *rest, int is_inner) >{ > if (next->discardable()) > return rest; > breakpoint *bp = new breakpoint; > bp->next = rest; > bp->width = width; > bp->nspaces = ns; > bp->hyphenated = 0; > if (is_inner) { > do_assert(rest != 0, 3385, "node.cc"); > bp->index = rest->index + 1; > bp->nd = rest->nd; > } > else { > bp->nd = this; > bp->index = 0; > } > return bp; >} > >int space_node::nbreaks() >{ > if (next->discardable()) > return 0; > else > return 1; >} > >static breakpoint *node_list_get_breakpoints(node *p, hunits *widthp, > int ns, breakpoint *rest) >{ > if (p != 0) { > rest = p->get_breakpoints(*widthp, > ns, > node_list_get_breakpoints(p->next, widthp, ns, > rest), > 1); > *widthp += p->width(); > } > return rest; >} > >breakpoint *dbreak_node::get_breakpoints(hunits width, int ns, > breakpoint *rest, int is_inner) >{ > breakpoint *bp = new breakpoint; > bp->next = rest; > bp->width = width; > for (node *tem = pre; tem != 0; tem = tem->next) > bp->width += tem->width(); > bp->nspaces = ns; > bp->hyphenated = 1; > if (is_inner) { > do_assert(rest != 0, 3429, "node.cc"); > bp->index = rest->index + 1; > bp->nd = rest->nd; > } > else { > bp->nd = this; > bp->index = 0; > } > return node_list_get_breakpoints(none, &width, ns, bp); >} > >int dbreak_node::nbreaks() >{ > int i = 1; > for (node *tem = none; tem != 0; tem = tem->next) > i += tem->nbreaks(); > return i; >} > >void node::split(int , node ** , node ** ) >{ > do_assert(0, 3450, "node.cc"); >} > >void space_node::split(int where, node **pre, node **post) >{ > do_assert(where == 0, 3455, "node.cc"); > *pre = next; > *post = 0; > delete this; >} > >static void node_list_split(node *p, int *wherep, node **prep, node **postp) >{ > if (p == 0) > return; > int nb = p->nbreaks(); > node_list_split(p->next, wherep, prep, postp); > if (*wherep < 0) { > p->next = *postp; > *postp = p; > } > else if (*wherep < nb) { > p->next = *prep; > p->split(*wherep, prep, postp); > } > else { > p->next = *prep; > *prep = p; > } > *wherep -= nb; >} > >void dbreak_node::split(int where, node **prep, node **postp) >{ > do_assert(where >= 0, 3484, "node.cc"); > if (where == 0) { > *postp = post; > post = 0; > if (pre == 0) > *prep = next; > else { > node *tem; > for (tem = pre; tem->next != 0; tem = tem->next) > ; > tem->next = next; > *prep = pre; > } > pre = 0; > delete this; > } > else { > *prep = next; > where -= 1; > node_list_split(none, &where, prep, postp); > none = 0; > delete this; > } >} > >hyphenation_type node::get_hyphenation_type() >{ > return HYPHEN_BOUNDARY; >} > >hyphenation_type dbreak_node::get_hyphenation_type() >{ > return HYPHEN_INHIBIT; >} > >hyphenation_type kern_pair_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >hyphenation_type dummy_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >hyphenation_type transparent_dummy_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >hyphenation_type hmotion_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >hyphenation_type space_char_hmotion_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >hyphenation_type overstrike_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >hyphenation_type space_node::get_hyphenation_type() >{ > if (was_escape_colon) > return HYPHEN_MIDDLE; > return HYPHEN_BOUNDARY; >} > >hyphenation_type unbreakable_space_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >int node::interpret(macro *) >{ > return 0; >} > >special_node::special_node(const macro &m, int n) >: mac(m), no_init_string(n) >{ > font_size fs = curenv->get_font_size(); > int char_height = curenv->get_char_height(); > int char_slant = curenv->get_char_slant(); > int fontno = env_definite_font(curenv); > tf = font_table[fontno]->get_tfont(fs, char_height, char_slant, fontno); > if (curenv->is_composite()) > tf = tf->get_plain(); > gcol = curenv->get_glyph_color(); > fcol = curenv->get_fill_color(); >} > >special_node::special_node(const macro &m, tfont *t, > color *gc, color *fc, int n) >: mac(m), tf(t), gcol(gc), fcol(fc), no_init_string(n) >{ >} > >int special_node::same(node *n) >{ > return mac == ((special_node *)n)->mac > && tf == ((special_node *)n)->tf > && gcol == ((special_node *)n)->gcol > && fcol == ((special_node *)n)->fcol > && no_init_string == ((special_node *)n)->no_init_string; >} > >const char *special_node::type() >{ > return "special_node"; >} > >int special_node::ends_sentence() >{ > return 2; >} > >int special_node::force_tprint() >{ > return 0; >} > >node *special_node::copy() >{ > return new special_node(mac, tf, gcol, fcol, no_init_string); >} > >void special_node::tprint_start(troff_output_file *out) >{ > out->start_special(tf, gcol, fcol, no_init_string); >} > >void special_node::tprint_char(troff_output_file *out, unsigned char c) >{ > out->special_char(c); >} > >void special_node::tprint_end(troff_output_file *out) >{ > out->end_special(); >} > >tfont *special_node::get_tfont() >{ > return tf; >} > > > >suppress_node::suppress_node(int on_or_off, int issue_limits) >: is_on(on_or_off), emit_limits(issue_limits), > filename(0), position(0), image_id(0) >{ >} > >suppress_node::suppress_node(symbol f, char p, int id) >: is_on(2), emit_limits(0), filename(f), position(p), image_id(id) >{ >} > >suppress_node::suppress_node(int issue_limits, int on_or_off, > symbol f, char p, int id) >: is_on(on_or_off), emit_limits(issue_limits), > filename(f), position(p), image_id(id) >{ >} > >int suppress_node::same(node *n) >{ > return ((is_on == ((suppress_node *)n)->is_on) > && (emit_limits == ((suppress_node *)n)->emit_limits) > && (filename == ((suppress_node *)n)->filename) > && (position == ((suppress_node *)n)->position) > && (image_id == ((suppress_node *)n)->image_id)); >} > >const char *suppress_node::type() >{ > return "suppress_node"; >} > >node *suppress_node::copy() >{ > return new suppress_node(emit_limits, is_on, filename, position, image_id); >} > >int get_reg_int(const char *p) >{ > reg *r = (reg *)number_reg_dictionary.lookup(p); > units prev_value; > if (r && (r->get_value(&prev_value))) > return (int)prev_value; > else > warning(WARN_REG, "number register `%1' not defined", p); > return 0; >} > >const char *get_reg_str(const char *p) >{ > reg *r = (reg *)number_reg_dictionary.lookup(p); > if (r) > return r->get_string(); > else > warning(WARN_REG, "register `%1' not defined", p); > return 0; >} > >void suppress_node::put(troff_output_file *out, const char *s) >{ > int i = 0; > while (s[i] != (char)0) { > out->special_char(s[i]); > i++; > } >} > > > > > >static char last_position = 0; >static const char *last_image_filename = 0; >static int last_image_id = 0; > >inline int min(int a, int b) >{ > return a < b ? a : b; >} ># 3734 "node.cc" >void suppress_node::tprint(troff_output_file *out) >{ > int current_page = topdiv->get_page_number(); > > > if (is_on == 2) { > > last_position = position; > last_image_filename = strdup(filename.contents()); > last_image_id = image_id; > > } > else { > > if (emit_limits) { > char name[8192]; > > > sprintf(name, last_image_filename, last_image_id); > if (is_html) { > switch (last_position) { > case 'c': > out->start_special(); > put(out, "html-tag:.centered-image"); > break; > case 'r': > out->start_special(); > put(out, "html-tag:.right-image"); > break; > case 'l': > out->start_special(); > put(out, "html-tag:.left-image"); > break; > case 'i': > ; > default: > ; > } > out->end_special(); > out->start_special(); > put(out, "html-tag:.auto-image "); > put(out, name); > out->end_special(); > } > else { > > if (suppress_start_page > 0 && current_page != suppress_start_page) > error("suppression limit registers span more than one page;\n" > "image description %1 will be wrong", image_no); > > > > > > > fprintf(stderr, > "grohtml-info:page %d %d %d %d %d %d %s %d %d %s\n", > topdiv->get_page_number(), > get_reg_int("opminx"), get_reg_int("opminy"), > get_reg_int("opmaxx"), get_reg_int("opmaxy"), > > get_reg_int(".o") + get_reg_int(".l"), > name, hresolution, vresolution, get_reg_str(".F")); > fflush(stderr); > } > } > else { > if (is_on) { > out->on(); > > reset_output_registers(out->get_vpos()); > } > else > out->off(); > suppress_start_page = current_page; > } > } >} > >int suppress_node::force_tprint() >{ > return is_on; >} > >hunits suppress_node::width() >{ > return H0; >} > > > >class composite_node : public charinfo_node { > node *n; > tfont *tf; >public: > composite_node(node *, charinfo *, tfont *, node * = 0); > ~composite_node(); > node *copy(); > hunits width(); > node *last_char_node(); > units size(); > void tprint(troff_output_file *); > hyphenation_type get_hyphenation_type(); > void ascii_print(ascii_output_file *); > void asciify(macro *); > hyphen_list *get_hyphen_list(hyphen_list *tail); > node *add_self(node *, hyphen_list **); > tfont *get_tfont(); > int same(node *); > const char *type(); > int force_tprint(); > void vertical_extent(vunits *, vunits *); > vunits vertical_width(); >}; > >composite_node::composite_node(node *p, charinfo *c, tfont *t, node *x) >: charinfo_node(c, x), n(p), tf(t) >{ >} > >composite_node::~composite_node() >{ > delete_node_list(n); >} > >node *composite_node::copy() >{ > return new composite_node(copy_node_list(n), ci, tf); >} > >hunits composite_node::width() >{ > hunits x; > if (tf->get_constant_space(&x)) > return x; > x = H0; > for (node *tem = n; tem; tem = tem->next) > x += tem->width(); > hunits offset; > if (tf->get_bold(&offset)) > x += offset; > x += tf->get_track_kern(); > return x; >} > >node *composite_node::last_char_node() >{ > return this; >} > >vunits composite_node::vertical_width() >{ > vunits v = V0; > for (node *tem = n; tem; tem = tem->next) > v += tem->vertical_width(); > return v; >} > >units composite_node::size() >{ > return tf->get_size().to_units(); >} > >hyphenation_type composite_node::get_hyphenation_type() >{ > return HYPHEN_MIDDLE; >} > >void composite_node::asciify(macro *m) >{ > unsigned char c = ci->get_asciify_code(); > if (c == 0) > c = ci->get_ascii_code(); > if (c != 0) { > m->append(c); > delete this; > } > else > m->append(this); >} > >void composite_node::ascii_print(ascii_output_file *ascii) >{ > unsigned char c = ci->get_ascii_code(); > if (c != 0) > ascii->outc(c); > else > ascii->outs(ci->nm.contents()); > >} > >hyphen_list *composite_node::get_hyphen_list(hyphen_list *tail) >{ > return new hyphen_list(ci->get_hyphenation_code(), tail); >} > >node *composite_node::add_self(node *nn, hyphen_list **p) >{ > do_assert(ci->get_hyphenation_code() == (*p)->hyphenation_code, 3932, "node.cc"); > next = nn; > nn = this; > if ((*p)->hyphen) > nn = nn->add_discretionary_hyphen(); > hyphen_list *pp = *p; > *p = (*p)->next; > delete pp; > return nn; >} > >tfont *composite_node::get_tfont() >{ > return tf; >} > >node *reverse_node_list(node *n) >{ > node *r = 0; > while (n) { > node *tem = n; > n = n->next; > tem->next = r; > r = tem; > } > return r; >} > >void composite_node::vertical_extent(vunits *min, vunits *max) >{ > n = reverse_node_list(n); > node_list_vertical_extent(n, min, max); > n = reverse_node_list(n); >} > >width_list::width_list(hunits w, hunits s) >: width(w), sentence_width(s), next(0) >{ >} > >width_list::width_list(width_list *w) >: width(w->width), sentence_width(w->sentence_width), next(0) >{ >} > >word_space_node::word_space_node(hunits d, color *c, width_list *w, node *x) >: space_node(d, c, x), orig_width(w), unformat(0) >{ >} > >word_space_node::word_space_node(hunits d, int s, color *c, width_list *w, > int flag, node *x) >: space_node(d, s, 0, c, x), orig_width(w), unformat(flag) >{ >} > >word_space_node::~word_space_node() >{ > width_list *w = orig_width; > while (w != 0) { > width_list *tmp = w; > w = w->next; > delete tmp; > } >} > >node *word_space_node::copy() >{ > do_assert(orig_width != 0, 4000, "node.cc"); > width_list *w_old_curr = orig_width; > width_list *w_new_curr = new width_list(w_old_curr); > width_list *w_new = w_new_curr; > w_old_curr = w_old_curr->next; > while (w_old_curr != 0) { > w_new_curr->next = new width_list(w_old_curr); > w_new_curr = w_new_curr->next; > w_old_curr = w_old_curr->next; > } > return new word_space_node(n, set, col, w_new, unformat); >} > >int word_space_node::set_unformat_flag() >{ > unformat = 1; > return 1; >} > >void word_space_node::tprint(troff_output_file *out) >{ > out->fill_color(col); > out->word_marker(); > out->right(n); >} > >int word_space_node::merge_space(hunits h, hunits sw, hunits ssw) >{ > n += h; > do_assert(orig_width != 0, 4029, "node.cc"); > width_list *w = orig_width; > for (; w->next; w = w->next) > ; > w->next = new width_list(sw, ssw); > return 1; >} > >unbreakable_space_node::unbreakable_space_node(hunits d, color *c, node *x) >: word_space_node(d, c, 0, x) >{ >} > >unbreakable_space_node::unbreakable_space_node(hunits d, int s, > color *c, node *x) >: word_space_node(d, s, c, 0, 0, x) >{ >} > >node *unbreakable_space_node::copy() >{ > return new unbreakable_space_node(n, set, col); >} > >int unbreakable_space_node::force_tprint() >{ > return 0; >} > >breakpoint *unbreakable_space_node::get_breakpoints(hunits, int, > breakpoint *rest, int) >{ > return rest; >} > >int unbreakable_space_node::nbreaks() >{ > return 0; >} > >void unbreakable_space_node::split(int, node **, node **) >{ > do_assert(0, 4071, "node.cc"); >} > >int unbreakable_space_node::merge_space(hunits, hunits, hunits) >{ > return 0; >} > >hvpair::hvpair() >{ >} > >draw_node::draw_node(char c, hvpair *p, int np, font_size s, > color *gc, color *fc) >: npoints(np), sz(s), gcol(gc), fcol(fc), code(c) >{ > point = new hvpair[npoints]; > for (int i = 0; i < npoints; i++) > point[i] = p[i]; >} > >int draw_node::same(node *n) >{ > draw_node *nd = (draw_node *)n; > if (code != nd->code || npoints != nd->npoints || sz != nd->sz > || gcol != nd->gcol || fcol != nd->fcol) > return 0; > for (int i = 0; i < npoints; i++) > if (point[i].h != nd->point[i].h || point[i].v != nd->point[i].v) > return 0; > return 1; >} > >const char *draw_node::type() >{ > return "draw_node"; >} > >int draw_node::force_tprint() >{ > return 0; >} > >draw_node::~draw_node() >{ > if (point) > delete [] point; >} > >hunits draw_node::width() >{ > hunits x = H0; > for (int i = 0; i < npoints; i++) > x += point[i].h; > return x; >} > >vunits draw_node::vertical_width() >{ > if (code == 'e') > return V0; > vunits x = V0; > for (int i = 0; i < npoints; i++) > x += point[i].v; > return x; >} > >node *draw_node::copy() >{ > return new draw_node(code, point, npoints, sz, gcol, fcol); >} > >void draw_node::tprint(troff_output_file *out) >{ > out->draw(code, point, npoints, sz, gcol, fcol); >} > > > >void glyph_node::tprint(troff_output_file *out) >{ > tfont *ptf = tf->get_plain(); > if (ptf == tf) > out->put_char_width(ci, ptf, gcol, fcol, width(), H0); > else { > hunits offset; > int bold = tf->get_bold(&offset); > hunits w = ptf->get_width(ci); > hunits k = H0; > hunits x; > int cs = tf->get_constant_space(&x); > if (cs) { > x -= w; > if (bold) > x -= offset; > hunits x2 = x/2; > out->right(x2); > k = x - x2; > } > else > k = tf->get_track_kern(); > if (bold) { > out->put_char(ci, ptf, gcol, fcol); > out->right(offset); > } > out->put_char_width(ci, ptf, gcol, fcol, w, k); > } >} > >void glyph_node::zero_width_tprint(troff_output_file *out) >{ > tfont *ptf = tf->get_plain(); > hunits offset; > int bold = tf->get_bold(&offset); > hunits x; > int cs = tf->get_constant_space(&x); > if (cs) { > x -= ptf->get_width(ci); > if (bold) > x -= offset; > x = x/2; > out->right(x); > } > out->put_char(ci, ptf, gcol, fcol); > if (bold) { > out->right(offset); > out->put_char(ci, ptf, gcol, fcol); > out->right(-offset); > } > if (cs) > out->right(-x); >} > >void break_char_node::tprint(troff_output_file *t) >{ > ch->tprint(t); >} > >void break_char_node::zero_width_tprint(troff_output_file *t) >{ > ch->zero_width_tprint(t); >} > >void hline_node::tprint(troff_output_file *out) >{ > if (x < H0) { > out->right(x); > x = -x; > } > if (n == 0) { > out->right(x); > return; > } > hunits w = n->width(); > if (w <= H0) { > error("horizontal line drawing character must have positive width"); > out->right(x); > return; > } > int i = int(x/w); > if (i == 0) { > hunits xx = x - w; > hunits xx2 = xx/2; > out->right(xx2); > if (out->is_on()) > n->tprint(out); > out->right(xx - xx2); > } > else { > hunits rem = x - w*i; > if (rem > H0) > if (n->overlaps_horizontally()) { > if (out->is_on()) > n->tprint(out); > out->right(rem - w); > } > else > out->right(rem); > while (--i >= 0) > if (out->is_on()) > n->tprint(out); > } >} > >void vline_node::tprint(troff_output_file *out) >{ > if (n == 0) { > out->down(x); > return; > } > vunits h = n->size(); > int overlaps = n->overlaps_vertically(); > vunits y = x; > if (y < V0) { > y = -y; > int i = y / h; > vunits rem = y - i*h; > if (i == 0) { > out->right(n->width()); > out->down(-rem); > } > else { > while (--i > 0) { > n->zero_width_tprint(out); > out->down(-h); > } > if (overlaps) { > n->zero_width_tprint(out); > out->down(-rem); > if (out->is_on()) > n->tprint(out); > out->down(-h); > } > else { > if (out->is_on()) > n->tprint(out); > out->down(-h - rem); > } > } > } > else { > int i = y / h; > vunits rem = y - i*h; > if (i == 0) { > out->down(rem); > out->right(n->width()); > } > else { > out->down(h); > if (overlaps) > n->zero_width_tprint(out); > out->down(rem); > while (--i > 0) { > n->zero_width_tprint(out); > out->down(h); > } > if (out->is_on()) > n->tprint(out); > } > } >} > >void zero_width_node::tprint(troff_output_file *out) >{ > if (!n) > return; > if (!n->next) { > n->zero_width_tprint(out); > return; > } > int hpos = out->get_hpos(); > int vpos = out->get_vpos(); > node *tem = n; > while (tem) { > tem->tprint(out); > tem = tem->next; > } > out->moveto(hpos, vpos); >} > >void overstrike_node::tprint(troff_output_file *out) >{ > hunits pos = H0; > for (node *tem = list; tem; tem = tem->next) { > hunits x = (max_width - tem->width())/2; > out->right(x - pos); > pos = x; > tem->zero_width_tprint(out); > } > out->right(max_width - pos); >} > >void bracket_node::tprint(troff_output_file *out) >{ > if (list == 0) > return; > int npieces = 0; > node *tem; > for (tem = list; tem; tem = tem->next) > ++npieces; > vunits h = list->size(); > vunits totalh = h*npieces; > vunits y = (totalh - h)/2; > out->down(y); > for (tem = list; tem; tem = tem->next) { > tem->zero_width_tprint(out); > out->down(-h); > } > out->right(max_width); > out->down(totalh - y); >} > >void node::tprint(troff_output_file *) >{ >} > >void node::zero_width_tprint(troff_output_file *out) >{ > int hpos = out->get_hpos(); > int vpos = out->get_vpos(); > tprint(out); > out->moveto(hpos, vpos); >} > >void space_node::tprint(troff_output_file *out) >{ > out->fill_color(col); > out->right(n); >} > >void hmotion_node::tprint(troff_output_file *out) >{ > out->fill_color(col); > out->right(n); >} > >void vmotion_node::tprint(troff_output_file *out) >{ > out->fill_color(col); > out->down(n); >} > >void kern_pair_node::tprint(troff_output_file *out) >{ > n1->tprint(out); > out->right(amount); > n2->tprint(out); >} > >static void tprint_reverse_node_list(troff_output_file *out, node *n) >{ > if (n == 0) > return; > tprint_reverse_node_list(out, n->next); > n->tprint(out); >} > >void dbreak_node::tprint(troff_output_file *out) >{ > tprint_reverse_node_list(out, none); >} > >void composite_node::tprint(troff_output_file *out) >{ > hunits bold_offset; > int is_bold = tf->get_bold(&bold_offset); > hunits track_kern = tf->get_track_kern(); > hunits constant_space; > int is_constant_spaced = tf->get_constant_space(&constant_space); > hunits x = H0; > if (is_constant_spaced) { > x = constant_space; > for (node *tem = n; tem; tem = tem->next) > x -= tem->width(); > if (is_bold) > x -= bold_offset; > hunits x2 = x/2; > out->right(x2); > x -= x2; > } > if (is_bold) { > int hpos = out->get_hpos(); > int vpos = out->get_vpos(); > tprint_reverse_node_list(out, n); > out->moveto(hpos, vpos); > out->right(bold_offset); > } > tprint_reverse_node_list(out, n); > if (is_constant_spaced) > out->right(x); > else > out->right(track_kern); >} > >node *make_composite_node(charinfo *s, environment *env) >{ > int fontno = env_definite_font(env); > if (fontno < 0) { > error("no current font"); > return 0; > } > do_assert(fontno < font_table_size && font_table[fontno] != 0, 4452, "node.cc"); > node *n = charinfo_to_node_list(s, env); > font_size fs = env->get_font_size(); > int char_height = env->get_char_height(); > int char_slant = env->get_char_slant(); > tfont *tf = font_table[fontno]->get_tfont(fs, char_height, char_slant, > fontno); > if (env->is_composite()) > tf = tf->get_plain(); > return new composite_node(n, s, tf); >} > >node *make_glyph_node(charinfo *s, environment *env, int no_error_message = 0) >{ > int fontno = env_definite_font(env); > if (fontno < 0) { > error("no current font"); > return 0; > } > do_assert(fontno < font_table_size && font_table[fontno] != 0, 4471, "node.cc"); > int fn = fontno; > int found = font_table[fontno]->contains(s); > if (!found) { > if (s->is_fallback()) > return make_composite_node(s, env); > if (s->numbered()) { > if (!no_error_message) > warning(WARN_CHAR, "can't find numbered character %1", > s->get_number()); > return 0; > } > special_font_list *sf = font_table[fontno]->sf; > while (sf != 0 && !found) { > fn = sf->n; > if (font_table[fn]) > found = font_table[fn]->contains(s); > sf = sf->next; > } > if (!found) { > sf = global_special_fonts; > while (sf != 0 && !found) { > fn = sf->n; > if (font_table[fn]) > found = font_table[fn]->contains(s); > sf = sf->next; > } > } > if (!found > > > > ) { > for (fn = 0; fn < font_table_size; fn++) > if (font_table[fn] > && font_table[fn]->is_special() > && font_table[fn]->contains(s)) { > found = 1; > break; > } > } > if (!found) { > if (!no_error_message && s->first_time_not_found()) { > unsigned char input_code = s->get_ascii_code(); > if (input_code != 0) { > if (csgraph(input_code)) > warning(WARN_CHAR, "can't find character `%1'", input_code); > else > warning(WARN_CHAR, "can't find character with input code %1", > int(input_code)); > } > else if (s->nm.contents()) > warning(WARN_CHAR, "can't find special character `%1'", > s->nm.contents()); > } > return 0; > } > } > font_size fs = env->get_font_size(); > int char_height = env->get_char_height(); > int char_slant = env->get_char_slant(); > tfont *tf = font_table[fontno]->get_tfont(fs, char_height, char_slant, fn); > if (env->is_composite()) > tf = tf->get_plain(); > color *gcol = env->get_glyph_color(); > color *fcol = env->get_fill_color(); > return new glyph_node(s, tf, gcol, fcol); >} > >node *make_node(charinfo *ci, environment *env) >{ > switch (ci->get_special_translation()) { > case charinfo::TRANSLATE_SPACE: > return new space_char_hmotion_node(env->get_space_width(), > env->get_fill_color()); > case charinfo::TRANSLATE_STRETCHABLE_SPACE: > return new unbreakable_space_node(env->get_space_width(), > env->get_fill_color()); > case charinfo::TRANSLATE_DUMMY: > return new dummy_node; > case charinfo::TRANSLATE_HYPHEN_INDICATOR: > error("translation to \\% ignored in this context"); > break; > } > charinfo *tem = ci->get_translation(); > if (tem) > ci = tem; > macro *mac = ci->get_macro(); > if (mac && !ci->is_fallback()) > return make_composite_node(ci, env); > else > return make_glyph_node(ci, env); >} > >int character_exists(charinfo *ci, environment *env) >{ > if (ci->get_special_translation() != charinfo::TRANSLATE_NONE) > return 1; > charinfo *tem = ci->get_translation(); > if (tem) > ci = tem; > if (ci->get_macro()) > return 1; > node *nd = make_glyph_node(ci, env, 1); > if (nd) { > delete nd; > return 1; > } > return 0; >} > >node *node::add_char(charinfo *ci, environment *env, > hunits *widthp, int *spacep) >{ > node *res; > switch (ci->get_special_translation()) { > case charinfo::TRANSLATE_SPACE: > res = new space_char_hmotion_node(env->get_space_width(), > env->get_fill_color(), this); > *widthp += res->width(); > return res; > case charinfo::TRANSLATE_STRETCHABLE_SPACE: > res = new unbreakable_space_node(env->get_space_width(), > env->get_fill_color(), this); > res->freeze_space(); > *widthp += res->width(); > *spacep += res->nspaces(); > return res; > case charinfo::TRANSLATE_DUMMY: > return new dummy_node(this); > case charinfo::TRANSLATE_HYPHEN_INDICATOR: > return add_discretionary_hyphen(); > } > charinfo *tem = ci->get_translation(); > if (tem) > ci = tem; > macro *mac = ci->get_macro(); > if (mac && !ci->is_fallback()) { > res = make_composite_node(ci, env); > if (res) { > res->next = this; > *widthp += res->width(); > } > else > return this; > } > else { > node *gn = make_glyph_node(ci, env); > if (gn == 0) > return this; > else { > hunits old_width = width(); > node *p = gn->merge_self(this); > if (p == 0) { > *widthp += gn->width(); > gn->next = this; > res = gn; > } > else { > *widthp += p->width() - old_width; > res = p; > } > } > } > int break_code = 0; > if (ci->can_break_before()) > break_code = 1; > if (ci->can_break_after()) > break_code |= 2; > if (break_code) { > node *next1 = res->next; > res->next = 0; > res = new break_char_node(res, break_code, env->get_fill_color(), next1); > } > return res; >} > > >inline > >int same_node(node *n1, node *n2) >{ > if (n1 != 0) { > if (n2 != 0) > return n1->type() == n2->type() && n1->same(n2); > else > return 0; > } > else > return n2 == 0; >} > >int same_node_list(node *n1, node *n2) >{ > while (n1 && n2) { > if (n1->type() != n2->type() || !n1->same(n2)) > return 0; > n1 = n1->next; > n2 = n2->next; > } > return !n1 && !n2; >} > >int extra_size_node::same(node *nd) >{ > return n == ((extra_size_node *)nd)->n; >} > >const char *extra_size_node::type() >{ > return "extra_size_node"; >} > >int extra_size_node::force_tprint() >{ > return 0; >} > >int vertical_size_node::same(node *nd) >{ > return n == ((vertical_size_node *)nd)->n; >} > >const char *vertical_size_node::type() >{ > return "vertical_size_node"; >} > >int vertical_size_node::set_unformat_flag() >{ > return 0; >} > >int vertical_size_node::force_tprint() >{ > return 0; >} > >int hmotion_node::same(node *nd) >{ > return n == ((hmotion_node *)nd)->n > && col == ((hmotion_node *)nd)->col; >} > >const char *hmotion_node::type() >{ > return "hmotion_node"; >} > >int hmotion_node::set_unformat_flag() >{ > unformat = 1; > return 1; >} > >int hmotion_node::force_tprint() >{ > return 0; >} > >node *hmotion_node::add_self(node *n, hyphen_list **p) >{ > next = n; > hyphen_list *pp = *p; > *p = (*p)->next; > delete pp; > return this; >} > >hyphen_list *hmotion_node::get_hyphen_list(hyphen_list *tail) >{ > return new hyphen_list(0, tail); >} > >int space_char_hmotion_node::same(node *nd) >{ > return n == ((space_char_hmotion_node *)nd)->n > && col == ((space_char_hmotion_node *)nd)->col; >} > >const char *space_char_hmotion_node::type() >{ > return "space_char_hmotion_node"; >} > >int space_char_hmotion_node::force_tprint() >{ > return 0; >} > >node *space_char_hmotion_node::add_self(node *n, hyphen_list **p) >{ > next = n; > hyphen_list *pp = *p; > *p = (*p)->next; > delete pp; > return this; >} > >hyphen_list *space_char_hmotion_node::get_hyphen_list(hyphen_list *tail) >{ > return new hyphen_list(0, tail); >} > >int vmotion_node::same(node *nd) >{ > return n == ((vmotion_node *)nd)->n > && col == ((vmotion_node *)nd)->col; >} > >const char *vmotion_node::type() >{ > return "vmotion_node"; >} > >int vmotion_node::force_tprint() >{ > return 0; >} > >int hline_node::same(node *nd) >{ > return x == ((hline_node *)nd)->x && same_node(n, ((hline_node *)nd)->n); >} > >const char *hline_node::type() >{ > return "hline_node"; >} > >int hline_node::force_tprint() >{ > return 0; >} > >int vline_node::same(node *nd) >{ > return x == ((vline_node *)nd)->x && same_node(n, ((vline_node *)nd)->n); >} > >const char *vline_node::type() >{ > return "vline_node"; >} > >int vline_node::force_tprint() >{ > return 0; >} > >int dummy_node::same(node * ) >{ > return 1; >} > >const char *dummy_node::type() >{ > return "dummy_node"; >} > >int dummy_node::force_tprint() >{ > return 0; >} > >int transparent_dummy_node::same(node * ) >{ > return 1; >} > >const char *transparent_dummy_node::type() >{ > return "transparent_dummy_node"; >} > >int transparent_dummy_node::force_tprint() >{ > return 0; >} > >int transparent_dummy_node::ends_sentence() >{ > return 2; >} > >int zero_width_node::same(node *nd) >{ > return same_node_list(n, ((zero_width_node *)nd)->n); >} > >const char *zero_width_node::type() >{ > return "zero_width_node"; >} > >int zero_width_node::force_tprint() >{ > return 0; >} > >int italic_corrected_node::same(node *nd) >{ > return (x == ((italic_corrected_node *)nd)->x > && same_node(n, ((italic_corrected_node *)nd)->n)); >} > >const char *italic_corrected_node::type() >{ > return "italic_corrected_node"; >} > >int italic_corrected_node::force_tprint() >{ > return 0; >} > >left_italic_corrected_node::left_italic_corrected_node(node *x) >: node(x), n(0) >{ >} > >left_italic_corrected_node::~left_italic_corrected_node() >{ > delete n; >} > >node *left_italic_corrected_node::merge_glyph_node(glyph_node *gn) >{ > if (n == 0) { > hunits lic = gn->left_italic_correction(); > if (!lic.is_zero()) { > x = lic; > n = gn; > return this; > } > } > else { > node *nd = n->merge_glyph_node(gn); > if (nd) { > n = nd; > x = n->left_italic_correction(); > return this; > } > } > return 0; >} > >node *left_italic_corrected_node::copy() >{ > left_italic_corrected_node *nd = new left_italic_corrected_node; > if (n) { > nd->n = n->copy(); > nd->x = x; > } > return nd; >} > >void left_italic_corrected_node::tprint(troff_output_file *out) >{ > if (n) { > out->right(x); > n->tprint(out); > } >} > >const char *left_italic_corrected_node::type() >{ > return "left_italic_corrected_node"; >} > >int left_italic_corrected_node::force_tprint() >{ > return 0; >} > >int left_italic_corrected_node::same(node *nd) >{ > return (x == ((left_italic_corrected_node *)nd)->x > && same_node(n, ((left_italic_corrected_node *)nd)->n)); >} > >void left_italic_corrected_node::ascii_print(ascii_output_file *out) >{ > if (n) > n->ascii_print(out); >} > >hunits left_italic_corrected_node::width() >{ > return n ? n->width() + x : H0; >} > >void left_italic_corrected_node::vertical_extent(vunits *min, vunits *max) >{ > if (n) > n->vertical_extent(min, max); > else > node::vertical_extent(min, max); >} > >hunits left_italic_corrected_node::skew() >{ > return n ? n->skew() + x/2 : H0; >} > >hunits left_italic_corrected_node::subscript_correction() >{ > return n ? n->subscript_correction() : H0; >} > >hunits left_italic_corrected_node::italic_correction() >{ > return n ? n->italic_correction() : H0; >} > >int left_italic_corrected_node::ends_sentence() >{ > return n ? n->ends_sentence() : 0; >} > >int left_italic_corrected_node::overlaps_horizontally() >{ > return n ? n->overlaps_horizontally() : 0; >} > >int left_italic_corrected_node::overlaps_vertically() >{ > return n ? n->overlaps_vertically() : 0; >} > >node *left_italic_corrected_node::last_char_node() >{ > return n ? n->last_char_node() : 0; >} > >tfont *left_italic_corrected_node::get_tfont() >{ > return n ? n->get_tfont() : 0; >} > >hyphenation_type left_italic_corrected_node::get_hyphenation_type() >{ > if (n) > return n->get_hyphenation_type(); > else > return HYPHEN_MIDDLE; >} > >hyphen_list *left_italic_corrected_node::get_hyphen_list(hyphen_list *tail) >{ > return n ? n->get_hyphen_list(tail) : tail; >} > >node *left_italic_corrected_node::add_self(node *nd, hyphen_list **p) >{ > if (n) { > nd = new left_italic_corrected_node(nd); > nd = n->add_self(nd, p); > n = 0; > delete this; > } > return nd; >} > >int left_italic_corrected_node::character_type() >{ > return n ? n->character_type() : 0; >} > >int overstrike_node::same(node *nd) >{ > return same_node_list(list, ((overstrike_node *)nd)->list); >} > >const char *overstrike_node::type() >{ > return "overstrike_node"; >} > >int overstrike_node::force_tprint() >{ > return 0; >} > >node *overstrike_node::add_self(node *n, hyphen_list **p) >{ > next = n; > hyphen_list *pp = *p; > *p = (*p)->next; > delete pp; > return this; >} > >hyphen_list *overstrike_node::get_hyphen_list(hyphen_list *tail) >{ > return new hyphen_list(0, tail); >} > >int bracket_node::same(node *nd) >{ > return same_node_list(list, ((bracket_node *)nd)->list); >} > >const char *bracket_node::type() >{ > return "bracket_node"; >} > >int bracket_node::force_tprint() >{ > return 0; >} > >int composite_node::same(node *nd) >{ > return ci == ((composite_node *)nd)->ci > && same_node_list(n, ((composite_node *)nd)->n); >} > >const char *composite_node::type() >{ > return "composite_node"; >} > >int composite_node::force_tprint() >{ > return 0; >} > >int glyph_node::same(node *nd) >{ > return ci == ((glyph_node *)nd)->ci > && tf == ((glyph_node *)nd)->tf > && gcol == ((glyph_node *)nd)->gcol > && fcol == ((glyph_node *)nd)->fcol; >} > >const char *glyph_node::type() >{ > return "glyph_node"; >} > >int glyph_node::force_tprint() >{ > return 0; >} > >int ligature_node::same(node *nd) >{ > return (same_node(n1, ((ligature_node *)nd)->n1) > && same_node(n2, ((ligature_node *)nd)->n2) > && glyph_node::same(nd)); >} > >const char *ligature_node::type() >{ > return "ligature_node"; >} > >int ligature_node::force_tprint() >{ > return 0; >} > >int kern_pair_node::same(node *nd) >{ > return (amount == ((kern_pair_node *)nd)->amount > && same_node(n1, ((kern_pair_node *)nd)->n1) > && same_node(n2, ((kern_pair_node *)nd)->n2)); >} > >const char *kern_pair_node::type() >{ > return "kern_pair_node"; >} > >int kern_pair_node::force_tprint() >{ > return 0; >} > >int dbreak_node::same(node *nd) >{ > return (same_node_list(none, ((dbreak_node *)nd)->none) > && same_node_list(pre, ((dbreak_node *)nd)->pre) > && same_node_list(post, ((dbreak_node *)nd)->post)); >} > >const char *dbreak_node::type() >{ > return "dbreak_node"; >} > >int dbreak_node::force_tprint() >{ > return 0; >} > >int break_char_node::same(node *nd) >{ > return break_code == ((break_char_node *)nd)->break_code > && col == ((break_char_node *)nd)->col > && same_node(ch, ((break_char_node *)nd)->ch); >} > >const char *break_char_node::type() >{ > return "break_char_node"; >} > >int break_char_node::force_tprint() >{ > return 0; >} > >int line_start_node::same(node * ) >{ > return 1; >} > >const char *line_start_node::type() >{ > return "line_start_node"; >} > >int line_start_node::force_tprint() >{ > return 0; >} > >int space_node::same(node *nd) >{ > return n == ((space_node *)nd)->n > && set == ((space_node *)nd)->set > && col == ((space_node *)nd)->col; >} > >const char *space_node::type() >{ > return "space_node"; >} > >int word_space_node::same(node *nd) >{ > return n == ((word_space_node *)nd)->n > && set == ((word_space_node *)nd)->set > && col == ((word_space_node *)nd)->col; >} > >const char *word_space_node::type() >{ > return "word_space_node"; >} > >int word_space_node::force_tprint() >{ > return 0; >} > >int unbreakable_space_node::same(node *nd) >{ > return n == ((unbreakable_space_node *)nd)->n > && set == ((unbreakable_space_node *)nd)->set > && col == ((unbreakable_space_node *)nd)->col; >} > >const char *unbreakable_space_node::type() >{ > return "unbreakable_space_node"; >} > >node *unbreakable_space_node::add_self(node *n, hyphen_list **p) >{ > next = n; > hyphen_list *pp = *p; > *p = (*p)->next; > delete pp; > return this; >} > >hyphen_list *unbreakable_space_node::get_hyphen_list(hyphen_list *tail) >{ > return new hyphen_list(0, tail); >} > >int diverted_space_node::same(node *nd) >{ > return n == ((diverted_space_node *)nd)->n; >} > >const char *diverted_space_node::type() >{ > return "diverted_space_node"; >} > >int diverted_space_node::force_tprint() >{ > return 0; >} > >int diverted_copy_file_node::same(node *nd) >{ > return filename == ((diverted_copy_file_node *)nd)->filename; >} > >const char *diverted_copy_file_node::type() >{ > return "diverted_copy_file_node"; >} > >int diverted_copy_file_node::force_tprint() >{ > return 0; >} > > > >static void grow_font_table(int n) >{ > do_assert(n >= font_table_size, 5290, "node.cc"); > font_info **old_font_table = font_table; > int old_font_table_size = font_table_size; > font_table_size = font_table_size ? (font_table_size*3)/2 : 10; > if (font_table_size <= n) > font_table_size = n + 10; > font_table = new font_info *[font_table_size]; > if (old_font_table_size) > memcpy(font_table, old_font_table, > old_font_table_size*sizeof(font_info *)); > delete [] old_font_table; > for (int i = old_font_table_size; i < font_table_size; i++) > font_table[i] = 0; >} > >dictionary font_translation_dictionary(17); > >static symbol get_font_translation(symbol nm) >{ > void *p = font_translation_dictionary.lookup(nm); > return p ? symbol((char *)p) : nm; >} > >dictionary font_dictionary(50); > >static int mount_font_no_translate(int n, symbol name, symbol external_name) >{ > do_assert(n >= 0, 5317, "node.cc"); > > > static char a_char; > font *fm = 0; > void *p = font_dictionary.lookup(external_name); > if (p == 0) { > int not_found; > fm = font::load_font(external_name.contents(), ¬_found); > if (!fm) { > if (not_found) > warning(WARN_FONT, "can't find font `%1'", external_name.contents()); > font_dictionary.lookup(external_name, &a_char); > return 0; > } > font_dictionary.lookup(name, fm); > } > else if (p == &a_char) { > > > > return 0; > } > else > fm = (font*)p; > if (n >= font_table_size) { > if (n - font_table_size > 1000) { > error("font position too much larger than first unused position"); > return 0; > } > grow_font_table(n); > } > else if (font_table[n] != 0) > delete font_table[n]; > font_table[n] = new font_info(name, n, external_name, fm); > font_family::invalidate_fontno(n); > return 1; >} > >int mount_font(int n, symbol name, symbol external_name) >{ > do_assert(n >= 0, 5358, "node.cc"); > name = get_font_translation(name); > if (external_name.is_null()) > external_name = name; > else > external_name = get_font_translation(external_name); > return mount_font_no_translate(n, name, external_name); >} > >void mount_style(int n, symbol name) >{ > do_assert(n >= 0, 5369, "node.cc"); > if (n >= font_table_size) { > if (n - font_table_size > 1000) { > error("font position too much larger than first unused position"); > return; > } > grow_font_table(n); > } > else if (font_table[n] != 0) > delete font_table[n]; > font_table[n] = new font_info(get_font_translation(name), n, NULL_SYMBOL, 0); > font_family::invalidate_fontno(n); >} > > > >void font_translate() >{ > symbol from = get_name(1); > if (!from.is_null()) { > symbol to = get_name(); > if (to.is_null() || from == to) > font_translation_dictionary.remove(from); > else > font_translation_dictionary.lookup(from, (void *)to.contents()); > } > skip_line(); >} > >void font_position() >{ > int n; > if (get_integer(&n)) { > if (n < 0) > error("negative font position"); > else { > symbol internal_name = get_name(1); > if (!internal_name.is_null()) { > symbol external_name = get_long_name(0); > mount_font(n, internal_name, external_name); > } > } > } > skip_line(); >} > >font_family::font_family(symbol s) >: map_size(10), nm(s) >{ > map = new int[map_size]; > for (int i = 0; i < map_size; i++) > map[i] = -1; >} > >font_family::~font_family() >{ > delete [] map; >} > >int font_family::make_definite(int i) >{ > if (i >= 0) { > if (i < map_size && map[i] >= 0) > return map[i]; > else { > if (i < font_table_size && font_table[i] != 0) { > if (i >= map_size) { > int old_map_size = map_size; > int *old_map = map; > map_size *= 3; > map_size /= 2; > if (i >= map_size) > map_size = i + 10; > map = new int[map_size]; > memcpy(map, old_map, old_map_size*sizeof(int)); > delete [] old_map; > for (int j = old_map_size; j < map_size; j++) > map[j] = -1; > } > if (font_table[i]->is_style()) { > symbol sty = font_table[i]->get_name(); > symbol f = concat(nm, sty); > int n; > > > for (n = 0; n < font_table_size; n++) > if (font_table[n] != 0 && font_table[n]->is_named(f) > && !font_table[n]->is_style()) > break; > if (n >= font_table_size) { > n = next_available_font_position(); > if (!mount_font_no_translate(n, f, f)) > return -1; > } > return map[i] = n; > } > else > return map[i] = i; > } > else > return -1; > } > } > else > return -1; >} > >dictionary family_dictionary(5); > >font_family *lookup_family(symbol nm) >{ > font_family *f = (font_family *)family_dictionary.lookup(nm); > if (!f) { > f = new font_family(nm); > (void)family_dictionary.lookup(nm, f); > } > return f; >} > >void font_family::invalidate_fontno(int n) >{ > do_assert(n >= 0 && n < font_table_size, 5490, "node.cc"); > dictionary_iterator iter(family_dictionary); > symbol nm; > font_family *fam; > while (iter.get(&nm, (void **)&fam)) { > int map_size = fam->map_size; > if (n < map_size) > fam->map[n] = -1; > for (int i = 0; i < map_size; i++) > if (fam->map[i] == n) > fam->map[i] = -1; > } >} > >void style() >{ > int n; > if (get_integer(&n)) { > if (n < 0) > error("negative font position"); > else { > symbol internal_name = get_name(1); > if (!internal_name.is_null()) > mount_style(n, internal_name); > } > } > skip_line(); >} > >static int get_fontno() >{ > int n; > tok.skip(); > if (tok.delimiter()) { > symbol s = get_name(1); > if (!s.is_null()) { > n = symbol_fontno(s); > if (n < 0) { > n = next_available_font_position(); > if (!mount_font(n, s)) > return -1; > } > return curenv->get_family()->make_definite(n); > } > } > else if (get_integer(&n)) { > if (n < 0 || n >= font_table_size || font_table[n] == 0) > error("bad font number"); > else > return curenv->get_family()->make_definite(n); > } > return -1; >} > >static int underline_fontno = 2; > >void underline_font() >{ > int n = get_fontno(); > if (n >= 0) > underline_fontno = n; > skip_line(); >} > >int get_underline_fontno() >{ > return underline_fontno; >} > >static void read_special_fonts(special_font_list **sp) >{ > special_font_list *s = *sp; > *sp = 0; > while (s != 0) { > special_font_list *tem = s; > s = s->next; > delete tem; > } > special_font_list **p = sp; > while (has_arg()) { > int i = get_fontno(); > if (i >= 0) { > special_font_list *tem = new special_font_list; > tem->n = i; > tem->next = 0; > *p = tem; > p = &(tem->next); > } > } >} > >void font_special_request() >{ > int n = get_fontno(); > if (n >= 0) > read_special_fonts(&font_table[n]->sf); > skip_line(); >} > >void special_request() >{ > read_special_fonts(&global_special_fonts); > skip_line(); >} > >int next_available_font_position() >{ > int i; > for (i = 1; i < font_table_size && font_table[i] != 0; i++) > ; > return i; >} > >int symbol_fontno(symbol s) >{ > s = get_font_translation(s); > for (int i = 0; i < font_table_size; i++) > if (font_table[i] != 0 && font_table[i]->is_named(s)) > return i; > return -1; >} > >int is_good_fontno(int n) >{ > return n >= 0 && n < font_table_size && font_table[n] != 0; >} > >int get_bold_fontno(int n) >{ > if (n >= 0 && n < font_table_size && font_table[n] != 0) { > hunits offset; > if (font_table[n]->get_bold(&offset)) > return offset.to_units() + 1; > else > return 0; > } > else > return 0; >} > >hunits env_digit_width(environment *env) >{ > node *n = make_glyph_node(charset_table['0'], env); > if (n) { > hunits x = n->width(); > delete n; > return x; > } > else > return H0; >} > >hunits env_space_width(environment *env) >{ > int fn = env_definite_font(env); > font_size fs = env->get_font_size(); > if (fn < 0 || fn >= font_table_size || font_table[fn] == 0) > return scale(fs.to_units()/3, env->get_space_size(), 12); > else > return font_table[fn]->get_space_width(fs, env->get_space_size()); >} > >hunits env_sentence_space_width(environment *env) >{ > int fn = env_definite_font(env); > font_size fs = env->get_font_size(); > if (fn < 0 || fn >= font_table_size || font_table[fn] == 0) > return scale(fs.to_units()/3, env->get_sentence_space_size(), 12); > else > return font_table[fn]->get_space_width(fs, env->get_sentence_space_size()); >} > >hunits env_half_narrow_space_width(environment *env) >{ > int fn = env_definite_font(env); > font_size fs = env->get_font_size(); > if (fn < 0 || fn >= font_table_size || font_table[fn] == 0) > return 0; > else > return font_table[fn]->get_half_narrow_space_width(fs); >} > >hunits env_narrow_space_width(environment *env) >{ > int fn = env_definite_font(env); > font_size fs = env->get_font_size(); > if (fn < 0 || fn >= font_table_size || font_table[fn] == 0) > return 0; > else > return font_table[fn]->get_narrow_space_width(fs); >} > >void bold_font() >{ > int n = get_fontno(); > if (n >= 0) { > if (has_arg()) { > if (tok.delimiter()) { > int f = get_fontno(); > if (f >= 0) { > units offset; > if (has_arg() && get_number(&offset, 'u') && offset >= 1) > font_table[f]->set_conditional_bold(n, hunits(offset - 1)); > else > font_table[f]->conditional_unbold(n); > } > } > else { > units offset; > if (get_number(&offset, 'u') && offset >= 1) > font_table[n]->set_bold(hunits(offset - 1)); > else > font_table[n]->unbold(); > } > } > else > font_table[n]->unbold(); > } > skip_line(); >} > >track_kerning_function::track_kerning_function() : non_zero(0) >{ >} > >track_kerning_function::track_kerning_function(int min_s, hunits min_a, > int max_s, hunits max_a) >: non_zero(1), min_size(min_s), min_amount(min_a), max_size(max_s), > max_amount(max_a) >{ >} > >int track_kerning_function::operator==(const track_kerning_function &tk) >{ > if (non_zero) > return (tk.non_zero > && min_size == tk.min_size > && min_amount == tk.min_amount > && max_size == tk.max_size > && max_amount == tk.max_amount); > else > return !tk.non_zero; >} > >int track_kerning_function::operator!=(const track_kerning_function &tk) >{ > if (non_zero) > return (!tk.non_zero > || min_size != tk.min_size > || min_amount != tk.min_amount > || max_size != tk.max_size > || max_amount != tk.max_amount); > else > return tk.non_zero; >} > >hunits track_kerning_function::compute(int size) >{ > if (non_zero) { > if (max_size <= min_size) > return min_amount; > else if (size <= min_size) > return min_amount; > else if (size >= max_size) > return max_amount; > else > return (scale(max_amount, size - min_size, max_size - min_size) > + scale(min_amount, max_size - size, max_size - min_size)); > } > else > return H0; >} > >void track_kern() >{ > int n = get_fontno(); > if (n >= 0) { > int min_s, max_s; > hunits min_a, max_a; > if (has_arg() > && get_number(&min_s, 'z') > && get_hunits(&min_a, 'p') > && get_number(&max_s, 'z') > && get_hunits(&max_a, 'p')) { > track_kerning_function tk(min_s, min_a, max_s, max_a); > font_table[n]->set_track_kern(tk); > } > else { > track_kerning_function tk; > font_table[n]->set_track_kern(tk); > } > } > skip_line(); >} > >void constant_space() >{ > int n = get_fontno(); > if (n >= 0) { > int x, y; > if (!has_arg() || !get_integer(&x)) > font_table[n]->set_constant_space(CONSTANT_SPACE_NONE); > else { > if (!has_arg() || !get_number(&y, 'z')) > font_table[n]->set_constant_space(CONSTANT_SPACE_RELATIVE, x); > else > font_table[n]->set_constant_space(CONSTANT_SPACE_ABSOLUTE, > scale(y*x, > units_per_inch, > 36*72*sizescale)); > } > } > skip_line(); >} > >void ligature() >{ > int lig; > if (has_arg() && get_integer(&lig) && lig >= 0 && lig <= 2) > global_ligature_mode = lig; > else > global_ligature_mode = 1; > skip_line(); >} > >void kern_request() >{ > int k; > if (has_arg() && get_integer(&k)) > global_kern_mode = k != 0; > else > global_kern_mode = 1; > skip_line(); >} > >void set_soft_hyphen_char() >{ > soft_hyphen_char = get_optional_char(); > if (!soft_hyphen_char) > soft_hyphen_char = get_charinfo(HYPHEN_SYMBOL); > skip_line(); >} > >void init_output() >{ > if (suppress_output_flag) > the_output = new suppress_output_file; > else if (ascii_output_flag) > the_output = new ascii_output_file; > else > the_output = new troff_output_file; >} > >class next_available_font_position_reg : public reg { >public: > const char *get_string(); >}; > >const char *next_available_font_position_reg::get_string() >{ > return i_to_a(next_available_font_position()); >} > >class printing_reg : public reg { >public: > const char *get_string(); >}; > >const char *printing_reg::get_string() >{ > if (the_output) > return the_output->is_printing() ? "1" : "0"; > else > return "0"; >} > >void init_node_requests() >{ > init_request("fp", font_position); > init_request("sty", style); > init_request("cs", constant_space); > init_request("bd", bold_font); > init_request("uf", underline_font); > init_request("lg", ligature); > init_request("kern", kern_request); > init_request("tkf", track_kern); > init_request("special", special_request); > init_request("fspecial", font_special_request); > init_request("ftr", font_translate); > init_request("shc", set_soft_hyphen_char); > number_reg_dictionary.define(".fp", new next_available_font_position_reg); > number_reg_dictionary.define(".kern", > new constant_int_reg(&global_kern_mode)); > number_reg_dictionary.define(".lg", > new constant_int_reg(&global_ligature_mode)); > number_reg_dictionary.define(".P", new printing_reg); > soft_hyphen_char = get_charinfo(HYPHEN_SYMBOL); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 67085
: 41539