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