rpms/enscript/FC-5 enscript-1.6.4-wrap_header.patch, NONE, 1.1 enscript.spec, 1.30, 1.31

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Sep 1 08:46:13 UTC 2006


Author: jkudrnac

Update of /cvs/dist/rpms/enscript/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv27425

Modified Files:
	enscript.spec 
Added Files:
	enscript-1.6.4-wrap_header.patch 
Log Message:
* Fri Aug 01 2006 Jitka Kudrnacova <jkudrnac at redhat.com> - 1.6.4-3
- enscript now wrapes long header instead of truncating



enscript-1.6.4-wrap_header.patch:
 simple.hdr |  122 ++++++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 72 insertions(+), 50 deletions(-)

--- NEW FILE enscript-1.6.4-wrap_header.patch ---
--- enscript-1.6.4/lib/simple.hdr.wrap_header	2006-09-01 10:41:06.000000000 +0200
+++ enscript-1.6.4/lib/simple.hdr	2006-09-01 10:38:16.000000000 +0200
@@ -1,50 +1,72 @@
-% 
-% Default simple header.
-% Copyright (c) 1995 Markku Rossi.
-% Author: Markku Rossi <mtr at iki.fi>
-%
-
-%
-% This file is part of GNU enscript.
-% 
-% This program is free software; you can redistribute it and/or modify
-% it under the terms of the GNU General Public License as published by
-% the Free Software Foundation; either version 2, or (at your option)
-% any later version.
-%
-% This program is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-% GNU General Public License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with this program; see the file COPYING.  If not, write to
-% the Free Software Foundation, 59 Temple Place - Suite 330,
-% Boston, MA 02111-1307, USA.
-%
-
-% -- code follows this line --
-%Format: fmodstr	$D{%a %b %d %H:%M:%S %Y}
-%Format: pagenumstr	$V$%
-
-/do_header {	% print default simple header
-  gsave
-    d_header_x d_header_y HFpt_h 3 div add translate
-
-    HF setfont
-    user_header_p {
-      5 0 moveto user_header_left_str show
-
-      d_header_w user_header_center_str stringwidth pop sub 2 div
-      0 moveto user_header_center_str show
-
-      d_header_w user_header_right_str stringwidth pop sub 5 sub
-      0 moveto user_header_right_str show
-    } {
-      5 0 moveto fname show
-      45 0 rmoveto fmodstr show
-      45 0 rmoveto pagenumstr show
-    } ifelse
-
-  grestore
-} def
+% 
+% Default simple header.
+% Copyright (c) 1995 Markku Rossi.
+% Author: Markku Rossi <mtr at iki.fi>
+%
+% Modified: Chris Josefy, USA, MAY 2006
+%  + Added line wrapping to header to work more like AIX enscript
+%  + This assumes that one does not change the header font size from the default
+%  + This also assumes that the line only wraps once
+
+%
+% This file is part of GNU enscript.
+% 
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2, or (at your option)
+% any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; see the file COPYING.  If not, write to
+% the Free Software Foundation, 59 Temple Place - Suite 330,
+% Boston, MA 02111-1307, USA.
+%
+
+% -- code follows this line --
+%Format: fmodstr	$D{%a %b %d %H:%M:%S %Y}
+%Format: pagenumstr	$V$%
+%HeaderHeight: 44
+
+/do_header {	% print default simple header
+  gsave
+    d_header_x d_header_y HFpt_h 3 div add translate
+
+    HF setfont
+    user_header_p {
+      5 0 moveto user_header_left_str show
+
+      d_header_w user_header_center_str stringwidth pop sub 2 div
+      0 moveto user_header_center_str show
+
+      d_header_w user_header_right_str stringwidth pop sub 5 sub
+      0 moveto user_header_right_str show
+    } {
+      
+      d_header_w fname stringwidth pop lt 
+      {
+        5 10 moveto fname 0 d_header_w 6 idiv getinterval show
+        5 0 moveto fname d_header_w 6 idiv dup neg fname length add getinterval show
+        45 0 rmoveto fmodstr show
+        45 0 rmoveto pagenumstr show
+      }
+      {
+	5 10 moveto fname show
+        d_header_w fname stringwidth pop fmodstr stringwidth pop add 45 add lt
+        {
+          5 0 moveto fmodstr show
+          45 0 rmoveto pagenumstr show
+        }
+        {
+          45 10 rmoveto fmodstr show
+          45 10 rmoveto pagenumstr show
+        } ifelse
+      } ifelse
+    } ifelse
+
+  grestore
+} def


Index: enscript.spec
===================================================================
RCS file: /cvs/dist/rpms/enscript/FC-5/enscript.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- enscript.spec	17 Feb 2006 15:50:15 -0000	1.30
+++ enscript.spec	1 Sep 2006 08:46:11 -0000	1.31
@@ -1,7 +1,7 @@
 Summary: A plain ASCII to PostScript converter.
 Name: enscript
 Version: 1.6.4
-Release: 2
+Release: 3%{?dist}
 License: GPL
 Group: Applications/Publishing
 Source0: http://www.iki.fi/mtr/genscript/enscript-%{version}.tar.gz
@@ -15,6 +15,7 @@
 Patch4: enscript-doublefree.patch
 Patch6: enscript-1.6.1-CAN-2004-1185.patch
 Patch7: enscript-1.6.1-CAN-2004-1186.patch
+Patch8: enscript-1.6.4-wrap_header.patch
 URL: http://www.codento.com/people/mtr/genscript/
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 Obsoletes: nenscript
@@ -34,6 +35,7 @@
 %patch4 -p1 -b .doublefree
 %patch6 -p1 -b .CAN-2004-1185
 %patch7 -p1 -b .CAN-2004-1186
+%patch8 -p1 -b .wrap_header
 %{__tar} -C states/hl -zxf %{SOURCE1} ruby.st
 install -pm 644 %{SOURCE2} states/hl/php.st
 
@@ -87,7 +89,10 @@
 
 
 %changelog
-*Fri Feb 17 2006 Jitka Kudrnacova <jkudrnac at redhat.com> 1.6.4-2
+* Fri Aug 01 2006 Jitka Kudrnacova <jkudrnac at redhat.com> - 1.6.4-3
+- enscript now wrapes long header instead of truncating
+
+* Fri Feb 17 2006 Jitka Kudrnacova <jkudrnac at redhat.com> - 1.6.4-2
 - added new highlighters (#177336)
 
 * Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 1.6.4-1.1.2




More information about the fedora-cvs-commits mailing list