015c64
diff -up enscript-1.6.5.1/lib/simple.hdr.wrap_header enscript-1.6.5.1/lib/simple.hdr
015c64
--- enscript-1.6.5.1/lib/simple.hdr.wrap_header	2009-01-24 21:59:34.000000000 +0100
015c64
+++ enscript-1.6.5.1/lib/simple.hdr	2010-05-21 13:04:28.070346832 +0200
015c64
@@ -3,6 +3,10 @@
015c64
 % Copyright (c) 1995 Markku Rossi.
015c64
 % Author: Markku Rossi <mtr@iki.fi>
015c64
 %
015c64
+% Modified: Chris Josefy, USA, MAY 2006
015c64
+%  + Added line wrapping to header to work more like AIX enscript
015c64
+%  + This assumes that one does not change the header font size from the default
015c64
+%  + This also assumes that the line only wraps once
015c64
 
015c64
 %
015c64
 % This file is part of GNU Enscript.
015c64
@@ -24,6 +28,7 @@
015c64
 % -- code follows this line --
015c64
 %Format: fmodstr	$D{%a %b %d %H:%M:%S %Y}
015c64
 %Format: pagenumstr	$V$%
015c64
+%HeaderHeight: 44
015c64
 
015c64
 /do_header {	% print default simple header
015c64
   gsave
015c64
@@ -39,10 +44,23 @@
015c64
       d_header_w user_header_right_str stringwidth pop sub 5 sub
015c64
       0 moveto user_header_right_str show
015c64
     } {
015c64
-      5 0 moveto fname show
015c64
-      45 0 rmoveto fmodstr show
015c64
-      45 0 rmoveto pagenumstr show
015c64
-    } ifelse
015c64
+      fname length fmodstr length add pagenumstr length add 95 6 idiv add d_header_w 6 idiv le{
015c64
+        5 0 moveto fname show
015c64
+        45 0 rmoveto fmodstr show
015c64
+        45 0 rmoveto pagenumstr show
015c64
+      } {
015c64
+        5 0 moveto fmodstr show
015c64
+        45 0 rmoveto pagenumstr show
015c64
+        fname length d_header_w 6 idiv idiv 1 add 10 mul 5 exch moveto
015c64
+        1 1 fname length d_header_w 6 idiv idiv
015c64
+        {
015c64
+          dup fname exch 1 sub d_header_w 6 idiv mul d_header_w 6 idiv getinterval show
015c64
+          5 exch 10 mul fname length d_header_w 6 idiv idiv 1 add 10 mul exch sub moveto
015c64
+        } for
015c64
+        5 10 moveto
015c64
+        fname fname length d_header_w 6 idiv idiv d_header_w 6 idiv mul dup fname length exch sub getinterval show
015c64
+      }ifelse
015c64
+    }ifelse
015c64
 
015c64
   grestore
015c64
 } def