5 # 16 "./src/gdevpdfe.c"
12 # 1 "./src/stdpre.h" 1
13 # 244 "./src/stdpre.h"
14 typedef unsigned char byte;
15 typedef unsigned char uchar;
16 typedef unsigned short ushort;
17 typedef unsigned int uint;
18 typedef unsigned long ulong;
19 # 264 "./src/stdpre.h"
20 # 1 "/usr/include/sys/types.h" 1 3 4
21 # 27 "/usr/include/sys/types.h" 3 4
22 # 1 "/usr/include/features.h" 1 3 4
23 # 323 "/usr/include/features.h" 3 4
24 # 1 "/usr/include/sys/cdefs.h" 1 3 4
25 # 313 "/usr/include/sys/cdefs.h" 3 4
26 # 1 "/usr/include/bits/wordsize.h" 1 3 4
27 # 314 "/usr/include/sys/cdefs.h" 2 3 4
28 # 324 "/usr/include/features.h" 2 3 4
29 # 346 "/usr/include/features.h" 3 4
30 # 1 "/usr/include/gnu/stubs.h" 1 3 4
34 # 1 "/usr/include/bits/wordsize.h" 1 3 4
35 # 5 "/usr/include/gnu/stubs.h" 2 3 4
38 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4
39 # 8 "/usr/include/gnu/stubs.h" 2 3 4
40 # 347 "/usr/include/features.h" 2 3 4
41 # 28 "/usr/include/sys/types.h" 2 3 4
45 # 1 "/usr/include/bits/types.h" 1 3 4
46 # 28 "/usr/include/bits/types.h" 3 4
47 # 1 "/usr/include/bits/wordsize.h" 1 3 4
48 # 29 "/usr/include/bits/types.h" 2 3 4
51 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
52 # 214 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
53 typedef unsigned int size_t;
54 # 32 "/usr/include/bits/types.h" 2 3 4
57 typedef unsigned char __u_char;
58 typedef unsigned short int __u_short;
59 typedef unsigned int __u_int;
60 typedef unsigned long int __u_long;
63 typedef signed char __int8_t;
64 typedef unsigned char __uint8_t;
65 typedef signed short int __int16_t;
66 typedef unsigned short int __uint16_t;
67 typedef signed int __int32_t;
68 typedef unsigned int __uint32_t;
73 __extension__ typedef signed long long int __int64_t;
74 __extension__ typedef unsigned long long int __uint64_t;
82 __extension__ typedef long long int __quad_t;
83 __extension__ typedef unsigned long long int __u_quad_t;
84 # 134 "/usr/include/bits/types.h" 3 4
85 # 1 "/usr/include/bits/typesizes.h" 1 3 4
86 # 135 "/usr/include/bits/types.h" 2 3 4
89 __extension__ typedef __u_quad_t __dev_t;
90 __extension__ typedef unsigned int __uid_t;
91 __extension__ typedef unsigned int __gid_t;
92 __extension__ typedef unsigned long int __ino_t;
93 __extension__ typedef __u_quad_t __ino64_t;
94 __extension__ typedef unsigned int __mode_t;
95 __extension__ typedef unsigned int __nlink_t;
96 __extension__ typedef long int __off_t;
97 __extension__ typedef __quad_t __off64_t;
98 __extension__ typedef int __pid_t;
99 __extension__ typedef struct { int __val[2]; } __fsid_t;
100 __extension__ typedef long int __clock_t;
101 __extension__ typedef unsigned long int __rlim_t;
102 __extension__ typedef __u_quad_t __rlim64_t;
103 __extension__ typedef unsigned int __id_t;
104 __extension__ typedef long int __time_t;
105 __extension__ typedef unsigned int __useconds_t;
106 __extension__ typedef long int __suseconds_t;
108 __extension__ typedef int __daddr_t;
109 __extension__ typedef long int __swblk_t;
110 __extension__ typedef int __key_t;
113 __extension__ typedef int __clockid_t;
116 __extension__ typedef void * __timer_t;
119 __extension__ typedef long int __blksize_t;
124 __extension__ typedef long int __blkcnt_t;
125 __extension__ typedef __quad_t __blkcnt64_t;
128 __extension__ typedef unsigned long int __fsblkcnt_t;
129 __extension__ typedef __u_quad_t __fsblkcnt64_t;
132 __extension__ typedef unsigned long int __fsfilcnt_t;
133 __extension__ typedef __u_quad_t __fsfilcnt64_t;
135 __extension__ typedef int __ssize_t;
139 typedef __off64_t __loff_t;
140 typedef __quad_t *__qaddr_t;
141 typedef char *__caddr_t;
144 __extension__ typedef int __intptr_t;
147 __extension__ typedef unsigned int __socklen_t;
148 # 32 "/usr/include/sys/types.h" 2 3 4
152 typedef __u_char u_char;
153 typedef __u_short u_short;
154 typedef __u_int u_int;
155 typedef __u_long u_long;
156 typedef __quad_t quad_t;
157 typedef __u_quad_t u_quad_t;
158 typedef __fsid_t fsid_t;
163 typedef __loff_t loff_t;
167 typedef __ino_t ino_t;
168 # 62 "/usr/include/sys/types.h" 3 4
169 typedef __dev_t dev_t;
174 typedef __gid_t gid_t;
179 typedef __mode_t mode_t;
184 typedef __nlink_t nlink_t;
189 typedef __uid_t uid_t;
195 typedef __off_t off_t;
196 # 100 "/usr/include/sys/types.h" 3 4
197 typedef __pid_t pid_t;
207 typedef __ssize_t ssize_t;
213 typedef __daddr_t daddr_t;
214 typedef __caddr_t caddr_t;
220 typedef __key_t key_t;
221 # 133 "/usr/include/sys/types.h" 3 4
222 # 1 "/usr/include/time.h" 1 3 4
223 # 75 "/usr/include/time.h" 3 4
226 typedef __time_t time_t;
230 # 93 "/usr/include/time.h" 3 4
231 typedef __clockid_t clockid_t;
232 # 105 "/usr/include/time.h" 3 4
233 typedef __timer_t timer_t;
234 # 134 "/usr/include/sys/types.h" 2 3 4
235 # 147 "/usr/include/sys/types.h" 3 4
236 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
237 # 148 "/usr/include/sys/types.h" 2 3 4
241 typedef unsigned long int ulong_;
242 typedef unsigned short int ushort_;
243 typedef unsigned int uint_;
244 # 195 "/usr/include/sys/types.h" 3 4
245 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
246 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
247 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
248 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
251 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
252 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
253 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
254 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
256 typedef int register_t __attribute__ ((__mode__ (__word__)));
257 # 217 "/usr/include/sys/types.h" 3 4
258 # 1 "/usr/include/endian.h" 1 3 4
259 # 37 "/usr/include/endian.h" 3 4
260 # 1 "/usr/include/bits/endian.h" 1 3 4
261 # 38 "/usr/include/endian.h" 2 3 4
262 # 218 "/usr/include/sys/types.h" 2 3 4
265 # 1 "/usr/include/sys/select.h" 1 3 4
266 # 31 "/usr/include/sys/select.h" 3 4
267 # 1 "/usr/include/bits/select.h" 1 3 4
268 # 32 "/usr/include/sys/select.h" 2 3 4
271 # 1 "/usr/include/bits/sigset.h" 1 3 4
272 # 23 "/usr/include/bits/sigset.h" 3 4
273 typedef int __sig_atomic_t;
280 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
282 # 35 "/usr/include/sys/select.h" 2 3 4
286 typedef __sigset_t sigset_t;
292 # 1 "/usr/include/time.h" 1 3 4
293 # 121 "/usr/include/time.h" 3 4
299 # 45 "/usr/include/sys/select.h" 2 3 4
301 # 1 "/usr/include/bits/time.h" 1 3 4
302 # 69 "/usr/include/bits/time.h" 3 4
306 __suseconds_t tv_usec;
308 # 47 "/usr/include/sys/select.h" 2 3 4
311 typedef __suseconds_t suseconds_t;
317 typedef long int __fd_mask;
318 # 67 "/usr/include/sys/select.h" 3 4
327 __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
337 typedef __fd_mask fd_mask;
338 # 99 "/usr/include/sys/select.h" 3 4
340 # 109 "/usr/include/sys/select.h" 3 4
341 extern int select (int __nfds, fd_set *__restrict __readfds,
342 fd_set *__restrict __writefds,
343 fd_set *__restrict __exceptfds,
344 struct timeval *__restrict __timeout);
345 # 121 "/usr/include/sys/select.h" 3 4
346 extern int pselect (int __nfds, fd_set *__restrict __readfds,
347 fd_set *__restrict __writefds,
348 fd_set *__restrict __exceptfds,
349 const struct timespec *__restrict __timeout,
350 const __sigset_t *__restrict __sigmask);
354 # 221 "/usr/include/sys/types.h" 2 3 4
357 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
358 # 29 "/usr/include/sys/sysmacros.h" 3 4
360 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
361 __attribute__ ((__nothrow__));
363 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
364 __attribute__ ((__nothrow__));
366 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
367 unsigned int __minor)
368 __attribute__ ((__nothrow__));
371 __extension__ extern __inline unsigned int
372 __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
374 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
377 __extension__ extern __inline unsigned int
378 __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
380 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
383 __extension__ extern __inline unsigned long long int
384 __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
386 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
387 | (((unsigned long long int) (__minor & ~0xff)) << 12)
388 | (((unsigned long long int) (__major & ~0xfff)) << 32));
390 # 224 "/usr/include/sys/types.h" 2 3 4
391 # 235 "/usr/include/sys/types.h" 3 4
392 typedef __blkcnt_t blkcnt_t;
396 typedef __fsblkcnt_t fsblkcnt_t;
400 typedef __fsfilcnt_t fsfilcnt_t;
401 # 270 "/usr/include/sys/types.h" 3 4
402 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
403 # 36 "/usr/include/bits/pthreadtypes.h" 3 4
404 typedef unsigned long int pthread_t;
414 typedef struct __pthread_internal_slist
416 struct __pthread_internal_slist *__next;
424 struct __pthread_mutex_s
427 unsigned int __count;
432 unsigned int __nusers;
436 __pthread_slist_t __list;
447 } pthread_mutexattr_t;
457 unsigned int __futex;
458 __extension__ unsigned long long int __total_seq;
459 __extension__ unsigned long long int __wakeup_seq;
460 __extension__ unsigned long long int __woken_seq;
462 unsigned int __nwaiters;
463 unsigned int __broadcast_seq;
466 __extension__ long long int __align;
473 } pthread_condattr_t;
477 typedef unsigned int pthread_key_t;
481 typedef int pthread_once_t;
492 unsigned int __nr_readers;
493 unsigned int __readers_wakeup;
494 unsigned int __writer_wakeup;
495 unsigned int __nr_readers_queued;
496 unsigned int __nr_writers_queued;
499 unsigned int __flags;
510 } pthread_rwlockattr_t;
516 typedef volatile int pthread_spinlock_t;
531 } pthread_barrierattr_t;
532 # 271 "/usr/include/sys/types.h" 2 3 4
536 # 265 "./src/stdpre.h" 2
537 # 285 "./src/stdpre.h"
539 # 322 "./src/stdpre.h"
540 typedef const char *ptr_ord_t;
541 # 363 "./src/stdpre.h"
542 typedef double floatp;
543 # 391 "./src/stdpre.h"
544 typedef const char *client_name_t;
545 # 419 "./src/stdpre.h"
546 # 1 "./src/stdpn.h" 1
547 # 420 "./src/stdpre.h" 2
551 # 1 "./obj/../soobj/arch.h" 1
554 typedef ushort bits16;
559 # 1 "/usr/include/stdio.h" 1 3 4
560 # 30 "/usr/include/stdio.h" 3 4
565 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
566 # 35 "/usr/include/stdio.h" 2 3 4
567 # 44 "/usr/include/stdio.h" 3 4
570 typedef struct _IO_FILE FILE;
576 # 62 "/usr/include/stdio.h" 3 4
577 typedef struct _IO_FILE __FILE;
578 # 72 "/usr/include/stdio.h" 3 4
579 # 1 "/usr/include/libio.h" 1 3 4
580 # 32 "/usr/include/libio.h" 3 4
581 # 1 "/usr/include/_G_config.h" 1 3 4
582 # 14 "/usr/include/_G_config.h" 3 4
583 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
584 # 326 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
585 typedef long int wchar_t;
586 # 355 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
587 typedef unsigned int wint_t;
588 # 15 "/usr/include/_G_config.h" 2 3 4
589 # 24 "/usr/include/_G_config.h" 3 4
590 # 1 "/usr/include/wchar.h" 1 3 4
591 # 48 "/usr/include/wchar.h" 3 4
592 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
593 # 49 "/usr/include/wchar.h" 2 3 4
595 # 1 "/usr/include/bits/wchar.h" 1 3 4
596 # 51 "/usr/include/wchar.h" 2 3 4
597 # 76 "/usr/include/wchar.h" 3 4
607 # 25 "/usr/include/_G_config.h" 2 3 4
619 # 44 "/usr/include/_G_config.h" 3 4
620 # 1 "/usr/include/gconv.h" 1 3 4
621 # 28 "/usr/include/gconv.h" 3 4
622 # 1 "/usr/include/wchar.h" 1 3 4
623 # 48 "/usr/include/wchar.h" 3 4
624 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
625 # 49 "/usr/include/wchar.h" 2 3 4
626 # 29 "/usr/include/gconv.h" 2 3 4
629 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
630 # 32 "/usr/include/gconv.h" 2 3 4
645 __GCONV_ILLEGAL_INPUT,
646 __GCONV_INCOMPLETE_INPUT,
648 __GCONV_ILLEGAL_DESCRIPTOR,
649 __GCONV_INTERNAL_ERROR
656 __GCONV_IS_LAST = 0x0001,
657 __GCONV_IGNORE_ERRORS = 0x0002
663 struct __gconv_step_data;
664 struct __gconv_loaded_object;
665 struct __gconv_trans_data;
669 typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
670 __const unsigned char **, __const unsigned char *,
671 unsigned char **, size_t *, int, int);
674 typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
677 typedef int (*__gconv_init_fct) (struct __gconv_step *);
678 typedef void (*__gconv_end_fct) (struct __gconv_step *);
682 typedef int (*__gconv_trans_fct) (struct __gconv_step *,
683 struct __gconv_step_data *, void *,
684 __const unsigned char *,
685 __const unsigned char **,
686 __const unsigned char *, unsigned char **,
690 typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
691 __const unsigned char *,
692 unsigned char *, unsigned char *);
695 typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
699 typedef int (*__gconv_trans_init_fct) (void **, const char *);
700 typedef void (*__gconv_trans_end_fct) (void *);
702 struct __gconv_trans_data
705 __gconv_trans_fct __trans_fct;
706 __gconv_trans_context_fct __trans_context_fct;
707 __gconv_trans_end_fct __trans_end_fct;
709 struct __gconv_trans_data *__next;
716 struct __gconv_loaded_object *__shlib_handle;
717 __const char *__modname;
725 __gconv_btowc_fct __btowc_fct;
726 __gconv_init_fct __init_fct;
727 __gconv_end_fct __end_fct;
731 int __min_needed_from;
732 int __max_needed_from;
744 struct __gconv_step_data
746 unsigned char *__outbuf;
747 unsigned char *__outbufend;
755 int __invocation_counter;
761 __mbstate_t *__statep;
766 struct __gconv_trans_data *__trans;
771 typedef struct __gconv_info
774 struct __gconv_step *__steps;
775 __extension__ struct __gconv_step_data __data [];
777 # 45 "/usr/include/_G_config.h" 2 3 4
780 struct __gconv_info __cd;
783 struct __gconv_info __cd;
784 struct __gconv_step_data __data;
788 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
789 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
790 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
791 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
792 # 33 "/usr/include/libio.h" 2 3 4
793 # 53 "/usr/include/libio.h" 3 4
794 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
795 # 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 3 4
796 typedef __builtin_va_list __gnuc_va_list;
797 # 54 "/usr/include/libio.h" 2 3 4
798 # 166 "/usr/include/libio.h" 3 4
799 struct _IO_jump_t; struct _IO_FILE;
800 # 176 "/usr/include/libio.h" 3 4
801 typedef void _IO_lock_t;
808 struct _IO_marker *_next;
809 struct _IO_FILE *_sbuf;
814 # 199 "/usr/include/libio.h" 3 4
818 enum __codecvt_result
825 # 267 "/usr/include/libio.h" 3 4
835 char* _IO_write_base;
842 char *_IO_backup_base;
845 struct _IO_marker *_markers;
847 struct _IO_FILE *_chain;
859 unsigned short _cur_column;
860 signed char _vtable_offset;
866 # 315 "/usr/include/libio.h" 3 4
868 # 324 "/usr/include/libio.h" 3 4
877 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
882 typedef struct _IO_FILE _IO_FILE;
885 struct _IO_FILE_plus;
887 extern struct _IO_FILE_plus _IO_2_1_stdin_;
888 extern struct _IO_FILE_plus _IO_2_1_stdout_;
889 extern struct _IO_FILE_plus _IO_2_1_stderr_;
890 # 360 "/usr/include/libio.h" 3 4
891 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
899 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
908 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
911 typedef int __io_close_fn (void *__cookie);
912 # 412 "/usr/include/libio.h" 3 4
913 extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__));
914 extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__));
915 extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__));
916 extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__));
917 extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__));
918 extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__));
919 # 450 "/usr/include/libio.h" 3 4
920 extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
921 extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__));
922 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
923 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
925 extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__));
931 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
932 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
933 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
934 # 480 "/usr/include/libio.h" 3 4
935 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
936 __gnuc_va_list, int *__restrict);
937 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
939 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__));
940 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__));
942 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__));
943 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__));
945 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
946 # 73 "/usr/include/stdio.h" 2 3 4
947 # 86 "/usr/include/stdio.h" 3 4
950 typedef _G_fpos_t fpos_t;
955 # 138 "/usr/include/stdio.h" 3 4
956 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
957 # 139 "/usr/include/stdio.h" 2 3 4
961 extern struct _IO_FILE *stdin;
962 extern struct _IO_FILE *stdout;
963 extern struct _IO_FILE *stderr;
971 extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
973 extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
988 extern FILE *tmpfile (void);
989 # 183 "/usr/include/stdio.h" 3 4
990 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));
996 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
997 # 201 "/usr/include/stdio.h" 3 4
998 extern char *tempnam (__const char *__dir, __const char *__pfx)
999 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
1008 extern int fclose (FILE *__stream);
1013 extern int fflush (FILE *__stream);
1015 # 226 "/usr/include/stdio.h" 3 4
1016 extern int fflush_unlocked (FILE *__stream);
1017 # 240 "/usr/include/stdio.h" 3 4
1024 extern FILE *fopen (__const char *__restrict __filename,
1025 __const char *__restrict __modes);
1030 extern FILE *freopen (__const char *__restrict __filename,
1031 __const char *__restrict __modes,
1032 FILE *__restrict __stream);
1033 # 267 "/usr/include/stdio.h" 3 4
1035 # 278 "/usr/include/stdio.h" 3 4
1036 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
1037 # 304 "/usr/include/stdio.h" 3 4
1041 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
1045 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
1046 int __modes, size_t __n) __attribute__ ((__nothrow__));
1052 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
1053 size_t __size) __attribute__ ((__nothrow__));
1056 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
1065 extern int fprintf (FILE *__restrict __stream,
1066 __const char *__restrict __format, ...);
1071 extern int printf (__const char *__restrict __format, ...);
1073 extern int sprintf (char *__restrict __s,
1074 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
1080 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
1081 __gnuc_va_list __arg);
1086 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
1088 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
1089 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
1095 extern int snprintf (char *__restrict __s, size_t __maxlen,
1096 __const char *__restrict __format, ...)
1097 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
1099 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
1100 __const char *__restrict __format, __gnuc_va_list __arg)
1101 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
1103 # 398 "/usr/include/stdio.h" 3 4
1109 extern int fscanf (FILE *__restrict __stream,
1110 __const char *__restrict __format, ...) ;
1115 extern int scanf (__const char *__restrict __format, ...) ;
1117 extern int sscanf (__const char *__restrict __s,
1118 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
1120 # 440 "/usr/include/stdio.h" 3 4
1126 extern int fgetc (FILE *__stream);
1127 extern int getc (FILE *__stream);
1133 extern int getchar (void);
1135 # 464 "/usr/include/stdio.h" 3 4
1136 extern int getc_unlocked (FILE *__stream);
1137 extern int getchar_unlocked (void);
1138 # 475 "/usr/include/stdio.h" 3 4
1139 extern int fgetc_unlocked (FILE *__stream);
1151 extern int fputc (int __c, FILE *__stream);
1152 extern int putc (int __c, FILE *__stream);
1158 extern int putchar (int __c);
1160 # 508 "/usr/include/stdio.h" 3 4
1161 extern int fputc_unlocked (int __c, FILE *__stream);
1169 extern int putc_unlocked (int __c, FILE *__stream);
1170 extern int putchar_unlocked (int __c);
1177 extern int getw (FILE *__stream);
1180 extern int putw (int __w, FILE *__stream);
1189 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
1197 extern char *gets (char *__s) ;
1199 # 589 "/usr/include/stdio.h" 3 4
1205 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
1211 extern int puts (__const char *__s);
1218 extern int ungetc (int __c, FILE *__stream);
1225 extern size_t fread (void *__restrict __ptr, size_t __size,
1226 size_t __n, FILE *__restrict __stream) ;
1231 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
1232 size_t __n, FILE *__restrict __s) ;
1234 # 642 "/usr/include/stdio.h" 3 4
1235 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
1236 size_t __n, FILE *__restrict __stream) ;
1237 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
1238 size_t __n, FILE *__restrict __stream) ;
1247 extern int fseek (FILE *__stream, long int __off, int __whence);
1252 extern long int ftell (FILE *__stream) ;
1257 extern void rewind (FILE *__stream);
1259 # 678 "/usr/include/stdio.h" 3 4
1260 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
1265 extern __off_t ftello (FILE *__stream) ;
1266 # 697 "/usr/include/stdio.h" 3 4
1273 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
1278 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
1279 # 720 "/usr/include/stdio.h" 3 4
1281 # 729 "/usr/include/stdio.h" 3 4
1284 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
1286 extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;
1288 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;
1293 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
1294 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
1295 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
1304 extern void perror (__const char *__s);
1311 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
1312 # 27 "/usr/include/bits/sys_errlist.h" 3 4
1313 extern int sys_nerr;
1314 extern __const char *__const sys_errlist[];
1315 # 759 "/usr/include/stdio.h" 2 3 4
1320 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;
1325 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
1326 # 778 "/usr/include/stdio.h" 3 4
1327 extern FILE *popen (__const char *__command, __const char *__modes) ;
1333 extern int pclose (FILE *__stream);
1339 extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
1340 # 818 "/usr/include/stdio.h" 3 4
1341 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
1345 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;
1348 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
1349 # 848 "/usr/include/stdio.h" 3 4
1351 # 143 "./src/std.h" 2
1358 typedef struct gs_memory_s gs_memory_t;
1360 int outwrite(const gs_memory_t *mem, const char *str, int len);
1361 int errwrite(const char *str, int len);
1362 void outflush(const gs_memory_t *mem);
1363 void errflush(void);
1365 int outprintf(const gs_memory_t *mem, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
1366 int errprintf(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
1374 void dprintf_file_and_line(const char *, int);
1383 void printf_program_ident(const gs_memory_t *mem, const char *program_name, long revision_number);
1384 void eprintf_program_ident(const char *program_name, long revision_number);
1385 const char *gs_program_name(void);
1386 long gs_revision_number(void);
1388 void lprintf_file_and_line(const char *, int);
1389 # 25 "./src/stdio_.h" 2
1390 # 42 "./src/stdio_.h"
1391 int unlink(const char *);
1393 # 1 "./src/gserror.h" 1
1394 # 20 "./src/gserror.h"
1395 int gs_log_error(int, const char *, int);
1396 # 43 "./src/gserror.h"
1397 const char *gs_errstr(int code);
1399 int gs_throw_imp(const char *func, const char *file, int line,
1400 int op, int code, const char *fmt, ...) __attribute__((__format__ (__printf__, 6, 7)));
1402 # 1 "./src/gsio.h" 1
1404 # 1 "./src/gstypes.h" 1
1405 # 26 "./src/gstypes.h"
1406 typedef ulong gs_id;
1407 # 43 "./src/gstypes.h"
1408 typedef struct gs_string_s {
1409 byte *data; uint size;
1414 typedef struct gs_const_string_s {
1415 const byte *data; uint size;
1417 typedef struct gs_param_string_s {
1418 const byte *data; uint size;
1421 # 69 "./src/gstypes.h"
1422 typedef struct gs_bytestring_s {
1423 byte *data; uint size;
1426 typedef struct gs_const_bytestring_s {
1427 const byte *data; uint size;
1429 } gs_const_bytestring;
1430 # 86 "./src/gstypes.h"
1431 typedef struct gs_point_s {
1434 typedef struct gs_int_point_s {
1442 typedef struct gs_log2_scale_point_s {
1444 } gs_log2_scale_point;
1452 typedef struct gs_rect_s {
1455 typedef struct gs_int_rect_s {
1464 typedef struct gs_range_s {
1468 # 1 "./src/gsmemory.h" 1
1469 # 41 "./src/gsmemory.h"
1470 # 1 "./src/gslibctx.h" 1
1471 # 20 "./src/gslibctx.h"
1472 # 1 "./src/gs_dll_call.h" 1
1473 # 21 "./src/gslibctx.h" 2
1476 typedef struct name_table_s *name_table_ptr;
1478 typedef struct gs_lib_ctx_s
1480 gs_memory_t *memory;
1485 bool stdout_is_redirected;
1486 bool stdout_to_stderr;
1487 bool stdin_is_interactive;
1488 void *caller_handle;
1489 int ( *stdin_fn)(void *caller_handle, char *buf, int len);
1490 int ( *stdout_fn)(void *caller_handle, const char *str, int len);
1491 int ( *stderr_fn)(void *caller_handle, const char *str, int len);
1492 int ( *poll_fn)(void *caller_handle);
1494 void *top_of_system;
1497 name_table_ptr gs_name_table;
1501 bool dict_auto_expand;
1508 int gs_lib_ctx_init( gs_memory_t *mem );
1510 void *gs_lib_ctx_get_interp_instance( gs_memory_t *mem );
1515 const gs_memory_t * gs_lib_ctx_get_non_gc_memory_t(void);
1516 # 42 "./src/gsmemory.h" 2
1519 typedef struct gs_memory_struct_type_s gs_memory_struct_type_t;
1520 typedef const gs_memory_struct_type_t *gs_memory_type_ptr_t;
1521 # 55 "./src/gsmemory.h"
1522 typedef struct gs_ptr_procs_s gs_ptr_procs_t;
1523 typedef const gs_ptr_procs_t *gs_ptr_type_t;
1526 typedef struct gs_gc_root_s gs_gc_root_t;
1530 typedef client_name_t struct_name_t;
1533 uint gs_struct_type_size(gs_memory_type_ptr_t);
1536 struct_name_t gs_struct_type_name(gs_memory_type_ptr_t);
1544 typedef struct gs_memory_status_s {
1556 } gs_memory_status_t;
1557 # 222 "./src/gsmemory.h"
1558 typedef struct gs_memory_procs_s {
1560 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);
1561 # 250 "./src/gsmemory.h"
1562 byte *(*alloc_bytes)(gs_memory_t *mem, uint nbytes, client_name_t cname);
1563 # 261 "./src/gsmemory.h"
1564 void *(*alloc_struct)(gs_memory_t *mem, gs_memory_type_ptr_t pstype, client_name_t cname);
1567 void *(*alloc_struct_immovable)(gs_memory_t *mem, gs_memory_type_ptr_t pstype, client_name_t cname);
1568 # 275 "./src/gsmemory.h"
1569 byte *(*alloc_byte_array)(gs_memory_t *mem, uint num_elements, uint elt_size, client_name_t cname);
1572 byte *(*alloc_byte_array_immovable)(gs_memory_t *mem, uint num_elements, uint elt_size, client_name_t cname);
1573 # 289 "./src/gsmemory.h"
1574 void *(*alloc_struct_array)(gs_memory_t *mem, uint num_elements, gs_memory_type_ptr_t pstype, client_name_t cname);
1577 void *(*alloc_struct_array_immovable)(gs_memory_t *mem, uint num_elements, gs_memory_type_ptr_t pstype, client_name_t cname);
1578 # 302 "./src/gsmemory.h"
1579 uint (*object_size)(gs_memory_t *mem, const void *obj);
1580 # 314 "./src/gsmemory.h"
1581 gs_memory_type_ptr_t (*object_type)(gs_memory_t *mem, const void *obj);
1582 # 324 "./src/gsmemory.h"
1583 byte *(*alloc_string)(gs_memory_t *mem, uint nbytes, client_name_t cname);
1586 byte *(*alloc_string_immovable)(gs_memory_t *mem, uint nbytes, client_name_t cname);
1587 # 339 "./src/gsmemory.h"
1588 byte *(*resize_string)(gs_memory_t *mem, byte *data, uint old_num, uint new_num, client_name_t cname);
1589 # 350 "./src/gsmemory.h"
1590 void (*free_string)(gs_memory_t *mem, byte *data, uint nbytes, client_name_t cname);
1591 # 364 "./src/gsmemory.h"
1592 int (*register_root)(gs_memory_t *mem, gs_gc_root_t *root, gs_ptr_type_t ptype, void **pp, client_name_t cname);
1593 # 375 "./src/gsmemory.h"
1594 void (*unregister_root)(gs_memory_t *mem, gs_gc_root_t *root, client_name_t cname);
1595 # 390 "./src/gsmemory.h"
1596 void (*enable_free)(gs_memory_t *mem, bool enable);
1598 } gs_memory_procs_t;
1606 void gs_free_const_object(gs_memory_t *mem, const void *data,
1607 client_name_t cname);
1608 void gs_free_const_string(gs_memory_t *mem, const byte *data, uint nbytes,
1609 client_name_t cname);
1615 void gs_free_bytestring(gs_memory_t *mem, gs_bytestring *pbs,
1616 client_name_t cname);
1617 void gs_free_const_bytestring(gs_memory_t *mem, gs_const_bytestring *pbs,
1618 client_name_t cname);
1624 void *gs_resize_struct_array(gs_memory_t *mem, void *obj, uint num_elements,
1625 gs_memory_type_ptr_t pstype,
1626 client_name_t cname);
1629 int gs_register_struct_root(gs_memory_t *mem, gs_gc_root_t *root,
1630 void **pp, client_name_t cname);
1633 void gs_ignore_free_object(gs_memory_t *mem, void *data, client_name_t cname);
1634 void gs_ignore_free_string(gs_memory_t *mem, byte *data, uint nbytes, client_name_t cname);
1637 void gs_ignore_consolidate_free(gs_memory_t *mem);
1645 void *gs_raw_alloc_struct_immovable(gs_memory_t * rmem,
1646 gs_memory_type_ptr_t pstype,
1647 client_name_t cname);
1649 typedef struct pl_mem_node_s pl_mem_node_t;
1650 # 468 "./src/gsmemory.h"
1651 struct gs_memory_s {
1652 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;
1655 # 1 "./src/gdebug.h" 1
1656 # 50 "./src/gdebug.h"
1657 extern char gs_debug[128];
1658 bool gs_debug_c(int );
1659 # 60 "./src/gdebug.h"
1660 extern FILE *gs_debug_out;
1661 # 114 "./src/gdebug.h"
1662 void debug_dump_bytes(const byte * from, const byte * to,
1664 void debug_dump_bitmap(const byte * from, uint raster, uint height,
1666 void debug_print_string(const byte * str, uint len);
1667 void debug_print_string_hex(const byte * str, uint len);
1675 typedef struct gs_imager_state_s gs_imager_state;
1680 typedef struct gs_state_s gs_state;
1681 # 17 "./src/gdevpdfe.c" 2
1682 # 1 "./src/string_.h" 1
1683 # 30 "./src/string_.h"
1684 # 1 "/usr/include/string.h" 1 3 4
1685 # 28 "/usr/include/string.h" 3 4
1691 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1692 # 34 "/usr/include/string.h" 2 3 4
1697 extern void *memcpy (void *__restrict __dest,
1698 __const void *__restrict __src, size_t __n)
1699 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1702 extern void *memmove (void *__dest, __const void *__src, size_t __n)
1703 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1710 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
1711 int __c, size_t __n)
1712 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1718 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1721 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
1722 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1725 extern void *memchr (__const void *__s, int __c, size_t __n)
1726 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1728 # 82 "/usr/include/string.h" 3 4
1731 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
1732 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1734 extern char *strncpy (char *__restrict __dest,
1735 __const char *__restrict __src, size_t __n)
1736 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1739 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
1740 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1742 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
1743 size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1746 extern int strcmp (__const char *__s1, __const char *__s2)
1747 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1749 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
1750 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1753 extern int strcoll (__const char *__s1, __const char *__s2)
1754 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1756 extern size_t strxfrm (char *__restrict __dest,
1757 __const char *__restrict __src, size_t __n)
1758 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
1760 # 130 "/usr/include/string.h" 3 4
1761 extern char *strdup (__const char *__s)
1762 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1763 # 165 "/usr/include/string.h" 3 4
1766 extern char *strchr (__const char *__s, int __c)
1767 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1769 extern char *strrchr (__const char *__s, int __c)
1770 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1772 # 181 "/usr/include/string.h" 3 4
1776 extern size_t strcspn (__const char *__s, __const char *__reject)
1777 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1780 extern size_t strspn (__const char *__s, __const char *__accept)
1781 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1783 extern char *strpbrk (__const char *__s, __const char *__accept)
1784 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1786 extern char *strstr (__const char *__haystack, __const char *__needle)
1787 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1791 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
1792 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
1797 extern char *__strtok_r (char *__restrict __s,
1798 __const char *__restrict __delim,
1799 char **__restrict __save_ptr)
1800 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
1802 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
1803 char **__restrict __save_ptr)
1804 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
1805 # 240 "/usr/include/string.h" 3 4
1808 extern size_t strlen (__const char *__s)
1809 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1811 # 254 "/usr/include/string.h" 3 4
1814 extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
1816 # 270 "/usr/include/string.h" 3 4
1817 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
1818 # 288 "/usr/include/string.h" 3 4
1819 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1823 extern void bcopy (__const void *__src, void *__dest, size_t __n)
1824 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1827 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1830 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
1831 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1834 extern char *index (__const char *__s, int __c)
1835 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1838 extern char *rindex (__const char *__s, int __c)
1839 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1843 extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
1844 # 325 "/usr/include/string.h" 3 4
1845 extern int strcasecmp (__const char *__s1, __const char *__s2)
1846 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1849 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
1850 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1851 # 348 "/usr/include/string.h" 3 4
1852 extern char *strsep (char **__restrict __stringp,
1853 __const char *__restrict __delim)
1854 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1855 # 426 "/usr/include/string.h" 3 4
1857 # 31 "./src/string_.h" 2
1858 # 18 "./src/gdevpdfe.c" 2
1859 # 1 "./src/time_.h" 1
1860 # 28 "./src/time_.h"
1861 # 1 "./obj/../soobj/gconfig_.h" 1
1862 # 29 "./src/time_.h" 2
1869 # 1 "/usr/include/sys/time.h" 1 3 4
1870 # 27 "/usr/include/sys/time.h" 3 4
1871 # 1 "/usr/include/time.h" 1 3 4
1872 # 28 "/usr/include/sys/time.h" 2 3 4
1874 # 1 "/usr/include/bits/time.h" 1 3 4
1875 # 30 "/usr/include/sys/time.h" 2 3 4
1876 # 39 "/usr/include/sys/time.h" 3 4
1878 # 57 "/usr/include/sys/time.h" 3 4
1885 typedef struct timezone *__restrict __timezone_ptr_t;
1886 # 73 "/usr/include/sys/time.h" 3 4
1887 extern int gettimeofday (struct timeval *__restrict __tv,
1888 __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1893 extern int settimeofday (__const struct timeval *__tv,
1894 __const struct timezone *__tz)
1895 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1901 extern int adjtime (__const struct timeval *__delta,
1902 struct timeval *__olddelta) __attribute__ ((__nothrow__));
1926 struct timeval it_interval;
1928 struct timeval it_value;
1936 typedef int __itimer_which_t;
1941 extern int getitimer (__itimer_which_t __which,
1942 struct itimerval *__value) __attribute__ ((__nothrow__));
1947 extern int setitimer (__itimer_which_t __which,
1948 __const struct itimerval *__restrict __new,
1949 struct itimerval *__restrict __old) __attribute__ ((__nothrow__));
1954 extern int utimes (__const char *__file, __const struct timeval __tvp[2])
1955 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1959 extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
1960 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1963 extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
1964 # 191 "/usr/include/sys/time.h" 3 4
1966 # 36 "./src/time_.h" 2
1973 # 1 "/usr/include/time.h" 1 3 4
1974 # 31 "/usr/include/time.h" 3 4
1983 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1984 # 40 "/usr/include/time.h" 2 3 4
1988 # 1 "/usr/include/bits/time.h" 1 3 4
1989 # 44 "/usr/include/time.h" 2 3 4
1990 # 59 "/usr/include/time.h" 3 4
1993 typedef __clock_t clock_t;
1997 # 132 "/usr/include/time.h" 3 4
2014 __const char *tm_zone;
2030 struct timespec it_interval;
2031 struct timespec it_value;
2036 # 181 "/usr/include/time.h" 3 4
2040 extern clock_t clock (void) __attribute__ ((__nothrow__));
2043 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
2046 extern double difftime (time_t __time1, time_t __time0)
2047 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2050 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
2056 extern size_t strftime (char *__restrict __s, size_t __maxsize,
2057 __const char *__restrict __format,
2058 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
2060 # 229 "/usr/include/time.h" 3 4
2064 extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
2068 extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
2074 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
2075 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
2079 extern struct tm *localtime_r (__const time_t *__restrict __timer,
2080 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
2086 extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
2089 extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
2097 extern char *asctime_r (__const struct tm *__restrict __tp,
2098 char *__restrict __buf) __attribute__ ((__nothrow__));
2101 extern char *ctime_r (__const time_t *__restrict __timer,
2102 char *__restrict __buf) __attribute__ ((__nothrow__));
2107 extern char *__tzname[2];
2108 extern int __daylight;
2109 extern long int __timezone;
2114 extern char *tzname[2];
2118 extern void tzset (void) __attribute__ ((__nothrow__));
2122 extern int daylight;
2123 extern long int timezone;
2129 extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
2130 # 312 "/usr/include/time.h" 3 4
2131 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
2134 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
2137 extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2138 # 327 "/usr/include/time.h" 3 4
2139 extern int nanosleep (__const struct timespec *__requested_time,
2140 struct timespec *__remaining);
2144 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
2147 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
2150 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
2151 __attribute__ ((__nothrow__));
2158 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
2159 __const struct timespec *__req,
2160 struct timespec *__rem);
2163 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));
2168 extern int timer_create (clockid_t __clock_id,
2169 struct sigevent *__restrict __evp,
2170 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
2173 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
2176 extern int timer_settime (timer_t __timerid, int __flags,
2177 __const struct itimerspec *__restrict __value,
2178 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
2181 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
2182 __attribute__ ((__nothrow__));
2185 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
2186 # 416 "/usr/include/time.h" 3 4
2188 # 43 "./src/time_.h" 2
2189 # 78 "./src/time_.h"
2190 # 1 "/usr/include/sys/times.h" 1 3 4
2191 # 32 "/usr/include/sys/times.h" 3 4
2209 extern clock_t times (struct tms *__buffer) __attribute__ ((__nothrow__));
2212 # 79 "./src/time_.h" 2
2213 # 19 "./src/gdevpdfe.c" 2
2214 # 1 "./src/stream.h" 1
2215 # 21 "./src/stream.h"
2216 # 1 "./src/scommon.h" 1
2217 # 22 "./src/scommon.h"
2218 # 1 "./src/gsstype.h" 1
2219 # 21 "./src/gsstype.h"
2220 typedef struct gc_state_s gc_state_t;
2226 typedef struct enum_ptr_s {
2230 # 79 "./src/gsstype.h"
2231 typedef struct struct_shared_procs_s struct_shared_procs_t;
2233 struct gs_memory_struct_type_s {
2235 struct_name_t sname;
2240 const struct_shared_procs_t *shared;
2244 void (*clear_marks)(const gs_memory_t *cmem, void *pre, uint size, const gs_memory_struct_type_t *pstype);
2245 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);
2246 void (*reloc_ptrs)(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
2247 void (*finalize)(void *ptr);
2251 const void *proc_data;
2253 # 23 "./src/scommon.h" 2
2254 # 34 "./src/scommon.h"
2255 typedef struct stream_s stream;
2262 typedef struct stream_state_s stream_state;
2263 # 50 "./src/scommon.h"
2264 typedef struct stream_template_s stream_template;
2265 # 87 "./src/scommon.h"
2266 typedef struct stream_cursor_read_s {
2270 } stream_cursor_read;
2271 typedef struct stream_cursor_write_s {
2275 } stream_cursor_write;
2276 typedef union stream_cursor_s {
2277 stream_cursor_read r;
2278 stream_cursor_write w;
2280 # 134 "./src/scommon.h"
2281 int s_no_report_error(stream_state *, const char *);
2282 # 165 "./src/scommon.h"
2283 struct stream_state_s {
2284 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
2287 extern const gs_memory_struct_type_t st_stream_state;
2288 # 22 "./src/stream.h" 2
2289 # 1 "./src/srdline.h" 1
2290 # 43 "./src/srdline.h"
2291 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 *));
2292 # 23 "./src/stream.h" 2
2293 # 35 "./src/stream.h"
2300 int (*available)(stream *, long *);
2306 int (*seek)(stream *, long);
2312 void (*reset)(stream *);
2318 int (*flush)(stream *);
2324 int (*close)(stream *);
2328 int (*process)(stream_state *, stream_cursor_read *, stream_cursor_write *, bool);
2335 int (*switch_mode)(stream *, bool);
2347 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
2348 # 110 "./src/stream.h"
2349 stream_cursor cursor;
2353 # 127 "./src/stream.h"
2358 # 139 "./src/stream.h"
2359 gs_string cbuf_string;
2373 stream_state *state;
2384 stream *prev, *next;
2387 int (*save_close)(stream *);
2394 gs_const_string file_name;
2404 extern const gs_memory_struct_type_t st_stream;
2405 # 217 "./src/stream.h"
2406 int savailable(stream *, long *);
2410 int sclose(stream *);
2411 int sswitch(stream *, bool);
2416 int spgetcc(stream *, bool);
2417 # 240 "./src/stream.h"
2418 int sgets(stream *, byte *, uint, uint *);
2419 int sungetc(stream *, byte);
2424 int spskip(stream *, long, long *);
2432 int s_process_read_buf(stream *);
2437 int spputc(stream *, byte);
2438 # 268 "./src/stream.h"
2439 int sputs(stream *, const byte *, uint, uint *);
2445 int s_process_write_buf(stream *, bool);
2448 long stell(stream *);
2449 int spseek(stream *, long);
2450 # 327 "./src/stream.h"
2451 stream *s_alloc(gs_memory_t *, client_name_t);
2452 stream_state *s_alloc_state(gs_memory_t *, gs_memory_type_ptr_t, client_name_t);
2457 void s_init(stream *, gs_memory_t *);
2458 void s_init_state(stream_state *, const stream_template *, gs_memory_t *);
2461 void sread_string(stream *, const byte *, uint),
2462 sread_string_reusable(stream *, const byte *, uint),
2463 swrite_string(stream *, byte *, uint);
2464 void sread_file(stream *, FILE *, byte *, uint),
2465 swrite_file(stream *, FILE *, byte *, uint),
2466 sappend_file(stream *, FILE *, byte *, uint);
2469 int sread_subfile(stream *s, long start, long length);
2473 int ssetfilename(stream *, const byte *, uint);
2477 int sfilename(stream *, gs_const_string *);
2481 void swrite_position_only(stream *);
2484 void s_std_init(stream *, byte *, uint, const stream_procs *, int );
2487 void s_disable(stream *);
2490 int s_std_null(stream *);
2491 void s_std_read_reset(stream *), s_std_write_reset(stream *);
2492 int s_std_read_flush(stream *), s_std_write_flush(stream *), s_std_noavailable(stream *, long *),
2493 s_std_noseek(stream *, long), s_std_close(stream *), s_std_switch_mode(stream *, bool);
2496 int s_filter_write_flush(stream *), s_filter_close(stream *);
2499 extern const stream_procs s_filter_read_procs, s_filter_write_procs;
2500 # 385 "./src/stream.h"
2501 int s_init_filter(stream *fs, stream_state *fss, byte *buf, uint bsize,
2503 stream *s_add_filter(stream **ps, const stream_template *template,
2504 stream_state *ss, gs_memory_t *mem);
2510 int s_close_filters(stream **ps, stream *target);
2514 extern const stream_template s_NullE_template;
2515 extern const stream_template s_NullD_template;
2516 # 20 "./src/gdevpdfe.c" 2
2519 # 1 "./src/gpgetenv.h" 1
2520 # 37 "./src/gpgetenv.h"
2521 int gp_getenv(const char *key, char *ptr, int *plen);
2530 void gp_exit(int exit_status, int code);
2536 void gp_do_exit(int exit_status);
2538 const char *gp_strerror(int);
2546 void gp_get_realtime(long ptm[2]);
2552 void gp_get_usertime(long ptm[2]);
2554 int gp_readline_init(void **preadline_data, gs_memory_t *mem);
2559 int gp_readline(stream *s_in, stream *s_out, void *readline_data,
2560 gs_const_string *prompt, gs_string *buf,
2561 gs_memory_t *bufmem, uint *pcount, bool *pin_eol,
2562 bool (*is_stdin)(const stream *));
2567 void gp_readline_finit(void *readline_data);
2569 int gp_stdin_read(char *buf, int len, int interactive, FILE *f);
2571 const char *gp_getenv_display(void);
2573 extern const char gp_file_name_list_separator;
2576 extern const char gp_scratch_file_name_prefix[];
2579 extern const char gp_null_file_name[];
2582 extern const char gp_current_directory_name[];
2587 extern const char gp_fmode_binary_suffix[];
2591 extern const char gp_fmode_rb[];
2592 extern const char gp_fmode_wb[];
2594 FILE *gp_open_scratch_file(const char *prefix,
2599 FILE *gp_fopen(const char *fname, const char *mode);
2603 int gp_setmode_binary(FILE * pfile, bool mode);
2606 gp_combine_small_buffer = -1,
2607 gp_combine_cant_handle = 0,
2608 gp_combine_success = 1
2609 } gp_file_name_combine_result;
2611 gp_file_name_combine_result gp_file_name_combine(const char *prefix, uint plen,
2612 const char *fname, uint flen, bool no_sibling, char *buffer, uint *blen);
2614 uint gp_file_name_root(const char *fname, uint len);
2616 uint gs_file_name_check_separator(const char *fname, int len, const char *item);
2622 bool gp_file_name_is_parent(const char *fname, uint len);
2628 bool gp_file_name_is_current(const char *fname, uint len);
2634 const char *gp_file_name_current(void);
2640 const char *gp_file_name_separator(void);
2646 const char *gp_file_name_directory_separator(void);
2652 const char *gp_file_name_parent(void);
2657 bool gp_file_name_is_partent_allowed(void);
2663 bool gp_file_name_is_empty_item_meanful(void);
2669 int gp_read_macresource(byte *buf, const char *fname,
2670 const uint type, const ushort id);
2672 int gp_cache_insert(int type, byte *key, int keylen, void *buffer, int buflen);
2675 typedef void *(*gp_cache_alloc)(void *userdata, int bytes);
2676 int gp_cache_query(int type, byte* key, int keylen, void **buffer,
2677 gp_cache_alloc alloc, void *userdata);
2679 FILE *gp_open_printer(char fname[260], int binary_mode);
2681 void gp_close_printer(FILE * pfile, const char *fname);
2687 typedef struct file_enum_s file_enum;
2689 file_enum *gp_enumerate_files_init(const char *pat, uint patlen,
2690 gs_memory_t * memory);
2692 uint gp_enumerate_files_next(file_enum * pfen, char *ptr, uint maxlen);
2700 void gp_enumerate_files_close(file_enum * pfen);
2702 void *gp_enumerate_fonts_init(gs_memory_t *mem);
2704 int gp_enumerate_fonts_next(void *enum_state, char **fontname, char **path);
2707 void gp_enumerate_fonts_free(void *enum_state);
2708 # 21 "./src/gdevpdfe.c" 2
2709 # 1 "./src/smd5.h" 1
2713 typedef unsigned char md5_byte_t;
2714 typedef unsigned int md5_word_t;
2717 typedef struct md5_state_s {
2718 md5_word_t count[2];
2729 void md5_init(md5_state_t *pms);
2732 void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
2735 void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
2736 # 22 "./src/smd5.h" 2
2742 typedef struct stream_MD5E_state_s {
2743 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
2745 } stream_MD5E_state;
2750 extern const stream_template s_MD5E_template;
2752 stream *s_MD5E_make_stream(gs_memory_t *mem, byte *digest, int digest_size);
2759 stream *s_MD5C_make_stream(gs_memory_t *mem, stream *strm);
2761 int s_MD5C_get_digest(stream *s, byte *buf, int buf_length);
2762 # 22 "./src/gdevpdfe.c" 2
2763 # 1 "./src/gscdefs.h" 1
2764 # 20 "./src/gscdefs.h"
2765 # 1 "./obj/../soobj/gconfigv.h" 1
2766 # 21 "./src/gscdefs.h" 2
2767 # 39 "./src/gscdefs.h"
2768 extern const long gs_buildtime;
2769 extern const char *const gs_copyright;
2770 extern const char *const gs_product;
2771 extern const char *const gs_productfamily;
2772 extern const long gs_revision;
2773 extern const long gs_revisiondate;
2774 extern const long gs_serialnumber;
2777 extern const char *const gs_doc_directory;
2778 extern const char *const gs_lib_default_path;
2779 extern const char *const gs_init_file;
2780 # 61 "./src/gscdefs.h"
2781 extern const unsigned gx_image_class_table_count;
2785 extern const unsigned gx_image_type_table_count;
2786 # 74 "./src/gscdefs.h"
2787 extern const unsigned gx_io_device_table_count;
2788 # 23 "./src/gdevpdfe.c" 2
2789 # 1 "./src/gdevpdfx.h" 1
2790 # 20 "./src/gdevpdfx.h"
2791 # 1 "./src/gsparam.h" 1
2792 # 34 "./src/gsparam.h"
2793 typedef struct gs_param_list_s gs_param_list;
2797 typedef const char *gs_param_name;
2798 # 48 "./src/gsparam.h"
2801 gs_param_type_null, gs_param_type_bool, gs_param_type_int,
2802 gs_param_type_long, gs_param_type_float,
2804 gs_param_type_string, gs_param_type_name,
2805 gs_param_type_int_array, gs_param_type_float_array,
2806 gs_param_type_string_array, gs_param_type_name_array,
2808 gs_param_type_dict, gs_param_type_dict_int_keys, gs_param_type_array
2810 # 73 "./src/gsparam.h"
2811 typedef struct gs_param_int_array_s { const int *data; uint size; bool persistent; } gs_param_int_array;
2812 typedef struct gs_param_float_array_s { const float *data; uint size; bool persistent; } gs_param_float_array;
2813 typedef struct gs_param_string_array_s { const gs_param_string *data; uint size; bool persistent; } gs_param_string_array;
2814 # 91 "./src/gsparam.h"
2815 typedef struct gs_param_collection_s {
2816 gs_param_list *list;
2818 } gs_param_collection;
2819 typedef gs_param_collection gs_param_dict;
2820 typedef gs_param_collection gs_param_array;
2821 # 118 "./src/gsparam.h"
2822 extern const byte gs_param_type_sizes[];
2823 extern const byte gs_param_type_base_sizes[];
2824 # 134 "./src/gsparam.h"
2825 typedef union gs_param_value_s {
2826 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;
2833 typedef struct gs_param_typed_value_s {
2834 gs_param_value value;
2836 } gs_param_typed_value;
2843 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);
2844 void gs_param_typed_value_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
2855 gs_param_collection_dict_any = 0,
2861 gs_param_collection_dict_int_keys = 1,
2866 gs_param_collection_array = 2
2868 } gs_param_collection_type_t;
2869 # 193 "./src/gsparam.h"
2870 typedef union gs_param_enumerator_s {
2875 } gs_param_enumerator_t;
2876 typedef gs_param_string gs_param_key_t;
2877 # 254 "./src/gsparam.h"
2878 typedef struct gs_param_list_procs_s {
2879 # 266 "./src/gsparam.h"
2880 int (*xmit_typed)(gs_param_list *, gs_param_name, gs_param_typed_value *);
2881 # 276 "./src/gsparam.h"
2882 int (*begin_xmit_collection)(gs_param_list *, gs_param_name, gs_param_dict *, gs_param_collection_type_t);
2883 # 294 "./src/gsparam.h"
2884 int (*end_xmit_collection)(gs_param_list *, gs_param_name, gs_param_dict *);
2885 # 310 "./src/gsparam.h"
2886 int (*next_key)(gs_param_list *, gs_param_enumerator_t *, gs_param_key_t *);
2887 # 324 "./src/gsparam.h"
2888 int (*request)(gs_param_list *, gs_param_name);
2889 # 339 "./src/gsparam.h"
2890 int (*requested)(const gs_param_list *, gs_param_name);
2891 # 348 "./src/gsparam.h"
2892 int (*get_policy)(gs_param_list *, gs_param_name);
2893 # 360 "./src/gsparam.h"
2894 int (*signal_error)(gs_param_list *, gs_param_name, int);
2895 # 373 "./src/gsparam.h"
2896 int (*commit)(gs_param_list *);
2900 } gs_param_list_procs;
2903 int param_read_requested_typed(gs_param_list *, gs_param_name,
2904 gs_param_typed_value *);
2911 int param_read_null(gs_param_list *, gs_param_name);
2912 int param_write_null(gs_param_list *, gs_param_name);
2913 int param_read_bool(gs_param_list *, gs_param_name, bool *);
2914 int param_write_bool(gs_param_list *, gs_param_name, const bool *);
2915 int param_read_int(gs_param_list *, gs_param_name, int *);
2916 int param_write_int(gs_param_list *, gs_param_name, const int *);
2917 int param_read_long(gs_param_list *, gs_param_name, long *);
2918 int param_write_long(gs_param_list *, gs_param_name, const long *);
2919 int param_read_float(gs_param_list *, gs_param_name, float *);
2920 int param_write_float(gs_param_list *, gs_param_name, const float *);
2921 int param_read_string(gs_param_list *, gs_param_name, gs_param_string *);
2922 int param_write_string(gs_param_list *, gs_param_name,
2923 const gs_param_string *);
2924 int param_read_name(gs_param_list *, gs_param_name, gs_param_string *);
2925 int param_write_name(gs_param_list *, gs_param_name,
2926 const gs_param_string *);
2927 int param_read_int_array(gs_param_list *, gs_param_name,
2928 gs_param_int_array *);
2929 int param_write_int_array(gs_param_list *, gs_param_name,
2930 const gs_param_int_array *);
2931 int param_write_int_values(gs_param_list *, gs_param_name,
2932 const int *, uint, bool);
2933 int param_read_float_array(gs_param_list *, gs_param_name,
2934 gs_param_float_array *);
2935 int param_write_float_array(gs_param_list *, gs_param_name,
2936 const gs_param_float_array *);
2937 int param_write_float_values(gs_param_list *, gs_param_name,
2938 const float *, uint, bool);
2939 int param_read_string_array(gs_param_list *, gs_param_name,
2940 gs_param_string_array *);
2941 int param_write_string_array(gs_param_list *, gs_param_name,
2942 const gs_param_string_array *);
2943 int param_read_name_array(gs_param_list *, gs_param_name,
2944 gs_param_string_array *);
2945 int param_write_name_array(gs_param_list *, gs_param_name,
2946 const gs_param_string_array *);
2947 # 437 "./src/gsparam.h"
2948 struct gs_param_list_s {
2949 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
2955 void gs_param_list_set_persist_keys(gs_param_list *, bool);
2958 void param_init_enumerator(gs_param_enumerator_t * penum);
2965 typedef struct gs_param_item_s {
2976 int gs_param_read_items(gs_param_list * plist, void *obj,
2977 const gs_param_item_t * items);
2978 int gs_param_write_items(gs_param_list * plist, const void *obj,
2979 const void *default_obj,
2980 const gs_param_item_t * items);
2983 void gs_param_list_init(gs_param_list *, const gs_param_list_procs *,
2991 int param_coerce_typed(gs_param_typed_value * pvalue,
2992 gs_param_type req_type, gs_memory_t * mem);
3000 int gs_param_request_default(gs_param_list *, gs_param_name);
3001 int gs_param_requested_default(const gs_param_list *, gs_param_name);
3002 # 518 "./src/gsparam.h"
3003 typedef struct gs_c_param_s gs_c_param;
3004 typedef struct gs_c_param_list_s {
3005 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
3007 gs_param_list *target;
3010 gs_param_collection_type_t coll_type;
3012 # 538 "./src/gsparam.h"
3013 void gs_c_param_list_set_target(gs_c_param_list *, gs_param_list *);
3019 gs_c_param_list *gs_c_param_list_alloc(gs_memory_t *, client_name_t);
3020 void gs_c_param_list_write(gs_c_param_list *, gs_memory_t *);
3021 void gs_c_param_list_write_more(gs_c_param_list *);
3022 void gs_c_param_list_read(gs_c_param_list *);
3023 void gs_c_param_list_release(gs_c_param_list *);
3024 # 21 "./src/gdevpdfx.h" 2
3025 # 1 "./src/gsuid.h" 1
3026 # 24 "./src/gsuid.h"
3027 typedef struct gs_uid_s gs_uid;
3035 # 60 "./src/gsuid.h"
3036 bool uid_equal(const gs_uid *, const gs_uid *);
3039 int uid_copy(gs_uid *puid, gs_memory_t *mem, client_name_t cname);
3040 # 22 "./src/gdevpdfx.h" 2
3041 # 1 "./src/gxdevice.h" 1
3042 # 21 "./src/gxdevice.h"
3043 # 1 "./src/gxdevcli.h" 1
3044 # 21 "./src/gxdevcli.h"
3045 # 1 "./src/stdint_.h" 1
3046 # 41 "./src/stdint_.h"
3047 # 1 "/usr/include/stdint.h" 1 3 4
3048 # 28 "/usr/include/stdint.h" 3 4
3049 # 1 "/usr/include/bits/wordsize.h" 1 3 4
3050 # 29 "/usr/include/stdint.h" 2 3 4
3051 # 49 "/usr/include/stdint.h" 3 4
3052 typedef unsigned char uint8_t;
3053 typedef unsigned short int uint16_t;
3055 typedef unsigned int uint32_t;
3062 typedef unsigned long long int uint64_t;
3069 typedef signed char int_least8_t;
3070 typedef short int int_least16_t;
3071 typedef int int_least32_t;
3076 typedef long long int int_least64_t;
3080 typedef unsigned char uint_least8_t;
3081 typedef unsigned short int uint_least16_t;
3082 typedef unsigned int uint_least32_t;
3087 typedef unsigned long long int uint_least64_t;
3094 typedef signed char int_fast8_t;
3100 typedef int int_fast16_t;
3101 typedef int int_fast32_t;
3103 typedef long long int int_fast64_t;
3107 typedef unsigned char uint_fast8_t;
3113 typedef unsigned int uint_fast16_t;
3114 typedef unsigned int uint_fast32_t;
3116 typedef unsigned long long int uint_fast64_t;
3117 # 126 "/usr/include/stdint.h" 3 4
3118 typedef int intptr_t;
3121 typedef unsigned int uintptr_t;
3122 # 138 "/usr/include/stdint.h" 3 4
3124 typedef long long int intmax_t;
3126 typedef unsigned long long int uintmax_t;
3127 # 42 "./src/stdint_.h" 2
3128 # 22 "./src/gxdevcli.h" 2
3129 # 1 "./src/gscompt.h" 1
3130 # 39 "./src/gscompt.h"
3131 typedef struct gs_composite_s gs_composite_t;
3138 gs_id gs_composite_id(const gs_composite_t * pcte);
3139 # 23 "./src/gxdevcli.h" 2
3140 # 1 "./src/gsdcolor.h" 1
3141 # 20 "./src/gsdcolor.h"
3142 # 1 "./src/gsccolor.h" 1
3143 # 25 "./src/gsccolor.h"
3144 typedef struct gs_pattern_instance_s gs_pattern_instance_t;
3145 # 37 "./src/gsccolor.h"
3146 typedef struct gs_paint_color_s {
3147 float values[(8 * 8)];
3153 typedef struct gs_client_color_s gs_client_color;
3156 struct gs_client_color_s {
3157 gs_paint_color paint;
3158 gs_pattern_instance_t *pattern;
3161 extern const gs_memory_struct_type_t st_client_color;
3162 # 21 "./src/gsdcolor.h" 2
3163 # 1 "./src/gxarith.h" 1
3164 # 25 "./src/gxarith.h"
3165 int imod(int m, int n);
3168 int igcd(int x, int y);
3174 int idivmod(int a, int b, int m);
3180 # 22 "./src/gsdcolor.h" 2
3181 # 1 "./src/gxbitmap.h" 1
3182 # 21 "./src/gxbitmap.h"
3183 # 1 "./src/gsbitmap.h" 1
3184 # 52 "./src/gsbitmap.h"
3185 typedef gs_id gs_bitmap_id;
3186 # 73 "./src/gsbitmap.h"
3187 typedef struct gs_bitmap_s {
3188 byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3190 typedef struct gs_const_bitmap_s {
3191 const byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3193 # 94 "./src/gsbitmap.h"
3194 typedef struct gs_tile_bitmap_s {
3195 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3197 typedef struct gs_const_tile_bitmap_s {
3198 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3199 } gs_const_tile_bitmap;
3200 # 122 "./src/gsbitmap.h"
3201 typedef struct gs_depth_bitmap_s {
3202 byte * data; int raster; gs_int_point size; gs_bitmap_id id; byte pix_depth; byte num_comps;
3204 typedef struct gs_const_depth_bitmap_s {
3205 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; byte pix_depth; byte num_comps;
3206 } gs_const_depth_bitmap;
3213 typedef struct gs_tile_depth_bitmap_s {
3214 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; byte pix_depth; byte num_comps;
3215 } gs_tile_depth_bitmap;
3216 typedef struct gs_const_tile_depth_bitmap_s {
3217 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; byte pix_depth; byte num_comps;
3218 } gs_const_tile_depth_bitmap;
3219 # 153 "./src/gsbitmap.h"
3220 extern const gs_memory_struct_type_t st_gs_bitmap;
3221 extern const gs_memory_struct_type_t st_gs_tile_bitmap;
3222 extern const gs_memory_struct_type_t st_gs_depth_bitmap;
3223 extern const gs_memory_struct_type_t st_gs_tile_depth_bitmap;
3224 # 22 "./src/gxbitmap.h" 2
3227 typedef gs_bitmap_id gx_bitmap_id;
3228 # 74 "./src/gxbitmap.h"
3229 typedef struct gx_bitmap_s {
3230 byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3232 typedef struct gx_const_bitmap_s {
3233 const byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3242 typedef struct gx_tile_bitmap_s {
3243 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3245 typedef struct gx_const_tile_bitmap_s {
3246 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3247 } gx_const_tile_bitmap;
3248 # 135 "./src/gxbitmap.h"
3249 typedef struct gx_strip_bitmap_s {
3250 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; ushort rep_shift; ushort shift;
3252 typedef struct gx_const_strip_bitmap_s {
3253 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; ushort rep_shift; ushort shift;
3254 } gx_const_strip_bitmap;
3256 extern const gs_memory_struct_type_t st_gx_strip_bitmap;
3257 # 23 "./src/gsdcolor.h" 2
3258 # 1 "./src/gxhttile.h" 1
3259 # 30 "./src/gxhttile.h"
3260 typedef struct gx_ht_tile_s gx_ht_tile;
3264 struct gx_ht_tile_s {
3265 gx_strip_bitmap tiles;
3272 # 24 "./src/gsdcolor.h" 2
3273 # 1 "./src/gxcindex.h" 1
3274 # 20 "./src/gxcindex.h"
3275 # 1 "./src/gsbitops.h" 1
3276 # 270 "./src/gsbitops.h"
3277 void bits_fill_rectangle(byte * dest, int dest_bit, uint raster,
3278 uint pattern, int width_bits, int height);
3279 void bits_fill_rectangle_masked(byte * dest, int dest_bit, uint raster,
3280 uint pattern, uint src_mask,
3281 int width_bits, int height);
3284 void bits_replicate_horizontally(byte * data, uint width, uint height,
3285 uint raster, uint replicated_width, uint replicated_raster);
3288 void bits_replicate_vertically(byte * data, uint height, uint raster,
3289 uint replicated_height);
3292 void bits_bounding_box(const byte * data, uint height, uint raster,
3293 gs_int_rect * pbox);
3298 void bits_compress_scaled(const byte * src, int srcx, uint width,
3299 uint height, uint sraster, byte * dest, uint draster,
3300 const gs_log2_scale_point * plog2_scale, int log2_out_bits);
3303 typedef struct bits_plane_s {
3312 int bits_extract_plane(const bits_plane_t *dest ,
3313 const bits_plane_t *source , int shift, int width, int height);
3316 int bits_expand_plane(const bits_plane_t *dest ,
3317 const bits_plane_t *source , int shift, int width, int height);
3320 void bytes_fill_rectangle(byte * dest, uint raster,
3321 byte value, int width_bytes, int height);
3324 void bytes_copy_rectangle(byte * dest, uint dest_raster,
3325 const byte * src, uint src_raster, int width_bytes, int height);
3326 # 21 "./src/gxcindex.h" 2
3327 # 55 "./src/gxcindex.h"
3328 typedef unsigned long long gx_color_index_data;
3329 # 79 "./src/gxcindex.h"
3330 typedef gx_color_index_data gx_color_index;
3331 # 25 "./src/gsdcolor.h" 2
3332 # 1 "./src/gxwts.h" 1
3333 # 17 "./src/gxwts.h"
3334 typedef bits16 wts_screen_sample_t;
3338 typedef struct wts_screen_s wts_screen_t;
3347 struct wts_screen_s {
3348 wts_screen_type type;
3352 wts_screen_sample_t *samples;
3388 int wts_get_samples(const wts_screen_t *ws, int x, int y,
3389 wts_screen_sample_t **samples, int *p_nsamples);
3390 # 26 "./src/gsdcolor.h" 2
3394 typedef struct gx_device_color_s gx_device_color;
3399 typedef struct gx_device_color_saved_s gx_device_color_saved;
3404 typedef struct gx_device_halftone_s gx_device_halftone;
3405 # 87 "./src/gsdcolor.h"
3406 bool gx_device_color_equal(const gx_device_color *pdevc1,
3407 const gx_device_color *pdevc2);
3408 # 157 "./src/gsdcolor.h"
3409 void gx_complete_halftone(gx_device_color *pdevc, int num_comps,
3410 gx_device_halftone *pdht);
3411 # 183 "./src/gsdcolor.h"
3412 typedef struct gx_color_tile_s gx_color_tile;
3413 # 253 "./src/gsdcolor.h"
3414 typedef struct gx_device_color_type_s gx_device_color_type_t;
3415 typedef const gx_device_color_type_t *gx_device_color_type;
3417 struct gx_device_color_s {
3422 gx_device_color_type type;
3430 gx_color_index pure;
3432 const gx_device_halftone *b_ht;
3433 gx_color_index color[2];
3439 gx_device_halftone *c_ht;
3440 ushort num_components;
3441 byte c_base[(8 * 8)];
3442 uint c_level[(8 * 8)];
3450 gx_color_index plane_mask;
3455 const gx_device_halftone *w_ht;
3456 wts_screen_sample_t levels[(8 * 8)];
3457 ushort num_components;
3460 gx_color_index plane_vector[(8 * 8)];
3463 gx_color_tile *p_tile;
3481 gs_client_color ccolor;
3488 gx_color_tile *m_tile;
3491 # 374 "./src/gsdcolor.h"
3492 struct gx_device_color_saved_s {
3493 gx_device_color_type type;
3495 gx_color_index pure;
3497 gx_color_index b_color[2];
3502 byte c_base[(8 * 8)];
3503 uint c_level[(8 * 8)];
3507 wts_screen_sample_t levels[(8 * 8)];
3520 # 414 "./src/gsdcolor.h"
3521 extern const gx_device_color_type_t *const gx_dc_type_none;
3524 extern const gx_device_color_type_t *const gx_dc_type_null;
3527 extern const gx_device_color_type_t *const gx_dc_type_pure;
3528 # 430 "./src/gsdcolor.h"
3529 extern const gx_device_color_type_t *const gx_dc_type_ht_binary;
3532 extern const gx_device_color_type_t *const gx_dc_type_ht_colored;
3535 extern const gx_device_color_type_t *const gx_dc_type_wts;
3536 # 24 "./src/gxdevcli.h" 2
3537 # 1 "./src/gsmatrix.h" 1
3538 # 26 "./src/gsmatrix.h"
3539 struct gs_matrix_s {
3540 float xx, xy, yx, yy, tx, ty;
3545 typedef struct gs_matrix_s gs_matrix;
3546 # 50 "./src/gsmatrix.h"
3547 void gs_make_identity(gs_matrix *);
3548 int gs_make_translation(floatp, floatp, gs_matrix *),
3549 gs_make_scaling(floatp, floatp, gs_matrix *),
3550 gs_make_rotation(floatp, gs_matrix *);
3553 int gs_matrix_multiply(const gs_matrix *, const gs_matrix *, gs_matrix *),
3554 gs_matrix_invert(const gs_matrix *, gs_matrix *),
3555 gs_matrix_translate(const gs_matrix *, floatp, floatp, gs_matrix *),
3556 gs_matrix_scale(const gs_matrix *, floatp, floatp, gs_matrix *),
3557 gs_matrix_rotate(const gs_matrix *, floatp, gs_matrix *);
3560 int gs_point_transform(floatp, floatp, const gs_matrix *, gs_point *),
3561 gs_point_transform_inverse(floatp, floatp, const gs_matrix *, gs_point *),
3562 gs_distance_transform(floatp, floatp, const gs_matrix *, gs_point *),
3563 gs_distance_transform_inverse(floatp, floatp, const gs_matrix *, gs_point *),
3564 gs_points_bbox(const gs_point[4], gs_rect *),
3565 gs_bbox_transform_only(const gs_rect *, const gs_matrix *, gs_point[4]),
3566 gs_bbox_transform(const gs_rect *, const gs_matrix *, gs_rect *),
3567 gs_bbox_transform_inverse(const gs_rect *, const gs_matrix *, gs_rect *);
3574 int sget_matrix(stream *, gs_matrix *);
3575 int sput_matrix(stream *, const gs_matrix *);
3576 # 25 "./src/gxdevcli.h" 2
3577 # 1 "./src/gsiparam.h" 1
3578 # 43 "./src/gsiparam.h"
3579 typedef struct gx_image_type_s gx_image_type_t;
3580 # 52 "./src/gsiparam.h"
3581 typedef struct gs_image_common_s {
3582 const gx_image_type_t *type; gs_matrix ImageMatrix;
3583 } gs_image_common_t;
3584 # 120 "./src/gsiparam.h"
3585 typedef struct gs_data_image_s {
3586 const gx_image_type_t *type; gs_matrix ImageMatrix; int Width; int Height; int BitsPerComponent; float Decode[((8 * 8) + 1) * 2]; bool Interpolate;
3588 # 143 "./src/gsiparam.h"
3591 gs_image_format_chunky = 0,
3593 gs_image_format_component_planar = 1,
3595 gs_image_format_bit_planar = 2
3596 } gs_image_format_t;
3601 typedef struct gs_color_space_s gs_color_space;
3602 # 175 "./src/gsiparam.h"
3603 typedef struct gs_pixel_image_s {
3604 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;
3607 extern const gs_memory_struct_type_t st_gs_pixel_image;
3608 # 189 "./src/gsiparam.h"
3611 gs_image_alpha_none = 0,
3613 gs_image_alpha_first,
3618 typedef struct gs_image1_s {
3619 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;
3635 gs_image_alpha_t Alpha;
3639 extern const gs_memory_struct_type_t st_gs_image1;
3647 typedef gs_image1_t gs_image_t;
3648 # 236 "./src/gsiparam.h"
3653 gs_image_common_t_init(gs_image_common_t * pic),
3661 gs_data_image_t_init(gs_data_image_t * pim, int num_components),
3668 gs_pixel_image_t_init(gs_pixel_image_t * pim,
3669 const gs_color_space * color_space);
3670 # 270 "./src/gsiparam.h"
3671 void gs_image_t_init_adjust(gs_image_t * pim, const gs_color_space * pcs,
3675 void gs_image_t_init_mask_adjust(gs_image_t * pim, bool write_1s,
3677 # 26 "./src/gxdevcli.h" 2
3678 # 1 "./src/gsrefct.h" 1
3679 # 34 "./src/gsrefct.h"
3680 typedef struct rc_header_s rc_header;
3681 struct rc_header_s {
3683 gs_memory_t *memory;
3686 void (*free)(gs_memory_t *, void *, client_name_t);
3688 # 56 "./src/gsrefct.h"
3689 void rc_free_struct_only(gs_memory_t *, void *, client_name_t);
3690 # 27 "./src/gxdevcli.h" 2
3691 # 1 "./src/gsropt.h" 1
3692 # 41 "./src/gsropt.h"
3702 rop2_default = rop2_S
3704 # 60 "./src/gsropt.h"
3714 rop3_default = rop3_T | rop3_S
3716 # 159 "./src/gsropt.h"
3717 typedef uint gs_logical_operation_t;
3718 # 198 "./src/gsropt.h"
3719 typedef unsigned long rop_operand;
3720 typedef rop_operand (*rop_proc)(rop_operand D, rop_operand S, rop_operand T);
3735 extern const rop_proc rop_proc_table[256];
3738 extern const byte rop_usage_table[256];
3739 # 28 "./src/gxdevcli.h" 2
3740 # 1 "./src/gsstruct.h" 1
3741 # 83 "./src/gsstruct.h"
3742 typedef struct obj_header_s obj_header_t;
3750 struct gs_ptr_procs_s {
3756 void (*unmark)(enum_ptr_t *, gc_state_t *);
3763 bool (*mark)(enum_ptr_t *, gc_state_t *);
3764 # 114 "./src/gsstruct.h"
3765 void *(*reloc)(const void *, gc_state_t *);
3771 extern const gs_ptr_procs_t ptr_struct_procs;
3775 extern const gs_ptr_procs_t ptr_string_procs;
3777 extern const gs_ptr_procs_t ptr_const_string_procs;
3784 struct gs_gc_root_s {
3786 gs_ptr_type_t ptype;
3788 bool free_on_unregister;
3790 # 174 "./src/gsstruct.h"
3791 typedef struct gc_procs_common_s {
3792 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 *);
3793 } gc_procs_common_t;
3801 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);
3802 void gs_no_struct_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
3808 extern const gs_memory_struct_type_t st_free;
3812 extern const gs_memory_struct_type_t st_bytes;
3816 extern const gs_memory_struct_type_t st_gc_root_t;
3817 # 210 "./src/gsstruct.h"
3818 extern const gs_memory_struct_type_t st_const_string_element;
3819 # 231 "./src/gsstruct.h"
3824 } gc_ptr_type_index_t;
3826 typedef struct gc_ptr_element_s {
3830 # 255 "./src/gsstruct.h"
3831 typedef struct gc_struct_data_s {
3833 ushort super_offset;
3834 const gs_memory_struct_type_t *super_type;
3835 const gc_ptr_element_t *ptrs;
3837 # 278 "./src/gsstruct.h"
3838 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);
3839 void basic_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
3840 # 360 "./src/gsstruct.h"
3841 extern gs_ptr_type_t
3842 enum_bytestring(enum_ptr_t *pep, const gs_bytestring *pbs);
3845 extern gs_ptr_type_t
3846 enum_const_bytestring(enum_ptr_t *pep, const gs_const_bytestring *pbs);
3847 # 418 "./src/gsstruct.h"
3848 extern void reloc_bytestring(gs_bytestring *pbs, gc_state_t *gcst);
3851 extern void reloc_const_bytestring(gs_const_bytestring *pbs, gc_state_t *gcst);
3852 # 29 "./src/gxdevcli.h" 2
3853 # 1 "./src/gstparam.h" 1
3854 # 24 "./src/gstparam.h"
3856 BLEND_MODE_Compatible,
3858 BLEND_MODE_Multiply,
3860 BLEND_MODE_Difference,
3863 BLEND_MODE_ColorDodge,
3864 BLEND_MODE_ColorBurn,
3865 BLEND_MODE_Exclusion,
3866 BLEND_MODE_HardLight,
3868 BLEND_MODE_SoftLight,
3869 BLEND_MODE_Luminosity,
3871 BLEND_MODE_Saturation,
3883 TRANSPARENCY_STATE_Group = 1,
3884 TRANSPARENCY_STATE_Mask
3885 } gs_transparency_state_type_t;
3889 typedef struct gs_transparency_state_s gs_transparency_state_t;
3890 struct gs_transparency_state_s {
3891 gs_transparency_state_t *saved; gs_transparency_state_type_t type;
3897 typedef struct gs_transparency_mask_s {
3899 } gs_transparency_mask_t;
3907 typedef struct gs_function_s gs_function_t;
3912 typedef struct gs_transparency_group_params_s {
3913 const gs_color_space *ColorSpace;
3916 } gs_transparency_group_params_t;
3920 TRANSPARENCY_MASK_Alpha,
3921 TRANSPARENCY_MASK_Luminosity
3922 } gs_transparency_mask_subtype_t;
3929 typedef struct gs_transparency_mask_params_s {
3930 gs_transparency_mask_subtype_t subtype;
3931 int Background_components;
3932 float Background[(8 * 8)];
3933 float GrayBackground;
3934 int (*TransferFunction)(floatp in, float *out, void *proc_data);
3935 gs_function_t *TransferFunction_data;
3936 } gs_transparency_mask_params_t;
3941 typedef struct gx_transparency_mask_params_s {
3942 gs_transparency_mask_subtype_t subtype;
3943 int Background_components;
3944 float Background[(8 * 8)];
3945 float GrayBackground;
3946 bool function_is_identity;
3947 byte transfer_fn[256];
3948 } gx_transparency_mask_params_t;
3952 TRANSPARENCY_CHANNEL_Opacity = 0,
3953 TRANSPARENCY_CHANNEL_Shape = 1
3954 } gs_transparency_channel_selector_t;
3955 # 30 "./src/gxdevcli.h" 2
3956 # 1 "./src/gsxfont.h" 1
3957 # 22 "./src/gsxfont.h"
3958 typedef ulong gx_xglyph;
3963 struct gx_xfont_procs_s;
3964 typedef struct gx_xfont_procs_s gx_xfont_procs;
3968 typedef struct gx_xfont_s gx_xfont;
3969 # 31 "./src/gxdevcli.h" 2
3972 # 1 "./src/gxcvalue.h" 1
3973 # 21 "./src/gxcvalue.h"
3974 typedef unsigned short gx_color_value;
3975 # 34 "./src/gxdevcli.h" 2
3976 # 1 "./src/gxfixed.h" 1
3977 # 25 "./src/gxfixed.h"
3979 typedef ulong ufixed;
3980 # 159 "./src/gxfixed.h"
3981 fixed fixed_mult_quo(fixed A, fixed B, fixed C);
3982 # 263 "./src/gxfixed.h"
3983 typedef struct gs_fixed_point_s {
3988 typedef struct gs_fixed_rect_s {
3989 gs_fixed_point p, q;
3991 # 35 "./src/gxdevcli.h" 2
3992 # 1 "./src/gxtext.h" 1
3993 # 20 "./src/gxtext.h"
3994 # 1 "./src/gstext.h" 1
3995 # 20 "./src/gstext.h"
3996 # 1 "./src/gsccode.h" 1
3997 # 25 "./src/gsccode.h"
3998 typedef ulong gs_char;
3999 # 72 "./src/gsccode.h"
4000 typedef ulong gs_glyph;
4001 # 90 "./src/gsccode.h"
4002 typedef bool (*gs_glyph_mark_proc_t)(const gs_memory_t *mem, gs_glyph glyph, void *proc_data);
4006 ENCODING_INDEX_UNKNOWN = -1,
4008 ENCODING_INDEX_STANDARD = 0,
4009 ENCODING_INDEX_ISOLATIN1,
4010 ENCODING_INDEX_SYMBOL,
4011 ENCODING_INDEX_DINGBATS,
4012 ENCODING_INDEX_WINANSI,
4013 ENCODING_INDEX_MACROMAN,
4014 ENCODING_INDEX_MACEXPERT,
4017 ENCODING_INDEX_MACGLYPH,
4018 ENCODING_INDEX_ALOGLYPH,
4019 ENCODING_INDEX_ALXGLYPH,
4020 ENCODING_INDEX_CFFSTRINGS
4022 } gs_encoding_index_t;
4023 # 123 "./src/gsccode.h"
4024 typedef enum gs_glyph_space_s {
4035 typedef int (*gs_glyph_name_proc_t)(const gs_memory_t *mem,
4036 gs_glyph glyph, gs_const_string *pstr,
4038 # 21 "./src/gstext.h" 2
4039 # 1 "./src/gscpm.h" 1
4040 # 20 "./src/gscpm.h"
4046 cpm_false_charboxpath,
4047 cpm_true_charboxpath
4048 } gs_char_path_mode;
4051 CACHE_DEVICE_NONE = 0,
4052 CACHE_DEVICE_NOT_CACHING,
4053 CACHE_DEVICE_NONE_AND_CLIP,
4054 CACHE_DEVICE_CACHING
4055 } gs_in_cache_device_t;
4056 # 22 "./src/gstext.h" 2
4057 # 95 "./src/gstext.h"
4058 typedef struct gs_text_params_s {
4063 const gs_char *chars;
4064 const gs_glyph *glyphs;
4072 gs_point delta_space;
4079 const float *x_widths;
4080 const float *y_widths;
4083 # 128 "./src/gstext.h"
4084 int gs_text_replaced_width(const gs_text_params_t *text, uint index,
4093 typedef struct gs_text_enum_s gs_text_enum_t;
4099 typedef struct gx_device_s gx_device;
4100 # 155 "./src/gstext.h"
4101 typedef struct gs_font_s gs_font;
4105 typedef struct gx_path_s gx_path;
4109 typedef struct gx_clip_path_s gx_clip_path;
4110 # 187 "./src/gstext.h"
4111 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);
4118 int gs_text_begin(gs_state * pgs, const gs_text_params_t * text,
4119 gs_memory_t * mem, gs_text_enum_t ** ppenum);
4125 int gs_text_update_dev_color(gs_state * pgs, gs_text_enum_t * pte);
4130 gs_show_begin(gs_state *, const byte *, uint,
4131 gs_memory_t *, gs_text_enum_t **),
4132 gs_ashow_begin(gs_state *, floatp, floatp, const byte *, uint,
4133 gs_memory_t *, gs_text_enum_t **),
4134 gs_widthshow_begin(gs_state *, floatp, floatp, gs_char,
4136 gs_memory_t *, gs_text_enum_t **),
4137 gs_awidthshow_begin(gs_state *, floatp, floatp, gs_char,
4138 floatp, floatp, const byte *, uint,
4139 gs_memory_t *, gs_text_enum_t **),
4140 gs_kshow_begin(gs_state *, const byte *, uint,
4141 gs_memory_t *, gs_text_enum_t **),
4142 gs_xyshow_begin(gs_state *, const byte *, uint,
4143 const float *, const float *, uint,
4144 gs_memory_t *, gs_text_enum_t **),
4145 gs_glyphshow_begin(gs_state *, gs_glyph,
4146 gs_memory_t *, gs_text_enum_t **),
4147 gs_cshow_begin(gs_state *, const byte *, uint,
4148 gs_memory_t *, gs_text_enum_t **),
4149 gs_stringwidth_begin(gs_state *, const byte *, uint,
4150 gs_memory_t *, gs_text_enum_t **),
4151 gs_charpath_begin(gs_state *, const byte *, uint, bool,
4152 gs_memory_t *, gs_text_enum_t **),
4153 gs_glyphpath_begin(gs_state *, gs_glyph, bool,
4154 gs_memory_t *, gs_text_enum_t **),
4155 gs_glyphwidth_begin(gs_state *, gs_glyph,
4156 gs_memory_t *, gs_text_enum_t **),
4157 gs_charboxpath_begin(gs_state *, const byte *, uint, bool,
4158 gs_memory_t *, gs_text_enum_t **);
4163 int gs_text_restart(gs_text_enum_t *pte, const gs_text_params_t *text);
4168 int gs_text_resync(gs_text_enum_t *pte, const gs_text_enum_t *pfrom);
4169 # 276 "./src/gstext.h"
4170 int gs_text_process(gs_text_enum_t *pte);
4173 gs_font *gs_text_current_font(const gs_text_enum_t *pte);
4174 gs_char gs_text_current_char(const gs_text_enum_t *pte);
4175 gs_char gs_text_next_char(const gs_text_enum_t *pte);
4176 gs_glyph gs_text_current_glyph(const gs_text_enum_t *pte);
4177 int gs_text_total_width(const gs_text_enum_t *pte, gs_point *pwidth);
4184 bool gs_text_is_width_only(const gs_text_enum_t *pte);
4189 int gs_text_current_width(const gs_text_enum_t *pte, gs_point *pwidth);
4196 TEXT_SET_CHAR_WIDTH,
4197 TEXT_SET_CACHE_DEVICE,
4198 TEXT_SET_CACHE_DEVICE2
4199 } gs_text_cache_control_t;
4201 gs_text_set_cache(gs_text_enum_t *pte, const double *values,
4202 gs_text_cache_control_t control),
4203 gs_text_setcharwidth(gs_text_enum_t *pte, const double wxy[2]),
4204 gs_text_setcachedevice(gs_text_enum_t *pte, const double wbox[6]),
4205 gs_text_setcachedevice2(gs_text_enum_t *pte, const double wbox2[10]);
4208 int gs_text_retry(gs_text_enum_t *pte);
4211 void gs_text_release(gs_text_enum_t *pte, client_name_t cname);
4212 # 21 "./src/gxtext.h" 2
4216 typedef struct gs_text_enum_procs_s gs_text_enum_procs_t;
4220 typedef struct cached_fm_pair_s cached_fm_pair;
4226 typedef struct gs_text_returned_s {
4227 gs_char current_char;
4228 gs_glyph current_glyph;
4229 gs_point total_width;
4230 } gs_text_returned_t;
4231 # 54 "./src/gxtext.h"
4232 typedef struct gx_font_stack_item_s {
4235 } gx_font_stack_item_t;
4236 typedef struct gx_font_stack_s {
4238 gx_font_stack_item_t items[1 + 5];
4240 # 74 "./src/gxtext.h"
4241 void rc_free_text_enum(gs_memory_t *, void *, client_name_t);
4242 # 111 "./src/gxtext.h"
4243 struct gs_text_enum_s {
4244 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;
4246 # 163 "./src/gxtext.h"
4247 int gs_text_enum_init(gs_text_enum_t *pte,
4248 const gs_text_enum_procs_t *procs,
4249 gx_device *dev, gs_imager_state *pis,
4250 const gs_text_params_t *text,
4251 gs_font *font, gx_path *path,
4252 const gx_device_color *pdcolor,
4253 const gx_clip_path *pcpath,
4262 void gs_text_enum_copy_dynamic(gs_text_enum_t *pto,
4263 const gs_text_enum_t *pfrom,
4265 # 211 "./src/gxtext.h"
4266 struct gs_text_enum_procs_s {
4267 # 224 "./src/gxtext.h"
4268 int (*resync)(gs_text_enum_t *pte, const gs_text_enum_t *pfrom);
4269 # 254 "./src/gxtext.h"
4270 int (*process)(gs_text_enum_t *pte);
4271 # 265 "./src/gxtext.h"
4272 bool (*is_width_only)(const gs_text_enum_t *pte);
4273 # 274 "./src/gxtext.h"
4274 int (*current_width)(const gs_text_enum_t *pte, gs_point *pwidth);
4275 # 285 "./src/gxtext.h"
4276 int (*set_cache)(gs_text_enum_t *pte, const double *values, gs_text_cache_control_t control);
4277 # 295 "./src/gxtext.h"
4278 int (*retry)(gs_text_enum_t *pte);
4279 # 306 "./src/gxtext.h"
4280 void (*release)(gs_text_enum_t *pte, client_name_t cname);
4285 void gx_default_text_release(gs_text_enum_t *pte, client_name_t cname);
4286 # 36 "./src/gxdevcli.h" 2
4287 # 1 "./src/gxcmap.h" 1
4288 # 21 "./src/gxcmap.h"
4289 # 1 "./src/gscsel.h" 1
4290 # 25 "./src/gscsel.h"
4292 gs_color_select_all = -1,
4293 gs_color_select_texture = 0,
4294 gs_color_select_source = 1
4295 } gs_color_select_t;
4296 # 22 "./src/gxcmap.h" 2
4297 # 1 "./src/gxfmap.h" 1
4298 # 22 "./src/gxfmap.h"
4299 # 1 "./src/gxfrac.h" 1
4300 # 25 "./src/gxfrac.h"
4302 typedef short signed_frac;
4303 # 23 "./src/gxfmap.h" 2
4304 # 1 "./src/gxtmap.h" 1
4305 # 27 "./src/gxtmap.h"
4306 typedef struct gx_transfer_map_s gx_transfer_map;
4312 typedef float (*gs_mapping_proc) (floatp, const gx_transfer_map *);
4318 typedef float (*gs_mapping_closure_proc_t) (floatp value,
4319 const gx_transfer_map * pmap,
4320 const void *proc_data);
4321 typedef struct gs_mapping_closure_s {
4322 gs_mapping_closure_proc_t proc;
4324 } gs_mapping_closure_t;
4325 # 24 "./src/gxfmap.h" 2
4326 # 39 "./src/gxfmap.h"
4327 struct gx_transfer_map_s {
4329 gs_mapping_proc proc;
4330 gs_mapping_closure_t closure;
4333 frac values[(1 << 8)];
4336 extern const gs_memory_struct_type_t st_transfer_map;
4342 void gx_set_identity_transfer(gx_transfer_map *);
4343 # 63 "./src/gxfmap.h"
4344 frac gx_color_frac_map(frac, const frac *);
4345 # 97 "./src/gxfmap.h"
4346 float gs_mapped_transfer(floatp, const gx_transfer_map *);
4351 float gs_identity_transfer(floatp, const gx_transfer_map *);
4352 # 23 "./src/gxcmap.h" 2
4353 # 85 "./src/gxcmap.h"
4354 struct gx_cm_color_map_procs_s {
4355 void (*map_gray) (gx_device * dev, frac gray, frac * out);
4356 void (*map_rgb) (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out);
4357 void (*map_cmyk) (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4360 typedef struct gx_cm_color_map_procs_s gx_cm_color_map_procs;
4365 void gray_cs_to_gray_cm (gx_device * dev, frac gray, frac * out);
4366 void rgb_cs_to_rgb_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out);
4367 void cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4368 # 112 "./src/gxcmap.h"
4369 struct gx_color_map_procs_s {
4370 void (*map_gray)(frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4371 void (*map_rgb)(frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4372 void (*map_cmyk)(frac, frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4373 void (*map_rgb_alpha)(frac, frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4374 void (*map_separation)(frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4375 void (*map_devicen)(const frac *, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4376 bool (*is_halftoned)(const gs_imager_state *, gx_device *);
4378 typedef struct gx_color_map_procs_s gx_color_map_procs;
4385 const gx_color_map_procs *
4386 gx_get_cmap_procs(const gs_imager_state *, const gx_device *);
4387 const gx_color_map_procs *
4388 gx_default_get_cmap_procs(const gs_imager_state *, const gx_device *);
4395 void gx_set_cmap_procs(gs_imager_state *, const gx_device *);
4396 # 163 "./src/gxcmap.h"
4397 extern void gx_default_gray_cs_to_gray_cm (gx_device * dev, frac gray, frac * out);
4398 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);
4399 extern void gx_default_cmyk_cs_to_gray_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4401 extern void gx_default_gray_cs_to_rgb_cm (gx_device * dev, frac gray, frac * out);
4402 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);
4403 extern void gx_default_cmyk_cs_to_rgb_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4405 extern void gx_default_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out);
4406 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);
4407 extern void gx_default_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4409 extern void gx_default_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out);
4410 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);
4411 extern void gx_default_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4413 extern void gx_error_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out);
4414 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);
4415 extern void gx_error_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4416 # 238 "./src/gxcmap.h"
4417 int (gx_error_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4418 int (gx_default_DevGray_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4419 int (gx_default_DevRGB_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4420 int (gx_default_DevCMYK_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4421 int (gx_default_DevRGBK_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4427 const gx_cm_color_map_procs * (gx_error_get_color_mapping_procs)(const gx_device * dev);
4428 const gx_cm_color_map_procs * (gx_default_DevGray_get_color_mapping_procs)(const gx_device * dev);
4429 const gx_cm_color_map_procs * (gx_default_DevRGB_get_color_mapping_procs)(const gx_device * dev);
4430 const gx_cm_color_map_procs * (gx_default_DevCMYK_get_color_mapping_procs)(const gx_device * dev);
4431 const gx_cm_color_map_procs * (gx_default_DevRGBK_get_color_mapping_procs)(const gx_device * dev);
4437 gx_color_index (gx_error_encode_color)(gx_device * dev, const gx_color_value colors[]);
4438 gx_color_index (gx_default_encode_color)(gx_device * dev, const gx_color_value colors[]);
4444 gx_color_index (gx_default_gray_fast_encode)(gx_device * dev, const gx_color_value colors[]);
4445 gx_color_index (gx_default_gray_encode)(gx_device * dev, const gx_color_value colors[]);
4452 gx_color_index (gx_backwards_compatible_gray_encode)(gx_device * dev, const gx_color_value colors[]);
4458 int (gx_error_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
4459 int (gx_default_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
4460 # 37 "./src/gxdevcli.h" 2
4461 # 1 "./src/gsnamecl.h" 1
4462 # 38 "./src/gsnamecl.h"
4463 typedef struct named_color_params_s {
4468 bool use_named_color_callback;
4469 # 52 "./src/gsnamecl.h"
4470 int color_index[(8 * 8)];
4471 } named_color_params_t;
4472 # 93 "./src/gsnamecl.h"
4473 int named_color_put_params(gx_device * dev, gs_param_list * plist);
4474 # 102 "./src/gsnamecl.h"
4475 int named_color_get_params(gx_device * dev, gs_param_list * plist);
4481 bool named_color_install_Separation(gs_color_space * pcs, gs_state * pgs);
4487 bool named_color_install_DeviceN(gs_color_space * pcs, gs_state * pgs);
4493 int gx_remap_concrete_named_color_Separation(const frac * pconc,
4494 const gs_color_space * pcs, gx_device_color * pdc,
4495 const gs_imager_state * pis, gx_device * dev, gs_color_select_t select);
4501 int gx_remap_concrete_named_color_DeviceN(const frac * pconc,
4502 const gs_color_space * pcs, gx_device_color * pdc,
4503 const gs_imager_state * pis, gx_device * dev, gs_color_select_t select);
4504 # 143 "./src/gsnamecl.h"
4505 typedef struct client_named_color_params_s {
4506 struct client_named_color_procs_s * client_procs;
4508 } client_named_color_params_t;
4513 typedef struct client_named_color_procs_s {
4518 bool (* install_Separation)(client_named_color_params_t * pparams,
4519 gs_color_space * pcs, gs_state * pgs);
4523 int (* remap_Separation)(client_named_color_params_t * pparams,
4524 const frac * pconc, const gs_color_space * pcs,
4525 gx_device_color * pdc, const gs_imager_state * pis,
4526 gx_device * dev, gs_color_select_t select);
4531 bool (* install_DeviceN)(client_named_color_params_t * pparams,
4532 gs_color_space * pcs, gs_state * pgs);
4536 int (* remap_DeviceN)(client_named_color_params_t * pparams, const frac * pconc,
4537 const gs_color_space * pcs, gx_device_color * pdc,
4538 const gs_imager_state * pis, gx_device * dev,
4539 gs_color_select_t select);
4541 } client_named_color_procs_t;
4542 # 38 "./src/gxdevcli.h" 2
4543 # 134 "./src/gxdevcli.h"
4544 typedef struct gx_fill_params_s gx_fill_params;
4548 typedef struct gx_stroke_params_s gx_stroke_params;
4549 # 149 "./src/gxdevcli.h"
4550 typedef struct gx_image_enum_common_s gx_image_enum_common_t;
4557 typedef struct gs_pattern1_instance_s gs_pattern1_instance_t;
4562 typedef gx_device_color gx_drawing_color;
4569 } graphics_object_type;
4572 typedef struct gs_fixed_edge_s {
4573 gs_fixed_point start;
4580 typedef struct gs_get_bits_params_s gs_get_bits_params_t;
4584 typedef struct gx_device_anti_alias_info_s {
4587 } gx_device_anti_alias_info;
4589 typedef int32_t frac31;
4594 typedef struct gs_linear_color_edge_s {
4595 gs_fixed_point start;
4597 const frac31 *c0, *c1;
4599 } gs_linear_color_edge;
4600 # 227 "./src/gxdevcli.h"
4602 GX_CINFO_UNKNOWN_SEP_LIN = -1,
4603 GX_CINFO_SEP_LIN_NONE = 0,
4605 } gx_color_enc_sep_lin_t;
4612 GX_CINFO_POLARITY_UNKNOWN = -1,
4613 GX_CINFO_POLARITY_SUBTRACTIVE = 0,
4614 GX_CINFO_POLARITY_ADDITIVE
4615 } gx_color_polarity_t;
4616 # 261 "./src/gxdevcli.h"
4618 GX_CINFO_OPMODE_UNKNOWN = -1,
4619 GX_CINFO_OPMODE_NOT = 0,
4622 # 294 "./src/gxdevcli.h"
4623 typedef struct gx_device_color_info_s {
4646 gx_color_polarity_t polarity;
4653 # 351 "./src/gxdevcli.h"
4655 # 373 "./src/gxdevcli.h"
4666 gx_device_anti_alias_info anti_alias;
4667 # 421 "./src/gxdevcli.h"
4668 gx_color_enc_sep_lin_t separable_and_linear;
4669 byte comp_shift[(8 * 8)];
4670 byte comp_bits[(8 * 8)];
4671 gx_color_index comp_mask[(8 * 8)];
4676 const char * cm_name;
4677 # 443 "./src/gxdevcli.h"
4678 gx_cm_opmode_t opmode;
4679 gx_color_index process_comps;
4680 } gx_device_color_info;
4681 # 610 "./src/gxdevcli.h"
4682 typedef struct gx_device_procs_s gx_device_procs;
4686 typedef struct gx_page_device_procs_s {
4690 int (*install)(gx_device *dev, gs_state *pgs);
4694 int (*begin_page)(gx_device *dev, gs_state *pgs);
4698 int (*end_page)(gx_device *dev, int reason, gs_state *pgs);
4700 } gx_page_device_procs;
4703 int gx_default_install(gx_device *dev, gs_state *pgs);
4704 int gx_default_begin_page(gx_device *dev, gs_state *pgs);
4705 int gx_default_end_page(gx_device *dev, int reason, gs_state *pgs);
4706 # 671 "./src/gxdevcli.h"
4707 typedef struct gx_device_cached_colors_s {
4708 gx_color_index black, white;
4709 } gx_device_cached_colors_t;
4710 # 1213 "./src/gxdevcli.h"
4712 pattern_manage__can_accum,
4713 pattern_manage__start_accum,
4714 pattern_manage__finish_accum,
4715 pattern_manage__load,
4716 pattern_manage__shading_area
4718 # 1261 "./src/gxdevcli.h"
4719 typedef struct gs_fill_attributes_s {
4720 const gs_fixed_rect *clip;
4722 const gx_device_halftone *ht;
4723 gs_logical_operation_t lop;
4725 } gs_fill_attributes;
4726 # 1407 "./src/gxdevcli.h"
4727 typedef struct gx_image_plane_s {
4732 # 1425 "./src/gxdevcli.h"
4733 int gx_image_data(gx_image_enum_common_t *info, const byte **planes,
4734 int data_x, uint raster, int height);
4739 int gx_image_plane_data(gx_image_enum_common_t *info,
4740 const gx_image_plane_t *planes, int height);
4741 int gx_image_plane_data_rows(gx_image_enum_common_t *info,
4742 const gx_image_plane_t *planes, int height,
4744 int gx_image_flush(gx_image_enum_common_t *info);
4745 bool gx_image_planes_wanted(const gx_image_enum_common_t *info, byte *wanted);
4746 int gx_image_end(gx_image_enum_common_t *info, bool draw_last);
4747 # 1455 "./src/gxdevcli.h"
4748 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); };
4749 # 1471 "./src/gxdevcli.h"
4750 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);
4751 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);
4752 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);
4755 struct gx_device_s {
4756 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;
4759 extern const gs_memory_struct_type_t st_device;
4760 void gx_device_finalize(void *ptr);
4761 # 1491 "./src/gxdevcli.h"
4762 gx_device *gx_device_enum_ptr(gx_device *);
4763 gx_device *gx_device_reloc_ptr(gx_device *, gc_state_t *);
4767 typedef gx_color_index (*dev_proc_map_rgb_color_t)(gx_device *dev, const gx_color_value cv[]);
4768 typedef int (*dev_proc_map_color_rgb_t)(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4769 # 1510 "./src/gxdevcli.h"
4770 typedef struct gx_device_forward_s {
4771 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;
4772 } gx_device_forward;
4774 extern const gs_memory_struct_type_t st_device_forward;
4775 # 1524 "./src/gxdevcli.h"
4776 typedef struct gx_device_null_s gx_device_null;
4778 struct gx_device_null_s {
4779 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;
4781 extern const gx_device_null gs_null_device;
4785 extern const gs_memory_struct_type_t st_device_null;
4786 # 1547 "./src/gxdevcli.h"
4787 void gx_device_init(gx_device * dev, const gx_device * proto,
4788 gs_memory_t * mem, bool internal);
4793 void gs_make_null_device(gx_device_null *dev_null, gx_device *target,
4796 bool gs_is_null_device(gx_device *dev);
4799 void gx_device_set_target(gx_device_forward *fdev, gx_device *target);
4802 void gx_device_retain(gx_device *dev, bool retained);
4806 uint gx_device_raster(const gx_device * dev, bool pad_to_word);
4812 int gx_device_adjust_resolution(gx_device * dev, int actual_width, int actual_height, int fit);
4816 void gx_device_set_margins(gx_device * dev, const float *margins ,
4820 void gx_device_set_width_height(gx_device * dev, int width, int height);
4823 void gx_device_set_resolution(gx_device * dev, floatp x_dpi, floatp y_dpi);
4826 void gx_device_set_media_size(gx_device * dev, floatp media_width, floatp media_height);
4827 # 1596 "./src/gxdevcli.h"
4828 void gx_set_device_only(gs_state *, gx_device *);
4831 int gs_closedevice(gx_device *);
4834 void gx_device_free_local(gx_device *);
4841 typedef struct gx_device_type_s {
4842 gs_memory_type_ptr_t stype;
4843 int (*initialize)(gx_device *);
4845 # 22 "./src/gxdevice.h" 2
4846 # 1 "./src/gsfname.h" 1
4847 # 31 "./src/gsfname.h"
4848 typedef struct gx_io_device_s gx_io_device;
4851 typedef struct gs_parsed_file_name_s {
4852 gs_memory_t *memory;
4853 gx_io_device *iodev;
4856 } gs_parsed_file_name_t;
4859 int gs_parse_file_name(gs_parsed_file_name_t *, const char *, uint);
4862 int gs_parse_real_file_name(gs_parsed_file_name_t *, const char *, uint,
4863 gs_memory_t *, client_name_t);
4866 int gs_terminate_file_name(gs_parsed_file_name_t *, gs_memory_t *,
4870 void gs_free_file_name(gs_parsed_file_name_t *, client_name_t);
4871 # 23 "./src/gxdevice.h" 2
4877 # 1 "./src/gsmalloc.h" 1
4878 # 22 "./src/gsmalloc.h"
4879 typedef struct gs_malloc_block_s gs_malloc_block_t;
4880 typedef struct gs_malloc_memory_s {
4881 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;
4882 gs_malloc_block_t *allocated;
4886 } gs_malloc_memory_t;
4889 gs_malloc_memory_t *gs_malloc_memory_init(void);
4897 gs_memory_t * gs_malloc_init(const gs_memory_t *parent);
4898 void gs_malloc_release(gs_memory_t *mem);
4899 # 51 "./src/gsmalloc.h"
4900 int gs_malloc_wrap(gs_memory_t **wrapped, gs_malloc_memory_t *contents);
4903 gs_malloc_memory_t *gs_malloc_wrapped_contents(gs_memory_t *wrapped);
4906 gs_malloc_memory_t *gs_malloc_unwrap(gs_memory_t *wrapped);
4907 # 29 "./src/gxdevice.h" 2
4912 # 1 "./src/gxstdio.h" 1
4913 # 34 "./src/gxdevice.h" 2
4914 # 213 "./src/gxdevice.h"
4915 int gx_default_open_device(gx_device *dev);
4916 void gx_default_get_initial_matrix(gx_device *dev, gs_matrix *pmat);
4917 void gx_upright_get_initial_matrix(gx_device *dev, gs_matrix *pmat);
4918 int gx_default_sync_output(gx_device *dev);
4919 int gx_default_output_page(gx_device *dev, int num_copies, int flush);
4920 int gx_default_close_device(gx_device *dev);
4921 gx_color_index gx_default_w_b_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4922 int gx_default_w_b_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4925 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);
4926 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);
4927 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);
4928 int gx_default_draw_line(gx_device *dev, int x0, int y0, int x1, int y1, gx_color_index color);
4929 int gx_no_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
4930 int gx_default_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
4931 int gx_default_get_params(gx_device *dev, gs_param_list *plist);
4932 int gx_default_put_params(gx_device *dev, gs_param_list *plist);
4933 gx_color_index gx_default_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
4934 const gx_xfont_procs *gx_default_get_xfont_procs(gx_device *dev);
4935 gx_device *gx_default_get_xfont_device(gx_device *dev);
4936 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);
4937 gx_device *gx_default_get_page_device(gx_device *dev);
4938 gx_device *gx_page_device_get_page_device(gx_device *dev);
4939 int gx_default_get_alpha_bits(gx_device *dev, graphics_object_type type);
4940 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);
4941 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);
4942 int gx_default_get_band(gx_device *dev, int y, int *band_start);
4943 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);
4944 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);
4945 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);
4946 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);
4947 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);
4948 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);
4949 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);
4950 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);
4951 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);
4952 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);
4953 int gx_default_image_data(gx_device *dev, gx_image_enum_common_t *info, const byte **planes, int data_x, uint raster, int height);
4954 int gx_default_end_image(gx_device *dev, gx_image_enum_common_t *info, bool draw_last);
4955 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);
4956 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);
4957 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);
4958 void gx_default_get_clipping_box(gx_device *dev, gs_fixed_rect *pbox);
4959 void gx_get_largest_clipping_box(gx_device *dev, gs_fixed_rect *pbox);
4960 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);
4961 int gx_no_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread);
4962 int gx_default_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread);
4963 int gx_default_map_color_rgb_alpha(gx_device *dev, gx_color_index color, gx_color_value rgba[4]);
4964 int gx_no_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
4967 int gx_default_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
4968 int gx_null_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
4969 int gx_default_get_hardware_params(gx_device *dev, gs_param_list *plist);
4970 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);
4971 int gx_default_finish_copydevice(gx_device *dev, const gx_device *from_dev);
4972 int gx_default_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function);
4973 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);
4974 int gx_default_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length);
4975 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 );
4976 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);
4977 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);
4978 int gx_default_update_spot_equivalent_colors(gx_device *dev, const gs_state * pgs);
4984 gx_color_index gx_default_b_w_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4985 int gx_default_b_w_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4986 gx_color_index gx_default_gray_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4987 int gx_default_gray_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4988 int gx_default_rgb_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4995 gx_color_index gx_default_rgb_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4996 gx_color_index cmyk_1bit_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
4997 int cmyk_1bit_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4998 int (cmyk_1bit_map_color_cmyk)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
4999 gx_color_index cmyk_8bit_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
5000 int cmyk_8bit_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
5001 int (cmyk_8bit_map_color_cmyk)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
5002 gx_color_index (gx_default_8bit_map_gray_color)(gx_device * dev, const gx_color_value colors[]);
5003 int (gx_default_8bit_map_color_gray)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
5006 int gx_forward_close_device(gx_device *dev);
5007 void gx_forward_get_initial_matrix(gx_device *dev, gs_matrix *pmat);
5008 int gx_forward_sync_output(gx_device *dev);
5009 int gx_forward_output_page(gx_device *dev, int num_copies, int flush);
5010 gx_color_index gx_forward_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
5011 int gx_forward_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
5012 int gx_forward_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
5013 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);
5014 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);
5015 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);
5016 int gx_forward_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
5017 int gx_forward_get_params(gx_device *dev, gs_param_list *plist);
5018 int gx_forward_put_params(gx_device *dev, gs_param_list *plist);
5019 gx_color_index gx_forward_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
5020 const gx_xfont_procs *gx_forward_get_xfont_procs(gx_device *dev);
5021 gx_device *gx_forward_get_xfont_device(gx_device *dev);
5022 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);
5023 gx_device *gx_forward_get_page_device(gx_device *dev);
5025 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);
5026 int gx_forward_get_band(gx_device *dev, int y, int *band_start);
5027 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);
5028 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);
5029 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);
5030 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);
5031 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);
5032 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);
5033 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);
5034 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);
5035 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);
5038 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);
5039 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);
5040 void gx_forward_get_clipping_box(gx_device *dev, gs_fixed_rect *pbox);
5041 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);
5042 int gx_forward_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread);
5043 int gx_forward_map_color_rgb_alpha(gx_device *dev, gx_color_index color, gx_color_value rgba[4]);
5045 int gx_forward_get_hardware_params(gx_device *dev, gs_param_list *plist);
5046 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);
5047 const gx_cm_color_map_procs * (gx_forward_get_color_mapping_procs)(const gx_device * dev);
5048 int (gx_forward_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
5049 gx_color_index (gx_forward_encode_color)(gx_device * dev, const gx_color_value colors[]);
5050 int (gx_forward_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
5051 int gx_forward_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function);
5052 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);
5053 int gx_forward_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length);
5054 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 );
5055 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);
5056 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);
5057 int gx_forward_update_spot_equivalent_colors(gx_device *dev, const gs_state * pgs);
5062 void gx_device_set_procs(gx_device *);
5065 void gx_device_fill_in_procs(gx_device *);
5066 void gx_device_forward_fill_in_procs(gx_device_forward *);
5069 void gx_device_forward_color_procs(gx_device_forward *);
5075 void check_device_separable(gx_device * dev);
5080 void set_linear_color_bits_mask_shift(gx_device * dev);
5085 void gx_device_copy_color_procs(gx_device *dev, const gx_device *target);
5088 gx_color_index gx_device_black(gx_device *dev);
5092 gx_color_index gx_device_white(gx_device *dev);
5098 void gx_device_decache_colors(gx_device *dev);
5104 void gx_device_copy_color_params(gx_device *dev, const gx_device *target);
5111 void gx_device_copy_params(gx_device *dev, const gx_device *target);
5112 # 418 "./src/gxdevice.h"
5113 int gx_parse_output_file_name(gs_parsed_file_name_t *pfn,
5114 const char **pfmt, const char *fname,
5121 int gx_device_open_output_file(const gx_device * dev, char *fname,
5122 bool binary, bool positionable,
5126 int gx_device_close_output_file(const gx_device * dev, const char *fname,
5128 # 451 "./src/gxdevice.h"
5129 int gx_finish_output_page(gx_device *dev, int num_copies, int flush);
5130 # 542 "./src/gxdevice.h"
5131 typedef struct gdev_input_media_s {
5133 const char *MediaColor;
5135 const char *MediaType;
5136 } gdev_input_media_t;
5139 extern const gdev_input_media_t gdev_input_media_default;
5141 void gdev_input_media_init(gdev_input_media_t * pim);
5143 int gdev_begin_input_media(gs_param_list * mlist, gs_param_dict * pdict,
5146 int gdev_write_input_page_size(int index, gs_param_dict * pdict,
5147 floatp width_points, floatp height_points);
5149 int gdev_write_input_media(int index, gs_param_dict * pdict,
5150 const gdev_input_media_t * pim);
5152 int gdev_end_input_media(gs_param_list * mlist, gs_param_dict * pdict);
5154 typedef struct gdev_output_media_s {
5155 const char *OutputType;
5156 } gdev_output_media_t;
5159 extern const gdev_output_media_t gdev_output_media_default;
5161 int gdev_begin_output_media(gs_param_list * mlist, gs_param_dict * pdict,
5164 int gdev_write_output_media(int index, gs_param_dict * pdict,
5165 const gdev_output_media_t * pom);
5167 int gdev_end_output_media(gs_param_list * mlist, gs_param_dict * pdict);
5168 # 23 "./src/gdevpdfx.h" 2
5169 # 1 "./src/gxfont.h" 1
5170 # 22 "./src/gxfont.h"
5171 # 1 "./src/gsfont.h" 1
5172 # 31 "./src/gsfont.h"
5173 typedef struct gs_font_dir_s gs_font_dir;
5174 # 42 "./src/gsfont.h"
5175 gs_font_dir *gs_font_dir_alloc2(gs_memory_t * struct_mem,
5176 gs_memory_t * bits_mem);
5177 gs_font_dir *gs_font_dir_alloc2_limits(gs_memory_t * struct_mem,
5178 gs_memory_t * bits_mem,
5179 uint smax, uint bmax, uint mmax,
5180 uint cmax, uint upper);
5181 # 56 "./src/gsfont.h"
5182 int gs_definefont(gs_font_dir *, gs_font *);
5185 int gs_font_find_similar(const gs_font_dir * pdir, const gs_font **ppfont,
5186 int (*similar)(const gs_font *, const gs_font *));
5190 int gs_scalefont(gs_font_dir *, const gs_font *, floatp, gs_font **);
5191 int gs_makefont(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5192 int gs_setfont(gs_state *, gs_font *);
5193 gs_font *gs_currentfont(const gs_state *);
5194 gs_font *gs_rootfont(const gs_state *);
5195 void gs_set_currentfont(gs_state *, gs_font *);
5196 int gs_purge_font(gs_font *);
5198 gs_font *gs_find_font_by_id(gs_font_dir *pdir, gs_id id, gs_matrix *FontMatrix);
5201 void gs_cachestatus(const gs_font_dir *, uint[7]);
5204 uint gs_currentcachesize(const gs_font_dir *);
5205 int gs_setcachesize(gs_font_dir *, uint);
5206 uint gs_currentcachelower(const gs_font_dir *);
5207 int gs_setcachelower(gs_font_dir *, uint);
5208 uint gs_currentcacheupper(const gs_font_dir *);
5209 int gs_setcacheupper(gs_font_dir *, uint);
5210 uint gs_currentaligntopixels(const gs_font_dir *);
5211 int gs_setaligntopixels(gs_font_dir *, uint);
5212 uint gs_currentgridfittt(const gs_font_dir *);
5213 int gs_setgridfittt(gs_font_dir *, uint);
5214 # 23 "./src/gxfont.h" 2
5215 # 1 "./src/gsgdata.h" 1
5216 # 53 "./src/gsgdata.h"
5217 typedef struct gs_glyph_data_procs_s gs_glyph_data_procs_t;
5220 typedef struct gs_glyph_data_s gs_glyph_data_t;
5222 struct gs_glyph_data_s {
5223 gs_const_bytestring bits;
5224 const gs_glyph_data_procs_t *procs;
5226 gs_memory_t *memory;
5228 extern const gs_memory_struct_type_t st_glyph_data;
5235 struct gs_glyph_data_procs_s {
5238 void (*free)(gs_glyph_data_t *pgd, client_name_t cname);
5241 int (*substring)(gs_glyph_data_t *pgd, uint offset, uint size);
5248 int gs_glyph_data_substring(gs_glyph_data_t *pgd, uint offset, uint size);
5255 void gs_glyph_data_free(gs_glyph_data_t *pgd, client_name_t cname);
5256 # 123 "./src/gsgdata.h"
5257 void gs_glyph_data_from_string(gs_glyph_data_t *pgd, const byte *data,
5258 uint size, gs_font *font);
5259 void gs_glyph_data_from_bytes(gs_glyph_data_t *pgd, const byte *bytes,
5260 uint offset, uint size, gs_font *font);
5262 void gs_glyph_data_from_null(gs_glyph_data_t *pgd);
5263 # 24 "./src/gxfont.h" 2
5265 # 1 "./src/gsnotify.h" 1
5266 # 34 "./src/gsnotify.h"
5267 typedef int (*gs_notify_proc_t)(void *proc_data, void *event_data);
5268 typedef struct gs_notify_registration_s gs_notify_registration_t;
5269 struct gs_notify_registration_s {
5270 gs_notify_proc_t proc;
5272 gs_notify_registration_t *next;
5280 typedef struct gs_notify_list_s {
5281 gs_memory_t *memory;
5282 gs_notify_registration_t *first;
5285 extern const gs_memory_struct_type_t st_gs_notify_list;
5293 void gs_notify_init(gs_notify_list_t *nlist, gs_memory_t *mem);
5296 int gs_notify_register(gs_notify_list_t *nlist, gs_notify_proc_t proc,
5304 int gs_notify_unregister(gs_notify_list_t *nlist, gs_notify_proc_t proc,
5308 int gs_notify_unregister_calling(gs_notify_list_t *nlist,
5309 gs_notify_proc_t proc, void *proc_data,
5310 void (*unreg_proc)(void *pdata));
5316 int gs_notify_all(gs_notify_list_t *nlist, void *event_data);
5319 void gs_notify_release(gs_notify_list_t *nlist);
5320 # 26 "./src/gxfont.h" 2
5323 # 1 "./src/gxftype.h" 1
5324 # 23 "./src/gxftype.h"
5329 ft_user_defined = 3,
5331 ft_CID_encrypted = 9,
5332 ft_CID_user_defined = 10,
5333 ft_CID_TrueType = 11,
5343 fbit_use_outlines = 0,
5344 fbit_use_bitmaps = 1,
5345 fbit_transform_bitmaps = 2
5347 # 29 "./src/gxfont.h" 2
5348 # 58 "./src/gxfont.h"
5349 typedef struct gs_font_info_s {
5366 uint Flags_requested;
5367 uint Flags_returned;
5381 int UnderlinePosition;
5383 int UnderlineThickness;
5390 gs_const_string Copyright;
5392 gs_const_string Notice;
5394 gs_const_string FamilyName;
5396 gs_const_string FullName;
5399 # 134 "./src/gxfont.h"
5400 typedef struct gs_glyph_info_s {
5423 typedef struct gs_font_procs_s {
5424 # 168 "./src/gxfont.h"
5425 int (*define_font)(gs_font_dir *, gs_font *);
5426 # 177 "./src/gxfont.h"
5427 int (*make_font)(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5428 # 191 "./src/gxfont.h"
5429 int (*font_info)(gs_font *font, const gs_point *pscale, int members, gs_font_info_t *info);
5430 # 207 "./src/gxfont.h"
5431 int (*same_font)(const gs_font *font, const gs_font *ofont, int mask);
5432 # 221 "./src/gxfont.h"
5433 gs_glyph (*encode_char)(gs_font *, gs_char, gs_glyph_space_t);
5440 gs_char (*decode_glyph)(gs_font *, gs_glyph);
5441 # 240 "./src/gxfont.h"
5442 int (*enumerate_glyph)(gs_font *font, int *pindex, gs_glyph_space_t glyph_space, gs_glyph *pglyph);
5443 # 268 "./src/gxfont.h"
5444 int (*glyph_info)(gs_font *font, gs_glyph glyph, const gs_matrix *pmat, int members, gs_glyph_info_t *info);
5445 # 284 "./src/gxfont.h"
5446 int (*glyph_outline)(gs_font *font, int WMode, gs_glyph glyph, const gs_matrix *pmat, gx_path *ppath, double sbw[4]);
5454 int (*glyph_name)(gs_font *font, gs_glyph glyph, gs_const_string *pstr);
5455 # 304 "./src/gxfont.h"
5456 int (*init_fstack)(gs_text_enum_t *, gs_font *);
5457 # 318 "./src/gxfont.h"
5458 int (*next_char_glyph)(gs_text_enum_t *pte, gs_char *pchar, gs_glyph *pglyph);
5459 # 330 "./src/gxfont.h"
5460 int (*build_char)(gs_text_enum_t *, gs_state *, gs_font *, gs_char, gs_glyph);
5465 int gs_no_define_font(gs_font_dir *, gs_font *);
5466 int gs_no_make_font(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5467 int gs_base_make_font(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5468 int gs_default_font_info(gs_font *font, const gs_point *pscale, int members, gs_font_info_t *info);
5469 int gs_default_same_font(const gs_font *font, const gs_font *ofont, int mask);
5470 int gs_base_same_font(const gs_font *font, const gs_font *ofont, int mask);
5472 gs_glyph gs_no_encode_char(gs_font *, gs_char, gs_glyph_space_t);
5473 gs_char gs_no_decode_glyph(gs_font *, gs_glyph);
5474 int gs_no_enumerate_glyph(gs_font *font, int *pindex, gs_glyph_space_t glyph_space, gs_glyph *pglyph);
5475 int gs_default_glyph_info(gs_font *font, gs_glyph glyph, const gs_matrix *pmat, int members, gs_glyph_info_t *info);
5476 int gs_no_glyph_outline(gs_font *font, int WMode, gs_glyph glyph, const gs_matrix *pmat, gx_path *ppath, double sbw[4]);
5477 int gs_no_glyph_name(gs_font *font, gs_glyph glyph, gs_const_string *pstr);
5479 int gs_default_init_fstack(gs_text_enum_t *, gs_font *);
5480 int gs_default_next_char_glyph(gs_text_enum_t *pte, gs_char *pchar, gs_glyph *pglyph);
5481 int gs_no_build_char(gs_text_enum_t *, gs_state *, gs_font *, gs_char, gs_glyph);
5483 extern const gs_font_procs gs_font_procs_default;
5486 typedef struct gs_font_name_s {
5492 # 396 "./src/gxfont.h"
5494 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;
5497 extern const gs_memory_struct_type_t st_gs_font;
5498 void gs_font_finalize(void *ptr);
5499 # 412 "./src/gxfont.h"
5500 extern const gs_memory_struct_type_t st_gs_font_ptr_element;
5508 gs_font_alloc(gs_memory_t *mem, gs_memory_type_ptr_t pstype,
5509 const gs_font_procs *procs, gs_font_dir *dir,
5510 client_name_t cname);
5513 void gs_font_notify_init(gs_font *font);
5520 int gs_font_notify_register(gs_font *font, gs_notify_proc_t proc,
5522 int gs_font_notify_unregister(gs_font *font, gs_notify_proc_t proc,
5527 typedef struct FAPI_server_s FAPI_server;
5528 # 454 "./src/gxfont.h"
5529 typedef struct gs_font_base_s gs_font_base;
5531 struct gs_font_base_s {
5532 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;
5535 extern const gs_memory_struct_type_t st_gs_font_base;
5536 # 469 "./src/gxfont.h"
5538 gs_font_base_alloc(gs_memory_t *mem, gs_memory_type_ptr_t pstype,
5539 const gs_font_procs *procs, gs_font_dir *dir,
5540 client_name_t cname);
5546 extern const char gx_extendeg_glyph_name_separator[];
5552 bool gs_font_glyph_is_notdef(gs_font_base *bfont, gs_glyph glyph);
5555 const gs_font_base *gs_font_parent(const gs_font_base *pbfont);
5556 # 24 "./src/gdevpdfx.h" 2
5557 # 1 "./src/gxline.h" 1
5558 # 20 "./src/gxline.h"
5559 # 1 "./src/gslparam.h" 1
5560 # 21 "./src/gslparam.h"
5565 gs_cap_triangle = 3,
5577 gs_join_triangle = 4,
5580 # 21 "./src/gxline.h" 2
5585 typedef struct gx_dash_params_s {
5591 float pattern_length;
5594 float init_dist_left;
5599 typedef struct gx_line_params_s {
5609 bool dot_length_absolute;
5610 gs_matrix dot_orientation;
5612 gx_dash_params dash;
5619 int gx_set_miter_limit(gx_line_params *, floatp);
5623 int gx_set_dash(gx_dash_params *, const float *, uint, floatp, gs_memory_t *);
5626 int gx_set_dot_length(gx_line_params *, floatp, bool);
5627 # 25 "./src/gdevpdfx.h" 2
5629 # 1 "./src/spprint.h" 1
5630 # 30 "./src/spprint.h"
5631 int stream_write(stream * s, const void *ptr, uint count);
5634 int stream_puts(stream * s, const char *str);
5635 # 42 "./src/spprint.h"
5636 const char *pprintg1(stream * s, const char *format, floatp v);
5637 const char *pprintg2(stream * s, const char *format, floatp v1, floatp v2);
5638 const char *pprintg3(stream * s, const char *format,
5639 floatp v1, floatp v2, floatp v3);
5640 const char *pprintg4(stream * s, const char *format,
5641 floatp v1, floatp v2, floatp v3, floatp v4);
5642 const char *pprintg6(stream * s, const char *format,
5643 floatp v1, floatp v2, floatp v3, floatp v4,
5644 floatp v5, floatp v6);
5652 const char *pprintd1(stream * s, const char *format, int v);
5653 const char *pprintd2(stream * s, const char *format, int v1, int v2);
5654 const char *pprintd3(stream * s, const char *format,
5655 int v1, int v2, int v3);
5656 const char *pprintd4(stream * s, const char *format,
5657 int v1, int v2, int v3, int v4);
5660 const char *pprintld1(stream * s, const char *format, long v);
5661 const char *pprintld2(stream * s, const char *format, long v1, long v2);
5662 const char *pprintld3(stream * s, const char *format,
5663 long v1, long v2, long v3);
5666 const char *pprints1(stream * s, const char *format, const char *str);
5667 const char *pprints2(stream * s, const char *format,
5668 const char *str1, const char *str2);
5669 const char *pprints3(stream * s, const char *format,
5670 const char *str1, const char *str2, const char *str3);
5671 # 27 "./src/gdevpdfx.h" 2
5672 # 1 "./src/gdevpsdf.h" 1
5673 # 25 "./src/gdevpsdf.h"
5674 # 1 "./src/gdevvec.h" 1
5675 # 23 "./src/gdevvec.h"
5676 # 1 "./src/gdevbbox.h" 1
5677 # 72 "./src/gdevbbox.h"
5678 typedef struct gx_device_bbox_procs_s {
5682 bool (*init_box)(void *proc_data);
5686 void (*get_box)(const void *proc_data, gs_fixed_rect *pbox);
5690 void (*add_rect)(void *proc_data, fixed x0, fixed y0, fixed x1, fixed y1);
5694 bool (*in_rect)(const void *proc_data, const gs_fixed_rect *pbox);
5696 } gx_device_bbox_procs_t;
5698 bool bbox_default_init_box(void *proc_data);
5699 void bbox_default_get_box(const void *proc_data, gs_fixed_rect *pbox);
5700 void bbox_default_add_rect(void *proc_data, fixed x0, fixed y0, fixed x1, fixed y1);
5701 bool bbox_default_in_rect(const void *proc_data, const gs_fixed_rect *pbox);
5702 # 108 "./src/gdevbbox.h"
5703 typedef struct gx_device_bbox_s gx_device_bbox;
5708 struct gx_device_bbox_s {
5709 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;
5712 extern const gs_memory_struct_type_t st_device_bbox;
5719 void gx_device_bbox_init(gx_device_bbox * dev, gx_device * target, gs_memory_t *mem);
5722 void gx_device_bbox_fwd_open_close(gx_device_bbox * dev,
5723 bool forward_open_close);
5726 void gx_device_bbox_set_white_opaque(gx_device_bbox *dev,
5727 bool white_is_opaque);
5730 void gx_device_bbox_bbox(gx_device_bbox * dev, gs_rect * pbbox);
5733 void gx_device_bbox_release(gx_device_bbox *dev);
5734 # 24 "./src/gdevvec.h" 2
5735 # 1 "./src/gxiparam.h" 1
5736 # 37 "./src/gxiparam.h"
5737 struct gx_image_type_s {
5742 gs_memory_type_ptr_t stype;
5748 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);
5749 # 59 "./src/gxiparam.h"
5750 int (*source_size)(const gs_imager_state *pis, const gs_image_common_t *pic, gs_int_point *psize);
5751 # 70 "./src/gxiparam.h"
5752 int (*sput)(const gs_image_common_t *pic, stream *s, const gs_color_space **ppcs);
5753 # 80 "./src/gxiparam.h"
5754 int (*sget)(gs_image_common_t *pic, stream *s, const gs_color_space *pcs);
5755 # 89 "./src/gxiparam.h"
5756 void (*release)(gs_image_common_t *pic, gs_memory_t *mem);
5769 int gx_data_image_source_size(const gs_imager_state *pis, const gs_image_common_t *pic, gs_int_point *psize);
5774 int gx_image_no_sput(const gs_image_common_t *pic, stream *s, const gs_color_space **ppcs);
5775 int gx_image_no_sget(gs_image_common_t *pic, stream *s, const gs_color_space *pcs);
5776 void gx_image_default_release(gs_image_common_t *pic, gs_memory_t *mem);
5781 int gx_pixel_image_sput(const gs_pixel_image_t *pic, stream *s,
5782 const gs_color_space **ppcs, int extra);
5783 int gx_pixel_image_sget(gs_pixel_image_t *pic, stream *s,
5784 const gs_color_space *pcs);
5785 void gx_pixel_image_release(gs_pixel_image_t *pic, gs_memory_t *mem);
5788 bool gx_image_matrix_is_default(const gs_data_image_t *pid);
5789 void gx_image_matrix_set_default(gs_data_image_t *pid);
5790 void sput_variable_uint(stream *s, uint w);
5791 int sget_variable_uint(stream *s, uint *pw);
5792 # 138 "./src/gxiparam.h"
5793 typedef struct gx_image_enum_procs_s {
5794 # 149 "./src/gxiparam.h"
5795 int (*plane_data)(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used);
5796 # 160 "./src/gxiparam.h"
5797 int (*end_image)(gx_image_enum_common_t *info, bool draw_last);
5798 # 173 "./src/gxiparam.h"
5799 int (*flush)(gx_image_enum_common_t *info);
5800 # 198 "./src/gxiparam.h"
5801 bool (*planes_wanted)(const gx_image_enum_common_t *info, byte *wanted);
5803 } gx_image_enum_procs_t;
5804 # 220 "./src/gxiparam.h"
5805 struct gx_image_enum_common_s {
5806 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)];
5809 extern const gs_memory_struct_type_t st_gx_image_enum_common;
5810 # 233 "./src/gxiparam.h"
5811 int gx_image_enum_common_init(gx_image_enum_common_t * piec,
5812 const gs_data_image_t * pic,
5813 const gx_image_enum_procs_t * piep,
5814 gx_device * dev, int num_components,
5815 gs_image_format_t format);
5821 int gx_no_plane_data(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used);
5822 int gx_ignore_end_image(gx_image_enum_common_t *info, bool draw_last);
5827 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);
5828 int gx_image1_plane_data(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used);
5829 int gx_image1_end_image(gx_image_enum_common_t *info, bool draw_last);
5830 int gx_image1_flush(gx_image_enum_common_t *info);
5831 # 25 "./src/gdevvec.h" 2
5832 # 1 "./src/gxistate.h" 1
5833 # 28 "./src/gxistate.h"
5834 # 1 "./src/gxmatrix.h" 1
5835 # 33 "./src/gxmatrix.h"
5836 struct gs_matrix_fixed_s {
5837 float xx, xy, yx, yy, tx, ty;
5838 fixed tx_fixed, ty_fixed;
5839 bool txy_fixed_valid;
5844 typedef struct gs_matrix_fixed_s gs_matrix_fixed;
5848 int gs_matrix_fixed_from_matrix(gs_matrix_fixed *, const gs_matrix *);
5851 int gs_point_transform2fixed(const gs_matrix_fixed *, floatp, floatp,
5853 int gs_distance_transform2fixed(const gs_matrix_fixed *, floatp, floatp,
5856 int gs_point_transform2fixed_rounding(const gs_matrix_fixed * pmat,
5857 floatp x, floatp y, gs_fixed_point * ppt);
5858 # 63 "./src/gxmatrix.h"
5860 long xx, xy, yx, yy;
5866 # 81 "./src/gxmatrix.h"
5867 fixed fixed_coeff_mult(fixed, long, const fixed_coeff *, int);
5868 # 29 "./src/gxistate.h" 2
5870 # 1 "./src/gscspace.h" 1
5871 # 166 "./src/gscspace.h"
5875 gs_color_space_index_DeviceGray = 0,
5876 gs_color_space_index_DeviceRGB,
5879 gs_color_space_index_DeviceCMYK,
5882 gs_color_space_index_DevicePixel,
5883 gs_color_space_index_DeviceN,
5887 gs_color_space_index_CIEDEFG,
5888 gs_color_space_index_CIEDEF,
5889 gs_color_space_index_CIEABC,
5890 gs_color_space_index_CIEA,
5891 gs_color_space_index_Separation,
5892 gs_color_space_index_Indexed,
5893 gs_color_space_index_Pattern,
5896 gs_color_space_index_CIEICC
5898 } gs_color_space_index;
5899 # 201 "./src/gscspace.h"
5900 typedef struct gs_color_space_type_s gs_color_space_type;
5901 # 225 "./src/gscspace.h"
5902 typedef struct gs_device_pixel_params_s {
5904 } gs_device_pixel_params;
5905 typedef struct gs_cie_a_s gs_cie_a;
5906 typedef struct gs_cie_abc_s gs_cie_abc;
5907 typedef struct gs_cie_def_s gs_cie_def;
5908 typedef struct gs_cie_defg_s gs_cie_defg;
5909 # 240 "./src/gscspace.h"
5910 typedef struct gs_small_base_color_space_s {
5911 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;
5912 } gs_small_base_color_space;
5913 # 252 "./src/gscspace.h"
5914 typedef struct gs_cie_icc_s gs_cie_icc;
5916 typedef struct gs_cieicc_params_s {
5917 gs_cie_icc * picc_info;
5918 gs_small_base_color_space alt_space;
5925 typedef struct gs_base_color_space_s {
5926 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;
5927 } gs_base_color_space;
5933 typedef struct gs_device_n_map_s gs_device_n_map;
5938 typedef struct gs_device_n_attributes_s gs_device_n_attributes;
5945 typedef ulong gs_separation_name;
5946 # 292 "./src/gscspace.h"
5947 typedef int (gs_callback_func_get_colorname_string)
5948 (const gs_memory_t *mem, gs_separation_name colorname, unsigned char **ppstr, unsigned int *plen);
5950 typedef enum { SEP_NONE, SEP_ALL, SEP_OTHER } separation_type;
5952 typedef struct gs_separation_params_s {
5953 gs_separation_name sep_name;
5954 gs_base_color_space alt_space;
5955 gs_device_n_map *map;
5956 separation_type sep_type;
5957 bool use_alt_cspace;
5958 gs_callback_func_get_colorname_string *get_colorname_string;
5962 } gs_separation_params;
5964 typedef struct gs_device_n_params_s {
5965 gs_separation_name *names;
5966 uint num_components;
5967 gs_base_color_space alt_space;
5968 gs_device_n_map *map;
5969 gs_device_n_attributes *colorants;
5970 bool use_alt_cspace;
5971 gs_callback_func_get_colorname_string *get_colorname_string;
5975 } gs_device_n_params;
5982 typedef struct gs_direct_color_space_s {
5983 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;
5984 } gs_direct_color_space;
5985 # 341 "./src/gscspace.h"
5986 typedef struct gs_indexed_map_s gs_indexed_map;
5988 typedef struct gs_indexed_params_s {
5989 gs_direct_color_space base_space;
5992 gs_const_string table;
5993 gs_indexed_map *map;
5996 } gs_indexed_params;
6002 typedef struct gs_paint_color_space_s {
6003 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;
6004 } gs_paint_color_space;
6012 typedef struct gs_pattern_params_s {
6013 bool has_base_space;
6014 gs_paint_color_space base_space;
6015 } gs_pattern_params;
6020 struct gs_color_space_s {
6021 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;
6026 # 438 "./src/gscspace.h"
6028 gs_cspace_init_DeviceGray(const gs_memory_t *mem, gs_color_space *pcs),
6029 gs_cspace_build_DeviceGray(gs_color_space ** ppcspace,
6030 gs_memory_t * pmem),
6031 gs_cspace_init_DeviceRGB(const gs_memory_t *mem, gs_color_space *pcs),
6032 gs_cspace_build_DeviceRGB(gs_color_space ** ppcspace,
6033 gs_memory_t * pmem),
6034 gs_cspace_init_DeviceCMYK(const gs_memory_t *mem, gs_color_space *pcs),
6035 gs_cspace_build_DeviceCMYK(gs_color_space ** ppcspace,
6036 gs_memory_t * pmem);
6039 void gs_cspace_init_from(gs_color_space * pcsto,
6040 const gs_color_space * pcsfrom);
6043 void gs_cspace_assign(gs_color_space * pdest, const gs_color_space * psrc);
6046 void gs_cspace_release(gs_color_space * pcs);
6051 gs_color_space_index gs_color_space_get_index(const gs_color_space *);
6054 int gs_color_space_num_components(const gs_color_space *);
6061 bool gs_color_space_equal(const gs_color_space *pcs1,
6062 const gs_color_space *pcs2);
6069 void gs_color_space_restrict_color(gs_client_color *, const gs_color_space *);
6076 const gs_color_space *gs_cspace_base_space(const gs_color_space * pcspace);
6077 # 31 "./src/gxistate.h" 2
6078 # 1 "./src/gstrans.h" 1
6079 # 21 "./src/gstrans.h"
6080 # 1 "./src/gxcomp.h" 1
6081 # 22 "./src/gxcomp.h"
6082 # 1 "./src/gxbitfmt.h" 1
6083 # 28 "./src/gxbitfmt.h"
6084 typedef ulong gx_bitmap_format_t;
6085 # 23 "./src/gxcomp.h" 2
6086 # 67 "./src/gxcomp.h"
6087 typedef struct gs_composite_type_procs_s {
6095 int (*create_default_compositor)(const gs_composite_t *pcte, gx_device **pcdev, gx_device *dev, gs_imager_state *pis, gs_memory_t *mem);
6102 bool (*equal)(const gs_composite_t *pcte, const gs_composite_t *pcte2);
6103 # 95 "./src/gxcomp.h"
6104 int (*write)(const gs_composite_t *pcte, byte *data, uint *psize);
6105 # 105 "./src/gxcomp.h"
6106 int (*read)(gs_composite_t **ppcte, const byte *data, uint size, gs_memory_t *mem);
6114 int (*clist_compositor_write_update)(const gs_composite_t * pcte, gx_device * dev, gx_device ** pcdev, gs_imager_state * pis, gs_memory_t * mem);
6122 int (*clist_compositor_read_update)(gs_composite_t * pcte, gx_device * cdev, gx_device * tdev, gs_imager_state * pis, gs_memory_t * mem);
6124 } gs_composite_type_procs_t;
6126 typedef struct gs_composite_type_s {
6128 gs_composite_type_procs_t procs;
6129 } gs_composite_type_t;
6135 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);
6141 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);
6142 # 152 "./src/gxcomp.h"
6143 struct gs_composite_s {
6144 const gs_composite_type_t *type; gs_id id; rc_header rc;
6146 # 22 "./src/gstrans.h" 2
6154 PDF14_BEGIN_TRANS_GROUP,
6155 PDF14_END_TRANS_GROUP,
6156 PDF14_INIT_TRANS_MASK,
6157 PDF14_BEGIN_TRANS_MASK,
6158 PDF14_END_TRANS_MASK,
6159 PDF14_SET_BLEND_PARAMS
6160 } pdf14_compositor_operations;
6161 # 60 "./src/gstrans.h"
6162 typedef struct gs_transparency_source_s {
6164 gs_transparency_mask_t *mask;
6165 } gs_transparency_source_t;
6167 struct gs_pdf14trans_params_s {
6169 pdf14_compositor_operations pdf14_op;
6177 gs_transparency_channel_selector_t csel;
6179 gs_transparency_mask_subtype_t subtype;
6180 int Background_components;
6181 bool function_is_identity;
6182 float Background[(8 * 8)];
6183 float GrayBackground;
6184 gs_function_t *transfer_function;
6185 byte transfer_fn[256];
6187 gs_blend_mode_t blend_mode;
6189 gs_transparency_source_t opacity;
6190 gs_transparency_source_t shape;
6194 typedef struct gs_pdf14trans_params_s gs_pdf14trans_params_t;
6201 typedef struct gs_pdf14trans_s {
6202 const gs_composite_type_t *type; gs_id id; rc_header rc;
6203 gs_pdf14trans_params_t params;
6208 int gs_setblendmode(gs_state *, gs_blend_mode_t);
6209 gs_blend_mode_t gs_currentblendmode(const gs_state *);
6210 int gs_setopacityalpha(gs_state *, floatp);
6211 float gs_currentopacityalpha(const gs_state *);
6212 int gs_setshapealpha(gs_state *, floatp);
6213 float gs_currentshapealpha(const gs_state *);
6214 int gs_settextknockout(gs_state *, bool);
6215 bool gs_currenttextknockout(const gs_state *);
6222 gs_transparency_state_type_t
6223 gs_current_transparency_type(const gs_state *pgs);
6229 int gs_push_pdf14trans_device(gs_state * pgs);
6231 int gs_pop_pdf14trans_device(gs_state * pgs);
6233 void gs_trans_group_params_init(gs_transparency_group_params_t *ptgp);
6235 int gs_begin_transparency_group(gs_state * pgs,
6236 const gs_transparency_group_params_t *ptgp,
6237 const gs_rect *pbbox);
6239 int gs_end_transparency_group(gs_state *pgs);
6241 void gs_trans_mask_params_init(gs_transparency_mask_params_t *ptmp,
6242 gs_transparency_mask_subtype_t subtype);
6244 int gs_begin_transparency_mask(gs_state *pgs,
6245 const gs_transparency_mask_params_t *ptmp,
6246 const gs_rect *pbbox, bool mask_is_image);
6248 int gs_end_transparency_mask(gs_state *pgs,
6249 gs_transparency_channel_selector_t csel);
6251 int gs_init_transparency_mask(gs_state *pgs,
6252 gs_transparency_channel_selector_t csel);
6254 int gs_discard_transparency_layer(gs_state *pgs);
6259 int gx_begin_transparency_group(gs_imager_state * pis, gx_device * pdev,
6260 const gs_pdf14trans_params_t * pparams);
6262 int gx_end_transparency_group(gs_imager_state * pis, gx_device * pdev);
6264 int gx_init_transparency_mask(gs_imager_state * pis,
6265 const gs_pdf14trans_params_t * pparams);
6267 int gx_begin_transparency_mask(gs_imager_state * pis, gx_device * pdev,
6268 const gs_pdf14trans_params_t * pparams);
6270 int gx_end_transparency_mask(gs_imager_state * pis, gx_device * pdev,
6271 const gs_pdf14trans_params_t * pparams);
6273 int gx_discard_transparency_layer(gs_imager_state *pis);
6278 int gs_is_pdf14trans_compositor(const gs_composite_t * pct);
6279 # 32 "./src/gxistate.h" 2
6280 # 86 "./src/gxistate.h"
6281 typedef struct gs_halftone_s gs_halftone;
6282 # 109 "./src/gxistate.h"
6283 typedef struct gx_transfer_s {
6284 int red_component_num;
6285 gx_transfer_map *red;
6286 int green_component_num;
6287 gx_transfer_map *green;
6288 int blue_component_num;
6289 gx_transfer_map *blue;
6290 int gray_component_num;
6291 gx_transfer_map *gray;
6293 # 187 "./src/gxistate.h"
6294 typedef struct gs_devicen_color_map_s {
6295 bool use_alt_cspace;
6299 separation_type sep_type;
6300 uint num_components;
6303 int color_map[(8 * 8)];
6304 } gs_devicen_color_map;
6305 # 253 "./src/gxistate.h"
6306 struct gs_imager_state_s {
6307 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;
6309 # 274 "./src/gxistate.h"
6310 int gs_imager_state_initialize(gs_imager_state * pis, gs_memory_t * mem);
6315 gs_imager_state_copy(const gs_imager_state * pis, gs_memory_t * mem);
6318 void gs_imager_state_copied(gs_imager_state * pis);
6321 void gs_imager_state_pre_assign(gs_imager_state *to,
6322 const gs_imager_state *from);
6326 void gs_imager_state_release(gs_imager_state * pis);
6327 int gs_currentscreenphase_pis(const gs_imager_state *, gs_int_point *, gs_color_select_t);
6328 # 26 "./src/gdevvec.h" 2
6329 # 1 "./src/gxhldevc.h" 1
6330 # 66 "./src/gxhldevc.h"
6331 typedef struct gx_hl_saved_color_s {
6332 gs_id color_space_id;
6335 gs_client_color ccolor;
6336 gx_device_color_saved saved_dev_color;
6337 } gx_hl_saved_color;
6342 void gx_hld_saved_color_init(gx_hl_saved_color * psc);
6348 const gs_state * gx_hld_get_gstate_ptr(const gs_imager_state * pis);
6349 # 98 "./src/gxhldevc.h"
6350 bool gx_hld_save_color(const gs_imager_state * pis,
6351 const gx_device_color * pdevc, gx_hl_saved_color * psc);
6358 bool gx_hld_saved_color_equal(const gx_hl_saved_color * psc1,
6359 const gx_hl_saved_color * psc2);
6364 bool gx_hld_saved_color_same_cspace(const gx_hl_saved_color * psc1,
6365 const gx_hl_saved_color * psc2);
6371 gx_hld_is_hl_color_available(const gs_imager_state * pis,
6372 const gx_device_color * pdevc);
6373 # 129 "./src/gxhldevc.h"
6375 non_pattern_color_space,
6376 pattern_color_sapce,
6378 } gx_hld_get_color_space_and_ccolor_status;
6379 # 158 "./src/gxhldevc.h"
6380 gx_hld_get_color_space_and_ccolor_status gx_hld_get_color_space_and_ccolor(
6381 const gs_imager_state * pis, const gx_device_color * pdevc,
6382 const gs_color_space ** ppcs, const gs_client_color ** ppcc);
6383 # 169 "./src/gxhldevc.h"
6384 int gx_hld_get_number_color_components(const gs_imager_state * pis);
6391 invalid_color_info = 2,
6392 invalid_component_requested = 3
6393 } gx_hld_get_color_component_status;
6394 # 188 "./src/gxhldevc.h"
6395 gx_hld_get_color_component_status gx_hld_get_color_component(
6396 const gs_imager_state * pis, const gx_device_color * pdevc,
6397 int comp_numi, float * output);
6398 # 27 "./src/gdevvec.h" 2
6399 # 62 "./src/gdevvec.h"
6400 typedef struct gx_device_vector_s gx_device_vector;
6401 # 77 "./src/gdevvec.h"
6403 gx_path_type_none = 0,
6408 gx_path_type_fill = 1,
6409 gx_path_type_stroke = 2,
6410 gx_path_type_clip = 4,
6411 gx_path_type_winding_number = 0,
6412 gx_path_type_even_odd = 8,
6413 gx_path_type_optimize = 16,
6414 gx_path_type_always_close = 32,
6415 gx_path_type_rule = gx_path_type_winding_number | gx_path_type_even_odd
6420 } gx_rect_direction_t;
6421 typedef struct gx_device_vector_procs_s {
6423 int (*beginpage) (gx_device_vector * vdev);
6425 int (*setlinewidth) (gx_device_vector * vdev, floatp width);
6426 int (*setlinecap) (gx_device_vector * vdev, gs_line_cap cap);
6427 int (*setlinejoin) (gx_device_vector * vdev, gs_line_join join);
6428 int (*setmiterlimit) (gx_device_vector * vdev, floatp limit);
6429 int (*setdash) (gx_device_vector * vdev, const float *pattern,
6430 uint count, floatp offset);
6431 int (*setflat) (gx_device_vector * vdev, floatp flatness);
6432 int (*setlogop) (gx_device_vector * vdev, gs_logical_operation_t lop,
6433 gs_logical_operation_t diff);
6435 bool (*can_handle_hl_color) (gx_device_vector * vdev, const gs_imager_state * pis,
6436 const gx_drawing_color * pdc);
6437 int (*setfillcolor) (gx_device_vector * vdev, const gs_imager_state * pis,
6438 const gx_drawing_color * pdc);
6439 int (*setstrokecolor) (gx_device_vector * vdev, const gs_imager_state * pis,
6440 const gx_drawing_color * pdc);
6443 int (*dopath) (gx_device_vector * vdev, const gx_path * ppath,
6444 gx_path_type_t type, const gs_matrix *pmat);
6445 int (*dorect) (gx_device_vector * vdev, fixed x0, fixed y0, fixed x1,
6446 fixed y1, gx_path_type_t type);
6447 int (*beginpath) (gx_device_vector * vdev, gx_path_type_t type);
6448 int (*moveto) (gx_device_vector * vdev, floatp x0, floatp y0,
6449 floatp x, floatp y, gx_path_type_t type);
6450 int (*lineto) (gx_device_vector * vdev, floatp x0, floatp y0,
6451 floatp x, floatp y, gx_path_type_t type);
6452 int (*curveto) (gx_device_vector * vdev, floatp x0, floatp y0,
6453 floatp x1, floatp y1, floatp x2, floatp y2,
6454 floatp x3, floatp y3, gx_path_type_t type);
6455 int (*closepath) (gx_device_vector * vdev, floatp x0, floatp y0,
6456 floatp x_start, floatp y_start, gx_path_type_t type);
6457 int (*endpath) (gx_device_vector * vdev, gx_path_type_t type);
6458 } gx_device_vector_procs;
6462 int gdev_vector_setflat(gx_device_vector * vdev, floatp flatness);
6466 int gdev_vector_dopath(gx_device_vector * vdev, const gx_path * ppath,
6467 gx_path_type_t type, const gs_matrix *pmat);
6470 int gdev_vector_dorect(gx_device_vector * vdev, fixed x0, fixed y0,
6471 fixed x1, fixed y1, gx_path_type_t type);
6472 # 203 "./src/gdevvec.h"
6473 struct gx_device_vector_s {
6474 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;
6479 extern const gs_memory_struct_type_t st_device_vector;
6480 # 220 "./src/gdevvec.h"
6481 void gdev_vector_init(gx_device_vector * vdev);
6484 void gdev_vector_reset(gx_device_vector * vdev);
6485 # 234 "./src/gdevvec.h"
6486 int gdev_vector_open_file_options(gx_device_vector * vdev,
6487 uint strmbuf_size, int open_options);
6495 stream *gdev_vector_stream(gx_device_vector * vdev);
6499 int gdev_vector_update_log_op(gx_device_vector * vdev,
6500 gs_logical_operation_t lop);
6504 int gdev_vector_update_fill_color(gx_device_vector * vdev,
6505 const gs_imager_state * pis,
6506 const gx_drawing_color * pdcolor);
6510 int gdev_vector_prepare_fill(gx_device_vector * vdev,
6511 const gs_imager_state * pis,
6512 const gx_fill_params * params,
6513 const gx_drawing_color * pdcolor);
6520 int gdev_vector_prepare_stroke(gx_device_vector * vdev,
6521 const gs_imager_state * pis,
6522 const gx_stroke_params * params,
6523 const gx_drawing_color * pdcolor,
6532 int gdev_vector_stroke_scaling(const gx_device_vector *vdev,
6533 const gs_imager_state *pis,
6534 double *pscale, gs_matrix *pmat);
6537 typedef struct gdev_vector_dopath_state_s {
6539 gx_device_vector *vdev;
6540 gx_path_type_t type;
6542 gs_matrix scale_mat;
6546 } gdev_vector_dopath_state_t;
6547 void gdev_vector_dopath_init(gdev_vector_dopath_state_t *state,
6548 gx_device_vector *vdev,
6549 gx_path_type_t type, const gs_matrix *pmat);
6552 int gdev_vector_dopath_segment(gdev_vector_dopath_state_t *state, int pe_op,
6553 gs_fixed_point vs[3]);
6559 int gdev_vector_write_polygon(gx_device_vector * vdev,
6560 const gs_fixed_point * points, uint count,
6561 bool close, gx_path_type_t type);
6564 int gdev_vector_write_rectangle(gx_device_vector * vdev,
6565 fixed x0, fixed y0, fixed x1, fixed y1,
6566 bool close, gx_rect_direction_t dir);
6570 int gdev_vector_write_clip_path(gx_device_vector * vdev,
6571 const gx_clip_path * pcpath);
6575 int gdev_vector_update_clip_path(gx_device_vector * vdev,
6576 const gx_clip_path * pcpath);
6579 int gdev_vector_close_file(gx_device_vector * vdev);
6580 # 343 "./src/gdevvec.h"
6581 typedef struct gdev_vector_image_enum_s {
6582 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;
6583 } gdev_vector_image_enum_t;
6585 extern const gs_memory_struct_type_t st_vector_image_enum;
6586 # 358 "./src/gdevvec.h"
6587 int gdev_vector_begin_image(gx_device_vector * vdev,
6588 const gs_imager_state * pis, const gs_image_t * pim,
6589 gs_image_format_t format, const gs_int_rect * prect,
6590 const gx_drawing_color * pdcolor, const gx_clip_path * pcpath,
6591 gs_memory_t * mem, const gx_image_enum_procs_t * pprocs,
6592 gdev_vector_image_enum_t * pie);
6596 int gdev_vector_end_image(gx_device_vector * vdev,
6597 gdev_vector_image_enum_t * pie, bool draw_last, gx_color_index pad);
6602 int gdev_vector_put_params(gx_device *dev, gs_param_list *plist);
6603 int gdev_vector_get_params(gx_device *dev, gs_param_list *plist);
6608 int gdev_vector_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
6610 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);
6612 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);
6615 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);
6616 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);
6617 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);
6618 # 26 "./src/gdevpsdf.h" 2
6620 # 1 "./src/strimpl.h" 1
6621 # 124 "./src/strimpl.h"
6622 struct stream_template_s {
6625 gs_memory_type_ptr_t stype;
6628 int (*init)(stream_state *);
6632 int (*process)(stream_state *, stream_cursor_read *, stream_cursor_write *, bool);
6639 void (*release)(stream_state *);
6643 void (*set_defaults)(stream_state *);
6646 int (*reinit)(stream_state *);
6651 int stream_move(stream_cursor_read *, stream_cursor_write *);
6655 hex_ignore_garbage = 0,
6656 hex_ignore_whitespace = 1,
6657 hex_ignore_leading_whitespace = 2
6659 int s_hex_process(stream_cursor_read *, stream_cursor_write *, int *, hex_syntax);
6660 # 28 "./src/gdevpsdf.h" 2
6661 # 1 "./src/sa85x.h" 1
6662 # 21 "./src/sa85x.h"
6663 # 1 "./src/sa85d.h" 1
6664 # 22 "./src/sa85d.h"
6665 typedef struct stream_A85D_state_s {
6666 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
6669 } stream_A85D_state;
6670 # 35 "./src/sa85d.h"
6671 extern const stream_template s_A85D_template;
6672 # 22 "./src/sa85x.h" 2
6675 typedef struct stream_A85E_state_s {
6676 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
6680 } stream_A85E_state;
6687 extern const stream_template s_A85E_template;
6688 # 29 "./src/gdevpsdf.h" 2
6689 # 1 "./src/scfx.h" 1
6693 # 1 "./src/gsbittab.h" 1
6694 # 41 "./src/gsbittab.h"
6695 extern const byte byte_reverse_bits[256];
6700 extern const byte byte_right_mask[9];
6705 extern const byte byte_count_bits[256];
6706 # 60 "./src/gsbittab.h"
6708 byte_bit_run_length_0[256], byte_bit_run_length_1[256],
6709 byte_bit_run_length_2[256], byte_bit_run_length_3[256],
6710 byte_bit_run_length_4[256], byte_bit_run_length_5[256],
6711 byte_bit_run_length_6[256], byte_bit_run_length_7[256];
6717 extern const byte *const byte_bit_run_length[8];
6718 extern const byte *const byte_bit_run_length_neg[8];
6724 extern const byte byte_acegbdfh_to_abcdefgh[256];
6725 # 21 "./src/shc.h" 2
6727 typedef struct hc_definition_s {
6734 typedef struct stream_hc_state_s {
6735 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;
6738 typedef struct hce_code_s {
6745 typedef struct hce_table_s {
6750 void hc_put_code_proc(bool, byte *, uint);
6752 byte *hc_put_last_bits_proc(stream_hc_state *, byte *, uint, int);
6754 typedef struct hcd_code_s {
6759 typedef struct hcd_table_s {
6764 # 22 "./src/scfx.h" 2
6766 typedef struct stream_CF_state_s {
6767 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;
6770 typedef struct stream_CFE_state_s {
6771 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;
6786 extern const stream_template s_CFE_template;
6789 typedef struct stream_CFD_state_s {
6790 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;
6807 bool skipping_damage;
6823 extern const stream_template s_CFD_template;
6824 # 30 "./src/gdevpsdf.h" 2
6825 # 1 "./src/spsdf.h" 1
6826 # 34 "./src/spsdf.h"
6827 void s_write_ps_string(stream * s, const byte * str, uint size, int print_ok);
6834 int s_alloc_position_stream(stream ** ps, gs_memory_t * mem);
6840 typedef struct param_printer_params_s {
6843 const char *item_prefix;
6844 const char *item_suffix;
6846 } param_printer_params_t;
6851 typedef struct printer_param_list_s {
6852 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
6854 param_printer_params_t params;
6856 } printer_param_list_t;
6863 extern const param_printer_params_t param_printer_params_default;
6864 int s_alloc_param_printer(gs_param_list ** pplist,
6865 const param_printer_params_t * ppp, stream * s,
6867 void s_free_param_printer(gs_param_list * plist);
6869 int s_init_param_printer(printer_param_list_t *prlist,
6870 const param_printer_params_t * ppp, stream * s);
6871 void s_release_param_printer(printer_param_list_t *prlist);
6872 # 31 "./src/gdevpsdf.h" 2
6874 extern const stream_template s_DCTE_template;
6875 # 43 "./src/gdevpsdf.h"
6876 typedef struct psdf_image_params_s {
6877 gs_c_param_list *ACSDict;
6881 gs_c_param_list *Dict;
6883 float DownsampleThreshold;
6884 enum psdf_downsample_type {
6894 const char *AutoFilterStrategy;
6895 const stream_template *filter_template;
6896 } psdf_image_params;
6903 extern const stream_template s_CFE_template;
6906 typedef struct psdf_distiller_params_s {
6910 bool ASCII85EncodePages;
6911 enum psdf_auto_rotate_pages {
6925 enum psdf_default_rendering_intent {
6929 ri_RelativeColorimetric,
6930 ri_AbsoluteColorimetric
6931 } DefaultRenderingIntent;
6938 bool LockDistillerParams;
6939 bool LZWEncodePages;
6941 bool PreserveOPIComments;
6942 bool UseFlateCompression;
6946 gs_const_string CalCMYKProfile;
6947 gs_const_string CalGrayProfile;
6948 gs_const_string CalRGBProfile;
6949 gs_const_string sRGBProfile;
6950 enum psdf_color_conversion_strategy {
6951 ccs_LeaveColorUnchanged,
6952 ccs_UseDeviceDependentColor,
6953 ccs_UseDeviceIndependentColor,
6954 ccs_UseDeviceIndependentColorForImages,
6958 } ColorConversionStrategy;
6963 bool PreserveHalftoneInfo;
6964 bool PreserveOverprintSettings;
6965 enum psdf_transfer_function_info {
6969 } TransferFunctionInfo;
6972 enum psdf_ucr_and_bg_info {
6976 # 157 "./src/gdevpsdf.h"
6977 psdf_image_params ColorImage;
6978 bool ConvertCMYKImagesToRGB;
6979 bool ConvertImagesToIndexed;
6987 psdf_image_params GrayImage;
6994 psdf_image_params MonoImage;
7001 gs_param_string_array AlwaysEmbed;
7002 gs_param_string_array NeverEmbed;
7003 enum psdf_cannot_embed_font_policy {
7007 } CannotEmbedFontPolicy;
7017 } psdf_distiller_params;
7021 psdf_version_level1 = 1000,
7022 psdf_version_level1_color = 1100,
7023 psdf_version_level2 = 2000,
7024 psdf_version_level2_with_TT = 2010,
7025 psdf_version_level2_plus = 2017,
7026 psdf_version_ll3 = 3010
7028 # 220 "./src/gdevpsdf.h"
7029 typedef struct gx_device_psdf_s {
7030 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;
7032 # 240 "./src/gdevpsdf.h"
7033 extern const gs_memory_struct_type_t st_device_psdf;
7034 # 262 "./src/gdevpsdf.h"
7035 int gdev_psdf_get_params(gx_device *dev, gs_param_list *plist);
7036 int gdev_psdf_put_params(gx_device *dev, gs_param_list *plist);
7041 int psdf_setlinewidth(gx_device_vector * vdev, floatp width);
7042 int psdf_setlinecap(gx_device_vector * vdev, gs_line_cap cap);
7043 int psdf_setlinejoin(gx_device_vector * vdev, gs_line_join join);
7044 int psdf_setmiterlimit(gx_device_vector * vdev, floatp limit);
7045 int psdf_setdash(gx_device_vector * vdev, const float *pattern,
7046 uint count, floatp offset);
7047 int psdf_setflat(gx_device_vector * vdev, floatp flatness);
7048 int psdf_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
7049 gs_logical_operation_t diff);
7053 int psdf_dorect(gx_device_vector * vdev, fixed x0, fixed y0, fixed x1,
7054 fixed y1, gx_path_type_t type);
7055 int psdf_beginpath(gx_device_vector * vdev, gx_path_type_t type);
7056 int psdf_moveto(gx_device_vector * vdev, floatp x0, floatp y0,
7057 floatp x, floatp y, gx_path_type_t type);
7058 int psdf_lineto(gx_device_vector * vdev, floatp x0, floatp y0,
7059 floatp x, floatp y, gx_path_type_t type);
7060 int psdf_curveto(gx_device_vector * vdev, floatp x0, floatp y0,
7061 floatp x1, floatp y1, floatp x2,
7062 floatp y2, floatp x3, floatp y3, gx_path_type_t type);
7063 int psdf_closepath(gx_device_vector * vdev, floatp x0, floatp y0,
7064 floatp x_start, floatp y_start, gx_path_type_t type);
7069 typedef struct psdf_binary_writer_s {
7070 gs_memory_t *memory;
7073 gx_device_psdf *dev;
7079 } psdf_binary_writer;
7080 extern const gs_memory_struct_type_t st_psdf_binary_writer;
7088 int psdf_begin_binary(gx_device_psdf * pdev, psdf_binary_writer * pbw);
7092 int psdf_encode_binary(psdf_binary_writer * pbw,
7093 const stream_template * template, stream_state * ss);
7097 int psdf_CFE_binary(psdf_binary_writer * pbw, int w, int h, bool invert);
7105 int psdf_DCT_filter(gs_param_list *plist ,
7107 int Columns, int Rows, int Colors,
7108 psdf_binary_writer *pbw );
7111 bool psdf_is_converting_image_to_RGB(const gx_device_psdf * pdev,
7112 const gs_imager_state * pis, const gs_pixel_image_t * pim);
7118 int psdf_setup_image_filters(gx_device_psdf *pdev, psdf_binary_writer *pbw,
7119 gs_pixel_image_t *pim, const gs_matrix *pctm,
7120 const gs_imager_state * pis, bool lossless,
7126 int psdf_setup_lossless_filters(gx_device_psdf *pdev, psdf_binary_writer *pbw,
7127 gs_pixel_image_t *pim, bool in_line);
7130 int psdf_end_binary(psdf_binary_writer * pbw);
7133 int psdf_setup_compression_chooser(psdf_binary_writer *pbw,
7134 gx_device_psdf *pdev,
7135 int width, int height, int depth,
7136 int bits_per_sample);
7139 int psdf_setup_image_to_mask_filter(psdf_binary_writer *pbw, gx_device_psdf *pdev,
7140 int width, int height, int depth, int bits_per_sample, uint *MaskColor);
7143 int psdf_setup_image_colors_filter(psdf_binary_writer *pbw,
7144 gx_device_psdf *pdev, gs_pixel_image_t * pim,
7145 const gs_imager_state *pis);
7146 # 389 "./src/gdevpsdf.h"
7147 typedef struct psdf_set_color_commands_s {
7148 const char *setgray;
7149 const char *setrgbcolor;
7150 const char *setcmykcolor;
7151 const char *setcolorspace;
7152 const char *setcolor;
7153 const char *setcolorn;
7154 } psdf_set_color_commands_t;
7156 extern const psdf_set_color_commands_t
7157 psdf_set_fill_color_commands, psdf_set_stroke_color_commands;
7163 gx_color_index psdf_adjust_color_index(gx_device_vector *vdev,
7164 gx_color_index color);
7167 int psdf_set_color(gx_device_vector *vdev, const gx_drawing_color *pdc,
7168 const psdf_set_color_commands_t *ppscc);
7170 double psdf_round(double v, int precision, int radix);
7173 int psdf_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
7174 int psdf_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread);
7177 int psdf_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
7178 # 28 "./src/gdevpdfx.h" 2
7179 # 1 "./src/gxdevmem.h" 1
7180 # 21 "./src/gxdevmem.h"
7181 # 1 "./src/gxrplane.h" 1
7182 # 30 "./src/gxrplane.h"
7183 typedef struct gx_render_plane_s {
7187 } gx_render_plane_t;
7188 # 43 "./src/gxrplane.h"
7189 int gx_render_plane_init(gx_render_plane_t *render_plane,
7190 const gx_device *dev, int index);
7191 # 22 "./src/gxdevmem.h" 2
7192 # 76 "./src/gxdevmem.h"
7193 typedef struct gx_device_memory_s gx_device_memory;
7196 struct gx_device_memory_s {
7197 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;
7205 gs_memory_t *bitmap_memory;
7207 gs_memory_t *line_pointer_memory;
7208 bool foreign_line_pointers;
7215 gx_render_plane_t planes[(8 * 8)];
7219 gs_matrix initial_matrix;
7223 gs_const_string palette;
7227 bits32 rgbr, gbrg, brgb;
7231 gx_color_index abcde;
7232 bits32 abcd, bcde, cdea, deab, eabc;
7236 gx_color_index abcdef;
7237 bits32 abcd, cdef, efab;
7241 gx_color_index abcdefg;
7242 bits32 abcd, bcde, cdef, defg, efga, fgab, gabc;
7246 gx_color_index abcdefgh;
7252 gs_log2_scale_point log2_scale;
7253 int log2_alpha_bits;
7258 gx_color_index save_color;
7263 extern const gs_memory_struct_type_t st_device_memory;
7264 # 180 "./src/gxdevmem.h"
7265 ulong gdev_mem_bits_size(const gx_device_memory *mdev, int width,
7268 ulong gdev_mem_line_ptrs_size(const gx_device_memory *mdev, int width,
7271 ulong gdev_mem_data_size(const gx_device_memory *mdev, int width,
7273 # 196 "./src/gxdevmem.h"
7274 int gdev_mem_max_height(const gx_device_memory * dev, int width, ulong size,
7275 bool page_uses_transparency);
7276 # 207 "./src/gxdevmem.h"
7277 const gx_device_memory *gdev_mem_device_for_bits(int);
7280 const gx_device_memory *gdev_mem_word_device_for_bits(int);
7288 void gs_make_mem_mono_device(gx_device_memory * mdev, gs_memory_t * mem,
7289 gx_device * target);
7290 void gs_make_mem_device(gx_device_memory * mdev,
7291 const gx_device_memory * mdproto,
7292 gs_memory_t * mem, int page_device,
7293 gx_device * target);
7294 void gs_make_mem_abuf_device(gx_device_memory * adev, gs_memory_t * mem,
7296 const gs_log2_scale_point * pscale,
7297 int alpha_bits, int mapped_x);
7298 void gs_make_mem_alpha_device(gx_device_memory * adev, gs_memory_t * mem,
7299 gx_device * target, int alpha_bits);
7305 int gdev_mem_open_scan_lines(gx_device_memory *mdev, int setup_height);
7306 # 250 "./src/gxdevmem.h"
7307 int gdev_mem_set_line_ptrs(gx_device_memory *mdev,
7308 byte *base, int raster, byte **line_ptrs,
7312 void gdev_mem_mono_set_inverted(gx_device_memory * mdev, bool black_is_1);
7315 bool gs_device_is_memory(const gx_device *);
7318 bool gs_device_is_abuf(const gx_device *);
7319 # 29 "./src/gdevpdfx.h" 2
7325 typedef struct stream_arcfour_state_s stream_arcfour_state;
7326 # 60 "./src/gdevpdfx.h"
7340 typedef struct cos_object_s cos_object_t;
7341 typedef struct cos_stream_s cos_stream_t;
7342 typedef struct cos_dict_s cos_dict_t;
7343 typedef struct cos_array_s cos_array_t;
7344 typedef struct cos_value_s cos_value_t;
7345 typedef struct cos_object_procs_s cos_object_procs_t;
7346 typedef const cos_object_procs_t *cos_type_t;
7351 typedef struct pdf_text_state_s pdf_text_state_t;
7356 typedef struct pdf_char_glyph_pairs_s pdf_char_glyph_pairs_t;
7380 resourceFontDescriptor,
7382 resourceSoftMaskDict,
7386 } pdf_resource_type_t;
7387 # 155 "./src/gdevpdfx.h"
7388 typedef struct pdf_resource_s pdf_resource_t;
7389 struct pdf_resource_s {
7390 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;
7394 extern const gs_memory_struct_type_t st_pdf_resource;
7395 # 170 "./src/gdevpdfx.h"
7396 typedef struct pdf_x_object_s pdf_x_object_t;
7397 struct pdf_x_object_s {
7398 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;
7419 typedef struct pdf_char_proc_s pdf_char_proc_t;
7420 typedef struct pdf_char_proc_ownership_s pdf_char_proc_ownership_t;
7421 typedef struct pdf_font_s pdf_font_t;
7422 typedef struct pdf_text_data_s pdf_text_data_t;
7427 typedef struct pdf_outline_node_s {
7428 long id, parent_id, prev_id, first_id, last_id;
7431 } pdf_outline_node_t;
7432 typedef struct pdf_outline_level_s {
7433 pdf_outline_node_t first;
7434 pdf_outline_node_t last;
7436 } pdf_outline_level_t;
7443 typedef struct pdf_bead_s {
7444 long id, article_id, prev_id, next_id, page_id;
7447 typedef struct pdf_article_s pdf_article_t;
7448 struct pdf_article_s {
7449 pdf_article_t *next;
7450 cos_dict_t *contents;
7454 # 238 "./src/gdevpdfx.h"
7455 typedef struct pdf_resource_list_s {
7456 pdf_resource_t *chains[16];
7457 } pdf_resource_list_t;
7458 # 249 "./src/gdevpdfx.h"
7459 typedef struct pdf_stream_position_s {
7462 } pdf_stream_position_t;
7469 typedef struct pdf_text_rotation_s {
7472 } pdf_text_rotation_t;
7478 typedef struct pdf_page_dsc_info_s {
7480 int viewing_orientation;
7481 gs_rect bounding_box;
7482 } pdf_page_dsc_info_t;
7489 typedef struct pdf_page_s {
7492 pdf_procset_t procsets;
7494 long resource_ids[resourceFont + 1];
7496 cos_array_t *Annots;
7497 pdf_text_rotation_t text_rotation;
7498 pdf_page_dsc_info_t dsc_info;
7502 # 300 "./src/gdevpdfx.h"
7503 typedef struct pdf_temp_file_s {
7504 char file_name[260];
7513 typedef struct gx_device_pdf_s gx_device_pdf;
7519 typedef struct pdf_font_cache_elem_s pdf_font_cache_elem_t;
7520 struct pdf_font_cache_elem_s {
7521 pdf_font_cache_elem_t *next;
7525 struct pdf_font_resource_s *pdfont;
7527 double *real_widths;
7528 gx_device_pdf *pdev;
7530 # 339 "./src/gdevpdfx.h"
7531 typedef struct pdf_viewer_state_s {
7532 int transfer_not_identity;
7533 gs_id transfer_ids[4];
7534 float opacity_alpha;
7536 gs_blend_mode_t blend_mode;
7538 gs_id black_generation_id;
7539 gs_id undercolor_removal_id;
7544 bool fill_overprint;
7545 bool stroke_overprint;
7547 bool fill_used_process_color;
7548 bool stroke_used_process_color;
7549 gx_hl_saved_color saved_fill_color;
7550 gx_hl_saved_color saved_stroke_color;
7551 gx_line_params line_params;
7552 float dash_pattern[11];
7560 typedef struct pdf_substream_save_s {
7561 pdf_context_t context;
7562 pdf_text_state_t *text_state;
7567 cos_dict_t *substream_Resources;
7568 pdf_procset_t procsets;
7570 pdf_resource_t *font3;
7571 pdf_resource_t *accumulating_substream_resource;
7572 bool charproc_just_accumulated;
7573 bool accumulating_a_global_object;
7574 pdf_resource_t *pres_soft_mask_dict;
7575 gs_const_string objname;
7576 } pdf_substream_save;
7577 # 396 "./src/gdevpdfx.h"
7582 } pdf_compression_type;
7586 struct gx_device_pdf_s {
7587 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;
7589 double CompatibilityLevel;
7593 bool ParseDSCCommentsForDocInfo;
7594 bool ParseDSCComments;
7595 bool EmitDSCWarnings;
7596 bool CreateJobTicket;
7597 bool PreserveEPSInfo;
7598 bool AutoPositionEPSFiles;
7599 bool PreserveCopyPage;
7601 int OffOptimizations;
7604 gs_param_float_array PDFXTrimBoxToMediaBoxOffset;
7605 gs_param_float_array PDFXBleedBoxToTrimBoxOffset;
7606 bool PDFXSetBleedBoxToMediaBox;
7608 bool ReAssignCharacters;
7609 bool ReEncodeCharacters;
7610 long FirstObjectNumber;
7612 bool PrintStatistics;
7613 gs_param_string DocumentUUID;
7614 gs_param_string InstanceUUID;
7615 int DocumentTimeSeq;
7617 gs_param_string OPDFReadProcsetPath;
7618 bool CompressEntireFile;
7619 bool ResourcesBeforeUsage;
7621 bool HaveStrokeColor;
7622 bool HaveTransparency;
7623 bool PatternImagemask;
7627 long MaxClipPathSize;
7629 long MaxViewerMemorySize;
7630 long MaxShadingBitmapSize;
7633 long MaxInlineImageSize;
7635 gs_param_string OwnerPassword;
7636 gs_param_string UserPassword;
7640 gs_param_string NoEncrypt;
7641 bool EncryptMetadata;
7643 bool ComputeDocumentDigest;
7645 byte EncryptionO[32];
7646 byte EncryptionU[32];
7647 byte EncryptionKey[16];
7651 pdf_page_dsc_info_t doc_dsc_info;
7652 pdf_page_dsc_info_t page_dsc_info;
7654 bool fill_overprint, stroke_overprint;
7657 gs_id transfer_ids[4];
7658 int transfer_not_identity;
7659 gs_id black_generation_id, undercolor_removal_id;
7661 pdf_compression_type compression;
7662 pdf_compression_type compression_at_page_start;
7663 # 490 "./src/gdevpdfx.h"
7664 pdf_temp_file_t xref;
7669 pdf_temp_file_t asides;
7677 pdf_temp_file_t streams;
7683 pdf_temp_file_t pictures;
7688 cos_dict_t *Catalog;
7694 int max_referred_page;
7696 pdf_context_t context;
7697 long contents_length_id;
7699 pdf_procset_t procsets;
7700 pdf_text_data_t *text;
7701 pdf_text_rotation_t text_rotation;
7706 pdf_resource_list_t resources[NUM_RESOURCE_TYPES];
7708 pdf_resource_t *cs_Patterns[5];
7709 pdf_resource_t *Identity_ToUnicode_CMaps[2];
7710 pdf_resource_t *last_resource;
7711 pdf_outline_level_t outline_levels[32];
7713 int closed_outline_depth;
7715 pdf_article_t *articles;
7725 cos_dict_t *global_named_objects;
7729 cos_dict_t *local_named_objects;
7735 cos_array_t *NI_stack;
7742 cos_array_t *Namespace_stack;
7743 pdf_font_cache_elem_t *font_cache;
7748 gs_point char_width;
7757 cos_array_t *PageLabels;
7758 int PageLabels_current_page;
7759 cos_dict_t *PageLabels_current_label;
7760 # 594 "./src/gdevpdfx.h"
7761 gs_text_enum_t *pte;
7767 pdf_viewer_state vgstack[11];
7770 pdf_viewer_state vg_initial;
7771 bool vg_initial_set;
7776 pdf_substream_save *sbstack;
7779 cos_dict_t *substream_Resources;
7780 gs_color_space_index pcm_color_info_index;
7783 pdf_resource_t *font3;
7784 pdf_resource_t *accumulating_substream_resource;
7785 gs_matrix_fixed charproc_ctm;
7786 bool charproc_just_accumulated;
7789 bool accumulating_a_global_object;
7794 const pdf_char_glyph_pairs_t *cgp;
7798 int substituted_pattern_count;
7799 int substituted_pattern_drop_page;
7804 gs_id image_mask_id;
7805 bool image_mask_is_SMask;
7806 bool image_mask_skip;
7807 gs_matrix converting_image_matrix;
7808 double image_mask_scale;
7810 pdf_resource_t *pres_soft_mask_dict;
7812 gs_const_string objname;
7813 int OPDFRead_procset_length;
7814 void *find_resource_param;
7816 # 695 "./src/gdevpdfx.h"
7817 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);
7818 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);
7819 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);
7820 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);
7822 extern const gx_device_vector_procs pdf_vector_procs;
7823 int gdev_pdf_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
7824 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);
7825 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);
7827 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);
7829 int gdev_pdf_get_params(gx_device *dev, gs_param_list *plist);
7830 int gdev_pdf_put_params(gx_device *dev, gs_param_list *plist);
7832 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);
7833 int gdev_pdf_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function);
7834 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);
7836 int gdev_pdf_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length);
7838 int gdev_pdf_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
7839 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);
7840 int gdev_pdf_end_transparency_group(gx_device *dev, gs_imager_state *pis, gs_transparency_state_t **ppts);
7841 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);
7842 int gdev_pdf_end_transparency_mask(gx_device *dev, gs_transparency_mask_t **pptm);
7843 int gdev_pdf_discard_transparency_layer(gx_device *dev, gs_transparency_state_t **ppts);
7850 void pdf_initialize_ids(gx_device_pdf * pdev);
7853 void pdf_set_process_color_model(gx_device_pdf * pdev, int index);
7856 void pdf_reset_text(gx_device_pdf *pdev);
7863 int pdf_open_document(gx_device_pdf * pdev);
7868 long pdf_obj_ref(gx_device_pdf * pdev);
7871 long pdf_stell(gx_device_pdf * pdev);
7874 long pdf_open_obj(gx_device_pdf * pdev, long id);
7875 long pdf_begin_obj(gx_device_pdf * pdev);
7878 int pdf_end_obj(gx_device_pdf * pdev);
7884 int pdf_open_contents(gx_device_pdf * pdev, pdf_context_t context);
7887 int pdf_close_contents(gx_device_pdf * pdev, bool last);
7891 extern const char *const pdf_resource_type_names[];
7892 extern const gs_memory_struct_type_t *const pdf_resource_type_structs[];
7893 # 781 "./src/gdevpdfx.h"
7894 long pdf_open_separate(gx_device_pdf * pdev, long id);
7895 long pdf_begin_separate(gx_device_pdf * pdev);
7898 void pdf_reserve_object_id(gx_device_pdf * pdev, pdf_resource_t *ppres, long id);
7901 int pdf_alloc_aside(gx_device_pdf * pdev, pdf_resource_t ** plist,
7902 const gs_memory_struct_type_t * pst, pdf_resource_t **ppres,
7905 int pdf_begin_aside(gx_device_pdf * pdev, pdf_resource_t **plist,
7906 const gs_memory_struct_type_t * pst,
7907 pdf_resource_t **ppres);
7910 int pdf_begin_resource(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7911 gs_id rid, pdf_resource_t **ppres);
7914 int pdf_begin_resource_body(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7915 gs_id rid, pdf_resource_t **ppres);
7918 int pdf_alloc_resource(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7919 gs_id rid, pdf_resource_t **ppres, long id);
7922 int pdf_find_same_resource(gx_device_pdf * pdev,
7923 pdf_resource_type_t rtype, pdf_resource_t **ppres,
7924 int (*eq)(gx_device_pdf * pdev, pdf_resource_t *pres0, pdf_resource_t *pres1));
7928 pdf_resource_t *pdf_find_resource_by_resource_id(gx_device_pdf * pdev,
7929 pdf_resource_type_t rtype, gs_id id);
7932 pdf_resource_t *pdf_find_resource_by_gs_id(gx_device_pdf * pdev,
7933 pdf_resource_type_t rtype,
7936 void pdf_drop_resources(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7937 int (*cond)(gx_device_pdf * pdev, pdf_resource_t *pres));
7940 void pdf_print_resource_statistics(gx_device_pdf * pdev);
7944 int pdf_cancel_resource(gx_device_pdf * pdev, pdf_resource_t *pres,
7945 pdf_resource_type_t rtype);
7948 void pdf_forget_resource(gx_device_pdf * pdev, pdf_resource_t *pres1,
7949 pdf_resource_type_t rtype);
7952 int pdf_substitute_resource(gx_device_pdf *pdev, pdf_resource_t **ppres,
7953 pdf_resource_type_t rtype,
7954 int (*eq)(gx_device_pdf *pdev, pdf_resource_t *pres0, pdf_resource_t *pres1),
7958 long pdf_resource_id(const pdf_resource_t *pres);
7961 int pdf_end_separate(gx_device_pdf * pdev);
7964 int pdf_end_aside(gx_device_pdf * pdev);
7967 int pdf_end_resource(gx_device_pdf * pdev);
7972 int pdf_write_resource_objects(gx_device_pdf *pdev, pdf_resource_type_t rtype);
7979 void pdf_reverse_resource_chain(gx_device_pdf *pdev, pdf_resource_type_t rtype);
7984 int pdf_free_resource_objects(gx_device_pdf *pdev, pdf_resource_type_t rtype);
7988 int pdf_write_and_free_all_resource_objects(gx_device_pdf *pdev);
7994 int pdf_store_page_resources(gx_device_pdf *pdev, pdf_page_t *page);
7997 void pdf_copy_data(stream *s, FILE *file, long count, stream_arcfour_state *ss);
7998 void pdf_copy_data_safe(stream *s, FILE *file, long position, long count);
8001 int pdf_begin_encrypt(gx_device_pdf * pdev, stream **s, gs_id object_id);
8003 void pdf_end_encrypt(gx_device_pdf * pdev);
8005 int pdf_encrypt_init(const gx_device_pdf * pdev, gs_id object_id, stream_arcfour_state *psarc4);
8012 long pdf_page_id(gx_device_pdf * pdev, int page_num);
8015 pdf_page_t *pdf_current_page(gx_device_pdf *pdev);
8018 cos_dict_t *pdf_current_page_dict(gx_device_pdf *pdev);
8021 int pdf_open_page(gx_device_pdf * pdev, pdf_context_t context);
8024 int pdf_unclip(gx_device_pdf * pdev);
8027 int pdf_write_saved_string(gx_device_pdf * pdev, gs_string * pstr);
8032 int pdf_remember_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath);
8035 bool pdf_must_put_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath);
8038 int pdf_put_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath);
8042 typedef struct pdf_lcvd_s {
8043 gx_device_memory mdev;
8044 gx_device_memory *mask;
8045 gx_device_pdf *pdev;
8046 int (*std_fill_rectangle)(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
8047 int (*std_close_device)(gx_device *dev);
8052 bool has_background;
8054 gs_point path_offset;
8056 # 951 "./src/gdevpdfx.h"
8057 int pdf_setup_masked_image_converter(gx_device_pdf *pdev, gs_memory_t *mem, const gs_matrix *m, pdf_lcvd_t **pcvd,
8058 bool need_mask, int x, int y, int w, int h, bool write_on_close);
8059 int pdf_dump_converted_image(gx_device_pdf *pdev, pdf_lcvd_t *cvd);
8060 void pdf_remove_masked_image_converter(gx_device_pdf *pdev, pdf_lcvd_t *cvd, bool need_mask);
8067 void pdf_store_default_Producer(char buf[200]);
8070 typedef struct pdf_filter_names_s {
8071 const char *ASCII85Decode;
8072 const char *ASCIIHexDecode;
8073 const char *CCITTFaxDecode;
8074 const char *DCTDecode;
8075 const char *DecodeParms;
8077 const char *FlateDecode;
8078 const char *LZWDecode;
8079 const char *RunLengthDecode;
8080 const char *JBIG2Decode;
8081 const char *JPXDecode;
8082 } pdf_filter_names_t;
8083 # 985 "./src/gdevpdfx.h"
8084 void pdf_put_matrix(gx_device_pdf *pdev, const char *before,
8085 const gs_matrix *pmat, const char *after);
8088 typedef int (*pdf_put_name_chars_proc_t)(stream *, const byte *, uint);
8089 pdf_put_name_chars_proc_t
8090 pdf_put_name_chars_proc(const gx_device_pdf *pdev);
8091 int pdf_put_name_chars(const gx_device_pdf *pdev, const byte *nstr,
8093 int pdf_put_name(const gx_device_pdf *pdev, const byte *nstr, uint size);
8096 int pdf_put_string(const gx_device_pdf *pdev, const byte *str, uint size);
8099 int pdf_write_value(const gx_device_pdf *pdev, const byte *vstr, uint size, gs_id object_id);
8102 int pdf_put_filters(cos_dict_t *pcd, gx_device_pdf *pdev, stream *s,
8103 const pdf_filter_names_t *pfn);
8106 typedef struct pdf_data_writer_s {
8107 psdf_binary_writer binary;
8110 pdf_resource_t *pres;
8111 gx_device_pdf *pdev;
8114 } pdf_data_writer_t;
8115 # 1025 "./src/gdevpdfx.h"
8116 int pdf_begin_data_stream(gx_device_pdf *pdev, pdf_data_writer_t *pdw,
8117 int options, gs_id object_id);
8118 int pdf_append_data_stream_filters(gx_device_pdf *pdev, pdf_data_writer_t *pdw,
8119 int orig_options, gs_id object_id);
8121 int pdf_begin_data(gx_device_pdf *pdev, pdf_data_writer_t *pdw);
8124 int pdf_end_data(pdf_data_writer_t *pdw);
8125 # 1051 "./src/gdevpdfx.h"
8126 int pdf_function(gx_device_pdf *pdev, const gs_function_t *pfn,
8127 cos_value_t *pvalue);
8128 int pdf_function_scaled(gx_device_pdf *pdev, const gs_function_t *pfn,
8129 const gs_range_t *pranges, cos_value_t *pvalue);
8132 int pdf_write_function(gx_device_pdf *pdev, const gs_function_t *pfn,
8138 int pdf_write_font_bbox(gx_device_pdf *pdev, const gs_int_rect *pbox);
8139 # 1076 "./src/gdevpdfx.h"
8140 bool pdf_key_eq(const gs_param_string * pcs, const char *str);
8143 int pdfmark_scan_int(const gs_param_string * pstr, int *pvalue);
8146 int pdfmark_process(gx_device_pdf * pdev, const gs_param_string_array * pma);
8149 int pdfmark_close_outline(gx_device_pdf * pdev);
8152 int pdfmark_end_pagelabels(gx_device_pdf * pdev);
8155 int pdfmark_write_article(gx_device_pdf * pdev, const pdf_article_t * part);
8160 bool pdf_objname_is_valid(const byte *data, uint size);
8166 int pdf_find_named(gx_device_pdf * pdev, const gs_param_string * pname,
8167 cos_object_t **ppco);
8173 int pdf_create_named(gx_device_pdf *pdev, const gs_param_string *pname,
8174 cos_type_t cotype, cos_object_t **ppco, long id);
8175 int pdf_create_named_dict(gx_device_pdf *pdev, const gs_param_string *pname,
8176 cos_dict_t **ppcd, long id);
8184 int pdf_refer_named(gx_device_pdf *pdev, const gs_param_string *pname,
8185 cos_object_t **ppco);
8186 # 1130 "./src/gdevpdfx.h"
8187 int pdf_make_named(gx_device_pdf * pdev, const gs_param_string * pname,
8188 cos_type_t cotype, cos_object_t **ppco, bool assign_id);
8189 int pdf_make_named_dict(gx_device_pdf * pdev, const gs_param_string * pname,
8190 cos_dict_t **ppcd, bool assign_id);
8197 int pdf_get_named(gx_device_pdf * pdev, const gs_param_string * pname,
8198 cos_type_t cotype, cos_object_t **ppco);
8204 int pdf_push_namespace(gx_device_pdf *pdev);
8210 int pdf_pop_namespace(gx_device_pdf *pdev);
8218 int pdf_scan_token(const byte **pscan, const byte * end, const byte **ptoken);
8224 int pdf_scan_token_composite(const byte **pscan, const byte * end,
8225 const byte **ptoken);
8228 int pdf_replace_names(gx_device_pdf *pdev, const gs_param_string *from,
8229 gs_param_string *to);
8230 # 1184 "./src/gdevpdfx.h"
8231 int pdf_close_text_document(gx_device_pdf *pdev);
8237 pdf_text_data_t *pdf_text_data_alloc(gs_memory_t *mem);
8238 void pdf_set_text_state_default(pdf_text_state_t *pts);
8239 void pdf_text_state_copy(pdf_text_state_t *pts_to, pdf_text_state_t *pts_from);
8240 void pdf_reset_text_page(pdf_text_data_t *ptd);
8241 void pdf_reset_text_state(pdf_text_data_t *ptd);
8242 void pdf_close_text_page(gx_device_pdf *pdev);
8243 int pdf_get_stoted_text_size(pdf_text_state_t *state);
8247 int pdf_char_image_y_offset(const gx_device_pdf *pdev, int x, int y, int h);
8250 int pdf_begin_char_proc(gx_device_pdf * pdev, int w, int h, int x_width,
8251 int y_offset, gs_id id, pdf_char_proc_t **ppcp,
8252 pdf_stream_position_t * ppos);
8255 int pdf_end_char_proc(gx_device_pdf * pdev, pdf_stream_position_t * ppos);
8258 int pdf_do_char_image(gx_device_pdf * pdev, const pdf_char_proc_t * pcp,
8259 const gs_matrix * pimat);
8262 int pdf_start_charproc_accum(gx_device_pdf *pdev);
8264 int pdf_set_charproc_attrs(gx_device_pdf *pdev, gs_font *font, const double *pw, int narg,
8265 gs_text_cache_control_t control, gs_char ch);
8267 int pdf_end_charproc_accum(gx_device_pdf *pdev, gs_font *font, const pdf_char_glyph_pairs_t *cgp,
8268 gs_glyph glyph, gs_char output_char_code, const gs_const_string *gnstr);
8270 int pdf_open_aside(gx_device_pdf *pdev, pdf_resource_type_t rtype,
8271 gs_id id, pdf_resource_t **ppres, bool reserve_object_id, int options);
8274 int pdf_close_aside(gx_device_pdf *pdev);
8277 int pdf_enter_substream(gx_device_pdf *pdev, pdf_resource_type_t rtype,
8278 gs_id id, pdf_resource_t **ppres, bool reserve_object_id, bool compress);
8281 int pdf_exit_substream(gx_device_pdf *pdev);
8283 int pdf_add_procsets(cos_dict_t *pcd, pdf_procset_t procsets);
8285 int pdf_add_resource(gx_device_pdf *pdev, cos_dict_t *pcd, const char *key, pdf_resource_t *pres);
8290 int pdf_from_stream_to_text(gx_device_pdf *pdev);
8291 int pdf_from_string_to_text(gx_device_pdf *pdev);
8292 void pdf_close_text_contents(gx_device_pdf *pdev);
8293 # 24 "./src/gdevpdfe.c" 2
8294 # 1 "./src/gdevpdfg.h" 1
8295 # 24 "./src/gdevpdfg.h"
8296 typedef struct pdf_base_font_s pdf_base_font_t;
8297 # 35 "./src/gdevpdfg.h"
8298 typedef struct pdf_color_space_names_s {
8299 const char *DeviceCMYK;
8300 const char *DeviceGray;
8301 const char *DeviceRGB;
8302 const char *Indexed;
8303 } pdf_color_space_names_t;
8308 extern const pdf_color_space_names_t
8309 pdf_color_space_names,
8310 pdf_color_space_names_short;
8311 # 59 "./src/gdevpdfg.h"
8312 typedef struct pdf_color_space_s pdf_color_space_t;
8313 struct pdf_color_space_s {
8314 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;
8315 const gs_range_t *ranges;
8316 uint serialized_size;
8319 # 76 "./src/gdevpdfg.h"
8320 int pdf_cspace_init_Device(const gs_memory_t *mem, gs_color_space *pcs, int num_components);
8321 # 90 "./src/gdevpdfg.h"
8322 int pdf_color_space(gx_device_pdf *pdev, cos_value_t *pvalue,
8323 const gs_range_t **ppranges,
8324 const gs_color_space *pcs,
8325 const pdf_color_space_names_t *pcsn,
8327 int pdf_color_space_named(gx_device_pdf *pdev, cos_value_t *pvalue,
8328 const gs_range_t **ppranges,
8329 const gs_color_space *pcs,
8330 const pdf_color_space_names_t *pcsn,
8331 bool by_name, const byte *res_name, int name_length);
8334 int pdf_cs_Pattern_colored(gx_device_pdf *pdev, cos_value_t *pvalue);
8335 int pdf_cs_Pattern_uncolored(gx_device_pdf *pdev, cos_value_t *pvalue);
8336 int pdf_cs_Pattern_uncolored_hl(gx_device_pdf *pdev,
8337 const gs_color_space *pcs, cos_value_t *pvalue);
8340 void pdf_color_space_procsets(gx_device_pdf *pdev,
8341 const gs_color_space *pcs);
8346 void pdf_viewer_state_from_imager_state(gx_device_pdf * pdev,
8347 const gs_imager_state *pis, const gx_device_color *pdevc);
8350 void pdf_prepare_initial_viewer_state(gx_device_pdf * pdev, const gs_imager_state *pis);
8353 void pdf_reset_graphics(gx_device_pdf *pdev);
8356 void pdf_set_initial_color(gx_device_pdf * pdev, gx_hl_saved_color *saved_fill_color,
8357 gx_hl_saved_color *saved_stroke_color,
8358 bool *fill_used_process_color, bool *stroke_used_process_color);
8362 int pdf_set_pure_color(gx_device_pdf * pdev, gx_color_index color,
8363 gx_hl_saved_color * psc,
8364 bool *used_process_color,
8365 const psdf_set_color_commands_t *ppscc);
8366 int pdf_set_drawing_color(gx_device_pdf * pdev, const gs_imager_state * pis,
8367 const gx_drawing_color *pdc,
8368 gx_hl_saved_color * psc,
8369 bool *used_process_color,
8370 const psdf_set_color_commands_t *ppscc);
8375 int pdf_try_prepare_fill(gx_device_pdf *pdev, const gs_imager_state *pis);
8376 int pdf_prepare_drawing(gx_device_pdf *pdev, const gs_imager_state *pis, pdf_resource_t **ppres);
8377 int pdf_prepare_fill(gx_device_pdf *pdev, const gs_imager_state *pis);
8378 int pdf_prepare_stroke(gx_device_pdf *pdev, const gs_imager_state *pis);
8379 int pdf_prepare_image(gx_device_pdf *pdev, const gs_imager_state *pis);
8380 int pdf_prepare_imagemask(gx_device_pdf *pdev, const gs_imager_state *pis,
8381 const gx_drawing_color *pdcolor);
8382 int pdf_save_viewer_state(gx_device_pdf *pdev, stream *s);
8383 int pdf_restore_viewer_state(gx_device_pdf *pdev, stream *s);
8384 int pdf_end_gstate(gx_device_pdf *pdev, pdf_resource_t *pres);
8389 int pdf_string_to_cos_name(gx_device_pdf *pdev, const byte *str, uint len,
8390 cos_value_t *pvalue);
8394 typedef struct pdf_pattern_s pdf_pattern_t;
8395 struct pdf_pattern_s {
8396 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;
8397 pdf_pattern_t *substitute;
8405 pdf_resource_t *pdf_substitute_pattern(pdf_resource_t *pres);
8413 typedef struct pdf_image_names_s {
8414 pdf_color_space_names_t color_spaces;
8415 pdf_filter_names_t filter_names;
8416 const char *BitsPerComponent;
8417 const char *ColorSpace;
8420 const char *ImageMask;
8421 const char *Interpolate;
8423 } pdf_image_names_t;
8429 extern const pdf_image_names_t pdf_image_names_full, pdf_image_names_short;
8434 int pdf_put_image_values(cos_dict_t *pcd, gx_device_pdf *pdev,
8435 const gs_pixel_image_t *pic,
8436 const pdf_image_names_t *pin,
8437 const cos_value_t *pcsvalue);
8441 int pdf_put_image_filters(cos_dict_t *pcd, gx_device_pdf *pdev,
8442 const psdf_binary_writer * pbw,
8443 const pdf_image_names_t *pin);
8444 # 220 "./src/gdevpdfg.h"
8445 void pdf_make_bitmap_matrix(gs_matrix * pmat, int x, int y, int w, int h,
8449 void pdf_put_image_matrix(gx_device_pdf * pdev, const gs_matrix * pmat,
8453 int pdf_do_image_by_id(gx_device_pdf * pdev, double scale,
8454 const gs_matrix * pimat, bool in_contents, gs_id id);
8455 int pdf_do_image(gx_device_pdf * pdev, const pdf_resource_t * pres,
8456 const gs_matrix * pimat, bool in_contents);
8461 typedef struct pdf_image_writer_s {
8462 psdf_binary_writer binary[4];
8463 int alt_writer_count;
8464 const pdf_image_names_t *pin;
8465 pdf_resource_t *pres;
8468 const char *end_string;
8470 pdf_resource_t *pres_mask;
8472 extern const gs_memory_struct_type_t st_pdf_image_writer;
8479 void pdf_image_writer_init(pdf_image_writer * piw);
8486 int pdf_begin_write_image(gx_device_pdf * pdev, pdf_image_writer * piw,
8487 gx_bitmap_id id, int w, int h,
8488 cos_dict_t *pnamed, bool in_line);
8491 int pdf_begin_image_data(gx_device_pdf * pdev, pdf_image_writer * piw,
8492 const gs_pixel_image_t * pim,
8493 const cos_value_t *pcsvalue,
8494 int alt_writer_index);
8497 int pdf_copy_mask_bits(stream *s, const byte *base, int sourcex,
8498 int raster, int w, int h, byte invert);
8501 int pdf_copy_color_bits(stream *s, const byte *base, int sourcex,
8502 int raster, int w, int h, int bytes_per_pixel);
8506 pdf_complete_image_data(gx_device_pdf *pdev, pdf_image_writer *piw, int data_h,
8507 int width, int bits_per_pixel);
8510 int pdf_end_image_binary(gx_device_pdf *pdev, pdf_image_writer *piw,
8517 int pdf_end_write_image(gx_device_pdf * pdev, pdf_image_writer * piw);
8522 int pdf_make_alt_stream(gx_device_pdf * pdev, psdf_binary_writer * piw);
8527 int pdf_choose_compression(pdf_image_writer * piw, bool end_binary);
8530 int pdf_register_charproc_resource(gx_device_pdf *pdev, gs_id id, pdf_resource_type_t type);
8535 int pdf_store_pattern1_params(gx_device_pdf *pdev, pdf_resource_t *pres,
8536 gs_pattern1_instance_t *pinst);
8539 int pdf_put_colored_pattern(gx_device_pdf *pdev, const gx_drawing_color *pdc,
8540 const gs_color_space *pcs,
8541 const psdf_set_color_commands_t *ppscc,
8542 bool have_pattern_streams, pdf_resource_t **ppres);
8545 int pdf_put_uncolored_pattern(gx_device_pdf *pdev, const gx_drawing_color *pdc,
8546 const gs_color_space *pcs,
8547 const psdf_set_color_commands_t *ppscc,
8548 bool have_pattern_streams, pdf_resource_t **ppres);
8551 int pdf_put_pattern2(gx_device_pdf *pdev, const gx_drawing_color *pdc,
8552 const psdf_set_color_commands_t *ppscc,
8553 pdf_resource_t **ppres);
8559 int pdf_copy_color_data(gx_device_pdf * pdev, const byte * base, int sourcex,
8560 int raster, gx_bitmap_id id, int x, int y, int w, int h,
8561 gs_image_t *pim, pdf_image_writer *piw,
8569 int pdf_document_metadata(gx_device_pdf *pdev);
8570 int pdf_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont,
8571 const byte *digest, int digest_length, gs_id *metadata_object_id);
8572 # 25 "./src/gdevpdfe.c" 2
8573 # 1 "./src/gdevpdfo.h" 1
8574 # 59 "./src/gdevpdfo.h"
8575 typedef struct cos_element_s cos_element_t;
8576 typedef struct cos_stream_piece_s cos_stream_piece_t;
8582 struct cos_object_procs_s {
8586 void (*release)(cos_object_t *pco, client_name_t cname);
8590 int (*write)(const cos_object_t *pco, gx_device_pdf *pdev, gs_id object_id);
8594 int (*equal)(const cos_object_t *pco0, const cos_object_t *pco1, gx_device_pdf *pdev);
8597 # 120 "./src/gdevpdfo.h"
8598 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; };
8603 extern const cos_object_procs_t cos_generic_procs;
8604 # 140 "./src/gdevpdfo.h"
8606 COS_VALUE_SCALAR = 0,
8611 struct cos_value_s {
8612 cos_value_type_t value_type;
8615 cos_object_t *object;
8618 # 165 "./src/gdevpdfo.h"
8619 typedef struct cos_array_element_s cos_array_element_t;
8620 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; };
8621 extern const cos_object_procs_t cos_array_procs;
8624 typedef struct cos_dict_element_s cos_dict_element_t;
8625 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; };
8626 extern const cos_object_procs_t cos_dict_procs;
8629 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; };
8630 extern const cos_object_procs_t cos_stream_procs;
8631 # 188 "./src/gdevpdfo.h"
8632 cos_object_t *cos_object_alloc(gx_device_pdf *, client_name_t);
8633 cos_array_t *cos_array_alloc(gx_device_pdf *, client_name_t);
8634 cos_array_t *cos_array_from_floats(gx_device_pdf *, const float *, uint,
8636 cos_dict_t *cos_dict_alloc(gx_device_pdf *, client_name_t);
8637 cos_stream_t *cos_stream_alloc(gx_device_pdf *, client_name_t);
8640 gs_memory_t *cos_object_memory(const cos_object_t *);
8644 int cos_become(cos_object_t *, cos_type_t);
8647 void cos_release(cos_object_t *pco, client_name_t cname);
8649 int cos_write(const cos_object_t *pco, gx_device_pdf *pdev, gs_id object_id);
8653 const cos_value_t *cos_string_value(cos_value_t *, const byte *, uint);
8654 const cos_value_t *cos_c_string_value(cos_value_t *, const char *);
8655 const cos_value_t *cos_object_value(cos_value_t *, cos_object_t *);
8658 const cos_value_t *cos_resource_value(cos_value_t *, cos_object_t *);
8659 # 227 "./src/gdevpdfo.h"
8660 int cos_array_put(cos_array_t *, long, const cos_value_t *);
8661 int cos_array_put_no_copy(cos_array_t *, long, const cos_value_t *);
8662 int cos_array_add(cos_array_t *, const cos_value_t *);
8663 int cos_array_add_no_copy(cos_array_t *, const cos_value_t *);
8664 int cos_array_add_c_string(cos_array_t *, const char *);
8665 int cos_array_add_int(cos_array_t *, int);
8666 int cos_array_add_real(cos_array_t *, floatp);
8667 int cos_array_add_object(cos_array_t *, cos_object_t *);
8669 int cos_array_unadd(cos_array_t *, cos_value_t *);
8671 int cos_dict_put(cos_dict_t *, const byte *, uint, const cos_value_t *);
8672 int cos_dict_put_no_copy(cos_dict_t *, const byte *, uint,
8673 const cos_value_t *);
8674 int cos_dict_put_c_key(cos_dict_t *, const char *, const cos_value_t *);
8675 int cos_dict_put_c_key_string(cos_dict_t *, const char *, const byte *, uint);
8676 int cos_dict_put_c_key_int(cos_dict_t *, const char *, int);
8677 int cos_dict_put_c_key_bool(cos_dict_t *pcd, const char *key, bool value);
8678 int cos_dict_put_c_key_real(cos_dict_t *, const char *, floatp);
8679 int cos_dict_put_c_key_floats(cos_dict_t *, const char *, const float *, uint);
8680 int cos_dict_put_c_key_object(cos_dict_t *, const char *, cos_object_t *);
8681 int cos_dict_put_string(cos_dict_t *, const byte *, uint, const byte *, uint);
8682 int cos_dict_put_string_copy(cos_dict_t *pcd, const char *key, const char *value);
8683 int cos_dict_put_c_strings(cos_dict_t *, const char *, const char *);
8685 int cos_dict_move_all(cos_dict_t *, cos_dict_t *);
8687 int cos_stream_add(cos_stream_t *, uint);
8688 int cos_stream_add_bytes(cos_stream_t *, const byte *, uint);
8689 int cos_stream_add_stream_contents(cos_stream_t *, stream *);
8690 int cos_stream_release_pieces(cos_stream_t *pcs);
8691 cos_dict_t *cos_stream_dict(cos_stream_t *);
8692 # 273 "./src/gdevpdfo.h"
8693 const cos_array_element_t *
8694 cos_array_element_first(const cos_array_t *);
8695 const cos_array_element_t *
8696 cos_array_element_next(const cos_array_element_t *, long *,
8697 const cos_value_t **);
8700 const cos_value_t *cos_dict_find(const cos_dict_t *, const byte *, uint);
8701 const cos_value_t *cos_dict_find_c_key(const cos_dict_t *, const char *);
8703 int cos_dict_forall(const cos_dict_t *pcd, void *client_data,
8704 int (*proc)(void *client_data, const byte *key_data, uint key_size, const cos_value_t *v));
8707 typedef struct cos_param_list_writer_s {
8708 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
8711 } cos_param_list_writer_t;
8712 int cos_param_list_writer_init(cos_param_list_writer_t *, cos_dict_t *,
8717 stream *cos_write_stream_alloc(cos_stream_t *pcs, gx_device_pdf *pdev,
8718 client_name_t cname);
8721 cos_stream_t * cos_stream_from_pipeline(stream *s);
8723 stream * cos_write_stream_from_pipeline(stream *s);
8726 int cos_value_write(const cos_value_t *, gx_device_pdf *);
8729 int cos_dict_elements_write(const cos_dict_t *, gx_device_pdf *);
8730 int cos_stream_elements_write(const cos_stream_t *, gx_device_pdf *);
8731 int cos_stream_contents_write(const cos_stream_t *, gx_device_pdf *);
8734 long cos_stream_length(const cos_stream_t *pcs);
8738 int cos_dict_objects_write(const cos_dict_t *, gx_device_pdf *);
8739 int cos_dict_objects_delete(cos_dict_t *);
8742 int cos_write_object(cos_object_t *pco, gx_device_pdf *pdev);
8746 void cos_value_free(const cos_value_t *, const cos_object_t *, client_name_t);
8749 void cos_free(cos_object_t *pco, client_name_t cname);
8750 # 26 "./src/gdevpdfe.c" 2
8751 # 1 "./src/gdevpdtf.h" 1
8752 # 20 "./src/gdevpdtf.h"
8753 # 1 "./src/gdevpdtx.h" 1
8754 # 20 "./src/gdevpdtx.h"
8755 # 1 "./src/gdevpdt.h" 1
8756 # 38 "./src/gdevpdt.h"
8757 pdf_text_state_t *pdf_text_state_alloc(gs_memory_t *mem);
8762 pdf_text_data_t *pdf_text_data_alloc(gs_memory_t *mem);
8767 void pdf_reset_text_page(pdf_text_data_t *ptd);
8772 void pdf_reset_text_state(pdf_text_data_t *ptd);
8777 void pdf_close_text_page(gx_device_pdf *pdev);
8783 int pdf_close_text_document(gx_device_pdf *pdev);
8790 int pdf_from_stream_to_text(gx_device_pdf *pdev);
8795 int pdf_from_string_to_text(gx_device_pdf *pdev);
8800 void pdf_close_text_contents(gx_device_pdf *pdev);
8805 int pdf_char_image_y_offset(const gx_device_pdf *pdev, int x, int y, int h);
8808 int pdf_begin_char_proc(gx_device_pdf * pdev, int w, int h, int x_width,
8809 int y_offset, gs_id id, pdf_char_proc_t **ppcp,
8810 pdf_stream_position_t * ppos);
8813 int pdf_end_char_proc(gx_device_pdf * pdev,
8814 pdf_stream_position_t * ppos);
8817 int pdf_do_char_image(gx_device_pdf * pdev, const pdf_char_proc_t * pcp,
8818 const gs_matrix * pimat);
8819 # 21 "./src/gdevpdtx.h" 2
8820 # 60 "./src/gdevpdtx.h"
8821 typedef struct pdf_bitmap_fonts_s pdf_bitmap_fonts_t;
8825 typedef struct pdf_outline_fonts_s pdf_outline_fonts_t;
8833 struct pdf_text_data_s {
8834 pdf_outline_fonts_t *outline_fonts;
8835 pdf_bitmap_fonts_t *bitmap_fonts;
8836 pdf_text_state_t *text_state;
8838 # 85 "./src/gdevpdtx.h"
8839 typedef struct pdf_font_resource_s pdf_font_resource_t;
8844 long pdf_font_id(const pdf_font_resource_t *pdfont);
8846 int pdf_used_charproc_resources(gx_device_pdf *pdev, pdf_font_resource_t *pdfont);
8847 # 21 "./src/gdevpdtf.h" 2
8848 # 86 "./src/gdevpdtf.h"
8849 typedef struct gs_cmap_s gs_cmap_t;
8854 typedef struct gs_font_type0_s gs_font_type0;
8855 # 101 "./src/gdevpdtf.h"
8856 typedef struct pdf_font_descriptor_s pdf_font_descriptor_t;
8861 typedef struct pdf_char_glyph_pair_s pdf_char_glyph_pair_t;
8864 struct pdf_char_glyph_pair_s {
8868 # 126 "./src/gdevpdtf.h"
8869 typedef int (*pdf_font_write_contents_proc_t)
8870 (gx_device_pdf *, pdf_font_resource_t *);
8876 typedef struct pdf_encoding_element_s {
8878 gs_const_string str;
8880 } pdf_encoding_element_t;
8881 # 148 "./src/gdevpdtf.h"
8882 struct pdf_base_font_s {
8883 # 160 "./src/gdevpdtf.h"
8884 gs_font_base *copied;
8885 gs_font_base *complete;
8887 DO_SUBSET_UNKNOWN = 0,
8900 gs_string font_name;
8902 cos_dict_t *FontFile;
8904 # 192 "./src/gdevpdtf.h"
8907 pdf_resource_type_t type;
8908 } pdf_resource_ref_t;
8916 struct pdf_font_resource_s {
8917 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;
8919 pdf_font_write_contents_proc_t write_contents;
8921 pdf_font_descriptor_t *FontDescriptor;
8927 pdf_base_font_t *base_font;
8932 pdf_resource_t *res_ToUnicode;
8933 gs_cmap_t *cmap_ToUnicode;
8934 gs_glyph_mark_proc_t mark_glyph;
8935 void *mark_glyph_data;
8940 pdf_font_resource_t *DescendantFont;
8946 char Encoding_name[(((17) > (sizeof(long) * 8 / 3 + 1 + 4)) ? (17) : (sizeof(long) * 8 / 3 + 1 + 4)) + 1
8951 gs_const_string CMapName;
8953 bool cmap_is_standard;
8961 long CIDSystemInfo_id;
8962 ushort *CIDToGIDMap;
8963 gs_id glyphshow_font_id;
8967 pdf_font_resource_t *parent;
8973 int FirstChar, LastChar;
8978 gs_encoding_index_t BaseEncoding;
8979 pdf_encoding_element_t *Encoding;
8985 bool is_MM_instance;
8997 gs_int_rect FontBBox;
8998 gs_matrix FontMatrix;
8999 pdf_char_proc_ownership_t *char_procs;
9002 cos_dict_t *Resources;
9012 # 308 "./src/gdevpdtf.h"
9014 FONT_EMBED_STANDARD,
9018 # 322 "./src/gdevpdtf.h"
9019 typedef struct pdf_standard_font_s {
9020 pdf_font_resource_t *pdfont;
9021 gs_matrix orig_matrix;
9022 } pdf_standard_font_t;
9023 # 343 "./src/gdevpdtf.h"
9024 struct pdf_outline_fonts_s {
9025 pdf_standard_font_t *standard_fonts;
9027 # 358 "./src/gdevpdtf.h"
9028 pdf_outline_fonts_t *pdf_outline_fonts_alloc(gs_memory_t *mem);
9033 pdf_standard_font_t *pdf_standard_fonts(const gx_device_pdf *pdev);
9038 void pdf_clean_standard_fonts(const gx_device_pdf *pdev);
9041 int pdf_free_font_cache(gx_device_pdf *pdev);
9046 int pdf_font_type0_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9047 gs_id rid, pdf_font_resource_t *DescendantFont,
9048 const gs_const_string *CMapName);
9049 int pdf_font_type3_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9050 pdf_font_write_contents_proc_t write_contents);
9051 int pdf_font_std_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9052 bool is_original, gs_id rid, gs_font_base *pfont, int index);
9053 int pdf_font_simple_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9054 gs_id rid, pdf_font_descriptor_t *pfd);
9055 int pdf_font_cidfont_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9056 gs_id rid, pdf_font_descriptor_t *pfd);
9057 int pdf_obtain_cidfont_widths_arrays(gx_device_pdf *pdev, pdf_font_resource_t *pdfont,
9058 int wmode, double **w, double **w0, double **v);
9059 int font_resource_encoded_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9060 gs_id rid, font_type ftype,
9061 pdf_font_write_contents_proc_t write_contents);
9062 int pdf_assign_font_object_id(gx_device_pdf *pdev, pdf_font_resource_t *pdfont);
9065 int pdf_resize_resource_arrays(gx_device_pdf *pdev, pdf_font_resource_t *pfres,
9073 gs_font_base *pdf_font_resource_font(const pdf_font_resource_t *pdfont, bool complete);
9081 pdf_font_embed_t pdf_font_embed_status(gx_device_pdf *pdev, gs_font *font,
9083 pdf_char_glyph_pair_t *pairs, int num_glyphs);
9089 int pdf_compute_BaseFont(gx_device_pdf *pdev, pdf_font_resource_t *pdfont, bool finish);
9095 int pdf_close_text_document(gx_device_pdf *pdev);
9100 const gs_font_name *pdf_choose_font_name(gs_font *font, bool key_name);
9107 int pdf_cmap_alloc(gx_device_pdf *pdev, const gs_cmap_t *pcmap,
9108 pdf_resource_t **ppres , int font_index_only);
9113 int pdf_font_add_cid_to_gid(pdf_font_resource_t *pdfont, uint cid, uint gid);
9114 # 27 "./src/gdevpdfe.c" 2
9118 pdf_xml_data_write(stream *s, const byte *data, int data_length)
9120 int l = data_length;
9121 const byte *p = data;
9125 case '<' : stream_puts(s, "<"); break;
9126 case '>' : stream_puts(s, ">"); break;
9127 case '&' : stream_puts(s, "&"); break;
9128 case '\'': stream_puts(s, "'"); break;
9129 case '"' : stream_puts(s, """); break;
9131 if (*p < 32 || *p > 127)
9132 pprintd1(s, "&#%d;", *p);
9140 static __inline__ void
9141 pdf_xml_string_write(stream *s, const char *data)
9143 pdf_xml_data_write(s, (const byte *)data, strlen(data));
9147 static __inline__ void
9148 pdf_xml_tag_open_beg(stream *s, const char *data)
9151 stream_puts(s, data);
9155 static __inline__ void
9156 pdf_xml_tag_end(stream *s)
9162 static __inline__ void
9163 pdf_xml_tag_end_empty(stream *s)
9165 stream_puts(s, "/>");
9169 static __inline__ void
9170 pdf_xml_tag_open(stream *s, const char *data)
9173 stream_puts(s, data);
9178 static __inline__ void
9179 pdf_xml_tag_close(stream *s, const char *data)
9181 stream_puts(s, "</");
9182 stream_puts(s, data);
9187 static __inline__ void
9188 pdf_xml_attribute_name(stream *s, const char *data)
9191 stream_puts(s, data);
9196 static __inline__ void
9197 pdf_xml_attribute_value(stream *s, const char *data)
9200 pdf_xml_string_write(s, data);
9204 static __inline__ void
9205 pdf_xml_attribute_value_data(stream *s, const byte *data, int data_length)
9208 pdf_xml_data_write(s, data, data_length);
9213 static __inline__ void
9214 pdf_xml_ins_beg(stream *s, const char *data)
9216 stream_puts(s, "<?");
9217 stream_puts(s, data);
9221 static __inline__ void
9222 pdf_xml_ins_end(stream *s)
9224 stream_puts(s, "?>");
9228 static __inline__ void
9229 pdf_xml_newline(stream *s)
9231 stream_puts(s, "\n");
9235 static __inline__ void
9236 pdf_xml_copy(stream *s, const char *data)
9238 stream_puts(s, data);
9245 pdf_xmp_time(char *buf, int buf_length)
9250 char buf1[4+1+2+1+2+1];
9253 tms = *localtime(&t);
9256 tms.tm_year + 1900, tms.tm_mon + 1, tms.tm_mday);
9257 strncpy(buf, buf1, buf_length);
9261 pdf_xmp_write_docinfo_item(gx_device_pdf *pdev, stream *s, const char *key, const char *default_value,
9262 void(*write)(stream *s, const byte *data, int data_length))
9264 const cos_value_t *v = cos_dict_find(pdev->Info, (const byte *)key, strlen(key));
9266 if (v != ((void *)0) && (v->value_type == COS_VALUE_SCALAR ||
9267 v->value_type == COS_VALUE_CONST)) {
9268 if (v->contents.chars.size > 2 && v->contents.chars.data[0] == '(')
9269 write(s, v->contents.chars.data + 1, v->contents.chars.size - 2);
9271 write(s, v->contents.chars.data, v->contents.chars.size);
9273 stream_puts(s, default_value);
9277 pdf_uuid_time(gx_device_pdf *pdev)
9279 long *dt = pdev->uuid_time;
9283 t = (uint64_t)10000000 * dt[0] + dt[0] / 100;
9284 t += (uint64_t) (1000*1000*10)
9285 * (uint64_t) (60 * 60 * 24)
9286 * (uint64_t) (17+30+31+365*397+99);
9290 static void writehex(char **p, ulong v, int l)
9293 static const char digit[] = "0123456789abcdef";
9296 *((*p)++) = digit[v >> (i * 4) & 15];
9300 pdf_make_uuid(const byte node[6], uint64_t uuid_time, ulong time_seq, char *buf, int buf_length)
9303 ulong uuid_time_lo = (ulong)(uuid_time & 0xFFFFFFFF);
9304 ushort uuid_time_md = (ushort)((uuid_time >> 32) & 0xFFFF);
9305 ushort uuid_time_hi = (ushort)((uuid_time >> 48) & 0x0FFF);
9307 writehex(&p, uuid_time_lo, 4);
9309 writehex(&p, uuid_time_md, 2);
9311 writehex(&p, uuid_time_hi | (ushort)(1 << 12), 2);
9313 writehex(&p, (time_seq & 0x3F00) >> 8, 1);
9314 writehex(&p, time_seq & 0xFF, 1);
9316 writehex(&p, node[0], 1);
9317 writehex(&p, node[1], 1);
9318 writehex(&p, node[2], 1);
9319 writehex(&p, node[3], 1);
9320 writehex(&p, node[4], 1);
9321 writehex(&p, node[5], 1);
9323 strncpy(buf, b, buf_length);
9327 pdf_make_instance_uuid(gx_device_pdf *pdev, const byte digest[6], char *buf, int buf_length)
9329 if (pdev->InstanceUUID.size) {
9330 int l = (((buf_length - 1) < (pdev->InstanceUUID.size)) ? (buf_length - 1) : (pdev->InstanceUUID.size));
9332 memcpy(buf, pdev->InstanceUUID.data, l);
9335 pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf, buf_length);
9340 pdf_make_document_uuid(gx_device_pdf *pdev, const byte digest[6], char *buf, int buf_length)
9342 if (pdev->DocumentUUID.size) {
9343 int l = (((buf_length - 1) < (pdev->DocumentUUID.size)) ? (buf_length - 1) : (pdev->DocumentUUID.size));
9345 memcpy(buf, pdev->DocumentUUID.data, l);
9348 pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf, buf_length);
9352 static char dd[]={'\'', 0xEF, 0xBB, 0xBF, '\'', 0};
9358 pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
9360 char instance_uuid[40], document_uuid[40], date_time[40];
9362 stream *s = pdev->strm;
9364 code = pdf_make_instance_uuid(pdev, digest, instance_uuid, sizeof(instance_uuid));
9367 code = pdf_make_document_uuid(pdev, digest, document_uuid, sizeof(document_uuid));
9370 pdf_xmp_time(date_time, sizeof(date_time));
9371 pdf_xml_ins_beg(s, "xpacket");
9372 pdf_xml_attribute_name(s, "begin");
9373 pdf_xml_copy(s, dd);
9374 pdf_xml_attribute_name(s, "id");
9375 pdf_xml_attribute_value(s, "W5M0MpCehiHzreSzNTczkc9d");
9379 pdf_xml_copy(s, "<?adobe-xap-filters esc=\"CRLF\"?>\n");
9380 pdf_xml_copy(s, "<x:xmpmeta xmlns:x='adobe:ns:meta/'"
9381 " x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>\n");
9383 pdf_xml_copy(s, "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' "
9384 "xmlns:iX='http://ns.adobe.com/iX/1.0/'>\n");
9387 pdf_xml_tag_open_beg(s, "rdf:Description");
9388 pdf_xml_attribute_name(s, "rdf:about");
9389 pdf_xml_attribute_value(s, instance_uuid);
9390 pdf_xml_attribute_name(s, "xmlns:pdf");
9391 pdf_xml_attribute_value(s, "http://ns.adobe.com/pdf/1.3/");
9392 pdf_xml_attribute_name(s, "pdf:Producer");
9393 pdf_xmp_write_docinfo_item(pdev, s, "/Producer", "UnknownProduicer",
9394 pdf_xml_attribute_value_data);
9395 pdf_xml_tag_end_empty(s);
9398 pdf_xml_tag_open_beg(s, "rdf:Description");
9399 pdf_xml_attribute_name(s, "rdf:about");
9400 pdf_xml_attribute_value(s, instance_uuid);
9401 pdf_xml_attribute_name(s, "xmlns:xap");
9402 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/");
9403 pdf_xml_attribute_name(s, "xap:ModifyDate");
9404 pdf_xml_attribute_value(s, date_time);
9405 pdf_xml_attribute_name(s, "xap:CreateDate");
9406 pdf_xml_attribute_value(s, date_time);
9409 pdf_xml_tag_open_beg(s, "xap:CreatorTool");
9414 sprintf(buf, "%d.%02d", (int)(gs_revision / 100), (int)(gs_revision % 100));
9415 pdf_xml_string_write(s, gs_product);
9416 pdf_xml_string_write(s, " ");
9417 pdf_xml_string_write(s, buf);
9418 pdf_xml_string_write(s, " PDF Writer");
9420 pdf_xml_tag_close(s, "xap:CreatorTool");
9422 pdf_xml_tag_close(s, "rdf:Description");
9425 pdf_xml_tag_open_beg(s, "rdf:Description");
9426 pdf_xml_attribute_name(s, "rdf:about");
9427 pdf_xml_attribute_value(s, instance_uuid);
9428 pdf_xml_attribute_name(s, "xmlns:xapMM");
9429 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/mm/");
9430 pdf_xml_attribute_name(s, "xapMM:DocumentID");
9431 pdf_xml_attribute_value(s, document_uuid);
9432 pdf_xml_tag_end_empty(s);
9435 pdf_xml_tag_open_beg(s, "rdf:Description");
9436 pdf_xml_attribute_name(s, "rdf:about");
9437 pdf_xml_attribute_value(s, instance_uuid);
9438 pdf_xml_attribute_name(s, "xmlns:dc");
9439 pdf_xml_attribute_value(s, "http://purl.org/dc/elements/1.1/");
9440 pdf_xml_attribute_name(s, "dc:format");
9441 pdf_xml_attribute_value(s,"application/pdf");
9444 pdf_xml_tag_open(s, "dc:title");
9446 pdf_xml_tag_open(s, "rdf:Alt");
9448 pdf_xml_tag_open_beg(s, "rdf:li");
9449 pdf_xml_attribute_name(s, "xml:lang");
9450 pdf_xml_attribute_value(s, "x-default");
9453 pdf_xmp_write_docinfo_item(pdev, s, "/Title", "Untitled",
9454 pdf_xml_data_write);
9456 pdf_xml_tag_close(s, "rdf:li");
9458 pdf_xml_tag_close(s, "rdf:Alt");
9460 pdf_xml_tag_close(s, "dc:title");
9462 if (cos_dict_find(pdev->Info, (const byte *)"/Author", 7)) {
9463 pdf_xml_tag_open(s, "dc:creator");
9468 pdf_xml_tag_open(s, "rdf:Seq");
9470 pdf_xml_tag_open(s, "rdf:li");
9472 pdf_xmp_write_docinfo_item(pdev, s, "/Author", "Unknown",
9473 pdf_xml_data_write);
9475 pdf_xml_tag_close(s, "rdf:li");
9477 pdf_xml_tag_close(s, "rdf:Seq");
9479 pdf_xml_tag_close(s, "dc:creator");
9482 pdf_xml_tag_close(s, "rdf:Description");
9485 pdf_xml_copy(s, "</rdf:RDF>\n");
9487 pdf_xml_copy(s, "</x:xmpmeta>\n");
9489 pdf_xml_copy(s, " \n");
9490 pdf_xml_copy(s, " \n");
9491 pdf_xml_copy(s, "<?xpacket end='w'?>");
9496 pdf_document_metadata(gx_device_pdf *pdev)
9498 if (pdev->CompatibilityLevel < 1.4)
9500 if (pdev->ParseDSCCommentsForDocInfo || pdev->PreserveEPSInfo) {
9501 pdf_resource_t *pres;
9507 (*(pdev->strm)->procs.flush)(pdev->strm);
9508 s_MD5C_get_digest(pdev->strm, digest, sizeof(digest));
9509 if (pdev->EncryptMetadata)
9511 code = pdf_open_aside(pdev, resourceOther, 0L, &pres, ((bool)1), options);
9514 code = pdf_write_document_metadata(pdev, digest);
9517 code = pdf_close_aside(pdev);
9520 code = cos_write_object(((cos_object_t *)&((pres->object)->cos_procs)), pdev);
9523 sprintf(buf, "%ld 0 R", pres->object->id);
9524 cos_dict_put_c_key_object(pdev->Catalog, "/Metadata", pres->object);
9533 pdf_write_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont,
9534 const byte *digest, int digest_length)
9536 char instance_uuid[40];
9538 stream *s = pdev->strm;
9539 gs_font_info_t info;
9540 gs_font_base *pfont = pbfont->complete;
9542 if (pfont == ((void *)0))
9543 pfont = pbfont->copied;
9545 pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, instance_uuid, sizeof(instance_uuid));
9546 code = pfont->procs.font_info((gs_font *)pfont, ((void *)0),
9552 pdf_xml_ins_beg(s, "xpacket");
9553 pdf_xml_attribute_name(s, "begin");
9554 pdf_xml_copy(s, dd);
9555 pdf_xml_attribute_name(s, "id");
9556 pdf_xml_attribute_value(s, "W5M0MpCehiHzreSzNTczkc9d");
9560 pdf_xml_copy(s, "<?adobe-xap-filters esc=\"CRLF\"?>\n");
9561 pdf_xml_copy(s, "<x:xmpmeta xmlns:x='adobe:ns:meta/'"
9562 " x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>\n");
9564 pdf_xml_copy(s, "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' "
9565 "xmlns:iX='http://ns.adobe.com/iX/1.0/'>\n");
9568 pdf_xml_tag_open_beg(s, "rdf:Description");
9569 pdf_xml_attribute_name(s, "rdf:about");
9570 pdf_xml_attribute_value(s, instance_uuid);
9571 pdf_xml_attribute_name(s, "xmlns:xmp");
9572 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/");
9575 pdf_xml_tag_open_beg(s, "xmp:Title");
9578 pdf_xml_tag_open(s, "rdf:Alt");
9580 pdf_xml_tag_open_beg(s, "rdf:li");
9581 pdf_xml_attribute_name(s, "xml:lang");
9582 pdf_xml_attribute_value(s, "x-default");
9585 pdf_xml_data_write(s, pbfont->font_name.data, pbfont->font_name.size);
9587 pdf_xml_tag_close(s, "rdf:li");
9589 pdf_xml_tag_close(s, "rdf:Alt");
9591 pdf_xml_tag_close(s, "xmp:Title");
9593 pdf_xml_tag_close(s, "rdf:Description");
9597 pdf_xml_tag_open_beg(s, "rdf:Description");
9598 pdf_xml_attribute_name(s, "rdf:about");
9599 pdf_xml_attribute_value(s, instance_uuid);
9600 pdf_xml_attribute_name(s, "xmlns:xmpRights");
9601 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/rights/");
9603 if (info.members & 0x0040) {
9604 pdf_xml_tag_open_beg(s, "xmpRights:Copyright");
9607 pdf_xml_tag_open(s, "rdf:Alt");
9609 pdf_xml_tag_open_beg(s, "rdf:li");
9610 pdf_xml_attribute_name(s, "xml:lang");
9611 pdf_xml_attribute_value(s, "x-default");
9614 pdf_xml_data_write(s, info.Copyright.data, info.Copyright.size);
9616 pdf_xml_tag_close(s, "rdf:li");
9618 pdf_xml_tag_close(s, "rdf:Alt");
9620 pdf_xml_tag_close(s, "xmpRights:Copyright");
9623 pdf_xml_tag_open_beg(s, "xmpRights:Owner");
9626 pdf_xml_tag_open(s, "rdf:Alt");
9628 pdf_xml_tag_open_beg(s, "rdf:li");
9629 pdf_xml_attribute_name(s, "xml:lang");
9630 pdf_xml_attribute_value(s, "x-default");
9633 pdf_xml_data_write(s, info.Copyright.data, info.Copyright.size);
9635 pdf_xml_tag_close(s, "rdf:li");
9637 pdf_xml_tag_close(s, "rdf:Alt");
9639 pdf_xml_tag_close(s, "xmpRights:Owner");
9642 pdf_xml_tag_open_beg(s, "xmpRights:Marked");
9645 pdf_xml_string_write(s, "True");
9647 pdf_xml_tag_close(s, "xmpRights:Marked");
9649 if (info.members & 0x0080) {
9650 pdf_xml_tag_open_beg(s, "xmpRights:UsageTerms");
9653 pdf_xml_tag_open(s, "rdf:Alt");
9655 pdf_xml_tag_open_beg(s, "rdf:li");
9656 pdf_xml_attribute_name(s, "xml:lang");
9657 pdf_xml_attribute_value(s, "x-default");
9660 pdf_xml_data_write(s, info.Notice.data, info.Notice.size);
9662 pdf_xml_tag_close(s, "rdf:li");
9664 pdf_xml_tag_close(s, "rdf:Alt");
9666 pdf_xml_tag_close(s, "xmpRights:UsageTerms");
9668 pdf_xml_tag_close(s, "rdf:Description");
9671 pdf_xml_copy(s, "</rdf:RDF>\n");
9673 pdf_xml_copy(s, "</x:xmpmeta>\n");
9675 pdf_xml_copy(s, " \n");
9676 pdf_xml_copy(s, " \n");
9677 pdf_xml_copy(s, "<?xpacket end='w'?>");
9682 pdf_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont,
9683 const byte *digest, int digest_length, gs_id *metadata_object_id)
9685 *metadata_object_id = 0L;
9686 if (pdev->CompatibilityLevel < 1.4)
9695 pdf_resource_t *pres;
9700 (*(pdev->strm)->procs.flush)(pdev->strm);
9701 s_MD5C_get_digest(pdev->strm, digest, sizeof(digest));
9702 if (pdev->EncryptMetadata)
9704 code = pdf_open_aside(pdev, resourceOther, 0L, &pres, ((bool)1), options);
9707 code = pdf_write_font_metadata(pdev, pbfont, digest, digest_length);
9710 code = pdf_close_aside(pdev);
9713 code = cos_write_object(((cos_object_t *)&((pres->object)->cos_procs)), pdev);
9716 *metadata_object_id = pres->object->id;