File: prolog.ps.in

package info (click to toggle)
plptools 1.0.13-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,496 kB
  • sloc: ansic: 17,622; sh: 12,838; cpp: 12,823; makefile: 650; yacc: 291; sed: 16
file content (277 lines) | stat: -rw-r--r-- 5,707 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
%%BeginResource: plpprint_prolog @VERSION@ 0
% $Id$
/bd{bind def}bind def
/ed{exch def}bd
/d{def}bd
/e{exch}bd
/twips{1440 div 72 mul}bd
/pixel{10 twips mul}bd
/ul false d
/st false d
/bg[0 0 0]d
/fg[0 0 0]d
/pen_st 0 d
/pen_th 0 d
/brush_st 0 d
/dofill false d
/parray 6 array d
/EpocEncoding ISOLatin1Encoding 256 array copy dup 128
[/Euro/.notdef/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
/circumflex/perthousand/Scaron/guilsinglleft/OE/.notdef/Zcaron/.notdef
/.notdef/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash
/emdash/tilde/trademark/scaron/guilsinglright/oe/.notdef/zcaron/ydieresis]
putinterval d
/dashes[[][1 2][3][1 2 3 2][1 2 1 2 3 2]]d
/s{
  pen_st 0 ne{
    dashes pen_st 1 sub get 0 setdash
    stroke
  }if
}bd
/bp1{begin 0 setgray}bd
/bp2{lineto s end}bd
/bps[
  {bp1 0 0 moveto 0 8 bp2}bind
  {bp1 0 0 moveto 8 8 bp2}bind
  {bp1 0 0 moveto 8 0 bp2}bind
  {bp1 0 8 moveto 8 0 bp2}bind
  {bp1 0 8 moveto 0 0 lineto 8 0 bp2}bind
  {bp1 0 0 moveto 8 8 lineto s 0 8 moveto 8 0 bp2}bind
]d
/ip{ % init patterns
  0 1 5{
    /i ed
    parray i
    <<
      /PatternType 1
      /PaintType 1
      /TilingType 2
      /BBox [0 0 8 8]
      /XStep 8
      /YStep 8
    >> dup/PaintProc bps i get put
    matrix makepattern put
  }for
}bd
/fs{ % fontvalue fs pointvalue
  1000 div 24 mul
}bd
/m{
  top e sub moveto
}bd
/l{
  top e sub lineto
}bd
/f{
  dofill{
    gsave
    fill
    grestore
    brush_st 2 gt{
      gsave
      parray brush_st 3 sub get setpattern
      fill
      grestore
      /DeviceRGB setcolorspace
      fg SC
    }if
  }if
}bd
/ef{
  dofill{
    gsave
    eofill
    grestore
    brush_st 2 gt{
      gsave
      parray brush_st 3 sub get setpattern
      eofill
      grestore
      /DeviceRGB setcolorspace
      fg SC
    }if
  }if
}bd
/UL{
  1 eq/ul ed
}bd
/ST{
  1 eq/st ed
}bd
/BG{ % r g b BG - (store background color)
  mark 4 1 roll ]/bg ed
}bd
/FG{ % r g b FG - (store foreground color)
  mark 4 1 roll ]/fg ed
}bd
/RC{ % - RC - (reset colors)
  0 BS
  0 0 0 FG
}bd
/SC{ % colorarray SC - (set stored color)
  dup 0 get 255 div e
  dup 1 get 255 div e
  2 get 255 div
  setrgbcolor
}bd
/F{
  findfont
  % reencode for ISOLatin1. (From redbook sec. 5.6.1) and add some
  % special symbols, resulting in an EPOC encoding
  dup length dict begin
    {
      1 index dup/FID ne{
        /CharStrings ne{
          d
        }{
          % must copy CharStrings dict to make it writeable
          dup length dict begin{def}forall
          % copy /Euro charstring from Symbol font
          /Euro /Symbol findfont /CharStrings get /Euro get def
          currentdict end d
        }ifelse
      }{
        pop pop pop
      }ifelse
    }forall
    % Replace encoding
    /Encoding EpocEncoding d
    currentdict
  end dup/FontName get 80 string cvs (-EPOCLatin15) concatstrings cvn
  e definefont
  % end of reencoding
  e twips scalefont setfont
}bd
/L{ % x1 y1 x2 y2 L - (draw line from x1,y1 to x2,y2)
  4 -1 roll twips 4 -1 roll twips m
  twips e twips e l fg SC s
}bd
/R{ % left top right bottom R - (draw rectangle)
  4 dict begin
    twips/y2 ed
    twips/x2 ed
    twips/y1 ed
    twips/x1 ed
    newpath
    x1 y1 m x2 y1 l x2 y2 l x1 y2 l closepath
    gsave bg SC f grestore fg SC s
  end
}bd
/E{ % ulx uly llx lly E - (draw ellipse)
  6 dict begin
    twips/lly ed
    twips/llx ed
    twips/uly ed
    twips/ulx ed
    /wx llx ulx sub d
    /wy lly uly sub d
    gsave
      newpath
      ulx wx 2 div add top uly sub wy 2 div sub translate
      1 wy wx div scale
      newpath wx 2 div 0 moveto
      0 0 wx 2 div 0 360 arc closepath
      gsave bg SC f grestore fg SC s
    grestore
  end
}bd
/P{ % pointarray eofill P - (draw polygon)
  5 dict begin
    /efmode ed
    /points ed
    0 2 points length 1 sub{
      /idx ed
      points idx get twips
      points idx 1 add get twips
      idx 0 eq{m}{l}ifelse
    }for
    gsave bg SC efmode{ef}{f}ifelse grestore fg SC s
  end
}bd
/T{ % string left bottom top right justify T - (draw text)
  6 dict begin
    /just ed
    twips/x2 ed
    twips/y2 ed
    twips/y1 ed
    twips/x1 ed
    dup stringwidth pop/sw ed
    just 0 gt{
      just 1 gt{x2 sw sub}{x2 x1 sub sw sub 2 div x1 add}ifelse
    }{x1}ifelse
    y1 m
    gsave
    ul{
      gsave
        currentfont/FontInfo known{
          currentfont/FontInfo get begin
            0 UnderlinePosition fs rmoveto
            UnderlineThickness fs setlinewidth
          end
        }{
          0 -10 rmoveto 0.5 setlinewidth
        }ifelse
        sw 0 rlineto s
	pen_th setlinewidth
      grestore
    }if
    st{
      gsave
        newpath 0 0 moveto (I) false charpath pathbbox
        e pop e sub e pop 2 div 0 e
      grestore
      gsave
        rmoveto
        sw 0 rlineto s
      grestore
    }if
    show
    grestore
  end
}bd
/I{
  7 dict begin
    /rows ed
    /cols ed
    twips/ury ed
    twips/urx ed
    twips/lly ed
    twips/llx ed
    /ibuf cols string d
    gsave
      llx top lly sub translate
      urx llx sub lly ury sub scale
      cols rows 8 [cols 0 0 rows neg 0 rows]
      {currentfile ibuf readhexstring pop}image
    grestore
  end
}bd
/TH{ % xwid ywid TH - (set pen thickness)
  pop pixel/pen_th ed
  pen_th setlinewidth
}bd
/DM{ % mode DM - (set drawing mode)
  pop
}bd
/PS{ % style PS - (set pen style)
  /pen_st ed
}bd
/BS{ % style BS - (set brush style)
  dup/brush_st ed
  0 ne/dofill ed
}bd
/CB{ % left top right bottom CB - (clipping bbox)
  4 dict begin
    twips/y2 ed
    twips/x2 ed
    twips/y1 ed
    twips/x1 ed
    newpath
    x1 y1 m x2 y1 l x2 y2 l x1 y2 l closepath clip
    newpath
  end
}bd
/CC{ % - CC - (restore clipping)
  initclip
}bd
%%EndResource