home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_enscript.idb / usr / freeware / share / enscript / edd.hdr.z / edd.hdr
Encoding:
Text File  |  1998-10-28  |  2.0 KB  |  76 lines

  1. %
  2. % `emacs.hdr' with file modification time and current time
  3. % Copyright (c) 1995, 1996, 1997 Markku Rossi.
  4. % Author: Markku Rossi <mtr@iki.fi>
  5. %
  6.  
  7. % This file is part of GNU enscript.
  8. %
  9. % This program is free software; you can redistribute it and/or modify
  10. % it under the terms of the GNU General Public License as published by
  11. % the Free Software Foundation; either version 2, or (at your option)
  12. % any later version.
  13. %
  14. % This program is distributed in the hope that it will be useful,
  15. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. % GNU General Public License for more details.
  18. %
  19. % You should have received a copy of the GNU General Public License
  20. % along with this program; see the file COPYING.  If not, write to
  21. % the Free Software Foundation, 59 Temple Place - Suite 330,
  22. % Boston, MA 02111-1307, USA.
  23. %
  24.  
  25. % -- code follows this line --
  26. %%DocumentNeededResources: font Helvetica
  27. %Format: fmodstr    $D{%a %b %d %H:%M:%S %Y}
  28. %Format: datestr    %D{%a %b %d %H:%M:%S %Y}
  29. %Format: pagenumstr    $V$%/$=
  30.  
  31. % Fonts.
  32. /Helvetica /HeaderFont-Bold MF
  33. /HeaderF /HeaderFont-Bold findfont 13 scalefont def
  34.  
  35. /Helvetica /HeaderFont-Large MF
  36. /HeaderLF /HeaderFont-Large findfont 13 1.3 mul scalefont def
  37.  
  38. /do_header {    % print emacs header
  39.   gsave
  40.     d_header_x d_header_y translate
  41.     0 setgray
  42.     .5 setlinewidth
  43.  
  44.     % black shadow
  45.     1 0 d_header_w 1 sub d_header_h 1 sub Box fill
  46.  
  47.     % gray box with black frames
  48.     0 1 d_header_w 1 sub d_header_h 1 sub Box
  49.     gsave
  50.       .9 setgray fill
  51.     grestore
  52.     stroke
  53.  
  54.     % texts
  55.  
  56.     /xmarg 5 def
  57.  
  58.     % Top line.
  59.     HeaderLF setfont
  60.     /y d_header_h 12 div d_header_h 2 div add def
  61.     xmarg y moveto fname show
  62.  
  63.     pagenumstr dup stringwidth pop
  64.     d_header_w exch sub 1 sub xmarg sub y moveto show
  65.  
  66.     % Bottom line
  67.     HeaderF setfont
  68.     /y d_header_h 6 div def
  69.     xmarg y moveto fmodstr show
  70.  
  71.     datestr dup stringwidth pop
  72.     d_header_w exch sub 1 sub xmarg sub y moveto show
  73.  
  74.   grestore
  75. } def
  76.