annotate etc/ps-prin0.ps @ 28964:7ba5753774e5

(describe-char-after): Call internal-char-font, not char-font. If internal-char-font returns nil, display "-- none --".
author Kenichi Handa <handa@m17n.org>
date Wed, 17 May 2000 23:31:47 +0000
parents a94b3ce0fa8c
children 0763a6ed0743
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28155
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1 % === BEGIN ps-print prologue 0
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3 %%BeginProcSet: ErrorHandler
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4 % Downloaded Error Break-page handler
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5 % Adapted from:
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 % PostScript Language Program Design,
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
7 % Adobe Systems Incorporated.
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8 % Appendix A, pages 217-219
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10 /ps$brkpage where{pop}
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11 {
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 /ps$brkpage 64 dict def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 ps$brkpage begin
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 /tx 0 def /ty 0 def /toy 0 def /tox 0 def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 /prnt{
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 dup type /stringtype ne{=string cvs}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 dup length 6 mul
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 /tx exch def /ty 10 def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 currentpoint /toy exch def /tox exch def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
20 1 setgray newpath
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
21 tox toy 2 sub moveto
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22 0 ty rlineto tx 0 rlineto
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23 0 ty neg rlineto
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
24 closepath fill
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
25 tox toy moveto 0 setgray show
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
26 }bind def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27 /nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28 /=={/cp 0 def typeprint nl}def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29 /typeprint{dup type dup currentdict exch known{exec}{unknowntype}ifelse}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 /lmargin 72 def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 /rmargin 72 def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 /tprint{
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 dup length cp add rmargin gt{nl /cp 0 def}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 dup length cp add /cp exch def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35 prnt
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 }readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37 /cvsprint{=string cvs tprint( )tprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38 /unknowntype{exch pop cvlit(??)tprint cvsprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39 /integertype{cvsprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40 /realtype{cvsprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 /booleantype{cvsprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42 /operatortype{(//)tprint cvsprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 /marktype{pop(-mark-)tprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 /dicttype{pop(-dictionary-)tprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 /nulltype{pop(-null-)tprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 /filetype{pop(-filestream-)tprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
47 /savetype{pop(-savelevel-)tprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
48 /fonttype{pop(-fontid-)tprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49 /nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
50 /stringtype{
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
51 dup rcheck
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
52 {(\()tprint tprint(\))tprint}
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
53 {pop(-string-)tprint}ifelse}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
54 /arraytype{
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
55 dup rcheck
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
56 {dup xcheck
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
57 {({)tprint{typeprint}forall(})tprint}
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
58 {([)tprint{typeprint}forall(])tprint}ifelse}
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
59 {pop(-array-)tprint}ifelse}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
60 /packedarraytype{
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
61 dup rcheck
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
62 {dup xcheck
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
63 {({)tprint{typeprint}forall(})tprint}
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
64 {([)tprint{typeprint}forall(])tprint}ifelse}
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
65 {pop(-packedarray-)tprint}ifelse}readonly def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
66 /courier /Courier findfont 10 scalefont def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
67 /OLDhandleerror errordict /handleerror get def
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
68 end %ps$brkpage
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
69
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
70 /handleerror{
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71 systemdict begin $error begin ps$brkpage begin
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72 newerror
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73 {/newerror false store vmstatus pop pop 0 ne{grestoreall}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 initgraphics
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 ErrorMessage 1 and 0 ne{ % print on paper
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 courier setfont lmargin 720 moveto
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77 (# ERROR: )prnt errorname prnt nl
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 (# OFFENDING COMMAND: )prnt /command load prnt
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79 $error /ostack known
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80 {nl nl(# STACK:)prnt nl nl $error /ostack get aload length{==}repeat}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
81 $error /errorinfo known
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
82 {nl nl(# ERRORINFO:)prnt nl nl $error /errorinfo get aload length{==}repeat}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
83 systemdict /showpage get exec}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
84 ErrorMessage 2 and 0 ne{ % send back to printing system
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 (\%\%[ Error: )print errorname =print
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
86 (; OffendingCommand: )print/command load =print
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
87 $error /errorinfo known
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
88 {(; ErrorInfo:)print $error /errorinfo get aload length{( )=print =print}repeat}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
89 ( ]\%\%)= flush
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
90 (\%\%[ Rest of job is ignored ]\%\%)= flush}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
91 /newerror true store}if
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92 end end end
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93 stop
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
94 } % handleerror
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
95 dup 0 systemdict put % replace name by actual dict object
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
96 dup 4 ps$brkpage put % replace name by dict object
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97 bind readonly
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99 errordict 3 1 roll put % put proc in errordict as /handleerror
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
100 }ifelse
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
101 %%EndProcSet
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
102
28764
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
103
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
104 % operators for language level 2 only
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
105
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
106 (<<)cvn where % << operator
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
107 {pop/BMark(<<)cvn load def}
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
108 {/BMark{mark}bind def}ifelse
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
109 (>>)cvn where % >> operator
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
110 {pop/EMark(>>)cvn load def}
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
111 {/EMark{counttomark 2 idiv dup dict begin{def}repeat pop currentdict end}bind def}ifelse
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
112 /setpagedevice where % setpagedevice
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
113 {pop}
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
114 {/setpagedevice{pop}bind def}ifelse
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
115 /packedarray where % packedarray
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
116 {pop}
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
117 {/packedarray{array astore readonly}bind def}ifelse
a94b3ce0fa8c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents: 28427
diff changeset
118
28155
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
119
28167
cb25a24ec3e1 Change /setduplexmode, /settumble, add /packedarray.
Gerd Moellmann <gerd@gnu.org>
parents: 28155
diff changeset
120 % device dependent operators
cb25a24ec3e1 Change /setduplexmode, /settumble, add /packedarray.
Gerd Moellmann <gerd@gnu.org>
parents: 28155
diff changeset
121
28427
15c0a66a4a8b Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28265
diff changeset
122 /DefOp{
15c0a66a4a8b Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28265
diff changeset
123 dup where{pop pop pop}
15c0a66a4a8b Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28265
diff changeset
124 {exch dup where{pop}{pop/pop}ifelse load def}ifelse}def
28155
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
125
28427
15c0a66a4a8b Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28265
diff changeset
126 /duplexmode /setduplexmode DefOp
15c0a66a4a8b Replace gs_languagelevel by languagelevel.
Gerd Moellmann <gerd@gnu.org>
parents: 28265
diff changeset
127 /tumble /settumble DefOp
28155
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
128
f568116325f9 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
129 % === END ps-print prologue 0