2 # 1 "/var/tmp/portage/app-text/ghostscript-gpl-8.54/work/ghostscript-8.54-gpl//"
6 # 16 "./src/gdevpdfe.c"
13 # 1 "./src/stdpre.h" 1
14 # 244 "./src/stdpre.h"
15 typedef unsigned char byte;
16 typedef unsigned char uchar;
17 typedef unsigned short ushort;
18 typedef unsigned int uint;
19 typedef unsigned long ulong;
20 # 264 "./src/stdpre.h"
21 # 1 "/usr/include/sys/types.h" 1 3 4
22 # 27 "/usr/include/sys/types.h" 3 4
23 # 1 "/usr/include/features.h" 1 3 4
24 # 323 "/usr/include/features.h" 3 4
25 # 1 "/usr/include/sys/cdefs.h" 1 3 4
26 # 313 "/usr/include/sys/cdefs.h" 3 4
27 # 1 "/usr/include/bits/wordsize.h" 1 3 4
28 # 314 "/usr/include/sys/cdefs.h" 2 3 4
29 # 324 "/usr/include/features.h" 2 3 4
30 # 346 "/usr/include/features.h" 3 4
31 # 1 "/usr/include/gnu/stubs.h" 1 3 4
35 # 1 "/usr/include/bits/wordsize.h" 1 3 4
36 # 5 "/usr/include/gnu/stubs.h" 2 3 4
39 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4
40 # 8 "/usr/include/gnu/stubs.h" 2 3 4
41 # 347 "/usr/include/features.h" 2 3 4
42 # 28 "/usr/include/sys/types.h" 2 3 4
46 # 1 "/usr/include/bits/types.h" 1 3 4
47 # 28 "/usr/include/bits/types.h" 3 4
48 # 1 "/usr/include/bits/wordsize.h" 1 3 4
49 # 29 "/usr/include/bits/types.h" 2 3 4
52 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
53 # 214 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
54 typedef unsigned int size_t;
55 # 32 "/usr/include/bits/types.h" 2 3 4
58 typedef unsigned char __u_char;
59 typedef unsigned short int __u_short;
60 typedef unsigned int __u_int;
61 typedef unsigned long int __u_long;
64 typedef signed char __int8_t;
65 typedef unsigned char __uint8_t;
66 typedef signed short int __int16_t;
67 typedef unsigned short int __uint16_t;
68 typedef signed int __int32_t;
69 typedef unsigned int __uint32_t;
74 __extension__ typedef signed long long int __int64_t;
75 __extension__ typedef unsigned long long int __uint64_t;
83 __extension__ typedef long long int __quad_t;
84 __extension__ typedef unsigned long long int __u_quad_t;
85 # 134 "/usr/include/bits/types.h" 3 4
86 # 1 "/usr/include/bits/typesizes.h" 1 3 4
87 # 135 "/usr/include/bits/types.h" 2 3 4
90 __extension__ typedef __u_quad_t __dev_t;
91 __extension__ typedef unsigned int __uid_t;
92 __extension__ typedef unsigned int __gid_t;
93 __extension__ typedef unsigned long int __ino_t;
94 __extension__ typedef __u_quad_t __ino64_t;
95 __extension__ typedef unsigned int __mode_t;
96 __extension__ typedef unsigned int __nlink_t;
97 __extension__ typedef long int __off_t;
98 __extension__ typedef __quad_t __off64_t;
99 __extension__ typedef int __pid_t;
100 __extension__ typedef struct { int __val[2]; } __fsid_t;
101 __extension__ typedef long int __clock_t;
102 __extension__ typedef unsigned long int __rlim_t;
103 __extension__ typedef __u_quad_t __rlim64_t;
104 __extension__ typedef unsigned int __id_t;
105 __extension__ typedef long int __time_t;
106 __extension__ typedef unsigned int __useconds_t;
107 __extension__ typedef long int __suseconds_t;
109 __extension__ typedef int __daddr_t;
110 __extension__ typedef long int __swblk_t;
111 __extension__ typedef int __key_t;
114 __extension__ typedef int __clockid_t;
117 __extension__ typedef void * __timer_t;
120 __extension__ typedef long int __blksize_t;
125 __extension__ typedef long int __blkcnt_t;
126 __extension__ typedef __quad_t __blkcnt64_t;
129 __extension__ typedef unsigned long int __fsblkcnt_t;
130 __extension__ typedef __u_quad_t __fsblkcnt64_t;
133 __extension__ typedef unsigned long int __fsfilcnt_t;
134 __extension__ typedef __u_quad_t __fsfilcnt64_t;
136 __extension__ typedef int __ssize_t;
140 typedef __off64_t __loff_t;
141 typedef __quad_t *__qaddr_t;
142 typedef char *__caddr_t;
145 __extension__ typedef int __intptr_t;
148 __extension__ typedef unsigned int __socklen_t;
149 # 32 "/usr/include/sys/types.h" 2 3 4
153 typedef __u_char u_char;
154 typedef __u_short u_short;
155 typedef __u_int u_int;
156 typedef __u_long u_long;
157 typedef __quad_t quad_t;
158 typedef __u_quad_t u_quad_t;
159 typedef __fsid_t fsid_t;
164 typedef __loff_t loff_t;
168 typedef __ino_t ino_t;
169 # 62 "/usr/include/sys/types.h" 3 4
170 typedef __dev_t dev_t;
175 typedef __gid_t gid_t;
180 typedef __mode_t mode_t;
185 typedef __nlink_t nlink_t;
190 typedef __uid_t uid_t;
196 typedef __off_t off_t;
197 # 100 "/usr/include/sys/types.h" 3 4
198 typedef __pid_t pid_t;
208 typedef __ssize_t ssize_t;
214 typedef __daddr_t daddr_t;
215 typedef __caddr_t caddr_t;
221 typedef __key_t key_t;
222 # 133 "/usr/include/sys/types.h" 3 4
223 # 1 "/usr/include/time.h" 1 3 4
224 # 75 "/usr/include/time.h" 3 4
227 typedef __time_t time_t;
231 # 93 "/usr/include/time.h" 3 4
232 typedef __clockid_t clockid_t;
233 # 105 "/usr/include/time.h" 3 4
234 typedef __timer_t timer_t;
235 # 134 "/usr/include/sys/types.h" 2 3 4
236 # 147 "/usr/include/sys/types.h" 3 4
237 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
238 # 148 "/usr/include/sys/types.h" 2 3 4
242 typedef unsigned long int ulong_;
243 typedef unsigned short int ushort_;
244 typedef unsigned int uint_;
245 # 195 "/usr/include/sys/types.h" 3 4
246 typedef int int8_t __attribute__ ((__mode__ (__QI__)));
247 typedef int int16_t __attribute__ ((__mode__ (__HI__)));
248 typedef int int32_t __attribute__ ((__mode__ (__SI__)));
249 typedef int int64_t __attribute__ ((__mode__ (__DI__)));
252 typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
253 typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
254 typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
255 typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
257 typedef int register_t __attribute__ ((__mode__ (__word__)));
258 # 217 "/usr/include/sys/types.h" 3 4
259 # 1 "/usr/include/endian.h" 1 3 4
260 # 37 "/usr/include/endian.h" 3 4
261 # 1 "/usr/include/bits/endian.h" 1 3 4
262 # 38 "/usr/include/endian.h" 2 3 4
263 # 218 "/usr/include/sys/types.h" 2 3 4
266 # 1 "/usr/include/sys/select.h" 1 3 4
267 # 31 "/usr/include/sys/select.h" 3 4
268 # 1 "/usr/include/bits/select.h" 1 3 4
269 # 32 "/usr/include/sys/select.h" 2 3 4
272 # 1 "/usr/include/bits/sigset.h" 1 3 4
273 # 23 "/usr/include/bits/sigset.h" 3 4
274 typedef int __sig_atomic_t;
281 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
283 # 35 "/usr/include/sys/select.h" 2 3 4
287 typedef __sigset_t sigset_t;
293 # 1 "/usr/include/time.h" 1 3 4
294 # 121 "/usr/include/time.h" 3 4
300 # 45 "/usr/include/sys/select.h" 2 3 4
302 # 1 "/usr/include/bits/time.h" 1 3 4
303 # 69 "/usr/include/bits/time.h" 3 4
307 __suseconds_t tv_usec;
309 # 47 "/usr/include/sys/select.h" 2 3 4
312 typedef __suseconds_t suseconds_t;
318 typedef long int __fd_mask;
319 # 67 "/usr/include/sys/select.h" 3 4
328 __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
338 typedef __fd_mask fd_mask;
339 # 99 "/usr/include/sys/select.h" 3 4
341 # 109 "/usr/include/sys/select.h" 3 4
342 extern int select (int __nfds, fd_set *__restrict __readfds,
343 fd_set *__restrict __writefds,
344 fd_set *__restrict __exceptfds,
345 struct timeval *__restrict __timeout);
346 # 121 "/usr/include/sys/select.h" 3 4
347 extern int pselect (int __nfds, fd_set *__restrict __readfds,
348 fd_set *__restrict __writefds,
349 fd_set *__restrict __exceptfds,
350 const struct timespec *__restrict __timeout,
351 const __sigset_t *__restrict __sigmask);
355 # 221 "/usr/include/sys/types.h" 2 3 4
358 # 1 "/usr/include/sys/sysmacros.h" 1 3 4
359 # 29 "/usr/include/sys/sysmacros.h" 3 4
361 extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
362 __attribute__ ((__nothrow__));
364 extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
365 __attribute__ ((__nothrow__));
367 extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
368 unsigned int __minor)
369 __attribute__ ((__nothrow__));
372 __extension__ extern __inline unsigned int
373 __attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
375 return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
378 __extension__ extern __inline unsigned int
379 __attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
381 return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
384 __extension__ extern __inline unsigned long long int
385 __attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
387 return ((__minor & 0xff) | ((__major & 0xfff) << 8)
388 | (((unsigned long long int) (__minor & ~0xff)) << 12)
389 | (((unsigned long long int) (__major & ~0xfff)) << 32));
391 # 224 "/usr/include/sys/types.h" 2 3 4
392 # 235 "/usr/include/sys/types.h" 3 4
393 typedef __blkcnt_t blkcnt_t;
397 typedef __fsblkcnt_t fsblkcnt_t;
401 typedef __fsfilcnt_t fsfilcnt_t;
402 # 270 "/usr/include/sys/types.h" 3 4
403 # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
404 # 36 "/usr/include/bits/pthreadtypes.h" 3 4
405 typedef unsigned long int pthread_t;
415 typedef struct __pthread_internal_slist
417 struct __pthread_internal_slist *__next;
425 struct __pthread_mutex_s
428 unsigned int __count;
433 unsigned int __nusers;
437 __pthread_slist_t __list;
448 } pthread_mutexattr_t;
458 unsigned int __futex;
459 __extension__ unsigned long long int __total_seq;
460 __extension__ unsigned long long int __wakeup_seq;
461 __extension__ unsigned long long int __woken_seq;
463 unsigned int __nwaiters;
464 unsigned int __broadcast_seq;
467 __extension__ long long int __align;
474 } pthread_condattr_t;
478 typedef unsigned int pthread_key_t;
482 typedef int pthread_once_t;
493 unsigned int __nr_readers;
494 unsigned int __readers_wakeup;
495 unsigned int __writer_wakeup;
496 unsigned int __nr_readers_queued;
497 unsigned int __nr_writers_queued;
500 unsigned int __flags;
511 } pthread_rwlockattr_t;
517 typedef volatile int pthread_spinlock_t;
532 } pthread_barrierattr_t;
533 # 271 "/usr/include/sys/types.h" 2 3 4
537 # 265 "./src/stdpre.h" 2
538 # 285 "./src/stdpre.h"
540 # 322 "./src/stdpre.h"
541 typedef const char *ptr_ord_t;
542 # 363 "./src/stdpre.h"
543 typedef double floatp;
544 # 391 "./src/stdpre.h"
545 typedef const char *client_name_t;
546 # 419 "./src/stdpre.h"
547 # 1 "./src/stdpn.h" 1
548 # 420 "./src/stdpre.h" 2
552 # 1 "./obj/../soobj/arch.h" 1
555 typedef ushort bits16;
560 # 1 "/usr/include/stdio.h" 1 3 4
561 # 30 "/usr/include/stdio.h" 3 4
566 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
567 # 35 "/usr/include/stdio.h" 2 3 4
568 # 44 "/usr/include/stdio.h" 3 4
571 typedef struct _IO_FILE FILE;
577 # 62 "/usr/include/stdio.h" 3 4
578 typedef struct _IO_FILE __FILE;
579 # 72 "/usr/include/stdio.h" 3 4
580 # 1 "/usr/include/libio.h" 1 3 4
581 # 32 "/usr/include/libio.h" 3 4
582 # 1 "/usr/include/_G_config.h" 1 3 4
583 # 14 "/usr/include/_G_config.h" 3 4
584 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
585 # 326 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
586 typedef long int wchar_t;
587 # 355 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 3 4
588 typedef unsigned int wint_t;
589 # 15 "/usr/include/_G_config.h" 2 3 4
590 # 24 "/usr/include/_G_config.h" 3 4
591 # 1 "/usr/include/wchar.h" 1 3 4
592 # 48 "/usr/include/wchar.h" 3 4
593 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
594 # 49 "/usr/include/wchar.h" 2 3 4
596 # 1 "/usr/include/bits/wchar.h" 1 3 4
597 # 51 "/usr/include/wchar.h" 2 3 4
598 # 76 "/usr/include/wchar.h" 3 4
608 # 25 "/usr/include/_G_config.h" 2 3 4
620 # 44 "/usr/include/_G_config.h" 3 4
621 # 1 "/usr/include/gconv.h" 1 3 4
622 # 28 "/usr/include/gconv.h" 3 4
623 # 1 "/usr/include/wchar.h" 1 3 4
624 # 48 "/usr/include/wchar.h" 3 4
625 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
626 # 49 "/usr/include/wchar.h" 2 3 4
627 # 29 "/usr/include/gconv.h" 2 3 4
630 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
631 # 32 "/usr/include/gconv.h" 2 3 4
646 __GCONV_ILLEGAL_INPUT,
647 __GCONV_INCOMPLETE_INPUT,
649 __GCONV_ILLEGAL_DESCRIPTOR,
650 __GCONV_INTERNAL_ERROR
657 __GCONV_IS_LAST = 0x0001,
658 __GCONV_IGNORE_ERRORS = 0x0002
664 struct __gconv_step_data;
665 struct __gconv_loaded_object;
666 struct __gconv_trans_data;
670 typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
671 __const unsigned char **, __const unsigned char *,
672 unsigned char **, size_t *, int, int);
675 typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char);
678 typedef int (*__gconv_init_fct) (struct __gconv_step *);
679 typedef void (*__gconv_end_fct) (struct __gconv_step *);
683 typedef int (*__gconv_trans_fct) (struct __gconv_step *,
684 struct __gconv_step_data *, void *,
685 __const unsigned char *,
686 __const unsigned char **,
687 __const unsigned char *, unsigned char **,
691 typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
692 __const unsigned char *,
693 unsigned char *, unsigned char *);
696 typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
700 typedef int (*__gconv_trans_init_fct) (void **, const char *);
701 typedef void (*__gconv_trans_end_fct) (void *);
703 struct __gconv_trans_data
706 __gconv_trans_fct __trans_fct;
707 __gconv_trans_context_fct __trans_context_fct;
708 __gconv_trans_end_fct __trans_end_fct;
710 struct __gconv_trans_data *__next;
717 struct __gconv_loaded_object *__shlib_handle;
718 __const char *__modname;
726 __gconv_btowc_fct __btowc_fct;
727 __gconv_init_fct __init_fct;
728 __gconv_end_fct __end_fct;
732 int __min_needed_from;
733 int __max_needed_from;
745 struct __gconv_step_data
747 unsigned char *__outbuf;
748 unsigned char *__outbufend;
756 int __invocation_counter;
762 __mbstate_t *__statep;
767 struct __gconv_trans_data *__trans;
772 typedef struct __gconv_info
775 struct __gconv_step *__steps;
776 __extension__ struct __gconv_step_data __data [];
778 # 45 "/usr/include/_G_config.h" 2 3 4
781 struct __gconv_info __cd;
784 struct __gconv_info __cd;
785 struct __gconv_step_data __data;
789 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
790 typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
791 typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
792 typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
793 # 33 "/usr/include/libio.h" 2 3 4
794 # 53 "/usr/include/libio.h" 3 4
795 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 1 3 4
796 # 43 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stdarg.h" 3 4
797 typedef __builtin_va_list __gnuc_va_list;
798 # 54 "/usr/include/libio.h" 2 3 4
799 # 166 "/usr/include/libio.h" 3 4
800 struct _IO_jump_t; struct _IO_FILE;
801 # 176 "/usr/include/libio.h" 3 4
802 typedef void _IO_lock_t;
809 struct _IO_marker *_next;
810 struct _IO_FILE *_sbuf;
815 # 199 "/usr/include/libio.h" 3 4
819 enum __codecvt_result
826 # 267 "/usr/include/libio.h" 3 4
836 char* _IO_write_base;
843 char *_IO_backup_base;
846 struct _IO_marker *_markers;
848 struct _IO_FILE *_chain;
860 unsigned short _cur_column;
861 signed char _vtable_offset;
867 # 315 "/usr/include/libio.h" 3 4
869 # 324 "/usr/include/libio.h" 3 4
878 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
883 typedef struct _IO_FILE _IO_FILE;
886 struct _IO_FILE_plus;
888 extern struct _IO_FILE_plus _IO_2_1_stdin_;
889 extern struct _IO_FILE_plus _IO_2_1_stdout_;
890 extern struct _IO_FILE_plus _IO_2_1_stderr_;
891 # 360 "/usr/include/libio.h" 3 4
892 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
900 typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
909 typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
912 typedef int __io_close_fn (void *__cookie);
913 # 412 "/usr/include/libio.h" 3 4
914 extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__));
915 extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__));
916 extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__));
917 extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__));
918 extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__));
919 extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__));
920 # 450 "/usr/include/libio.h" 3 4
921 extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__));
922 extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__));
923 extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__));
924 extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__));
926 extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__));
932 extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__));
933 extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__));
934 extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__));
935 # 480 "/usr/include/libio.h" 3 4
936 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
937 __gnuc_va_list, int *__restrict);
938 extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
940 extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__));
941 extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__));
943 extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__));
944 extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__));
946 extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__));
947 # 73 "/usr/include/stdio.h" 2 3 4
948 # 86 "/usr/include/stdio.h" 3 4
951 typedef _G_fpos_t fpos_t;
956 # 138 "/usr/include/stdio.h" 3 4
957 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4
958 # 139 "/usr/include/stdio.h" 2 3 4
962 extern struct _IO_FILE *stdin;
963 extern struct _IO_FILE *stdout;
964 extern struct _IO_FILE *stderr;
972 extern int remove (__const char *__filename) __attribute__ ((__nothrow__));
974 extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__));
989 extern FILE *tmpfile (void);
990 # 183 "/usr/include/stdio.h" 3 4
991 extern char *tmpnam (char *__s) __attribute__ ((__nothrow__));
997 extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__));
998 # 201 "/usr/include/stdio.h" 3 4
999 extern char *tempnam (__const char *__dir, __const char *__pfx)
1000 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__));
1009 extern int fclose (FILE *__stream);
1014 extern int fflush (FILE *__stream);
1016 # 226 "/usr/include/stdio.h" 3 4
1017 extern int fflush_unlocked (FILE *__stream);
1018 # 240 "/usr/include/stdio.h" 3 4
1025 extern FILE *fopen (__const char *__restrict __filename,
1026 __const char *__restrict __modes);
1031 extern FILE *freopen (__const char *__restrict __filename,
1032 __const char *__restrict __modes,
1033 FILE *__restrict __stream);
1034 # 267 "/usr/include/stdio.h" 3 4
1036 # 278 "/usr/include/stdio.h" 3 4
1037 extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__));
1038 # 298 "/usr/include/stdio.h" 3 4
1042 extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__));
1046 extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
1047 int __modes, size_t __n) __attribute__ ((__nothrow__));
1053 extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
1054 size_t __size) __attribute__ ((__nothrow__));
1057 extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__));
1066 extern int fprintf (FILE *__restrict __stream,
1067 __const char *__restrict __format, ...);
1072 extern int printf (__const char *__restrict __format, ...);
1074 extern int sprintf (char *__restrict __s,
1075 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
1081 extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
1082 __gnuc_va_list __arg);
1087 extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
1089 extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
1090 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
1096 extern int snprintf (char *__restrict __s, size_t __maxlen,
1097 __const char *__restrict __format, ...)
1098 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
1100 extern int vsnprintf (char *__restrict __s, size_t __maxlen,
1101 __const char *__restrict __format, __gnuc_va_list __arg)
1102 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
1104 # 392 "/usr/include/stdio.h" 3 4
1110 extern int fscanf (FILE *__restrict __stream,
1111 __const char *__restrict __format, ...) ;
1116 extern int scanf (__const char *__restrict __format, ...) ;
1118 extern int sscanf (__const char *__restrict __s,
1119 __const char *__restrict __format, ...) __attribute__ ((__nothrow__));
1121 # 434 "/usr/include/stdio.h" 3 4
1127 extern int fgetc (FILE *__stream);
1128 extern int getc (FILE *__stream);
1134 extern int getchar (void);
1136 # 458 "/usr/include/stdio.h" 3 4
1137 extern int getc_unlocked (FILE *__stream);
1138 extern int getchar_unlocked (void);
1139 # 469 "/usr/include/stdio.h" 3 4
1140 extern int fgetc_unlocked (FILE *__stream);
1152 extern int fputc (int __c, FILE *__stream);
1153 extern int putc (int __c, FILE *__stream);
1159 extern int putchar (int __c);
1161 # 502 "/usr/include/stdio.h" 3 4
1162 extern int fputc_unlocked (int __c, FILE *__stream);
1170 extern int putc_unlocked (int __c, FILE *__stream);
1171 extern int putchar_unlocked (int __c);
1178 extern int getw (FILE *__stream);
1181 extern int putw (int __w, FILE *__stream);
1190 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
1198 extern char *gets (char *__s) ;
1200 # 583 "/usr/include/stdio.h" 3 4
1206 extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
1212 extern int puts (__const char *__s);
1219 extern int ungetc (int __c, FILE *__stream);
1226 extern size_t fread (void *__restrict __ptr, size_t __size,
1227 size_t __n, FILE *__restrict __stream) ;
1232 extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
1233 size_t __n, FILE *__restrict __s) ;
1235 # 636 "/usr/include/stdio.h" 3 4
1236 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
1237 size_t __n, FILE *__restrict __stream) ;
1238 extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
1239 size_t __n, FILE *__restrict __stream) ;
1248 extern int fseek (FILE *__stream, long int __off, int __whence);
1253 extern long int ftell (FILE *__stream) ;
1258 extern void rewind (FILE *__stream);
1260 # 672 "/usr/include/stdio.h" 3 4
1261 extern int fseeko (FILE *__stream, __off_t __off, int __whence);
1266 extern __off_t ftello (FILE *__stream) ;
1267 # 691 "/usr/include/stdio.h" 3 4
1274 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
1279 extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
1280 # 714 "/usr/include/stdio.h" 3 4
1282 # 723 "/usr/include/stdio.h" 3 4
1285 extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__));
1287 extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ;
1289 extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ;
1294 extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__));
1295 extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
1296 extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
1305 extern void perror (__const char *__s);
1312 # 1 "/usr/include/bits/sys_errlist.h" 1 3 4
1313 # 27 "/usr/include/bits/sys_errlist.h" 3 4
1314 extern int sys_nerr;
1315 extern __const char *__const sys_errlist[];
1316 # 753 "/usr/include/stdio.h" 2 3 4
1321 extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ;
1326 extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ;
1327 # 772 "/usr/include/stdio.h" 3 4
1328 extern FILE *popen (__const char *__command, __const char *__modes) ;
1334 extern int pclose (FILE *__stream);
1340 extern char *ctermid (char *__s) __attribute__ ((__nothrow__));
1341 # 812 "/usr/include/stdio.h" 3 4
1342 extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__));
1346 extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ;
1349 extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__));
1350 # 842 "/usr/include/stdio.h" 3 4
1352 # 143 "./src/std.h" 2
1359 typedef struct gs_memory_s gs_memory_t;
1361 int outwrite(const gs_memory_t *mem, const char *str, int len);
1362 int errwrite(const char *str, int len);
1363 void outflush(const gs_memory_t *mem);
1364 void errflush(void);
1366 int outprintf(const gs_memory_t *mem, const char *fmt, ...) __attribute__((__format__ (__printf__, 2, 3)));
1367 int errprintf(const char *fmt, ...) __attribute__((__format__ (__printf__, 1, 2)));
1375 void dprintf_file_and_line(const char *, int);
1384 void printf_program_ident(const gs_memory_t *mem, const char *program_name, long revision_number);
1385 void eprintf_program_ident(const char *program_name, long revision_number);
1386 const char *gs_program_name(void);
1387 long gs_revision_number(void);
1389 void lprintf_file_and_line(const char *, int);
1390 # 25 "./src/stdio_.h" 2
1391 # 42 "./src/stdio_.h"
1392 int unlink(const char *);
1394 # 1 "./src/gserror.h" 1
1395 # 20 "./src/gserror.h"
1396 int gs_log_error(int, const char *, int);
1397 # 43 "./src/gserror.h"
1398 const char *gs_errstr(int code);
1400 int gs_throw_imp(const char *func, const char *file, int line,
1401 int op, int code, const char *fmt, ...) __attribute__((__format__ (__printf__, 6, 7)));
1403 # 1 "./src/gsio.h" 1
1405 # 1 "./src/gstypes.h" 1
1406 # 26 "./src/gstypes.h"
1407 typedef ulong gs_id;
1408 # 43 "./src/gstypes.h"
1409 typedef struct gs_string_s {
1410 byte *data; uint size;
1415 typedef struct gs_const_string_s {
1416 const byte *data; uint size;
1418 typedef struct gs_param_string_s {
1419 const byte *data; uint size;
1422 # 69 "./src/gstypes.h"
1423 typedef struct gs_bytestring_s {
1424 byte *data; uint size;
1427 typedef struct gs_const_bytestring_s {
1428 const byte *data; uint size;
1430 } gs_const_bytestring;
1431 # 86 "./src/gstypes.h"
1432 typedef struct gs_point_s {
1435 typedef struct gs_int_point_s {
1443 typedef struct gs_log2_scale_point_s {
1445 } gs_log2_scale_point;
1453 typedef struct gs_rect_s {
1456 typedef struct gs_int_rect_s {
1465 typedef struct gs_range_s {
1469 # 1 "./src/gsmemory.h" 1
1470 # 41 "./src/gsmemory.h"
1471 # 1 "./src/gslibctx.h" 1
1472 # 20 "./src/gslibctx.h"
1473 # 1 "./src/gs_dll_call.h" 1
1474 # 21 "./src/gslibctx.h" 2
1477 typedef struct name_table_s *name_table_ptr;
1479 typedef struct gs_lib_ctx_s
1481 gs_memory_t *memory;
1486 bool stdout_is_redirected;
1487 bool stdout_to_stderr;
1488 bool stdin_is_interactive;
1489 void *caller_handle;
1490 int ( *stdin_fn)(void *caller_handle, char *buf, int len);
1491 int ( *stdout_fn)(void *caller_handle, const char *str, int len);
1492 int ( *stderr_fn)(void *caller_handle, const char *str, int len);
1493 int ( *poll_fn)(void *caller_handle);
1495 void *top_of_system;
1498 name_table_ptr gs_name_table;
1502 bool dict_auto_expand;
1509 int gs_lib_ctx_init( gs_memory_t *mem );
1511 void *gs_lib_ctx_get_interp_instance( gs_memory_t *mem );
1516 const gs_memory_t * gs_lib_ctx_get_non_gc_memory_t(void);
1517 # 42 "./src/gsmemory.h" 2
1520 typedef struct gs_memory_struct_type_s gs_memory_struct_type_t;
1521 typedef const gs_memory_struct_type_t *gs_memory_type_ptr_t;
1522 # 55 "./src/gsmemory.h"
1523 typedef struct gs_ptr_procs_s gs_ptr_procs_t;
1524 typedef const gs_ptr_procs_t *gs_ptr_type_t;
1527 typedef struct gs_gc_root_s gs_gc_root_t;
1531 typedef client_name_t struct_name_t;
1534 uint gs_struct_type_size(gs_memory_type_ptr_t);
1537 struct_name_t gs_struct_type_name(gs_memory_type_ptr_t);
1545 typedef struct gs_memory_status_s {
1557 } gs_memory_status_t;
1558 # 222 "./src/gsmemory.h"
1559 typedef struct gs_memory_procs_s {
1561 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);
1562 # 250 "./src/gsmemory.h"
1563 byte *(*alloc_bytes)(gs_memory_t *mem, uint nbytes, client_name_t cname);
1564 # 261 "./src/gsmemory.h"
1565 void *(*alloc_struct)(gs_memory_t *mem, gs_memory_type_ptr_t pstype, client_name_t cname);
1568 void *(*alloc_struct_immovable)(gs_memory_t *mem, gs_memory_type_ptr_t pstype, client_name_t cname);
1569 # 275 "./src/gsmemory.h"
1570 byte *(*alloc_byte_array)(gs_memory_t *mem, uint num_elements, uint elt_size, client_name_t cname);
1573 byte *(*alloc_byte_array_immovable)(gs_memory_t *mem, uint num_elements, uint elt_size, client_name_t cname);
1574 # 289 "./src/gsmemory.h"
1575 void *(*alloc_struct_array)(gs_memory_t *mem, uint num_elements, gs_memory_type_ptr_t pstype, client_name_t cname);
1578 void *(*alloc_struct_array_immovable)(gs_memory_t *mem, uint num_elements, gs_memory_type_ptr_t pstype, client_name_t cname);
1579 # 302 "./src/gsmemory.h"
1580 uint (*object_size)(gs_memory_t *mem, const void *obj);
1581 # 314 "./src/gsmemory.h"
1582 gs_memory_type_ptr_t (*object_type)(gs_memory_t *mem, const void *obj);
1583 # 324 "./src/gsmemory.h"
1584 byte *(*alloc_string)(gs_memory_t *mem, uint nbytes, client_name_t cname);
1587 byte *(*alloc_string_immovable)(gs_memory_t *mem, uint nbytes, client_name_t cname);
1588 # 339 "./src/gsmemory.h"
1589 byte *(*resize_string)(gs_memory_t *mem, byte *data, uint old_num, uint new_num, client_name_t cname);
1590 # 350 "./src/gsmemory.h"
1591 void (*free_string)(gs_memory_t *mem, byte *data, uint nbytes, client_name_t cname);
1592 # 364 "./src/gsmemory.h"
1593 int (*register_root)(gs_memory_t *mem, gs_gc_root_t *root, gs_ptr_type_t ptype, void **pp, client_name_t cname);
1594 # 375 "./src/gsmemory.h"
1595 void (*unregister_root)(gs_memory_t *mem, gs_gc_root_t *root, client_name_t cname);
1596 # 390 "./src/gsmemory.h"
1597 void (*enable_free)(gs_memory_t *mem, bool enable);
1599 } gs_memory_procs_t;
1607 void gs_free_const_object(gs_memory_t *mem, const void *data,
1608 client_name_t cname);
1609 void gs_free_const_string(gs_memory_t *mem, const byte *data, uint nbytes,
1610 client_name_t cname);
1616 void gs_free_bytestring(gs_memory_t *mem, gs_bytestring *pbs,
1617 client_name_t cname);
1618 void gs_free_const_bytestring(gs_memory_t *mem, gs_const_bytestring *pbs,
1619 client_name_t cname);
1625 void *gs_resize_struct_array(gs_memory_t *mem, void *obj, uint num_elements,
1626 gs_memory_type_ptr_t pstype,
1627 client_name_t cname);
1630 int gs_register_struct_root(gs_memory_t *mem, gs_gc_root_t *root,
1631 void **pp, client_name_t cname);
1634 void gs_ignore_free_object(gs_memory_t *mem, void *data, client_name_t cname);
1635 void gs_ignore_free_string(gs_memory_t *mem, byte *data, uint nbytes, client_name_t cname);
1638 void gs_ignore_consolidate_free(gs_memory_t *mem);
1646 void *gs_raw_alloc_struct_immovable(gs_memory_t * rmem,
1647 gs_memory_type_ptr_t pstype,
1648 client_name_t cname);
1650 typedef struct pl_mem_node_s pl_mem_node_t;
1651 # 468 "./src/gsmemory.h"
1652 struct gs_memory_s {
1653 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;
1656 # 1 "./src/gdebug.h" 1
1657 # 50 "./src/gdebug.h"
1658 extern char gs_debug[128];
1659 bool gs_debug_c(int );
1660 # 60 "./src/gdebug.h"
1661 extern FILE *gs_debug_out;
1662 # 114 "./src/gdebug.h"
1663 void debug_dump_bytes(const byte * from, const byte * to,
1665 void debug_dump_bitmap(const byte * from, uint raster, uint height,
1667 void debug_print_string(const byte * str, uint len);
1668 void debug_print_string_hex(const byte * str, uint len);
1676 typedef struct gs_imager_state_s gs_imager_state;
1681 typedef struct gs_state_s gs_state;
1682 # 17 "./src/gdevpdfe.c" 2
1683 # 1 "./src/string_.h" 1
1684 # 30 "./src/string_.h"
1685 # 1 "/usr/include/string.h" 1 3 4
1686 # 28 "/usr/include/string.h" 3 4
1692 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1693 # 34 "/usr/include/string.h" 2 3 4
1698 extern void *memcpy (void *__restrict __dest,
1699 __const void *__restrict __src, size_t __n)
1700 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1703 extern void *memmove (void *__dest, __const void *__src, size_t __n)
1704 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1711 extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
1712 int __c, size_t __n)
1713 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1719 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1722 extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
1723 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1726 extern void *memchr (__const void *__s, int __c, size_t __n)
1727 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1729 # 82 "/usr/include/string.h" 3 4
1732 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
1733 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1735 extern char *strncpy (char *__restrict __dest,
1736 __const char *__restrict __src, size_t __n)
1737 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1740 extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
1741 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1743 extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
1744 size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1747 extern int strcmp (__const char *__s1, __const char *__s2)
1748 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1750 extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
1751 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1754 extern int strcoll (__const char *__s1, __const char *__s2)
1755 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1757 extern size_t strxfrm (char *__restrict __dest,
1758 __const char *__restrict __src, size_t __n)
1759 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
1761 # 130 "/usr/include/string.h" 3 4
1762 extern char *strdup (__const char *__s)
1763 __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1764 # 165 "/usr/include/string.h" 3 4
1767 extern char *strchr (__const char *__s, int __c)
1768 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1770 extern char *strrchr (__const char *__s, int __c)
1771 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1773 # 181 "/usr/include/string.h" 3 4
1777 extern size_t strcspn (__const char *__s, __const char *__reject)
1778 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1781 extern size_t strspn (__const char *__s, __const char *__accept)
1782 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1784 extern char *strpbrk (__const char *__s, __const char *__accept)
1785 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1787 extern char *strstr (__const char *__haystack, __const char *__needle)
1788 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1792 extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
1793 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
1798 extern char *__strtok_r (char *__restrict __s,
1799 __const char *__restrict __delim,
1800 char **__restrict __save_ptr)
1801 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
1803 extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
1804 char **__restrict __save_ptr)
1805 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
1806 # 240 "/usr/include/string.h" 3 4
1809 extern size_t strlen (__const char *__s)
1810 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1812 # 254 "/usr/include/string.h" 3 4
1815 extern char *strerror (int __errnum) __attribute__ ((__nothrow__));
1817 # 270 "/usr/include/string.h" 3 4
1818 extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
1819 # 288 "/usr/include/string.h" 3 4
1820 extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1824 extern void bcopy (__const void *__src, void *__dest, size_t __n)
1825 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1828 extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1831 extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
1832 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1835 extern char *index (__const char *__s, int __c)
1836 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1839 extern char *rindex (__const char *__s, int __c)
1840 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1844 extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
1845 # 325 "/usr/include/string.h" 3 4
1846 extern int strcasecmp (__const char *__s1, __const char *__s2)
1847 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1850 extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
1851 __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1852 # 348 "/usr/include/string.h" 3 4
1853 extern char *strsep (char **__restrict __stringp,
1854 __const char *__restrict __delim)
1855 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1856 # 426 "/usr/include/string.h" 3 4
1858 # 31 "./src/string_.h" 2
1859 # 18 "./src/gdevpdfe.c" 2
1860 # 1 "./src/time_.h" 1
1861 # 28 "./src/time_.h"
1862 # 1 "./obj/../soobj/gconfig_.h" 1
1863 # 29 "./src/time_.h" 2
1870 # 1 "/usr/include/sys/time.h" 1 3 4
1871 # 27 "/usr/include/sys/time.h" 3 4
1872 # 1 "/usr/include/time.h" 1 3 4
1873 # 28 "/usr/include/sys/time.h" 2 3 4
1875 # 1 "/usr/include/bits/time.h" 1 3 4
1876 # 30 "/usr/include/sys/time.h" 2 3 4
1877 # 39 "/usr/include/sys/time.h" 3 4
1879 # 57 "/usr/include/sys/time.h" 3 4
1886 typedef struct timezone *__restrict __timezone_ptr_t;
1887 # 73 "/usr/include/sys/time.h" 3 4
1888 extern int gettimeofday (struct timeval *__restrict __tv,
1889 __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1894 extern int settimeofday (__const struct timeval *__tv,
1895 __const struct timezone *__tz)
1896 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1902 extern int adjtime (__const struct timeval *__delta,
1903 struct timeval *__olddelta) __attribute__ ((__nothrow__));
1927 struct timeval it_interval;
1929 struct timeval it_value;
1937 typedef int __itimer_which_t;
1942 extern int getitimer (__itimer_which_t __which,
1943 struct itimerval *__value) __attribute__ ((__nothrow__));
1948 extern int setitimer (__itimer_which_t __which,
1949 __const struct itimerval *__restrict __new,
1950 struct itimerval *__restrict __old) __attribute__ ((__nothrow__));
1955 extern int utimes (__const char *__file, __const struct timeval __tvp[2])
1956 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1960 extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
1961 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1964 extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__));
1965 # 191 "/usr/include/sys/time.h" 3 4
1967 # 36 "./src/time_.h" 2
1974 # 1 "/usr/include/time.h" 1 3 4
1975 # 31 "/usr/include/time.h" 3 4
1984 # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/stddef.h" 1 3 4
1985 # 40 "/usr/include/time.h" 2 3 4
1989 # 1 "/usr/include/bits/time.h" 1 3 4
1990 # 44 "/usr/include/time.h" 2 3 4
1991 # 59 "/usr/include/time.h" 3 4
1994 typedef __clock_t clock_t;
1998 # 132 "/usr/include/time.h" 3 4
2015 __const char *tm_zone;
2031 struct timespec it_interval;
2032 struct timespec it_value;
2037 # 181 "/usr/include/time.h" 3 4
2041 extern clock_t clock (void) __attribute__ ((__nothrow__));
2044 extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
2047 extern double difftime (time_t __time1, time_t __time0)
2048 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2051 extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
2057 extern size_t strftime (char *__restrict __s, size_t __maxsize,
2058 __const char *__restrict __format,
2059 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
2061 # 229 "/usr/include/time.h" 3 4
2065 extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
2069 extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
2075 extern struct tm *gmtime_r (__const time_t *__restrict __timer,
2076 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
2080 extern struct tm *localtime_r (__const time_t *__restrict __timer,
2081 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
2087 extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
2090 extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
2098 extern char *asctime_r (__const struct tm *__restrict __tp,
2099 char *__restrict __buf) __attribute__ ((__nothrow__));
2102 extern char *ctime_r (__const time_t *__restrict __timer,
2103 char *__restrict __buf) __attribute__ ((__nothrow__));
2108 extern char *__tzname[2];
2109 extern int __daylight;
2110 extern long int __timezone;
2115 extern char *tzname[2];
2119 extern void tzset (void) __attribute__ ((__nothrow__));
2123 extern int daylight;
2124 extern long int timezone;
2130 extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
2131 # 312 "/usr/include/time.h" 3 4
2132 extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
2135 extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
2138 extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
2139 # 327 "/usr/include/time.h" 3 4
2140 extern int nanosleep (__const struct timespec *__requested_time,
2141 struct timespec *__remaining);
2145 extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
2148 extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
2151 extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
2152 __attribute__ ((__nothrow__));
2159 extern int clock_nanosleep (clockid_t __clock_id, int __flags,
2160 __const struct timespec *__req,
2161 struct timespec *__rem);
2164 extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));
2169 extern int timer_create (clockid_t __clock_id,
2170 struct sigevent *__restrict __evp,
2171 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
2174 extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
2177 extern int timer_settime (timer_t __timerid, int __flags,
2178 __const struct itimerspec *__restrict __value,
2179 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
2182 extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
2183 __attribute__ ((__nothrow__));
2186 extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
2187 # 416 "/usr/include/time.h" 3 4
2189 # 43 "./src/time_.h" 2
2190 # 78 "./src/time_.h"
2191 # 1 "/usr/include/sys/times.h" 1 3 4
2192 # 32 "/usr/include/sys/times.h" 3 4
2210 extern clock_t times (struct tms *__buffer) __attribute__ ((__nothrow__));
2213 # 79 "./src/time_.h" 2
2214 # 19 "./src/gdevpdfe.c" 2
2215 # 1 "./src/stream.h" 1
2216 # 21 "./src/stream.h"
2217 # 1 "./src/scommon.h" 1
2218 # 22 "./src/scommon.h"
2219 # 1 "./src/gsstype.h" 1
2220 # 21 "./src/gsstype.h"
2221 typedef struct gc_state_s gc_state_t;
2227 typedef struct enum_ptr_s {
2231 # 79 "./src/gsstype.h"
2232 typedef struct struct_shared_procs_s struct_shared_procs_t;
2234 struct gs_memory_struct_type_s {
2236 struct_name_t sname;
2241 const struct_shared_procs_t *shared;
2245 void (*clear_marks)(const gs_memory_t *cmem, void *pre, uint size, const gs_memory_struct_type_t *pstype);
2246 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);
2247 void (*reloc_ptrs)(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
2248 void (*finalize)(void *ptr);
2252 const void *proc_data;
2254 # 23 "./src/scommon.h" 2
2255 # 34 "./src/scommon.h"
2256 typedef struct stream_s stream;
2263 typedef struct stream_state_s stream_state;
2264 # 50 "./src/scommon.h"
2265 typedef struct stream_template_s stream_template;
2266 # 87 "./src/scommon.h"
2267 typedef struct stream_cursor_read_s {
2271 } stream_cursor_read;
2272 typedef struct stream_cursor_write_s {
2276 } stream_cursor_write;
2277 typedef union stream_cursor_s {
2278 stream_cursor_read r;
2279 stream_cursor_write w;
2281 # 134 "./src/scommon.h"
2282 int s_no_report_error(stream_state *, const char *);
2283 # 165 "./src/scommon.h"
2284 struct stream_state_s {
2285 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
2288 extern const gs_memory_struct_type_t st_stream_state;
2289 # 22 "./src/stream.h" 2
2290 # 1 "./src/srdline.h" 1
2291 # 43 "./src/srdline.h"
2292 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 *));
2293 # 23 "./src/stream.h" 2
2294 # 35 "./src/stream.h"
2301 int (*available)(stream *, long *);
2307 int (*seek)(stream *, long);
2313 void (*reset)(stream *);
2319 int (*flush)(stream *);
2325 int (*close)(stream *);
2329 int (*process)(stream_state *, stream_cursor_read *, stream_cursor_write *, bool);
2336 int (*switch_mode)(stream *, bool);
2348 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
2349 # 110 "./src/stream.h"
2350 stream_cursor cursor;
2354 # 127 "./src/stream.h"
2359 # 139 "./src/stream.h"
2360 gs_string cbuf_string;
2374 stream_state *state;
2385 stream *prev, *next;
2388 int (*save_close)(stream *);
2395 gs_const_string file_name;
2405 extern const gs_memory_struct_type_t st_stream;
2406 # 217 "./src/stream.h"
2407 int savailable(stream *, long *);
2411 int sclose(stream *);
2412 int sswitch(stream *, bool);
2417 int spgetcc(stream *, bool);
2418 # 240 "./src/stream.h"
2419 int sgets(stream *, byte *, uint, uint *);
2420 int sungetc(stream *, byte);
2425 int spskip(stream *, long, long *);
2433 int s_process_read_buf(stream *);
2438 int spputc(stream *, byte);
2439 # 268 "./src/stream.h"
2440 int sputs(stream *, const byte *, uint, uint *);
2446 int s_process_write_buf(stream *, bool);
2449 long stell(stream *);
2450 int spseek(stream *, long);
2451 # 327 "./src/stream.h"
2452 stream *s_alloc(gs_memory_t *, client_name_t);
2453 stream_state *s_alloc_state(gs_memory_t *, gs_memory_type_ptr_t, client_name_t);
2458 void s_init(stream *, gs_memory_t *);
2459 void s_init_state(stream_state *, const stream_template *, gs_memory_t *);
2462 void sread_string(stream *, const byte *, uint),
2463 sread_string_reusable(stream *, const byte *, uint),
2464 swrite_string(stream *, byte *, uint);
2465 void sread_file(stream *, FILE *, byte *, uint),
2466 swrite_file(stream *, FILE *, byte *, uint),
2467 sappend_file(stream *, FILE *, byte *, uint);
2470 int sread_subfile(stream *s, long start, long length);
2474 int ssetfilename(stream *, const byte *, uint);
2478 int sfilename(stream *, gs_const_string *);
2482 void swrite_position_only(stream *);
2485 void s_std_init(stream *, byte *, uint, const stream_procs *, int );
2488 void s_disable(stream *);
2491 int s_std_null(stream *);
2492 void s_std_read_reset(stream *), s_std_write_reset(stream *);
2493 int s_std_read_flush(stream *), s_std_write_flush(stream *), s_std_noavailable(stream *, long *),
2494 s_std_noseek(stream *, long), s_std_close(stream *), s_std_switch_mode(stream *, bool);
2497 int s_filter_write_flush(stream *), s_filter_close(stream *);
2500 extern const stream_procs s_filter_read_procs, s_filter_write_procs;
2501 # 385 "./src/stream.h"
2502 int s_init_filter(stream *fs, stream_state *fss, byte *buf, uint bsize,
2504 stream *s_add_filter(stream **ps, const stream_template *template,
2505 stream_state *ss, gs_memory_t *mem);
2511 int s_close_filters(stream **ps, stream *target);
2515 extern const stream_template s_NullE_template;
2516 extern const stream_template s_NullD_template;
2517 # 20 "./src/gdevpdfe.c" 2
2520 # 1 "./src/gpgetenv.h" 1
2521 # 37 "./src/gpgetenv.h"
2522 int gp_getenv(const char *key, char *ptr, int *plen);
2531 void gp_exit(int exit_status, int code);
2537 void gp_do_exit(int exit_status);
2539 const char *gp_strerror(int);
2547 void gp_get_realtime(long ptm[2]);
2553 void gp_get_usertime(long ptm[2]);
2555 int gp_readline_init(void **preadline_data, gs_memory_t *mem);
2560 int gp_readline(stream *s_in, stream *s_out, void *readline_data,
2561 gs_const_string *prompt, gs_string *buf,
2562 gs_memory_t *bufmem, uint *pcount, bool *pin_eol,
2563 bool (*is_stdin)(const stream *));
2568 void gp_readline_finit(void *readline_data);
2570 int gp_stdin_read(char *buf, int len, int interactive, FILE *f);
2572 const char *gp_getenv_display(void);
2574 extern const char gp_file_name_list_separator;
2577 extern const char gp_scratch_file_name_prefix[];
2580 extern const char gp_null_file_name[];
2583 extern const char gp_current_directory_name[];
2588 extern const char gp_fmode_binary_suffix[];
2592 extern const char gp_fmode_rb[];
2593 extern const char gp_fmode_wb[];
2595 FILE *gp_open_scratch_file(const char *prefix,
2600 FILE *gp_fopen(const char *fname, const char *mode);
2604 int gp_setmode_binary(FILE * pfile, bool mode);
2607 gp_combine_small_buffer = -1,
2608 gp_combine_cant_handle = 0,
2609 gp_combine_success = 1
2610 } gp_file_name_combine_result;
2612 gp_file_name_combine_result gp_file_name_combine(const char *prefix, uint plen,
2613 const char *fname, uint flen, bool no_sibling, char *buffer, uint *blen);
2615 uint gp_file_name_root(const char *fname, uint len);
2617 uint gs_file_name_check_separator(const char *fname, int len, const char *item);
2623 bool gp_file_name_is_parent(const char *fname, uint len);
2629 bool gp_file_name_is_current(const char *fname, uint len);
2635 const char *gp_file_name_current(void);
2641 const char *gp_file_name_separator(void);
2647 const char *gp_file_name_directory_separator(void);
2653 const char *gp_file_name_parent(void);
2658 bool gp_file_name_is_partent_allowed(void);
2664 bool gp_file_name_is_empty_item_meanful(void);
2670 int gp_read_macresource(byte *buf, const char *fname,
2671 const uint type, const ushort id);
2673 int gp_cache_insert(int type, byte *key, int keylen, void *buffer, int buflen);
2676 typedef void *(*gp_cache_alloc)(void *userdata, int bytes);
2677 int gp_cache_query(int type, byte* key, int keylen, void **buffer,
2678 gp_cache_alloc alloc, void *userdata);
2680 FILE *gp_open_printer(char fname[260], int binary_mode);
2682 void gp_close_printer(FILE * pfile, const char *fname);
2688 typedef struct file_enum_s file_enum;
2690 file_enum *gp_enumerate_files_init(const char *pat, uint patlen,
2691 gs_memory_t * memory);
2693 uint gp_enumerate_files_next(file_enum * pfen, char *ptr, uint maxlen);
2701 void gp_enumerate_files_close(file_enum * pfen);
2703 void *gp_enumerate_fonts_init(gs_memory_t *mem);
2705 int gp_enumerate_fonts_next(void *enum_state, char **fontname, char **path);
2708 void gp_enumerate_fonts_free(void *enum_state);
2709 # 21 "./src/gdevpdfe.c" 2
2710 # 1 "./src/smd5.h" 1
2714 typedef unsigned char md5_byte_t;
2715 typedef unsigned int md5_word_t;
2718 typedef struct md5_state_s {
2719 md5_word_t count[2];
2730 void md5_init(md5_state_t *pms);
2733 void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
2736 void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
2737 # 22 "./src/smd5.h" 2
2743 typedef struct stream_MD5E_state_s {
2744 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
2746 } stream_MD5E_state;
2751 extern const stream_template s_MD5E_template;
2753 stream *s_MD5E_make_stream(gs_memory_t *mem, byte *digest, int digest_size);
2760 stream *s_MD5C_make_stream(gs_memory_t *mem, stream *strm);
2762 int s_MD5C_get_digest(stream *s, byte *buf, int buf_length);
2763 # 22 "./src/gdevpdfe.c" 2
2764 # 1 "./src/gscdefs.h" 1
2765 # 20 "./src/gscdefs.h"
2766 # 1 "./obj/../soobj/gconfigv.h" 1
2767 # 21 "./src/gscdefs.h" 2
2768 # 39 "./src/gscdefs.h"
2769 extern const long gs_buildtime;
2770 extern const char *const gs_copyright;
2771 extern const char *const gs_product;
2772 extern const char *const gs_productfamily;
2773 extern const long gs_revision;
2774 extern const long gs_revisiondate;
2775 extern const long gs_serialnumber;
2778 extern const char *const gs_doc_directory;
2779 extern const char *const gs_lib_default_path;
2780 extern const char *const gs_init_file;
2781 # 61 "./src/gscdefs.h"
2782 extern const unsigned gx_image_class_table_count;
2786 extern const unsigned gx_image_type_table_count;
2787 # 74 "./src/gscdefs.h"
2788 extern const unsigned gx_io_device_table_count;
2789 # 23 "./src/gdevpdfe.c" 2
2790 # 1 "./src/gdevpdfx.h" 1
2791 # 20 "./src/gdevpdfx.h"
2792 # 1 "./src/gsparam.h" 1
2793 # 34 "./src/gsparam.h"
2794 typedef struct gs_param_list_s gs_param_list;
2798 typedef const char *gs_param_name;
2799 # 48 "./src/gsparam.h"
2802 gs_param_type_null, gs_param_type_bool, gs_param_type_int,
2803 gs_param_type_long, gs_param_type_float,
2805 gs_param_type_string, gs_param_type_name,
2806 gs_param_type_int_array, gs_param_type_float_array,
2807 gs_param_type_string_array, gs_param_type_name_array,
2809 gs_param_type_dict, gs_param_type_dict_int_keys, gs_param_type_array
2811 # 73 "./src/gsparam.h"
2812 typedef struct gs_param_int_array_s { const int *data; uint size; bool persistent; } gs_param_int_array;
2813 typedef struct gs_param_float_array_s { const float *data; uint size; bool persistent; } gs_param_float_array;
2814 typedef struct gs_param_string_array_s { const gs_param_string *data; uint size; bool persistent; } gs_param_string_array;
2815 # 91 "./src/gsparam.h"
2816 typedef struct gs_param_collection_s {
2817 gs_param_list *list;
2819 } gs_param_collection;
2820 typedef gs_param_collection gs_param_dict;
2821 typedef gs_param_collection gs_param_array;
2822 # 118 "./src/gsparam.h"
2823 extern const byte gs_param_type_sizes[];
2824 extern const byte gs_param_type_base_sizes[];
2825 # 134 "./src/gsparam.h"
2826 typedef union gs_param_value_s {
2827 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;
2834 typedef struct gs_param_typed_value_s {
2835 gs_param_value value;
2837 } gs_param_typed_value;
2844 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);
2845 void gs_param_typed_value_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
2856 gs_param_collection_dict_any = 0,
2862 gs_param_collection_dict_int_keys = 1,
2867 gs_param_collection_array = 2
2869 } gs_param_collection_type_t;
2870 # 193 "./src/gsparam.h"
2871 typedef union gs_param_enumerator_s {
2876 } gs_param_enumerator_t;
2877 typedef gs_param_string gs_param_key_t;
2878 # 254 "./src/gsparam.h"
2879 typedef struct gs_param_list_procs_s {
2880 # 266 "./src/gsparam.h"
2881 int (*xmit_typed)(gs_param_list *, gs_param_name, gs_param_typed_value *);
2882 # 276 "./src/gsparam.h"
2883 int (*begin_xmit_collection)(gs_param_list *, gs_param_name, gs_param_dict *, gs_param_collection_type_t);
2884 # 294 "./src/gsparam.h"
2885 int (*end_xmit_collection)(gs_param_list *, gs_param_name, gs_param_dict *);
2886 # 310 "./src/gsparam.h"
2887 int (*next_key)(gs_param_list *, gs_param_enumerator_t *, gs_param_key_t *);
2888 # 324 "./src/gsparam.h"
2889 int (*request)(gs_param_list *, gs_param_name);
2890 # 339 "./src/gsparam.h"
2891 int (*requested)(const gs_param_list *, gs_param_name);
2892 # 348 "./src/gsparam.h"
2893 int (*get_policy)(gs_param_list *, gs_param_name);
2894 # 360 "./src/gsparam.h"
2895 int (*signal_error)(gs_param_list *, gs_param_name, int);
2896 # 373 "./src/gsparam.h"
2897 int (*commit)(gs_param_list *);
2901 } gs_param_list_procs;
2904 int param_read_requested_typed(gs_param_list *, gs_param_name,
2905 gs_param_typed_value *);
2912 int param_read_null(gs_param_list *, gs_param_name);
2913 int param_write_null(gs_param_list *, gs_param_name);
2914 int param_read_bool(gs_param_list *, gs_param_name, bool *);
2915 int param_write_bool(gs_param_list *, gs_param_name, const bool *);
2916 int param_read_int(gs_param_list *, gs_param_name, int *);
2917 int param_write_int(gs_param_list *, gs_param_name, const int *);
2918 int param_read_long(gs_param_list *, gs_param_name, long *);
2919 int param_write_long(gs_param_list *, gs_param_name, const long *);
2920 int param_read_float(gs_param_list *, gs_param_name, float *);
2921 int param_write_float(gs_param_list *, gs_param_name, const float *);
2922 int param_read_string(gs_param_list *, gs_param_name, gs_param_string *);
2923 int param_write_string(gs_param_list *, gs_param_name,
2924 const gs_param_string *);
2925 int param_read_name(gs_param_list *, gs_param_name, gs_param_string *);
2926 int param_write_name(gs_param_list *, gs_param_name,
2927 const gs_param_string *);
2928 int param_read_int_array(gs_param_list *, gs_param_name,
2929 gs_param_int_array *);
2930 int param_write_int_array(gs_param_list *, gs_param_name,
2931 const gs_param_int_array *);
2932 int param_write_int_values(gs_param_list *, gs_param_name,
2933 const int *, uint, bool);
2934 int param_read_float_array(gs_param_list *, gs_param_name,
2935 gs_param_float_array *);
2936 int param_write_float_array(gs_param_list *, gs_param_name,
2937 const gs_param_float_array *);
2938 int param_write_float_values(gs_param_list *, gs_param_name,
2939 const float *, uint, bool);
2940 int param_read_string_array(gs_param_list *, gs_param_name,
2941 gs_param_string_array *);
2942 int param_write_string_array(gs_param_list *, gs_param_name,
2943 const gs_param_string_array *);
2944 int param_read_name_array(gs_param_list *, gs_param_name,
2945 gs_param_string_array *);
2946 int param_write_name_array(gs_param_list *, gs_param_name,
2947 const gs_param_string_array *);
2948 # 437 "./src/gsparam.h"
2949 struct gs_param_list_s {
2950 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
2956 void gs_param_list_set_persist_keys(gs_param_list *, bool);
2959 void param_init_enumerator(gs_param_enumerator_t * penum);
2966 typedef struct gs_param_item_s {
2977 int gs_param_read_items(gs_param_list * plist, void *obj,
2978 const gs_param_item_t * items);
2979 int gs_param_write_items(gs_param_list * plist, const void *obj,
2980 const void *default_obj,
2981 const gs_param_item_t * items);
2984 void gs_param_list_init(gs_param_list *, const gs_param_list_procs *,
2992 int param_coerce_typed(gs_param_typed_value * pvalue,
2993 gs_param_type req_type, gs_memory_t * mem);
3001 int gs_param_request_default(gs_param_list *, gs_param_name);
3002 int gs_param_requested_default(const gs_param_list *, gs_param_name);
3003 # 518 "./src/gsparam.h"
3004 typedef struct gs_c_param_s gs_c_param;
3005 typedef struct gs_c_param_list_s {
3006 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
3008 gs_param_list *target;
3011 gs_param_collection_type_t coll_type;
3013 # 538 "./src/gsparam.h"
3014 void gs_c_param_list_set_target(gs_c_param_list *, gs_param_list *);
3020 gs_c_param_list *gs_c_param_list_alloc(gs_memory_t *, client_name_t);
3021 void gs_c_param_list_write(gs_c_param_list *, gs_memory_t *);
3022 void gs_c_param_list_write_more(gs_c_param_list *);
3023 void gs_c_param_list_read(gs_c_param_list *);
3024 void gs_c_param_list_release(gs_c_param_list *);
3025 # 21 "./src/gdevpdfx.h" 2
3026 # 1 "./src/gsuid.h" 1
3027 # 24 "./src/gsuid.h"
3028 typedef struct gs_uid_s gs_uid;
3036 # 60 "./src/gsuid.h"
3037 bool uid_equal(const gs_uid *, const gs_uid *);
3040 int uid_copy(gs_uid *puid, gs_memory_t *mem, client_name_t cname);
3041 # 22 "./src/gdevpdfx.h" 2
3042 # 1 "./src/gxdevice.h" 1
3043 # 21 "./src/gxdevice.h"
3044 # 1 "./src/gxdevcli.h" 1
3045 # 21 "./src/gxdevcli.h"
3046 # 1 "./src/stdint_.h" 1
3047 # 41 "./src/stdint_.h"
3048 # 1 "/usr/include/stdint.h" 1 3 4
3049 # 28 "/usr/include/stdint.h" 3 4
3050 # 1 "/usr/include/bits/wordsize.h" 1 3 4
3051 # 29 "/usr/include/stdint.h" 2 3 4
3052 # 49 "/usr/include/stdint.h" 3 4
3053 typedef unsigned char uint8_t;
3054 typedef unsigned short int uint16_t;
3056 typedef unsigned int uint32_t;
3063 typedef unsigned long long int uint64_t;
3070 typedef signed char int_least8_t;
3071 typedef short int int_least16_t;
3072 typedef int int_least32_t;
3077 typedef long long int int_least64_t;
3081 typedef unsigned char uint_least8_t;
3082 typedef unsigned short int uint_least16_t;
3083 typedef unsigned int uint_least32_t;
3088 typedef unsigned long long int uint_least64_t;
3095 typedef signed char int_fast8_t;
3101 typedef int int_fast16_t;
3102 typedef int int_fast32_t;
3104 typedef long long int int_fast64_t;
3108 typedef unsigned char uint_fast8_t;
3114 typedef unsigned int uint_fast16_t;
3115 typedef unsigned int uint_fast32_t;
3117 typedef unsigned long long int uint_fast64_t;
3118 # 126 "/usr/include/stdint.h" 3 4
3119 typedef int intptr_t;
3122 typedef unsigned int uintptr_t;
3123 # 138 "/usr/include/stdint.h" 3 4
3125 typedef long long int intmax_t;
3127 typedef unsigned long long int uintmax_t;
3128 # 42 "./src/stdint_.h" 2
3129 # 22 "./src/gxdevcli.h" 2
3130 # 1 "./src/gscompt.h" 1
3131 # 39 "./src/gscompt.h"
3132 typedef struct gs_composite_s gs_composite_t;
3139 gs_id gs_composite_id(const gs_composite_t * pcte);
3140 # 23 "./src/gxdevcli.h" 2
3141 # 1 "./src/gsdcolor.h" 1
3142 # 20 "./src/gsdcolor.h"
3143 # 1 "./src/gsccolor.h" 1
3144 # 25 "./src/gsccolor.h"
3145 typedef struct gs_pattern_instance_s gs_pattern_instance_t;
3146 # 37 "./src/gsccolor.h"
3147 typedef struct gs_paint_color_s {
3148 float values[(8 * 8)];
3154 typedef struct gs_client_color_s gs_client_color;
3157 struct gs_client_color_s {
3158 gs_paint_color paint;
3159 gs_pattern_instance_t *pattern;
3162 extern const gs_memory_struct_type_t st_client_color;
3163 # 21 "./src/gsdcolor.h" 2
3164 # 1 "./src/gxarith.h" 1
3165 # 25 "./src/gxarith.h"
3166 int imod(int m, int n);
3169 int igcd(int x, int y);
3175 int idivmod(int a, int b, int m);
3181 # 22 "./src/gsdcolor.h" 2
3182 # 1 "./src/gxbitmap.h" 1
3183 # 21 "./src/gxbitmap.h"
3184 # 1 "./src/gsbitmap.h" 1
3185 # 52 "./src/gsbitmap.h"
3186 typedef gs_id gs_bitmap_id;
3187 # 73 "./src/gsbitmap.h"
3188 typedef struct gs_bitmap_s {
3189 byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3191 typedef struct gs_const_bitmap_s {
3192 const byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3194 # 94 "./src/gsbitmap.h"
3195 typedef struct gs_tile_bitmap_s {
3196 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3198 typedef struct gs_const_tile_bitmap_s {
3199 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3200 } gs_const_tile_bitmap;
3201 # 122 "./src/gsbitmap.h"
3202 typedef struct gs_depth_bitmap_s {
3203 byte * data; int raster; gs_int_point size; gs_bitmap_id id; byte pix_depth; byte num_comps;
3205 typedef struct gs_const_depth_bitmap_s {
3206 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; byte pix_depth; byte num_comps;
3207 } gs_const_depth_bitmap;
3214 typedef struct gs_tile_depth_bitmap_s {
3215 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; byte pix_depth; byte num_comps;
3216 } gs_tile_depth_bitmap;
3217 typedef struct gs_const_tile_depth_bitmap_s {
3218 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; byte pix_depth; byte num_comps;
3219 } gs_const_tile_depth_bitmap;
3220 # 153 "./src/gsbitmap.h"
3221 extern const gs_memory_struct_type_t st_gs_bitmap;
3222 extern const gs_memory_struct_type_t st_gs_tile_bitmap;
3223 extern const gs_memory_struct_type_t st_gs_depth_bitmap;
3224 extern const gs_memory_struct_type_t st_gs_tile_depth_bitmap;
3225 # 22 "./src/gxbitmap.h" 2
3228 typedef gs_bitmap_id gx_bitmap_id;
3229 # 74 "./src/gxbitmap.h"
3230 typedef struct gx_bitmap_s {
3231 byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3233 typedef struct gx_const_bitmap_s {
3234 const byte * data; int raster; gs_int_point size; gs_bitmap_id id;
3243 typedef struct gx_tile_bitmap_s {
3244 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3246 typedef struct gx_const_tile_bitmap_s {
3247 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height;
3248 } gx_const_tile_bitmap;
3249 # 135 "./src/gxbitmap.h"
3250 typedef struct gx_strip_bitmap_s {
3251 byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; ushort rep_shift; ushort shift;
3253 typedef struct gx_const_strip_bitmap_s {
3254 const byte * data; int raster; gs_int_point size; gs_bitmap_id id; ushort rep_width, rep_height; ushort rep_shift; ushort shift;
3255 } gx_const_strip_bitmap;
3257 extern const gs_memory_struct_type_t st_gx_strip_bitmap;
3258 # 23 "./src/gsdcolor.h" 2
3259 # 1 "./src/gxhttile.h" 1
3260 # 30 "./src/gxhttile.h"
3261 typedef struct gx_ht_tile_s gx_ht_tile;
3265 struct gx_ht_tile_s {
3266 gx_strip_bitmap tiles;
3273 # 24 "./src/gsdcolor.h" 2
3274 # 1 "./src/gxcindex.h" 1
3275 # 20 "./src/gxcindex.h"
3276 # 1 "./src/gsbitops.h" 1
3277 # 270 "./src/gsbitops.h"
3278 void bits_fill_rectangle(byte * dest, int dest_bit, uint raster,
3279 uint pattern, int width_bits, int height);
3280 void bits_fill_rectangle_masked(byte * dest, int dest_bit, uint raster,
3281 uint pattern, uint src_mask,
3282 int width_bits, int height);
3285 void bits_replicate_horizontally(byte * data, uint width, uint height,
3286 uint raster, uint replicated_width, uint replicated_raster);
3289 void bits_replicate_vertically(byte * data, uint height, uint raster,
3290 uint replicated_height);
3293 void bits_bounding_box(const byte * data, uint height, uint raster,
3294 gs_int_rect * pbox);
3299 void bits_compress_scaled(const byte * src, int srcx, uint width,
3300 uint height, uint sraster, byte * dest, uint draster,
3301 const gs_log2_scale_point * plog2_scale, int log2_out_bits);
3304 typedef struct bits_plane_s {
3313 int bits_extract_plane(const bits_plane_t *dest ,
3314 const bits_plane_t *source , int shift, int width, int height);
3317 int bits_expand_plane(const bits_plane_t *dest ,
3318 const bits_plane_t *source , int shift, int width, int height);
3321 void bytes_fill_rectangle(byte * dest, uint raster,
3322 byte value, int width_bytes, int height);
3325 void bytes_copy_rectangle(byte * dest, uint dest_raster,
3326 const byte * src, uint src_raster, int width_bytes, int height);
3327 # 21 "./src/gxcindex.h" 2
3328 # 55 "./src/gxcindex.h"
3329 typedef unsigned long long gx_color_index_data;
3330 # 79 "./src/gxcindex.h"
3331 typedef gx_color_index_data gx_color_index;
3332 # 25 "./src/gsdcolor.h" 2
3333 # 1 "./src/gxwts.h" 1
3334 # 17 "./src/gxwts.h"
3335 typedef bits16 wts_screen_sample_t;
3339 typedef struct wts_screen_s wts_screen_t;
3348 struct wts_screen_s {
3349 wts_screen_type type;
3353 wts_screen_sample_t *samples;
3389 int wts_get_samples(const wts_screen_t *ws, int x, int y,
3390 wts_screen_sample_t **samples, int *p_nsamples);
3391 # 26 "./src/gsdcolor.h" 2
3395 typedef struct gx_device_color_s gx_device_color;
3400 typedef struct gx_device_color_saved_s gx_device_color_saved;
3405 typedef struct gx_device_halftone_s gx_device_halftone;
3406 # 87 "./src/gsdcolor.h"
3407 bool gx_device_color_equal(const gx_device_color *pdevc1,
3408 const gx_device_color *pdevc2);
3409 # 157 "./src/gsdcolor.h"
3410 void gx_complete_halftone(gx_device_color *pdevc, int num_comps,
3411 gx_device_halftone *pdht);
3412 # 183 "./src/gsdcolor.h"
3413 typedef struct gx_color_tile_s gx_color_tile;
3414 # 253 "./src/gsdcolor.h"
3415 typedef struct gx_device_color_type_s gx_device_color_type_t;
3416 typedef const gx_device_color_type_t *gx_device_color_type;
3418 struct gx_device_color_s {
3423 gx_device_color_type type;
3431 gx_color_index pure;
3433 const gx_device_halftone *b_ht;
3434 gx_color_index color[2];
3440 gx_device_halftone *c_ht;
3441 ushort num_components;
3442 byte c_base[(8 * 8)];
3443 uint c_level[(8 * 8)];
3451 gx_color_index plane_mask;
3456 const gx_device_halftone *w_ht;
3457 wts_screen_sample_t levels[(8 * 8)];
3458 ushort num_components;
3461 gx_color_index plane_vector[(8 * 8)];
3464 gx_color_tile *p_tile;
3482 gs_client_color ccolor;
3489 gx_color_tile *m_tile;
3492 # 374 "./src/gsdcolor.h"
3493 struct gx_device_color_saved_s {
3494 gx_device_color_type type;
3496 gx_color_index pure;
3498 gx_color_index b_color[2];
3503 byte c_base[(8 * 8)];
3504 uint c_level[(8 * 8)];
3508 wts_screen_sample_t levels[(8 * 8)];
3521 # 414 "./src/gsdcolor.h"
3522 extern const gx_device_color_type_t *const gx_dc_type_none;
3525 extern const gx_device_color_type_t *const gx_dc_type_null;
3528 extern const gx_device_color_type_t *const gx_dc_type_pure;
3529 # 430 "./src/gsdcolor.h"
3530 extern const gx_device_color_type_t *const gx_dc_type_ht_binary;
3533 extern const gx_device_color_type_t *const gx_dc_type_ht_colored;
3536 extern const gx_device_color_type_t *const gx_dc_type_wts;
3537 # 24 "./src/gxdevcli.h" 2
3538 # 1 "./src/gsmatrix.h" 1
3539 # 26 "./src/gsmatrix.h"
3540 struct gs_matrix_s {
3541 float xx, xy, yx, yy, tx, ty;
3546 typedef struct gs_matrix_s gs_matrix;
3547 # 50 "./src/gsmatrix.h"
3548 void gs_make_identity(gs_matrix *);
3549 int gs_make_translation(floatp, floatp, gs_matrix *),
3550 gs_make_scaling(floatp, floatp, gs_matrix *),
3551 gs_make_rotation(floatp, gs_matrix *);
3554 int gs_matrix_multiply(const gs_matrix *, const gs_matrix *, gs_matrix *),
3555 gs_matrix_invert(const gs_matrix *, gs_matrix *),
3556 gs_matrix_translate(const gs_matrix *, floatp, floatp, gs_matrix *),
3557 gs_matrix_scale(const gs_matrix *, floatp, floatp, gs_matrix *),
3558 gs_matrix_rotate(const gs_matrix *, floatp, gs_matrix *);
3561 int gs_point_transform(floatp, floatp, const gs_matrix *, gs_point *),
3562 gs_point_transform_inverse(floatp, floatp, const gs_matrix *, gs_point *),
3563 gs_distance_transform(floatp, floatp, const gs_matrix *, gs_point *),
3564 gs_distance_transform_inverse(floatp, floatp, const gs_matrix *, gs_point *),
3565 gs_points_bbox(const gs_point[4], gs_rect *),
3566 gs_bbox_transform_only(const gs_rect *, const gs_matrix *, gs_point[4]),
3567 gs_bbox_transform(const gs_rect *, const gs_matrix *, gs_rect *),
3568 gs_bbox_transform_inverse(const gs_rect *, const gs_matrix *, gs_rect *);
3575 int sget_matrix(stream *, gs_matrix *);
3576 int sput_matrix(stream *, const gs_matrix *);
3577 # 25 "./src/gxdevcli.h" 2
3578 # 1 "./src/gsiparam.h" 1
3579 # 43 "./src/gsiparam.h"
3580 typedef struct gx_image_type_s gx_image_type_t;
3581 # 52 "./src/gsiparam.h"
3582 typedef struct gs_image_common_s {
3583 const gx_image_type_t *type; gs_matrix ImageMatrix;
3584 } gs_image_common_t;
3585 # 120 "./src/gsiparam.h"
3586 typedef struct gs_data_image_s {
3587 const gx_image_type_t *type; gs_matrix ImageMatrix; int Width; int Height; int BitsPerComponent; float Decode[((8 * 8) + 1) * 2]; bool Interpolate;
3589 # 143 "./src/gsiparam.h"
3592 gs_image_format_chunky = 0,
3594 gs_image_format_component_planar = 1,
3596 gs_image_format_bit_planar = 2
3597 } gs_image_format_t;
3602 typedef struct gs_color_space_s gs_color_space;
3603 # 175 "./src/gsiparam.h"
3604 typedef struct gs_pixel_image_s {
3605 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;
3608 extern const gs_memory_struct_type_t st_gs_pixel_image;
3609 # 189 "./src/gsiparam.h"
3612 gs_image_alpha_none = 0,
3614 gs_image_alpha_first,
3619 typedef struct gs_image1_s {
3620 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;
3636 gs_image_alpha_t Alpha;
3640 extern const gs_memory_struct_type_t st_gs_image1;
3648 typedef gs_image1_t gs_image_t;
3649 # 236 "./src/gsiparam.h"
3654 gs_image_common_t_init(gs_image_common_t * pic),
3662 gs_data_image_t_init(gs_data_image_t * pim, int num_components),
3669 gs_pixel_image_t_init(gs_pixel_image_t * pim,
3670 const gs_color_space * color_space);
3671 # 270 "./src/gsiparam.h"
3672 void gs_image_t_init_adjust(gs_image_t * pim, const gs_color_space * pcs,
3676 void gs_image_t_init_mask_adjust(gs_image_t * pim, bool write_1s,
3678 # 26 "./src/gxdevcli.h" 2
3679 # 1 "./src/gsrefct.h" 1
3680 # 34 "./src/gsrefct.h"
3681 typedef struct rc_header_s rc_header;
3682 struct rc_header_s {
3684 gs_memory_t *memory;
3687 void (*free)(gs_memory_t *, void *, client_name_t);
3689 # 56 "./src/gsrefct.h"
3690 void rc_free_struct_only(gs_memory_t *, void *, client_name_t);
3691 # 27 "./src/gxdevcli.h" 2
3692 # 1 "./src/gsropt.h" 1
3693 # 41 "./src/gsropt.h"
3703 rop2_default = rop2_S
3705 # 60 "./src/gsropt.h"
3715 rop3_default = rop3_T | rop3_S
3717 # 159 "./src/gsropt.h"
3718 typedef uint gs_logical_operation_t;
3719 # 198 "./src/gsropt.h"
3720 typedef unsigned long rop_operand;
3721 typedef rop_operand (*rop_proc)(rop_operand D, rop_operand S, rop_operand T);
3736 extern const rop_proc rop_proc_table[256];
3739 extern const byte rop_usage_table[256];
3740 # 28 "./src/gxdevcli.h" 2
3741 # 1 "./src/gsstruct.h" 1
3742 # 83 "./src/gsstruct.h"
3743 typedef struct obj_header_s obj_header_t;
3751 struct gs_ptr_procs_s {
3757 void (*unmark)(enum_ptr_t *, gc_state_t *);
3764 bool (*mark)(enum_ptr_t *, gc_state_t *);
3765 # 114 "./src/gsstruct.h"
3766 void *(*reloc)(const void *, gc_state_t *);
3772 extern const gs_ptr_procs_t ptr_struct_procs;
3776 extern const gs_ptr_procs_t ptr_string_procs;
3778 extern const gs_ptr_procs_t ptr_const_string_procs;
3785 struct gs_gc_root_s {
3787 gs_ptr_type_t ptype;
3789 bool free_on_unregister;
3791 # 174 "./src/gsstruct.h"
3792 typedef struct gc_procs_common_s {
3793 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 *);
3794 } gc_procs_common_t;
3802 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);
3803 void gs_no_struct_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
3809 extern const gs_memory_struct_type_t st_free;
3813 extern const gs_memory_struct_type_t st_bytes;
3817 extern const gs_memory_struct_type_t st_gc_root_t;
3818 # 210 "./src/gsstruct.h"
3819 extern const gs_memory_struct_type_t st_const_string_element;
3820 # 231 "./src/gsstruct.h"
3825 } gc_ptr_type_index_t;
3827 typedef struct gc_ptr_element_s {
3831 # 255 "./src/gsstruct.h"
3832 typedef struct gc_struct_data_s {
3834 ushort super_offset;
3835 const gs_memory_struct_type_t *super_type;
3836 const gc_ptr_element_t *ptrs;
3838 # 278 "./src/gsstruct.h"
3839 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);
3840 void basic_reloc_ptrs(void *ptr, uint size, const gs_memory_struct_type_t *pstype, gc_state_t *gcst);
3841 # 360 "./src/gsstruct.h"
3842 extern gs_ptr_type_t
3843 enum_bytestring(enum_ptr_t *pep, const gs_bytestring *pbs);
3846 extern gs_ptr_type_t
3847 enum_const_bytestring(enum_ptr_t *pep, const gs_const_bytestring *pbs);
3848 # 418 "./src/gsstruct.h"
3849 extern void reloc_bytestring(gs_bytestring *pbs, gc_state_t *gcst);
3852 extern void reloc_const_bytestring(gs_const_bytestring *pbs, gc_state_t *gcst);
3853 # 29 "./src/gxdevcli.h" 2
3854 # 1 "./src/gstparam.h" 1
3855 # 24 "./src/gstparam.h"
3857 BLEND_MODE_Compatible,
3859 BLEND_MODE_Multiply,
3861 BLEND_MODE_Difference,
3864 BLEND_MODE_ColorDodge,
3865 BLEND_MODE_ColorBurn,
3866 BLEND_MODE_Exclusion,
3867 BLEND_MODE_HardLight,
3869 BLEND_MODE_SoftLight,
3870 BLEND_MODE_Luminosity,
3872 BLEND_MODE_Saturation,
3884 TRANSPARENCY_STATE_Group = 1,
3885 TRANSPARENCY_STATE_Mask
3886 } gs_transparency_state_type_t;
3890 typedef struct gs_transparency_state_s gs_transparency_state_t;
3891 struct gs_transparency_state_s {
3892 gs_transparency_state_t *saved; gs_transparency_state_type_t type;
3898 typedef struct gs_transparency_mask_s {
3900 } gs_transparency_mask_t;
3908 typedef struct gs_function_s gs_function_t;
3913 typedef struct gs_transparency_group_params_s {
3914 const gs_color_space *ColorSpace;
3917 } gs_transparency_group_params_t;
3921 TRANSPARENCY_MASK_Alpha,
3922 TRANSPARENCY_MASK_Luminosity
3923 } gs_transparency_mask_subtype_t;
3930 typedef struct gs_transparency_mask_params_s {
3931 gs_transparency_mask_subtype_t subtype;
3932 int Background_components;
3933 float Background[(8 * 8)];
3934 float GrayBackground;
3935 int (*TransferFunction)(floatp in, float *out, void *proc_data);
3936 gs_function_t *TransferFunction_data;
3937 } gs_transparency_mask_params_t;
3942 typedef struct gx_transparency_mask_params_s {
3943 gs_transparency_mask_subtype_t subtype;
3944 int Background_components;
3945 float Background[(8 * 8)];
3946 float GrayBackground;
3947 bool function_is_identity;
3948 byte transfer_fn[256];
3949 } gx_transparency_mask_params_t;
3953 TRANSPARENCY_CHANNEL_Opacity = 0,
3954 TRANSPARENCY_CHANNEL_Shape = 1
3955 } gs_transparency_channel_selector_t;
3956 # 30 "./src/gxdevcli.h" 2
3957 # 1 "./src/gsxfont.h" 1
3958 # 22 "./src/gsxfont.h"
3959 typedef ulong gx_xglyph;
3964 struct gx_xfont_procs_s;
3965 typedef struct gx_xfont_procs_s gx_xfont_procs;
3969 typedef struct gx_xfont_s gx_xfont;
3970 # 31 "./src/gxdevcli.h" 2
3973 # 1 "./src/gxcvalue.h" 1
3974 # 21 "./src/gxcvalue.h"
3975 typedef unsigned short gx_color_value;
3976 # 34 "./src/gxdevcli.h" 2
3977 # 1 "./src/gxfixed.h" 1
3978 # 25 "./src/gxfixed.h"
3980 typedef ulong ufixed;
3981 # 159 "./src/gxfixed.h"
3982 fixed fixed_mult_quo(fixed A, fixed B, fixed C);
3983 # 263 "./src/gxfixed.h"
3984 typedef struct gs_fixed_point_s {
3989 typedef struct gs_fixed_rect_s {
3990 gs_fixed_point p, q;
3992 # 35 "./src/gxdevcli.h" 2
3993 # 1 "./src/gxtext.h" 1
3994 # 20 "./src/gxtext.h"
3995 # 1 "./src/gstext.h" 1
3996 # 20 "./src/gstext.h"
3997 # 1 "./src/gsccode.h" 1
3998 # 25 "./src/gsccode.h"
3999 typedef ulong gs_char;
4000 # 72 "./src/gsccode.h"
4001 typedef ulong gs_glyph;
4002 # 90 "./src/gsccode.h"
4003 typedef bool (*gs_glyph_mark_proc_t)(const gs_memory_t *mem, gs_glyph glyph, void *proc_data);
4007 ENCODING_INDEX_UNKNOWN = -1,
4009 ENCODING_INDEX_STANDARD = 0,
4010 ENCODING_INDEX_ISOLATIN1,
4011 ENCODING_INDEX_SYMBOL,
4012 ENCODING_INDEX_DINGBATS,
4013 ENCODING_INDEX_WINANSI,
4014 ENCODING_INDEX_MACROMAN,
4015 ENCODING_INDEX_MACEXPERT,
4018 ENCODING_INDEX_MACGLYPH,
4019 ENCODING_INDEX_ALOGLYPH,
4020 ENCODING_INDEX_ALXGLYPH,
4021 ENCODING_INDEX_CFFSTRINGS
4023 } gs_encoding_index_t;
4024 # 123 "./src/gsccode.h"
4025 typedef enum gs_glyph_space_s {
4036 typedef int (*gs_glyph_name_proc_t)(const gs_memory_t *mem,
4037 gs_glyph glyph, gs_const_string *pstr,
4039 # 21 "./src/gstext.h" 2
4040 # 1 "./src/gscpm.h" 1
4041 # 20 "./src/gscpm.h"
4047 cpm_false_charboxpath,
4048 cpm_true_charboxpath
4049 } gs_char_path_mode;
4052 CACHE_DEVICE_NONE = 0,
4053 CACHE_DEVICE_NOT_CACHING,
4054 CACHE_DEVICE_NONE_AND_CLIP,
4055 CACHE_DEVICE_CACHING
4056 } gs_in_cache_device_t;
4057 # 22 "./src/gstext.h" 2
4058 # 95 "./src/gstext.h"
4059 typedef struct gs_text_params_s {
4064 const gs_char *chars;
4065 const gs_glyph *glyphs;
4073 gs_point delta_space;
4080 const float *x_widths;
4081 const float *y_widths;
4084 # 128 "./src/gstext.h"
4085 int gs_text_replaced_width(const gs_text_params_t *text, uint index,
4094 typedef struct gs_text_enum_s gs_text_enum_t;
4100 typedef struct gx_device_s gx_device;
4101 # 155 "./src/gstext.h"
4102 typedef struct gs_font_s gs_font;
4106 typedef struct gx_path_s gx_path;
4110 typedef struct gx_clip_path_s gx_clip_path;
4111 # 187 "./src/gstext.h"
4112 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);
4119 int gs_text_begin(gs_state * pgs, const gs_text_params_t * text,
4120 gs_memory_t * mem, gs_text_enum_t ** ppenum);
4126 int gs_text_update_dev_color(gs_state * pgs, gs_text_enum_t * pte);
4131 gs_show_begin(gs_state *, const byte *, uint,
4132 gs_memory_t *, gs_text_enum_t **),
4133 gs_ashow_begin(gs_state *, floatp, floatp, const byte *, uint,
4134 gs_memory_t *, gs_text_enum_t **),
4135 gs_widthshow_begin(gs_state *, floatp, floatp, gs_char,
4137 gs_memory_t *, gs_text_enum_t **),
4138 gs_awidthshow_begin(gs_state *, floatp, floatp, gs_char,
4139 floatp, floatp, const byte *, uint,
4140 gs_memory_t *, gs_text_enum_t **),
4141 gs_kshow_begin(gs_state *, const byte *, uint,
4142 gs_memory_t *, gs_text_enum_t **),
4143 gs_xyshow_begin(gs_state *, const byte *, uint,
4144 const float *, const float *, uint,
4145 gs_memory_t *, gs_text_enum_t **),
4146 gs_glyphshow_begin(gs_state *, gs_glyph,
4147 gs_memory_t *, gs_text_enum_t **),
4148 gs_cshow_begin(gs_state *, const byte *, uint,
4149 gs_memory_t *, gs_text_enum_t **),
4150 gs_stringwidth_begin(gs_state *, const byte *, uint,
4151 gs_memory_t *, gs_text_enum_t **),
4152 gs_charpath_begin(gs_state *, const byte *, uint, bool,
4153 gs_memory_t *, gs_text_enum_t **),
4154 gs_glyphpath_begin(gs_state *, gs_glyph, bool,
4155 gs_memory_t *, gs_text_enum_t **),
4156 gs_glyphwidth_begin(gs_state *, gs_glyph,
4157 gs_memory_t *, gs_text_enum_t **),
4158 gs_charboxpath_begin(gs_state *, const byte *, uint, bool,
4159 gs_memory_t *, gs_text_enum_t **);
4164 int gs_text_restart(gs_text_enum_t *pte, const gs_text_params_t *text);
4169 int gs_text_resync(gs_text_enum_t *pte, const gs_text_enum_t *pfrom);
4170 # 276 "./src/gstext.h"
4171 int gs_text_process(gs_text_enum_t *pte);
4174 gs_font *gs_text_current_font(const gs_text_enum_t *pte);
4175 gs_char gs_text_current_char(const gs_text_enum_t *pte);
4176 gs_char gs_text_next_char(const gs_text_enum_t *pte);
4177 gs_glyph gs_text_current_glyph(const gs_text_enum_t *pte);
4178 int gs_text_total_width(const gs_text_enum_t *pte, gs_point *pwidth);
4185 bool gs_text_is_width_only(const gs_text_enum_t *pte);
4190 int gs_text_current_width(const gs_text_enum_t *pte, gs_point *pwidth);
4197 TEXT_SET_CHAR_WIDTH,
4198 TEXT_SET_CACHE_DEVICE,
4199 TEXT_SET_CACHE_DEVICE2
4200 } gs_text_cache_control_t;
4202 gs_text_set_cache(gs_text_enum_t *pte, const double *values,
4203 gs_text_cache_control_t control),
4204 gs_text_setcharwidth(gs_text_enum_t *pte, const double wxy[2]),
4205 gs_text_setcachedevice(gs_text_enum_t *pte, const double wbox[6]),
4206 gs_text_setcachedevice2(gs_text_enum_t *pte, const double wbox2[10]);
4209 int gs_text_retry(gs_text_enum_t *pte);
4212 void gs_text_release(gs_text_enum_t *pte, client_name_t cname);
4213 # 21 "./src/gxtext.h" 2
4217 typedef struct gs_text_enum_procs_s gs_text_enum_procs_t;
4221 typedef struct cached_fm_pair_s cached_fm_pair;
4227 typedef struct gs_text_returned_s {
4228 gs_char current_char;
4229 gs_glyph current_glyph;
4230 gs_point total_width;
4231 } gs_text_returned_t;
4232 # 54 "./src/gxtext.h"
4233 typedef struct gx_font_stack_item_s {
4236 } gx_font_stack_item_t;
4237 typedef struct gx_font_stack_s {
4239 gx_font_stack_item_t items[1 + 5];
4241 # 74 "./src/gxtext.h"
4242 void rc_free_text_enum(gs_memory_t *, void *, client_name_t);
4243 # 111 "./src/gxtext.h"
4244 struct gs_text_enum_s {
4245 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;
4247 # 163 "./src/gxtext.h"
4248 int gs_text_enum_init(gs_text_enum_t *pte,
4249 const gs_text_enum_procs_t *procs,
4250 gx_device *dev, gs_imager_state *pis,
4251 const gs_text_params_t *text,
4252 gs_font *font, gx_path *path,
4253 const gx_device_color *pdcolor,
4254 const gx_clip_path *pcpath,
4263 void gs_text_enum_copy_dynamic(gs_text_enum_t *pto,
4264 const gs_text_enum_t *pfrom,
4266 # 211 "./src/gxtext.h"
4267 struct gs_text_enum_procs_s {
4268 # 224 "./src/gxtext.h"
4269 int (*resync)(gs_text_enum_t *pte, const gs_text_enum_t *pfrom);
4270 # 254 "./src/gxtext.h"
4271 int (*process)(gs_text_enum_t *pte);
4272 # 265 "./src/gxtext.h"
4273 bool (*is_width_only)(const gs_text_enum_t *pte);
4274 # 274 "./src/gxtext.h"
4275 int (*current_width)(const gs_text_enum_t *pte, gs_point *pwidth);
4276 # 285 "./src/gxtext.h"
4277 int (*set_cache)(gs_text_enum_t *pte, const double *values, gs_text_cache_control_t control);
4278 # 295 "./src/gxtext.h"
4279 int (*retry)(gs_text_enum_t *pte);
4280 # 306 "./src/gxtext.h"
4281 void (*release)(gs_text_enum_t *pte, client_name_t cname);
4286 void gx_default_text_release(gs_text_enum_t *pte, client_name_t cname);
4287 # 36 "./src/gxdevcli.h" 2
4288 # 1 "./src/gxcmap.h" 1
4289 # 21 "./src/gxcmap.h"
4290 # 1 "./src/gscsel.h" 1
4291 # 25 "./src/gscsel.h"
4293 gs_color_select_all = -1,
4294 gs_color_select_texture = 0,
4295 gs_color_select_source = 1
4296 } gs_color_select_t;
4297 # 22 "./src/gxcmap.h" 2
4298 # 1 "./src/gxfmap.h" 1
4299 # 22 "./src/gxfmap.h"
4300 # 1 "./src/gxfrac.h" 1
4301 # 25 "./src/gxfrac.h"
4303 typedef short signed_frac;
4304 # 23 "./src/gxfmap.h" 2
4305 # 1 "./src/gxtmap.h" 1
4306 # 27 "./src/gxtmap.h"
4307 typedef struct gx_transfer_map_s gx_transfer_map;
4313 typedef float (*gs_mapping_proc) (floatp, const gx_transfer_map *);
4319 typedef float (*gs_mapping_closure_proc_t) (floatp value,
4320 const gx_transfer_map * pmap,
4321 const void *proc_data);
4322 typedef struct gs_mapping_closure_s {
4323 gs_mapping_closure_proc_t proc;
4325 } gs_mapping_closure_t;
4326 # 24 "./src/gxfmap.h" 2
4327 # 39 "./src/gxfmap.h"
4328 struct gx_transfer_map_s {
4330 gs_mapping_proc proc;
4331 gs_mapping_closure_t closure;
4334 frac values[(1 << 8)];
4337 extern const gs_memory_struct_type_t st_transfer_map;
4343 void gx_set_identity_transfer(gx_transfer_map *);
4344 # 63 "./src/gxfmap.h"
4345 frac gx_color_frac_map(frac, const frac *);
4346 # 97 "./src/gxfmap.h"
4347 float gs_mapped_transfer(floatp, const gx_transfer_map *);
4352 float gs_identity_transfer(floatp, const gx_transfer_map *);
4353 # 23 "./src/gxcmap.h" 2
4354 # 85 "./src/gxcmap.h"
4355 struct gx_cm_color_map_procs_s {
4356 void (*map_gray) (gx_device * dev, frac gray, frac * out);
4357 void (*map_rgb) (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out);
4358 void (*map_cmyk) (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4361 typedef struct gx_cm_color_map_procs_s gx_cm_color_map_procs;
4366 void gray_cs_to_gray_cm (gx_device * dev, frac gray, frac * out);
4367 void rgb_cs_to_rgb_cm (gx_device * dev, const gs_imager_state *pis, frac r, frac g, frac b, frac * out);
4368 void cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4369 # 112 "./src/gxcmap.h"
4370 struct gx_color_map_procs_s {
4371 void (*map_gray)(frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4372 void (*map_rgb)(frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4373 void (*map_cmyk)(frac, frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4374 void (*map_rgb_alpha)(frac, frac, frac, frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4375 void (*map_separation)(frac, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4376 void (*map_devicen)(const frac *, gx_device_color *, const gs_imager_state *, gx_device *, gs_color_select_t);
4377 bool (*is_halftoned)(const gs_imager_state *, gx_device *);
4379 typedef struct gx_color_map_procs_s gx_color_map_procs;
4386 const gx_color_map_procs *
4387 gx_get_cmap_procs(const gs_imager_state *, const gx_device *);
4388 const gx_color_map_procs *
4389 gx_default_get_cmap_procs(const gs_imager_state *, const gx_device *);
4396 void gx_set_cmap_procs(gs_imager_state *, const gx_device *);
4397 # 163 "./src/gxcmap.h"
4398 extern void gx_default_gray_cs_to_gray_cm (gx_device * dev, frac gray, frac * out);
4399 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);
4400 extern void gx_default_cmyk_cs_to_gray_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4402 extern void gx_default_gray_cs_to_rgb_cm (gx_device * dev, frac gray, frac * out);
4403 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);
4404 extern void gx_default_cmyk_cs_to_rgb_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4406 extern void gx_default_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out);
4407 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);
4408 extern void gx_default_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4410 extern void gx_default_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out);
4411 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);
4412 extern void gx_default_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4414 extern void gx_error_gray_cs_to_cmyk_cm (gx_device * dev, frac gray, frac * out);
4415 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);
4416 extern void gx_error_cmyk_cs_to_cmyk_cm (gx_device * dev, frac c, frac m, frac y, frac k, frac * out);
4417 # 238 "./src/gxcmap.h"
4418 int (gx_error_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4419 int (gx_default_DevGray_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4420 int (gx_default_DevRGB_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4421 int (gx_default_DevCMYK_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4422 int (gx_default_DevRGBK_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
4428 const gx_cm_color_map_procs * (gx_error_get_color_mapping_procs)(const gx_device * dev);
4429 const gx_cm_color_map_procs * (gx_default_DevGray_get_color_mapping_procs)(const gx_device * dev);
4430 const gx_cm_color_map_procs * (gx_default_DevRGB_get_color_mapping_procs)(const gx_device * dev);
4431 const gx_cm_color_map_procs * (gx_default_DevCMYK_get_color_mapping_procs)(const gx_device * dev);
4432 const gx_cm_color_map_procs * (gx_default_DevRGBK_get_color_mapping_procs)(const gx_device * dev);
4438 gx_color_index (gx_error_encode_color)(gx_device * dev, const gx_color_value colors[]);
4439 gx_color_index (gx_default_encode_color)(gx_device * dev, const gx_color_value colors[]);
4445 gx_color_index (gx_default_gray_fast_encode)(gx_device * dev, const gx_color_value colors[]);
4446 gx_color_index (gx_default_gray_encode)(gx_device * dev, const gx_color_value colors[]);
4453 gx_color_index (gx_backwards_compatible_gray_encode)(gx_device * dev, const gx_color_value colors[]);
4459 int (gx_error_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
4460 int (gx_default_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
4461 # 37 "./src/gxdevcli.h" 2
4462 # 1 "./src/gsnamecl.h" 1
4463 # 38 "./src/gsnamecl.h"
4464 typedef struct named_color_params_s {
4469 bool use_named_color_callback;
4470 # 52 "./src/gsnamecl.h"
4471 int color_index[(8 * 8)];
4472 } named_color_params_t;
4473 # 93 "./src/gsnamecl.h"
4474 int named_color_put_params(gx_device * dev, gs_param_list * plist);
4475 # 102 "./src/gsnamecl.h"
4476 int named_color_get_params(gx_device * dev, gs_param_list * plist);
4482 bool named_color_install_Separation(gs_color_space * pcs, gs_state * pgs);
4488 bool named_color_install_DeviceN(gs_color_space * pcs, gs_state * pgs);
4494 int gx_remap_concrete_named_color_Separation(const frac * pconc,
4495 const gs_color_space * pcs, gx_device_color * pdc,
4496 const gs_imager_state * pis, gx_device * dev, gs_color_select_t select);
4502 int gx_remap_concrete_named_color_DeviceN(const frac * pconc,
4503 const gs_color_space * pcs, gx_device_color * pdc,
4504 const gs_imager_state * pis, gx_device * dev, gs_color_select_t select);
4505 # 143 "./src/gsnamecl.h"
4506 typedef struct client_named_color_params_s {
4507 struct client_named_color_procs_s * client_procs;
4509 } client_named_color_params_t;
4514 typedef struct client_named_color_procs_s {
4519 bool (* install_Separation)(client_named_color_params_t * pparams,
4520 gs_color_space * pcs, gs_state * pgs);
4524 int (* remap_Separation)(client_named_color_params_t * pparams,
4525 const frac * pconc, const gs_color_space * pcs,
4526 gx_device_color * pdc, const gs_imager_state * pis,
4527 gx_device * dev, gs_color_select_t select);
4532 bool (* install_DeviceN)(client_named_color_params_t * pparams,
4533 gs_color_space * pcs, gs_state * pgs);
4537 int (* remap_DeviceN)(client_named_color_params_t * pparams, const frac * pconc,
4538 const gs_color_space * pcs, gx_device_color * pdc,
4539 const gs_imager_state * pis, gx_device * dev,
4540 gs_color_select_t select);
4542 } client_named_color_procs_t;
4543 # 38 "./src/gxdevcli.h" 2
4544 # 134 "./src/gxdevcli.h"
4545 typedef struct gx_fill_params_s gx_fill_params;
4549 typedef struct gx_stroke_params_s gx_stroke_params;
4550 # 149 "./src/gxdevcli.h"
4551 typedef struct gx_image_enum_common_s gx_image_enum_common_t;
4558 typedef struct gs_pattern1_instance_s gs_pattern1_instance_t;
4563 typedef gx_device_color gx_drawing_color;
4570 } graphics_object_type;
4573 typedef struct gs_fixed_edge_s {
4574 gs_fixed_point start;
4581 typedef struct gs_get_bits_params_s gs_get_bits_params_t;
4585 typedef struct gx_device_anti_alias_info_s {
4588 } gx_device_anti_alias_info;
4590 typedef int32_t frac31;
4595 typedef struct gs_linear_color_edge_s {
4596 gs_fixed_point start;
4598 const frac31 *c0, *c1;
4600 } gs_linear_color_edge;
4601 # 227 "./src/gxdevcli.h"
4603 GX_CINFO_UNKNOWN_SEP_LIN = -1,
4604 GX_CINFO_SEP_LIN_NONE = 0,
4606 } gx_color_enc_sep_lin_t;
4613 GX_CINFO_POLARITY_UNKNOWN = -1,
4614 GX_CINFO_POLARITY_SUBTRACTIVE = 0,
4615 GX_CINFO_POLARITY_ADDITIVE
4616 } gx_color_polarity_t;
4617 # 261 "./src/gxdevcli.h"
4619 GX_CINFO_OPMODE_UNKNOWN = -1,
4620 GX_CINFO_OPMODE_NOT = 0,
4623 # 294 "./src/gxdevcli.h"
4624 typedef struct gx_device_color_info_s {
4647 gx_color_polarity_t polarity;
4654 # 351 "./src/gxdevcli.h"
4656 # 373 "./src/gxdevcli.h"
4667 gx_device_anti_alias_info anti_alias;
4668 # 421 "./src/gxdevcli.h"
4669 gx_color_enc_sep_lin_t separable_and_linear;
4670 byte comp_shift[(8 * 8)];
4671 byte comp_bits[(8 * 8)];
4672 gx_color_index comp_mask[(8 * 8)];
4677 const char * cm_name;
4678 # 443 "./src/gxdevcli.h"
4679 gx_cm_opmode_t opmode;
4680 gx_color_index process_comps;
4681 } gx_device_color_info;
4682 # 610 "./src/gxdevcli.h"
4683 typedef struct gx_device_procs_s gx_device_procs;
4687 typedef struct gx_page_device_procs_s {
4691 int (*install)(gx_device *dev, gs_state *pgs);
4695 int (*begin_page)(gx_device *dev, gs_state *pgs);
4699 int (*end_page)(gx_device *dev, int reason, gs_state *pgs);
4701 } gx_page_device_procs;
4704 int gx_default_install(gx_device *dev, gs_state *pgs);
4705 int gx_default_begin_page(gx_device *dev, gs_state *pgs);
4706 int gx_default_end_page(gx_device *dev, int reason, gs_state *pgs);
4707 # 671 "./src/gxdevcli.h"
4708 typedef struct gx_device_cached_colors_s {
4709 gx_color_index black, white;
4710 } gx_device_cached_colors_t;
4711 # 1213 "./src/gxdevcli.h"
4713 pattern_manage__can_accum,
4714 pattern_manage__start_accum,
4715 pattern_manage__finish_accum,
4716 pattern_manage__load,
4717 pattern_manage__shading_area
4719 # 1261 "./src/gxdevcli.h"
4720 typedef struct gs_fill_attributes_s {
4721 const gs_fixed_rect *clip;
4723 const gx_device_halftone *ht;
4724 gs_logical_operation_t lop;
4726 } gs_fill_attributes;
4727 # 1407 "./src/gxdevcli.h"
4728 typedef struct gx_image_plane_s {
4733 # 1425 "./src/gxdevcli.h"
4734 int gx_image_data(gx_image_enum_common_t *info, const byte **planes,
4735 int data_x, uint raster, int height);
4740 int gx_image_plane_data(gx_image_enum_common_t *info,
4741 const gx_image_plane_t *planes, int height);
4742 int gx_image_plane_data_rows(gx_image_enum_common_t *info,
4743 const gx_image_plane_t *planes, int height,
4745 int gx_image_flush(gx_image_enum_common_t *info);
4746 bool gx_image_planes_wanted(const gx_image_enum_common_t *info, byte *wanted);
4747 int gx_image_end(gx_image_enum_common_t *info, bool draw_last);
4748 # 1455 "./src/gxdevcli.h"
4749 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); };
4750 # 1471 "./src/gxdevcli.h"
4751 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);
4752 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);
4753 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);
4756 struct gx_device_s {
4757 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;
4760 extern const gs_memory_struct_type_t st_device;
4761 void gx_device_finalize(void *ptr);
4762 # 1491 "./src/gxdevcli.h"
4763 gx_device *gx_device_enum_ptr(gx_device *);
4764 gx_device *gx_device_reloc_ptr(gx_device *, gc_state_t *);
4768 typedef gx_color_index (*dev_proc_map_rgb_color_t)(gx_device *dev, const gx_color_value cv[]);
4769 typedef int (*dev_proc_map_color_rgb_t)(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4770 # 1510 "./src/gxdevcli.h"
4771 typedef struct gx_device_forward_s {
4772 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;
4773 } gx_device_forward;
4775 extern const gs_memory_struct_type_t st_device_forward;
4776 # 1524 "./src/gxdevcli.h"
4777 typedef struct gx_device_null_s gx_device_null;
4779 struct gx_device_null_s {
4780 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;
4782 extern const gx_device_null gs_null_device;
4786 extern const gs_memory_struct_type_t st_device_null;
4787 # 1547 "./src/gxdevcli.h"
4788 void gx_device_init(gx_device * dev, const gx_device * proto,
4789 gs_memory_t * mem, bool internal);
4794 void gs_make_null_device(gx_device_null *dev_null, gx_device *target,
4797 bool gs_is_null_device(gx_device *dev);
4800 void gx_device_set_target(gx_device_forward *fdev, gx_device *target);
4803 void gx_device_retain(gx_device *dev, bool retained);
4807 uint gx_device_raster(const gx_device * dev, bool pad_to_word);
4813 int gx_device_adjust_resolution(gx_device * dev, int actual_width, int actual_height, int fit);
4817 void gx_device_set_margins(gx_device * dev, const float *margins ,
4821 void gx_device_set_width_height(gx_device * dev, int width, int height);
4824 void gx_device_set_resolution(gx_device * dev, floatp x_dpi, floatp y_dpi);
4827 void gx_device_set_media_size(gx_device * dev, floatp media_width, floatp media_height);
4828 # 1596 "./src/gxdevcli.h"
4829 void gx_set_device_only(gs_state *, gx_device *);
4832 int gs_closedevice(gx_device *);
4835 void gx_device_free_local(gx_device *);
4842 typedef struct gx_device_type_s {
4843 gs_memory_type_ptr_t stype;
4844 int (*initialize)(gx_device *);
4846 # 22 "./src/gxdevice.h" 2
4847 # 1 "./src/gsfname.h" 1
4848 # 31 "./src/gsfname.h"
4849 typedef struct gx_io_device_s gx_io_device;
4852 typedef struct gs_parsed_file_name_s {
4853 gs_memory_t *memory;
4854 gx_io_device *iodev;
4857 } gs_parsed_file_name_t;
4860 int gs_parse_file_name(gs_parsed_file_name_t *, const char *, uint);
4863 int gs_parse_real_file_name(gs_parsed_file_name_t *, const char *, uint,
4864 gs_memory_t *, client_name_t);
4867 int gs_terminate_file_name(gs_parsed_file_name_t *, gs_memory_t *,
4871 void gs_free_file_name(gs_parsed_file_name_t *, client_name_t);
4872 # 23 "./src/gxdevice.h" 2
4878 # 1 "./src/gsmalloc.h" 1
4879 # 22 "./src/gsmalloc.h"
4880 typedef struct gs_malloc_block_s gs_malloc_block_t;
4881 typedef struct gs_malloc_memory_s {
4882 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;
4883 gs_malloc_block_t *allocated;
4887 } gs_malloc_memory_t;
4890 gs_malloc_memory_t *gs_malloc_memory_init(void);
4898 gs_memory_t * gs_malloc_init(const gs_memory_t *parent);
4899 void gs_malloc_release(gs_memory_t *mem);
4900 # 51 "./src/gsmalloc.h"
4901 int gs_malloc_wrap(gs_memory_t **wrapped, gs_malloc_memory_t *contents);
4904 gs_malloc_memory_t *gs_malloc_wrapped_contents(gs_memory_t *wrapped);
4907 gs_malloc_memory_t *gs_malloc_unwrap(gs_memory_t *wrapped);
4908 # 29 "./src/gxdevice.h" 2
4913 # 1 "./src/gxstdio.h" 1
4914 # 34 "./src/gxdevice.h" 2
4915 # 213 "./src/gxdevice.h"
4916 int gx_default_open_device(gx_device *dev);
4917 void gx_default_get_initial_matrix(gx_device *dev, gs_matrix *pmat);
4918 void gx_upright_get_initial_matrix(gx_device *dev, gs_matrix *pmat);
4919 int gx_default_sync_output(gx_device *dev);
4920 int gx_default_output_page(gx_device *dev, int num_copies, int flush);
4921 int gx_default_close_device(gx_device *dev);
4922 gx_color_index gx_default_w_b_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4923 int gx_default_w_b_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4926 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);
4927 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);
4928 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);
4929 int gx_default_draw_line(gx_device *dev, int x0, int y0, int x1, int y1, gx_color_index color);
4930 int gx_no_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
4931 int gx_default_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
4932 int gx_default_get_params(gx_device *dev, gs_param_list *plist);
4933 int gx_default_put_params(gx_device *dev, gs_param_list *plist);
4934 gx_color_index gx_default_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
4935 const gx_xfont_procs *gx_default_get_xfont_procs(gx_device *dev);
4936 gx_device *gx_default_get_xfont_device(gx_device *dev);
4937 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);
4938 gx_device *gx_default_get_page_device(gx_device *dev);
4939 gx_device *gx_page_device_get_page_device(gx_device *dev);
4940 int gx_default_get_alpha_bits(gx_device *dev, graphics_object_type type);
4941 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);
4942 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);
4943 int gx_default_get_band(gx_device *dev, int y, int *band_start);
4944 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);
4945 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);
4946 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);
4947 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);
4948 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);
4949 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);
4950 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);
4951 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);
4952 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);
4953 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);
4954 int gx_default_image_data(gx_device *dev, gx_image_enum_common_t *info, const byte **planes, int data_x, uint raster, int height);
4955 int gx_default_end_image(gx_device *dev, gx_image_enum_common_t *info, bool draw_last);
4956 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);
4957 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);
4958 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);
4959 void gx_default_get_clipping_box(gx_device *dev, gs_fixed_rect *pbox);
4960 void gx_get_largest_clipping_box(gx_device *dev, gs_fixed_rect *pbox);
4961 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);
4962 int gx_no_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_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread);
4964 int gx_default_map_color_rgb_alpha(gx_device *dev, gx_color_index color, gx_color_value rgba[4]);
4965 int gx_no_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
4968 int gx_default_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
4969 int gx_null_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
4970 int gx_default_get_hardware_params(gx_device *dev, gs_param_list *plist);
4971 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);
4972 int gx_default_finish_copydevice(gx_device *dev, const gx_device *from_dev);
4973 int gx_default_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function);
4974 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);
4975 int gx_default_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length);
4976 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 );
4977 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);
4978 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);
4979 int gx_default_update_spot_equivalent_colors(gx_device *dev, const gs_state * pgs);
4985 gx_color_index gx_default_b_w_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4986 int gx_default_b_w_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4987 gx_color_index gx_default_gray_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4988 int gx_default_gray_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4989 int gx_default_rgb_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4996 gx_color_index gx_default_rgb_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
4997 gx_color_index cmyk_1bit_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
4998 int cmyk_1bit_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
4999 int (cmyk_1bit_map_color_cmyk)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
5000 gx_color_index cmyk_8bit_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
5001 int cmyk_8bit_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
5002 int (cmyk_8bit_map_color_cmyk)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
5003 gx_color_index (gx_default_8bit_map_gray_color)(gx_device * dev, const gx_color_value colors[]);
5004 int (gx_default_8bit_map_color_gray)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
5007 int gx_forward_close_device(gx_device *dev);
5008 void gx_forward_get_initial_matrix(gx_device *dev, gs_matrix *pmat);
5009 int gx_forward_sync_output(gx_device *dev);
5010 int gx_forward_output_page(gx_device *dev, int num_copies, int flush);
5011 gx_color_index gx_forward_map_rgb_color(gx_device *dev, const gx_color_value cv[]);
5012 int gx_forward_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value rgb[3]);
5013 int gx_forward_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
5014 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);
5015 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);
5016 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);
5017 int gx_forward_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
5018 int gx_forward_get_params(gx_device *dev, gs_param_list *plist);
5019 int gx_forward_put_params(gx_device *dev, gs_param_list *plist);
5020 gx_color_index gx_forward_map_cmyk_color(gx_device *dev, const gx_color_value cv[]);
5021 const gx_xfont_procs *gx_forward_get_xfont_procs(gx_device *dev);
5022 gx_device *gx_forward_get_xfont_device(gx_device *dev);
5023 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);
5024 gx_device *gx_forward_get_page_device(gx_device *dev);
5026 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);
5027 int gx_forward_get_band(gx_device *dev, int y, int *band_start);
5028 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);
5029 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);
5030 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);
5031 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);
5032 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);
5033 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);
5034 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);
5035 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);
5036 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);
5039 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);
5040 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);
5041 void gx_forward_get_clipping_box(gx_device *dev, gs_fixed_rect *pbox);
5042 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);
5043 int gx_forward_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread);
5044 int gx_forward_map_color_rgb_alpha(gx_device *dev, gx_color_index color, gx_color_value rgba[4]);
5046 int gx_forward_get_hardware_params(gx_device *dev, gs_param_list *plist);
5047 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);
5048 const gx_cm_color_map_procs * (gx_forward_get_color_mapping_procs)(const gx_device * dev);
5049 int (gx_forward_get_color_comp_index)(gx_device * dev, const char * pname, int name_size, int component_type);
5050 gx_color_index (gx_forward_encode_color)(gx_device * dev, const gx_color_value colors[]);
5051 int (gx_forward_decode_color)(gx_device * dev, gx_color_index cindex, gx_color_value colors[]);
5052 int gx_forward_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function);
5053 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);
5054 int gx_forward_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length);
5055 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 );
5056 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);
5057 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);
5058 int gx_forward_update_spot_equivalent_colors(gx_device *dev, const gs_state * pgs);
5063 void gx_device_set_procs(gx_device *);
5066 void gx_device_fill_in_procs(gx_device *);
5067 void gx_device_forward_fill_in_procs(gx_device_forward *);
5070 void gx_device_forward_color_procs(gx_device_forward *);
5076 void check_device_separable(gx_device * dev);
5081 void set_linear_color_bits_mask_shift(gx_device * dev);
5086 void gx_device_copy_color_procs(gx_device *dev, const gx_device *target);
5089 gx_color_index gx_device_black(gx_device *dev);
5093 gx_color_index gx_device_white(gx_device *dev);
5099 void gx_device_decache_colors(gx_device *dev);
5105 void gx_device_copy_color_params(gx_device *dev, const gx_device *target);
5112 void gx_device_copy_params(gx_device *dev, const gx_device *target);
5113 # 418 "./src/gxdevice.h"
5114 int gx_parse_output_file_name(gs_parsed_file_name_t *pfn,
5115 const char **pfmt, const char *fname,
5122 int gx_device_open_output_file(const gx_device * dev, char *fname,
5123 bool binary, bool positionable,
5127 int gx_device_close_output_file(const gx_device * dev, const char *fname,
5129 # 451 "./src/gxdevice.h"
5130 int gx_finish_output_page(gx_device *dev, int num_copies, int flush);
5131 # 542 "./src/gxdevice.h"
5132 typedef struct gdev_input_media_s {
5134 const char *MediaColor;
5136 const char *MediaType;
5137 } gdev_input_media_t;
5140 extern const gdev_input_media_t gdev_input_media_default;
5142 void gdev_input_media_init(gdev_input_media_t * pim);
5144 int gdev_begin_input_media(gs_param_list * mlist, gs_param_dict * pdict,
5147 int gdev_write_input_page_size(int index, gs_param_dict * pdict,
5148 floatp width_points, floatp height_points);
5150 int gdev_write_input_media(int index, gs_param_dict * pdict,
5151 const gdev_input_media_t * pim);
5153 int gdev_end_input_media(gs_param_list * mlist, gs_param_dict * pdict);
5155 typedef struct gdev_output_media_s {
5156 const char *OutputType;
5157 } gdev_output_media_t;
5160 extern const gdev_output_media_t gdev_output_media_default;
5162 int gdev_begin_output_media(gs_param_list * mlist, gs_param_dict * pdict,
5165 int gdev_write_output_media(int index, gs_param_dict * pdict,
5166 const gdev_output_media_t * pom);
5168 int gdev_end_output_media(gs_param_list * mlist, gs_param_dict * pdict);
5169 # 23 "./src/gdevpdfx.h" 2
5170 # 1 "./src/gxfont.h" 1
5171 # 22 "./src/gxfont.h"
5172 # 1 "./src/gsfont.h" 1
5173 # 31 "./src/gsfont.h"
5174 typedef struct gs_font_dir_s gs_font_dir;
5175 # 42 "./src/gsfont.h"
5176 gs_font_dir *gs_font_dir_alloc2(gs_memory_t * struct_mem,
5177 gs_memory_t * bits_mem);
5178 gs_font_dir *gs_font_dir_alloc2_limits(gs_memory_t * struct_mem,
5179 gs_memory_t * bits_mem,
5180 uint smax, uint bmax, uint mmax,
5181 uint cmax, uint upper);
5182 # 56 "./src/gsfont.h"
5183 int gs_definefont(gs_font_dir *, gs_font *);
5186 int gs_font_find_similar(const gs_font_dir * pdir, const gs_font **ppfont,
5187 int (*similar)(const gs_font *, const gs_font *));
5191 int gs_scalefont(gs_font_dir *, const gs_font *, floatp, gs_font **);
5192 int gs_makefont(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5193 int gs_setfont(gs_state *, gs_font *);
5194 gs_font *gs_currentfont(const gs_state *);
5195 gs_font *gs_rootfont(const gs_state *);
5196 void gs_set_currentfont(gs_state *, gs_font *);
5197 int gs_purge_font(gs_font *);
5199 gs_font *gs_find_font_by_id(gs_font_dir *pdir, gs_id id, gs_matrix *FontMatrix);
5202 void gs_cachestatus(const gs_font_dir *, uint[7]);
5205 uint gs_currentcachesize(const gs_font_dir *);
5206 int gs_setcachesize(gs_font_dir *, uint);
5207 uint gs_currentcachelower(const gs_font_dir *);
5208 int gs_setcachelower(gs_font_dir *, uint);
5209 uint gs_currentcacheupper(const gs_font_dir *);
5210 int gs_setcacheupper(gs_font_dir *, uint);
5211 uint gs_currentaligntopixels(const gs_font_dir *);
5212 int gs_setaligntopixels(gs_font_dir *, uint);
5213 uint gs_currentgridfittt(const gs_font_dir *);
5214 int gs_setgridfittt(gs_font_dir *, uint);
5215 # 23 "./src/gxfont.h" 2
5216 # 1 "./src/gsgdata.h" 1
5217 # 53 "./src/gsgdata.h"
5218 typedef struct gs_glyph_data_procs_s gs_glyph_data_procs_t;
5221 typedef struct gs_glyph_data_s gs_glyph_data_t;
5223 struct gs_glyph_data_s {
5224 gs_const_bytestring bits;
5225 const gs_glyph_data_procs_t *procs;
5227 gs_memory_t *memory;
5229 extern const gs_memory_struct_type_t st_glyph_data;
5236 struct gs_glyph_data_procs_s {
5239 void (*free)(gs_glyph_data_t *pgd, client_name_t cname);
5242 int (*substring)(gs_glyph_data_t *pgd, uint offset, uint size);
5249 int gs_glyph_data_substring(gs_glyph_data_t *pgd, uint offset, uint size);
5256 void gs_glyph_data_free(gs_glyph_data_t *pgd, client_name_t cname);
5257 # 123 "./src/gsgdata.h"
5258 void gs_glyph_data_from_string(gs_glyph_data_t *pgd, const byte *data,
5259 uint size, gs_font *font);
5260 void gs_glyph_data_from_bytes(gs_glyph_data_t *pgd, const byte *bytes,
5261 uint offset, uint size, gs_font *font);
5263 void gs_glyph_data_from_null(gs_glyph_data_t *pgd);
5264 # 24 "./src/gxfont.h" 2
5266 # 1 "./src/gsnotify.h" 1
5267 # 34 "./src/gsnotify.h"
5268 typedef int (*gs_notify_proc_t)(void *proc_data, void *event_data);
5269 typedef struct gs_notify_registration_s gs_notify_registration_t;
5270 struct gs_notify_registration_s {
5271 gs_notify_proc_t proc;
5273 gs_notify_registration_t *next;
5281 typedef struct gs_notify_list_s {
5282 gs_memory_t *memory;
5283 gs_notify_registration_t *first;
5286 extern const gs_memory_struct_type_t st_gs_notify_list;
5294 void gs_notify_init(gs_notify_list_t *nlist, gs_memory_t *mem);
5297 int gs_notify_register(gs_notify_list_t *nlist, gs_notify_proc_t proc,
5305 int gs_notify_unregister(gs_notify_list_t *nlist, gs_notify_proc_t proc,
5309 int gs_notify_unregister_calling(gs_notify_list_t *nlist,
5310 gs_notify_proc_t proc, void *proc_data,
5311 void (*unreg_proc)(void *pdata));
5317 int gs_notify_all(gs_notify_list_t *nlist, void *event_data);
5320 void gs_notify_release(gs_notify_list_t *nlist);
5321 # 26 "./src/gxfont.h" 2
5324 # 1 "./src/gxftype.h" 1
5325 # 23 "./src/gxftype.h"
5330 ft_user_defined = 3,
5332 ft_CID_encrypted = 9,
5333 ft_CID_user_defined = 10,
5334 ft_CID_TrueType = 11,
5344 fbit_use_outlines = 0,
5345 fbit_use_bitmaps = 1,
5346 fbit_transform_bitmaps = 2
5348 # 29 "./src/gxfont.h" 2
5349 # 58 "./src/gxfont.h"
5350 typedef struct gs_font_info_s {
5367 uint Flags_requested;
5368 uint Flags_returned;
5382 int UnderlinePosition;
5384 int UnderlineThickness;
5391 gs_const_string Copyright;
5393 gs_const_string Notice;
5395 gs_const_string FamilyName;
5397 gs_const_string FullName;
5400 # 134 "./src/gxfont.h"
5401 typedef struct gs_glyph_info_s {
5424 typedef struct gs_font_procs_s {
5425 # 168 "./src/gxfont.h"
5426 int (*define_font)(gs_font_dir *, gs_font *);
5427 # 177 "./src/gxfont.h"
5428 int (*make_font)(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5429 # 191 "./src/gxfont.h"
5430 int (*font_info)(gs_font *font, const gs_point *pscale, int members, gs_font_info_t *info);
5431 # 207 "./src/gxfont.h"
5432 int (*same_font)(const gs_font *font, const gs_font *ofont, int mask);
5433 # 221 "./src/gxfont.h"
5434 gs_glyph (*encode_char)(gs_font *, gs_char, gs_glyph_space_t);
5441 gs_char (*decode_glyph)(gs_font *, gs_glyph);
5442 # 240 "./src/gxfont.h"
5443 int (*enumerate_glyph)(gs_font *font, int *pindex, gs_glyph_space_t glyph_space, gs_glyph *pglyph);
5444 # 268 "./src/gxfont.h"
5445 int (*glyph_info)(gs_font *font, gs_glyph glyph, const gs_matrix *pmat, int members, gs_glyph_info_t *info);
5446 # 284 "./src/gxfont.h"
5447 int (*glyph_outline)(gs_font *font, int WMode, gs_glyph glyph, const gs_matrix *pmat, gx_path *ppath, double sbw[4]);
5455 int (*glyph_name)(gs_font *font, gs_glyph glyph, gs_const_string *pstr);
5456 # 304 "./src/gxfont.h"
5457 int (*init_fstack)(gs_text_enum_t *, gs_font *);
5458 # 318 "./src/gxfont.h"
5459 int (*next_char_glyph)(gs_text_enum_t *pte, gs_char *pchar, gs_glyph *pglyph);
5460 # 330 "./src/gxfont.h"
5461 int (*build_char)(gs_text_enum_t *, gs_state *, gs_font *, gs_char, gs_glyph);
5466 int gs_no_define_font(gs_font_dir *, gs_font *);
5467 int gs_no_make_font(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5468 int gs_base_make_font(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **);
5469 int gs_default_font_info(gs_font *font, const gs_point *pscale, int members, gs_font_info_t *info);
5470 int gs_default_same_font(const gs_font *font, const gs_font *ofont, int mask);
5471 int gs_base_same_font(const gs_font *font, const gs_font *ofont, int mask);
5473 gs_glyph gs_no_encode_char(gs_font *, gs_char, gs_glyph_space_t);
5474 gs_char gs_no_decode_glyph(gs_font *, gs_glyph);
5475 int gs_no_enumerate_glyph(gs_font *font, int *pindex, gs_glyph_space_t glyph_space, gs_glyph *pglyph);
5476 int gs_default_glyph_info(gs_font *font, gs_glyph glyph, const gs_matrix *pmat, int members, gs_glyph_info_t *info);
5477 int gs_no_glyph_outline(gs_font *font, int WMode, gs_glyph glyph, const gs_matrix *pmat, gx_path *ppath, double sbw[4]);
5478 int gs_no_glyph_name(gs_font *font, gs_glyph glyph, gs_const_string *pstr);
5480 int gs_default_init_fstack(gs_text_enum_t *, gs_font *);
5481 int gs_default_next_char_glyph(gs_text_enum_t *pte, gs_char *pchar, gs_glyph *pglyph);
5482 int gs_no_build_char(gs_text_enum_t *, gs_state *, gs_font *, gs_char, gs_glyph);
5484 extern const gs_font_procs gs_font_procs_default;
5487 typedef struct gs_font_name_s {
5493 # 396 "./src/gxfont.h"
5495 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;
5498 extern const gs_memory_struct_type_t st_gs_font;
5499 void gs_font_finalize(void *ptr);
5500 # 412 "./src/gxfont.h"
5501 extern const gs_memory_struct_type_t st_gs_font_ptr_element;
5509 gs_font_alloc(gs_memory_t *mem, gs_memory_type_ptr_t pstype,
5510 const gs_font_procs *procs, gs_font_dir *dir,
5511 client_name_t cname);
5514 void gs_font_notify_init(gs_font *font);
5521 int gs_font_notify_register(gs_font *font, gs_notify_proc_t proc,
5523 int gs_font_notify_unregister(gs_font *font, gs_notify_proc_t proc,
5528 typedef struct FAPI_server_s FAPI_server;
5529 # 454 "./src/gxfont.h"
5530 typedef struct gs_font_base_s gs_font_base;
5532 struct gs_font_base_s {
5533 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;
5536 extern const gs_memory_struct_type_t st_gs_font_base;
5537 # 469 "./src/gxfont.h"
5539 gs_font_base_alloc(gs_memory_t *mem, gs_memory_type_ptr_t pstype,
5540 const gs_font_procs *procs, gs_font_dir *dir,
5541 client_name_t cname);
5547 extern const char gx_extendeg_glyph_name_separator[];
5553 bool gs_font_glyph_is_notdef(gs_font_base *bfont, gs_glyph glyph);
5556 const gs_font_base *gs_font_parent(const gs_font_base *pbfont);
5557 # 24 "./src/gdevpdfx.h" 2
5558 # 1 "./src/gxline.h" 1
5559 # 20 "./src/gxline.h"
5560 # 1 "./src/gslparam.h" 1
5561 # 21 "./src/gslparam.h"
5566 gs_cap_triangle = 3,
5578 gs_join_triangle = 4,
5581 # 21 "./src/gxline.h" 2
5586 typedef struct gx_dash_params_s {
5592 float pattern_length;
5595 float init_dist_left;
5600 typedef struct gx_line_params_s {
5610 bool dot_length_absolute;
5611 gs_matrix dot_orientation;
5613 gx_dash_params dash;
5620 int gx_set_miter_limit(gx_line_params *, floatp);
5624 int gx_set_dash(gx_dash_params *, const float *, uint, floatp, gs_memory_t *);
5627 int gx_set_dot_length(gx_line_params *, floatp, bool);
5628 # 25 "./src/gdevpdfx.h" 2
5630 # 1 "./src/spprint.h" 1
5631 # 30 "./src/spprint.h"
5632 int stream_write(stream * s, const void *ptr, uint count);
5635 int stream_puts(stream * s, const char *str);
5636 # 42 "./src/spprint.h"
5637 const char *pprintg1(stream * s, const char *format, floatp v);
5638 const char *pprintg2(stream * s, const char *format, floatp v1, floatp v2);
5639 const char *pprintg3(stream * s, const char *format,
5640 floatp v1, floatp v2, floatp v3);
5641 const char *pprintg4(stream * s, const char *format,
5642 floatp v1, floatp v2, floatp v3, floatp v4);
5643 const char *pprintg6(stream * s, const char *format,
5644 floatp v1, floatp v2, floatp v3, floatp v4,
5645 floatp v5, floatp v6);
5653 const char *pprintd1(stream * s, const char *format, int v);
5654 const char *pprintd2(stream * s, const char *format, int v1, int v2);
5655 const char *pprintd3(stream * s, const char *format,
5656 int v1, int v2, int v3);
5657 const char *pprintd4(stream * s, const char *format,
5658 int v1, int v2, int v3, int v4);
5661 const char *pprintld1(stream * s, const char *format, long v);
5662 const char *pprintld2(stream * s, const char *format, long v1, long v2);
5663 const char *pprintld3(stream * s, const char *format,
5664 long v1, long v2, long v3);
5667 const char *pprints1(stream * s, const char *format, const char *str);
5668 const char *pprints2(stream * s, const char *format,
5669 const char *str1, const char *str2);
5670 const char *pprints3(stream * s, const char *format,
5671 const char *str1, const char *str2, const char *str3);
5672 # 27 "./src/gdevpdfx.h" 2
5673 # 1 "./src/gdevpsdf.h" 1
5674 # 25 "./src/gdevpsdf.h"
5675 # 1 "./src/gdevvec.h" 1
5676 # 23 "./src/gdevvec.h"
5677 # 1 "./src/gdevbbox.h" 1
5678 # 72 "./src/gdevbbox.h"
5679 typedef struct gx_device_bbox_procs_s {
5683 bool (*init_box)(void *proc_data);
5687 void (*get_box)(const void *proc_data, gs_fixed_rect *pbox);
5691 void (*add_rect)(void *proc_data, fixed x0, fixed y0, fixed x1, fixed y1);
5695 bool (*in_rect)(const void *proc_data, const gs_fixed_rect *pbox);
5697 } gx_device_bbox_procs_t;
5699 bool bbox_default_init_box(void *proc_data);
5700 void bbox_default_get_box(const void *proc_data, gs_fixed_rect *pbox);
5701 void bbox_default_add_rect(void *proc_data, fixed x0, fixed y0, fixed x1, fixed y1);
5702 bool bbox_default_in_rect(const void *proc_data, const gs_fixed_rect *pbox);
5703 # 108 "./src/gdevbbox.h"
5704 typedef struct gx_device_bbox_s gx_device_bbox;
5709 struct gx_device_bbox_s {
5710 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;
5713 extern const gs_memory_struct_type_t st_device_bbox;
5720 void gx_device_bbox_init(gx_device_bbox * dev, gx_device * target, gs_memory_t *mem);
5723 void gx_device_bbox_fwd_open_close(gx_device_bbox * dev,
5724 bool forward_open_close);
5727 void gx_device_bbox_set_white_opaque(gx_device_bbox *dev,
5728 bool white_is_opaque);
5731 void gx_device_bbox_bbox(gx_device_bbox * dev, gs_rect * pbbox);
5734 void gx_device_bbox_release(gx_device_bbox *dev);
5735 # 24 "./src/gdevvec.h" 2
5736 # 1 "./src/gxiparam.h" 1
5737 # 37 "./src/gxiparam.h"
5738 struct gx_image_type_s {
5743 gs_memory_type_ptr_t stype;
5749 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);
5750 # 59 "./src/gxiparam.h"
5751 int (*source_size)(const gs_imager_state *pis, const gs_image_common_t *pic, gs_int_point *psize);
5752 # 70 "./src/gxiparam.h"
5753 int (*sput)(const gs_image_common_t *pic, stream *s, const gs_color_space **ppcs);
5754 # 80 "./src/gxiparam.h"
5755 int (*sget)(gs_image_common_t *pic, stream *s, const gs_color_space *pcs);
5756 # 89 "./src/gxiparam.h"
5757 void (*release)(gs_image_common_t *pic, gs_memory_t *mem);
5770 int gx_data_image_source_size(const gs_imager_state *pis, const gs_image_common_t *pic, gs_int_point *psize);
5775 int gx_image_no_sput(const gs_image_common_t *pic, stream *s, const gs_color_space **ppcs);
5776 int gx_image_no_sget(gs_image_common_t *pic, stream *s, const gs_color_space *pcs);
5777 void gx_image_default_release(gs_image_common_t *pic, gs_memory_t *mem);
5782 int gx_pixel_image_sput(const gs_pixel_image_t *pic, stream *s,
5783 const gs_color_space **ppcs, int extra);
5784 int gx_pixel_image_sget(gs_pixel_image_t *pic, stream *s,
5785 const gs_color_space *pcs);
5786 void gx_pixel_image_release(gs_pixel_image_t *pic, gs_memory_t *mem);
5789 bool gx_image_matrix_is_default(const gs_data_image_t *pid);
5790 void gx_image_matrix_set_default(gs_data_image_t *pid);
5791 void sput_variable_uint(stream *s, uint w);
5792 int sget_variable_uint(stream *s, uint *pw);
5793 # 138 "./src/gxiparam.h"
5794 typedef struct gx_image_enum_procs_s {
5795 # 149 "./src/gxiparam.h"
5796 int (*plane_data)(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used);
5797 # 160 "./src/gxiparam.h"
5798 int (*end_image)(gx_image_enum_common_t *info, bool draw_last);
5799 # 173 "./src/gxiparam.h"
5800 int (*flush)(gx_image_enum_common_t *info);
5801 # 198 "./src/gxiparam.h"
5802 bool (*planes_wanted)(const gx_image_enum_common_t *info, byte *wanted);
5804 } gx_image_enum_procs_t;
5805 # 220 "./src/gxiparam.h"
5806 struct gx_image_enum_common_s {
5807 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)];
5810 extern const gs_memory_struct_type_t st_gx_image_enum_common;
5811 # 233 "./src/gxiparam.h"
5812 int gx_image_enum_common_init(gx_image_enum_common_t * piec,
5813 const gs_data_image_t * pic,
5814 const gx_image_enum_procs_t * piep,
5815 gx_device * dev, int num_components,
5816 gs_image_format_t format);
5822 int gx_no_plane_data(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used);
5823 int gx_ignore_end_image(gx_image_enum_common_t *info, bool draw_last);
5828 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);
5829 int gx_image1_plane_data(gx_image_enum_common_t *info, const gx_image_plane_t *planes, int height, int *rows_used);
5830 int gx_image1_end_image(gx_image_enum_common_t *info, bool draw_last);
5831 int gx_image1_flush(gx_image_enum_common_t *info);
5832 # 25 "./src/gdevvec.h" 2
5833 # 1 "./src/gxistate.h" 1
5834 # 28 "./src/gxistate.h"
5835 # 1 "./src/gxmatrix.h" 1
5836 # 33 "./src/gxmatrix.h"
5837 struct gs_matrix_fixed_s {
5838 float xx, xy, yx, yy, tx, ty;
5839 fixed tx_fixed, ty_fixed;
5840 bool txy_fixed_valid;
5845 typedef struct gs_matrix_fixed_s gs_matrix_fixed;
5849 int gs_matrix_fixed_from_matrix(gs_matrix_fixed *, const gs_matrix *);
5852 int gs_point_transform2fixed(const gs_matrix_fixed *, floatp, floatp,
5854 int gs_distance_transform2fixed(const gs_matrix_fixed *, floatp, floatp,
5857 int gs_point_transform2fixed_rounding(const gs_matrix_fixed * pmat,
5858 floatp x, floatp y, gs_fixed_point * ppt);
5859 # 63 "./src/gxmatrix.h"
5861 long xx, xy, yx, yy;
5867 # 81 "./src/gxmatrix.h"
5868 fixed fixed_coeff_mult(fixed, long, const fixed_coeff *, int);
5869 # 29 "./src/gxistate.h" 2
5871 # 1 "./src/gscspace.h" 1
5872 # 166 "./src/gscspace.h"
5876 gs_color_space_index_DeviceGray = 0,
5877 gs_color_space_index_DeviceRGB,
5880 gs_color_space_index_DeviceCMYK,
5883 gs_color_space_index_DevicePixel,
5884 gs_color_space_index_DeviceN,
5888 gs_color_space_index_CIEDEFG,
5889 gs_color_space_index_CIEDEF,
5890 gs_color_space_index_CIEABC,
5891 gs_color_space_index_CIEA,
5892 gs_color_space_index_Separation,
5893 gs_color_space_index_Indexed,
5894 gs_color_space_index_Pattern,
5897 gs_color_space_index_CIEICC
5899 } gs_color_space_index;
5900 # 201 "./src/gscspace.h"
5901 typedef struct gs_color_space_type_s gs_color_space_type;
5902 # 225 "./src/gscspace.h"
5903 typedef struct gs_device_pixel_params_s {
5905 } gs_device_pixel_params;
5906 typedef struct gs_cie_a_s gs_cie_a;
5907 typedef struct gs_cie_abc_s gs_cie_abc;
5908 typedef struct gs_cie_def_s gs_cie_def;
5909 typedef struct gs_cie_defg_s gs_cie_defg;
5910 # 240 "./src/gscspace.h"
5911 typedef struct gs_small_base_color_space_s {
5912 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;
5913 } gs_small_base_color_space;
5914 # 252 "./src/gscspace.h"
5915 typedef struct gs_cie_icc_s gs_cie_icc;
5917 typedef struct gs_cieicc_params_s {
5918 gs_cie_icc * picc_info;
5919 gs_small_base_color_space alt_space;
5926 typedef struct gs_base_color_space_s {
5927 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;
5928 } gs_base_color_space;
5934 typedef struct gs_device_n_map_s gs_device_n_map;
5939 typedef struct gs_device_n_attributes_s gs_device_n_attributes;
5946 typedef ulong gs_separation_name;
5947 # 292 "./src/gscspace.h"
5948 typedef int (gs_callback_func_get_colorname_string)
5949 (const gs_memory_t *mem, gs_separation_name colorname, unsigned char **ppstr, unsigned int *plen);
5951 typedef enum { SEP_NONE, SEP_ALL, SEP_OTHER } separation_type;
5953 typedef struct gs_separation_params_s {
5954 gs_separation_name sep_name;
5955 gs_base_color_space alt_space;
5956 gs_device_n_map *map;
5957 separation_type sep_type;
5958 bool use_alt_cspace;
5959 gs_callback_func_get_colorname_string *get_colorname_string;
5963 } gs_separation_params;
5965 typedef struct gs_device_n_params_s {
5966 gs_separation_name *names;
5967 uint num_components;
5968 gs_base_color_space alt_space;
5969 gs_device_n_map *map;
5970 gs_device_n_attributes *colorants;
5971 bool use_alt_cspace;
5972 gs_callback_func_get_colorname_string *get_colorname_string;
5976 } gs_device_n_params;
5983 typedef struct gs_direct_color_space_s {
5984 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;
5985 } gs_direct_color_space;
5986 # 341 "./src/gscspace.h"
5987 typedef struct gs_indexed_map_s gs_indexed_map;
5989 typedef struct gs_indexed_params_s {
5990 gs_direct_color_space base_space;
5993 gs_const_string table;
5994 gs_indexed_map *map;
5997 } gs_indexed_params;
6003 typedef struct gs_paint_color_space_s {
6004 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;
6005 } gs_paint_color_space;
6013 typedef struct gs_pattern_params_s {
6014 bool has_base_space;
6015 gs_paint_color_space base_space;
6016 } gs_pattern_params;
6021 struct gs_color_space_s {
6022 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;
6027 # 438 "./src/gscspace.h"
6029 gs_cspace_init_DeviceGray(const gs_memory_t *mem, gs_color_space *pcs),
6030 gs_cspace_build_DeviceGray(gs_color_space ** ppcspace,
6031 gs_memory_t * pmem),
6032 gs_cspace_init_DeviceRGB(const gs_memory_t *mem, gs_color_space *pcs),
6033 gs_cspace_build_DeviceRGB(gs_color_space ** ppcspace,
6034 gs_memory_t * pmem),
6035 gs_cspace_init_DeviceCMYK(const gs_memory_t *mem, gs_color_space *pcs),
6036 gs_cspace_build_DeviceCMYK(gs_color_space ** ppcspace,
6037 gs_memory_t * pmem);
6040 void gs_cspace_init_from(gs_color_space * pcsto,
6041 const gs_color_space * pcsfrom);
6044 void gs_cspace_assign(gs_color_space * pdest, const gs_color_space * psrc);
6047 void gs_cspace_release(gs_color_space * pcs);
6052 gs_color_space_index gs_color_space_get_index(const gs_color_space *);
6055 int gs_color_space_num_components(const gs_color_space *);
6062 bool gs_color_space_equal(const gs_color_space *pcs1,
6063 const gs_color_space *pcs2);
6070 void gs_color_space_restrict_color(gs_client_color *, const gs_color_space *);
6077 const gs_color_space *gs_cspace_base_space(const gs_color_space * pcspace);
6078 # 31 "./src/gxistate.h" 2
6079 # 1 "./src/gstrans.h" 1
6080 # 21 "./src/gstrans.h"
6081 # 1 "./src/gxcomp.h" 1
6082 # 22 "./src/gxcomp.h"
6083 # 1 "./src/gxbitfmt.h" 1
6084 # 28 "./src/gxbitfmt.h"
6085 typedef ulong gx_bitmap_format_t;
6086 # 23 "./src/gxcomp.h" 2
6087 # 67 "./src/gxcomp.h"
6088 typedef struct gs_composite_type_procs_s {
6096 int (*create_default_compositor)(const gs_composite_t *pcte, gx_device **pcdev, gx_device *dev, gs_imager_state *pis, gs_memory_t *mem);
6103 bool (*equal)(const gs_composite_t *pcte, const gs_composite_t *pcte2);
6104 # 95 "./src/gxcomp.h"
6105 int (*write)(const gs_composite_t *pcte, byte *data, uint *psize);
6106 # 105 "./src/gxcomp.h"
6107 int (*read)(gs_composite_t **ppcte, const byte *data, uint size, gs_memory_t *mem);
6115 int (*clist_compositor_write_update)(const gs_composite_t * pcte, gx_device * dev, gx_device ** pcdev, gs_imager_state * pis, gs_memory_t * mem);
6123 int (*clist_compositor_read_update)(gs_composite_t * pcte, gx_device * cdev, gx_device * tdev, gs_imager_state * pis, gs_memory_t * mem);
6125 } gs_composite_type_procs_t;
6127 typedef struct gs_composite_type_s {
6129 gs_composite_type_procs_t procs;
6130 } gs_composite_type_t;
6136 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);
6142 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);
6143 # 152 "./src/gxcomp.h"
6144 struct gs_composite_s {
6145 const gs_composite_type_t *type; gs_id id; rc_header rc;
6147 # 22 "./src/gstrans.h" 2
6155 PDF14_BEGIN_TRANS_GROUP,
6156 PDF14_END_TRANS_GROUP,
6157 PDF14_INIT_TRANS_MASK,
6158 PDF14_BEGIN_TRANS_MASK,
6159 PDF14_END_TRANS_MASK,
6160 PDF14_SET_BLEND_PARAMS
6161 } pdf14_compositor_operations;
6162 # 60 "./src/gstrans.h"
6163 typedef struct gs_transparency_source_s {
6165 gs_transparency_mask_t *mask;
6166 } gs_transparency_source_t;
6168 struct gs_pdf14trans_params_s {
6170 pdf14_compositor_operations pdf14_op;
6178 gs_transparency_channel_selector_t csel;
6180 gs_transparency_mask_subtype_t subtype;
6181 int Background_components;
6182 bool function_is_identity;
6183 float Background[(8 * 8)];
6184 float GrayBackground;
6185 gs_function_t *transfer_function;
6186 byte transfer_fn[256];
6188 gs_blend_mode_t blend_mode;
6190 gs_transparency_source_t opacity;
6191 gs_transparency_source_t shape;
6195 typedef struct gs_pdf14trans_params_s gs_pdf14trans_params_t;
6202 typedef struct gs_pdf14trans_s {
6203 const gs_composite_type_t *type; gs_id id; rc_header rc;
6204 gs_pdf14trans_params_t params;
6209 int gs_setblendmode(gs_state *, gs_blend_mode_t);
6210 gs_blend_mode_t gs_currentblendmode(const gs_state *);
6211 int gs_setopacityalpha(gs_state *, floatp);
6212 float gs_currentopacityalpha(const gs_state *);
6213 int gs_setshapealpha(gs_state *, floatp);
6214 float gs_currentshapealpha(const gs_state *);
6215 int gs_settextknockout(gs_state *, bool);
6216 bool gs_currenttextknockout(const gs_state *);
6223 gs_transparency_state_type_t
6224 gs_current_transparency_type(const gs_state *pgs);
6230 int gs_push_pdf14trans_device(gs_state * pgs);
6232 int gs_pop_pdf14trans_device(gs_state * pgs);
6234 void gs_trans_group_params_init(gs_transparency_group_params_t *ptgp);
6236 int gs_begin_transparency_group(gs_state * pgs,
6237 const gs_transparency_group_params_t *ptgp,
6238 const gs_rect *pbbox);
6240 int gs_end_transparency_group(gs_state *pgs);
6242 void gs_trans_mask_params_init(gs_transparency_mask_params_t *ptmp,
6243 gs_transparency_mask_subtype_t subtype);
6245 int gs_begin_transparency_mask(gs_state *pgs,
6246 const gs_transparency_mask_params_t *ptmp,
6247 const gs_rect *pbbox, bool mask_is_image);
6249 int gs_end_transparency_mask(gs_state *pgs,
6250 gs_transparency_channel_selector_t csel);
6252 int gs_init_transparency_mask(gs_state *pgs,
6253 gs_transparency_channel_selector_t csel);
6255 int gs_discard_transparency_layer(gs_state *pgs);
6260 int gx_begin_transparency_group(gs_imager_state * pis, gx_device * pdev,
6261 const gs_pdf14trans_params_t * pparams);
6263 int gx_end_transparency_group(gs_imager_state * pis, gx_device * pdev);
6265 int gx_init_transparency_mask(gs_imager_state * pis,
6266 const gs_pdf14trans_params_t * pparams);
6268 int gx_begin_transparency_mask(gs_imager_state * pis, gx_device * pdev,
6269 const gs_pdf14trans_params_t * pparams);
6271 int gx_end_transparency_mask(gs_imager_state * pis, gx_device * pdev,
6272 const gs_pdf14trans_params_t * pparams);
6274 int gx_discard_transparency_layer(gs_imager_state *pis);
6279 int gs_is_pdf14trans_compositor(const gs_composite_t * pct);
6280 # 32 "./src/gxistate.h" 2
6281 # 86 "./src/gxistate.h"
6282 typedef struct gs_halftone_s gs_halftone;
6283 # 109 "./src/gxistate.h"
6284 typedef struct gx_transfer_s {
6285 int red_component_num;
6286 gx_transfer_map *red;
6287 int green_component_num;
6288 gx_transfer_map *green;
6289 int blue_component_num;
6290 gx_transfer_map *blue;
6291 int gray_component_num;
6292 gx_transfer_map *gray;
6294 # 187 "./src/gxistate.h"
6295 typedef struct gs_devicen_color_map_s {
6296 bool use_alt_cspace;
6300 separation_type sep_type;
6301 uint num_components;
6304 int color_map[(8 * 8)];
6305 } gs_devicen_color_map;
6306 # 253 "./src/gxistate.h"
6307 struct gs_imager_state_s {
6308 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;
6310 # 274 "./src/gxistate.h"
6311 int gs_imager_state_initialize(gs_imager_state * pis, gs_memory_t * mem);
6316 gs_imager_state_copy(const gs_imager_state * pis, gs_memory_t * mem);
6319 void gs_imager_state_copied(gs_imager_state * pis);
6322 void gs_imager_state_pre_assign(gs_imager_state *to,
6323 const gs_imager_state *from);
6327 void gs_imager_state_release(gs_imager_state * pis);
6328 int gs_currentscreenphase_pis(const gs_imager_state *, gs_int_point *, gs_color_select_t);
6329 # 26 "./src/gdevvec.h" 2
6330 # 1 "./src/gxhldevc.h" 1
6331 # 66 "./src/gxhldevc.h"
6332 typedef struct gx_hl_saved_color_s {
6333 gs_id color_space_id;
6336 gs_client_color ccolor;
6337 gx_device_color_saved saved_dev_color;
6338 } gx_hl_saved_color;
6343 void gx_hld_saved_color_init(gx_hl_saved_color * psc);
6349 const gs_state * gx_hld_get_gstate_ptr(const gs_imager_state * pis);
6350 # 98 "./src/gxhldevc.h"
6351 bool gx_hld_save_color(const gs_imager_state * pis,
6352 const gx_device_color * pdevc, gx_hl_saved_color * psc);
6359 bool gx_hld_saved_color_equal(const gx_hl_saved_color * psc1,
6360 const gx_hl_saved_color * psc2);
6365 bool gx_hld_saved_color_same_cspace(const gx_hl_saved_color * psc1,
6366 const gx_hl_saved_color * psc2);
6372 gx_hld_is_hl_color_available(const gs_imager_state * pis,
6373 const gx_device_color * pdevc);
6374 # 129 "./src/gxhldevc.h"
6376 non_pattern_color_space,
6377 pattern_color_sapce,
6379 } gx_hld_get_color_space_and_ccolor_status;
6380 # 158 "./src/gxhldevc.h"
6381 gx_hld_get_color_space_and_ccolor_status gx_hld_get_color_space_and_ccolor(
6382 const gs_imager_state * pis, const gx_device_color * pdevc,
6383 const gs_color_space ** ppcs, const gs_client_color ** ppcc);
6384 # 169 "./src/gxhldevc.h"
6385 int gx_hld_get_number_color_components(const gs_imager_state * pis);
6392 invalid_color_info = 2,
6393 invalid_component_requested = 3
6394 } gx_hld_get_color_component_status;
6395 # 188 "./src/gxhldevc.h"
6396 gx_hld_get_color_component_status gx_hld_get_color_component(
6397 const gs_imager_state * pis, const gx_device_color * pdevc,
6398 int comp_numi, float * output);
6399 # 27 "./src/gdevvec.h" 2
6400 # 62 "./src/gdevvec.h"
6401 typedef struct gx_device_vector_s gx_device_vector;
6402 # 77 "./src/gdevvec.h"
6404 gx_path_type_none = 0,
6409 gx_path_type_fill = 1,
6410 gx_path_type_stroke = 2,
6411 gx_path_type_clip = 4,
6412 gx_path_type_winding_number = 0,
6413 gx_path_type_even_odd = 8,
6414 gx_path_type_optimize = 16,
6415 gx_path_type_always_close = 32,
6416 gx_path_type_rule = gx_path_type_winding_number | gx_path_type_even_odd
6421 } gx_rect_direction_t;
6422 typedef struct gx_device_vector_procs_s {
6424 int (*beginpage) (gx_device_vector * vdev);
6426 int (*setlinewidth) (gx_device_vector * vdev, floatp width);
6427 int (*setlinecap) (gx_device_vector * vdev, gs_line_cap cap);
6428 int (*setlinejoin) (gx_device_vector * vdev, gs_line_join join);
6429 int (*setmiterlimit) (gx_device_vector * vdev, floatp limit);
6430 int (*setdash) (gx_device_vector * vdev, const float *pattern,
6431 uint count, floatp offset);
6432 int (*setflat) (gx_device_vector * vdev, floatp flatness);
6433 int (*setlogop) (gx_device_vector * vdev, gs_logical_operation_t lop,
6434 gs_logical_operation_t diff);
6436 bool (*can_handle_hl_color) (gx_device_vector * vdev, const gs_imager_state * pis,
6437 const gx_drawing_color * pdc);
6438 int (*setfillcolor) (gx_device_vector * vdev, const gs_imager_state * pis,
6439 const gx_drawing_color * pdc);
6440 int (*setstrokecolor) (gx_device_vector * vdev, const gs_imager_state * pis,
6441 const gx_drawing_color * pdc);
6444 int (*dopath) (gx_device_vector * vdev, const gx_path * ppath,
6445 gx_path_type_t type, const gs_matrix *pmat);
6446 int (*dorect) (gx_device_vector * vdev, fixed x0, fixed y0, fixed x1,
6447 fixed y1, gx_path_type_t type);
6448 int (*beginpath) (gx_device_vector * vdev, gx_path_type_t type);
6449 int (*moveto) (gx_device_vector * vdev, floatp x0, floatp y0,
6450 floatp x, floatp y, gx_path_type_t type);
6451 int (*lineto) (gx_device_vector * vdev, floatp x0, floatp y0,
6452 floatp x, floatp y, gx_path_type_t type);
6453 int (*curveto) (gx_device_vector * vdev, floatp x0, floatp y0,
6454 floatp x1, floatp y1, floatp x2, floatp y2,
6455 floatp x3, floatp y3, gx_path_type_t type);
6456 int (*closepath) (gx_device_vector * vdev, floatp x0, floatp y0,
6457 floatp x_start, floatp y_start, gx_path_type_t type);
6458 int (*endpath) (gx_device_vector * vdev, gx_path_type_t type);
6459 } gx_device_vector_procs;
6463 int gdev_vector_setflat(gx_device_vector * vdev, floatp flatness);
6467 int gdev_vector_dopath(gx_device_vector * vdev, const gx_path * ppath,
6468 gx_path_type_t type, const gs_matrix *pmat);
6471 int gdev_vector_dorect(gx_device_vector * vdev, fixed x0, fixed y0,
6472 fixed x1, fixed y1, gx_path_type_t type);
6473 # 203 "./src/gdevvec.h"
6474 struct gx_device_vector_s {
6475 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;
6480 extern const gs_memory_struct_type_t st_device_vector;
6481 # 220 "./src/gdevvec.h"
6482 void gdev_vector_init(gx_device_vector * vdev);
6485 void gdev_vector_reset(gx_device_vector * vdev);
6486 # 234 "./src/gdevvec.h"
6487 int gdev_vector_open_file_options(gx_device_vector * vdev,
6488 uint strmbuf_size, int open_options);
6496 stream *gdev_vector_stream(gx_device_vector * vdev);
6500 int gdev_vector_update_log_op(gx_device_vector * vdev,
6501 gs_logical_operation_t lop);
6505 int gdev_vector_update_fill_color(gx_device_vector * vdev,
6506 const gs_imager_state * pis,
6507 const gx_drawing_color * pdcolor);
6511 int gdev_vector_prepare_fill(gx_device_vector * vdev,
6512 const gs_imager_state * pis,
6513 const gx_fill_params * params,
6514 const gx_drawing_color * pdcolor);
6521 int gdev_vector_prepare_stroke(gx_device_vector * vdev,
6522 const gs_imager_state * pis,
6523 const gx_stroke_params * params,
6524 const gx_drawing_color * pdcolor,
6533 int gdev_vector_stroke_scaling(const gx_device_vector *vdev,
6534 const gs_imager_state *pis,
6535 double *pscale, gs_matrix *pmat);
6538 typedef struct gdev_vector_dopath_state_s {
6540 gx_device_vector *vdev;
6541 gx_path_type_t type;
6543 gs_matrix scale_mat;
6547 } gdev_vector_dopath_state_t;
6548 void gdev_vector_dopath_init(gdev_vector_dopath_state_t *state,
6549 gx_device_vector *vdev,
6550 gx_path_type_t type, const gs_matrix *pmat);
6553 int gdev_vector_dopath_segment(gdev_vector_dopath_state_t *state, int pe_op,
6554 gs_fixed_point vs[3]);
6560 int gdev_vector_write_polygon(gx_device_vector * vdev,
6561 const gs_fixed_point * points, uint count,
6562 bool close, gx_path_type_t type);
6565 int gdev_vector_write_rectangle(gx_device_vector * vdev,
6566 fixed x0, fixed y0, fixed x1, fixed y1,
6567 bool close, gx_rect_direction_t dir);
6571 int gdev_vector_write_clip_path(gx_device_vector * vdev,
6572 const gx_clip_path * pcpath);
6576 int gdev_vector_update_clip_path(gx_device_vector * vdev,
6577 const gx_clip_path * pcpath);
6580 int gdev_vector_close_file(gx_device_vector * vdev);
6581 # 343 "./src/gdevvec.h"
6582 typedef struct gdev_vector_image_enum_s {
6583 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;
6584 } gdev_vector_image_enum_t;
6586 extern const gs_memory_struct_type_t st_vector_image_enum;
6587 # 358 "./src/gdevvec.h"
6588 int gdev_vector_begin_image(gx_device_vector * vdev,
6589 const gs_imager_state * pis, const gs_image_t * pim,
6590 gs_image_format_t format, const gs_int_rect * prect,
6591 const gx_drawing_color * pdcolor, const gx_clip_path * pcpath,
6592 gs_memory_t * mem, const gx_image_enum_procs_t * pprocs,
6593 gdev_vector_image_enum_t * pie);
6597 int gdev_vector_end_image(gx_device_vector * vdev,
6598 gdev_vector_image_enum_t * pie, bool draw_last, gx_color_index pad);
6603 int gdev_vector_put_params(gx_device *dev, gs_param_list *plist);
6604 int gdev_vector_get_params(gx_device *dev, gs_param_list *plist);
6609 int gdev_vector_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
6611 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);
6613 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);
6616 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);
6617 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);
6618 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);
6619 # 26 "./src/gdevpsdf.h" 2
6621 # 1 "./src/strimpl.h" 1
6622 # 124 "./src/strimpl.h"
6623 struct stream_template_s {
6626 gs_memory_type_ptr_t stype;
6629 int (*init)(stream_state *);
6633 int (*process)(stream_state *, stream_cursor_read *, stream_cursor_write *, bool);
6640 void (*release)(stream_state *);
6644 void (*set_defaults)(stream_state *);
6647 int (*reinit)(stream_state *);
6652 int stream_move(stream_cursor_read *, stream_cursor_write *);
6656 hex_ignore_garbage = 0,
6657 hex_ignore_whitespace = 1,
6658 hex_ignore_leading_whitespace = 2
6660 int s_hex_process(stream_cursor_read *, stream_cursor_write *, int *, hex_syntax);
6661 # 28 "./src/gdevpsdf.h" 2
6662 # 1 "./src/sa85x.h" 1
6663 # 21 "./src/sa85x.h"
6664 # 1 "./src/sa85d.h" 1
6665 # 22 "./src/sa85d.h"
6666 typedef struct stream_A85D_state_s {
6667 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
6670 } stream_A85D_state;
6671 # 35 "./src/sa85d.h"
6672 extern const stream_template s_A85D_template;
6673 # 22 "./src/sa85x.h" 2
6676 typedef struct stream_A85E_state_s {
6677 const stream_template *template; gs_memory_t *memory; int (*report_error)(stream_state *, const char *); int min_left; char error_string[79 + 1];
6681 } stream_A85E_state;
6688 extern const stream_template s_A85E_template;
6689 # 29 "./src/gdevpsdf.h" 2
6690 # 1 "./src/scfx.h" 1
6694 # 1 "./src/gsbittab.h" 1
6695 # 41 "./src/gsbittab.h"
6696 extern const byte byte_reverse_bits[256];
6701 extern const byte byte_right_mask[9];
6706 extern const byte byte_count_bits[256];
6707 # 60 "./src/gsbittab.h"
6709 byte_bit_run_length_0[256], byte_bit_run_length_1[256],
6710 byte_bit_run_length_2[256], byte_bit_run_length_3[256],
6711 byte_bit_run_length_4[256], byte_bit_run_length_5[256],
6712 byte_bit_run_length_6[256], byte_bit_run_length_7[256];
6718 extern const byte *const byte_bit_run_length[8];
6719 extern const byte *const byte_bit_run_length_neg[8];
6725 extern const byte byte_acegbdfh_to_abcdefgh[256];
6726 # 21 "./src/shc.h" 2
6728 typedef struct hc_definition_s {
6735 typedef struct stream_hc_state_s {
6736 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;
6739 typedef struct hce_code_s {
6746 typedef struct hce_table_s {
6751 void hc_put_code_proc(bool, byte *, uint);
6753 byte *hc_put_last_bits_proc(stream_hc_state *, byte *, uint, int);
6755 typedef struct hcd_code_s {
6760 typedef struct hcd_table_s {
6765 # 22 "./src/scfx.h" 2
6767 typedef struct stream_CF_state_s {
6768 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;
6771 typedef struct stream_CFE_state_s {
6772 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;
6787 extern const stream_template s_CFE_template;
6790 typedef struct stream_CFD_state_s {
6791 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;
6808 bool skipping_damage;
6824 extern const stream_template s_CFD_template;
6825 # 30 "./src/gdevpsdf.h" 2
6826 # 1 "./src/spsdf.h" 1
6827 # 34 "./src/spsdf.h"
6828 void s_write_ps_string(stream * s, const byte * str, uint size, int print_ok);
6835 int s_alloc_position_stream(stream ** ps, gs_memory_t * mem);
6841 typedef struct param_printer_params_s {
6844 const char *item_prefix;
6845 const char *item_suffix;
6847 } param_printer_params_t;
6852 typedef struct printer_param_list_s {
6853 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
6855 param_printer_params_t params;
6857 } printer_param_list_t;
6864 extern const param_printer_params_t param_printer_params_default;
6865 int s_alloc_param_printer(gs_param_list ** pplist,
6866 const param_printer_params_t * ppp, stream * s,
6868 void s_free_param_printer(gs_param_list * plist);
6870 int s_init_param_printer(printer_param_list_t *prlist,
6871 const param_printer_params_t * ppp, stream * s);
6872 void s_release_param_printer(printer_param_list_t *prlist);
6873 # 31 "./src/gdevpsdf.h" 2
6875 extern const stream_template s_DCTE_template;
6876 # 43 "./src/gdevpsdf.h"
6877 typedef struct psdf_image_params_s {
6878 gs_c_param_list *ACSDict;
6882 gs_c_param_list *Dict;
6884 float DownsampleThreshold;
6885 enum psdf_downsample_type {
6895 const char *AutoFilterStrategy;
6896 const stream_template *filter_template;
6897 } psdf_image_params;
6904 extern const stream_template s_CFE_template;
6907 typedef struct psdf_distiller_params_s {
6911 bool ASCII85EncodePages;
6912 enum psdf_auto_rotate_pages {
6926 enum psdf_default_rendering_intent {
6930 ri_RelativeColorimetric,
6931 ri_AbsoluteColorimetric
6932 } DefaultRenderingIntent;
6939 bool LockDistillerParams;
6940 bool LZWEncodePages;
6942 bool PreserveOPIComments;
6943 bool UseFlateCompression;
6947 gs_const_string CalCMYKProfile;
6948 gs_const_string CalGrayProfile;
6949 gs_const_string CalRGBProfile;
6950 gs_const_string sRGBProfile;
6951 enum psdf_color_conversion_strategy {
6952 ccs_LeaveColorUnchanged,
6953 ccs_UseDeviceDependentColor,
6954 ccs_UseDeviceIndependentColor,
6955 ccs_UseDeviceIndependentColorForImages,
6959 } ColorConversionStrategy;
6964 bool PreserveHalftoneInfo;
6965 bool PreserveOverprintSettings;
6966 enum psdf_transfer_function_info {
6970 } TransferFunctionInfo;
6973 enum psdf_ucr_and_bg_info {
6977 # 157 "./src/gdevpsdf.h"
6978 psdf_image_params ColorImage;
6979 bool ConvertCMYKImagesToRGB;
6980 bool ConvertImagesToIndexed;
6988 psdf_image_params GrayImage;
6995 psdf_image_params MonoImage;
7002 gs_param_string_array AlwaysEmbed;
7003 gs_param_string_array NeverEmbed;
7004 enum psdf_cannot_embed_font_policy {
7008 } CannotEmbedFontPolicy;
7018 } psdf_distiller_params;
7022 psdf_version_level1 = 1000,
7023 psdf_version_level1_color = 1100,
7024 psdf_version_level2 = 2000,
7025 psdf_version_level2_with_TT = 2010,
7026 psdf_version_level2_plus = 2017,
7027 psdf_version_ll3 = 3010
7029 # 220 "./src/gdevpsdf.h"
7030 typedef struct gx_device_psdf_s {
7031 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;
7033 # 240 "./src/gdevpsdf.h"
7034 extern const gs_memory_struct_type_t st_device_psdf;
7035 # 262 "./src/gdevpsdf.h"
7036 int gdev_psdf_get_params(gx_device *dev, gs_param_list *plist);
7037 int gdev_psdf_put_params(gx_device *dev, gs_param_list *plist);
7042 int psdf_setlinewidth(gx_device_vector * vdev, floatp width);
7043 int psdf_setlinecap(gx_device_vector * vdev, gs_line_cap cap);
7044 int psdf_setlinejoin(gx_device_vector * vdev, gs_line_join join);
7045 int psdf_setmiterlimit(gx_device_vector * vdev, floatp limit);
7046 int psdf_setdash(gx_device_vector * vdev, const float *pattern,
7047 uint count, floatp offset);
7048 int psdf_setflat(gx_device_vector * vdev, floatp flatness);
7049 int psdf_setlogop(gx_device_vector * vdev, gs_logical_operation_t lop,
7050 gs_logical_operation_t diff);
7054 int psdf_dorect(gx_device_vector * vdev, fixed x0, fixed y0, fixed x1,
7055 fixed y1, gx_path_type_t type);
7056 int psdf_beginpath(gx_device_vector * vdev, gx_path_type_t type);
7057 int psdf_moveto(gx_device_vector * vdev, floatp x0, floatp y0,
7058 floatp x, floatp y, gx_path_type_t type);
7059 int psdf_lineto(gx_device_vector * vdev, floatp x0, floatp y0,
7060 floatp x, floatp y, gx_path_type_t type);
7061 int psdf_curveto(gx_device_vector * vdev, floatp x0, floatp y0,
7062 floatp x1, floatp y1, floatp x2,
7063 floatp y2, floatp x3, floatp y3, gx_path_type_t type);
7064 int psdf_closepath(gx_device_vector * vdev, floatp x0, floatp y0,
7065 floatp x_start, floatp y_start, gx_path_type_t type);
7070 typedef struct psdf_binary_writer_s {
7071 gs_memory_t *memory;
7074 gx_device_psdf *dev;
7080 } psdf_binary_writer;
7081 extern const gs_memory_struct_type_t st_psdf_binary_writer;
7089 int psdf_begin_binary(gx_device_psdf * pdev, psdf_binary_writer * pbw);
7093 int psdf_encode_binary(psdf_binary_writer * pbw,
7094 const stream_template * template, stream_state * ss);
7098 int psdf_CFE_binary(psdf_binary_writer * pbw, int w, int h, bool invert);
7106 int psdf_DCT_filter(gs_param_list *plist ,
7108 int Columns, int Rows, int Colors,
7109 psdf_binary_writer *pbw );
7112 bool psdf_is_converting_image_to_RGB(const gx_device_psdf * pdev,
7113 const gs_imager_state * pis, const gs_pixel_image_t * pim);
7119 int psdf_setup_image_filters(gx_device_psdf *pdev, psdf_binary_writer *pbw,
7120 gs_pixel_image_t *pim, const gs_matrix *pctm,
7121 const gs_imager_state * pis, bool lossless,
7127 int psdf_setup_lossless_filters(gx_device_psdf *pdev, psdf_binary_writer *pbw,
7128 gs_pixel_image_t *pim, bool in_line);
7131 int psdf_end_binary(psdf_binary_writer * pbw);
7134 int psdf_setup_compression_chooser(psdf_binary_writer *pbw,
7135 gx_device_psdf *pdev,
7136 int width, int height, int depth,
7137 int bits_per_sample);
7140 int psdf_setup_image_to_mask_filter(psdf_binary_writer *pbw, gx_device_psdf *pdev,
7141 int width, int height, int depth, int bits_per_sample, uint *MaskColor);
7144 int psdf_setup_image_colors_filter(psdf_binary_writer *pbw,
7145 gx_device_psdf *pdev, gs_pixel_image_t * pim,
7146 const gs_imager_state *pis);
7147 # 389 "./src/gdevpsdf.h"
7148 typedef struct psdf_set_color_commands_s {
7149 const char *setgray;
7150 const char *setrgbcolor;
7151 const char *setcmykcolor;
7152 const char *setcolorspace;
7153 const char *setcolor;
7154 const char *setcolorn;
7155 } psdf_set_color_commands_t;
7157 extern const psdf_set_color_commands_t
7158 psdf_set_fill_color_commands, psdf_set_stroke_color_commands;
7164 gx_color_index psdf_adjust_color_index(gx_device_vector *vdev,
7165 gx_color_index color);
7168 int psdf_set_color(gx_device_vector *vdev, const gx_drawing_color *pdc,
7169 const psdf_set_color_commands_t *ppscc);
7171 double psdf_round(double v, int precision, int radix);
7174 int psdf_get_bits(gx_device *dev, int y, byte *data, byte **actual_data);
7175 int psdf_get_bits_rectangle(gx_device *dev, const gs_int_rect *prect, gs_get_bits_params_t *params, gs_int_rect **unread);
7178 int psdf_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
7179 # 28 "./src/gdevpdfx.h" 2
7180 # 1 "./src/gxdevmem.h" 1
7181 # 21 "./src/gxdevmem.h"
7182 # 1 "./src/gxrplane.h" 1
7183 # 30 "./src/gxrplane.h"
7184 typedef struct gx_render_plane_s {
7188 } gx_render_plane_t;
7189 # 43 "./src/gxrplane.h"
7190 int gx_render_plane_init(gx_render_plane_t *render_plane,
7191 const gx_device *dev, int index);
7192 # 22 "./src/gxdevmem.h" 2
7193 # 76 "./src/gxdevmem.h"
7194 typedef struct gx_device_memory_s gx_device_memory;
7197 struct gx_device_memory_s {
7198 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;
7206 gs_memory_t *bitmap_memory;
7208 gs_memory_t *line_pointer_memory;
7209 bool foreign_line_pointers;
7216 gx_render_plane_t planes[(8 * 8)];
7220 gs_matrix initial_matrix;
7224 gs_const_string palette;
7228 bits32 rgbr, gbrg, brgb;
7232 gx_color_index abcde;
7233 bits32 abcd, bcde, cdea, deab, eabc;
7237 gx_color_index abcdef;
7238 bits32 abcd, cdef, efab;
7242 gx_color_index abcdefg;
7243 bits32 abcd, bcde, cdef, defg, efga, fgab, gabc;
7247 gx_color_index abcdefgh;
7253 gs_log2_scale_point log2_scale;
7254 int log2_alpha_bits;
7259 gx_color_index save_color;
7264 extern const gs_memory_struct_type_t st_device_memory;
7265 # 180 "./src/gxdevmem.h"
7266 ulong gdev_mem_bits_size(const gx_device_memory *mdev, int width,
7269 ulong gdev_mem_line_ptrs_size(const gx_device_memory *mdev, int width,
7272 ulong gdev_mem_data_size(const gx_device_memory *mdev, int width,
7274 # 196 "./src/gxdevmem.h"
7275 int gdev_mem_max_height(const gx_device_memory * dev, int width, ulong size,
7276 bool page_uses_transparency);
7277 # 207 "./src/gxdevmem.h"
7278 const gx_device_memory *gdev_mem_device_for_bits(int);
7281 const gx_device_memory *gdev_mem_word_device_for_bits(int);
7289 void gs_make_mem_mono_device(gx_device_memory * mdev, gs_memory_t * mem,
7290 gx_device * target);
7291 void gs_make_mem_device(gx_device_memory * mdev,
7292 const gx_device_memory * mdproto,
7293 gs_memory_t * mem, int page_device,
7294 gx_device * target);
7295 void gs_make_mem_abuf_device(gx_device_memory * adev, gs_memory_t * mem,
7297 const gs_log2_scale_point * pscale,
7298 int alpha_bits, int mapped_x);
7299 void gs_make_mem_alpha_device(gx_device_memory * adev, gs_memory_t * mem,
7300 gx_device * target, int alpha_bits);
7306 int gdev_mem_open_scan_lines(gx_device_memory *mdev, int setup_height);
7307 # 250 "./src/gxdevmem.h"
7308 int gdev_mem_set_line_ptrs(gx_device_memory *mdev,
7309 byte *base, int raster, byte **line_ptrs,
7313 void gdev_mem_mono_set_inverted(gx_device_memory * mdev, bool black_is_1);
7316 bool gs_device_is_memory(const gx_device *);
7319 bool gs_device_is_abuf(const gx_device *);
7320 # 29 "./src/gdevpdfx.h" 2
7326 typedef struct stream_arcfour_state_s stream_arcfour_state;
7327 # 60 "./src/gdevpdfx.h"
7341 typedef struct cos_object_s cos_object_t;
7342 typedef struct cos_stream_s cos_stream_t;
7343 typedef struct cos_dict_s cos_dict_t;
7344 typedef struct cos_array_s cos_array_t;
7345 typedef struct cos_value_s cos_value_t;
7346 typedef struct cos_object_procs_s cos_object_procs_t;
7347 typedef const cos_object_procs_t *cos_type_t;
7352 typedef struct pdf_text_state_s pdf_text_state_t;
7357 typedef struct pdf_char_glyph_pairs_s pdf_char_glyph_pairs_t;
7381 resourceFontDescriptor,
7383 resourceSoftMaskDict,
7387 } pdf_resource_type_t;
7388 # 155 "./src/gdevpdfx.h"
7389 typedef struct pdf_resource_s pdf_resource_t;
7390 struct pdf_resource_s {
7391 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;
7395 extern const gs_memory_struct_type_t st_pdf_resource;
7396 # 170 "./src/gdevpdfx.h"
7397 typedef struct pdf_x_object_s pdf_x_object_t;
7398 struct pdf_x_object_s {
7399 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;
7420 typedef struct pdf_char_proc_s pdf_char_proc_t;
7421 typedef struct pdf_char_proc_ownership_s pdf_char_proc_ownership_t;
7422 typedef struct pdf_font_s pdf_font_t;
7423 typedef struct pdf_text_data_s pdf_text_data_t;
7428 typedef struct pdf_outline_node_s {
7429 long id, parent_id, prev_id, first_id, last_id;
7432 } pdf_outline_node_t;
7433 typedef struct pdf_outline_level_s {
7434 pdf_outline_node_t first;
7435 pdf_outline_node_t last;
7437 } pdf_outline_level_t;
7444 typedef struct pdf_bead_s {
7445 long id, article_id, prev_id, next_id, page_id;
7448 typedef struct pdf_article_s pdf_article_t;
7449 struct pdf_article_s {
7450 pdf_article_t *next;
7451 cos_dict_t *contents;
7455 # 238 "./src/gdevpdfx.h"
7456 typedef struct pdf_resource_list_s {
7457 pdf_resource_t *chains[16];
7458 } pdf_resource_list_t;
7459 # 249 "./src/gdevpdfx.h"
7460 typedef struct pdf_stream_position_s {
7463 } pdf_stream_position_t;
7470 typedef struct pdf_text_rotation_s {
7473 } pdf_text_rotation_t;
7479 typedef struct pdf_page_dsc_info_s {
7481 int viewing_orientation;
7482 gs_rect bounding_box;
7483 } pdf_page_dsc_info_t;
7490 typedef struct pdf_page_s {
7493 pdf_procset_t procsets;
7495 long resource_ids[resourceFont + 1];
7497 cos_array_t *Annots;
7498 pdf_text_rotation_t text_rotation;
7499 pdf_page_dsc_info_t dsc_info;
7503 # 300 "./src/gdevpdfx.h"
7504 typedef struct pdf_temp_file_s {
7505 char file_name[260];
7514 typedef struct gx_device_pdf_s gx_device_pdf;
7520 typedef struct pdf_font_cache_elem_s pdf_font_cache_elem_t;
7521 struct pdf_font_cache_elem_s {
7522 pdf_font_cache_elem_t *next;
7526 struct pdf_font_resource_s *pdfont;
7528 double *real_widths;
7529 gx_device_pdf *pdev;
7531 # 339 "./src/gdevpdfx.h"
7532 typedef struct pdf_viewer_state_s {
7533 int transfer_not_identity;
7534 gs_id transfer_ids[4];
7535 float opacity_alpha;
7537 gs_blend_mode_t blend_mode;
7539 gs_id black_generation_id;
7540 gs_id undercolor_removal_id;
7545 bool fill_overprint;
7546 bool stroke_overprint;
7548 bool fill_used_process_color;
7549 bool stroke_used_process_color;
7550 gx_hl_saved_color saved_fill_color;
7551 gx_hl_saved_color saved_stroke_color;
7552 gx_line_params line_params;
7553 float dash_pattern[11];
7561 typedef struct pdf_substream_save_s {
7562 pdf_context_t context;
7563 pdf_text_state_t *text_state;
7568 cos_dict_t *substream_Resources;
7569 pdf_procset_t procsets;
7571 pdf_resource_t *font3;
7572 pdf_resource_t *accumulating_substream_resource;
7573 bool charproc_just_accumulated;
7574 bool accumulating_a_global_object;
7575 pdf_resource_t *pres_soft_mask_dict;
7576 gs_const_string objname;
7577 } pdf_substream_save;
7578 # 396 "./src/gdevpdfx.h"
7583 } pdf_compression_type;
7587 struct gx_device_pdf_s {
7588 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;
7590 double CompatibilityLevel;
7594 bool ParseDSCCommentsForDocInfo;
7595 bool ParseDSCComments;
7596 bool EmitDSCWarnings;
7597 bool CreateJobTicket;
7598 bool PreserveEPSInfo;
7599 bool AutoPositionEPSFiles;
7600 bool PreserveCopyPage;
7602 int OffOptimizations;
7605 gs_param_float_array PDFXTrimBoxToMediaBoxOffset;
7606 gs_param_float_array PDFXBleedBoxToTrimBoxOffset;
7607 bool PDFXSetBleedBoxToMediaBox;
7609 bool ReAssignCharacters;
7610 bool ReEncodeCharacters;
7611 long FirstObjectNumber;
7613 bool PrintStatistics;
7614 gs_param_string DocumentUUID;
7615 gs_param_string InstanceUUID;
7616 int DocumentTimeSeq;
7618 gs_param_string OPDFReadProcsetPath;
7619 bool CompressEntireFile;
7620 bool ResourcesBeforeUsage;
7622 bool HaveStrokeColor;
7623 bool HaveTransparency;
7624 bool PatternImagemask;
7628 long MaxClipPathSize;
7630 long MaxViewerMemorySize;
7631 long MaxShadingBitmapSize;
7634 long MaxInlineImageSize;
7636 gs_param_string OwnerPassword;
7637 gs_param_string UserPassword;
7641 gs_param_string NoEncrypt;
7642 bool EncryptMetadata;
7644 bool ComputeDocumentDigest;
7646 byte EncryptionO[32];
7647 byte EncryptionU[32];
7648 byte EncryptionKey[16];
7652 pdf_page_dsc_info_t doc_dsc_info;
7653 pdf_page_dsc_info_t page_dsc_info;
7655 bool fill_overprint, stroke_overprint;
7658 gs_id transfer_ids[4];
7659 int transfer_not_identity;
7660 gs_id black_generation_id, undercolor_removal_id;
7662 pdf_compression_type compression;
7663 pdf_compression_type compression_at_page_start;
7664 # 490 "./src/gdevpdfx.h"
7665 pdf_temp_file_t xref;
7670 pdf_temp_file_t asides;
7678 pdf_temp_file_t streams;
7684 pdf_temp_file_t pictures;
7689 cos_dict_t *Catalog;
7695 int max_referred_page;
7697 pdf_context_t context;
7698 long contents_length_id;
7700 pdf_procset_t procsets;
7701 pdf_text_data_t *text;
7702 pdf_text_rotation_t text_rotation;
7707 pdf_resource_list_t resources[NUM_RESOURCE_TYPES];
7709 pdf_resource_t *cs_Patterns[5];
7710 pdf_resource_t *Identity_ToUnicode_CMaps[2];
7711 pdf_resource_t *last_resource;
7712 pdf_outline_level_t outline_levels[32];
7714 int closed_outline_depth;
7716 pdf_article_t *articles;
7726 cos_dict_t *global_named_objects;
7730 cos_dict_t *local_named_objects;
7736 cos_array_t *NI_stack;
7743 cos_array_t *Namespace_stack;
7744 pdf_font_cache_elem_t *font_cache;
7749 gs_point char_width;
7758 cos_array_t *PageLabels;
7759 int PageLabels_current_page;
7760 cos_dict_t *PageLabels_current_label;
7761 # 594 "./src/gdevpdfx.h"
7762 gs_text_enum_t *pte;
7768 pdf_viewer_state vgstack[11];
7771 pdf_viewer_state vg_initial;
7772 bool vg_initial_set;
7777 pdf_substream_save *sbstack;
7780 cos_dict_t *substream_Resources;
7781 gs_color_space_index pcm_color_info_index;
7784 pdf_resource_t *font3;
7785 pdf_resource_t *accumulating_substream_resource;
7786 gs_matrix_fixed charproc_ctm;
7787 bool charproc_just_accumulated;
7790 bool accumulating_a_global_object;
7795 const pdf_char_glyph_pairs_t *cgp;
7799 int substituted_pattern_count;
7800 int substituted_pattern_drop_page;
7805 gs_id image_mask_id;
7806 bool image_mask_is_SMask;
7807 bool image_mask_skip;
7808 gs_matrix converting_image_matrix;
7809 double image_mask_scale;
7811 pdf_resource_t *pres_soft_mask_dict;
7813 gs_const_string objname;
7814 int OPDFRead_procset_length;
7815 void *find_resource_param;
7817 # 695 "./src/gdevpdfx.h"
7818 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);
7819 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);
7820 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);
7821 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);
7823 extern const gx_device_vector_procs pdf_vector_procs;
7824 int gdev_pdf_fill_rectangle(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
7825 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);
7826 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);
7828 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);
7830 int gdev_pdf_get_params(gx_device *dev, gs_param_list *plist);
7831 int gdev_pdf_put_params(gx_device *dev, gs_param_list *plist);
7833 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);
7834 int gdev_pdf_pattern_manage(gx_device *pdev, gx_bitmap_id id, gs_pattern1_instance_t *pinst, pattern_manage_t function);
7835 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);
7837 int gdev_pdf_include_color_space(gx_device *dev, gs_color_space *cspace, const byte *res_name, int name_length);
7839 int gdev_pdf_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_imager_state *pis, gs_memory_t *memory);
7840 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);
7841 int gdev_pdf_end_transparency_group(gx_device *dev, gs_imager_state *pis, gs_transparency_state_t **ppts);
7842 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);
7843 int gdev_pdf_end_transparency_mask(gx_device *dev, gs_transparency_mask_t **pptm);
7844 int gdev_pdf_discard_transparency_layer(gx_device *dev, gs_transparency_state_t **ppts);
7851 void pdf_initialize_ids(gx_device_pdf * pdev);
7854 void pdf_set_process_color_model(gx_device_pdf * pdev, int index);
7857 void pdf_reset_text(gx_device_pdf *pdev);
7864 int pdf_open_document(gx_device_pdf * pdev);
7869 long pdf_obj_ref(gx_device_pdf * pdev);
7872 long pdf_stell(gx_device_pdf * pdev);
7875 long pdf_open_obj(gx_device_pdf * pdev, long id);
7876 long pdf_begin_obj(gx_device_pdf * pdev);
7879 int pdf_end_obj(gx_device_pdf * pdev);
7885 int pdf_open_contents(gx_device_pdf * pdev, pdf_context_t context);
7888 int pdf_close_contents(gx_device_pdf * pdev, bool last);
7892 extern const char *const pdf_resource_type_names[];
7893 extern const gs_memory_struct_type_t *const pdf_resource_type_structs[];
7894 # 781 "./src/gdevpdfx.h"
7895 long pdf_open_separate(gx_device_pdf * pdev, long id);
7896 long pdf_begin_separate(gx_device_pdf * pdev);
7899 void pdf_reserve_object_id(gx_device_pdf * pdev, pdf_resource_t *ppres, long id);
7902 int pdf_alloc_aside(gx_device_pdf * pdev, pdf_resource_t ** plist,
7903 const gs_memory_struct_type_t * pst, pdf_resource_t **ppres,
7906 int pdf_begin_aside(gx_device_pdf * pdev, pdf_resource_t **plist,
7907 const gs_memory_struct_type_t * pst,
7908 pdf_resource_t **ppres);
7911 int pdf_begin_resource(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7912 gs_id rid, pdf_resource_t **ppres);
7915 int pdf_begin_resource_body(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7916 gs_id rid, pdf_resource_t **ppres);
7919 int pdf_alloc_resource(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7920 gs_id rid, pdf_resource_t **ppres, long id);
7923 int pdf_find_same_resource(gx_device_pdf * pdev,
7924 pdf_resource_type_t rtype, pdf_resource_t **ppres,
7925 int (*eq)(gx_device_pdf * pdev, pdf_resource_t *pres0, pdf_resource_t *pres1));
7929 pdf_resource_t *pdf_find_resource_by_resource_id(gx_device_pdf * pdev,
7930 pdf_resource_type_t rtype, gs_id id);
7933 pdf_resource_t *pdf_find_resource_by_gs_id(gx_device_pdf * pdev,
7934 pdf_resource_type_t rtype,
7937 void pdf_drop_resources(gx_device_pdf * pdev, pdf_resource_type_t rtype,
7938 int (*cond)(gx_device_pdf * pdev, pdf_resource_t *pres));
7941 void pdf_print_resource_statistics(gx_device_pdf * pdev);
7945 int pdf_cancel_resource(gx_device_pdf * pdev, pdf_resource_t *pres,
7946 pdf_resource_type_t rtype);
7949 void pdf_forget_resource(gx_device_pdf * pdev, pdf_resource_t *pres1,
7950 pdf_resource_type_t rtype);
7953 int pdf_substitute_resource(gx_device_pdf *pdev, pdf_resource_t **ppres,
7954 pdf_resource_type_t rtype,
7955 int (*eq)(gx_device_pdf *pdev, pdf_resource_t *pres0, pdf_resource_t *pres1),
7959 long pdf_resource_id(const pdf_resource_t *pres);
7962 int pdf_end_separate(gx_device_pdf * pdev);
7965 int pdf_end_aside(gx_device_pdf * pdev);
7968 int pdf_end_resource(gx_device_pdf * pdev);
7973 int pdf_write_resource_objects(gx_device_pdf *pdev, pdf_resource_type_t rtype);
7980 void pdf_reverse_resource_chain(gx_device_pdf *pdev, pdf_resource_type_t rtype);
7985 int pdf_free_resource_objects(gx_device_pdf *pdev, pdf_resource_type_t rtype);
7989 int pdf_write_and_free_all_resource_objects(gx_device_pdf *pdev);
7995 int pdf_store_page_resources(gx_device_pdf *pdev, pdf_page_t *page);
7998 void pdf_copy_data(stream *s, FILE *file, long count, stream_arcfour_state *ss);
7999 void pdf_copy_data_safe(stream *s, FILE *file, long position, long count);
8002 int pdf_begin_encrypt(gx_device_pdf * pdev, stream **s, gs_id object_id);
8004 void pdf_end_encrypt(gx_device_pdf * pdev);
8006 int pdf_encrypt_init(const gx_device_pdf * pdev, gs_id object_id, stream_arcfour_state *psarc4);
8013 long pdf_page_id(gx_device_pdf * pdev, int page_num);
8016 pdf_page_t *pdf_current_page(gx_device_pdf *pdev);
8019 cos_dict_t *pdf_current_page_dict(gx_device_pdf *pdev);
8022 int pdf_open_page(gx_device_pdf * pdev, pdf_context_t context);
8025 int pdf_unclip(gx_device_pdf * pdev);
8028 int pdf_write_saved_string(gx_device_pdf * pdev, gs_string * pstr);
8033 int pdf_remember_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath);
8036 bool pdf_must_put_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath);
8039 int pdf_put_clip_path(gx_device_pdf * pdev, const gx_clip_path * pcpath);
8043 typedef struct pdf_lcvd_s {
8044 gx_device_memory mdev;
8045 gx_device_memory *mask;
8046 gx_device_pdf *pdev;
8047 int (*std_fill_rectangle)(gx_device *dev, int x, int y, int width, int height, gx_color_index color);
8048 int (*std_close_device)(gx_device *dev);
8053 bool has_background;
8055 gs_point path_offset;
8057 # 951 "./src/gdevpdfx.h"
8058 int pdf_setup_masked_image_converter(gx_device_pdf *pdev, gs_memory_t *mem, const gs_matrix *m, pdf_lcvd_t **pcvd,
8059 bool need_mask, int x, int y, int w, int h, bool write_on_close);
8060 int pdf_dump_converted_image(gx_device_pdf *pdev, pdf_lcvd_t *cvd);
8061 void pdf_remove_masked_image_converter(gx_device_pdf *pdev, pdf_lcvd_t *cvd, bool need_mask);
8068 void pdf_store_default_Producer(char buf[200]);
8071 typedef struct pdf_filter_names_s {
8072 const char *ASCII85Decode;
8073 const char *ASCIIHexDecode;
8074 const char *CCITTFaxDecode;
8075 const char *DCTDecode;
8076 const char *DecodeParms;
8078 const char *FlateDecode;
8079 const char *LZWDecode;
8080 const char *RunLengthDecode;
8081 const char *JBIG2Decode;
8082 const char *JPXDecode;
8083 } pdf_filter_names_t;
8084 # 985 "./src/gdevpdfx.h"
8085 void pdf_put_matrix(gx_device_pdf *pdev, const char *before,
8086 const gs_matrix *pmat, const char *after);
8089 typedef int (*pdf_put_name_chars_proc_t)(stream *, const byte *, uint);
8090 pdf_put_name_chars_proc_t
8091 pdf_put_name_chars_proc(const gx_device_pdf *pdev);
8092 int pdf_put_name_chars(const gx_device_pdf *pdev, const byte *nstr,
8094 int pdf_put_name(const gx_device_pdf *pdev, const byte *nstr, uint size);
8097 int pdf_put_string(const gx_device_pdf *pdev, const byte *str, uint size);
8100 int pdf_write_value(const gx_device_pdf *pdev, const byte *vstr, uint size, gs_id object_id);
8103 int pdf_put_filters(cos_dict_t *pcd, gx_device_pdf *pdev, stream *s,
8104 const pdf_filter_names_t *pfn);
8107 typedef struct pdf_data_writer_s {
8108 psdf_binary_writer binary;
8111 pdf_resource_t *pres;
8112 gx_device_pdf *pdev;
8115 } pdf_data_writer_t;
8116 # 1025 "./src/gdevpdfx.h"
8117 int pdf_begin_data_stream(gx_device_pdf *pdev, pdf_data_writer_t *pdw,
8118 int options, gs_id object_id);
8119 int pdf_append_data_stream_filters(gx_device_pdf *pdev, pdf_data_writer_t *pdw,
8120 int orig_options, gs_id object_id);
8122 int pdf_begin_data(gx_device_pdf *pdev, pdf_data_writer_t *pdw);
8125 int pdf_end_data(pdf_data_writer_t *pdw);
8126 # 1051 "./src/gdevpdfx.h"
8127 int pdf_function(gx_device_pdf *pdev, const gs_function_t *pfn,
8128 cos_value_t *pvalue);
8129 int pdf_function_scaled(gx_device_pdf *pdev, const gs_function_t *pfn,
8130 const gs_range_t *pranges, cos_value_t *pvalue);
8133 int pdf_write_function(gx_device_pdf *pdev, const gs_function_t *pfn,
8139 int pdf_write_font_bbox(gx_device_pdf *pdev, const gs_int_rect *pbox);
8140 # 1076 "./src/gdevpdfx.h"
8141 bool pdf_key_eq(const gs_param_string * pcs, const char *str);
8144 int pdfmark_scan_int(const gs_param_string * pstr, int *pvalue);
8147 int pdfmark_process(gx_device_pdf * pdev, const gs_param_string_array * pma);
8150 int pdfmark_close_outline(gx_device_pdf * pdev);
8153 int pdfmark_end_pagelabels(gx_device_pdf * pdev);
8156 int pdfmark_write_article(gx_device_pdf * pdev, const pdf_article_t * part);
8161 bool pdf_objname_is_valid(const byte *data, uint size);
8167 int pdf_find_named(gx_device_pdf * pdev, const gs_param_string * pname,
8168 cos_object_t **ppco);
8174 int pdf_create_named(gx_device_pdf *pdev, const gs_param_string *pname,
8175 cos_type_t cotype, cos_object_t **ppco, long id);
8176 int pdf_create_named_dict(gx_device_pdf *pdev, const gs_param_string *pname,
8177 cos_dict_t **ppcd, long id);
8185 int pdf_refer_named(gx_device_pdf *pdev, const gs_param_string *pname,
8186 cos_object_t **ppco);
8187 # 1130 "./src/gdevpdfx.h"
8188 int pdf_make_named(gx_device_pdf * pdev, const gs_param_string * pname,
8189 cos_type_t cotype, cos_object_t **ppco, bool assign_id);
8190 int pdf_make_named_dict(gx_device_pdf * pdev, const gs_param_string * pname,
8191 cos_dict_t **ppcd, bool assign_id);
8198 int pdf_get_named(gx_device_pdf * pdev, const gs_param_string * pname,
8199 cos_type_t cotype, cos_object_t **ppco);
8205 int pdf_push_namespace(gx_device_pdf *pdev);
8211 int pdf_pop_namespace(gx_device_pdf *pdev);
8219 int pdf_scan_token(const byte **pscan, const byte * end, const byte **ptoken);
8225 int pdf_scan_token_composite(const byte **pscan, const byte * end,
8226 const byte **ptoken);
8229 int pdf_replace_names(gx_device_pdf *pdev, const gs_param_string *from,
8230 gs_param_string *to);
8231 # 1184 "./src/gdevpdfx.h"
8232 int pdf_close_text_document(gx_device_pdf *pdev);
8238 pdf_text_data_t *pdf_text_data_alloc(gs_memory_t *mem);
8239 void pdf_set_text_state_default(pdf_text_state_t *pts);
8240 void pdf_text_state_copy(pdf_text_state_t *pts_to, pdf_text_state_t *pts_from);
8241 void pdf_reset_text_page(pdf_text_data_t *ptd);
8242 void pdf_reset_text_state(pdf_text_data_t *ptd);
8243 void pdf_close_text_page(gx_device_pdf *pdev);
8244 int pdf_get_stoted_text_size(pdf_text_state_t *state);
8248 int pdf_char_image_y_offset(const gx_device_pdf *pdev, int x, int y, int h);
8251 int pdf_begin_char_proc(gx_device_pdf * pdev, int w, int h, int x_width,
8252 int y_offset, gs_id id, pdf_char_proc_t **ppcp,
8253 pdf_stream_position_t * ppos);
8256 int pdf_end_char_proc(gx_device_pdf * pdev, pdf_stream_position_t * ppos);
8259 int pdf_do_char_image(gx_device_pdf * pdev, const pdf_char_proc_t * pcp,
8260 const gs_matrix * pimat);
8263 int pdf_start_charproc_accum(gx_device_pdf *pdev);
8265 int pdf_set_charproc_attrs(gx_device_pdf *pdev, gs_font *font, const double *pw, int narg,
8266 gs_text_cache_control_t control, gs_char ch);
8268 int pdf_end_charproc_accum(gx_device_pdf *pdev, gs_font *font, const pdf_char_glyph_pairs_t *cgp,
8269 gs_glyph glyph, gs_char output_char_code, const gs_const_string *gnstr);
8271 int pdf_open_aside(gx_device_pdf *pdev, pdf_resource_type_t rtype,
8272 gs_id id, pdf_resource_t **ppres, bool reserve_object_id, int options);
8275 int pdf_close_aside(gx_device_pdf *pdev);
8278 int pdf_enter_substream(gx_device_pdf *pdev, pdf_resource_type_t rtype,
8279 gs_id id, pdf_resource_t **ppres, bool reserve_object_id, bool compress);
8282 int pdf_exit_substream(gx_device_pdf *pdev);
8284 int pdf_add_procsets(cos_dict_t *pcd, pdf_procset_t procsets);
8286 int pdf_add_resource(gx_device_pdf *pdev, cos_dict_t *pcd, const char *key, pdf_resource_t *pres);
8291 int pdf_from_stream_to_text(gx_device_pdf *pdev);
8292 int pdf_from_string_to_text(gx_device_pdf *pdev);
8293 void pdf_close_text_contents(gx_device_pdf *pdev);
8294 # 24 "./src/gdevpdfe.c" 2
8295 # 1 "./src/gdevpdfg.h" 1
8296 # 24 "./src/gdevpdfg.h"
8297 typedef struct pdf_base_font_s pdf_base_font_t;
8298 # 35 "./src/gdevpdfg.h"
8299 typedef struct pdf_color_space_names_s {
8300 const char *DeviceCMYK;
8301 const char *DeviceGray;
8302 const char *DeviceRGB;
8303 const char *Indexed;
8304 } pdf_color_space_names_t;
8309 extern const pdf_color_space_names_t
8310 pdf_color_space_names,
8311 pdf_color_space_names_short;
8312 # 59 "./src/gdevpdfg.h"
8313 typedef struct pdf_color_space_s pdf_color_space_t;
8314 struct pdf_color_space_s {
8315 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;
8316 const gs_range_t *ranges;
8317 uint serialized_size;
8320 # 76 "./src/gdevpdfg.h"
8321 int pdf_cspace_init_Device(const gs_memory_t *mem, gs_color_space *pcs, int num_components);
8322 # 90 "./src/gdevpdfg.h"
8323 int pdf_color_space(gx_device_pdf *pdev, cos_value_t *pvalue,
8324 const gs_range_t **ppranges,
8325 const gs_color_space *pcs,
8326 const pdf_color_space_names_t *pcsn,
8328 int pdf_color_space_named(gx_device_pdf *pdev, cos_value_t *pvalue,
8329 const gs_range_t **ppranges,
8330 const gs_color_space *pcs,
8331 const pdf_color_space_names_t *pcsn,
8332 bool by_name, const byte *res_name, int name_length);
8335 int pdf_cs_Pattern_colored(gx_device_pdf *pdev, cos_value_t *pvalue);
8336 int pdf_cs_Pattern_uncolored(gx_device_pdf *pdev, cos_value_t *pvalue);
8337 int pdf_cs_Pattern_uncolored_hl(gx_device_pdf *pdev,
8338 const gs_color_space *pcs, cos_value_t *pvalue);
8341 void pdf_color_space_procsets(gx_device_pdf *pdev,
8342 const gs_color_space *pcs);
8347 void pdf_viewer_state_from_imager_state(gx_device_pdf * pdev,
8348 const gs_imager_state *pis, const gx_device_color *pdevc);
8351 void pdf_prepare_initial_viewer_state(gx_device_pdf * pdev, const gs_imager_state *pis);
8354 void pdf_reset_graphics(gx_device_pdf *pdev);
8357 void pdf_set_initial_color(gx_device_pdf * pdev, gx_hl_saved_color *saved_fill_color,
8358 gx_hl_saved_color *saved_stroke_color,
8359 bool *fill_used_process_color, bool *stroke_used_process_color);
8363 int pdf_set_pure_color(gx_device_pdf * pdev, gx_color_index color,
8364 gx_hl_saved_color * psc,
8365 bool *used_process_color,
8366 const psdf_set_color_commands_t *ppscc);
8367 int pdf_set_drawing_color(gx_device_pdf * pdev, const gs_imager_state * pis,
8368 const gx_drawing_color *pdc,
8369 gx_hl_saved_color * psc,
8370 bool *used_process_color,
8371 const psdf_set_color_commands_t *ppscc);
8376 int pdf_try_prepare_fill(gx_device_pdf *pdev, const gs_imager_state *pis);
8377 int pdf_prepare_drawing(gx_device_pdf *pdev, const gs_imager_state *pis, pdf_resource_t **ppres);
8378 int pdf_prepare_fill(gx_device_pdf *pdev, const gs_imager_state *pis);
8379 int pdf_prepare_stroke(gx_device_pdf *pdev, const gs_imager_state *pis);
8380 int pdf_prepare_image(gx_device_pdf *pdev, const gs_imager_state *pis);
8381 int pdf_prepare_imagemask(gx_device_pdf *pdev, const gs_imager_state *pis,
8382 const gx_drawing_color *pdcolor);
8383 int pdf_save_viewer_state(gx_device_pdf *pdev, stream *s);
8384 int pdf_restore_viewer_state(gx_device_pdf *pdev, stream *s);
8385 int pdf_end_gstate(gx_device_pdf *pdev, pdf_resource_t *pres);
8390 int pdf_string_to_cos_name(gx_device_pdf *pdev, const byte *str, uint len,
8391 cos_value_t *pvalue);
8395 typedef struct pdf_pattern_s pdf_pattern_t;
8396 struct pdf_pattern_s {
8397 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;
8398 pdf_pattern_t *substitute;
8406 pdf_resource_t *pdf_substitute_pattern(pdf_resource_t *pres);
8414 typedef struct pdf_image_names_s {
8415 pdf_color_space_names_t color_spaces;
8416 pdf_filter_names_t filter_names;
8417 const char *BitsPerComponent;
8418 const char *ColorSpace;
8421 const char *ImageMask;
8422 const char *Interpolate;
8424 } pdf_image_names_t;
8430 extern const pdf_image_names_t pdf_image_names_full, pdf_image_names_short;
8435 int pdf_put_image_values(cos_dict_t *pcd, gx_device_pdf *pdev,
8436 const gs_pixel_image_t *pic,
8437 const pdf_image_names_t *pin,
8438 const cos_value_t *pcsvalue);
8442 int pdf_put_image_filters(cos_dict_t *pcd, gx_device_pdf *pdev,
8443 const psdf_binary_writer * pbw,
8444 const pdf_image_names_t *pin);
8445 # 220 "./src/gdevpdfg.h"
8446 void pdf_make_bitmap_matrix(gs_matrix * pmat, int x, int y, int w, int h,
8450 void pdf_put_image_matrix(gx_device_pdf * pdev, const gs_matrix * pmat,
8454 int pdf_do_image_by_id(gx_device_pdf * pdev, double scale,
8455 const gs_matrix * pimat, bool in_contents, gs_id id);
8456 int pdf_do_image(gx_device_pdf * pdev, const pdf_resource_t * pres,
8457 const gs_matrix * pimat, bool in_contents);
8462 typedef struct pdf_image_writer_s {
8463 psdf_binary_writer binary[4];
8464 int alt_writer_count;
8465 const pdf_image_names_t *pin;
8466 pdf_resource_t *pres;
8469 const char *end_string;
8471 pdf_resource_t *pres_mask;
8473 extern const gs_memory_struct_type_t st_pdf_image_writer;
8480 void pdf_image_writer_init(pdf_image_writer * piw);
8487 int pdf_begin_write_image(gx_device_pdf * pdev, pdf_image_writer * piw,
8488 gx_bitmap_id id, int w, int h,
8489 cos_dict_t *pnamed, bool in_line);
8492 int pdf_begin_image_data(gx_device_pdf * pdev, pdf_image_writer * piw,
8493 const gs_pixel_image_t * pim,
8494 const cos_value_t *pcsvalue,
8495 int alt_writer_index);
8498 int pdf_copy_mask_bits(stream *s, const byte *base, int sourcex,
8499 int raster, int w, int h, byte invert);
8502 int pdf_copy_color_bits(stream *s, const byte *base, int sourcex,
8503 int raster, int w, int h, int bytes_per_pixel);
8507 pdf_complete_image_data(gx_device_pdf *pdev, pdf_image_writer *piw, int data_h,
8508 int width, int bits_per_pixel);
8511 int pdf_end_image_binary(gx_device_pdf *pdev, pdf_image_writer *piw,
8518 int pdf_end_write_image(gx_device_pdf * pdev, pdf_image_writer * piw);
8523 int pdf_make_alt_stream(gx_device_pdf * pdev, psdf_binary_writer * piw);
8528 int pdf_choose_compression(pdf_image_writer * piw, bool end_binary);
8531 int pdf_register_charproc_resource(gx_device_pdf *pdev, gs_id id, pdf_resource_type_t type);
8536 int pdf_store_pattern1_params(gx_device_pdf *pdev, pdf_resource_t *pres,
8537 gs_pattern1_instance_t *pinst);
8540 int pdf_put_colored_pattern(gx_device_pdf *pdev, const gx_drawing_color *pdc,
8541 const gs_color_space *pcs,
8542 const psdf_set_color_commands_t *ppscc,
8543 bool have_pattern_streams, pdf_resource_t **ppres);
8546 int pdf_put_uncolored_pattern(gx_device_pdf *pdev, const gx_drawing_color *pdc,
8547 const gs_color_space *pcs,
8548 const psdf_set_color_commands_t *ppscc,
8549 bool have_pattern_streams, pdf_resource_t **ppres);
8552 int pdf_put_pattern2(gx_device_pdf *pdev, const gx_drawing_color *pdc,
8553 const psdf_set_color_commands_t *ppscc,
8554 pdf_resource_t **ppres);
8560 int pdf_copy_color_data(gx_device_pdf * pdev, const byte * base, int sourcex,
8561 int raster, gx_bitmap_id id, int x, int y, int w, int h,
8562 gs_image_t *pim, pdf_image_writer *piw,
8570 int pdf_document_metadata(gx_device_pdf *pdev);
8571 int pdf_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont,
8572 const byte *digest, int digest_length, gs_id *metadata_object_id);
8573 # 25 "./src/gdevpdfe.c" 2
8574 # 1 "./src/gdevpdfo.h" 1
8575 # 59 "./src/gdevpdfo.h"
8576 typedef struct cos_element_s cos_element_t;
8577 typedef struct cos_stream_piece_s cos_stream_piece_t;
8583 struct cos_object_procs_s {
8587 void (*release)(cos_object_t *pco, client_name_t cname);
8591 int (*write)(const cos_object_t *pco, gx_device_pdf *pdev, gs_id object_id);
8595 int (*equal)(const cos_object_t *pco0, const cos_object_t *pco1, gx_device_pdf *pdev);
8598 # 120 "./src/gdevpdfo.h"
8599 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; };
8604 extern const cos_object_procs_t cos_generic_procs;
8605 # 140 "./src/gdevpdfo.h"
8607 COS_VALUE_SCALAR = 0,
8612 struct cos_value_s {
8613 cos_value_type_t value_type;
8616 cos_object_t *object;
8619 # 165 "./src/gdevpdfo.h"
8620 typedef struct cos_array_element_s cos_array_element_t;
8621 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; };
8622 extern const cos_object_procs_t cos_array_procs;
8625 typedef struct cos_dict_element_s cos_dict_element_t;
8626 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; };
8627 extern const cos_object_procs_t cos_dict_procs;
8630 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; };
8631 extern const cos_object_procs_t cos_stream_procs;
8632 # 188 "./src/gdevpdfo.h"
8633 cos_object_t *cos_object_alloc(gx_device_pdf *, client_name_t);
8634 cos_array_t *cos_array_alloc(gx_device_pdf *, client_name_t);
8635 cos_array_t *cos_array_from_floats(gx_device_pdf *, const float *, uint,
8637 cos_dict_t *cos_dict_alloc(gx_device_pdf *, client_name_t);
8638 cos_stream_t *cos_stream_alloc(gx_device_pdf *, client_name_t);
8641 gs_memory_t *cos_object_memory(const cos_object_t *);
8645 int cos_become(cos_object_t *, cos_type_t);
8648 void cos_release(cos_object_t *pco, client_name_t cname);
8650 int cos_write(const cos_object_t *pco, gx_device_pdf *pdev, gs_id object_id);
8654 const cos_value_t *cos_string_value(cos_value_t *, const byte *, uint);
8655 const cos_value_t *cos_c_string_value(cos_value_t *, const char *);
8656 const cos_value_t *cos_object_value(cos_value_t *, cos_object_t *);
8659 const cos_value_t *cos_resource_value(cos_value_t *, cos_object_t *);
8660 # 227 "./src/gdevpdfo.h"
8661 int cos_array_put(cos_array_t *, long, const cos_value_t *);
8662 int cos_array_put_no_copy(cos_array_t *, long, const cos_value_t *);
8663 int cos_array_add(cos_array_t *, const cos_value_t *);
8664 int cos_array_add_no_copy(cos_array_t *, const cos_value_t *);
8665 int cos_array_add_c_string(cos_array_t *, const char *);
8666 int cos_array_add_int(cos_array_t *, int);
8667 int cos_array_add_real(cos_array_t *, floatp);
8668 int cos_array_add_object(cos_array_t *, cos_object_t *);
8670 int cos_array_unadd(cos_array_t *, cos_value_t *);
8672 int cos_dict_put(cos_dict_t *, const byte *, uint, const cos_value_t *);
8673 int cos_dict_put_no_copy(cos_dict_t *, const byte *, uint,
8674 const cos_value_t *);
8675 int cos_dict_put_c_key(cos_dict_t *, const char *, const cos_value_t *);
8676 int cos_dict_put_c_key_string(cos_dict_t *, const char *, const byte *, uint);
8677 int cos_dict_put_c_key_int(cos_dict_t *, const char *, int);
8678 int cos_dict_put_c_key_bool(cos_dict_t *pcd, const char *key, bool value);
8679 int cos_dict_put_c_key_real(cos_dict_t *, const char *, floatp);
8680 int cos_dict_put_c_key_floats(cos_dict_t *, const char *, const float *, uint);
8681 int cos_dict_put_c_key_object(cos_dict_t *, const char *, cos_object_t *);
8682 int cos_dict_put_string(cos_dict_t *, const byte *, uint, const byte *, uint);
8683 int cos_dict_put_string_copy(cos_dict_t *pcd, const char *key, const char *value);
8684 int cos_dict_put_c_strings(cos_dict_t *, const char *, const char *);
8686 int cos_dict_move_all(cos_dict_t *, cos_dict_t *);
8688 int cos_stream_add(cos_stream_t *, uint);
8689 int cos_stream_add_bytes(cos_stream_t *, const byte *, uint);
8690 int cos_stream_add_stream_contents(cos_stream_t *, stream *);
8691 int cos_stream_release_pieces(cos_stream_t *pcs);
8692 cos_dict_t *cos_stream_dict(cos_stream_t *);
8693 # 273 "./src/gdevpdfo.h"
8694 const cos_array_element_t *
8695 cos_array_element_first(const cos_array_t *);
8696 const cos_array_element_t *
8697 cos_array_element_next(const cos_array_element_t *, long *,
8698 const cos_value_t **);
8701 const cos_value_t *cos_dict_find(const cos_dict_t *, const byte *, uint);
8702 const cos_value_t *cos_dict_find_c_key(const cos_dict_t *, const char *);
8704 int cos_dict_forall(const cos_dict_t *pcd, void *client_data,
8705 int (*proc)(void *client_data, const byte *key_data, uint key_size, const cos_value_t *v));
8708 typedef struct cos_param_list_writer_s {
8709 const gs_param_list_procs *procs; gs_memory_t *memory; bool persistent_keys;
8712 } cos_param_list_writer_t;
8713 int cos_param_list_writer_init(cos_param_list_writer_t *, cos_dict_t *,
8718 stream *cos_write_stream_alloc(cos_stream_t *pcs, gx_device_pdf *pdev,
8719 client_name_t cname);
8722 cos_stream_t * cos_stream_from_pipeline(stream *s);
8724 stream * cos_write_stream_from_pipeline(stream *s);
8727 int cos_value_write(const cos_value_t *, gx_device_pdf *);
8730 int cos_dict_elements_write(const cos_dict_t *, gx_device_pdf *);
8731 int cos_stream_elements_write(const cos_stream_t *, gx_device_pdf *);
8732 int cos_stream_contents_write(const cos_stream_t *, gx_device_pdf *);
8735 long cos_stream_length(const cos_stream_t *pcs);
8739 int cos_dict_objects_write(const cos_dict_t *, gx_device_pdf *);
8740 int cos_dict_objects_delete(cos_dict_t *);
8743 int cos_write_object(cos_object_t *pco, gx_device_pdf *pdev);
8747 void cos_value_free(const cos_value_t *, const cos_object_t *, client_name_t);
8750 void cos_free(cos_object_t *pco, client_name_t cname);
8751 # 26 "./src/gdevpdfe.c" 2
8752 # 1 "./src/gdevpdtf.h" 1
8753 # 20 "./src/gdevpdtf.h"
8754 # 1 "./src/gdevpdtx.h" 1
8755 # 20 "./src/gdevpdtx.h"
8756 # 1 "./src/gdevpdt.h" 1
8757 # 38 "./src/gdevpdt.h"
8758 pdf_text_state_t *pdf_text_state_alloc(gs_memory_t *mem);
8763 pdf_text_data_t *pdf_text_data_alloc(gs_memory_t *mem);
8768 void pdf_reset_text_page(pdf_text_data_t *ptd);
8773 void pdf_reset_text_state(pdf_text_data_t *ptd);
8778 void pdf_close_text_page(gx_device_pdf *pdev);
8784 int pdf_close_text_document(gx_device_pdf *pdev);
8791 int pdf_from_stream_to_text(gx_device_pdf *pdev);
8796 int pdf_from_string_to_text(gx_device_pdf *pdev);
8801 void pdf_close_text_contents(gx_device_pdf *pdev);
8806 int pdf_char_image_y_offset(const gx_device_pdf *pdev, int x, int y, int h);
8809 int pdf_begin_char_proc(gx_device_pdf * pdev, int w, int h, int x_width,
8810 int y_offset, gs_id id, pdf_char_proc_t **ppcp,
8811 pdf_stream_position_t * ppos);
8814 int pdf_end_char_proc(gx_device_pdf * pdev,
8815 pdf_stream_position_t * ppos);
8818 int pdf_do_char_image(gx_device_pdf * pdev, const pdf_char_proc_t * pcp,
8819 const gs_matrix * pimat);
8820 # 21 "./src/gdevpdtx.h" 2
8821 # 60 "./src/gdevpdtx.h"
8822 typedef struct pdf_bitmap_fonts_s pdf_bitmap_fonts_t;
8826 typedef struct pdf_outline_fonts_s pdf_outline_fonts_t;
8834 struct pdf_text_data_s {
8835 pdf_outline_fonts_t *outline_fonts;
8836 pdf_bitmap_fonts_t *bitmap_fonts;
8837 pdf_text_state_t *text_state;
8839 # 85 "./src/gdevpdtx.h"
8840 typedef struct pdf_font_resource_s pdf_font_resource_t;
8845 long pdf_font_id(const pdf_font_resource_t *pdfont);
8847 int pdf_used_charproc_resources(gx_device_pdf *pdev, pdf_font_resource_t *pdfont);
8848 # 21 "./src/gdevpdtf.h" 2
8849 # 86 "./src/gdevpdtf.h"
8850 typedef struct gs_cmap_s gs_cmap_t;
8855 typedef struct gs_font_type0_s gs_font_type0;
8856 # 101 "./src/gdevpdtf.h"
8857 typedef struct pdf_font_descriptor_s pdf_font_descriptor_t;
8862 typedef struct pdf_char_glyph_pair_s pdf_char_glyph_pair_t;
8865 struct pdf_char_glyph_pair_s {
8869 # 126 "./src/gdevpdtf.h"
8870 typedef int (*pdf_font_write_contents_proc_t)
8871 (gx_device_pdf *, pdf_font_resource_t *);
8877 typedef struct pdf_encoding_element_s {
8879 gs_const_string str;
8881 } pdf_encoding_element_t;
8882 # 148 "./src/gdevpdtf.h"
8883 struct pdf_base_font_s {
8884 # 160 "./src/gdevpdtf.h"
8885 gs_font_base *copied;
8886 gs_font_base *complete;
8888 DO_SUBSET_UNKNOWN = 0,
8901 gs_string font_name;
8903 cos_dict_t *FontFile;
8905 # 192 "./src/gdevpdtf.h"
8908 pdf_resource_type_t type;
8909 } pdf_resource_ref_t;
8917 struct pdf_font_resource_s {
8918 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;
8920 pdf_font_write_contents_proc_t write_contents;
8922 pdf_font_descriptor_t *FontDescriptor;
8928 pdf_base_font_t *base_font;
8933 pdf_resource_t *res_ToUnicode;
8934 gs_cmap_t *cmap_ToUnicode;
8935 gs_glyph_mark_proc_t mark_glyph;
8936 void *mark_glyph_data;
8941 pdf_font_resource_t *DescendantFont;
8947 char Encoding_name[(((17) > (sizeof(long) * 8 / 3 + 1 + 4)) ? (17) : (sizeof(long) * 8 / 3 + 1 + 4)) + 1
8952 gs_const_string CMapName;
8954 bool cmap_is_standard;
8962 long CIDSystemInfo_id;
8963 ushort *CIDToGIDMap;
8964 gs_id glyphshow_font_id;
8968 pdf_font_resource_t *parent;
8974 int FirstChar, LastChar;
8979 gs_encoding_index_t BaseEncoding;
8980 pdf_encoding_element_t *Encoding;
8986 bool is_MM_instance;
8998 gs_int_rect FontBBox;
8999 gs_matrix FontMatrix;
9000 pdf_char_proc_ownership_t *char_procs;
9003 cos_dict_t *Resources;
9013 # 308 "./src/gdevpdtf.h"
9015 FONT_EMBED_STANDARD,
9019 # 322 "./src/gdevpdtf.h"
9020 typedef struct pdf_standard_font_s {
9021 pdf_font_resource_t *pdfont;
9022 gs_matrix orig_matrix;
9023 } pdf_standard_font_t;
9024 # 343 "./src/gdevpdtf.h"
9025 struct pdf_outline_fonts_s {
9026 pdf_standard_font_t *standard_fonts;
9028 # 358 "./src/gdevpdtf.h"
9029 pdf_outline_fonts_t *pdf_outline_fonts_alloc(gs_memory_t *mem);
9034 pdf_standard_font_t *pdf_standard_fonts(const gx_device_pdf *pdev);
9039 void pdf_clean_standard_fonts(const gx_device_pdf *pdev);
9042 int pdf_free_font_cache(gx_device_pdf *pdev);
9047 int pdf_font_type0_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9048 gs_id rid, pdf_font_resource_t *DescendantFont,
9049 const gs_const_string *CMapName);
9050 int pdf_font_type3_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9051 pdf_font_write_contents_proc_t write_contents);
9052 int pdf_font_std_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9053 bool is_original, gs_id rid, gs_font_base *pfont, int index);
9054 int pdf_font_simple_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9055 gs_id rid, pdf_font_descriptor_t *pfd);
9056 int pdf_font_cidfont_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9057 gs_id rid, pdf_font_descriptor_t *pfd);
9058 int pdf_obtain_cidfont_widths_arrays(gx_device_pdf *pdev, pdf_font_resource_t *pdfont,
9059 int wmode, double **w, double **w0, double **v);
9060 int font_resource_encoded_alloc(gx_device_pdf *pdev, pdf_font_resource_t **ppfres,
9061 gs_id rid, font_type ftype,
9062 pdf_font_write_contents_proc_t write_contents);
9063 int pdf_assign_font_object_id(gx_device_pdf *pdev, pdf_font_resource_t *pdfont);
9066 int pdf_resize_resource_arrays(gx_device_pdf *pdev, pdf_font_resource_t *pfres,
9074 gs_font_base *pdf_font_resource_font(const pdf_font_resource_t *pdfont, bool complete);
9082 pdf_font_embed_t pdf_font_embed_status(gx_device_pdf *pdev, gs_font *font,
9084 pdf_char_glyph_pair_t *pairs, int num_glyphs);
9090 int pdf_compute_BaseFont(gx_device_pdf *pdev, pdf_font_resource_t *pdfont, bool finish);
9096 int pdf_close_text_document(gx_device_pdf *pdev);
9101 const gs_font_name *pdf_choose_font_name(gs_font *font, bool key_name);
9108 int pdf_cmap_alloc(gx_device_pdf *pdev, const gs_cmap_t *pcmap,
9109 pdf_resource_t **ppres , int font_index_only);
9114 int pdf_font_add_cid_to_gid(pdf_font_resource_t *pdfont, uint cid, uint gid);
9115 # 27 "./src/gdevpdfe.c" 2
9119 pdf_xml_data_write(stream *s, const byte *data, int data_length)
9121 int l = data_length;
9122 const byte *p = data;
9126 case '<' : stream_puts(s, "<"); break;
9127 case '>' : stream_puts(s, ">"); break;
9128 case '&' : stream_puts(s, "&"); break;
9129 case '\'': stream_puts(s, "'"); break;
9130 case '"' : stream_puts(s, """); break;
9132 if (*p < 32 || *p > 127)
9133 pprintd1(s, "&#%d;", *p);
9141 static __inline__ void
9142 pdf_xml_string_write(stream *s, const char *data)
9144 pdf_xml_data_write(s, (const byte *)data, strlen(data));
9148 static __inline__ void
9149 pdf_xml_tag_open_beg(stream *s, const char *data)
9152 stream_puts(s, data);
9156 static __inline__ void
9157 pdf_xml_tag_end(stream *s)
9163 static __inline__ void
9164 pdf_xml_tag_end_empty(stream *s)
9166 stream_puts(s, "/>");
9170 static __inline__ void
9171 pdf_xml_tag_open(stream *s, const char *data)
9174 stream_puts(s, data);
9179 static __inline__ void
9180 pdf_xml_tag_close(stream *s, const char *data)
9182 stream_puts(s, "</");
9183 stream_puts(s, data);
9188 static __inline__ void
9189 pdf_xml_attribute_name(stream *s, const char *data)
9192 stream_puts(s, data);
9197 static __inline__ void
9198 pdf_xml_attribute_value(stream *s, const char *data)
9201 pdf_xml_string_write(s, data);
9205 static __inline__ void
9206 pdf_xml_attribute_value_data(stream *s, const byte *data, int data_length)
9209 pdf_xml_data_write(s, data, data_length);
9214 static __inline__ void
9215 pdf_xml_ins_beg(stream *s, const char *data)
9217 stream_puts(s, "<?");
9218 stream_puts(s, data);
9222 static __inline__ void
9223 pdf_xml_ins_end(stream *s)
9225 stream_puts(s, "?>");
9229 static __inline__ void
9230 pdf_xml_newline(stream *s)
9232 stream_puts(s, "\n");
9236 static __inline__ void
9237 pdf_xml_copy(stream *s, const char *data)
9239 stream_puts(s, data);
9246 pdf_xmp_time(char *buf, int buf_length)
9251 char buf1[4+1+2+1+2+1];
9254 tms = *localtime(&t);
9257 tms.tm_year + 1900, tms.tm_mon + 1, tms.tm_mday);
9258 strncpy(buf, buf1, buf_length);
9262 pdf_xmp_write_docinfo_item(gx_device_pdf *pdev, stream *s, const char *key, const char *default_value,
9263 void(*write)(stream *s, const byte *data, int data_length))
9265 const cos_value_t *v = cos_dict_find(pdev->Info, (const byte *)key, strlen(key));
9267 if (v != ((void *)0) && (v->value_type == COS_VALUE_SCALAR ||
9268 v->value_type == COS_VALUE_CONST)) {
9269 if (v->contents.chars.size > 2 && v->contents.chars.data[0] == '(')
9270 write(s, v->contents.chars.data + 1, v->contents.chars.size - 2);
9272 write(s, v->contents.chars.data, v->contents.chars.size);
9274 stream_puts(s, default_value);
9278 pdf_uuid_time(gx_device_pdf *pdev)
9280 long *dt = pdev->uuid_time;
9284 t = (uint64_t)10000000 * dt[0] + dt[0] / 100;
9285 t += (uint64_t) (1000*1000*10)
9286 * (uint64_t) (60 * 60 * 24)
9287 * (uint64_t) (17+30+31+365*397+99);
9291 static void writehex(char **p, ulong v, int l)
9294 static const char digit[] = "0123456789abcdef";
9297 *((*p)++) = digit[v >> (i * 4) & 15];
9301 pdf_make_uuid(const byte node[6], uint64_t uuid_time, ulong time_seq, char *buf, int buf_length)
9304 ulong uuid_time_lo = (ulong)(uuid_time & 0xFFFFFFFF);
9305 ushort uuid_time_md = (ushort)((uuid_time >> 32) & 0xFFFF);
9306 ushort uuid_time_hi = (ushort)((uuid_time >> 48) & 0x0FFF);
9308 writehex(&p, uuid_time_lo, 4);
9310 writehex(&p, uuid_time_md, 2);
9312 writehex(&p, uuid_time_hi | (ushort)(1 << 12), 2);
9314 writehex(&p, (time_seq & 0x3F00) >> 8, 1);
9315 writehex(&p, time_seq & 0xFF, 1);
9317 writehex(&p, node[0], 1);
9318 writehex(&p, node[1], 1);
9319 writehex(&p, node[2], 1);
9320 writehex(&p, node[3], 1);
9321 writehex(&p, node[4], 1);
9322 writehex(&p, node[5], 1);
9324 strncpy(buf, b, buf_length);
9328 pdf_make_instance_uuid(gx_device_pdf *pdev, const byte digest[6], char *buf, int buf_length)
9330 if (pdev->InstanceUUID.size) {
9331 int l = (((buf_length - 1) < (pdev->InstanceUUID.size)) ? (buf_length - 1) : (pdev->InstanceUUID.size));
9333 memcpy(buf, pdev->InstanceUUID.data, l);
9336 pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf, buf_length);
9341 pdf_make_document_uuid(gx_device_pdf *pdev, const byte digest[6], char *buf, int buf_length)
9343 if (pdev->DocumentUUID.size) {
9344 int l = (((buf_length - 1) < (pdev->DocumentUUID.size)) ? (buf_length - 1) : (pdev->DocumentUUID.size));
9346 memcpy(buf, pdev->DocumentUUID.data, l);
9349 pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf, buf_length);
9353 static char dd[]={'\'', 0xEF, 0xBB, 0xBF, '\'', 0};
9359 pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
9361 char instance_uuid[40], document_uuid[40], date_time[40];
9363 stream *s = pdev->strm;
9365 code = pdf_make_instance_uuid(pdev, digest, instance_uuid, sizeof(instance_uuid));
9368 code = pdf_make_document_uuid(pdev, digest, document_uuid, sizeof(document_uuid));
9371 pdf_xmp_time(date_time, sizeof(date_time));
9372 pdf_xml_ins_beg(s, "xpacket");
9373 pdf_xml_attribute_name(s, "begin");
9374 pdf_xml_copy(s, dd);
9375 pdf_xml_attribute_name(s, "id");
9376 pdf_xml_attribute_value(s, "W5M0MpCehiHzreSzNTczkc9d");
9380 pdf_xml_copy(s, "<?adobe-xap-filters esc=\"CRLF\"?>\n");
9381 pdf_xml_copy(s, "<x:xmpmeta xmlns:x='adobe:ns:meta/'"
9382 " x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>\n");
9384 pdf_xml_copy(s, "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' "
9385 "xmlns:iX='http://ns.adobe.com/iX/1.0/'>\n");
9388 pdf_xml_tag_open_beg(s, "rdf:Description");
9389 pdf_xml_attribute_name(s, "rdf:about");
9390 pdf_xml_attribute_value(s, instance_uuid);
9391 pdf_xml_attribute_name(s, "xmlns:pdf");
9392 pdf_xml_attribute_value(s, "http://ns.adobe.com/pdf/1.3/");
9393 pdf_xml_attribute_name(s, "pdf:Producer");
9394 pdf_xmp_write_docinfo_item(pdev, s, "/Producer", "UnknownProduicer",
9395 pdf_xml_attribute_value_data);
9396 pdf_xml_tag_end_empty(s);
9399 pdf_xml_tag_open_beg(s, "rdf:Description");
9400 pdf_xml_attribute_name(s, "rdf:about");
9401 pdf_xml_attribute_value(s, instance_uuid);
9402 pdf_xml_attribute_name(s, "xmlns:xap");
9403 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/");
9404 pdf_xml_attribute_name(s, "xap:ModifyDate");
9405 pdf_xml_attribute_value(s, date_time);
9406 pdf_xml_attribute_name(s, "xap:CreateDate");
9407 pdf_xml_attribute_value(s, date_time);
9410 pdf_xml_tag_open_beg(s, "xap:CreatorTool");
9415 sprintf(buf, "%d.%02d", (int)(gs_revision / 100), (int)(gs_revision % 100));
9416 pdf_xml_string_write(s, gs_product);
9417 pdf_xml_string_write(s, " ");
9418 pdf_xml_string_write(s, buf);
9419 pdf_xml_string_write(s, " PDF Writer");
9421 pdf_xml_tag_close(s, "xap:CreatorTool");
9423 pdf_xml_tag_close(s, "rdf:Description");
9426 pdf_xml_tag_open_beg(s, "rdf:Description");
9427 pdf_xml_attribute_name(s, "rdf:about");
9428 pdf_xml_attribute_value(s, instance_uuid);
9429 pdf_xml_attribute_name(s, "xmlns:xapMM");
9430 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/mm/");
9431 pdf_xml_attribute_name(s, "xapMM:DocumentID");
9432 pdf_xml_attribute_value(s, document_uuid);
9433 pdf_xml_tag_end_empty(s);
9436 pdf_xml_tag_open_beg(s, "rdf:Description");
9437 pdf_xml_attribute_name(s, "rdf:about");
9438 pdf_xml_attribute_value(s, instance_uuid);
9439 pdf_xml_attribute_name(s, "xmlns:dc");
9440 pdf_xml_attribute_value(s, "http://purl.org/dc/elements/1.1/");
9441 pdf_xml_attribute_name(s, "dc:format");
9442 pdf_xml_attribute_value(s,"application/pdf");
9445 pdf_xml_tag_open(s, "dc:title");
9447 pdf_xml_tag_open(s, "rdf:Alt");
9449 pdf_xml_tag_open_beg(s, "rdf:li");
9450 pdf_xml_attribute_name(s, "xml:lang");
9451 pdf_xml_attribute_value(s, "x-default");
9454 pdf_xmp_write_docinfo_item(pdev, s, "/Title", "Untitled",
9455 pdf_xml_data_write);
9457 pdf_xml_tag_close(s, "rdf:li");
9459 pdf_xml_tag_close(s, "rdf:Alt");
9461 pdf_xml_tag_close(s, "dc:title");
9463 if (cos_dict_find(pdev->Info, (const byte *)"/Author", 7)) {
9464 pdf_xml_tag_open(s, "dc:creator");
9469 pdf_xml_tag_open(s, "rdf:Seq");
9471 pdf_xml_tag_open(s, "rdf:li");
9473 pdf_xmp_write_docinfo_item(pdev, s, "/Author", "Unknown",
9474 pdf_xml_data_write);
9476 pdf_xml_tag_close(s, "rdf:li");
9478 pdf_xml_tag_close(s, "rdf:Seq");
9480 pdf_xml_tag_close(s, "dc:creator");
9483 pdf_xml_tag_close(s, "rdf:Description");
9486 pdf_xml_copy(s, "</rdf:RDF>\n");
9488 pdf_xml_copy(s, "</x:xmpmeta>\n");
9490 pdf_xml_copy(s, " \n");
9491 pdf_xml_copy(s, " \n");
9492 pdf_xml_copy(s, "<?xpacket end='w'?>");
9497 pdf_document_metadata(gx_device_pdf *pdev)
9499 if (pdev->CompatibilityLevel < 1.4)
9501 if (pdev->ParseDSCCommentsForDocInfo || pdev->PreserveEPSInfo) {
9502 pdf_resource_t *pres;
9508 (*(pdev->strm)->procs.flush)(pdev->strm);
9509 s_MD5C_get_digest(pdev->strm, digest, sizeof(digest));
9510 if (pdev->EncryptMetadata)
9512 code = pdf_open_aside(pdev, resourceOther, 0L, &pres, ((bool)1), options);
9515 code = pdf_write_document_metadata(pdev, digest);
9518 code = pdf_close_aside(pdev);
9521 code = cos_write_object(((cos_object_t *)&((pres->object)->cos_procs)), pdev);
9524 sprintf(buf, "%ld 0 R", pres->object->id);
9525 cos_dict_put_c_key_object(pdev->Catalog, "/Metadata", pres->object);
9534 pdf_write_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont,
9535 const byte *digest, int digest_length)
9537 char instance_uuid[40];
9539 stream *s = pdev->strm;
9540 gs_font_info_t info;
9541 gs_font_base *pfont = pbfont->complete;
9543 if (pfont == ((void *)0))
9544 pfont = pbfont->copied;
9546 pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, instance_uuid, sizeof(instance_uuid));
9547 code = pfont->procs.font_info((gs_font *)pfont, ((void *)0),
9553 pdf_xml_ins_beg(s, "xpacket");
9554 pdf_xml_attribute_name(s, "begin");
9555 pdf_xml_copy(s, dd);
9556 pdf_xml_attribute_name(s, "id");
9557 pdf_xml_attribute_value(s, "W5M0MpCehiHzreSzNTczkc9d");
9561 pdf_xml_copy(s, "<?adobe-xap-filters esc=\"CRLF\"?>\n");
9562 pdf_xml_copy(s, "<x:xmpmeta xmlns:x='adobe:ns:meta/'"
9563 " x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>\n");
9565 pdf_xml_copy(s, "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' "
9566 "xmlns:iX='http://ns.adobe.com/iX/1.0/'>\n");
9569 pdf_xml_tag_open_beg(s, "rdf:Description");
9570 pdf_xml_attribute_name(s, "rdf:about");
9571 pdf_xml_attribute_value(s, instance_uuid);
9572 pdf_xml_attribute_name(s, "xmlns:xmp");
9573 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/");
9576 pdf_xml_tag_open_beg(s, "xmp:Title");
9579 pdf_xml_tag_open(s, "rdf:Alt");
9581 pdf_xml_tag_open_beg(s, "rdf:li");
9582 pdf_xml_attribute_name(s, "xml:lang");
9583 pdf_xml_attribute_value(s, "x-default");
9586 pdf_xml_data_write(s, pbfont->font_name.data, pbfont->font_name.size);
9588 pdf_xml_tag_close(s, "rdf:li");
9590 pdf_xml_tag_close(s, "rdf:Alt");
9592 pdf_xml_tag_close(s, "xmp:Title");
9594 pdf_xml_tag_close(s, "rdf:Description");
9598 pdf_xml_tag_open_beg(s, "rdf:Description");
9599 pdf_xml_attribute_name(s, "rdf:about");
9600 pdf_xml_attribute_value(s, instance_uuid);
9601 pdf_xml_attribute_name(s, "xmlns:xmpRights");
9602 pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/rights/");
9604 if (info.members & 0x0040) {
9605 pdf_xml_tag_open_beg(s, "xmpRights:Copyright");
9608 pdf_xml_tag_open(s, "rdf:Alt");
9610 pdf_xml_tag_open_beg(s, "rdf:li");
9611 pdf_xml_attribute_name(s, "xml:lang");
9612 pdf_xml_attribute_value(s, "x-default");
9615 pdf_xml_data_write(s, info.Copyright.data, info.Copyright.size);
9617 pdf_xml_tag_close(s, "rdf:li");
9619 pdf_xml_tag_close(s, "rdf:Alt");
9621 pdf_xml_tag_close(s, "xmpRights:Copyright");
9624 pdf_xml_tag_open_beg(s, "xmpRights:Owner");
9627 pdf_xml_tag_open(s, "rdf:Alt");
9629 pdf_xml_tag_open_beg(s, "rdf:li");
9630 pdf_xml_attribute_name(s, "xml:lang");
9631 pdf_xml_attribute_value(s, "x-default");
9634 pdf_xml_data_write(s, info.Copyright.data, info.Copyright.size);
9636 pdf_xml_tag_close(s, "rdf:li");
9638 pdf_xml_tag_close(s, "rdf:Alt");
9640 pdf_xml_tag_close(s, "xmpRights:Owner");
9643 pdf_xml_tag_open_beg(s, "xmpRights:Marked");
9646 pdf_xml_string_write(s, "True");
9648 pdf_xml_tag_close(s, "xmpRights:Marked");
9650 if (info.members & 0x0080) {
9651 pdf_xml_tag_open_beg(s, "xmpRights:UsageTerms");
9654 pdf_xml_tag_open(s, "rdf:Alt");
9656 pdf_xml_tag_open_beg(s, "rdf:li");
9657 pdf_xml_attribute_name(s, "xml:lang");
9658 pdf_xml_attribute_value(s, "x-default");
9661 pdf_xml_data_write(s, info.Notice.data, info.Notice.size);
9663 pdf_xml_tag_close(s, "rdf:li");
9665 pdf_xml_tag_close(s, "rdf:Alt");
9667 pdf_xml_tag_close(s, "xmpRights:UsageTerms");
9669 pdf_xml_tag_close(s, "rdf:Description");
9672 pdf_xml_copy(s, "</rdf:RDF>\n");
9674 pdf_xml_copy(s, "</x:xmpmeta>\n");
9676 pdf_xml_copy(s, " \n");
9677 pdf_xml_copy(s, " \n");
9678 pdf_xml_copy(s, "<?xpacket end='w'?>");
9683 pdf_font_metadata(gx_device_pdf *pdev, const pdf_base_font_t *pbfont,
9684 const byte *digest, int digest_length, gs_id *metadata_object_id)
9686 *metadata_object_id = 0L;
9687 if (pdev->CompatibilityLevel < 1.4)
9696 pdf_resource_t *pres;
9701 (*(pdev->strm)->procs.flush)(pdev->strm);
9702 s_MD5C_get_digest(pdev->strm, digest, sizeof(digest));
9703 if (pdev->EncryptMetadata)
9705 code = pdf_open_aside(pdev, resourceOther, 0L, &pres, ((bool)1), options);
9708 code = pdf_write_font_metadata(pdev, pbfont, digest, digest_length);
9711 code = pdf_close_aside(pdev);
9714 code = cos_write_object(((cos_object_t *)&((pres->object)->cos_procs)), pdev);
9717 *metadata_object_id = pres->object->id;