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 % This program 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 2, or (at your option)
15 % This program 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 this program; see the file COPYING. If not, write to
22 % the Free Software Foundation, 59 Temple Place - Suite 330,
23 % Boston, MA 02111-1307, USA.
26 % -- code follows this line --
28 %Format: datestr %D{%d/%m/%y %Hh%M}
29 %Format: pagestr $%/$=
35 /Helvetica-BoldOblique /helvetica-encoded MF
36 /SmallFont /helvetica-encoded findfont 10 scalefont def
37 /BigFont /helvetica-encoded findfont 16 scalefont def
39 /RBox { % x y w h r -> -
47 x y h add x w add y h add r arcto 4 {pop} repeat
48 x w add y h add x w add y r arcto 4 {pop} repeat
49 x w add y x y r arcto 4 {pop} repeat
50 x y x y h add r arcto 4 {pop} repeat
56 /do_header { % print mp header
61 d_footer_x d_footer_y d_footer_w 40 radius RBox
68 ftail dup stringwidth pop d_footer_w exch sub 2 div
69 d_footer_y 14 add moveto show
72 d_header_x d_header_y 8 add d_header_w 65 sub 40 radius RBox
79 datestr dup stringwidth pop d_header_x d_header_w 75 sub add exch sub
80 d_header_y 22 add moveto show
82 d_header_x 10 add d_header_y 22 add moveto (printed by: ) show
86 d_header_x d_header_w add 60 sub d_header_y 8 add 60 40 radius RBox
90 (Page) dup stringwidth pop 60 exch sub 2 div
91 d_header_x d_header_w add 60 sub add d_header_y 33 add moveto show
94 pagestr dup stringwidth pop 60 exch sub 2 div
95 d_header_x d_header_w add 60 sub add d_header_y 13 add moveto show