]> git.ipfire.org Git - thirdparty/cups.git/blame - pstoraster/gs811-lib.patch
Load cups into easysw/current.
[thirdparty/cups.git] / pstoraster / gs811-lib.patch
CommitLineData
ef416fc2 1diff -u ghostscript-8.11/lib/gs_init.ps ghostscript-8.11-easysw/lib/gs_init.ps
2--- ghostscript-8.11/lib/gs_init.ps 2003-07-30 03:26:55.000000000 -0400
3+++ ghostscript-8.11-easysw/lib/gs_init.ps 2003-11-13 13:04:17.000000000 -0500
4@@ -139,6 +139,7 @@
5 currentdict /NOFONTPATH known /NOFONTPATH exch def
6 currentdict /NOGC known /NOGC exch def
7 currentdict /NOINTERPOLATE .knownget { /INTERPOLATE exch not def } if
8+currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def
9 currentdict /NOOUTERSAVE known /NOOUTERSAVE exch def
10 currentdict /NOPAGEPROMPT known /NOPAGEPROMPT exch def
11 currentdict /NOPAUSE known /NOPAUSE exch def
12diff -u ghostscript-8.11/lib/gs_setpd.ps ghostscript-8.11-easysw/lib/gs_setpd.ps
13--- ghostscript-8.11/lib/gs_setpd.ps 2003-04-12 14:08:18.000000000 -0400
14+++ ghostscript-8.11-easysw/lib/gs_setpd.ps 2003-11-14 16:32:55.000000000 -0500
15@@ -344,21 +344,42 @@
16 } bind
17 .dicttomark readonly def
18
19-% Define the keys used in input attribute matching.
20-/.inputattrkeys [
21- /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
22- % The following are documented in Adobe's supplement for v2017.
23- /LeadingEdge /MediaClass
24-] readonly def
25-% Define other keys used in media selection.
26-/.inputselectionkeys [
27- /MediaPosition /Orientation
28-] readonly def
29-
30-% Define the keys used in output attribute matching.
31-/.outputattrkeys [
32- /OutputType
33-] readonly def
34+% M. Sweet, Easy Software Products:
35+%
36+% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
37+% selection policies for setpagedevice. This is used by CUPS to support
38+% the standard Adobe media attributes.
39+NOMEDIAATTRS {
40+ % Define only PageSize for input attribute matching.
41+ /.inputattrkeys [
42+ /PageSize
43+ ] readonly def
44+ % Define no other keys used in media selection.
45+ /.inputselectionkeys [
46+ /noInputSelectionsKeys
47+ ] readonly def
48+
49+ % Define no keys used in output attribute matching.
50+ /.outputattrkeys [
51+ /noOutputAttrKeys
52+ ] readonly def
53+} {
54+ % Define the keys used in input attribute matching.
55+ /.inputattrkeys [
56+ /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet
57+ % The following are documented in Adobe's supplement for v2017.
58+ /LeadingEdge /MediaClass
59+ ] readonly def
60+ % Define other keys used in media selection.
61+ /.inputselectionkeys [
62+ /MediaPosition /Orientation
63+ ] readonly def
64+
65+ % Define the keys used in output attribute matching.
66+ /.outputattrkeys [
67+ /OutputType
68+ ] readonly def
69+} ifelse
70
71 % Define all the parameters that should always be copied to the merged
72 % dictionary.
73@@ -387,7 +408,13 @@
74 /PageSize //false % obsolete alias for .MediaSize
75 /InputAttributes //false
76 .inputattrkeys
77- { dup /PageSize eq
78+ % M. Sweet, Easy Software Products:
79+ %
80+ % Treat LeadingEdge like PageSize so that a common Ghostscript driver
81+ % doesn't need the NOMEDIAATTRS definition.
82+ %
83+ % { dup /PageSize eq
84+ { dup dup /PageSize eq exch /LeadingEdge eq or
85 { pop }
86 { { 2 index /InputAttributes .knownget { //null eq } { //true } ifelse } }
87 ifelse
88@@ -468,11 +495,22 @@
89 % They are expected to consume the top 2 operands.
90 % NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize)
91 % the same as 0, i.e., we signal an error.
92+%
93+% M. Sweet, Easy Software Products:
94+%
95+% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
96+% selection policies for setpagedevice. This is used by CUPS to support
97+% the standard Adobe media attributes.
98 0 { % Set errorinfo and signal a configurationerror.
99+ NOMEDIAATTRS {
100+ % NOMEDIAATTRS means that the default policy is 7...
101+ pop 2 index exch 7 put
102+ } {
103 pop dup 4 index exch get 2 array astore
104 $error /errorinfo 3 -1 roll put
105 cleartomark
106 /setpagedevice load /configurationerror signalerror
107+ } ifelse
108 } bind
109 1 { % Roll back the failed request to its previous status.
110 SETPDDEBUG { (Rolling back.) = pstack flush } if