2 % OPENWINDOWS' mp header
3 % Copyright (c) 1996 Markku Rossi.
4 % Author: Markku Rossi <mtr@iki.fi>
8 % This file is part of GNU Enscript.
10 % Enscript is free software: you can redistribute it and/or modify
11 % it under the terms of the GNU General Public License as published by
12 % the Free Software Foundation, either version 3 of the License, or
13 % (at your option) any later version.
15 % Enscript is distributed in the hope that it will be useful,
16 % but WITHOUT ANY WARRANTY; without even the implied warranty of
17 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 % GNU General Public License for more details.
20 % You should have received a copy of the GNU General Public License
21 % along with Enscript. If not, see <http://www.gnu.org/licenses/>.
24 % -- code follows this line --
26 %Format: datestr %D{%d/%m/%y %Hh%M}
27 %Format: pagestr $%/$=
33 /Helvetica-BoldOblique /helvetica-encoded MF
34 /SmallFont /helvetica-encoded findfont 10 scalefont def
35 /BigFont /helvetica-encoded findfont 16 scalefont def
37 /RBox { % x y w h r -> -
45 x y h add x w add y h add r arcto 4 {pop} repeat
46 x w add y h add x w add y r arcto 4 {pop} repeat
47 x w add y x y r arcto 4 {pop} repeat
48 x y x y h add r arcto 4 {pop} repeat
54 /do_header { % print mp header
59 d_footer_x d_footer_y d_footer_w 40 radius RBox
66 ftail dup stringwidth pop d_footer_w exch sub 2 div
67 d_footer_y 14 add moveto show
70 d_header_x d_header_y 8 add d_header_w 65 sub 40 radius RBox
77 datestr dup stringwidth pop d_header_x d_header_w 75 sub add exch sub
78 d_header_y 22 add moveto show
80 d_header_x 10 add d_header_y 22 add moveto (printed by: ) show
84 d_header_x d_header_w add 60 sub d_header_y 8 add 60 40 radius RBox
88 (Page) dup stringwidth pop 60 exch sub 2 div
89 d_header_x d_header_w add 60 sub add d_header_y 33 add moveto show
92 pagestr dup stringwidth pop 60 exch sub 2 div
93 d_header_x d_header_w add 60 sub add d_header_y 13 add moveto show