From ecde8587542f0beec802be78c8a2f74866e4ad57 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Jan 26 2007 12:37:28 +0000 Subject: wrap_header patch has been improved --- diff --git a/enscript-wrap_header.patch b/enscript-wrap_header.patch new file mode 100644 index 0000000..deebc8a --- /dev/null +++ b/enscript-wrap_header.patch @@ -0,0 +1,121 @@ +--- enscript-1.6.1/lib/simple.hdr.wrap_header 1997-03-03 09:00:08.000000000 +0100 ++++ enscript-1.6.1/lib/simple.hdr 2007-01-26 13:06:55.000000000 +0100 +@@ -1,50 +1,68 @@ +-% +-% Default simple header. +-% Copyright (c) 1995 Markku Rossi. +-% Author: Markku Rossi +-% +- +-% +-% 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 ++% ++% 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 ++ } { ++ fname length fmodstr length add pagenumstr length add d_header_w 6 idiv le{ ++ 5 0 moveto fname show ++ 45 0 rmoveto fmodstr show ++ 45 0 rmoveto pagenumstr show ++ } { ++ 5 0 moveto fmodstr show ++ 45 0 rmoveto pagenumstr show ++ fname length d_header_w 6 idiv idiv 1 add 10 mul 5 exch moveto ++ 1 1 fname length d_header_w 6 idiv idiv ++ { ++ dup fname exch 1 sub d_header_w 6 idiv mul d_header_w 6 idiv getinterval show ++ 5 exch 10 mul fname length d_header_w 6 idiv idiv 1 add 10 mul exch sub moveto ++ } for ++ 5 10 moveto ++ fname fname length d_header_w 6 idiv idiv d_header_w 6 idiv mul dup fname length exch sub getinterval show ++ }ifelse ++ }ifelse ++ ++ grestore ++} def diff --git a/enscript.spec b/enscript.spec index 7a0a48b..fe0d183 100644 --- a/enscript.spec +++ b/enscript.spec @@ -1,7 +1,7 @@ Summary: A plain ASCII to PostScript converter. Name: enscript Version: 1.6.4 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL Group: Applications/Publishing Source0: http://www.iki.fi/mtr/genscript/enscript-%{version}.tar.gz @@ -15,7 +15,7 @@ Patch3: enscript-1.6.1-locale.patch 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 +Patch8: enscript-wrap_header.patch URL: http://www.codento.com/people/mtr/genscript/ Prereq: /sbin/install-info BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -90,8 +90,11 @@ fi %changelog +* Fri Jan 26 2007 Adam Tkac 1.6.4-6 +- wrap_header patch has been improved + * Tue Dec 19 2006 Adam Tkac 1.6.4-5 -- fixed long-header patch (#202082) +- fixed long-header patch * Fri Sep 01 2006 Jitka Kudrnacova - 1.6.4-4 - enscript now wrapes long header instead of truncating