Commit | Line | Data |
---|---|---|
442148cf WJ |
1 | % Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. |
2 | % Distributed by Free Software Foundation, Inc. | |
3 | % | |
4 | % This file is part of Ghostscript. | |
5 | % | |
6 | % Ghostscript is distributed in the hope that it will be useful, but | |
7 | % WITHOUT ANY WARRANTY. No author or distributor accepts responsibility | |
8 | % to anyone for the consequences of using it or for whether it serves any | |
9 | % particular purpose or works at all, unless he says so in writing. Refer | |
10 | % to the Ghostscript General Public License for full details. | |
11 | % | |
12 | % Everyone is granted permission to copy, modify and redistribute | |
13 | % Ghostscript, but only under the conditions described in the Ghostscript | |
14 | % General Public License. A copy of this license is supposed to have been | |
15 | % given to you along with Ghostscript so you can know your rights and | |
16 | % responsibilities. It should be in a file named COPYING. Among other | |
17 | % things, the copyright notice and this notice must be preserved on all | |
18 | % copies. | |
19 | ||
20 | % This file provides a dummy 'statusdict' and 'serverdict', | |
21 | % and a few of the other LaserWriter operators, for the benefit of | |
22 | % PostScript programs that think they are running on a LaserWriter. | |
23 | ||
24 | systemdict begin | |
25 | ||
26 | % Define various paper formats. These are mostly dummies for now. | |
27 | % Only letter, note, and legal are defined in the Adobe manual. | |
28 | ||
29 | /letter {statusdict begin 0 setpagetype end} def | |
30 | /note {statusdict begin 1 setpagetype end} def | |
31 | ||
32 | /11x17 {} def % 11x17 portrait | |
33 | /a3 {} def | |
34 | /a4 {} def | |
35 | /a5 {} def | |
36 | /a6 {} def | |
37 | /b4 {} def | |
38 | /flsa {} def | |
39 | /flse {} def | |
40 | /halfletter {} def | |
41 | /ledger {} def % 11x17 landscape | |
42 | /legal {} def | |
43 | ||
44 | /statusdict 80 dict def | |
45 | /serverdict 4 dict def | |
46 | ||
47 | end | |
48 | ||
49 | statusdict begin | |
50 | ||
51 | %%%%%% The following items were suggested by a user as useful. | |
52 | ||
53 | % Permanent definitions | |
54 | ||
55 | /ramsize 4194304 def | |
56 | /hardwareiomode 0 def | |
57 | /sethardwareiomode {pop} def | |
58 | /softwareiomode 0 def | |
59 | /setsoftwareiomode {pop} def | |
60 | /dosysstart false def | |
61 | /setdosysstart {pop} def | |
62 | /allowjobreset true def | |
63 | /setallowjobreset {pop} def | |
64 | /defaultpaperfamily 0 def | |
65 | /setdefaultpaperfamily {pop} def | |
66 | /defaultpapertray 0 def | |
67 | /setdefaultpapertray {pop} def | |
68 | /defaulttrayswitch false def | |
69 | /setdefaulttrayswitch {pop} def | |
70 | ||
71 | % Tray and format selection | |
72 | ||
73 | /11x17tray {} def | |
74 | /a3tray {} def | |
75 | /a4tray {} def | |
76 | /a5tray {} def | |
77 | /a6tray {} def | |
78 | /b4tray {} def | |
79 | /flsatray {} def | |
80 | /flsetray {} def | |
81 | /halflettertray {} def | |
82 | /legaltray {} def | |
83 | /lettertray {} def | |
84 | ||
85 | % Per-job parameters | |
86 | ||
87 | /paperfamily 0 def % 0 is US, 1 is European | |
88 | /papertray 1 def | |
89 | /setpapertray {statusdict exch /papertray exch put} def | |
90 | /trayswitch false def % paperout feeds from another tray | |
91 | /papersize {/letter true} def % <name of paper size>, <short-edge-first-p> | |
92 | /appletalktype (LaserWriter) def | |
93 | ||
94 | %%%%%% The following items are defined in the PostScript Language | |
95 | %%%%%% Reference Manual, First Edition. | |
96 | ||
97 | /checkpassword {statusdict begin .password eq end} def | |
98 | /defaulttimeouts {statusdict begin .timeouts aload pop end} def | |
99 | %/dostartpage | |
100 | /eescratch {pop 0} def | |
101 | /idlefonts {statusdict begin mark .idlefonts aload pop end} def | |
102 | /jobname () def | |
103 | %/jobtimeout | |
104 | /manualfeed false def | |
105 | /manualfeedtimeout 60 def | |
106 | /margins {statusdict begin .topmargin .leftmargin end} def | |
107 | /pagecount {4711} def | |
108 | /pagestackorder {false} def | |
109 | %/pagetype | |
110 | /prefeed false def | |
111 | /printererror {pop pop} def | |
112 | /printername {statusdict begin .printername exch copy end} def | |
113 | /product (Ghostscript) def | |
114 | /revision revision def % revision is defined in systemdict | |
115 | /sccbatch {pop 9600 0} def | |
116 | /sccinteractive {pop 9600 0} def | |
117 | /setdefaulttimeouts {statusdict begin .timeouts astore pop end} def | |
118 | /setdostartpage {statusdict exch /dostartpage exch put} def | |
119 | /seteescratch {pop pop} def | |
120 | /setidlefonts {] statusdict exch /.idlefonts exch put} def | |
121 | /setjobtimeout {statusdict exch /jobtimeout exch put} def | |
122 | /setmargins | |
123 | {statusdict begin /.leftmargin exch def /.topmargin exch def end} def | |
124 | /setpagetype {statusdict exch /pagetype exch put} def | |
125 | /setpassword | |
126 | {exch checkpassword | |
127 | {statusdict exch /.password exch put true} | |
128 | {pop false} | |
129 | ifelse} def | |
130 | /setprintername | |
131 | {dup length string copy statusdict exch /printername exch put} def | |
132 | /setsccbatch {pop pop pop} def | |
133 | /setsccinteractive {pop pop pop} def | |
134 | /waittimeout 300 def | |
135 | ||
136 | /.password 0 def | |
137 | /.timeouts [0 60 30] def | |
138 | true setdostartpage | |
139 | mark setidlefonts | |
140 | 0 setjobtimeout | |
141 | 0 0 setmargins | |
142 | 0 setpagetype | |
143 | product setprintername | |
144 | ||
145 | end % statusdict | |
146 | ||
147 | % The following contents of serverdict are a complete guess, | |
148 | % based on some observed LaserWriter boilerplate. | |
149 | ||
150 | serverdict begin | |
151 | ||
152 | /execjob { } def | |
153 | % The Red Book implies that something like the following is | |
154 | % an appropriate definition of exitserver. | |
155 | /exitserver { clear stop } def | |
156 | % However, this interacts badly with Ghostscript's present error handler, | |
157 | % so we override it with the following less appropriate definition. | |
158 | /exitserver { clear cleardictstack } def | |
159 | /setrealdevice { } def | |
160 | ||
161 | end % serverdict |