# 1 "./src/gdevpdfe.c" # 1 "" # 1 "" # 1 "./src/gdevpdfe.c" # 16 "./src/gdevpdfe.c" # 1 "./src/gx.h" 1 # 20 "./src/gx.h" # 1 "./src/stdio_.h" 1 # 24 "./src/stdio_.h" # 1 "./src/std.h" 1 # 20 "./src/std.h" # 1 "./src/stdpre.h" 1 # 244 "./src/stdpre.h" typedef unsigned char byte; typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; # 264 "./src/stdpre.h" # 1 "/usr/include/sys/types.h" 1 3 4 # 27 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 323 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 313 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 314 "/usr/include/sys/cdefs.h" 2 3 4 # 324 "/usr/include/features.h" 2 3 4 # 346 "/usr/include/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 5 "/usr/include/gnu/stubs.h" 2 3 4 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4 # 8 "/usr/include/gnu/stubs.h" 2 3 4 # 347 "/usr/include/features.h" 2 3 4 # 28 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 28 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/bits/types.h" 2 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 214 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef unsigned int size_t; # 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; # 134 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 135 "/usr/include/bits/types.h" 2 3 4 __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __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 __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef void * __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __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; # 32 "/usr/include/sys/types.h" 2 3 4 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; # 62 "/usr/include/sys/types.h" 3 4 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; # 100 "/usr/include/sys/types.h" 3 4 typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 75 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 93 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 105 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/sys/types.h" 2 3 4 # 147 "/usr/include/sys/types.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong_; typedef unsigned short int ushort_; typedef unsigned int uint_; # 195 "/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__))); # 217 "/usr/include/sys/types.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 # 218 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 31 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 23 "/usr/include/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 121 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 69 "/usr/include/bits/time.h" 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/sys/select.h" 2 3 4 typedef __suseconds_t suseconds_t; 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 # 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); # 221 "/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) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__)); __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 224 "/usr/include/sys/types.h" 2 3 4 # 235 "/usr/include/sys/types.h" 3 4 typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 270 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 36 "/usr/include/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; long int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; long int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; unsigned int __flags; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 271 "/usr/include/sys/types.h" 2 3 4 # 265 "./src/stdpre.h" 2 # 285 "./src/stdpre.h" typedef int bool; # 322 "./src/stdpre.h" typedef const char *ptr_ord_t; # 363 "./src/stdpre.h" typedef double floatp; # 391 "./src/stdpre.h" typedef const char *client_name_t; # 419 "./src/stdpre.h" # 1 "./src/stdpn.h" 1 # 420 "./src/stdpre.h" 2 # 21 "./src/std.h" 2 # 1 "./obj/../soobj/arch.h" 1 # 24 "./src/std.h" 2 # 68 "./src/std.h" typedef ushort bits16; typedef uint bits32; # 142 "./src/std.h" # 1 "/usr/include/stdio.h" 1 3 4 # 30 "/usr/include/stdio.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 35 "/usr/include/stdio.h" 2 3 4 # 44 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE FILE; # 62 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE __FILE; # 72 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/libio.h" 1 3 4 # 32 "/usr/include/libio.h" 3 4 # 1 "/usr/include/_G_config.h" 1 3 4 # 14 "/usr/include/_G_config.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 326 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef long int wchar_t; # 355 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4 typedef unsigned int wint_t; # 15 "/usr/include/_G_config.h" 2 3 4 # 24 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 51 "/usr/include/wchar.h" 2 3 4 # 76 "/usr/include/wchar.h" 3 4 typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; # 25 "/usr/include/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 44 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/gconv.h" 1 3 4 # 28 "/usr/include/gconv.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 29 "/usr/include/gconv.h" 2 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 32 "/usr/include/gconv.h" 2 3 4 enum { __GCONV_OK = 0, __GCONV_NOCONV, __GCONV_NODB, __GCONV_NOMEM, __GCONV_EMPTY_INPUT, __GCONV_FULL_OUTPUT, __GCONV_ILLEGAL_INPUT, __GCONV_INCOMPLETE_INPUT, __GCONV_ILLEGAL_DESCRIPTOR, __GCONV_INTERNAL_ERROR }; enum { __GCONV_IS_LAST = 0x0001, __GCONV_IGNORE_ERRORS = 0x0002 }; struct __gconv_step; struct __gconv_step_data; struct __gconv_loaded_object; struct __gconv_trans_data; typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *, int, int); typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); typedef int (*__gconv_init_fct) (struct __gconv_step *); typedef void (*__gconv_end_fct) (struct __gconv_step *); typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, __const unsigned char *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *); typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, __const unsigned char *, unsigned char *, unsigned char *); typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, size_t *); typedef int (*__gconv_trans_init_fct) (void **, const char *); typedef void (*__gconv_trans_end_fct) (void *); struct __gconv_trans_data { __gconv_trans_fct __trans_fct; __gconv_trans_context_fct __trans_context_fct; __gconv_trans_end_fct __trans_end_fct; void *__data; struct __gconv_trans_data *__next; }; struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; __const char *__modname; int __counter; char *__from_name; char *__to_name; __gconv_fct __fct; __gconv_btowc_fct __btowc_fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct __gconv_step_data __data []; } *__gconv_t; # 45 "/usr/include/_G_config.h" 2 3 4 typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); # 33 "/usr/include/libio.h" 2 3 4 # 53 "/usr/include/libio.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 1 3 4 # 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 # 166 "/usr/include/libio.h" 3 4 struct _IO_jump_t; struct _IO_FILE; # 176 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 199 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 267 "/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; # 315 "/usr/include/libio.h" 3 4 __off64_t _offset; # 324 "/usr/include/libio.h" 3 4 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; typedef struct _IO_FILE _IO_FILE; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 360 "/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); # 412 "/usr/include/libio.h" 3 4 extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__)); extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__)); extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__)); # 450 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__)); extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); # 480 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__)); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__)); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__)); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__)); extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); # 73 "/usr/include/stdio.h" 2 3 4 # 86 "/usr/include/stdio.h" 3 4 typedef _G_fpos_t fpos_t; # 138 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 139 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); extern FILE *tmpfile (void); # 183 "/usr/include/stdio.h" 3 4 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)); extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)); # 201 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 226 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 240 "/usr/include/stdio.h" 3 4 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes); extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream); # 267 "/usr/include/stdio.h" 3 4 # 278 "/usr/include/stdio.h" 3 4 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)); # 304 "/usr/include/stdio.h" 3 4 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __attribute__ ((__nothrow__)); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __attribute__ ((__nothrow__)); extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); 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, ...) __attribute__ ((__nothrow__)); 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) __attribute__ ((__nothrow__)); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); # 398 "/usr/include/stdio.h" 3 4 extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int scanf (__const char *__restrict __format, ...) ; extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); # 440 "/usr/include/stdio.h" 3 4 extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); # 464 "/usr/include/stdio.h" 3 4 extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 475 "/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); # 508 "/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) ; # 589 "/usr/include/stdio.h" 3 4 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) ; # 642 "/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); # 678 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; # 697 "/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); # 720 "/usr/include/stdio.h" 3 4 # 729 "/usr/include/stdio.h" 3 4 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; 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[]; # 759 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ; extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; # 778 "/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) __attribute__ ((__nothrow__)); # 818 "/usr/include/stdio.h" 3 4 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ; extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); # 848 "/usr/include/stdio.h" 3 4 # 143 "./src/std.h" 2 typedef struct gs_memory_s gs_memory_t; # 164 "./src/std.h" int outwrite(const gs_memory_t *mem, const char *str, int len); int errwrite(const char *str, int len); void outflush(const gs_memory_t *mem); void errflush(void); # 181 "./src/std.h" int outprintf(const gs_memory_t *mem, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3))); int errprintf(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2))); void dprintf_file_and_line(const char *, int); void dflush(void); # 255 "./src/std.h" void printf_program_ident(const gs_memory_t *mem, const char *program_name, long revision_number); void eprintf_program_ident(const char *program_name, long revision_number); const char *gs_program_name(void); long gs_revision_number(void); # 286 "./src/std.h" void lprintf_file_and_line(const char *, int); # 25 "./src/stdio_.h" 2 # 42 "./src/stdio_.h" int unlink(const char *); # 21 "./src/gx.h" 2 # 1 "./src/gserror.h" 1 # 20 "./src/gserror.h" int gs_log_error(int, const char *, int); # 43 "./src/gserror.h" const char *gs_errstr(int code); int gs_throw_imp(const char *func, const char *file, int line, int op, int code, const char *fmt, ...) __attribute__((__format__ (__printf__, 6, 7))); # 22 "./src/gx.h" 2 # 1 "./src/gsio.h" 1 # 23 "./src/gx.h" 2 # 1 "./src/gstypes.h" 1 # 26 "./src/gstypes.h" typedef ulong gs_id; # 43 "./src/gstypes.h" typedef struct gs_string_s { byte *data; uint size; } gs_string; typedef struct gs_const_string_s { const byte *data; uint size; } gs_const_string; typedef struct gs_param_string_s { const byte *data; uint size; bool persistent; } gs_param_string; # 69 "./src/gstypes.h" typedef struct gs_bytestring_s { byte *data; uint size; byte *bytes; } gs_bytestring; typedef struct gs_const_bytestring_s { const byte *data; uint size; const byte *bytes; } gs_const_bytestring; # 86 "./src/gstypes.h" typedef struct gs_point_s { double x, y; } gs_point; typedef struct gs_int_point_s { int x, y; } gs_int_point; typedef struct gs_log2_scale_point_s { int x, y; } gs_log2_scale_point; typedef struct gs_rect_s { gs_point p, q; } gs_rect; typedef struct gs_int_rect_s { gs_int_point p, q; } gs_int_rect; typedef struct gs_range_s { float rmin, rmax; } gs_range_t; # 24 "./src/gx.h" 2 # 1 "./src/gsmemory.h" 1 # 41 "./src/gsmemory.h" # 1 "./src/gslibctx.h" 1 # 20 "./src/gslibctx.h" # 1 "./src/gs_dll_call.h" 1 # 21 "./src/gslibctx.h" 2 typedef struct name_table_s *name_table_ptr; typedef struct gs_lib_ctx_s { gs_memory_t *memory; FILE *fstdin; FILE *fstdout; FILE *fstderr; FILE *fstdout2; bool stdout_is_redirected; bool stdout_to_stderr; bool stdin_is_interactive; void *caller_handle; int ( *stdin_fn)(void *caller_handle, char *buf, int len); int ( *stdout_fn)(void *caller_handle, const char *str, int len); int ( *stderr_fn)(void *caller_handle, const char *str, int len); int ( *poll_fn)(void *caller_handle); ulong gs_next_id; void *top_of_system; name_table_ptr gs_name_table; bool dict_auto_expand; } gs_lib_ctx_t; int gs_lib_ctx_init( gs_memory_t *mem ); void *gs_lib_ctx_get_interp_instance( gs_memory_t *mem ); const gs_memory_t * gs_lib_ctx_get_non_gc_memory_t(void); # 42 "./src/gsmemory.h" 2 typedef struct gs_memory_struct_type_s gs_memory_struct_type_t; typedef const gs_memory_struct_type_t *gs_memory_type_ptr_t; # 55 "./src/gsmemory.h" typedef struct gs_ptr_procs_s gs_ptr_procs_t; typedef const gs_ptr_procs_t *gs_ptr_type_t; typedef struct gs_gc_root_s gs_gc_root_t; typedef client_name_t struct_name_t; uint gs_struct_type_size(gs_memory_type_ptr_t); struct_name_t gs_struct_type_name(gs_memory_type_ptr_t); typedef struct gs_memory_status_s { ulong allocated; ulong used; } gs_memory_status_t; # 222 "./src/gsmemory.h" typedef struct gs_memory_procs_s { byte *(*alloc_bytes_immovable)(gs_memory_t *mem, uint nbytes, client_name_t cname); void *(*resize_object)(gs_memory_t *mem, void *obj, uint new_num_elements, client_name_t cname); void (*free_object)(gs_memory_t *mem, void *data, client_name_t cname); gs_memory_t *(*stable)(gs_memory_t *mem); void (*status)(gs_memory_t *mem, gs_memory_status_t *status); void (*free_all)(gs_memory_t *mem, uint free_mask, client_name_t cname); void (*consolidate_free)(gs_memory_t *mem); # 250 "./src/gsmemory.h" byte *(*alloc_bytes)(gs_memory_t *mem, uint nbytes, client_name_t cname); # 261 "./src/gsmemory.h" void *(*alloc_struct)(gs_memory_t *mem, gs_memory_type_ptr_t pstype, client_name_t cname); void *(*alloc_struct_immovable)(gs_memory_t *mem, gs_memory_type_ptr_t pstype, client_name_t cname); # 275 "./src/gsmemory.h" byte *(*alloc_byte_array)(gs_memory_t *mem, uint num_elements, uint elt_size, client_name_t cname); byte *(*alloc_byte_array_immovable)(gs_memory_t *mem, uint num_elements, uint elt_size, client_name_t cname); # 289 "./src/gsmemory.h" void *(*alloc_struct_array)(gs_memory_t *mem, uint num_elements, gs_memory_type_ptr_t pstype, client_name_t cname); void *(*alloc_struct_array_immovable)(gs_memory_t *mem, uint num_elements, gs_memory_type_ptr_t pstype, client_name_t cname); # 302 "./src/gsmemory.h" uint (*object_size)(gs_memory_t *mem, const void *obj); # 314 "./src/gsmemory.h" gs_memory_type_ptr_t (*object_type)(gs_memory_t *mem, const void *obj); # 324 "./src/gsmemory.h" byte *(*alloc_string)(gs_memory_t *mem, uint nbytes, client_name_t cname); byte *(*alloc_string_immovable)(gs_memory_t *mem, uint nbytes, client_name_t cname); # 339 "./src/gsmemory.h" byte *(*resize_string)(gs_memory_t *mem, byte *data, uint old_num, uint new_num, client_name_t cname); # 350 "./src/gsmemory.h" void (*free_string)(gs_memory_t *mem, byte *data, uint nbytes, client_name_t cname); # 364 "./src/gsmemory.h" int (*register_root)(gs_memory_t *mem, gs_gc_root_t *root, gs_ptr_type_t ptype, void **pp, client_name_t cname); # 375 "./src/gsmemory.h" void (*unregister_root)(gs_memory_t *mem, gs_gc_root_t *root, client_name_t cname); # 390 "./src/gsmemory.h" void (*enable_free)(gs_memory_t *mem, bool enable); } gs_memory_procs_t; void gs_free_const_object(gs_memory_t *mem, const void *data, client_name_t cname); void gs_free_const_string(gs_memory_t *mem, const byte *data, uint nbytes, client_name_t cname); void gs_free_bytestring(gs_memory_t *mem, gs_bytestring *pbs, client_name_t cname); void gs_free_const_bytestring(gs_memory_t *mem, gs_const_bytestring *pbs, client_name_t cname); void *gs_resize_struct_array(gs_memory_t *mem, void *obj, uint num_elements, gs_memory_type_ptr_t pstype, client_name_t cname); int gs_register_struct_root(gs_memory_t *mem, gs_gc_root_t *root, void **pp, client_name_t cname); void gs_ignore_free_object(gs_memory_t *mem, void *data, client_name_t cname); void gs_ignore_free_string(gs_memory_t *mem, byte *data, uint nbytes, client_name_t cname); void gs_ignore_consolidate_free(gs_memory_t *mem); void *gs_raw_alloc_struct_immovable(gs_memory_t * rmem, gs_memory_type_ptr_t pstype, client_name_t cname); typedef struct pl_mem_node_s pl_mem_node_t; # 468 "./src/gsmemory.h" struct gs_memory_s { gs_memory_t *stable_memory; gs_memory_procs_t procs; gs_lib_ctx_t *gs_lib_ctx; pl_mem_node_t *head; gs_memory_t *non_gc_memory; }; # 25 "./src/gx.h" 2 # 1 "./src/gdebug.h" 1 # 50 "./src/gdebug.h" extern char gs_debug[128]; bool gs_debug_c(int ); # 60 "./src/gdebug.h" extern FILE *gs_debug_out; # 114 "./src/gdebug.h" void debug_dump_bytes(const byte * from, const byte * to, const char *msg); void debug_dump_bitmap(const byte * from, uint raster, uint height, const char *msg); void debug_print_string(const byte * str, uint len); void debug_print_string_hex(const byte * str, uint len); # 26 "./src/gx.h" 2 typedef struct gs_imager_state_s gs_imager_state; typedef struct gs_state_s gs_state; # 17 "./src/gdevpdfe.c" 2 # 1 "./src/string_.h" 1 # 30 "./src/string_.h" # 1 "/usr/include/string.h" 1 3 4 # 28 "/usr/include/string.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 34 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 82 "/usr/include/string.h" 3 4 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 130 "/usr/include/string.h" 3 4 extern char *strdup (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 165 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 181 "/usr/include/string.h" 3 4 extern size_t strcspn (__const char *__s, __const char *__reject) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); # 240 "/usr/include/string.h" 3 4 extern size_t strlen (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); # 254 "/usr/include/string.h" 3 4 extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); # 270 "/usr/include/string.h" 3 4 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); # 288 "/usr/include/string.h" 3 4 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 325 "/usr/include/string.h" 3 4 extern int strcasecmp (__const char *__s1, __const char *__s2) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 348 "/usr/include/string.h" 3 4 extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); # 426 "/usr/include/string.h" 3 4 # 31 "./src/string_.h" 2 # 18 "./src/gdevpdfe.c" 2 # 1 "./src/time_.h" 1 # 28 "./src/time_.h" # 1 "./obj/../soobj/gconfig_.h" 1 # 29 "./src/time_.h" 2 # 1 "/usr/include/sys/time.h" 1 3 4 # 27 "/usr/include/sys/time.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 28 "/usr/include/sys/time.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 30 "/usr/include/sys/time.h" 2 3 4 # 39 "/usr/include/sys/time.h" 3 4 # 57 "/usr/include/sys/time.h" 3 4 struct timezone { int tz_minuteswest; int tz_dsttime; }; typedef struct timezone *__restrict __timezone_ptr_t; # 73 "/usr/include/sys/time.h" 3 4 extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int settimeofday (__const struct timeval *__tv, __const struct timezone *__tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int adjtime (__const struct timeval *__delta, struct timeval *__olddelta) __attribute__ ((__nothrow__)); enum __itimer_which { ITIMER_REAL = 0, ITIMER_VIRTUAL = 1, ITIMER_PROF = 2 }; struct itimerval { struct timeval it_interval; struct timeval it_value; }; typedef int __itimer_which_t; extern int getitimer (__itimer_which_t __which, struct itimerval *__value) __attribute__ ((__nothrow__)); extern int setitimer (__itimer_which_t __which, __const struct itimerval *__restrict __new, struct itimerval *__restrict __old) __attribute__ ((__nothrow__)); extern int utimes (__const char *__file, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); # 191 "/usr/include/sys/time.h" 3 4 # 36 "./src/time_.h" 2 # 1 "/usr/include/time.h" 1 3 4 # 31 "/usr/include/time.h" 3 4 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4 # 40 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 44 "/usr/include/time.h" 2 3 4 # 59 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 132 "/usr/include/time.h" 3 4 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; # 181 "/usr/include/time.h" 3 4 extern clock_t clock (void) __attribute__ ((__nothrow__)); extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); extern double difftime (time_t __time1, time_t __time0) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); # 229 "/usr/include/time.h" 3 4 extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) __attribute__ ((__nothrow__)); extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) __attribute__ ((__nothrow__)); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) __attribute__ ((__nothrow__)); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); # 312 "/usr/include/time.h" 3 4 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); # 327 "/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) __attribute__ ((__nothrow__)); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) __attribute__ ((__nothrow__)); 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) __attribute__ ((__nothrow__)); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __attribute__ ((__nothrow__)); extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); # 416 "/usr/include/time.h" 3 4 # 43 "./src/time_.h" 2 # 78 "./src/time_.h" # 1 "/usr/include/sys/times.h" 1 3 4 # 32 "/usr/include/sys/times.h" 3 4 struct tms { clock_t tms_utime; clock_t tms_stime; clock_t tms_cutime; clock_t tms_cstime; }; extern clock_t times (struct tms *__buffer) __attribute__ ((__nothrow__)); # 79 "./src/time_.h" 2 # 19 "./src/gdevpdfe.c" 2 # 1 "./src/stream.h" 1 # 21 "./src/stream.h" # 1 "./src/scommon.h" 1 # 22 "./src/scommon.h" # 1 "./src/gsstype.h" 1 # 21 "./src/gsstype.h" typedef struct gc_state_s gc_state_t; typedef struct enum_ptr_s { const void *ptr; uint size; } enum_ptr_t; # 79 "./src/gsstype.h" typedef struct struct_shared_procs_s struct_shared_procs_t; struct gs_memory_struct_type_s { uint ssize; struct_name_t sname; const struct_shared_procs_t *shared; void (*clear_marks)(const gs_memory_t *cmem, void *pre, uint size, const gs_memory_struct_type_t *pstype); gs_ptr_type_t (*enum_ptrs)(const gs_memory_t *mem, const void *ptr, uint size, int index, enum_ptr_t *pep, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); void (*reloc_ptrs)(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); void (*finalize)(void *ptr); const void *proc_data; }; # 23 "./src/scommon.h" 2 # 34 "./src/scommon.h" typedef struct stream_s stream; typedef struct stream_state_s stream_state; # 50 "./src/scommon.h" typedef struct stream_template_s stream_template; # 87 "./src/scommon.h" typedef struct stream_cursor_read_s { const byte *ptr; const byte *limit; byte *_skip; } stream_cursor_read; typedef struct stream_cursor_write_s { const byte *_skip; byte *ptr; byte *limit; } stream_cursor_write; typedef union stream_cursor_s { stream_cursor_read r; stream_cursor_write w; } stream_cursor; # 134 "./src/scommon.h" int s_no_report_error(stream_state *, const char *); # 165 "./src/scommon.h" struct stream_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; }; extern const gs_memory_struct_type_t st_stream_state; # 22 "./src/stream.h" 2 # 1 "./src/srdline.h" 1 # 43 "./src/srdline.h" extern int sreadline(stream *s_in, stream *s_out, void *readline_data, gs_const_string *prompt, gs_string *buf, gs_memory_t *bufmem, uint *pcount, bool *pin_eol, bool (*is_stdin)(const stream *)); # 23 "./src/stream.h" 2 # 35 "./src/stream.h" typedef struct { int (*available)(stream *, long *); int (*seek)(stream *, long); void (*reset)(stream *); int (*flush)(stream *); int (*close)(stream *); int (*process)(stream_state *, stream_cursor_read *, stream_cursor_write *, bool); int (*switch_mode)(stream *, bool); } stream_procs; struct stream_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; # 110 "./src/stream.h" stream_cursor cursor; byte *cbuf; uint bsize; uint cbsize; # 127 "./src/stream.h" short end_status; byte foreign; byte modes; # 139 "./src/stream.h" gs_string cbuf_string; long position; stream_procs procs; stream *strm; int is_temp; int inline_temp; stream_state *state; ushort read_id; ushort write_id; stream *prev, *next; bool close_strm; bool close_at_eod; int (*save_close)(stream *); FILE *file; gs_const_string file_name; uint file_modes; long file_offset; long file_limit; }; extern const gs_memory_struct_type_t st_stream; # 217 "./src/stream.h" int savailable(stream *, long *); int sclose(stream *); int sswitch(stream *, bool); int spgetcc(stream *, bool); # 240 "./src/stream.h" int sgets(stream *, byte *, uint, uint *); int sungetc(stream *, byte); int spskip(stream *, long, long *); int s_process_read_buf(stream *); int spputc(stream *, byte); # 268 "./src/stream.h" int sputs(stream *, const byte *, uint, uint *); int s_process_write_buf(stream *, bool); long stell(stream *); int spseek(stream *, long); # 327 "./src/stream.h" stream *s_alloc(gs_memory_t *, client_name_t); stream_state *s_alloc_state(gs_memory_t *, gs_memory_type_ptr_t, client_name_t); void s_init(stream *, gs_memory_t *); void s_init_state(stream_state *, const stream_template *, gs_memory_t *); void sread_string(stream *, const byte *, uint), sread_string_reusable(stream *, const byte *, uint), swrite_string(stream *, byte *, uint); void sread_file(stream *, FILE *, byte *, uint), swrite_file(stream *, FILE *, byte *, uint), sappend_file(stream *, FILE *, byte *, uint); int sread_subfile(stream *s, long start, long length); int ssetfilename(stream *, const byte *, uint); int sfilename(stream *, gs_const_string *); void swrite_position_only(stream *); void s_std_init(stream *, byte *, uint, const stream_procs *, int ); void s_disable(stream *); int s_std_null(stream *); void s_std_read_reset(stream *), s_std_write_reset(stream *); int s_std_read_flush(stream *), s_std_write_flush(stream *), s_std_noavailable(stream *, long *), s_std_noseek(stream *, long), s_std_close(stream *), s_std_switch_mode(stream *, bool); int s_filter_write_flush(stream *), s_filter_close(stream *); extern const stream_procs s_filter_read_procs, s_filter_write_procs; # 385 "./src/stream.h" int s_init_filter(stream *fs, stream_state *fss, byte *buf, uint bsize, stream *target); stream *s_add_filter(stream **ps, const stream_template *template, stream_state *ss, gs_memory_t *mem); int s_close_filters(stream **ps, stream *target); extern const stream_template s_NullE_template; extern const stream_template s_NullD_template; # 20 "./src/gdevpdfe.c" 2 # 1 "./src/gp.h" 1 # 32 "./src/gp.h" # 1 "./src/gpgetenv.h" 1 # 37 "./src/gpgetenv.h" int gp_getenv(const char *key, char *ptr, int *plen); # 33 "./src/gp.h" 2 # 47 "./src/gp.h" void gp_init(void); void gp_exit(int exit_status, int code); void gp_do_exit(int exit_status); # 68 "./src/gp.h" const char *gp_strerror(int); void gp_get_realtime(long ptm[2]); void gp_get_usertime(long ptm[2]); # 97 "./src/gp.h" int gp_readline_init(void **preadline_data, gs_memory_t *mem); int gp_readline(stream *s_in, stream *s_out, void *readline_data, gs_const_string *prompt, gs_string *buf, gs_memory_t *bufmem, uint *pcount, bool *pin_eol, bool (*is_stdin)(const stream *)); void gp_readline_finit(void *readline_data); # 122 "./src/gp.h" int gp_stdin_read(char *buf, int len, int interactive, FILE *f); # 131 "./src/gp.h" const char *gp_getenv_display(void); # 145 "./src/gp.h" extern const char gp_file_name_list_separator; extern const char gp_scratch_file_name_prefix[]; extern const char gp_null_file_name[]; extern const char gp_current_directory_name[]; extern const char gp_fmode_binary_suffix[]; extern const char gp_fmode_rb[]; extern const char gp_fmode_wb[]; # 182 "./src/gp.h" FILE *gp_open_scratch_file(const char *prefix, char fname[260], const char *mode); FILE *gp_fopen(const char *fname, const char *mode); int gp_setmode_binary(FILE * pfile, bool mode); typedef enum { gp_combine_small_buffer = -1, gp_combine_cant_handle = 0, gp_combine_success = 1 } gp_file_name_combine_result; # 206 "./src/gp.h" gp_file_name_combine_result gp_file_name_combine(const char *prefix, uint plen, const char *fname, uint flen, bool no_sibling, char *buffer, uint *blen); # 218 "./src/gp.h" uint gp_file_name_root(const char *fname, uint len); # 227 "./src/gp.h" uint gs_file_name_check_separator(const char *fname, int len, const char *item); bool gp_file_name_is_parent(const char *fname, uint len); bool gp_file_name_is_current(const char *fname, uint len); const char *gp_file_name_current(void); const char *gp_file_name_separator(void); const char *gp_file_name_directory_separator(void); const char *gp_file_name_parent(void); bool gp_file_name_is_partent_allowed(void); bool gp_file_name_is_empty_item_meanful(void); int gp_read_macresource(byte *buf, const char *fname, const uint type, const ushort id); # 304 "./src/gp.h" int gp_cache_insert(int type, byte *key, int keylen, void *buffer, int buflen); typedef void *(*gp_cache_alloc)(void *userdata, int bytes); int gp_cache_query(int type, byte* key, int keylen, void **buffer, gp_cache_alloc alloc, void *userdata); # 334 "./src/gp.h" FILE *gp_open_printer(char fname[260], int binary_mode); # 343 "./src/gp.h" void gp_close_printer(FILE * pfile, const char *fname); typedef struct file_enum_s file_enum; # 363 "./src/gp.h" file_enum *gp_enumerate_files_init(const char *pat, uint patlen, gs_memory_t * memory); # 373 "./src/gp.h" uint gp_enumerate_files_next(file_enum * pfen, char *ptr, uint maxlen); void gp_enumerate_files_close(file_enum * pfen); # 393 "./src/gp.h" void *gp_enumerate_fonts_init(gs_memory_t *mem); # 402 "./src/gp.h" int gp_enumerate_fonts_next(void *enum_state, char **fontname, char **path); void gp_enumerate_fonts_free(void *enum_state); # 21 "./src/gdevpdfe.c" 2 # 1 "./src/smd5.h" 1 # 21 "./src/smd5.h" # 1 "./src/md5.h" 1 # 52 "./src/md5.h" typedef unsigned char md5_byte_t; typedef unsigned int md5_word_t; typedef struct md5_state_s { md5_word_t count[2]; md5_word_t abcd[4]; md5_byte_t buf[64]; } md5_state_t; void md5_init(md5_state_t *pms); void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); # 22 "./src/smd5.h" 2 typedef struct stream_MD5E_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; md5_state_t md5; } stream_MD5E_state; extern const stream_template s_MD5E_template; stream *s_MD5E_make_stream(gs_memory_t *mem, byte *digest, int digest_size); stream *s_MD5C_make_stream(gs_memory_t *mem, stream *strm); int s_MD5C_get_digest(stream *s, byte *buf, int buf_length); # 22 "./src/gdevpdfe.c" 2 # 1 "./src/gscdefs.h" 1 # 20 "./src/gscdefs.h" # 1 "./obj/../soobj/gconfigv.h" 1 # 21 "./src/gscdefs.h" 2 # 39 "./src/gscdefs.h" extern const long gs_buildtime; extern const char *const gs_copyright; extern const char *const gs_product; extern const char *const gs_productfamily; extern const long gs_revision; extern const long gs_revisiondate; extern const long gs_serialnumber; extern const char *const gs_doc_directory; extern const char *const gs_lib_default_path; extern const char *const gs_init_file; # 61 "./src/gscdefs.h" extern const unsigned gx_image_class_table_count; extern const unsigned gx_image_type_table_count; # 74 "./src/gscdefs.h" extern const unsigned gx_io_device_table_count; # 23 "./src/gdevpdfe.c" 2 # 1 "./src/gdevpdfx.h" 1 # 20 "./src/gdevpdfx.h" # 1 "./src/gsparam.h" 1 # 34 "./src/gsparam.h" typedef struct gs_param_list_s gs_param_list; typedef const char *gs_param_name; # 48 "./src/gsparam.h" typedef enum { gs_param_type_null, gs_param_type_bool, gs_param_type_int, gs_param_type_long, gs_param_type_float, gs_param_type_string, gs_param_type_name, gs_param_type_int_array, gs_param_type_float_array, gs_param_type_string_array, gs_param_type_name_array, gs_param_type_dict, gs_param_type_dict_int_keys, gs_param_type_array } gs_param_type; # 73 "./src/gsparam.h" typedef struct gs_param_int_array_s { const int *data; uint size; bool persistent; } gs_param_int_array; typedef struct gs_param_float_array_s { const float *data; uint size; bool persistent; } gs_param_float_array; typedef struct gs_param_string_array_s { const gs_param_string *data; uint size; bool persistent; } gs_param_string_array; # 91 "./src/gsparam.h" typedef struct gs_param_collection_s { gs_param_list *list; uint size; } gs_param_collection; typedef gs_param_collection gs_param_dict; typedef gs_param_collection gs_param_array; # 118 "./src/gsparam.h" extern const byte gs_param_type_sizes[]; extern const byte gs_param_type_base_sizes[]; # 134 "./src/gsparam.h" typedef union gs_param_value_s { bool b; int i; long l; float f; gs_param_string s; gs_param_string n; gs_param_int_array ia; gs_param_float_array fa; gs_param_string_array sa; gs_param_string_array na; gs_param_collection d; } gs_param_value; typedef struct gs_param_typed_value_s { gs_param_value value; gs_param_type type; } gs_param_typed_value; gs_ptr_type_t gs_param_typed_value_enum_ptrs(const gs_memory_t *mem, const void *ptr, uint size, int index, enum_ptr_t *pep, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); void gs_param_typed_value_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); typedef enum { gs_param_collection_dict_any = 0, gs_param_collection_dict_int_keys = 1, gs_param_collection_array = 2 } gs_param_collection_type_t; # 193 "./src/gsparam.h" typedef union gs_param_enumerator_s { int intval; long longval; void *pvoid; char *pchar; } gs_param_enumerator_t; typedef gs_param_string gs_param_key_t; # 254 "./src/gsparam.h" typedef struct gs_param_list_procs_s { # 266 "./src/gsparam.h" int (*xmit_typed)(gs_param_list *, gs_param_name, gs_param_typed_value *); # 276 "./src/gsparam.h" int (*begin_xmit_collection)(gs_param_list *, gs_param_name, gs_param_dict *, gs_param_collection_type_t); # 294 "./src/gsparam.h" int (*end_xmit_collection)(gs_param_list *, gs_param_name, gs_param_dict *); # 310 "./src/gsparam.h" int (*next_key)(gs_param_list *, gs_param_enumerator_t *, gs_param_key_t *); # 324 "./src/gsparam.h" int (*request)(gs_param_list *, gs_param_name); # 339 "./src/gsparam.h" int (*requested)(const gs_param_list *, gs_param_name); # 348 "./src/gsparam.h" int (*get_policy)(gs_param_list *, gs_param_name); # 360 "./src/gsparam.h" int (*signal_error)(gs_param_list *, gs_param_name, int); # 373 "./src/gsparam.h" int (*commit)(gs_param_list *); } gs_param_list_procs; int param_read_requested_typed(gs_param_list *, gs_param_name, gs_param_typed_value *); int param_read_null(gs_param_list *, gs_param_name); int param_write_null(gs_param_list *, gs_param_name); int param_read_bool(gs_param_list *, gs_param_name, bool *); int param_write_bool(gs_param_list *, gs_param_name, const bool *); int param_read_int(gs_param_list *, gs_param_name, int *); int param_write_int(gs_param_list *, gs_param_name, const int *); int param_read_long(gs_param_list *, gs_param_name, long *); int param_write_long(gs_param_list *, gs_param_name, const long *); int param_read_float(gs_param_list *, gs_param_name, float *); int param_write_float(gs_param_list *, gs_param_name, const float *); int param_read_string(gs_param_list *, gs_param_name, gs_param_string *); int param_write_string(gs_param_list *, gs_param_name, const gs_param_string *); int param_read_name(gs_param_list *, gs_param_name, gs_param_string *); int param_write_name(gs_param_list *, gs_param_name, const gs_param_string *); int param_read_int_array(gs_param_list *, gs_param_name, gs_param_int_array *); int param_write_int_array(gs_param_list *, gs_param_name, const gs_param_int_array *); int param_write_int_values(gs_param_list *, gs_param_name, const int *, uint, bool); int param_read_float_array(gs_param_list *, gs_param_name, gs_param_float_array *); int param_write_float_array(gs_param_list *, gs_param_name, const gs_param_float_array *); int param_write_float_values(gs_param_list *, gs_param_name, const float *, uint, bool); int param_read_string_array(gs_param_list *, gs_param_name, gs_param_string_array *); int param_write_string_array(gs_param_list *, gs_param_name, const gs_param_string_array *); int param_read_name_array(gs_param_list *, gs_param_name, gs_param_string_array *); int param_write_name_array(gs_param_list *, gs_param_name, const gs_param_string_array *); # 437 "./src/gsparam.h" struct gs_param_list_s { const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys; }; void gs_param_list_set_persist_keys(gs_param_list *, bool); void param_init_enumerator(gs_param_enumerator_t * penum); typedef struct gs_param_item_s { const char *key; byte type; short offset; } gs_param_item_t; int gs_param_read_items(gs_param_list * plist, void *obj, const gs_param_item_t * items); int gs_param_write_items(gs_param_list * plist, const void *obj, const void *default_obj, const gs_param_item_t * items); void gs_param_list_init(gs_param_list *, const gs_param_list_procs *, gs_memory_t *); int param_coerce_typed(gs_param_typed_value * pvalue, gs_param_type req_type, gs_memory_t * mem); int gs_param_request_default(gs_param_list *, gs_param_name); int gs_param_requested_default(const gs_param_list *, gs_param_name); # 518 "./src/gsparam.h" typedef struct gs_c_param_s gs_c_param; typedef struct gs_c_param_list_s { const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys; gs_c_param *head; gs_param_list *target; uint count; bool any_requested; gs_param_collection_type_t coll_type; } gs_c_param_list; # 538 "./src/gsparam.h" void gs_c_param_list_set_target(gs_c_param_list *, gs_param_list *); gs_c_param_list *gs_c_param_list_alloc(gs_memory_t *, client_name_t); void gs_c_param_list_write(gs_c_param_list *, gs_memory_t *); void gs_c_param_list_write_more(gs_c_param_list *); void gs_c_param_list_read(gs_c_param_list *); void gs_c_param_list_release(gs_c_param_list *); # 21 "./src/gdevpdfx.h" 2 # 1 "./src/gsuid.h" 1 # 24 "./src/gsuid.h" typedef struct gs_uid_s gs_uid; struct gs_uid_s { long id; long *xvalues; }; # 60 "./src/gsuid.h" bool uid_equal(const gs_uid *, const gs_uid *); int uid_copy(gs_uid *puid, gs_memory_t *mem, client_name_t cname); # 22 "./src/gdevpdfx.h" 2 # 1 "./src/gxdevice.h" 1 # 21 "./src/gxdevice.h" # 1 "./src/gxdevcli.h" 1 # 21 "./src/gxdevcli.h" # 1 "./src/stdint_.h" 1 # 41 "./src/stdint_.h" # 1 "/usr/include/stdint.h" 1 3 4 # 28 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/stdint.h" 2 3 4 # 49 "/usr/include/stdint.h" 3 4 typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; __extension__ typedef unsigned long long int uint64_t; typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; __extension__ typedef long long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; __extension__ typedef unsigned long long int uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; # 126 "/usr/include/stdint.h" 3 4 typedef int intptr_t; typedef unsigned int uintptr_t; # 138 "/usr/include/stdint.h" 3 4 __extension__ typedef long long int intmax_t; __extension__ typedef unsigned long long int uintmax_t; # 42 "./src/stdint_.h" 2 # 22 "./src/gxdevcli.h" 2 # 1 "./src/gscompt.h" 1 # 39 "./src/gscompt.h" typedef struct gs_composite_s gs_composite_t; gs_id gs_composite_id(const gs_composite_t * pcte); # 23 "./src/gxdevcli.h" 2 # 1 "./src/gsdcolor.h" 1 # 20 "./src/gsdcolor.h" # 1 "./src/gsccolor.h" 1 # 25 "./src/gsccolor.h" typedef struct gs_pattern_instance_s gs_pattern_instance_t; # 37 "./src/gsccolor.h" typedef struct gs_paint_color_s { float values[(8 * 8)]; } gs_paint_color; typedef struct gs_client_color_s gs_client_color; struct gs_client_color_s { gs_paint_color paint; gs_pattern_instance_t *pattern; }; extern const gs_memory_struct_type_t st_client_color; # 21 "./src/gsdcolor.h" 2 # 1 "./src/gxarith.h" 1 # 25 "./src/gxarith.h" int imod(int m, int n); int igcd(int x, int y); int idivmod(int a, int b, int m); int ilog2(int n); # 22 "./src/gsdcolor.h" 2 # 1 "./src/gxbitmap.h" 1 # 21 "./src/gxbitmap.h" # 1 "./src/gsbitmap.h" 1 # 52 "./src/gsbitmap.h" typedef gs_id gs_bitmap_id; # 73 "./src/gsbitmap.h" typedef struct gs_bitmap_s { byte * data; int raster; gs_int_point size; gs_bitmap_id id; } gs_bitmap; typedef struct gs_const_bitmap_s { const byte * data; int raster; gs_int_point size; gs_bitmap_id id; } gs_const_bitmap; # 94 "./src/gsbitmap.h" typedef struct gs_tile_bitmap_s { byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; } gs_tile_bitmap; typedef struct gs_const_tile_bitmap_s { const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; } gs_const_tile_bitmap; # 122 "./src/gsbitmap.h" typedef struct gs_depth_bitmap_s { byte * data; int raster; gs_int_point size; gs_bitmap_id id; byte pix_depth; byte num_comps; } gs_depth_bitmap; typedef struct gs_const_depth_bitmap_s { const byte * data; int raster; gs_int_point size; gs_bitmap_id id; byte pix_depth; byte num_comps; } gs_const_depth_bitmap; typedef struct gs_tile_depth_bitmap_s { byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; byte pix_depth; byte num_comps; } gs_tile_depth_bitmap; typedef struct gs_const_tile_depth_bitmap_s { const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; byte pix_depth; byte num_comps; } gs_const_tile_depth_bitmap; # 153 "./src/gsbitmap.h" extern const gs_memory_struct_type_t st_gs_bitmap; extern const gs_memory_struct_type_t st_gs_tile_bitmap; extern const gs_memory_struct_type_t st_gs_depth_bitmap; extern const gs_memory_struct_type_t st_gs_tile_depth_bitmap; # 22 "./src/gxbitmap.h" 2 typedef gs_bitmap_id gx_bitmap_id; # 74 "./src/gxbitmap.h" typedef struct gx_bitmap_s { byte * data; int raster; gs_int_point size; gs_bitmap_id id; } gx_bitmap; typedef struct gx_const_bitmap_s { const byte * data; int raster; gs_int_point size; gs_bitmap_id id; } gx_const_bitmap; typedef struct gx_tile_bitmap_s { byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; } gx_tile_bitmap; typedef struct gx_const_tile_bitmap_s { const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; } gx_const_tile_bitmap; # 135 "./src/gxbitmap.h" typedef struct gx_strip_bitmap_s { byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; ushort rep_shift; ushort shift; } gx_strip_bitmap; typedef struct gx_const_strip_bitmap_s { const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; ushort rep_shift; ushort shift; } gx_const_strip_bitmap; extern const gs_memory_struct_type_t st_gx_strip_bitmap; # 23 "./src/gsdcolor.h" 2 # 1 "./src/gxhttile.h" 1 # 30 "./src/gxhttile.h" typedef struct gx_ht_tile_s gx_ht_tile; struct gx_ht_tile_s { gx_strip_bitmap tiles; int level; uint index; }; # 24 "./src/gsdcolor.h" 2 # 1 "./src/gxcindex.h" 1 # 20 "./src/gxcindex.h" # 1 "./src/gsbitops.h" 1 # 270 "./src/gsbitops.h" void bits_fill_rectangle(byte * dest, int dest_bit, uint raster, uint pattern, int width_bits, int height); void bits_fill_rectangle_masked(byte * dest, int dest_bit, uint raster, uint pattern, uint src_mask, int width_bits, int height); void bits_replicate_horizontally(byte * data, uint width, uint height, uint raster, uint replicated_width, uint replicated_raster); void bits_replicate_vertically(byte * data, uint height, uint raster, uint replicated_height); void bits_bounding_box(const byte * data, uint height, uint raster, gs_int_rect * pbox); void bits_compress_scaled(const byte * src, int srcx, uint width, uint height, uint sraster, byte * dest, uint draster, const gs_log2_scale_point * plog2_scale, int log2_out_bits); typedef struct bits_plane_s { union bpd_ { byte *write; const byte *read; } data; int raster; int depth; int x; } bits_plane_t; int bits_extract_plane(const bits_plane_t *dest , const bits_plane_t *source , int shift, int width, int height); int bits_expand_plane(const bits_plane_t *dest , const bits_plane_t *source , int shift, int width, int height); void bytes_fill_rectangle(byte * dest, uint raster, byte value, int width_bytes, int height); void bytes_copy_rectangle(byte * dest, uint dest_raster, const byte * src, uint src_raster, int width_bytes, int height); # 21 "./src/gxcindex.h" 2 # 55 "./src/gxcindex.h" typedef unsigned long long gx_color_index_data; # 79 "./src/gxcindex.h" typedef gx_color_index_data gx_color_index; # 25 "./src/gsdcolor.h" 2 # 1 "./src/gxwts.h" 1 # 17 "./src/gxwts.h" typedef bits16 wts_screen_sample_t; typedef struct wts_screen_s wts_screen_t; typedef enum { WTS_SCREEN_RAT, WTS_SCREEN_J, WTS_SCREEN_H } wts_screen_type; struct wts_screen_s { wts_screen_type type; int cell_width; int cell_height; int cell_shift; wts_screen_sample_t *samples; }; typedef struct { wts_screen_t base; int pa; int pb; int pc; int pd; int XA; int YA; int XB; int YB; int XC; int YC; int XD; int YD; } wts_screen_j_t; typedef struct { wts_screen_t base; double px; double py; int x1; int y1; } wts_screen_h_t; int wts_get_samples(const wts_screen_t *ws, int x, int y, wts_screen_sample_t **samples, int *p_nsamples); # 26 "./src/gsdcolor.h" 2 typedef struct gx_device_color_s gx_device_color; typedef struct gx_device_color_saved_s gx_device_color_saved; typedef struct gx_device_halftone_s gx_device_halftone; # 87 "./src/gsdcolor.h" bool gx_device_color_equal(const gx_device_color *pdevc1, const gx_device_color *pdevc2); # 157 "./src/gsdcolor.h" void gx_complete_halftone(gx_device_color *pdevc, int num_comps, gx_device_halftone *pdht); # 183 "./src/gsdcolor.h" typedef struct gx_color_tile_s gx_color_tile; # 253 "./src/gsdcolor.h" typedef struct gx_device_color_type_s gx_device_color_type_t; typedef const gx_device_color_type_t *gx_device_color_type; struct gx_device_color_s { gx_device_color_type type; union _c { gx_color_index pure; struct _bin { const gx_device_halftone *b_ht; gx_color_index color[2]; uint b_level; int b_index; gx_ht_tile *b_tile; } binary; struct _col { gx_device_halftone *c_ht; ushort num_components; byte c_base[(8 * 8)]; uint c_level[(8 * 8)]; ushort alpha; gx_color_index plane_mask; } colored; struct _wts { const gx_device_halftone *w_ht; wts_screen_sample_t levels[(8 * 8)]; ushort num_components; gx_color_index plane_vector[(8 * 8)]; } wts; struct _pat { gx_color_tile *p_tile; } pattern; } colors; gs_int_point phase; bool ccolor_valid; gs_client_color ccolor; struct _mask { struct mp_ { short x, y; } m_phase; gx_bitmap_id id; gx_color_tile *m_tile; } mask; }; # 374 "./src/gsdcolor.h" struct gx_device_color_saved_s { gx_device_color_type type; union _svc { gx_color_index pure; struct _svbin { gx_color_index b_color[2]; uint b_level; int b_index; } binary; struct _svcol { byte c_base[(8 * 8)]; uint c_level[(8 * 8)]; ushort alpha; } colored; struct _swts { wts_screen_sample_t levels[(8 * 8)]; } wts; struct _pattern { gs_id id; gs_int_point phase; } pattern; struct _pattern2 { gs_id id; bool shfill; } pattern2; } colors; gs_int_point phase; }; # 414 "./src/gsdcolor.h" extern const gx_device_color_type_t *const gx_dc_type_none; extern const gx_device_color_type_t *const gx_dc_type_null; extern const gx_device_color_type_t *const gx_dc_type_pure; # 430 "./src/gsdcolor.h" extern const gx_device_color_type_t *const gx_dc_type_ht_binary; extern const gx_device_color_type_t *const gx_dc_type_ht_colored; extern const gx_device_color_type_t *const gx_dc_type_wts; # 24 "./src/gxdevcli.h" 2 # 1 "./src/gsmatrix.h" 1 # 26 "./src/gsmatrix.h" struct gs_matrix_s { float xx, xy, yx, yy, tx, ty; }; typedef struct gs_matrix_s gs_matrix; # 50 "./src/gsmatrix.h" void gs_make_identity(gs_matrix *); int gs_make_translation(floatp, floatp, gs_matrix *), gs_make_scaling(floatp, floatp, gs_matrix *), gs_make_rotation(floatp, gs_matrix *); int gs_matrix_multiply(const gs_matrix *, const gs_matrix *, gs_matrix *), gs_matrix_invert(const gs_matrix *, gs_matrix *), gs_matrix_translate(const gs_matrix *, floatp, floatp, gs_matrix *), gs_matrix_scale(const gs_matrix *, floatp, floatp, gs_matrix *), gs_matrix_rotate(const gs_matrix *, floatp, gs_matrix *); int gs_point_transform(floatp, floatp, const gs_matrix *, gs_point *), gs_point_transform_inverse(floatp, floatp, const gs_matrix *, gs_point *), gs_distance_transform(floatp, floatp, const gs_matrix *, gs_point *), gs_distance_transform_inverse(floatp, floatp, const gs_matrix *, gs_point *), gs_points_bbox(const gs_point[4], gs_rect *), gs_bbox_transform_only(const gs_rect *, const gs_matrix *, gs_point[4]), gs_bbox_transform(const gs_rect *, const gs_matrix *, gs_rect *), gs_bbox_transform_inverse(const gs_rect *, const gs_matrix *, gs_rect *); int sget_matrix(stream *, gs_matrix *); int sput_matrix(stream *, const gs_matrix *); # 25 "./src/gxdevcli.h" 2 # 1 "./src/gsiparam.h" 1 # 43 "./src/gsiparam.h" typedef struct gx_image_type_s gx_image_type_t; # 52 "./src/gsiparam.h" typedef struct gs_image_common_s { const gx_image_type_t *type; gs_matrix ImageMatrix; } gs_image_common_t; # 120 "./src/gsiparam.h" typedef struct gs_data_image_s { const gx_image_type_t *type; gs_matrix ImageMatrix; int Width; int Height; int BitsPerComponent; float Decode[((8 * 8) + 1) * 2]; bool Interpolate; } gs_data_image_t; # 143 "./src/gsiparam.h" typedef enum { gs_image_format_chunky = 0, gs_image_format_component_planar = 1, gs_image_format_bit_planar = 2 } gs_image_format_t; typedef struct gs_color_space_s gs_color_space; # 175 "./src/gsiparam.h" typedef struct gs_pixel_image_s { const gx_image_type_t *type; gs_matrix ImageMatrix; int Width; int Height; int BitsPerComponent; float Decode[((8 * 8) + 1) * 2]; bool Interpolate; gs_image_format_t format; const gs_color_space *ColorSpace; bool CombineWithColor; } gs_pixel_image_t; extern const gs_memory_struct_type_t st_gs_pixel_image; # 189 "./src/gsiparam.h" typedef enum { gs_image_alpha_none = 0, gs_image_alpha_first, gs_image_alpha_last } gs_image_alpha_t; typedef struct gs_image1_s { const gx_image_type_t *type; gs_matrix ImageMatrix; int Width; int Height; int BitsPerComponent; float Decode[((8 * 8) + 1) * 2]; bool Interpolate; gs_image_format_t format; const gs_color_space *ColorSpace; bool CombineWithColor; bool ImageMask; bool adjust; gs_image_alpha_t Alpha; } gs_image1_t; extern const gs_memory_struct_type_t st_gs_image1; typedef gs_image1_t gs_image_t; # 236 "./src/gsiparam.h" void gs_image_common_t_init(gs_image_common_t * pic), gs_data_image_t_init(gs_data_image_t * pim, int num_components), gs_pixel_image_t_init(gs_pixel_image_t * pim, const gs_color_space * color_space); # 270 "./src/gsiparam.h" void gs_image_t_init_adjust(gs_image_t * pim, const gs_color_space * pcs, bool adjust); void gs_image_t_init_mask_adjust(gs_image_t * pim, bool write_1s, bool adjust); # 26 "./src/gxdevcli.h" 2 # 1 "./src/gsrefct.h" 1 # 34 "./src/gsrefct.h" typedef struct rc_header_s rc_header; struct rc_header_s { long ref_count; gs_memory_t *memory; void (*free)(gs_memory_t *, void *, client_name_t); }; # 56 "./src/gsrefct.h" void rc_free_struct_only(gs_memory_t *, void *, client_name_t); # 27 "./src/gxdevcli.h" 2 # 1 "./src/gsropt.h" 1 # 41 "./src/gsropt.h" typedef enum { rop2_0 = 0, rop2_S = 0xc, rop2_D = 0xa, rop2_1 = 0xf, rop2_default = rop2_S } gs_rop2_t; # 60 "./src/gsropt.h" typedef enum { rop3_0 = 0, rop3_T = 0xf0, rop3_S = 0xcc, rop3_D = 0xaa, rop3_1 = 0xff, rop3_default = rop3_T | rop3_S } gs_rop3_t; # 159 "./src/gsropt.h" typedef uint gs_logical_operation_t; # 198 "./src/gsropt.h" typedef unsigned long rop_operand; typedef rop_operand (*rop_proc)(rop_operand D, rop_operand S, rop_operand T); typedef enum { rop_usage_none = 0, rop_usage_D = 1, rop_usage_S = 2, rop_usage_DS = 3, rop_usage_T = 4, rop_usage_DT = 5, rop_usage_ST = 6, rop_usage_DST = 7 } rop_usage_t; extern const rop_proc rop_proc_table[256]; extern const byte rop_usage_table[256]; # 28 "./src/gxdevcli.h" 2 # 1 "./src/gsstruct.h" 1 # 83 "./src/gsstruct.h" typedef struct obj_header_s obj_header_t; struct gs_ptr_procs_s { void (*unmark)(enum_ptr_t *, gc_state_t *); bool (*mark)(enum_ptr_t *, gc_state_t *); # 114 "./src/gsstruct.h" void *(*reloc)(const void *, gc_state_t *); }; extern const gs_ptr_procs_t ptr_struct_procs; extern const gs_ptr_procs_t ptr_string_procs; extern const gs_ptr_procs_t ptr_const_string_procs; struct gs_gc_root_s { gs_gc_root_t *next; gs_ptr_type_t ptype; void **p; bool free_on_unregister; }; # 174 "./src/gsstruct.h" typedef struct gc_procs_common_s { void *(*reloc_struct_ptr)(const void *, gc_state_t *); void (*reloc_string)(gs_string *, gc_state_t *); void (*reloc_const_string)(gs_const_string *, gc_state_t *); void (*reloc_param_string)(gs_param_string *, gc_state_t *); } gc_procs_common_t; gs_ptr_type_t gs_no_struct_enum_ptrs(const gs_memory_t *mem, const void *ptr, uint size, int index, enum_ptr_t *pep, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); void gs_no_struct_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); extern const gs_memory_struct_type_t st_free; extern const gs_memory_struct_type_t st_bytes; extern const gs_memory_struct_type_t st_gc_root_t; # 210 "./src/gsstruct.h" extern const gs_memory_struct_type_t st_const_string_element; # 231 "./src/gsstruct.h" typedef enum { GC_ELT_OBJ, GC_ELT_STRING, GC_ELT_CONST_STRING } gc_ptr_type_index_t; typedef struct gc_ptr_element_s { ushort type; ushort offset; } gc_ptr_element_t; # 255 "./src/gsstruct.h" typedef struct gc_struct_data_s { ushort num_ptrs; ushort super_offset; const gs_memory_struct_type_t *super_type; const gc_ptr_element_t *ptrs; } gc_struct_data_t; # 278 "./src/gsstruct.h" gs_ptr_type_t basic_enum_ptrs(const gs_memory_t *mem, const void *ptr, uint size, int index, enum_ptr_t *pep, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); void basic_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst); # 360 "./src/gsstruct.h" extern gs_ptr_type_t enum_bytestring(enum_ptr_t *pep, const gs_bytestring *pbs); extern gs_ptr_type_t enum_const_bytestring(enum_ptr_t *pep, const gs_const_bytestring *pbs); # 418 "./src/gsstruct.h" extern void reloc_bytestring(gs_bytestring *pbs, gc_state_t *gcst); extern void reloc_const_bytestring(gs_const_bytestring *pbs, gc_state_t *gcst); # 29 "./src/gxdevcli.h" 2 # 1 "./src/gstparam.h" 1 # 24 "./src/gstparam.h" typedef enum { BLEND_MODE_Compatible, BLEND_MODE_Normal, BLEND_MODE_Multiply, BLEND_MODE_Screen, BLEND_MODE_Difference, BLEND_MODE_Darken, BLEND_MODE_Lighten, BLEND_MODE_ColorDodge, BLEND_MODE_ColorBurn, BLEND_MODE_Exclusion, BLEND_MODE_HardLight, BLEND_MODE_Overlay, BLEND_MODE_SoftLight, BLEND_MODE_Luminosity, BLEND_MODE_Hue, BLEND_MODE_Saturation, BLEND_MODE_Color } gs_blend_mode_t; typedef enum { TRANSPARENCY_STATE_Group = 1, TRANSPARENCY_STATE_Mask } gs_transparency_state_type_t; typedef struct gs_transparency_state_s gs_transparency_state_t; struct gs_transparency_state_s { gs_transparency_state_t *saved; gs_transparency_state_type_t type; }; typedef struct gs_transparency_mask_s { rc_header rc; } gs_transparency_mask_t; typedef struct gs_function_s gs_function_t; typedef struct gs_transparency_group_params_s { const gs_color_space *ColorSpace; bool Isolated; bool Knockout; } gs_transparency_group_params_t; typedef enum { TRANSPARENCY_MASK_Alpha, TRANSPARENCY_MASK_Luminosity } gs_transparency_mask_subtype_t; typedef struct gs_transparency_mask_params_s { gs_transparency_mask_subtype_t subtype; int Background_components; float Background[(8 * 8)]; float GrayBackground; int (*TransferFunction)(floatp in, float *out, void *proc_data); gs_function_t *TransferFunction_data; } gs_transparency_mask_params_t; typedef struct gx_transparency_mask_params_s { gs_transparency_mask_subtype_t subtype; int Background_components; float Background[(8 * 8)]; float GrayBackground; bool function_is_identity; byte transfer_fn[256]; } gx_transparency_mask_params_t; typedef enum { TRANSPARENCY_CHANNEL_Opacity = 0, TRANSPARENCY_CHANNEL_Shape = 1 } gs_transparency_channel_selector_t; # 30 "./src/gxdevcli.h" 2 # 1 "./src/gsxfont.h" 1 # 22 "./src/gsxfont.h" typedef ulong gx_xglyph; struct gx_xfont_procs_s; typedef struct gx_xfont_procs_s gx_xfont_procs; struct gx_xfont_s; typedef struct gx_xfont_s gx_xfont; # 31 "./src/gxdevcli.h" 2 # 1 "./src/gxcvalue.h" 1 # 21 "./src/gxcvalue.h" typedef unsigned short gx_color_value; # 34 "./src/gxdevcli.h" 2 # 1 "./src/gxfixed.h" 1 # 25 "./src/gxfixed.h" typedef long fixed; typedef ulong ufixed; # 159 "./src/gxfixed.h" fixed fixed_mult_quo(fixed A, fixed B, fixed C); # 263 "./src/gxfixed.h" typedef struct gs_fixed_point_s { fixed x, y; } gs_fixed_point; typedef struct gs_fixed_rect_s { gs_fixed_point p, q; } gs_fixed_rect; # 35 "./src/gxdevcli.h" 2 # 1 "./src/gxtext.h" 1 # 20 "./src/gxtext.h" # 1 "./src/gstext.h" 1 # 20 "./src/gstext.h" # 1 "./src/gsccode.h" 1 # 25 "./src/gsccode.h" typedef ulong gs_char; # 72 "./src/gsccode.h" typedef ulong gs_glyph; # 90 "./src/gsccode.h" typedef bool (*gs_glyph_mark_proc_t)(const gs_memory_t *mem, gs_glyph glyph, void *proc_data); typedef enum { ENCODING_INDEX_UNKNOWN = -1, ENCODING_INDEX_STANDARD = 0, ENCODING_INDEX_ISOLATIN1, ENCODING_INDEX_SYMBOL, ENCODING_INDEX_DINGBATS, ENCODING_INDEX_WINANSI, ENCODING_INDEX_MACROMAN, ENCODING_INDEX_MACEXPERT, ENCODING_INDEX_MACGLYPH, ENCODING_INDEX_ALOGLYPH, ENCODING_INDEX_ALXGLYPH, ENCODING_INDEX_CFFSTRINGS } gs_encoding_index_t; # 123 "./src/gsccode.h" typedef enum gs_glyph_space_s { GLYPH_SPACE_NAME, GLYPH_SPACE_INDEX, GLYPH_SPACE_NOGEN } gs_glyph_space_t; typedef int (*gs_glyph_name_proc_t)(const gs_memory_t *mem, gs_glyph glyph, gs_const_string *pstr, void *proc_data); # 21 "./src/gstext.h" 2 # 1 "./src/gscpm.h" 1 # 20 "./src/gscpm.h" typedef enum { cpm_show, cpm_charwidth, cpm_false_charpath, cpm_true_charpath, cpm_false_charboxpath, cpm_true_charboxpath } gs_char_path_mode; typedef enum { CACHE_DEVICE_NONE = 0, CACHE_DEVICE_NOT_CACHING, CACHE_DEVICE_NONE_AND_CLIP, CACHE_DEVICE_CACHING } gs_in_cache_device_t; # 22 "./src/gstext.h" 2 # 95 "./src/gstext.h" typedef struct gs_text_params_s { uint operation; union sd_ { const byte *bytes; const gs_char *chars; const gs_glyph *glyphs; gs_char d_char; gs_glyph d_glyph; } data; uint size; gs_point delta_all; gs_point delta_space; union s_ { gs_char s_char; gs_glyph s_glyph; } space; const float *x_widths; const float *y_widths; uint widths_size; } gs_text_params_t; # 128 "./src/gstext.h" int gs_text_replaced_width(const gs_text_params_t *text, uint index, gs_point *pwidth); typedef struct gs_text_enum_s gs_text_enum_t; typedef struct gx_device_s gx_device; # 155 "./src/gstext.h" typedef struct gs_font_s gs_font; typedef struct gx_path_s gx_path; typedef struct gx_clip_path_s gx_clip_path; # 187 "./src/gstext.h" int gx_device_text_begin(gx_device *dev, gs_imager_state *pis, const gs_text_params_t *text, gs_font *font, gx_path *path, const gx_device_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gs_text_enum_t **ppte); int gs_text_begin(gs_state * pgs, const gs_text_params_t * text, gs_memory_t * mem, gs_text_enum_t ** ppenum); int gs_text_update_dev_color(gs_state * pgs, gs_text_enum_t * pte); int gs_show_begin(gs_state *, const byte *, uint, gs_memory_t *, gs_text_enum_t **), gs_ashow_begin(gs_state *, floatp, floatp, const byte *, uint, gs_memory_t *, gs_text_enum_t **), gs_widthshow_begin(gs_state *, floatp, floatp, gs_char, const byte *, uint, gs_memory_t *, gs_text_enum_t **), gs_awidthshow_begin(gs_state *, floatp, floatp, gs_char, floatp, floatp, const byte *, uint, gs_memory_t *, gs_text_enum_t **), gs_kshow_begin(gs_state *, const byte *, uint, gs_memory_t *, gs_text_enum_t **), gs_xyshow_begin(gs_state *, const byte *, uint, const float *, const float *, uint, gs_memory_t *, gs_text_enum_t **), gs_glyphshow_begin(gs_state *, gs_glyph, gs_memory_t *, gs_text_enum_t **), gs_cshow_begin(gs_state *, const byte *, uint, gs_memory_t *, gs_text_enum_t **), gs_stringwidth_begin(gs_state *, const byte *, uint, gs_memory_t *, gs_text_enum_t **), gs_charpath_begin(gs_state *, const byte *, uint, bool, gs_memory_t *, gs_text_enum_t **), gs_glyphpath_begin(gs_state *, gs_glyph, bool, gs_memory_t *, gs_text_enum_t **), gs_glyphwidth_begin(gs_state *, gs_glyph, gs_memory_t *, gs_text_enum_t **), gs_charboxpath_begin(gs_state *, const byte *, uint, bool, gs_memory_t *, gs_text_enum_t **); int gs_text_restart(gs_text_enum_t *pte, const gs_text_params_t *text); int gs_text_resync(gs_text_enum_t *pte, const gs_text_enum_t *pfrom); # 276 "./src/gstext.h" int gs_text_process(gs_text_enum_t *pte); gs_font *gs_text_current_font(const gs_text_enum_t *pte); gs_char gs_text_current_char(const gs_text_enum_t *pte); gs_char gs_text_next_char(const gs_text_enum_t *pte); gs_glyph gs_text_current_glyph(const gs_text_enum_t *pte); int gs_text_total_width(const gs_text_enum_t *pte, gs_point *pwidth); bool gs_text_is_width_only(const gs_text_enum_t *pte); int gs_text_current_width(const gs_text_enum_t *pte, gs_point *pwidth); typedef enum { TEXT_SET_CHAR_WIDTH, TEXT_SET_CACHE_DEVICE, TEXT_SET_CACHE_DEVICE2 } gs_text_cache_control_t; int gs_text_set_cache(gs_text_enum_t *pte, const double *values, gs_text_cache_control_t control), gs_text_setcharwidth(gs_text_enum_t *pte, const double wxy[2]), gs_text_setcachedevice(gs_text_enum_t *pte, const double wbox[6]), gs_text_setcachedevice2(gs_text_enum_t *pte, const double wbox2[10]); int gs_text_retry(gs_text_enum_t *pte); void gs_text_release(gs_text_enum_t *pte, client_name_t cname); # 21 "./src/gxtext.h" 2 typedef struct gs_text_enum_procs_s gs_text_enum_procs_t; typedef struct cached_fm_pair_s cached_fm_pair; typedef struct gs_text_returned_s { gs_char current_char; gs_glyph current_glyph; gs_point total_width; } gs_text_returned_t; # 54 "./src/gxtext.h" typedef struct gx_font_stack_item_s { gs_font *font; uint index; } gx_font_stack_item_t; typedef struct gx_font_stack_s { int depth; gx_font_stack_item_t items[1 + 5]; } gx_font_stack_t; # 74 "./src/gxtext.h" void rc_free_text_enum(gs_memory_t *, void *, client_name_t); # 111 "./src/gxtext.h" struct gs_text_enum_s { gs_text_params_t text; gx_device *dev; gx_device *imaging_dev; gs_imager_state *pis; gs_font *orig_font; gx_path *path; const gx_device_color *pdcolor; const gx_clip_path *pcpath; gs_memory_t *memory; const gs_text_enum_procs_t *procs; rc_header rc; gs_font *current_font; gs_glyph outer_CID; bool is_pure_color; gs_log2_scale_point log2_scale; cached_fm_pair *pair; uint index; uint xy_index; gx_font_stack_t fstack; int cmap_code; gs_point FontBBox_as_Metrics2; ulong text_enum_id; bool device_disabled_grid_fitting; gs_text_returned_t returned; }; # 163 "./src/gxtext.h" int gs_text_enum_init(gs_text_enum_t *pte, const gs_text_enum_procs_t *procs, gx_device *dev, gs_imager_state *pis, const gs_text_params_t *text, gs_font *font, gx_path *path, const gx_device_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *mem); void gs_text_enum_copy_dynamic(gs_text_enum_t *pto, const gs_text_enum_t *pfrom, bool for_return); # 211 "./src/gxtext.h" struct gs_text_enum_procs_s { # 224 "./src/gxtext.h" int (*resync)(gs_text_enum_t *pte, const gs_text_enum_t *pfrom); # 254 "./src/gxtext.h" int (*process)(gs_text_enum_t *pte); # 265 "./src/gxtext.h" bool (*is_width_only)(const gs_text_enum_t *pte); # 274 "./src/gxtext.h" int (*current_width)(const gs_text_enum_t *pte, gs_point *pwidth); # 285 "./src/gxtext.h" int (*set_cache)(gs_text_enum_t *pte, const double *values, gs_text_cache_control_t control); # 295 "./src/gxtext.h" int (*retry)(gs_text_enum_t *pte); # 306 "./src/gxtext.h" void (*release)(gs_text_enum_t *pte, client_name_t cname); }; void gx_default_text_release(gs_text_enum_t *pte, client_name_t cname); # 36 "./src/gxdevcli.h" 2 # 1 "./src/gxcmap.h" 1 # 21 "./src/gxcmap.h" # 1 "./src/gscsel.h" 1 # 25 "./src/gscsel.h" typedef enum { gs_color_select_all = -1, gs_color_select_texture = 0, gs_color_select_source = 1 } gs_color_select_t; # 22 "./src/gxcmap.h" 2 # 1 "./src/gxfmap.h" 1 # 22 "./src/gxfmap.h" # 1 "./src/gxfrac.h" 1 # 25 "./src/gxfrac.h" typedef short frac; typedef short signed_frac; # 23 "./src/gxfmap.h" 2 # 1 "./src/gxtmap.h" 1 # 27 "./src/gxtmap.h" typedef struct gx_transfer_map_s gx_transfer_map; typedef float (*gs_mapping_proc) (floatp, const gx_transfer_map *); typedef float (*gs_mapping_closure_proc_t) (floatp value, const gx_transfer_map * pmap, const void *proc_data); typedef struct gs_mapping_closure_s { gs_mapping_closure_proc_t proc; const void *data; } gs_mapping_closure_t; # 24 "./src/gxfmap.h" 2 # 39 "./src/gxfmap.h" struct gx_transfer_map_s { rc_header rc; gs_mapping_proc proc; gs_mapping_closure_t closure; gs_id id; frac values[(1 << 8)]; }; extern const gs_memory_struct_type_t st_transfer_map; void gx_set_identity_transfer(gx_transfer_map *); # 63 "./src/gxfmap.h" frac gx_color_frac_map(frac, const frac *); # 97 "./src/gxfmap.h" float gs_mapped_transfer(floatp, const gx_transfer_map *); float gs_identity_transfer(floatp, const gx_transfer_map *); # 23 "./src/gxcmap.h" 2 # 85 "./src/gxcmap.h" struct gx_cm_color_map_procs_s { void (*map_gray) (gx_device * dev, frac gray, frac * out); void (*map_rgb) (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out); void (*map_cmyk) (gx_device * dev, frac c, frac m, frac y, frac k, frac * out); }; typedef struct gx_cm_color_map_procs_s gx_cm_color_map_procs; void gray_cs_to_gray_cm (gx_device * dev, frac gray, frac * out); void rgb_cs_to_rgb_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out); void cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out); # 112 "./src/gxcmap.h" struct gx_color_map_procs_s { void (*map_gray)(frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t); void (*map_rgb)(frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t); void (*map_cmyk)(frac, frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t); void (*map_rgb_alpha)(frac, frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t); void (*map_separation)(frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t); void (*map_devicen)(const frac *, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t); bool (*is_halftoned)(const gs_imager_state *, gx_device *); }; typedef struct gx_color_map_procs_s gx_color_map_procs; const gx_color_map_procs * gx_get_cmap_procs(const gs_imager_state *, const gx_device *); const gx_color_map_procs * gx_default_get_cmap_procs(const gs_imager_state *, const gx_device *); void gx_set_cmap_procs(gs_imager_state *, const gx_device *); # 163 "./src/gxcmap.h" extern void gx_default_gray_cs_to_gray_cm (gx_device * dev, frac gray, frac * out); extern void gx_default_rgb_cs_to_gray_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out); extern void gx_default_cmyk_cs_to_gray_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out); extern void gx_default_gray_cs_to_rgb_cm (gx_device * dev, frac gray, frac * out); extern void gx_default_rgb_cs_to_rgb_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out); extern void gx_default_cmyk_cs_to_rgb_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out); extern void gx_default_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out); extern void gx_default_rgb_cs_to_cmyk_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out); extern void gx_default_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out); extern void gx_default_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out); extern void gx_default_rgb_cs_to_cmyk_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out); extern void gx_default_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out); extern void gx_error_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out); extern void gx_error_rgb_cs_to_cmyk_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out); extern void gx_error_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out); # 238 "./src/gxcmap.h" int (gx_error_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type); int (gx_default_DevGray_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type); int (gx_default_DevRGB_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type); int (gx_default_DevCMYK_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type); int (gx_default_DevRGBK_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type); const gx_cm_color_map_procs * (gx_error_get_color_mapping_procs)(const gx_device * dev); const gx_cm_color_map_procs * (gx_default_DevGray_get_color_mapping_procs)(const gx_device * dev); const gx_cm_color_map_procs * (gx_default_DevRGB_get_color_mapping_procs)(const gx_device * dev); const gx_cm_color_map_procs * (gx_default_DevCMYK_get_color_mapping_procs)(const gx_device * dev); const gx_cm_color_map_procs * (gx_default_DevRGBK_get_color_mapping_procs)(const gx_device * dev); gx_color_index (gx_error_encode_color)(gx_device * dev, const gx_color_value colors[]); gx_color_index (gx_default_encode_color)(gx_device * dev, const gx_color_value colors[]); gx_color_index (gx_default_gray_fast_encode)(gx_device * dev, const gx_color_value colors[]); gx_color_index (gx_default_gray_encode)(gx_device * dev, const gx_color_value colors[]); gx_color_index (gx_backwards_compatible_gray_encode)(gx_device * dev, const gx_color_value colors[]); int (gx_error_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]); int (gx_default_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]); # 37 "./src/gxdevcli.h" 2 # 1 "./src/gsnamecl.h" 1 # 38 "./src/gsnamecl.h" typedef struct named_color_params_s { bool use_named_color_callback; # 52 "./src/gsnamecl.h" int color_index[(8 * 8)]; } named_color_params_t; # 93 "./src/gsnamecl.h" int named_color_put_params(gx_device * dev, gs_param_list * plist); # 102 "./src/gsnamecl.h" int named_color_get_params(gx_device * dev, gs_param_list * plist); bool named_color_install_Separation(gs_color_space * pcs, gs_state * pgs); bool named_color_install_DeviceN(gs_color_space * pcs, gs_state * pgs); int gx_remap_concrete_named_color_Separation(const frac * pconc, const gs_color_space * pcs, gx_device_color * pdc, const gs_imager_state * pis, gx_device * dev, gs_color_select_t select); int gx_remap_concrete_named_color_DeviceN(const frac * pconc, const gs_color_space * pcs, gx_device_color * pdc, const gs_imager_state * pis, gx_device * dev, gs_color_select_t select); # 143 "./src/gsnamecl.h" typedef struct client_named_color_params_s { struct client_named_color_procs_s * client_procs; void * data; } client_named_color_params_t; typedef struct client_named_color_procs_s { bool (* install_Separation)(client_named_color_params_t * pparams, gs_color_space * pcs, gs_state * pgs); int (* remap_Separation)(client_named_color_params_t * pparams, const frac * pconc, const gs_color_space * pcs, gx_device_color * pdc, const gs_imager_state * pis, gx_device * dev, gs_color_select_t select); bool (* install_DeviceN)(client_named_color_params_t * pparams, gs_color_space * pcs, gs_state * pgs); int (* remap_DeviceN)(client_named_color_params_t * pparams, const frac * pconc, const gs_color_space * pcs, gx_device_color * pdc, const gs_imager_state * pis, gx_device * dev, gs_color_select_t select); } client_named_color_procs_t; # 38 "./src/gxdevcli.h" 2 # 134 "./src/gxdevcli.h" typedef struct gx_fill_params_s gx_fill_params; typedef struct gx_stroke_params_s gx_stroke_params; # 149 "./src/gxdevcli.h" typedef struct gx_image_enum_common_s gx_image_enum_common_t; typedef struct gs_pattern1_instance_s gs_pattern1_instance_t; typedef gx_device_color gx_drawing_color; typedef enum { go_text, go_graphics } graphics_object_type; typedef struct gs_fixed_edge_s { gs_fixed_point start; gs_fixed_point end; } gs_fixed_edge; typedef struct gs_get_bits_params_s gs_get_bits_params_t; typedef struct gx_device_anti_alias_info_s { int text_bits; int graphics_bits; } gx_device_anti_alias_info; typedef int32_t frac31; typedef struct gs_linear_color_edge_s { gs_fixed_point start; gs_fixed_point end; const frac31 *c0, *c1; fixed clip_x; } gs_linear_color_edge; # 227 "./src/gxdevcli.h" typedef enum { GX_CINFO_UNKNOWN_SEP_LIN = -1, GX_CINFO_SEP_LIN_NONE = 0, GX_CINFO_SEP_LIN } gx_color_enc_sep_lin_t; typedef enum { GX_CINFO_POLARITY_UNKNOWN = -1, GX_CINFO_POLARITY_SUBTRACTIVE = 0, GX_CINFO_POLARITY_ADDITIVE } gx_color_polarity_t; # 261 "./src/gxdevcli.h" typedef enum { GX_CINFO_OPMODE_UNKNOWN = -1, GX_CINFO_OPMODE_NOT = 0, GX_CINFO_OPMODE } gx_cm_opmode_t; # 294 "./src/gxdevcli.h" typedef struct gx_device_color_info_s { int max_components; int num_components; gx_color_polarity_t polarity; byte depth; # 351 "./src/gxdevcli.h" byte gray_index; # 373 "./src/gxdevcli.h" uint max_gray; uint max_color; uint dither_grays; uint dither_colors; gx_device_anti_alias_info anti_alias; # 421 "./src/gxdevcli.h" gx_color_enc_sep_lin_t separable_and_linear; byte comp_shift[(8 * 8)]; byte comp_bits[(8 * 8)]; gx_color_index comp_mask[(8 * 8)]; const char * cm_name; # 443 "./src/gxdevcli.h" gx_cm_opmode_t opmode; gx_color_index process_comps; } gx_device_color_info; # 610 "./src/gxdevcli.h" typedef struct gx_device_procs_s gx_device_procs; typedef struct gx_page_device_procs_s { int (*install)(gx_device *dev, gs_state *pgs); int (*begin_page)(gx_device *dev, gs_state *pgs); int (*end_page)(gx_device *dev, int reason, gs_state *pgs); } gx_page_device_procs; int gx_default_install(gx_device *dev, gs_state *pgs); int gx_default_begin_page(gx_device *dev, gs_state *pgs); int gx_default_end_page(gx_device *dev, int reason, gs_state *pgs); # 671 "./src/gxdevcli.h" typedef struct gx_device_cached_colors_s { gx_color_index black, white; } gx_device_cached_colors_t; # 1213 "./src/gxdevcli.h" typedef enum { pattern_manage__can_accum, pattern_manage__start_accum, pattern_manage__finish_accum, pattern_manage__load, pattern_manage__shading_area } pattern_manage_t; # 1261 "./src/gxdevcli.h" typedef struct gs_fill_attributes_s { const gs_fixed_rect *clip; bool swap_axes; const gx_device_halftone *ht; gs_logical_operation_t lop; fixed ystart, yend; } gs_fill_attributes; # 1407 "./src/gxdevcli.h" typedef struct gx_image_plane_s { const byte *data; int data_x; uint raster; } gx_image_plane_t; # 1425 "./src/gxdevcli.h" int gx_image_data(gx_image_enum_common_t *info, const byte **planes, int data_x, uint raster, int height); int gx_image_plane_data(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height); int gx_image_plane_data_rows(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used); int gx_image_flush(gx_image_enum_common_t *info); bool gx_image_planes_wanted(const gx_image_enum_common_t *info, byte *wanted); int gx_image_end(gx_image_enum_common_t *info, bool draw_last); # 1455 "./src/gxdevcli.h" struct gx_device_procs_s { int (*open_device)(gx_device *dev); void (*get_initial_matrix)(gx_device *dev, gs_matrix *pmat); int (*sync_output)(gx_device *dev); int (*output_page)(gx_device *dev, int num_copies, int flush); int (*close_device)(gx_device *dev); gx_color_index (*map_rgb_color)(gx_device *dev, const gx_color_value cv[]); int (*map_color_rgb)(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); int (*fill_rectangle)(gx_device *dev, int x, int y, int width, int height, gx_color_index color); int (*tile_rectangle)(gx_device *dev, const gx_tile_bitmap *tile, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y); int (*copy_mono)(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1); int (*copy_color)(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height); int (*obsolete_draw_line)(gx_device *dev, int x0, int y0, int x1, int y1, gx_color_index color); int (*get_bits)(gx_device *dev, int y, byte *data, byte **actual_data); int (*get_params)(gx_device *dev, gs_param_list *plist); int (*put_params)(gx_device *dev, gs_param_list *plist); gx_color_index (*map_cmyk_color)(gx_device *dev, const gx_color_value cv[]); const gx_xfont_procs *(*get_xfont_procs)(gx_device *dev); gx_device *(*get_xfont_device)(gx_device *dev); gx_color_index (*map_rgb_alpha_color)(gx_device *dev, gx_color_value red, gx_color_value green, gx_color_value blue, gx_color_value alpha); gx_device *(*get_page_device)(gx_device *dev); int (*get_alpha_bits)(gx_device *dev, graphics_object_type type); int (*copy_alpha)(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color, int depth); int (*get_band)(gx_device *dev, int y, int *band_start); int (*copy_rop)(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_tile_bitmap *texture, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); int (*fill_path)(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_fill_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int (*stroke_path)(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_stroke_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int (*fill_mask)(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, const gx_drawing_color *pdcolor, int depth, gs_logical_operation_t lop, const gx_clip_path *pcpath); int (*fill_trapezoid)(gx_device *dev, const gs_fixed_edge *left, const gs_fixed_edge *right, fixed ybot, fixed ytop, bool swap_axes, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int (*fill_parallelogram)(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int (*fill_triangle)(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int (*draw_thin_line)(gx_device *dev, fixed fx0, fixed fy0, fixed fx1, fixed fy1, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int (*begin_image)(gx_device *dev, const gs_imager_state *pis, const gs_image_t *pim, gs_image_format_t format, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int (*image_data)(gx_device *dev, gx_image_enum_common_t *info, const byte **planes, int data_x, uint raster, int height); int (*end_image)(gx_device *dev, gx_image_enum_common_t *info, bool draw_last); int (*strip_tile_rectangle)(gx_device *dev, const gx_strip_bitmap *tiles, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y); int (*strip_copy_rop)(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_strip_bitmap *textures, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); void (*get_clipping_box)(gx_device *dev, gs_fixed_rect *pbox); int (*begin_typed_image)(gx_device *dev, const gs_imager_state *pis, const gs_matrix *pmat, const gs_image_common_t *pim, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int (*get_bits_rectangle)(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread); int (*map_color_rgb_alpha)(gx_device *dev, gx_color_index color, gx_color_value rgba[4]); int (*create_compositor)(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory); int (*get_hardware_params)(gx_device *dev, gs_param_list *plist); int (*text_begin)(gx_device *dev, gs_imager_state *pis, const gs_text_params_t *text, gs_font *font, gx_path *path, const gx_device_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gs_text_enum_t **ppte); int (*finish_copydevice)(gx_device *dev, const gx_device *from_dev); int (*begin_transparency_group)(gx_device *dev, const gs_transparency_group_params_t *ptgp, const gs_rect *pbbox, gs_imager_state *pis, gs_transparency_state_t **ppts, gs_memory_t *mem); int (*end_transparency_group)(gx_device *dev, gs_imager_state *pis, gs_transparency_state_t **ppts); int (*begin_transparency_mask)(gx_device *dev, const gx_transparency_mask_params_t *ptmp, const gs_rect *pbbox, gs_imager_state *pis, gs_transparency_state_t **ppts, gs_memory_t *mem); int (*end_transparency_mask)(gx_device *dev, gs_transparency_mask_t **pptm); int (*discard_transparency_layer)(gx_device *dev, gs_transparency_state_t **ppts); const gx_cm_color_map_procs * ((*get_color_mapping_procs))(const gx_device * dev); int ((*get_color_comp_index))(gx_device * dev, const char * pname, int name_size, int component_type); gx_color_index ((*encode_color))(gx_device * dev, const gx_color_value colors[]); int ((*decode_color))(gx_device * dev, gx_color_index cindex, gx_color_value colors[]); int (*pattern_manage)(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function); int (*fill_rectangle_hl_color)(gx_device *dev, const gs_fixed_rect *rect, const gs_imager_state *pis, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int (*include_color_space)(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length); int (*fill_linear_color_scanline)(gx_device *dev, const gs_fill_attributes *fa, int i, int j, int w, const frac31 *c0, const int32_t *c0_f, const int32_t *cg_num, int32_t cg_den ); int (*fill_linear_color_trapezoid)(gx_device *dev, const gs_fill_attributes *fa, const gs_fixed_point *p0, const gs_fixed_point *p1, const gs_fixed_point *p2, const gs_fixed_point *p3, const frac31 *c0, const frac31 *c1, const frac31 *c2, const frac31 *c3); int (*fill_linear_color_triangle)(gx_device *dev, const gs_fill_attributes *fa, const gs_fixed_point *p0, const gs_fixed_point *p1, const gs_fixed_point *p2, const frac31 *c0, const frac31 *c1, const frac31 *c2); int (*update_spot_equivalent_colors)(gx_device *dev, const gs_state * pgs); }; # 1471 "./src/gxdevcli.h" int gx_copy_mono_unaligned(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1); int gx_copy_color_unaligned(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height); int gx_copy_alpha_unaligned(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color, int depth); struct gx_device_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; }; extern const gs_memory_struct_type_t st_device; void gx_device_finalize(void *ptr); # 1491 "./src/gxdevcli.h" gx_device *gx_device_enum_ptr(gx_device *); gx_device *gx_device_reloc_ptr(gx_device *, gc_state_t *); typedef gx_color_index (*dev_proc_map_rgb_color_t)(gx_device *dev, const gx_color_value cv[]); typedef int (*dev_proc_map_color_rgb_t)(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); # 1510 "./src/gxdevcli.h" typedef struct gx_device_forward_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; gx_device *target; } gx_device_forward; extern const gs_memory_struct_type_t st_device_forward; # 1524 "./src/gxdevcli.h" typedef struct gx_device_null_s gx_device_null; struct gx_device_null_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; gx_device *target; }; extern const gx_device_null gs_null_device; extern const gs_memory_struct_type_t st_device_null; # 1547 "./src/gxdevcli.h" void gx_device_init(gx_device * dev, const gx_device * proto, gs_memory_t * mem, bool internal); void gs_make_null_device(gx_device_null *dev_null, gx_device *target, gs_memory_t *mem); bool gs_is_null_device(gx_device *dev); void gx_device_set_target(gx_device_forward *fdev, gx_device *target); void gx_device_retain(gx_device *dev, bool retained); uint gx_device_raster(const gx_device * dev, bool pad_to_word); int gx_device_adjust_resolution(gx_device * dev, int actual_width, int actual_height, int fit); void gx_device_set_margins(gx_device * dev, const float *margins , bool move_origin); void gx_device_set_width_height(gx_device * dev, int width, int height); void gx_device_set_resolution(gx_device * dev, floatp x_dpi, floatp y_dpi); void gx_device_set_media_size(gx_device * dev, floatp media_width, floatp media_height); # 1596 "./src/gxdevcli.h" void gx_set_device_only(gs_state *, gx_device *); int gs_closedevice(gx_device *); void gx_device_free_local(gx_device *); typedef struct gx_device_type_s { gs_memory_type_ptr_t stype; int (*initialize)(gx_device *); } gx_device_type; # 22 "./src/gxdevice.h" 2 # 1 "./src/gsfname.h" 1 # 31 "./src/gsfname.h" typedef struct gx_io_device_s gx_io_device; typedef struct gs_parsed_file_name_s { gs_memory_t *memory; gx_io_device *iodev; const char *fname; uint len; } gs_parsed_file_name_t; int gs_parse_file_name(gs_parsed_file_name_t *, const char *, uint); int gs_parse_real_file_name(gs_parsed_file_name_t *, const char *, uint, gs_memory_t *, client_name_t); int gs_terminate_file_name(gs_parsed_file_name_t *, gs_memory_t *, client_name_t); void gs_free_file_name(gs_parsed_file_name_t *, client_name_t); # 23 "./src/gxdevice.h" 2 # 1 "./src/gsmalloc.h" 1 # 22 "./src/gsmalloc.h" typedef struct gs_malloc_block_s gs_malloc_block_t; typedef struct gs_malloc_memory_s { gs_memory_t *stable_memory; gs_memory_procs_t procs; gs_lib_ctx_t *gs_lib_ctx; pl_mem_node_t *head; gs_memory_t *non_gc_memory; gs_malloc_block_t *allocated; long limit; long used; long max_used; } gs_malloc_memory_t; gs_malloc_memory_t *gs_malloc_memory_init(void); gs_memory_t * gs_malloc_init(const gs_memory_t *parent); void gs_malloc_release(gs_memory_t *mem); # 51 "./src/gsmalloc.h" int gs_malloc_wrap(gs_memory_t **wrapped, gs_malloc_memory_t *contents); gs_malloc_memory_t *gs_malloc_wrapped_contents(gs_memory_t *wrapped); gs_malloc_memory_t *gs_malloc_unwrap(gs_memory_t *wrapped); # 29 "./src/gxdevice.h" 2 # 1 "./src/gxstdio.h" 1 # 34 "./src/gxdevice.h" 2 # 213 "./src/gxdevice.h" int gx_default_open_device(gx_device *dev); void gx_default_get_initial_matrix(gx_device *dev, gs_matrix *pmat); void gx_upright_get_initial_matrix(gx_device *dev, gs_matrix *pmat); int gx_default_sync_output(gx_device *dev); int gx_default_output_page(gx_device *dev, int num_copies, int flush); int gx_default_close_device(gx_device *dev); gx_color_index gx_default_w_b_map_rgb_color(gx_device *dev, const gx_color_value cv[]); int gx_default_w_b_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); int gx_default_tile_rectangle(gx_device *dev, const gx_tile_bitmap *tile, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y); int gx_default_copy_mono(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1); int gx_default_copy_color(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height); int gx_default_draw_line(gx_device *dev, int x0, int y0, int x1, int y1, gx_color_index color); int gx_no_get_bits(gx_device *dev, int y, byte *data, byte **actual_data); int gx_default_get_bits(gx_device *dev, int y, byte *data, byte **actual_data); int gx_default_get_params(gx_device *dev, gs_param_list *plist); int gx_default_put_params(gx_device *dev, gs_param_list *plist); gx_color_index gx_default_map_cmyk_color(gx_device *dev, const gx_color_value cv[]); const gx_xfont_procs *gx_default_get_xfont_procs(gx_device *dev); gx_device *gx_default_get_xfont_device(gx_device *dev); gx_color_index gx_default_map_rgb_alpha_color(gx_device *dev, gx_color_value red, gx_color_value green, gx_color_value blue, gx_color_value alpha); gx_device *gx_default_get_page_device(gx_device *dev); gx_device *gx_page_device_get_page_device(gx_device *dev); int gx_default_get_alpha_bits(gx_device *dev, graphics_object_type type); int gx_no_copy_alpha(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color, int depth); int gx_default_copy_alpha(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color, int depth); int gx_default_get_band(gx_device *dev, int y, int *band_start); int gx_no_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_tile_bitmap *texture, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); int gx_default_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_tile_bitmap *texture, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); int gx_default_fill_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_fill_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gx_default_stroke_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_stroke_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gx_default_fill_mask(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, const gx_drawing_color *pdcolor, int depth, gs_logical_operation_t lop, const gx_clip_path *pcpath); int gx_default_fill_trapezoid(gx_device *dev, const gs_fixed_edge *left, const gs_fixed_edge *right, fixed ybot, fixed ytop, bool swap_axes, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_default_fill_parallelogram(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_default_fill_triangle(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_default_draw_thin_line(gx_device *dev, fixed fx0, fixed fy0, fixed fx1, fixed fy1, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_default_begin_image(gx_device *dev, const gs_imager_state *pis, const gs_image_t *pim, gs_image_format_t format, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int gx_default_image_data(gx_device *dev, gx_image_enum_common_t *info, const byte **planes, int data_x, uint raster, int height); int gx_default_end_image(gx_device *dev, gx_image_enum_common_t *info, bool draw_last); int gx_default_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y); int gx_no_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_strip_bitmap *textures, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); int gx_default_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_strip_bitmap *textures, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); void gx_default_get_clipping_box(gx_device *dev, gs_fixed_rect *pbox); void gx_get_largest_clipping_box(gx_device *dev, gs_fixed_rect *pbox); int gx_default_begin_typed_image(gx_device *dev, const gs_imager_state *pis, const gs_matrix *pmat, const gs_image_common_t *pim, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int gx_no_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread); int gx_default_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread); int gx_default_map_color_rgb_alpha(gx_device *dev, gx_color_index color, gx_color_value rgba[4]); int gx_no_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory); int gx_default_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory); int gx_null_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory); int gx_default_get_hardware_params(gx_device *dev, gs_param_list *plist); int gx_default_text_begin(gx_device *dev, gs_imager_state *pis, const gs_text_params_t *text, gs_font *font, gx_path *path, const gx_device_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gs_text_enum_t **ppte); int gx_default_finish_copydevice(gx_device *dev, const gx_device *from_dev); int gx_default_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function); int gx_default_fill_rectangle_hl_color(gx_device *dev, const gs_fixed_rect *rect, const gs_imager_state *pis, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gx_default_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length); int gx_default_fill_linear_color_scanline(gx_device *dev, const gs_fill_attributes *fa, int i, int j, int w, const frac31 *c0, const int32_t *c0_f, const int32_t *cg_num, int32_t cg_den ); int gx_default_fill_linear_color_trapezoid(gx_device *dev, const gs_fill_attributes *fa, const gs_fixed_point *p0, const gs_fixed_point *p1, const gs_fixed_point *p2, const gs_fixed_point *p3, const frac31 *c0, const frac31 *c1, const frac31 *c2, const frac31 *c3); int gx_default_fill_linear_color_triangle(gx_device *dev, const gs_fill_attributes *fa, const gs_fixed_point *p0, const gs_fixed_point *p1, const gs_fixed_point *p2, const frac31 *c0, const frac31 *c1, const frac31 *c2); int gx_default_update_spot_equivalent_colors(gx_device *dev, const gs_state * pgs); gx_color_index gx_default_b_w_map_rgb_color(gx_device *dev, const gx_color_value cv[]); int gx_default_b_w_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); gx_color_index gx_default_gray_map_rgb_color(gx_device *dev, const gx_color_value cv[]); int gx_default_gray_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); int gx_default_rgb_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); gx_color_index gx_default_rgb_map_rgb_color(gx_device *dev, const gx_color_value cv[]); gx_color_index cmyk_1bit_map_cmyk_color(gx_device *dev, const gx_color_value cv[]); int cmyk_1bit_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); int (cmyk_1bit_map_color_cmyk)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]); gx_color_index cmyk_8bit_map_cmyk_color(gx_device *dev, const gx_color_value cv[]); int cmyk_8bit_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); int (cmyk_8bit_map_color_cmyk)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]); gx_color_index (gx_default_8bit_map_gray_color)(gx_device * dev, const gx_color_value colors[]); int (gx_default_8bit_map_color_gray)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]); int gx_forward_close_device(gx_device *dev); void gx_forward_get_initial_matrix(gx_device *dev, gs_matrix *pmat); int gx_forward_sync_output(gx_device *dev); int gx_forward_output_page(gx_device *dev, int num_copies, int flush); gx_color_index gx_forward_map_rgb_color(gx_device *dev, const gx_color_value cv[]); int gx_forward_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]); int gx_forward_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color); int gx_forward_tile_rectangle(gx_device *dev, const gx_tile_bitmap *tile, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y); int gx_forward_copy_mono(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1); int gx_forward_copy_color(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height); int gx_forward_get_bits(gx_device *dev, int y, byte *data, byte **actual_data); int gx_forward_get_params(gx_device *dev, gs_param_list *plist); int gx_forward_put_params(gx_device *dev, gs_param_list *plist); gx_color_index gx_forward_map_cmyk_color(gx_device *dev, const gx_color_value cv[]); const gx_xfont_procs *gx_forward_get_xfont_procs(gx_device *dev); gx_device *gx_forward_get_xfont_device(gx_device *dev); gx_color_index gx_forward_map_rgb_alpha_color(gx_device *dev, gx_color_value red, gx_color_value green, gx_color_value blue, gx_color_value alpha); gx_device *gx_forward_get_page_device(gx_device *dev); int gx_forward_copy_alpha(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color, int depth); int gx_forward_get_band(gx_device *dev, int y, int *band_start); int gx_forward_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_tile_bitmap *texture, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); int gx_forward_fill_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_fill_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gx_forward_stroke_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_stroke_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gx_forward_fill_mask(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, const gx_drawing_color *pdcolor, int depth, gs_logical_operation_t lop, const gx_clip_path *pcpath); int gx_forward_fill_trapezoid(gx_device *dev, const gs_fixed_edge *left, const gs_fixed_edge *right, fixed ybot, fixed ytop, bool swap_axes, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_forward_fill_parallelogram(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_forward_fill_triangle(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_forward_draw_thin_line(gx_device *dev, fixed fx0, fixed fy0, fixed fx1, fixed fy1, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gx_forward_begin_image(gx_device *dev, const gs_imager_state *pis, const gs_image_t *pim, gs_image_format_t format, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int gx_forward_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y); int gx_forward_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_strip_bitmap *textures, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop); void gx_forward_get_clipping_box(gx_device *dev, gs_fixed_rect *pbox); int gx_forward_begin_typed_image(gx_device *dev, const gs_imager_state *pis, const gs_matrix *pmat, const gs_image_common_t *pim, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int gx_forward_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread); int gx_forward_map_color_rgb_alpha(gx_device *dev, gx_color_index color, gx_color_value rgba[4]); int gx_forward_get_hardware_params(gx_device *dev, gs_param_list *plist); int gx_forward_text_begin(gx_device *dev, gs_imager_state *pis, const gs_text_params_t *text, gs_font *font, gx_path *path, const gx_device_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gs_text_enum_t **ppte); const gx_cm_color_map_procs * (gx_forward_get_color_mapping_procs)(const gx_device * dev); int (gx_forward_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type); gx_color_index (gx_forward_encode_color)(gx_device * dev, const gx_color_value colors[]); int (gx_forward_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]); int gx_forward_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function); int gx_forward_fill_rectangle_hl_color(gx_device *dev, const gs_fixed_rect *rect, const gs_imager_state *pis, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gx_forward_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length); int gx_forward_fill_linear_color_scanline(gx_device *dev, const gs_fill_attributes *fa, int i, int j, int w, const frac31 *c0, const int32_t *c0_f, const int32_t *cg_num, int32_t cg_den ); int gx_forward_fill_linear_color_trapezoid(gx_device *dev, const gs_fill_attributes *fa, const gs_fixed_point *p0, const gs_fixed_point *p1, const gs_fixed_point *p2, const gs_fixed_point *p3, const frac31 *c0, const frac31 *c1, const frac31 *c2, const frac31 *c3); int gx_forward_fill_linear_color_triangle(gx_device *dev, const gs_fill_attributes *fa, const gs_fixed_point *p0, const gs_fixed_point *p1, const gs_fixed_point *p2, const frac31 *c0, const frac31 *c1, const frac31 *c2); int gx_forward_update_spot_equivalent_colors(gx_device *dev, const gs_state * pgs); void gx_device_set_procs(gx_device *); void gx_device_fill_in_procs(gx_device *); void gx_device_forward_fill_in_procs(gx_device_forward *); void gx_device_forward_color_procs(gx_device_forward *); void check_device_separable(gx_device * dev); void set_linear_color_bits_mask_shift(gx_device * dev); void gx_device_copy_color_procs(gx_device *dev, const gx_device *target); gx_color_index gx_device_black(gx_device *dev); gx_color_index gx_device_white(gx_device *dev); void gx_device_decache_colors(gx_device *dev); void gx_device_copy_color_params(gx_device *dev, const gx_device *target); void gx_device_copy_params(gx_device *dev, const gx_device *target); # 418 "./src/gxdevice.h" int gx_parse_output_file_name(gs_parsed_file_name_t *pfn, const char **pfmt, const char *fname, uint len); int gx_device_open_output_file(const gx_device * dev, char *fname, bool binary, bool positionable, FILE ** pfile); int gx_device_close_output_file(const gx_device * dev, const char *fname, FILE *file); # 451 "./src/gxdevice.h" int gx_finish_output_page(gx_device *dev, int num_copies, int flush); # 542 "./src/gxdevice.h" typedef struct gdev_input_media_s { float PageSize[4]; const char *MediaColor; float MediaWeight; const char *MediaType; } gdev_input_media_t; extern const gdev_input_media_t gdev_input_media_default; void gdev_input_media_init(gdev_input_media_t * pim); int gdev_begin_input_media(gs_param_list * mlist, gs_param_dict * pdict, int count); int gdev_write_input_page_size(int index, gs_param_dict * pdict, floatp width_points, floatp height_points); int gdev_write_input_media(int index, gs_param_dict * pdict, const gdev_input_media_t * pim); int gdev_end_input_media(gs_param_list * mlist, gs_param_dict * pdict); typedef struct gdev_output_media_s { const char *OutputType; } gdev_output_media_t; extern const gdev_output_media_t gdev_output_media_default; int gdev_begin_output_media(gs_param_list * mlist, gs_param_dict * pdict, int count); int gdev_write_output_media(int index, gs_param_dict * pdict, const gdev_output_media_t * pom); int gdev_end_output_media(gs_param_list * mlist, gs_param_dict * pdict); # 23 "./src/gdevpdfx.h" 2 # 1 "./src/gxfont.h" 1 # 22 "./src/gxfont.h" # 1 "./src/gsfont.h" 1 # 31 "./src/gsfont.h" typedef struct gs_font_dir_s gs_font_dir; # 42 "./src/gsfont.h" gs_font_dir *gs_font_dir_alloc2(gs_memory_t * struct_mem, gs_memory_t * bits_mem); gs_font_dir *gs_font_dir_alloc2_limits(gs_memory_t * struct_mem, gs_memory_t * bits_mem, uint smax, uint bmax, uint mmax, uint cmax, uint upper); # 56 "./src/gsfont.h" int gs_definefont(gs_font_dir *, gs_font *); int gs_font_find_similar(const gs_font_dir * pdir, const gs_font **ppfont, int (*similar)(const gs_font *, const gs_font *)); int gs_scalefont(gs_font_dir *, const gs_font *, floatp, gs_font **); int gs_makefont(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **); int gs_setfont(gs_state *, gs_font *); gs_font *gs_currentfont(const gs_state *); gs_font *gs_rootfont(const gs_state *); void gs_set_currentfont(gs_state *, gs_font *); int gs_purge_font(gs_font *); gs_font *gs_find_font_by_id(gs_font_dir *pdir, gs_id id, gs_matrix *FontMatrix); void gs_cachestatus(const gs_font_dir *, uint[7]); uint gs_currentcachesize(const gs_font_dir *); int gs_setcachesize(gs_font_dir *, uint); uint gs_currentcachelower(const gs_font_dir *); int gs_setcachelower(gs_font_dir *, uint); uint gs_currentcacheupper(const gs_font_dir *); int gs_setcacheupper(gs_font_dir *, uint); uint gs_currentaligntopixels(const gs_font_dir *); int gs_setaligntopixels(gs_font_dir *, uint); uint gs_currentgridfittt(const gs_font_dir *); int gs_setgridfittt(gs_font_dir *, uint); # 23 "./src/gxfont.h" 2 # 1 "./src/gsgdata.h" 1 # 53 "./src/gsgdata.h" typedef struct gs_glyph_data_procs_s gs_glyph_data_procs_t; typedef struct gs_glyph_data_s gs_glyph_data_t; struct gs_glyph_data_s { gs_const_bytestring bits; const gs_glyph_data_procs_t *procs; void *proc_data; gs_memory_t *memory; }; extern const gs_memory_struct_type_t st_glyph_data; struct gs_glyph_data_procs_s { void (*free)(gs_glyph_data_t *pgd, client_name_t cname); int (*substring)(gs_glyph_data_t *pgd, uint offset, uint size); }; int gs_glyph_data_substring(gs_glyph_data_t *pgd, uint offset, uint size); void gs_glyph_data_free(gs_glyph_data_t *pgd, client_name_t cname); # 123 "./src/gsgdata.h" void gs_glyph_data_from_string(gs_glyph_data_t *pgd, const byte *data, uint size, gs_font *font); void gs_glyph_data_from_bytes(gs_glyph_data_t *pgd, const byte *bytes, uint offset, uint size, gs_font *font); void gs_glyph_data_from_null(gs_glyph_data_t *pgd); # 24 "./src/gxfont.h" 2 # 1 "./src/gsnotify.h" 1 # 34 "./src/gsnotify.h" typedef int (*gs_notify_proc_t)(void *proc_data, void *event_data); typedef struct gs_notify_registration_s gs_notify_registration_t; struct gs_notify_registration_s { gs_notify_proc_t proc; void *proc_data; gs_notify_registration_t *next; }; typedef struct gs_notify_list_s { gs_memory_t *memory; gs_notify_registration_t *first; } gs_notify_list_t; extern const gs_memory_struct_type_t st_gs_notify_list; void gs_notify_init(gs_notify_list_t *nlist, gs_memory_t *mem); int gs_notify_register(gs_notify_list_t *nlist, gs_notify_proc_t proc, void *proc_data); int gs_notify_unregister(gs_notify_list_t *nlist, gs_notify_proc_t proc, void *proc_data); int gs_notify_unregister_calling(gs_notify_list_t *nlist, gs_notify_proc_t proc, void *proc_data, void (*unreg_proc)(void *pdata)); int gs_notify_all(gs_notify_list_t *nlist, void *event_data); void gs_notify_release(gs_notify_list_t *nlist); # 26 "./src/gxfont.h" 2 # 1 "./src/gxftype.h" 1 # 23 "./src/gxftype.h" typedef enum { ft_composite = 0, ft_encrypted = 1, ft_encrypted2 = 2, ft_user_defined = 3, ft_disk_based = 4, ft_CID_encrypted = 9, ft_CID_user_defined = 10, ft_CID_TrueType = 11, ft_Chameleon = 14, ft_CID_bitmap = 32, ft_TrueType = 42 } font_type; typedef enum { fbit_use_outlines = 0, fbit_use_bitmaps = 1, fbit_transform_bitmaps = 2 } fbit_type; # 29 "./src/gxfont.h" 2 # 58 "./src/gxfont.h" typedef struct gs_font_info_s { int members; int Ascent; int AvgWidth; gs_int_rect BBox; int CapHeight; int Descent; uint Flags; uint Flags_requested; uint Flags_returned; float ItalicAngle; int Leading; int MaxWidth; int MissingWidth; int StemH; int StemV; int UnderlinePosition; int UnderlineThickness; int XHeight; gs_const_string Copyright; gs_const_string Notice; gs_const_string FamilyName; gs_const_string FullName; } gs_font_info_t; # 134 "./src/gxfont.h" typedef struct gs_glyph_info_s { int members; gs_point width[2]; gs_point v; gs_rect bbox; int num_pieces; gs_glyph *pieces; } gs_glyph_info_t; typedef struct gs_font_procs_s { # 168 "./src/gxfont.h" int (*define_font)(gs_font_dir *, gs_font *); # 177 "./src/gxfont.h" int (*make_font)(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **); # 191 "./src/gxfont.h" int (*font_info)(gs_font *font, const gs_point *pscale, int members, gs_font_info_t *info); # 207 "./src/gxfont.h" int (*same_font)(const gs_font *font, const gs_font *ofont, int mask); # 221 "./src/gxfont.h" gs_glyph (*encode_char)(gs_font *, gs_char, gs_glyph_space_t); gs_char (*decode_glyph)(gs_font *, gs_glyph); # 240 "./src/gxfont.h" int (*enumerate_glyph)(gs_font *font, int *pindex, gs_glyph_space_t glyph_space, gs_glyph *pglyph); # 268 "./src/gxfont.h" int (*glyph_info)(gs_font *font, gs_glyph glyph, const gs_matrix *pmat, int members, gs_glyph_info_t *info); # 284 "./src/gxfont.h" int (*glyph_outline)(gs_font *font, int WMode, gs_glyph glyph, const gs_matrix *pmat, gx_path *ppath, double sbw[4]); int (*glyph_name)(gs_font *font, gs_glyph glyph, gs_const_string *pstr); # 304 "./src/gxfont.h" int (*init_fstack)(gs_text_enum_t *, gs_font *); # 318 "./src/gxfont.h" int (*next_char_glyph)(gs_text_enum_t *pte, gs_char *pchar, gs_glyph *pglyph); # 330 "./src/gxfont.h" int (*build_char)(gs_text_enum_t *, gs_state *, gs_font *, gs_char, gs_glyph); } gs_font_procs; int gs_no_define_font(gs_font_dir *, gs_font *); int gs_no_make_font(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **); int gs_base_make_font(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **); int gs_default_font_info(gs_font *font, const gs_point *pscale, int members, gs_font_info_t *info); int gs_default_same_font(const gs_font *font, const gs_font *ofont, int mask); int gs_base_same_font(const gs_font *font, const gs_font *ofont, int mask); gs_glyph gs_no_encode_char(gs_font *, gs_char, gs_glyph_space_t); gs_char gs_no_decode_glyph(gs_font *, gs_glyph); int gs_no_enumerate_glyph(gs_font *font, int *pindex, gs_glyph_space_t glyph_space, gs_glyph *pglyph); int gs_default_glyph_info(gs_font *font, gs_glyph glyph, const gs_matrix *pmat, int members, gs_glyph_info_t *info); int gs_no_glyph_outline(gs_font *font, int WMode, gs_glyph glyph, const gs_matrix *pmat, gx_path *ppath, double sbw[4]); int gs_no_glyph_name(gs_font *font, gs_glyph glyph, gs_const_string *pstr); int gs_default_init_fstack(gs_text_enum_t *, gs_font *); int gs_default_next_char_glyph(gs_text_enum_t *pte, gs_char *pchar, gs_glyph *pglyph); int gs_no_build_char(gs_text_enum_t *, gs_state *, gs_font *, gs_char, gs_glyph); extern const gs_font_procs gs_font_procs_default; typedef struct gs_font_name_s { byte chars[47 + 1]; uint size; } gs_font_name; # 396 "./src/gxfont.h" struct gs_font_s { gs_font *next, *prev; gs_memory_t *memory; gs_font_dir *dir; bool is_resource; gs_notify_list_t notify_list; gs_id id; gs_font *base; void *client_data; gs_matrix FontMatrix; gs_matrix orig_FontMatrix; font_type FontType; bool BitmapWidths; fbit_type ExactSize, InBetweenSize, TransformedChar; int WMode; int PaintType; float StrokeWidth; gs_font_procs procs; gs_font_name key_name, font_name; }; extern const gs_memory_struct_type_t st_gs_font; void gs_font_finalize(void *ptr); # 412 "./src/gxfont.h" extern const gs_memory_struct_type_t st_gs_font_ptr_element; gs_font * gs_font_alloc(gs_memory_t *mem, gs_memory_type_ptr_t pstype, const gs_font_procs *procs, gs_font_dir *dir, client_name_t cname); void gs_font_notify_init(gs_font *font); int gs_font_notify_register(gs_font *font, gs_notify_proc_t proc, void *proc_data); int gs_font_notify_unregister(gs_font *font, gs_notify_proc_t proc, void *proc_data); typedef struct FAPI_server_s FAPI_server; # 454 "./src/gxfont.h" typedef struct gs_font_base_s gs_font_base; struct gs_font_base_s { gs_font *next, *prev; gs_memory_t *memory; gs_font_dir *dir; bool is_resource; gs_notify_list_t notify_list; gs_id id; gs_font *base; void *client_data; gs_matrix FontMatrix; gs_matrix orig_FontMatrix; font_type FontType; bool BitmapWidths; fbit_type ExactSize, InBetweenSize, TransformedChar; int WMode; int PaintType; float StrokeWidth; gs_font_procs procs; gs_font_name key_name, font_name; gs_rect FontBBox; gs_uid UID; FAPI_server *FAPI; void *FAPI_font_data; gs_encoding_index_t encoding_index; gs_encoding_index_t nearest_encoding_index; }; extern const gs_memory_struct_type_t st_gs_font_base; # 469 "./src/gxfont.h" gs_font_base * gs_font_base_alloc(gs_memory_t *mem, gs_memory_type_ptr_t pstype, const gs_font_procs *procs, gs_font_dir *dir, client_name_t cname); extern const char gx_extendeg_glyph_name_separator[]; bool gs_font_glyph_is_notdef(gs_font_base *bfont, gs_glyph glyph); const gs_font_base *gs_font_parent(const gs_font_base *pbfont); # 24 "./src/gdevpdfx.h" 2 # 1 "./src/gxline.h" 1 # 20 "./src/gxline.h" # 1 "./src/gslparam.h" 1 # 21 "./src/gslparam.h" typedef enum { gs_cap_butt = 0, gs_cap_round = 1, gs_cap_square = 2, gs_cap_triangle = 3, gs_cap_unknown = 4 } gs_line_cap; typedef enum { gs_join_miter = 0, gs_join_round = 1, gs_join_bevel = 2, gs_join_none = 3, gs_join_triangle = 4, gs_join_unknown = 5 } gs_line_join; # 21 "./src/gxline.h" 2 typedef struct gx_dash_params_s { float *pattern; uint pattern_size; float offset; bool adapt; float pattern_length; bool init_ink_on; int init_index; float init_dist_left; } gx_dash_params; typedef struct gx_line_params_s { float half_width; gs_line_cap cap; gs_line_join join; int curve_join; float miter_limit; float miter_check; float dot_length; bool dot_length_absolute; gs_matrix dot_orientation; gx_dash_params dash; } gx_line_params; int gx_set_miter_limit(gx_line_params *, floatp); int gx_set_dash(gx_dash_params *, const float *, uint, floatp, gs_memory_t *); int gx_set_dot_length(gx_line_params *, floatp, bool); # 25 "./src/gdevpdfx.h" 2 # 1 "./src/spprint.h" 1 # 30 "./src/spprint.h" int stream_write(stream * s, const void *ptr, uint count); int stream_puts(stream * s, const char *str); # 42 "./src/spprint.h" const char *pprintg1(stream * s, const char *format, floatp v); const char *pprintg2(stream * s, const char *format, floatp v1, floatp v2); const char *pprintg3(stream * s, const char *format, floatp v1, floatp v2, floatp v3); const char *pprintg4(stream * s, const char *format, floatp v1, floatp v2, floatp v3, floatp v4); const char *pprintg6(stream * s, const char *format, floatp v1, floatp v2, floatp v3, floatp v4, floatp v5, floatp v6); const char *pprintd1(stream * s, const char *format, int v); const char *pprintd2(stream * s, const char *format, int v1, int v2); const char *pprintd3(stream * s, const char *format, int v1, int v2, int v3); const char *pprintd4(stream * s, const char *format, int v1, int v2, int v3, int v4); const char *pprintld1(stream * s, const char *format, long v); const char *pprintld2(stream * s, const char *format, long v1, long v2); const char *pprintld3(stream * s, const char *format, long v1, long v2, long v3); const char *pprints1(stream * s, const char *format, const char *str); const char *pprints2(stream * s, const char *format, const char *str1, const char *str2); const char *pprints3(stream * s, const char *format, const char *str1, const char *str2, const char *str3); # 27 "./src/gdevpdfx.h" 2 # 1 "./src/gdevpsdf.h" 1 # 25 "./src/gdevpsdf.h" # 1 "./src/gdevvec.h" 1 # 23 "./src/gdevvec.h" # 1 "./src/gdevbbox.h" 1 # 72 "./src/gdevbbox.h" typedef struct gx_device_bbox_procs_s { bool (*init_box)(void *proc_data); void (*get_box)(const void *proc_data, gs_fixed_rect *pbox); void (*add_rect)(void *proc_data, fixed x0, fixed y0, fixed x1, fixed y1); bool (*in_rect)(const void *proc_data, const gs_fixed_rect *pbox); } gx_device_bbox_procs_t; bool bbox_default_init_box(void *proc_data); void bbox_default_get_box(const void *proc_data, gs_fixed_rect *pbox); void bbox_default_add_rect(void *proc_data, fixed x0, fixed y0, fixed x1, fixed y1); bool bbox_default_in_rect(const void *proc_data, const gs_fixed_rect *pbox); # 108 "./src/gdevbbox.h" typedef struct gx_device_bbox_s gx_device_bbox; struct gx_device_bbox_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; gx_device *target; bool free_standing; bool forward_open_close; gx_device_bbox_procs_t box_procs; void *box_proc_data; bool white_is_opaque; gs_fixed_rect bbox; gx_color_index black, white; gx_color_index transparent; }; extern const gs_memory_struct_type_t st_device_bbox; void gx_device_bbox_init(gx_device_bbox * dev, gx_device * target, gs_memory_t *mem); void gx_device_bbox_fwd_open_close(gx_device_bbox * dev, bool forward_open_close); void gx_device_bbox_set_white_opaque(gx_device_bbox *dev, bool white_is_opaque); void gx_device_bbox_bbox(gx_device_bbox * dev, gs_rect * pbbox); void gx_device_bbox_release(gx_device_bbox *dev); # 24 "./src/gdevvec.h" 2 # 1 "./src/gxiparam.h" 1 # 37 "./src/gxiparam.h" struct gx_image_type_s { gs_memory_type_ptr_t stype; int (*begin_typed_image)(gx_device *dev, const gs_imager_state *pis, const gs_matrix *pmat, const gs_image_common_t *pim, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); # 59 "./src/gxiparam.h" int (*source_size)(const gs_imager_state *pis, const gs_image_common_t *pic, gs_int_point *psize); # 70 "./src/gxiparam.h" int (*sput)(const gs_image_common_t *pic, stream *s, const gs_color_space **ppcs); # 80 "./src/gxiparam.h" int (*sget)(gs_image_common_t *pic, stream *s, const gs_color_space *pcs); # 89 "./src/gxiparam.h" void (*release)(gs_image_common_t *pic, gs_memory_t *mem); int index; }; int gx_data_image_source_size(const gs_imager_state *pis, const gs_image_common_t *pic, gs_int_point *psize); int gx_image_no_sput(const gs_image_common_t *pic, stream *s, const gs_color_space **ppcs); int gx_image_no_sget(gs_image_common_t *pic, stream *s, const gs_color_space *pcs); void gx_image_default_release(gs_image_common_t *pic, gs_memory_t *mem); int gx_pixel_image_sput(const gs_pixel_image_t *pic, stream *s, const gs_color_space **ppcs, int extra); int gx_pixel_image_sget(gs_pixel_image_t *pic, stream *s, const gs_color_space *pcs); void gx_pixel_image_release(gs_pixel_image_t *pic, gs_memory_t *mem); bool gx_image_matrix_is_default(const gs_data_image_t *pid); void gx_image_matrix_set_default(gs_data_image_t *pid); void sput_variable_uint(stream *s, uint w); int sget_variable_uint(stream *s, uint *pw); # 138 "./src/gxiparam.h" typedef struct gx_image_enum_procs_s { # 149 "./src/gxiparam.h" int (*plane_data)(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used); # 160 "./src/gxiparam.h" int (*end_image)(gx_image_enum_common_t *info, bool draw_last); # 173 "./src/gxiparam.h" int (*flush)(gx_image_enum_common_t *info); # 198 "./src/gxiparam.h" bool (*planes_wanted)(const gx_image_enum_common_t *info, byte *wanted); } gx_image_enum_procs_t; # 220 "./src/gxiparam.h" struct gx_image_enum_common_s { const gx_image_type_t *image_type; const gx_image_enum_procs_t *procs; gx_device *dev; gs_id id; int num_planes; int plane_depths[(((8 * 8) + 1) * 8)]; int plane_widths[(((8 * 8) + 1) * 8)]; }; extern const gs_memory_struct_type_t st_gx_image_enum_common; # 233 "./src/gxiparam.h" int gx_image_enum_common_init(gx_image_enum_common_t * piec, const gs_data_image_t * pic, const gx_image_enum_procs_t * piep, gx_device * dev, int num_components, gs_image_format_t format); int gx_no_plane_data(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used); int gx_ignore_end_image(gx_image_enum_common_t *info, bool draw_last); int gx_begin_image1(gx_device *dev, const gs_imager_state *pis, const gs_matrix *pmat, const gs_image_common_t *pim, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int gx_image1_plane_data(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used); int gx_image1_end_image(gx_image_enum_common_t *info, bool draw_last); int gx_image1_flush(gx_image_enum_common_t *info); # 25 "./src/gdevvec.h" 2 # 1 "./src/gxistate.h" 1 # 28 "./src/gxistate.h" # 1 "./src/gxmatrix.h" 1 # 33 "./src/gxmatrix.h" struct gs_matrix_fixed_s { float xx, xy, yx, yy, tx, ty; fixed tx_fixed, ty_fixed; bool txy_fixed_valid; }; typedef struct gs_matrix_fixed_s gs_matrix_fixed; int gs_matrix_fixed_from_matrix(gs_matrix_fixed *, const gs_matrix *); int gs_point_transform2fixed(const gs_matrix_fixed *, floatp, floatp, gs_fixed_point *); int gs_distance_transform2fixed(const gs_matrix_fixed *, floatp, floatp, gs_fixed_point *); int gs_point_transform2fixed_rounding(const gs_matrix_fixed * pmat, floatp x, floatp y, gs_fixed_point * ppt); # 63 "./src/gxmatrix.h" typedef struct { long xx, xy, yx, yy; int skewed; int shift; int max_bits; fixed round; } fixed_coeff; # 81 "./src/gxmatrix.h" fixed fixed_coeff_mult(fixed, long, const fixed_coeff *, int); # 29 "./src/gxistate.h" 2 # 1 "./src/gscspace.h" 1 # 166 "./src/gscspace.h" typedef enum { gs_color_space_index_DeviceGray = 0, gs_color_space_index_DeviceRGB, gs_color_space_index_DeviceCMYK, gs_color_space_index_DevicePixel, gs_color_space_index_DeviceN, gs_color_space_index_CIEDEFG, gs_color_space_index_CIEDEF, gs_color_space_index_CIEABC, gs_color_space_index_CIEA, gs_color_space_index_Separation, gs_color_space_index_Indexed, gs_color_space_index_Pattern, gs_color_space_index_CIEICC } gs_color_space_index; # 201 "./src/gscspace.h" typedef struct gs_color_space_type_s gs_color_space_type; # 225 "./src/gscspace.h" typedef struct gs_device_pixel_params_s { int depth; } gs_device_pixel_params; typedef struct gs_cie_a_s gs_cie_a; typedef struct gs_cie_abc_s gs_cie_abc; typedef struct gs_cie_def_s gs_cie_def; typedef struct gs_cie_defg_s gs_cie_defg; # 240 "./src/gscspace.h" typedef struct gs_small_base_color_space_s { const gs_color_space_type * type; gs_memory_t * pmem; gs_id id; union { gs_device_pixel_params pixel; gs_cie_defg * defg; gs_cie_def * def; gs_cie_abc * abc; gs_cie_a * a; } params; } gs_small_base_color_space; # 252 "./src/gscspace.h" typedef struct gs_cie_icc_s gs_cie_icc; typedef struct gs_cieicc_params_s { gs_cie_icc * picc_info; gs_small_base_color_space alt_space; } gs_icc_params; typedef struct gs_base_color_space_s { const gs_color_space_type * type; gs_memory_t * pmem; gs_id id; union { gs_device_pixel_params pixel; gs_cie_defg * defg; gs_cie_def * def; gs_cie_abc * abc; gs_cie_a * a; gs_icc_params icc; } params; } gs_base_color_space; typedef struct gs_device_n_map_s gs_device_n_map; typedef struct gs_device_n_attributes_s gs_device_n_attributes; typedef ulong gs_separation_name; # 292 "./src/gscspace.h" typedef int (gs_callback_func_get_colorname_string) (const gs_memory_t *mem, gs_separation_name colorname, unsigned char **ppstr, unsigned int *plen); typedef enum { SEP_NONE, SEP_ALL, SEP_OTHER } separation_type; typedef struct gs_separation_params_s { gs_separation_name sep_name; gs_base_color_space alt_space; gs_device_n_map *map; separation_type sep_type; bool use_alt_cspace; gs_callback_func_get_colorname_string *get_colorname_string; } gs_separation_params; typedef struct gs_device_n_params_s { gs_separation_name *names; uint num_components; gs_base_color_space alt_space; gs_device_n_map *map; gs_device_n_attributes *colorants; bool use_alt_cspace; gs_callback_func_get_colorname_string *get_colorname_string; } gs_device_n_params; typedef struct gs_direct_color_space_s { const gs_color_space_type * type; gs_memory_t * pmem; gs_id id; union { gs_device_pixel_params pixel; gs_cie_defg * defg; gs_cie_def * def; gs_cie_abc * abc; gs_cie_a * a; gs_icc_params icc; gs_separation_params separation; gs_device_n_params device_n; } params; } gs_direct_color_space; # 341 "./src/gscspace.h" typedef struct gs_indexed_map_s gs_indexed_map; typedef struct gs_indexed_params_s { gs_direct_color_space base_space; int hival; union { gs_const_string table; gs_indexed_map *map; } lookup; bool use_proc; } gs_indexed_params; typedef struct gs_paint_color_space_s { const gs_color_space_type * type; gs_memory_t * pmem; gs_id id; union { gs_device_pixel_params pixel; gs_cie_defg * defg; gs_cie_def * def; gs_cie_abc * abc; gs_cie_a * a; gs_icc_params icc; gs_separation_params separation; gs_device_n_params device_n; gs_indexed_params indexed; } params; } gs_paint_color_space; typedef struct gs_pattern_params_s { bool has_base_space; gs_paint_color_space base_space; } gs_pattern_params; struct gs_color_space_s { const gs_color_space_type * type; gs_memory_t * pmem; gs_id id; union { gs_device_pixel_params pixel; gs_cie_defg * defg; gs_cie_def * def; gs_cie_abc * abc; gs_cie_a * a; gs_icc_params icc; gs_separation_params separation; gs_device_n_params device_n; gs_indexed_params indexed; gs_pattern_params pattern; } params; }; # 438 "./src/gscspace.h" extern int gs_cspace_init_DeviceGray(const gs_memory_t *mem, gs_color_space *pcs), gs_cspace_build_DeviceGray(gs_color_space ** ppcspace, gs_memory_t * pmem), gs_cspace_init_DeviceRGB(const gs_memory_t *mem, gs_color_space *pcs), gs_cspace_build_DeviceRGB(gs_color_space ** ppcspace, gs_memory_t * pmem), gs_cspace_init_DeviceCMYK(const gs_memory_t *mem, gs_color_space *pcs), gs_cspace_build_DeviceCMYK(gs_color_space ** ppcspace, gs_memory_t * pmem); void gs_cspace_init_from(gs_color_space * pcsto, const gs_color_space * pcsfrom); void gs_cspace_assign(gs_color_space * pdest, const gs_color_space * psrc); void gs_cspace_release(gs_color_space * pcs); gs_color_space_index gs_color_space_get_index(const gs_color_space *); int gs_color_space_num_components(const gs_color_space *); bool gs_color_space_equal(const gs_color_space *pcs1, const gs_color_space *pcs2); void gs_color_space_restrict_color(gs_client_color *, const gs_color_space *); const gs_color_space *gs_cspace_base_space(const gs_color_space * pcspace); # 31 "./src/gxistate.h" 2 # 1 "./src/gstrans.h" 1 # 21 "./src/gstrans.h" # 1 "./src/gxcomp.h" 1 # 22 "./src/gxcomp.h" # 1 "./src/gxbitfmt.h" 1 # 28 "./src/gxbitfmt.h" typedef ulong gx_bitmap_format_t; # 23 "./src/gxcomp.h" 2 # 67 "./src/gxcomp.h" typedef struct gs_composite_type_procs_s { int (*create_default_compositor)(const gs_composite_t *pcte, gx_device **pcdev, gx_device *dev, gs_imager_state *pis, gs_memory_t *mem); bool (*equal)(const gs_composite_t *pcte, const gs_composite_t *pcte2); # 95 "./src/gxcomp.h" int (*write)(const gs_composite_t *pcte, byte *data, uint *psize); # 105 "./src/gxcomp.h" int (*read)(gs_composite_t **ppcte, const byte *data, uint size, gs_memory_t *mem); int (*clist_compositor_write_update)(const gs_composite_t * pcte, gx_device * dev, gx_device ** pcdev, gs_imager_state * pis, gs_memory_t * mem); int (*clist_compositor_read_update)(gs_composite_t * pcte, gx_device * cdev, gx_device * tdev, gs_imager_state * pis, gs_memory_t * mem); } gs_composite_type_procs_t; typedef struct gs_composite_type_s { byte comp_id; gs_composite_type_procs_t procs; } gs_composite_type_t; int gx_default_composite_clist_write_update(const gs_composite_t * pcte, gx_device * dev, gx_device ** pcdev, gs_imager_state * pis, gs_memory_t * mem); int gx_default_composite_clist_read_update(gs_composite_t * pcte, gx_device * cdev, gx_device * tdev, gs_imager_state * pis, gs_memory_t * mem); # 152 "./src/gxcomp.h" struct gs_composite_s { const gs_composite_type_t *type; gs_id id; rc_header rc; }; # 22 "./src/gstrans.h" 2 typedef enum { PDF14_PUSH_DEVICE, PDF14_POP_DEVICE, PDF14_BEGIN_TRANS_GROUP, PDF14_END_TRANS_GROUP, PDF14_INIT_TRANS_MASK, PDF14_BEGIN_TRANS_MASK, PDF14_END_TRANS_MASK, PDF14_SET_BLEND_PARAMS } pdf14_compositor_operations; # 60 "./src/gstrans.h" typedef struct gs_transparency_source_s { float alpha; gs_transparency_mask_t *mask; } gs_transparency_source_t; struct gs_pdf14trans_params_s { pdf14_compositor_operations pdf14_op; int changed; bool Isolated; bool Knockout; gs_rect bbox; gs_transparency_channel_selector_t csel; gs_transparency_mask_subtype_t subtype; int Background_components; bool function_is_identity; float Background[(8 * 8)]; float GrayBackground; gs_function_t *transfer_function; byte transfer_fn[256]; gs_blend_mode_t blend_mode; bool text_knockout; gs_transparency_source_t opacity; gs_transparency_source_t shape; bool mask_is_image; }; typedef struct gs_pdf14trans_params_s gs_pdf14trans_params_t; typedef struct gs_pdf14trans_s { const gs_composite_type_t *type; gs_id id; rc_header rc; gs_pdf14trans_params_t params; } gs_pdf14trans_t; int gs_setblendmode(gs_state *, gs_blend_mode_t); gs_blend_mode_t gs_currentblendmode(const gs_state *); int gs_setopacityalpha(gs_state *, floatp); float gs_currentopacityalpha(const gs_state *); int gs_setshapealpha(gs_state *, floatp); float gs_currentshapealpha(const gs_state *); int gs_settextknockout(gs_state *, bool); bool gs_currenttextknockout(const gs_state *); gs_transparency_state_type_t gs_current_transparency_type(const gs_state *pgs); int gs_push_pdf14trans_device(gs_state * pgs); int gs_pop_pdf14trans_device(gs_state * pgs); void gs_trans_group_params_init(gs_transparency_group_params_t *ptgp); int gs_begin_transparency_group(gs_state * pgs, const gs_transparency_group_params_t *ptgp, const gs_rect *pbbox); int gs_end_transparency_group(gs_state *pgs); void gs_trans_mask_params_init(gs_transparency_mask_params_t *ptmp, gs_transparency_mask_subtype_t subtype); int gs_begin_transparency_mask(gs_state *pgs, const gs_transparency_mask_params_t *ptmp, const gs_rect *pbbox, bool mask_is_image); int gs_end_transparency_mask(gs_state *pgs, gs_transparency_channel_selector_t csel); int gs_init_transparency_mask(gs_state *pgs, gs_transparency_channel_selector_t csel); int gs_discard_transparency_layer(gs_state *pgs); int gx_begin_transparency_group(gs_imager_state * pis, gx_device * pdev, const gs_pdf14trans_params_t * pparams); int gx_end_transparency_group(gs_imager_state * pis, gx_device * pdev); int gx_init_transparency_mask(gs_imager_state * pis, const gs_pdf14trans_params_t * pparams); int gx_begin_transparency_mask(gs_imager_state * pis, gx_device * pdev, const gs_pdf14trans_params_t * pparams); int gx_end_transparency_mask(gs_imager_state * pis, gx_device * pdev, const gs_pdf14trans_params_t * pparams); int gx_discard_transparency_layer(gs_imager_state *pis); int gs_is_pdf14trans_compositor(const gs_composite_t * pct); # 32 "./src/gxistate.h" 2 # 86 "./src/gxistate.h" typedef struct gs_halftone_s gs_halftone; # 109 "./src/gxistate.h" typedef struct gx_transfer_s { int red_component_num; gx_transfer_map *red; int green_component_num; gx_transfer_map *green; int blue_component_num; gx_transfer_map *blue; int gray_component_num; gx_transfer_map *gray; } gx_transfer; # 187 "./src/gxistate.h" typedef struct gs_devicen_color_map_s { bool use_alt_cspace; separation_type sep_type; uint num_components; uint num_colorants; gs_id cspace_id; int color_map[(8 * 8)]; } gs_devicen_color_map; # 253 "./src/gxistate.h" struct gs_imager_state_s { gs_memory_t *memory; void *client_data; gx_line_params line_params; gs_matrix_fixed ctm; bool current_point_valid; gs_point current_point; gs_point subpath_start; bool clamp_coordinates; gs_logical_operation_t log_op; gx_color_value alpha; gs_blend_mode_t blend_mode; gs_transparency_source_t opacity, shape; gs_id soft_mask_id; bool text_knockout; uint text_rendering_mode; gs_transparency_state_t *transparency_stack; bool overprint; int overprint_mode; int effective_overprint_mode; float flatness; gs_fixed_point fill_adjust; bool stroke_adjust; bool accurate_curves; bool have_pattern_streams; float smoothness; const gx_color_map_procs * (*get_cmap_procs)(const gs_imager_state *, const gx_device *); gs_halftone *halftone; gs_int_point screen_phase[2]; gx_device_halftone *dev_ht; struct gs_cie_render_s *cie_render; gx_transfer_map *black_generation; gx_transfer_map *undercolor_removal; gx_transfer set_transfer; gx_transfer_map *effective_transfer[(8 * 8)]; struct gx_cie_joint_caches_s *cie_joint_caches; const struct gx_color_map_procs_s *cmap_procs; gs_devicen_color_map color_component_map; struct gx_pattern_cache_s *pattern_cache; }; # 274 "./src/gxistate.h" int gs_imager_state_initialize(gs_imager_state * pis, gs_memory_t * mem); gs_imager_state * gs_imager_state_copy(const gs_imager_state * pis, gs_memory_t * mem); void gs_imager_state_copied(gs_imager_state * pis); void gs_imager_state_pre_assign(gs_imager_state *to, const gs_imager_state *from); void gs_imager_state_release(gs_imager_state * pis); int gs_currentscreenphase_pis(const gs_imager_state *, gs_int_point *, gs_color_select_t); # 26 "./src/gdevvec.h" 2 # 1 "./src/gxhldevc.h" 1 # 66 "./src/gxhldevc.h" typedef struct gx_hl_saved_color_s { gs_id color_space_id; gs_id pattern_id; bool ccolor_valid; gs_client_color ccolor; gx_device_color_saved saved_dev_color; } gx_hl_saved_color; void gx_hld_saved_color_init(gx_hl_saved_color * psc); const gs_state * gx_hld_get_gstate_ptr(const gs_imager_state * pis); # 98 "./src/gxhldevc.h" bool gx_hld_save_color(const gs_imager_state * pis, const gx_device_color * pdevc, gx_hl_saved_color * psc); bool gx_hld_saved_color_equal(const gx_hl_saved_color * psc1, const gx_hl_saved_color * psc2); bool gx_hld_saved_color_same_cspace(const gx_hl_saved_color * psc1, const gx_hl_saved_color * psc2); bool gx_hld_is_hl_color_available(const gs_imager_state * pis, const gx_device_color * pdevc); # 129 "./src/gxhldevc.h" typedef enum { non_pattern_color_space, pattern_color_sapce, use_process_color } gx_hld_get_color_space_and_ccolor_status; # 158 "./src/gxhldevc.h" gx_hld_get_color_space_and_ccolor_status gx_hld_get_color_space_and_ccolor( const gs_imager_state * pis, const gx_device_color * pdevc, const gs_color_space ** ppcs, const gs_client_color ** ppcc); # 169 "./src/gxhldevc.h" int gx_hld_get_number_color_components(const gs_imager_state * pis); typedef enum { valid_result = 1, invalid_color_info = 2, invalid_component_requested = 3 } gx_hld_get_color_component_status; # 188 "./src/gxhldevc.h" gx_hld_get_color_component_status gx_hld_get_color_component( const gs_imager_state * pis, const gx_device_color * pdevc, int comp_numi, float * output); # 27 "./src/gdevvec.h" 2 # 62 "./src/gdevvec.h" typedef struct gx_device_vector_s gx_device_vector; # 77 "./src/gdevvec.h" typedef enum { gx_path_type_none = 0, gx_path_type_fill = 1, gx_path_type_stroke = 2, gx_path_type_clip = 4, gx_path_type_winding_number = 0, gx_path_type_even_odd = 8, gx_path_type_optimize = 16, gx_path_type_always_close = 32, gx_path_type_rule = gx_path_type_winding_number | gx_path_type_even_odd } gx_path_type_t; typedef enum { gx_rect_x_first, gx_rect_y_first } gx_rect_direction_t; typedef struct gx_device_vector_procs_s { int (*beginpage) (gx_device_vector * vdev); int (*setlinewidth) (gx_device_vector * vdev, floatp width); int (*setlinecap) (gx_device_vector * vdev, gs_line_cap cap); int (*setlinejoin) (gx_device_vector * vdev, gs_line_join join); int (*setmiterlimit) (gx_device_vector * vdev, floatp limit); int (*setdash) (gx_device_vector * vdev, const float *pattern, uint count, floatp offset); int (*setflat) (gx_device_vector * vdev, floatp flatness); int (*setlogop) (gx_device_vector * vdev, gs_logical_operation_t lop, gs_logical_operation_t diff); bool (*can_handle_hl_color) (gx_device_vector * vdev, const gs_imager_state * pis, const gx_drawing_color * pdc); int (*setfillcolor) (gx_device_vector * vdev, const gs_imager_state * pis, const gx_drawing_color * pdc); int (*setstrokecolor) (gx_device_vector * vdev, const gs_imager_state * pis, const gx_drawing_color * pdc); int (*dopath) (gx_device_vector * vdev, const gx_path * ppath, gx_path_type_t type, const gs_matrix *pmat); int (*dorect) (gx_device_vector * vdev, fixed x0, fixed y0, fixed x1, fixed y1, gx_path_type_t type); int (*beginpath) (gx_device_vector * vdev, gx_path_type_t type); int (*moveto) (gx_device_vector * vdev, floatp x0, floatp y0, floatp x, floatp y, gx_path_type_t type); int (*lineto) (gx_device_vector * vdev, floatp x0, floatp y0, floatp x, floatp y, gx_path_type_t type); int (*curveto) (gx_device_vector * vdev, floatp x0, floatp y0, floatp x1, floatp y1, floatp x2, floatp y2, floatp x3, floatp y3, gx_path_type_t type); int (*closepath) (gx_device_vector * vdev, floatp x0, floatp y0, floatp x_start, floatp y_start, gx_path_type_t type); int (*endpath) (gx_device_vector * vdev, gx_path_type_t type); } gx_device_vector_procs; int gdev_vector_setflat(gx_device_vector * vdev, floatp flatness); int gdev_vector_dopath(gx_device_vector * vdev, const gx_path * ppath, gx_path_type_t type, const gs_matrix *pmat); int gdev_vector_dorect(gx_device_vector * vdev, fixed x0, fixed y0, fixed x1, fixed y1, gx_path_type_t type); # 203 "./src/gdevvec.h" struct gx_device_vector_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; gs_memory_t *v_memory; const gx_device_vector_procs *vec_procs; char fname[(260 - 1) + 1]; FILE *file; stream *strm; byte *strmbuf; uint strmbuf_size; int open_options; gs_imager_state state; float dash_pattern[11]; bool fill_used_process_color; bool stroke_used_process_color; gx_hl_saved_color saved_fill_color; gx_hl_saved_color saved_stroke_color; gs_id no_clip_path_id; gs_id clip_path_id; gx_path_type_t fill_options, stroke_options; gs_point scale; bool in_page; gx_device_bbox *bbox_device; gx_color_index black, white; }; extern const gs_memory_struct_type_t st_device_vector; # 220 "./src/gdevvec.h" void gdev_vector_init(gx_device_vector * vdev); void gdev_vector_reset(gx_device_vector * vdev); # 234 "./src/gdevvec.h" int gdev_vector_open_file_options(gx_device_vector * vdev, uint strmbuf_size, int open_options); stream *gdev_vector_stream(gx_device_vector * vdev); int gdev_vector_update_log_op(gx_device_vector * vdev, gs_logical_operation_t lop); int gdev_vector_update_fill_color(gx_device_vector * vdev, const gs_imager_state * pis, const gx_drawing_color * pdcolor); int gdev_vector_prepare_fill(gx_device_vector * vdev, const gs_imager_state * pis, const gx_fill_params * params, const gx_drawing_color * pdcolor); int gdev_vector_prepare_stroke(gx_device_vector * vdev, const gs_imager_state * pis, const gx_stroke_params * params, const gx_drawing_color * pdcolor, floatp scale); int gdev_vector_stroke_scaling(const gx_device_vector *vdev, const gs_imager_state *pis, double *pscale, gs_matrix *pmat); typedef struct gdev_vector_dopath_state_s { gx_device_vector *vdev; gx_path_type_t type; bool first; gs_matrix scale_mat; gs_point start; gs_point prev; } gdev_vector_dopath_state_t; void gdev_vector_dopath_init(gdev_vector_dopath_state_t *state, gx_device_vector *vdev, gx_path_type_t type, const gs_matrix *pmat); int gdev_vector_dopath_segment(gdev_vector_dopath_state_t *state, int pe_op, gs_fixed_point vs[3]); int gdev_vector_write_polygon(gx_device_vector * vdev, const gs_fixed_point * points, uint count, bool close, gx_path_type_t type); int gdev_vector_write_rectangle(gx_device_vector * vdev, fixed x0, fixed y0, fixed x1, fixed y1, bool close, gx_rect_direction_t dir); int gdev_vector_write_clip_path(gx_device_vector * vdev, const gx_clip_path * pcpath); int gdev_vector_update_clip_path(gx_device_vector * vdev, const gx_clip_path * pcpath); int gdev_vector_close_file(gx_device_vector * vdev); # 343 "./src/gdevvec.h" typedef struct gdev_vector_image_enum_s { const gx_image_type_t *image_type; const gx_image_enum_procs_t *procs; gx_device *dev; gs_id id; int num_planes; int plane_depths[(((8 * 8) + 1) * 8)]; int plane_widths[(((8 * 8) + 1) * 8)]; gs_memory_t *memory; gx_image_enum_common_t *default_info; gx_image_enum_common_t *bbox_info; int width, height; int bits_per_pixel; uint bits_per_row; int y; } gdev_vector_image_enum_t; extern const gs_memory_struct_type_t st_vector_image_enum; # 358 "./src/gdevvec.h" int gdev_vector_begin_image(gx_device_vector * vdev, const gs_imager_state * pis, const gs_image_t * pim, gs_image_format_t format, const gs_int_rect * prect, const gx_drawing_color * pdcolor, const gx_clip_path * pcpath, gs_memory_t * mem, const gx_image_enum_procs_t * pprocs, gdev_vector_image_enum_t * pie); int gdev_vector_end_image(gx_device_vector * vdev, gdev_vector_image_enum_t * pie, bool draw_last, gx_color_index pad); int gdev_vector_put_params(gx_device *dev, gs_param_list *plist); int gdev_vector_get_params(gx_device *dev, gs_param_list *plist); int gdev_vector_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color); int gdev_vector_fill_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_fill_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gdev_vector_stroke_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_stroke_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gdev_vector_fill_trapezoid(gx_device *dev, const gs_fixed_edge *left, const gs_fixed_edge *right, fixed ybot, fixed ytop, bool swap_axes, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gdev_vector_fill_parallelogram(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); int gdev_vector_fill_triangle(gx_device *dev, fixed px, fixed py, fixed ax, fixed ay, fixed bx, fixed by, const gx_drawing_color *pdcolor, gs_logical_operation_t lop); # 26 "./src/gdevpsdf.h" 2 # 1 "./src/strimpl.h" 1 # 124 "./src/strimpl.h" struct stream_template_s { gs_memory_type_ptr_t stype; int (*init)(stream_state *); int (*process)(stream_state *, stream_cursor_read *, stream_cursor_write *, bool); uint min_in_size; uint min_out_size; void (*release)(stream_state *); void (*set_defaults)(stream_state *); int (*reinit)(stream_state *); }; int stream_move(stream_cursor_read *, stream_cursor_write *); typedef enum { hex_ignore_garbage = 0, hex_ignore_whitespace = 1, hex_ignore_leading_whitespace = 2 } hex_syntax; int s_hex_process(stream_cursor_read *, stream_cursor_write *, int *, hex_syntax); # 28 "./src/gdevpsdf.h" 2 # 1 "./src/sa85x.h" 1 # 21 "./src/sa85x.h" # 1 "./src/sa85d.h" 1 # 22 "./src/sa85d.h" typedef struct stream_A85D_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; int odd; ulong word; } stream_A85D_state; # 35 "./src/sa85d.h" extern const stream_template s_A85D_template; # 22 "./src/sa85x.h" 2 typedef struct stream_A85E_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; int count; int last_char; } stream_A85E_state; extern const stream_template s_A85E_template; # 29 "./src/gdevpsdf.h" 2 # 1 "./src/scfx.h" 1 # 21 "./src/scfx.h" # 1 "./src/shc.h" 1 # 20 "./src/shc.h" # 1 "./src/gsbittab.h" 1 # 41 "./src/gsbittab.h" extern const byte byte_reverse_bits[256]; extern const byte byte_right_mask[9]; extern const byte byte_count_bits[256]; # 60 "./src/gsbittab.h" extern const byte byte_bit_run_length_0[256], byte_bit_run_length_1[256], byte_bit_run_length_2[256], byte_bit_run_length_3[256], byte_bit_run_length_4[256], byte_bit_run_length_5[256], byte_bit_run_length_6[256], byte_bit_run_length_7[256]; extern const byte *const byte_bit_run_length[8]; extern const byte *const byte_bit_run_length_neg[8]; extern const byte byte_acegbdfh_to_abcdefgh[256]; # 21 "./src/shc.h" 2 # 45 "./src/shc.h" typedef struct hc_definition_s { ushort *counts; uint num_counts; ushort *values; uint num_values; } hc_definition; # 71 "./src/shc.h" typedef struct stream_hc_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; bool FirstBitLowOrder; uint bits; int bits_left; } stream_hc_state; # 84 "./src/shc.h" typedef struct hce_code_s { ushort code; ushort code_length; } hce_code; typedef struct hce_table_s { uint count; hce_code *codes; } hce_table; # 133 "./src/shc.h" void hc_put_code_proc(bool, byte *, uint); # 150 "./src/shc.h" byte *hc_put_last_bits_proc(stream_hc_state *, byte *, uint, int); # 169 "./src/shc.h" typedef struct hcd_code_s { short value; ushort code_length; } hcd_code; typedef struct hcd_table_s { uint count; uint initial_bits; hcd_code *codes; } hcd_table; # 22 "./src/scfx.h" 2 # 46 "./src/scfx.h" typedef struct stream_CF_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; bool FirstBitLowOrder; uint bits; int bits_left; bool Uncompressed; int K; bool EndOfLine; bool EncodedByteAlign; int Columns; int Rows; bool EndOfBlock; bool BlackIs1; int DamagedRowsBeforeError; int DecodedByteAlign; uint raster; byte *lbuf; byte *lprev; int k_left; } stream_CF_state; # 69 "./src/scfx.h" typedef struct stream_CFE_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; bool FirstBitLowOrder; uint bits; int bits_left; bool Uncompressed; int K; bool EndOfLine; bool EncodedByteAlign; int Columns; int Rows; bool EndOfBlock; bool BlackIs1; int DamagedRowsBeforeError; int DecodedByteAlign; uint raster; byte *lbuf; byte *lprev; int k_left; int max_code_bytes; byte *lcode; int read_count; int write_count; int code_bytes; } stream_CFE_state; extern const stream_template s_CFE_template; typedef struct stream_CFD_state_s { const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1]; bool FirstBitLowOrder; uint bits; int bits_left; bool Uncompressed; int K; bool EndOfLine; bool EncodedByteAlign; int Columns; int Rows; bool EndOfBlock; bool BlackIs1; int DamagedRowsBeforeError; int DecodedByteAlign; uint raster; byte *lbuf; byte *lprev; int k_left; int cbit; int rows_left; int row; int rpos; int wpos; int eol_count; byte invert; int run_color; int damaged_rows; bool skipping_damage; int uncomp_run; int uncomp_left; int uncomp_exit; } stream_CFD_state; extern const stream_template s_CFD_template; # 30 "./src/gdevpsdf.h" 2 # 1 "./src/spsdf.h" 1 # 34 "./src/spsdf.h" void s_write_ps_string(stream * s, const byte * str, uint size, int print_ok); int s_alloc_position_stream(stream ** ps, gs_memory_t * mem); typedef struct param_printer_params_s { const char *prefix; const char *suffix; const char *item_prefix; const char *item_suffix; int print_ok; } param_printer_params_t; typedef struct printer_param_list_s { const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys; stream *strm; param_printer_params_t params; bool any; } printer_param_list_t; extern const param_printer_params_t param_printer_params_default; int s_alloc_param_printer(gs_param_list ** pplist, const param_printer_params_t * ppp, stream * s, gs_memory_t * mem); void s_free_param_printer(gs_param_list * plist); int s_init_param_printer(printer_param_list_t *prlist, const param_printer_params_t * ppp, stream * s); void s_release_param_printer(printer_param_list_t *prlist); # 31 "./src/gdevpsdf.h" 2 extern const stream_template s_DCTE_template; # 43 "./src/gdevpsdf.h" typedef struct psdf_image_params_s { gs_c_param_list *ACSDict; bool AntiAlias; bool AutoFilter; int Depth; gs_c_param_list *Dict; bool Downsample; float DownsampleThreshold; enum psdf_downsample_type { ds_Average, ds_Bicubic, ds_Subsample } DownsampleType; bool Encode; const char *Filter; int Resolution; const char *AutoFilterStrategy; const stream_template *filter_template; } psdf_image_params; extern const stream_template s_CFE_template; typedef struct psdf_distiller_params_s { bool ASCII85EncodePages; enum psdf_auto_rotate_pages { arp_None, arp_All, arp_PageByPage } AutoRotatePages; enum psdf_binding { binding_Left, binding_Right } Binding; bool CompressPages; enum psdf_default_rendering_intent { ri_Default, ri_Perceptual, ri_Saturation, ri_RelativeColorimetric, ri_AbsoluteColorimetric } DefaultRenderingIntent; bool DetectBlends; bool DoThumbnails; long ImageMemory; bool LockDistillerParams; bool LZWEncodePages; int OPM; bool PreserveOPIComments; bool UseFlateCompression; gs_const_string CalCMYKProfile; gs_const_string CalGrayProfile; gs_const_string CalRGBProfile; gs_const_string sRGBProfile; enum psdf_color_conversion_strategy { ccs_LeaveColorUnchanged, ccs_UseDeviceDependentColor, ccs_UseDeviceIndependentColor, ccs_UseDeviceIndependentColorForImages, ccs_sRGB, ccs_CMYK, ccs_Gray } ColorConversionStrategy; bool PreserveHalftoneInfo; bool PreserveOverprintSettings; enum psdf_transfer_function_info { tfi_Preserve, tfi_Apply, tfi_Remove } TransferFunctionInfo; enum psdf_ucr_and_bg_info { ucrbg_Preserve, ucrbg_Remove } UCRandBGInfo; # 157 "./src/gdevpsdf.h" psdf_image_params ColorImage; bool ConvertCMYKImagesToRGB; bool ConvertImagesToIndexed; psdf_image_params GrayImage; psdf_image_params MonoImage; gs_param_string_array AlwaysEmbed; gs_param_string_array NeverEmbed; enum psdf_cannot_embed_font_policy { cefp_OK, cefp_Warning, cefp_Error } CannotEmbedFontPolicy; bool EmbedAllFonts; int MaxSubsetPct; bool SubsetFonts; } psdf_distiller_params; typedef enum { psdf_version_level1 = 1000, psdf_version_level1_color = 1100, psdf_version_level2 = 2000, psdf_version_level2_with_TT = 2010, psdf_version_level2_plus = 2017, psdf_version_ll3 = 3010 } psdf_version; # 220 "./src/gdevpsdf.h" typedef struct gx_device_psdf_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; gs_memory_t *v_memory; const gx_device_vector_procs *vec_procs; char fname[(260 - 1) + 1]; FILE *file; stream *strm; byte *strmbuf; uint strmbuf_size; int open_options; gs_imager_state state; float dash_pattern[11]; bool fill_used_process_color; bool stroke_used_process_color; gx_hl_saved_color saved_fill_color; gx_hl_saved_color saved_stroke_color; gs_id no_clip_path_id; gs_id clip_path_id; gx_path_type_t fill_options, stroke_options; gs_point scale; bool in_page; gx_device_bbox *bbox_device; gx_color_index black, white; psdf_version version; bool binary_ok; bool HaveCFF; bool HaveTrueTypes; bool HaveCIDSystem; double ParamCompatibilityLevel; psdf_distiller_params params; } gx_device_psdf; # 240 "./src/gdevpsdf.h" extern const gs_memory_struct_type_t st_device_psdf; # 262 "./src/gdevpsdf.h" int gdev_psdf_get_params(gx_device *dev, gs_param_list *plist); int gdev_psdf_put_params(gx_device *dev, gs_param_list *plist); int psdf_setlinewidth(gx_device_vector * vdev, floatp width); int psdf_setlinecap(gx_device_vector * vdev, gs_line_cap cap); int psdf_setlinejoin(gx_device_vector * vdev, gs_line_join join); int psdf_setmiterlimit(gx_device_vector * vdev, floatp limit); int psdf_setdash(gx_device_vector * vdev, const float *pattern, uint count, floatp offset); int psdf_setflat(gx_device_vector * vdev, floatp flatness); int psdf_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop, gs_logical_operation_t diff); int psdf_dorect(gx_device_vector * vdev, fixed x0, fixed y0, fixed x1, fixed y1, gx_path_type_t type); int psdf_beginpath(gx_device_vector * vdev, gx_path_type_t type); int psdf_moveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, floatp y, gx_path_type_t type); int psdf_lineto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x, floatp y, gx_path_type_t type); int psdf_curveto(gx_device_vector * vdev, floatp x0, floatp y0, floatp x1, floatp y1, floatp x2, floatp y2, floatp x3, floatp y3, gx_path_type_t type); int psdf_closepath(gx_device_vector * vdev, floatp x0, floatp y0, floatp x_start, floatp y_start, gx_path_type_t type); typedef struct psdf_binary_writer_s { gs_memory_t *memory; stream *target; stream *strm; gx_device_psdf *dev; } psdf_binary_writer; extern const gs_memory_struct_type_t st_psdf_binary_writer; int psdf_begin_binary(gx_device_psdf * pdev, psdf_binary_writer * pbw); int psdf_encode_binary(psdf_binary_writer * pbw, const stream_template * template, stream_state * ss); int psdf_CFE_binary(psdf_binary_writer * pbw, int w, int h, bool invert); int psdf_DCT_filter(gs_param_list *plist , stream_state *st, int Columns, int Rows, int Colors, psdf_binary_writer *pbw ); bool psdf_is_converting_image_to_RGB(const gx_device_psdf * pdev, const gs_imager_state * pis, const gs_pixel_image_t * pim); int psdf_setup_image_filters(gx_device_psdf *pdev, psdf_binary_writer *pbw, gs_pixel_image_t *pim, const gs_matrix *pctm, const gs_imager_state * pis, bool lossless, bool in_line); int psdf_setup_lossless_filters(gx_device_psdf *pdev, psdf_binary_writer *pbw, gs_pixel_image_t *pim, bool in_line); int psdf_end_binary(psdf_binary_writer * pbw); int psdf_setup_compression_chooser(psdf_binary_writer *pbw, gx_device_psdf *pdev, int width, int height, int depth, int bits_per_sample); int psdf_setup_image_to_mask_filter(psdf_binary_writer *pbw, gx_device_psdf *pdev, int width, int height, int depth, int bits_per_sample, uint *MaskColor); int psdf_setup_image_colors_filter(psdf_binary_writer *pbw, gx_device_psdf *pdev, gs_pixel_image_t * pim, const gs_imager_state *pis); # 389 "./src/gdevpsdf.h" typedef struct psdf_set_color_commands_s { const char *setgray; const char *setrgbcolor; const char *setcmykcolor; const char *setcolorspace; const char *setcolor; const char *setcolorn; } psdf_set_color_commands_t; extern const psdf_set_color_commands_t psdf_set_fill_color_commands, psdf_set_stroke_color_commands; gx_color_index psdf_adjust_color_index(gx_device_vector *vdev, gx_color_index color); int psdf_set_color(gx_device_vector *vdev, const gx_drawing_color *pdc, const psdf_set_color_commands_t *ppscc); double psdf_round(double v, int precision, int radix); int psdf_get_bits(gx_device *dev, int y, byte *data, byte **actual_data); int psdf_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread); int psdf_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory); # 28 "./src/gdevpdfx.h" 2 # 1 "./src/gxdevmem.h" 1 # 21 "./src/gxdevmem.h" # 1 "./src/gxrplane.h" 1 # 30 "./src/gxrplane.h" typedef struct gx_render_plane_s { int depth; int shift; int index; } gx_render_plane_t; # 43 "./src/gxrplane.h" int gx_render_plane_init(gx_render_plane_t *render_plane, const gx_device *dev, int index); # 22 "./src/gxdevmem.h" 2 # 76 "./src/gxdevmem.h" typedef struct gx_device_memory_s gx_device_memory; struct gx_device_memory_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; gx_device *target; uint raster; byte *base; gs_memory_t *bitmap_memory; bool foreign_bits; gs_memory_t *line_pointer_memory; bool foreign_line_pointers; int num_planes; gx_render_plane_t planes[(8 * 8)]; gs_matrix initial_matrix; byte **line_ptrs; gs_const_string palette; struct _c24 { gx_color_index rgb; bits32 rgbr, gbrg, brgb; } color24; struct _c40 { gx_color_index abcde; bits32 abcd, bcde, cdea, deab, eabc; } color40; struct _c48 { gx_color_index abcdef; bits32 abcd, cdef, efab; } color48; struct _c56 { gx_color_index abcdefg; bits32 abcd, bcde, cdef, defg, efga, fgab, gabc; } color56; struct _c64 { gx_color_index abcdefgh; bits32 abcd, efgh; } color64; gs_log2_scale_point log2_scale; int log2_alpha_bits; int mapped_x; int mapped_y; int mapped_height; int mapped_start; gx_color_index save_color; int plane_depth; }; extern const gs_memory_struct_type_t st_device_memory; # 180 "./src/gxdevmem.h" ulong gdev_mem_bits_size(const gx_device_memory *mdev, int width, int height); ulong gdev_mem_line_ptrs_size(const gx_device_memory *mdev, int width, int height); ulong gdev_mem_data_size(const gx_device_memory *mdev, int width, int height); # 196 "./src/gxdevmem.h" int gdev_mem_max_height(const gx_device_memory * dev, int width, ulong size, bool page_uses_transparency); # 207 "./src/gxdevmem.h" const gx_device_memory *gdev_mem_device_for_bits(int); const gx_device_memory *gdev_mem_word_device_for_bits(int); void gs_make_mem_mono_device(gx_device_memory * mdev, gs_memory_t * mem, gx_device * target); void gs_make_mem_device(gx_device_memory * mdev, const gx_device_memory * mdproto, gs_memory_t * mem, int page_device, gx_device * target); void gs_make_mem_abuf_device(gx_device_memory * adev, gs_memory_t * mem, gx_device * target, const gs_log2_scale_point * pscale, int alpha_bits, int mapped_x); void gs_make_mem_alpha_device(gx_device_memory * adev, gs_memory_t * mem, gx_device * target, int alpha_bits); int gdev_mem_open_scan_lines(gx_device_memory *mdev, int setup_height); # 250 "./src/gxdevmem.h" int gdev_mem_set_line_ptrs(gx_device_memory *mdev, byte *base, int raster, byte **line_ptrs, int setup_height); void gdev_mem_mono_set_inverted(gx_device_memory * mdev, bool black_is_1); bool gs_device_is_memory(const gx_device *); bool gs_device_is_abuf(const gx_device *); # 29 "./src/gdevpdfx.h" 2 typedef struct stream_arcfour_state_s stream_arcfour_state; # 60 "./src/gdevpdfx.h" typedef enum { PDF_IN_NONE, PDF_IN_STREAM, PDF_IN_TEXT, PDF_IN_STRING } pdf_context_t; typedef struct cos_object_s cos_object_t; typedef struct cos_stream_s cos_stream_t; typedef struct cos_dict_s cos_dict_t; typedef struct cos_array_s cos_array_t; typedef struct cos_value_s cos_value_t; typedef struct cos_object_procs_s cos_object_procs_t; typedef const cos_object_procs_t *cos_type_t; typedef struct pdf_text_state_s pdf_text_state_t; typedef struct pdf_char_glyph_pairs_s pdf_char_glyph_pairs_t; typedef enum { resourceColorSpace, resourceExtGState, resourcePattern, resourceShading, resourceXObject, resourceOther, resourceFont, resourceCharProc, resourceCIDFont, resourceCMap, resourceFontDescriptor, resourceGroup, resourceSoftMaskDict, resourceFunction, resourcePage, NUM_RESOURCE_TYPES } pdf_resource_type_t; # 155 "./src/gdevpdfx.h" typedef struct pdf_resource_s pdf_resource_t; struct pdf_resource_s { pdf_resource_t *next; pdf_resource_t *prev; gs_id rid; bool named; bool global; char rname[1 + (sizeof(long) * 8 / 3 + 1) + 1 ]; ulong where_used; cos_object_t *object; }; extern const gs_memory_struct_type_t st_pdf_resource; # 170 "./src/gdevpdfx.h" typedef struct pdf_x_object_s pdf_x_object_t; struct pdf_x_object_s { pdf_x_object_t *next; pdf_resource_t *prev; gs_id rid; bool named; bool global; char rname[1 + (sizeof(long) * 8 / 3 + 1) + 1 ]; ulong where_used; cos_object_t *object; int width, height; int data_height; }; typedef enum { NoMarks = 0, ImageB = 1, ImageC = 2, ImageI = 4, Text = 8 } pdf_procset_t; typedef struct pdf_char_proc_s pdf_char_proc_t; typedef struct pdf_char_proc_ownership_s pdf_char_proc_ownership_t; typedef struct pdf_font_s pdf_font_t; typedef struct pdf_text_data_s pdf_text_data_t; typedef struct pdf_outline_node_s { long id, parent_id, prev_id, first_id, last_id; int count; cos_dict_t *action; } pdf_outline_node_t; typedef struct pdf_outline_level_s { pdf_outline_node_t first; pdf_outline_node_t last; int left; } pdf_outline_level_t; typedef struct pdf_bead_s { long id, article_id, prev_id, next_id, page_id; gs_rect rect; } pdf_bead_t; typedef struct pdf_article_s pdf_article_t; struct pdf_article_s { pdf_article_t *next; cos_dict_t *contents; pdf_bead_t first; pdf_bead_t last; }; # 238 "./src/gdevpdfx.h" typedef struct pdf_resource_list_s { pdf_resource_t *chains[16]; } pdf_resource_list_t; # 249 "./src/gdevpdfx.h" typedef struct pdf_stream_position_s { long length_id; long start_pos; } pdf_stream_position_t; typedef struct pdf_text_rotation_s { long counts[5]; int Rotate; } pdf_text_rotation_t; typedef struct pdf_page_dsc_info_s { int orientation; int viewing_orientation; gs_rect bounding_box; } pdf_page_dsc_info_t; typedef struct pdf_page_s { cos_dict_t *Page; gs_point MediaBox; pdf_procset_t procsets; long contents_id; long resource_ids[resourceFont + 1]; long group_id; cos_array_t *Annots; pdf_text_rotation_t text_rotation; pdf_page_dsc_info_t dsc_info; bool NumCopies_set; int NumCopies; } pdf_page_t; # 300 "./src/gdevpdfx.h" typedef struct pdf_temp_file_s { char file_name[260]; FILE *file; stream *strm; byte *strm_buf; stream *save_strm; } pdf_temp_file_t; typedef struct gx_device_pdf_s gx_device_pdf; typedef struct pdf_font_cache_elem_s pdf_font_cache_elem_t; struct pdf_font_cache_elem_s { pdf_font_cache_elem_t *next; gs_id font_id; int num_chars; int num_widths; struct pdf_font_resource_s *pdfont; byte *glyph_usage; double *real_widths; gx_device_pdf *pdev; }; # 339 "./src/gdevpdfx.h" typedef struct pdf_viewer_state_s { int transfer_not_identity; gs_id transfer_ids[4]; float opacity_alpha; float shape_alpha; gs_blend_mode_t blend_mode; gs_id halftone_id; gs_id black_generation_id; gs_id undercolor_removal_id; int overprint_mode; float smoothness; float flatness; bool text_knockout; bool fill_overprint; bool stroke_overprint; bool stroke_adjust; bool fill_used_process_color; bool stroke_used_process_color; gx_hl_saved_color saved_fill_color; gx_hl_saved_color saved_stroke_color; gx_line_params line_params; float dash_pattern[11]; gs_id soft_mask_id; } pdf_viewer_state; typedef struct pdf_substream_save_s { pdf_context_t context; pdf_text_state_t *text_state; gx_path *clip_path; gs_id clip_path_id; int vgstack_bottom; stream *strm; cos_dict_t *substream_Resources; pdf_procset_t procsets; bool skip_colors; pdf_resource_t *font3; pdf_resource_t *accumulating_substream_resource; bool charproc_just_accumulated; bool accumulating_a_global_object; pdf_resource_t *pres_soft_mask_dict; gs_const_string objname; } pdf_substream_save; # 396 "./src/gdevpdfx.h" typedef enum { pdf_compress_none, pdf_compress_LZW, pdf_compress_Flate } pdf_compression_type; struct gx_device_pdf_s { int params_size; const gx_device_procs *static_procs; const char *dname; gs_memory_t *memory; gs_memory_type_ptr_t stype; bool stype_is_dynamic; void (*finalize)(gx_device *); rc_header rc; bool retained; bool is_open; int max_fill_band; gx_device_color_info color_info; gx_device_cached_colors_t cached_colors; int width; int height; int TrayOrientation; float MediaSize[2]; float ImagingBBox[4]; bool ImagingBBox_set; float HWResolution[2]; float MarginsHWResolution[2]; float Margins[2]; float HWMargins[4]; long PageCount; long ShowpageCount; int NumCopies; bool NumCopies_set; bool IgnoreNumCopies; bool UseCIEColor; bool LockSafetyParams; gx_page_device_procs page_procs; gx_device_procs procs; gs_memory_t *v_memory; const gx_device_vector_procs *vec_procs; char fname[(260 - 1) + 1]; FILE *file; stream *strm; byte *strmbuf; uint strmbuf_size; int open_options; gs_imager_state state; float dash_pattern[11]; bool fill_used_process_color; bool stroke_used_process_color; gx_hl_saved_color saved_fill_color; gx_hl_saved_color saved_stroke_color; gs_id no_clip_path_id; gs_id clip_path_id; gx_path_type_t fill_options, stroke_options; gs_point scale; bool in_page; gx_device_bbox *bbox_device; gx_color_index black, white; psdf_version version; bool binary_ok; bool HaveCFF; bool HaveTrueTypes; bool HaveCIDSystem; double ParamCompatibilityLevel; psdf_distiller_params params; double CompatibilityLevel; int EndPage; int StartPage; bool Optimize; bool ParseDSCCommentsForDocInfo; bool ParseDSCComments; bool EmitDSCWarnings; bool CreateJobTicket; bool PreserveEPSInfo; bool AutoPositionEPSFiles; bool PreserveCopyPage; bool UsePrologue; int OffOptimizations; gs_param_float_array PDFXTrimBoxToMediaBoxOffset; gs_param_float_array PDFXBleedBoxToTrimBoxOffset; bool PDFXSetBleedBoxToMediaBox; bool ReAssignCharacters; bool ReEncodeCharacters; long FirstObjectNumber; bool CompressFonts; bool PrintStatistics; gs_param_string DocumentUUID; gs_param_string InstanceUUID; int DocumentTimeSeq; bool ForOPDFRead; gs_param_string OPDFReadProcsetPath; bool CompressEntireFile; bool ResourcesBeforeUsage; bool HavePDFWidths; bool HaveStrokeColor; bool HaveTransparency; bool PatternImagemask; bool PDFX; bool PDFA; long MaxClipPathSize; long MaxViewerMemorySize; long MaxShadingBitmapSize; long MaxInlineImageSize; gs_param_string OwnerPassword; gs_param_string UserPassword; uint KeyLength; uint Permissions; uint EncryptionR; gs_param_string NoEncrypt; bool EncryptMetadata; bool ComputeDocumentDigest; byte EncryptionO[32]; byte EncryptionU[32]; byte EncryptionKey[16]; uint EncryptionV; bool is_EPS; pdf_page_dsc_info_t doc_dsc_info; pdf_page_dsc_info_t page_dsc_info; bool fill_overprint, stroke_overprint; int overprint_mode; gs_id halftone_id; gs_id transfer_ids[4]; int transfer_not_identity; gs_id black_generation_id, undercolor_removal_id; pdf_compression_type compression; pdf_compression_type compression_at_page_start; # 490 "./src/gdevpdfx.h" pdf_temp_file_t xref; pdf_temp_file_t asides; pdf_temp_file_t streams; pdf_temp_file_t pictures; long next_id; cos_dict_t *Catalog; cos_dict_t *Info; cos_dict_t *Pages; long outlines_id; int next_page; int max_referred_page; long contents_id; pdf_context_t context; long contents_length_id; long contents_pos; pdf_procset_t procsets; pdf_text_data_t *text; pdf_text_rotation_t text_rotation; pdf_page_t *pages; int num_pages; ulong used_mask; pdf_resource_list_t resources[NUM_RESOURCE_TYPES]; pdf_resource_t *cs_Patterns[5]; pdf_resource_t *Identity_ToUnicode_CMaps[2]; pdf_resource_t *last_resource; pdf_outline_level_t outline_levels[32]; int outline_depth; int closed_outline_depth; int outlines_open; pdf_article_t *articles; cos_dict_t *Dests; byte fileID[16]; long uuid_time[2]; cos_dict_t *global_named_objects; cos_dict_t *local_named_objects; cos_array_t *NI_stack; cos_array_t *Namespace_stack; pdf_font_cache_elem_t *font_cache; gs_point char_width; gx_path *clip_path; cos_array_t *PageLabels; int PageLabels_current_page; cos_dict_t *PageLabels_current_label; # 594 "./src/gdevpdfx.h" gs_text_enum_t *pte; pdf_viewer_state vgstack[11]; int vgstack_depth; int vgstack_bottom; pdf_viewer_state vg_initial; bool vg_initial_set; int sbstack_size; int sbstack_depth; pdf_substream_save *sbstack; cos_dict_t *substream_Resources; gs_color_space_index pcm_color_info_index; bool skip_colors; bool AR4_save_bug; pdf_resource_t *font3; pdf_resource_t *accumulating_substream_resource; gs_matrix_fixed charproc_ctm; bool charproc_just_accumulated; bool accumulating_a_global_object; const pdf_char_glyph_pairs_t *cgp; int substituted_pattern_count; int substituted_pattern_drop_page; gs_id image_mask_id; bool image_mask_is_SMask; bool image_mask_skip; gs_matrix converting_image_matrix; double image_mask_scale; pdf_resource_t *pres_soft_mask_dict; gs_const_string objname; int OPDFRead_procset_length; void *find_resource_param; }; # 695 "./src/gdevpdfx.h" int gdev_pdf_copy_mono(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1); int gdev_pdf_copy_color(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height); int gdev_pdf_fill_mask(gx_device *dev, const byte *data, int data_x, int raster, gx_bitmap_id id, int x, int y, int width, int height, const gx_drawing_color *pdcolor, int depth, gs_logical_operation_t lop, const gx_clip_path *pcpath); int gdev_pdf_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles, int x, int y, int width, int height, gx_color_index color0, gx_color_index color1, int phase_x, int phase_y); extern const gx_device_vector_procs pdf_vector_procs; int gdev_pdf_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color); int gdev_pdf_fill_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_fill_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gdev_pdf_stroke_path(gx_device *dev, const gs_imager_state *pis, gx_path *ppath, const gx_stroke_params *params, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gdev_pdf_begin_typed_image(gx_device *dev, const gs_imager_state *pis, const gs_matrix *pmat, const gs_image_common_t *pim, const gs_int_rect *prect, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gx_image_enum_common_t **pinfo); int gdev_pdf_get_params(gx_device *dev, gs_param_list *plist); int gdev_pdf_put_params(gx_device *dev, gs_param_list *plist); int gdev_pdf_text_begin(gx_device *dev, gs_imager_state *pis, const gs_text_params_t *text, gs_font *font, gx_path *path, const gx_device_color *pdcolor, const gx_clip_path *pcpath, gs_memory_t *memory, gs_text_enum_t **ppte); int gdev_pdf_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function); int gdev_pdf_fill_rectangle_hl_color(gx_device *dev, const gs_fixed_rect *rect, const gs_imager_state *pis, const gx_drawing_color *pdcolor, const gx_clip_path *pcpath); int gdev_pdf_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length); int gdev_pdf_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory); int gdev_pdf_begin_transparency_group(gx_device *dev, const gs_transparency_group_params_t *ptgp, const gs_rect *pbbox, gs_imager_state *pis, gs_transparency_state_t **ppts, gs_memory_t *mem); int gdev_pdf_end_transparency_group(gx_device *dev, gs_imager_state *pis, gs_transparency_state_t **ppts); int gdev_pdf_begin_transparency_mask(gx_device *dev, const gx_transparency_mask_params_t *ptmp, const gs_rect *pbbox, gs_imager_state *pis, gs_transparency_state_t **ppts, gs_memory_t *mem); int gdev_pdf_end_transparency_mask(gx_device *dev, gs_transparency_mask_t **pptm); int gdev_pdf_discard_transparency_layer(gx_device *dev, gs_transparency_state_t **ppts); void pdf_initialize_ids(gx_device_pdf * pdev); void pdf_set_process_color_model(gx_device_pdf * pdev, int index); void pdf_reset_text(gx_device_pdf *pdev); int pdf_open_document(gx_device_pdf * pdev); long pdf_obj_ref(gx_device_pdf * pdev); long pdf_stell(gx_device_pdf * pdev); long pdf_open_obj(gx_device_pdf * pdev, long id); long pdf_begin_obj(gx_device_pdf * pdev); int pdf_end_obj(gx_device_pdf * pdev); int pdf_open_contents(gx_device_pdf * pdev, pdf_context_t context); int pdf_close_contents(gx_device_pdf * pdev, bool last); extern const char *const pdf_resource_type_names[]; extern const gs_memory_struct_type_t *const pdf_resource_type_structs[]; # 781 "./src/gdevpdfx.h" long pdf_open_separate(gx_device_pdf * pdev, long id); long pdf_begin_separate(gx_device_pdf * pdev); void pdf_reserve_object_id(gx_device_pdf * pdev, pdf_resource_t *ppres, long id); int pdf_alloc_aside(gx_device_pdf * pdev, pdf_resource_t ** plist, const gs_memory_struct_type_t * pst, pdf_resource_t **ppres, long id); int pdf_begin_aside(gx_device_pdf * pdev, pdf_resource_t **plist, const gs_memory_struct_type_t * pst, pdf_resource_t **ppres); int pdf_begin_resource(gx_device_pdf * pdev, pdf_resource_type_t rtype, gs_id rid, pdf_resource_t **ppres); int pdf_begin_resource_body(gx_device_pdf * pdev, pdf_resource_type_t rtype, gs_id rid, pdf_resource_t **ppres); int pdf_alloc_resource(gx_device_pdf * pdev, pdf_resource_type_t rtype, gs_id rid, pdf_resource_t **ppres, long id); int pdf_find_same_resource(gx_device_pdf * pdev, pdf_resource_type_t rtype, pdf_resource_t **ppres, int (*eq)(gx_device_pdf * pdev, pdf_resource_t *pres0, pdf_resource_t *pres1)); pdf_resource_t *pdf_find_resource_by_resource_id(gx_device_pdf * pdev, pdf_resource_type_t rtype, gs_id id); pdf_resource_t *pdf_find_resource_by_gs_id(gx_device_pdf * pdev, pdf_resource_type_t rtype, gs_id rid); void pdf_drop_resources(gx_device_pdf * pdev, pdf_resource_type_t rtype, int (*cond)(gx_device_pdf * pdev, pdf_resource_t *pres)); void pdf_print_resource_statistics(gx_device_pdf * pdev); int pdf_cancel_resource(gx_device_pdf * pdev, pdf_resource_t *pres, pdf_resource_type_t rtype); void pdf_forget_resource(gx_device_pdf * pdev, pdf_resource_t *pres1, pdf_resource_type_t rtype); int pdf_substitute_resource(gx_device_pdf *pdev, pdf_resource_t **ppres, pdf_resource_type_t rtype, int (*eq)(gx_device_pdf *pdev, pdf_resource_t *pres0, pdf_resource_t *pres1), bool write); long pdf_resource_id(const pdf_resource_t *pres); int pdf_end_separate(gx_device_pdf * pdev); int pdf_end_aside(gx_device_pdf * pdev); int pdf_end_resource(gx_device_pdf * pdev); int pdf_write_resource_objects(gx_device_pdf *pdev, pdf_resource_type_t rtype); void pdf_reverse_resource_chain(gx_device_pdf *pdev, pdf_resource_type_t rtype); int pdf_free_resource_objects(gx_device_pdf *pdev, pdf_resource_type_t rtype); int pdf_write_and_free_all_resource_objects(gx_device_pdf *pdev); int pdf_store_page_resources(gx_device_pdf *pdev, pdf_page_t *page); void pdf_copy_data(stream *s, FILE *file, long count, stream_arcfour_state *ss); void pdf_copy_data_safe(stream *s, FILE *file, long position, long count); int pdf_begin_encrypt(gx_device_pdf * pdev, stream **s, gs_id object_id); void pdf_end_encrypt(gx_device_pdf * pdev); int pdf_encrypt_init(const gx_device_pdf * pdev, gs_id object_id, stream_arcfour_state *psarc4); long pdf_page_id(gx_device_pdf * pdev, int page_num); pdf_page_t *pdf_current_page(gx_device_pdf *pdev); cos_dict_t *pdf_current_page_dict(gx_device_pdf *pdev); int pdf_open_page(gx_device_pdf * pdev, pdf_context_t context); int pdf_unclip(gx_device_pdf * pdev); int pdf_write_saved_string(gx_device_pdf * pdev, gs_string * pstr); int pdf_remember_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath); bool pdf_must_put_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath); int pdf_put_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath); typedef struct pdf_lcvd_s { gx_device_memory mdev; gx_device_memory *mask; gx_device_pdf *pdev; int (*std_fill_rectangle)(gx_device *dev, int x, int y, int width, int height, gx_color_index color); int (*std_close_device)(gx_device *dev); bool mask_is_empty; bool path_is_empty; bool mask_is_clean; bool write_matrix; bool has_background; gs_matrix m; gs_point path_offset; } pdf_lcvd_t; # 951 "./src/gdevpdfx.h" int pdf_setup_masked_image_converter(gx_device_pdf *pdev, gs_memory_t *mem, const gs_matrix *m, pdf_lcvd_t **pcvd, bool need_mask, int x, int y, int w, int h, bool write_on_close); int pdf_dump_converted_image(gx_device_pdf *pdev, pdf_lcvd_t *cvd); void pdf_remove_masked_image_converter(gx_device_pdf *pdev, pdf_lcvd_t *cvd, bool need_mask); void pdf_store_default_Producer(char buf[200]); typedef struct pdf_filter_names_s { const char *ASCII85Decode; const char *ASCIIHexDecode; const char *CCITTFaxDecode; const char *DCTDecode; const char *DecodeParms; const char *Filter; const char *FlateDecode; const char *LZWDecode; const char *RunLengthDecode; const char *JBIG2Decode; const char *JPXDecode; } pdf_filter_names_t; # 985 "./src/gdevpdfx.h" void pdf_put_matrix(gx_device_pdf *pdev, const char *before, const gs_matrix *pmat, const char *after); typedef int (*pdf_put_name_chars_proc_t)(stream *, const byte *, uint); pdf_put_name_chars_proc_t pdf_put_name_chars_proc(const gx_device_pdf *pdev); int pdf_put_name_chars(const gx_device_pdf *pdev, const byte *nstr, uint size); int pdf_put_name(const gx_device_pdf *pdev, const byte *nstr, uint size); int pdf_put_string(const gx_device_pdf *pdev, const byte *str, uint size); int pdf_write_value(const gx_device_pdf *pdev, const byte *vstr, uint size, gs_id object_id); int pdf_put_filters(cos_dict_t *pcd, gx_device_pdf *pdev, stream *s, const pdf_filter_names_t *pfn); typedef struct pdf_data_writer_s { psdf_binary_writer binary; long start; long length_pos; pdf_resource_t *pres; gx_device_pdf *pdev; long length_id; bool encrypted; } pdf_data_writer_t; # 1025 "./src/gdevpdfx.h" int pdf_begin_data_stream(gx_device_pdf *pdev, pdf_data_writer_t *pdw, int options, gs_id object_id); int pdf_append_data_stream_filters(gx_device_pdf *pdev, pdf_data_writer_t *pdw, int orig_options, gs_id object_id); int pdf_begin_data(gx_device_pdf *pdev, pdf_data_writer_t *pdw); int pdf_end_data(pdf_data_writer_t *pdw); # 1051 "./src/gdevpdfx.h" int pdf_function(gx_device_pdf *pdev, const gs_function_t *pfn, cos_value_t *pvalue); int pdf_function_scaled(gx_device_pdf *pdev, const gs_function_t *pfn, const gs_range_t *pranges, cos_value_t *pvalue); int pdf_write_function(gx_device_pdf *pdev, const gs_function_t *pfn, long *pid); int pdf_write_font_bbox(gx_device_pdf *pdev, const gs_int_rect *pbox); # 1076 "./src/gdevpdfx.h" bool pdf_key_eq(const gs_param_string * pcs, const char *str); int pdfmark_scan_int(const gs_param_string * pstr, int *pvalue); int pdfmark_process(gx_device_pdf * pdev, const gs_param_string_array * pma); int pdfmark_close_outline(gx_device_pdf * pdev); int pdfmark_end_pagelabels(gx_device_pdf * pdev); int pdfmark_write_article(gx_device_pdf * pdev, const pdf_article_t * part); bool pdf_objname_is_valid(const byte *data, uint size); int pdf_find_named(gx_device_pdf * pdev, const gs_param_string * pname, cos_object_t **ppco); int pdf_create_named(gx_device_pdf *pdev, const gs_param_string *pname, cos_type_t cotype, cos_object_t **ppco, long id); int pdf_create_named_dict(gx_device_pdf *pdev, const gs_param_string *pname, cos_dict_t **ppcd, long id); int pdf_refer_named(gx_device_pdf *pdev, const gs_param_string *pname, cos_object_t **ppco); # 1130 "./src/gdevpdfx.h" int pdf_make_named(gx_device_pdf * pdev, const gs_param_string * pname, cos_type_t cotype, cos_object_t **ppco, bool assign_id); int pdf_make_named_dict(gx_device_pdf * pdev, const gs_param_string * pname, cos_dict_t **ppcd, bool assign_id); int pdf_get_named(gx_device_pdf * pdev, const gs_param_string * pname, cos_type_t cotype, cos_object_t **ppco); int pdf_push_namespace(gx_device_pdf *pdev); int pdf_pop_namespace(gx_device_pdf *pdev); int pdf_scan_token(const byte **pscan, const byte * end, const byte **ptoken); int pdf_scan_token_composite(const byte **pscan, const byte * end, const byte **ptoken); int pdf_replace_names(gx_device_pdf *pdev, const gs_param_string *from, gs_param_string *to); # 1184 "./src/gdevpdfx.h" int pdf_close_text_document(gx_device_pdf *pdev); pdf_text_data_t *pdf_text_data_alloc(gs_memory_t *mem); void pdf_set_text_state_default(pdf_text_state_t *pts); void pdf_text_state_copy(pdf_text_state_t *pts_to, pdf_text_state_t *pts_from); void pdf_reset_text_page(pdf_text_data_t *ptd); void pdf_reset_text_state(pdf_text_data_t *ptd); void pdf_close_text_page(gx_device_pdf *pdev); int pdf_get_stoted_text_size(pdf_text_state_t *state); int pdf_char_image_y_offset(const gx_device_pdf *pdev, int x, int y, int h); int pdf_begin_char_proc(gx_device_pdf * pdev, int w, int h, int x_width, int y_offset, gs_id id, pdf_char_proc_t **ppcp, pdf_stream_position_t * ppos); int pdf_end_char_proc(gx_device_pdf * pdev, pdf_stream_position_t * ppos); int pdf_do_char_image(gx_device_pdf * pdev, const pdf_char_proc_t * pcp, const gs_matrix * pimat); int pdf_start_charproc_accum(gx_device_pdf *pdev); int pdf_set_charproc_attrs(gx_device_pdf *pdev, gs_font *font, const double *pw, int narg, gs_text_cache_control_t control, gs_char ch); int pdf_end_charproc_accum(gx_device_pdf *pdev, gs_font *font, const pdf_char_glyph_pairs_t *cgp, gs_glyph glyph, gs_char output_char_code, const gs_const_string *gnstr); int pdf_open_aside(gx_device_pdf *pdev, pdf_resource_type_t rtype, gs_id id, pdf_resource_t **ppres, bool reserve_object_id, int options); int pdf_close_aside(gx_device_pdf *pdev); int pdf_enter_substream(gx_device_pdf *pdev, pdf_resource_type_t rtype, gs_id id, pdf_resource_t **ppres, bool reserve_object_id, bool compress); int pdf_exit_substream(gx_device_pdf *pdev); int pdf_add_procsets(cos_dict_t *pcd, pdf_procset_t procsets); int pdf_add_resource(gx_device_pdf *pdev, cos_dict_t *pcd, const char *key, pdf_resource_t *pres); int pdf_from_stream_to_text(gx_device_pdf *pdev); int pdf_from_string_to_text(gx_device_pdf *pdev); void pdf_close_text_contents(gx_device_pdf *pdev); # 24 "./src/gdevpdfe.c" 2 # 1 "./src/gdevpdfg.h" 1 # 24 "./src/gdevpdfg.h" typedef struct pdf_base_font_s pdf_base_font_t; # 35 "./src/gdevpdfg.h" typedef struct pdf_color_space_names_s { const char *DeviceCMYK; const char *DeviceGray; const char *DeviceRGB; const char *Indexed; } pdf_color_space_names_t; extern const pdf_color_space_names_t pdf_color_space_names, pdf_color_space_names_short; # 59 "./src/gdevpdfg.h" typedef struct pdf_color_space_s pdf_color_space_t; struct pdf_color_space_s { pdf_color_space_t *next; pdf_resource_t *prev; gs_id rid; bool named; bool global; char rname[1 + (sizeof(long) * 8 / 3 + 1) + 1 ]; ulong where_used; cos_object_t *object; const gs_range_t *ranges; uint serialized_size; byte *serialized; }; # 76 "./src/gdevpdfg.h" int pdf_cspace_init_Device(const gs_memory_t *mem, gs_color_space *pcs, int num_components); # 90 "./src/gdevpdfg.h" int pdf_color_space(gx_device_pdf *pdev, cos_value_t *pvalue, const gs_range_t **ppranges, const gs_color_space *pcs, const pdf_color_space_names_t *pcsn, bool by_name); int pdf_color_space_named(gx_device_pdf *pdev, cos_value_t *pvalue, const gs_range_t **ppranges, const gs_color_space *pcs, const pdf_color_space_names_t *pcsn, bool by_name, const byte *res_name, int name_length); int pdf_cs_Pattern_colored(gx_device_pdf *pdev, cos_value_t *pvalue); int pdf_cs_Pattern_uncolored(gx_device_pdf *pdev, cos_value_t *pvalue); int pdf_cs_Pattern_uncolored_hl(gx_device_pdf *pdev, const gs_color_space *pcs, cos_value_t *pvalue); void pdf_color_space_procsets(gx_device_pdf *pdev, const gs_color_space *pcs); void pdf_viewer_state_from_imager_state(gx_device_pdf * pdev, const gs_imager_state *pis, const gx_device_color *pdevc); void pdf_prepare_initial_viewer_state(gx_device_pdf * pdev, const gs_imager_state *pis); void pdf_reset_graphics(gx_device_pdf *pdev); void pdf_set_initial_color(gx_device_pdf * pdev, gx_hl_saved_color *saved_fill_color, gx_hl_saved_color *saved_stroke_color, bool *fill_used_process_color, bool *stroke_used_process_color); int pdf_set_pure_color(gx_device_pdf * pdev, gx_color_index color, gx_hl_saved_color * psc, bool *used_process_color, const psdf_set_color_commands_t *ppscc); int pdf_set_drawing_color(gx_device_pdf * pdev, const gs_imager_state * pis, const gx_drawing_color *pdc, gx_hl_saved_color * psc, bool *used_process_color, const psdf_set_color_commands_t *ppscc); int pdf_try_prepare_fill(gx_device_pdf *pdev, const gs_imager_state *pis); int pdf_prepare_drawing(gx_device_pdf *pdev, const gs_imager_state *pis, pdf_resource_t **ppres); int pdf_prepare_fill(gx_device_pdf *pdev, const gs_imager_state *pis); int pdf_prepare_stroke(gx_device_pdf *pdev, const gs_imager_state *pis); int pdf_prepare_image(gx_device_pdf *pdev, const gs_imager_state *pis); int pdf_prepare_imagemask(gx_device_pdf *pdev, const gs_imager_state *pis, const gx_drawing_color *pdcolor); int pdf_save_viewer_state(gx_device_pdf *pdev, stream *s); int pdf_restore_viewer_state(gx_device_pdf *pdev, stream *s); int pdf_end_gstate(gx_device_pdf *pdev, pdf_resource_t *pres); int pdf_string_to_cos_name(gx_device_pdf *pdev, const byte *str, uint len, cos_value_t *pvalue); typedef struct pdf_pattern_s pdf_pattern_t; struct pdf_pattern_s { pdf_pattern_t *next; pdf_resource_t *prev; gs_id rid; bool named; bool global; char rname[1 + (sizeof(long) * 8 / 3 + 1) + 1 ]; ulong where_used; cos_object_t *object; pdf_pattern_t *substitute; }; pdf_resource_t *pdf_substitute_pattern(pdf_resource_t *pres); typedef struct pdf_image_names_s { pdf_color_space_names_t color_spaces; pdf_filter_names_t filter_names; const char *BitsPerComponent; const char *ColorSpace; const char *Decode; const char *Height; const char *ImageMask; const char *Interpolate; const char *Width; } pdf_image_names_t; extern const pdf_image_names_t pdf_image_names_full, pdf_image_names_short; int pdf_put_image_values(cos_dict_t *pcd, gx_device_pdf *pdev, const gs_pixel_image_t *pic, const pdf_image_names_t *pin, const cos_value_t *pcsvalue); int pdf_put_image_filters(cos_dict_t *pcd, gx_device_pdf *pdev, const psdf_binary_writer * pbw, const pdf_image_names_t *pin); # 220 "./src/gdevpdfg.h" void pdf_make_bitmap_matrix(gs_matrix * pmat, int x, int y, int w, int h, int h_actual); void pdf_put_image_matrix(gx_device_pdf * pdev, const gs_matrix * pmat, floatp y_scale); int pdf_do_image_by_id(gx_device_pdf * pdev, double scale, const gs_matrix * pimat, bool in_contents, gs_id id); int pdf_do_image(gx_device_pdf * pdev, const pdf_resource_t * pres, const gs_matrix * pimat, bool in_contents); typedef struct pdf_image_writer_s { psdf_binary_writer binary[4]; int alt_writer_count; const pdf_image_names_t *pin; pdf_resource_t *pres; int height; cos_stream_t *data; const char *end_string; cos_dict_t *named; pdf_resource_t *pres_mask; } pdf_image_writer; extern const gs_memory_struct_type_t st_pdf_image_writer; void pdf_image_writer_init(pdf_image_writer * piw); int pdf_begin_write_image(gx_device_pdf * pdev, pdf_image_writer * piw, gx_bitmap_id id, int w, int h, cos_dict_t *pnamed, bool in_line); int pdf_begin_image_data(gx_device_pdf * pdev, pdf_image_writer * piw, const gs_pixel_image_t * pim, const cos_value_t *pcsvalue, int alt_writer_index); int pdf_copy_mask_bits(stream *s, const byte *base, int sourcex, int raster, int w, int h, byte invert); int pdf_copy_color_bits(stream *s, const byte *base, int sourcex, int raster, int w, int h, int bytes_per_pixel); int pdf_complete_image_data(gx_device_pdf *pdev, pdf_image_writer *piw, int data_h, int width, int bits_per_pixel); int pdf_end_image_binary(gx_device_pdf *pdev, pdf_image_writer *piw, int data_h); int pdf_end_write_image(gx_device_pdf * pdev, pdf_image_writer * piw); int pdf_make_alt_stream(gx_device_pdf * pdev, psdf_binary_writer * piw); int pdf_choose_compression(pdf_image_writer * piw, bool end_binary); int pdf_register_charproc_resource(gx_device_pdf *pdev, gs_id id, pdf_resource_type_t type); int pdf_store_pattern1_params(gx_device_pdf *pdev, pdf_resource_t *pres, gs_pattern1_instance_t *pinst); int pdf_put_colored_pattern(gx_device_pdf *pdev, const gx_drawing_color *pdc, const gs_color_space *pcs, const psdf_set_color_commands_t *ppscc, bool have_pattern_streams, pdf_resource_t **ppres); int pdf_put_uncolored_pattern(gx_device_pdf *pdev, const gx_drawing_color *pdc, const gs_color_space *pcs, const psdf_set_color_commands_t *ppscc, bool have_pattern_streams, pdf_resource_t **ppres); int pdf_put_pattern2(gx_device_pdf *pdev, const gx_drawing_color *pdc, const psdf_set_color_commands_t *ppscc, pdf_resource_t **ppres); int pdf_copy_color_data(gx_device_pdf * pdev, const byte * base, int sourcex, int raster, gx_bitmap_id id, int x, int y, int w, int h, gs_image_t *pim, pdf_image_writer *piw, int for_pattern); int pdf_document_metadata(gx_device_pdf *pdev); int pdf_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont, const byte *digest, int digest_length, gs_id *metadata_object_id); # 25 "./src/gdevpdfe.c" 2 # 1 "./src/gdevpdfo.h" 1 # 59 "./src/gdevpdfo.h" typedef struct cos_element_s cos_element_t; typedef struct cos_stream_piece_s cos_stream_piece_t; struct cos_object_procs_s { void (*release)(cos_object_t *pco, client_name_t cname); int (*write)(const cos_object_t *pco, gx_device_pdf *pdev, gs_id object_id); int (*equal)(const cos_object_t *pco0, const cos_object_t *pco1, gx_device_pdf *pdev); } ; # 120 "./src/gdevpdfo.h" struct cos_object_s { const cos_object_procs_t *cos_procs; long id; cos_element_t *elements; cos_stream_piece_t *pieces; gx_device_pdf *pdev; pdf_resource_t *pres; byte is_open; byte is_graphics; byte written; long length; stream *input_strm; }; extern const cos_object_procs_t cos_generic_procs; # 140 "./src/gdevpdfo.h" typedef enum { COS_VALUE_SCALAR = 0, COS_VALUE_CONST, COS_VALUE_OBJECT, COS_VALUE_RESOURCE } cos_value_type_t; struct cos_value_s { cos_value_type_t value_type; union vc_ { gs_string chars; cos_object_t *object; } contents; }; # 165 "./src/gdevpdfo.h" typedef struct cos_array_element_s cos_array_element_t; struct cos_array_s { const cos_object_procs_t *cos_procs; long id; cos_array_element_t *elements; cos_stream_piece_t *pieces; gx_device_pdf *pdev; pdf_resource_t *pres; byte is_open; byte is_graphics; byte written; long length; stream *input_strm; }; extern const cos_object_procs_t cos_array_procs; typedef struct cos_dict_element_s cos_dict_element_t; struct cos_dict_s { const cos_object_procs_t *cos_procs; long id; cos_dict_element_t *elements; cos_stream_piece_t *pieces; gx_device_pdf *pdev; pdf_resource_t *pres; byte is_open; byte is_graphics; byte written; long length; stream *input_strm; }; extern const cos_object_procs_t cos_dict_procs; struct cos_stream_s { const cos_object_procs_t *cos_procs; long id; cos_dict_element_t *elements; cos_stream_piece_t *pieces; gx_device_pdf *pdev; pdf_resource_t *pres; byte is_open; byte is_graphics; byte written; long length; stream *input_strm; }; extern const cos_object_procs_t cos_stream_procs; # 188 "./src/gdevpdfo.h" cos_object_t *cos_object_alloc(gx_device_pdf *, client_name_t); cos_array_t *cos_array_alloc(gx_device_pdf *, client_name_t); cos_array_t *cos_array_from_floats(gx_device_pdf *, const float *, uint, client_name_t); cos_dict_t *cos_dict_alloc(gx_device_pdf *, client_name_t); cos_stream_t *cos_stream_alloc(gx_device_pdf *, client_name_t); gs_memory_t *cos_object_memory(const cos_object_t *); int cos_become(cos_object_t *, cos_type_t); void cos_release(cos_object_t *pco, client_name_t cname); int cos_write(const cos_object_t *pco, gx_device_pdf *pdev, gs_id object_id); const cos_value_t *cos_string_value(cos_value_t *, const byte *, uint); const cos_value_t *cos_c_string_value(cos_value_t *, const char *); const cos_value_t *cos_object_value(cos_value_t *, cos_object_t *); const cos_value_t *cos_resource_value(cos_value_t *, cos_object_t *); # 227 "./src/gdevpdfo.h" int cos_array_put(cos_array_t *, long, const cos_value_t *); int cos_array_put_no_copy(cos_array_t *, long, const cos_value_t *); int cos_array_add(cos_array_t *, const cos_value_t *); int cos_array_add_no_copy(cos_array_t *, const cos_value_t *); int cos_array_add_c_string(cos_array_t *, const char *); int cos_array_add_int(cos_array_t *, int); int cos_array_add_real(cos_array_t *, floatp); int cos_array_add_object(cos_array_t *, cos_object_t *); int cos_array_unadd(cos_array_t *, cos_value_t *); int cos_dict_put(cos_dict_t *, const byte *, uint, const cos_value_t *); int cos_dict_put_no_copy(cos_dict_t *, const byte *, uint, const cos_value_t *); int cos_dict_put_c_key(cos_dict_t *, const char *, const cos_value_t *); int cos_dict_put_c_key_string(cos_dict_t *, const char *, const byte *, uint); int cos_dict_put_c_key_int(cos_dict_t *, const char *, int); int cos_dict_put_c_key_bool(cos_dict_t *pcd, const char *key, bool value); int cos_dict_put_c_key_real(cos_dict_t *, const char *, floatp); int cos_dict_put_c_key_floats(cos_dict_t *, const char *, const float *, uint); int cos_dict_put_c_key_object(cos_dict_t *, const char *, cos_object_t *); int cos_dict_put_string(cos_dict_t *, const byte *, uint, const byte *, uint); int cos_dict_put_string_copy(cos_dict_t *pcd, const char *key, const char *value); int cos_dict_put_c_strings(cos_dict_t *, const char *, const char *); int cos_dict_move_all(cos_dict_t *, cos_dict_t *); int cos_stream_add(cos_stream_t *, uint); int cos_stream_add_bytes(cos_stream_t *, const byte *, uint); int cos_stream_add_stream_contents(cos_stream_t *, stream *); int cos_stream_release_pieces(cos_stream_t *pcs); cos_dict_t *cos_stream_dict(cos_stream_t *); # 273 "./src/gdevpdfo.h" const cos_array_element_t * cos_array_element_first(const cos_array_t *); const cos_array_element_t * cos_array_element_next(const cos_array_element_t *, long *, const cos_value_t **); const cos_value_t *cos_dict_find(const cos_dict_t *, const byte *, uint); const cos_value_t *cos_dict_find_c_key(const cos_dict_t *, const char *); int cos_dict_forall(const cos_dict_t *pcd, void *client_data, int (*proc)(void *client_data, const byte *key_data, uint key_size, const cos_value_t *v)); typedef struct cos_param_list_writer_s { const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys; cos_dict_t *pcd; int print_ok; } cos_param_list_writer_t; int cos_param_list_writer_init(cos_param_list_writer_t *, cos_dict_t *, int print_ok); stream *cos_write_stream_alloc(cos_stream_t *pcs, gx_device_pdf *pdev, client_name_t cname); cos_stream_t * cos_stream_from_pipeline(stream *s); stream * cos_write_stream_from_pipeline(stream *s); int cos_value_write(const cos_value_t *, gx_device_pdf *); int cos_dict_elements_write(const cos_dict_t *, gx_device_pdf *); int cos_stream_elements_write(const cos_stream_t *, gx_device_pdf *); int cos_stream_contents_write(const cos_stream_t *, gx_device_pdf *); long cos_stream_length(const cos_stream_t *pcs); int cos_dict_objects_write(const cos_dict_t *, gx_device_pdf *); int cos_dict_objects_delete(cos_dict_t *); int cos_write_object(cos_object_t *pco, gx_device_pdf *pdev); void cos_value_free(const cos_value_t *, const cos_object_t *, client_name_t); void cos_free(cos_object_t *pco, client_name_t cname); # 26 "./src/gdevpdfe.c" 2 # 1 "./src/gdevpdtf.h" 1 # 20 "./src/gdevpdtf.h" # 1 "./src/gdevpdtx.h" 1 # 20 "./src/gdevpdtx.h" # 1 "./src/gdevpdt.h" 1 # 38 "./src/gdevpdt.h" pdf_text_state_t *pdf_text_state_alloc(gs_memory_t *mem); pdf_text_data_t *pdf_text_data_alloc(gs_memory_t *mem); void pdf_reset_text_page(pdf_text_data_t *ptd); void pdf_reset_text_state(pdf_text_data_t *ptd); void pdf_close_text_page(gx_device_pdf *pdev); int pdf_close_text_document(gx_device_pdf *pdev); int pdf_from_stream_to_text(gx_device_pdf *pdev); int pdf_from_string_to_text(gx_device_pdf *pdev); void pdf_close_text_contents(gx_device_pdf *pdev); int pdf_char_image_y_offset(const gx_device_pdf *pdev, int x, int y, int h); int pdf_begin_char_proc(gx_device_pdf * pdev, int w, int h, int x_width, int y_offset, gs_id id, pdf_char_proc_t **ppcp, pdf_stream_position_t * ppos); int pdf_end_char_proc(gx_device_pdf * pdev, pdf_stream_position_t * ppos); int pdf_do_char_image(gx_device_pdf * pdev, const pdf_char_proc_t * pcp, const gs_matrix * pimat); # 21 "./src/gdevpdtx.h" 2 # 60 "./src/gdevpdtx.h" typedef struct pdf_bitmap_fonts_s pdf_bitmap_fonts_t; typedef struct pdf_outline_fonts_s pdf_outline_fonts_t; struct pdf_text_data_s { pdf_outline_fonts_t *outline_fonts; pdf_bitmap_fonts_t *bitmap_fonts; pdf_text_state_t *text_state; }; # 85 "./src/gdevpdtx.h" typedef struct pdf_font_resource_s pdf_font_resource_t; long pdf_font_id(const pdf_font_resource_t *pdfont); int pdf_used_charproc_resources(gx_device_pdf *pdev, pdf_font_resource_t *pdfont); # 21 "./src/gdevpdtf.h" 2 # 86 "./src/gdevpdtf.h" typedef struct gs_cmap_s gs_cmap_t; typedef struct gs_font_type0_s gs_font_type0; # 101 "./src/gdevpdtf.h" typedef struct pdf_font_descriptor_s pdf_font_descriptor_t; typedef struct pdf_char_glyph_pair_s pdf_char_glyph_pair_t; struct pdf_char_glyph_pair_s { gs_char chr; gs_glyph glyph; }; # 126 "./src/gdevpdtf.h" typedef int (*pdf_font_write_contents_proc_t) (gx_device_pdf *, pdf_font_resource_t *); typedef struct pdf_encoding_element_s { gs_glyph glyph; gs_const_string str; bool is_difference; } pdf_encoding_element_t; # 148 "./src/gdevpdtf.h" struct pdf_base_font_s { # 160 "./src/gdevpdtf.h" gs_font_base *copied; gs_font_base *complete; enum { DO_SUBSET_UNKNOWN = 0, DO_SUBSET_NO, DO_SUBSET_YES } do_subset; bool is_standard; int num_glyphs; byte *CIDSet; gs_string font_name; bool written; cos_dict_t *FontFile; }; # 192 "./src/gdevpdtf.h" typedef struct { gs_id id; pdf_resource_type_t type; } pdf_resource_ref_t; struct pdf_font_resource_s { pdf_font_resource_t *next; pdf_resource_t *prev; gs_id rid; bool named; bool global; char rname[1 + (sizeof(long) * 8 / 3 + 1) + 1 ]; ulong where_used; cos_object_t *object; font_type FontType; pdf_font_write_contents_proc_t write_contents; gs_string BaseFont; pdf_font_descriptor_t *FontDescriptor; pdf_base_font_t *base_font; uint count; double *Widths; byte *used; pdf_resource_t *res_ToUnicode; gs_cmap_t *cmap_ToUnicode; gs_glyph_mark_proc_t mark_glyph; void *mark_glyph_data; union { struct { pdf_font_resource_t *DescendantFont; char Encoding_name[(((17) > (sizeof(long) * 8 / 3 + 1 + 4)) ? (17) : (sizeof(long) * 8 / 3 + 1 + 4)) + 1 ]; gs_const_string CMapName; bool cmap_is_standard; int WMode; } type0; struct { long CIDSystemInfo_id; ushort *CIDToGIDMap; gs_id glyphshow_font_id; double *Widths2; double *v; byte *used2; pdf_font_resource_t *parent; } cidfont; struct { int FirstChar, LastChar; gs_encoding_index_t BaseEncoding; pdf_encoding_element_t *Encoding; gs_point *v; union { struct { bool is_MM_instance; } type1; struct { int _dummy; } truetype; struct { gs_int_rect FontBBox; gs_matrix FontMatrix; pdf_char_proc_ownership_t *char_procs; int max_y_offset; bool bitmap_font; cos_dict_t *Resources; byte *cached; } type3; } s; } simple; } u; }; # 308 "./src/gdevpdtf.h" typedef enum { FONT_EMBED_STANDARD, FONT_EMBED_NO, FONT_EMBED_YES } pdf_font_embed_t; # 322 "./src/gdevpdtf.h" typedef struct pdf_standard_font_s { pdf_font_resource_t *pdfont; gs_matrix orig_matrix; } pdf_standard_font_t; # 343 "./src/gdevpdtf.h" struct pdf_outline_fonts_s { pdf_standard_font_t *standard_fonts; }; # 358 "./src/gdevpdtf.h" pdf_outline_fonts_t *pdf_outline_fonts_alloc(gs_memory_t *mem); pdf_standard_font_t *pdf_standard_fonts(const gx_device_pdf *pdev); void pdf_clean_standard_fonts(const gx_device_pdf *pdev); int pdf_free_font_cache(gx_device_pdf *pdev); int pdf_font_type0_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres, gs_id rid, pdf_font_resource_t *DescendantFont, const gs_const_string *CMapName); int pdf_font_type3_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres, pdf_font_write_contents_proc_t write_contents); int pdf_font_std_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres, bool is_original, gs_id rid, gs_font_base *pfont, int index); int pdf_font_simple_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres, gs_id rid, pdf_font_descriptor_t *pfd); int pdf_font_cidfont_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres, gs_id rid, pdf_font_descriptor_t *pfd); int pdf_obtain_cidfont_widths_arrays(gx_device_pdf *pdev, pdf_font_resource_t *pdfont, int wmode, double **w, double **w0, double **v); int font_resource_encoded_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres, gs_id rid, font_type ftype, pdf_font_write_contents_proc_t write_contents); int pdf_assign_font_object_id(gx_device_pdf *pdev, pdf_font_resource_t *pdfont); int pdf_resize_resource_arrays(gx_device_pdf *pdev, pdf_font_resource_t *pfres, int chars_count); gs_font_base *pdf_font_resource_font(const pdf_font_resource_t *pdfont, bool complete); pdf_font_embed_t pdf_font_embed_status(gx_device_pdf *pdev, gs_font *font, int *pindex, pdf_char_glyph_pair_t *pairs, int num_glyphs); int pdf_compute_BaseFont(gx_device_pdf *pdev, pdf_font_resource_t *pdfont, bool finish); int pdf_close_text_document(gx_device_pdf *pdev); const gs_font_name *pdf_choose_font_name(gs_font *font, bool key_name); int pdf_cmap_alloc(gx_device_pdf *pdev, const gs_cmap_t *pcmap, pdf_resource_t **ppres , int font_index_only); int pdf_font_add_cid_to_gid(pdf_font_resource_t *pdfont, uint cid, uint gid); # 27 "./src/gdevpdfe.c" 2 static void pdf_xml_data_write(stream *s, const byte *data, int data_length) { int l = data_length; const byte *p = data; for (; l--; p++) { switch (*p) { case '<' : stream_puts(s, "<"); break; case '>' : stream_puts(s, ">"); break; case '&' : stream_puts(s, "&"); break; case '\'': stream_puts(s, "'"); break; case '"' : stream_puts(s, """); break; default: if (*p < 32 || *p > 127) pprintd1(s, "&#%d;", *p); else spputc(s, *p); } } } static __inline__ void pdf_xml_string_write(stream *s, const char *data) { pdf_xml_data_write(s, (const byte *)data, strlen(data)); } static __inline__ void pdf_xml_tag_open_beg(stream *s, const char *data) { spputc(s, '<'); stream_puts(s, data); } static __inline__ void pdf_xml_tag_end(stream *s) { spputc(s, '>'); } static __inline__ void pdf_xml_tag_end_empty(stream *s) { stream_puts(s, "/>"); } static __inline__ void pdf_xml_tag_open(stream *s, const char *data) { spputc(s, '<'); stream_puts(s, data); spputc(s, '>'); } static __inline__ void pdf_xml_tag_close(stream *s, const char *data) { stream_puts(s, "'); } static __inline__ void pdf_xml_attribute_name(stream *s, const char *data) { spputc(s, ' '); stream_puts(s, data); spputc(s, '='); } static __inline__ void pdf_xml_attribute_value(stream *s, const char *data) { spputc(s, '\''); pdf_xml_string_write(s, data); spputc(s, '\''); } static __inline__ void pdf_xml_attribute_value_data(stream *s, const byte *data, int data_length) { spputc(s, '\''); pdf_xml_data_write(s, data, data_length); spputc(s, '\''); } static __inline__ void pdf_xml_ins_beg(stream *s, const char *data) { stream_puts(s, ""); } static __inline__ void pdf_xml_newline(stream *s) { stream_puts(s, "\n"); } static __inline__ void pdf_xml_copy(stream *s, const char *data) { stream_puts(s, data); } static void pdf_xmp_time(char *buf, int buf_length) { struct tm tms; time_t t; char buf1[4+1+2+1+2+1]; time(&t); tms = *localtime(&t); sprintf(buf1, "%04d-%02d-%02d", tms.tm_year + 1900, tms.tm_mon + 1, tms.tm_mday); strncpy(buf, buf1, buf_length); } static void pdf_xmp_write_docinfo_item(gx_device_pdf *pdev, stream *s, const char *key, const char *default_value, void(*write)(stream *s, const byte *data, int data_length)) { const cos_value_t *v = cos_dict_find(pdev->Info, (const byte *)key, strlen(key)); if (v != ((void *)0) && (v->value_type == COS_VALUE_SCALAR || v->value_type == COS_VALUE_CONST)) { if (v->contents.chars.size > 2 && v->contents.chars.data[0] == '(') write(s, v->contents.chars.data + 1, v->contents.chars.size - 2); else write(s, v->contents.chars.data, v->contents.chars.size); } else stream_puts(s, default_value); } static uint64_t pdf_uuid_time(gx_device_pdf *pdev) { long *dt = pdev->uuid_time; uint64_t t; t = (uint64_t)10000000 * dt[0] + dt[0] / 100; t += (uint64_t) (1000*1000*10) * (uint64_t) (60 * 60 * 24) * (uint64_t) (17+30+31+365*397+99); return t; } static void writehex(char **p, ulong v, int l) { int i = l * 2; static const char digit[] = "0123456789abcdef"; for (; i--;) *((*p)++) = digit[v >> (i * 4) & 15]; } static void pdf_make_uuid(const byte node[6], uint64_t uuid_time, ulong time_seq, char *buf, int buf_length) { char b[40], *p = b; ulong uuid_time_lo = (ulong)(uuid_time & 0xFFFFFFFF); ushort uuid_time_md = (ushort)((uuid_time >> 32) & 0xFFFF); ushort uuid_time_hi = (ushort)((uuid_time >> 48) & 0x0FFF); writehex(&p, uuid_time_lo, 4); *(p++) = '-'; writehex(&p, uuid_time_md, 2); *(p++) = '-'; writehex(&p, uuid_time_hi | (ushort)(1 << 12), 2); *(p++) = '-'; writehex(&p, (time_seq & 0x3F00) >> 8, 1); writehex(&p, time_seq & 0xFF, 1); *(p++) = '-'; writehex(&p, node[0], 1); writehex(&p, node[1], 1); writehex(&p, node[2], 1); writehex(&p, node[3], 1); writehex(&p, node[4], 1); writehex(&p, node[5], 1); *p = 0; strncpy(buf, b, buf_length); } static int pdf_make_instance_uuid(gx_device_pdf *pdev, const byte digest[6], char *buf, int buf_length) { if (pdev->InstanceUUID.size) { int l = (((buf_length - 1) < (pdev->InstanceUUID.size)) ? (buf_length - 1) : (pdev->InstanceUUID.size)); memcpy(buf, pdev->InstanceUUID.data, l); buf[l] = 0; } else pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf, buf_length); return 0; } static int pdf_make_document_uuid(gx_device_pdf *pdev, const byte digest[6], char *buf, int buf_length) { if (pdev->DocumentUUID.size) { int l = (((buf_length - 1) < (pdev->DocumentUUID.size)) ? (buf_length - 1) : (pdev->DocumentUUID.size)); memcpy(buf, pdev->DocumentUUID.data, l); buf[l] = 0; } else pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf, buf_length); return 0; } static char dd[]={'\'', 0xEF, 0xBB, 0xBF, '\'', 0}; static int pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6]) { char instance_uuid[40], document_uuid[40], date_time[40]; int code; stream *s = pdev->strm; code = pdf_make_instance_uuid(pdev, digest, instance_uuid, sizeof(instance_uuid)); if (code < 0) return code; code = pdf_make_document_uuid(pdev, digest, document_uuid, sizeof(document_uuid)); if (code < 0) return code; pdf_xmp_time(date_time, sizeof(date_time)); pdf_xml_ins_beg(s, "xpacket"); pdf_xml_attribute_name(s, "begin"); pdf_xml_copy(s, dd); pdf_xml_attribute_name(s, "id"); pdf_xml_attribute_value(s, "W5M0MpCehiHzreSzNTczkc9d"); pdf_xml_ins_end(s); pdf_xml_newline(s); pdf_xml_copy(s, "\n"); pdf_xml_copy(s, "\n"); { pdf_xml_copy(s, "\n"); { pdf_xml_tag_open_beg(s, "rdf:Description"); pdf_xml_attribute_name(s, "rdf:about"); pdf_xml_attribute_value(s, instance_uuid); pdf_xml_attribute_name(s, "xmlns:pdf"); pdf_xml_attribute_value(s, "http://ns.adobe.com/pdf/1.3/"); pdf_xml_attribute_name(s, "pdf:Producer"); pdf_xmp_write_docinfo_item(pdev, s, "/Producer", "UnknownProduicer", pdf_xml_attribute_value_data); pdf_xml_tag_end_empty(s); pdf_xml_newline(s); pdf_xml_tag_open_beg(s, "rdf:Description"); pdf_xml_attribute_name(s, "rdf:about"); pdf_xml_attribute_value(s, instance_uuid); pdf_xml_attribute_name(s, "xmlns:xap"); pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/"); pdf_xml_attribute_name(s, "xap:ModifyDate"); pdf_xml_attribute_value(s, date_time); pdf_xml_attribute_name(s, "xap:CreateDate"); pdf_xml_attribute_value(s, date_time); pdf_xml_tag_end(s); { pdf_xml_tag_open_beg(s, "xap:CreatorTool"); pdf_xml_tag_end(s); { char buf[10]; sprintf(buf, "%d.%02d", (int)(gs_revision / 100), (int)(gs_revision % 100)); pdf_xml_string_write(s, gs_product); pdf_xml_string_write(s, " "); pdf_xml_string_write(s, buf); pdf_xml_string_write(s, " PDF Writer"); } pdf_xml_tag_close(s, "xap:CreatorTool"); } pdf_xml_tag_close(s, "rdf:Description"); pdf_xml_newline(s); pdf_xml_tag_open_beg(s, "rdf:Description"); pdf_xml_attribute_name(s, "rdf:about"); pdf_xml_attribute_value(s, instance_uuid); pdf_xml_attribute_name(s, "xmlns:xapMM"); pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/mm/"); pdf_xml_attribute_name(s, "xapMM:DocumentID"); pdf_xml_attribute_value(s, document_uuid); pdf_xml_tag_end_empty(s); pdf_xml_newline(s); pdf_xml_tag_open_beg(s, "rdf:Description"); pdf_xml_attribute_name(s, "rdf:about"); pdf_xml_attribute_value(s, instance_uuid); pdf_xml_attribute_name(s, "xmlns:dc"); pdf_xml_attribute_value(s, "http://purl.org/dc/elements/1.1/"); pdf_xml_attribute_name(s, "dc:format"); pdf_xml_attribute_value(s,"application/pdf"); pdf_xml_tag_end(s); { pdf_xml_tag_open(s, "dc:title"); { pdf_xml_tag_open(s, "rdf:Alt"); { pdf_xml_tag_open_beg(s, "rdf:li"); pdf_xml_attribute_name(s, "xml:lang"); pdf_xml_attribute_value(s, "x-default"); pdf_xml_tag_end(s); { pdf_xmp_write_docinfo_item(pdev, s, "/Title", "Untitled", pdf_xml_data_write); } pdf_xml_tag_close(s, "rdf:li"); } pdf_xml_tag_close(s, "rdf:Alt"); } pdf_xml_tag_close(s, "dc:title"); if (cos_dict_find(pdev->Info, (const byte *)"/Author", 7)) { pdf_xml_tag_open(s, "dc:creator"); { pdf_xml_tag_open(s, "rdf:Seq"); { pdf_xml_tag_open(s, "rdf:li"); { pdf_xmp_write_docinfo_item(pdev, s, "/Author", "Unknown", pdf_xml_data_write); } pdf_xml_tag_close(s, "rdf:li"); } pdf_xml_tag_close(s, "rdf:Seq"); } pdf_xml_tag_close(s, "dc:creator"); } } pdf_xml_tag_close(s, "rdf:Description"); pdf_xml_newline(s); } pdf_xml_copy(s, "\n"); } pdf_xml_copy(s, "\n"); pdf_xml_copy(s, " \n"); pdf_xml_copy(s, " \n"); pdf_xml_copy(s, ""); return 0; } int pdf_document_metadata(gx_device_pdf *pdev) { if (pdev->CompatibilityLevel < 1.4) return 0; if (pdev->ParseDSCCommentsForDocInfo || pdev->PreserveEPSInfo) { pdf_resource_t *pres; char buf[20]; byte digest[6]; int code; int options = 0; (*(pdev->strm)->procs.flush)(pdev->strm); s_MD5C_get_digest(pdev->strm, digest, sizeof(digest)); if (pdev->EncryptMetadata) options |= 8; code = pdf_open_aside(pdev, resourceOther, 0L, &pres, ((bool)1), options); if (code < 0) return code; code = pdf_write_document_metadata(pdev, digest); if (code < 0) return code; code = pdf_close_aside(pdev); if (code < 0) return code; code = cos_write_object(((cos_object_t *)&((pres->object)->cos_procs)), pdev); if (code < 0) return code; sprintf(buf, "%ld 0 R", pres->object->id); cos_dict_put_c_key_object(pdev->Catalog, "/Metadata", pres->object); } return 0; } static int pdf_write_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont, const byte *digest, int digest_length) { char instance_uuid[40]; int code; stream *s = pdev->strm; gs_font_info_t info; gs_font_base *pfont = pbfont->complete; if (pfont == ((void *)0)) pfont = pbfont->copied; pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, instance_uuid, sizeof(instance_uuid)); code = pfont->procs.font_info((gs_font *)pfont, ((void *)0), (0x0040 | 0x0080 | 0x1000 | 0x2000), &info); if (code < 0) return code; pdf_xml_ins_beg(s, "xpacket"); pdf_xml_attribute_name(s, "begin"); pdf_xml_copy(s, dd); pdf_xml_attribute_name(s, "id"); pdf_xml_attribute_value(s, "W5M0MpCehiHzreSzNTczkc9d"); pdf_xml_ins_end(s); pdf_xml_newline(s); pdf_xml_copy(s, "\n"); pdf_xml_copy(s, "\n"); { pdf_xml_copy(s, "\n"); { pdf_xml_tag_open_beg(s, "rdf:Description"); pdf_xml_attribute_name(s, "rdf:about"); pdf_xml_attribute_value(s, instance_uuid); pdf_xml_attribute_name(s, "xmlns:xmp"); pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/"); pdf_xml_tag_end(s); { pdf_xml_tag_open_beg(s, "xmp:Title"); pdf_xml_tag_end(s); { pdf_xml_tag_open(s, "rdf:Alt"); { pdf_xml_tag_open_beg(s, "rdf:li"); pdf_xml_attribute_name(s, "xml:lang"); pdf_xml_attribute_value(s, "x-default"); pdf_xml_tag_end(s); { pdf_xml_data_write(s, pbfont->font_name.data, pbfont->font_name.size); } pdf_xml_tag_close(s, "rdf:li"); } pdf_xml_tag_close(s, "rdf:Alt"); } pdf_xml_tag_close(s, "xmp:Title"); } pdf_xml_tag_close(s, "rdf:Description"); pdf_xml_newline(s); pdf_xml_tag_open_beg(s, "rdf:Description"); pdf_xml_attribute_name(s, "rdf:about"); pdf_xml_attribute_value(s, instance_uuid); pdf_xml_attribute_name(s, "xmlns:xmpRights"); pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/rights/"); pdf_xml_tag_end(s); if (info.members & 0x0040) { pdf_xml_tag_open_beg(s, "xmpRights:Copyright"); pdf_xml_tag_end(s); { pdf_xml_tag_open(s, "rdf:Alt"); { pdf_xml_tag_open_beg(s, "rdf:li"); pdf_xml_attribute_name(s, "xml:lang"); pdf_xml_attribute_value(s, "x-default"); pdf_xml_tag_end(s); { pdf_xml_data_write(s, info.Copyright.data, info.Copyright.size); } pdf_xml_tag_close(s, "rdf:li"); } pdf_xml_tag_close(s, "rdf:Alt"); } pdf_xml_tag_close(s, "xmpRights:Copyright"); pdf_xml_tag_open_beg(s, "xmpRights:Owner"); pdf_xml_tag_end(s); { pdf_xml_tag_open(s, "rdf:Alt"); { pdf_xml_tag_open_beg(s, "rdf:li"); pdf_xml_attribute_name(s, "xml:lang"); pdf_xml_attribute_value(s, "x-default"); pdf_xml_tag_end(s); { pdf_xml_data_write(s, info.Copyright.data, info.Copyright.size); } pdf_xml_tag_close(s, "rdf:li"); } pdf_xml_tag_close(s, "rdf:Alt"); } pdf_xml_tag_close(s, "xmpRights:Owner"); } { pdf_xml_tag_open_beg(s, "xmpRights:Marked"); pdf_xml_tag_end(s); { pdf_xml_string_write(s, "True"); } pdf_xml_tag_close(s, "xmpRights:Marked"); } if (info.members & 0x0080) { pdf_xml_tag_open_beg(s, "xmpRights:UsageTerms"); pdf_xml_tag_end(s); { pdf_xml_tag_open(s, "rdf:Alt"); { pdf_xml_tag_open_beg(s, "rdf:li"); pdf_xml_attribute_name(s, "xml:lang"); pdf_xml_attribute_value(s, "x-default"); pdf_xml_tag_end(s); { pdf_xml_data_write(s, info.Notice.data, info.Notice.size); } pdf_xml_tag_close(s, "rdf:li"); } pdf_xml_tag_close(s, "rdf:Alt"); } pdf_xml_tag_close(s, "xmpRights:UsageTerms"); } pdf_xml_tag_close(s, "rdf:Description"); pdf_xml_newline(s); } pdf_xml_copy(s, "\n"); } pdf_xml_copy(s, "\n"); pdf_xml_copy(s, " \n"); pdf_xml_copy(s, " \n"); pdf_xml_copy(s, ""); return 0; } int pdf_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont, const byte *digest, int digest_length, gs_id *metadata_object_id) { *metadata_object_id = 0L; if (pdev->CompatibilityLevel < 1.4) return 0; if (pdev->PDFA) { pdf_resource_t *pres; byte digest[6]; int code; int options = 0; (*(pdev->strm)->procs.flush)(pdev->strm); s_MD5C_get_digest(pdev->strm, digest, sizeof(digest)); if (pdev->EncryptMetadata) options |= 8; code = pdf_open_aside(pdev, resourceOther, 0L, &pres, ((bool)1), options); if (code < 0) return code; code = pdf_write_font_metadata(pdev, pbfont, digest, digest_length); if (code < 0) return code; code = pdf_close_aside(pdev); if (code < 0) return code; code = cos_write_object(((cos_object_t *)&((pres->object)->cos_procs)), pdev); if (code < 0) return code; *metadata_object_id = pres->object->id; } return 0; }