Subject: pkg/36612: print/enscript: mail highlighting broken (patch supplied)
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <j+nbsd@2007.salmi.ch>
List: pkgsrc-bugs
Date: 07/07/2007 10:20:00
>Number:         36612
>Category:       pkg
>Synopsis:       print/enscript: mail highlighting broken (patch supplied)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 07 10:20:00 +0000 2007
>Originator:     Jukka Salmi
>Release:        HEAD pkgsrc
>Environment:
System: NetBSD moray.salmi.ch 4.99.22 NetBSD 4.99.22 (MORAY.APM) #0: Sun Jul 1 21:35:18 CEST 2007 build@moray.salmi.ch:/b/build/nbsd/c/i386/sys/arch/i386/compile/MORAY.APM i386
Architecture: i386
Machine: i386
>Description:
Enscript doesn't highlight folded header lines (see RFC 2822, 2.2.3
and 3.2.3) in email messages correctly.

>How-To-Repeat:
Run `enscript -E' on this message:

--- cut here ---
From: Me <me>
Date: Sat, 07 Jul 2007 11:54:02 +0200
Subject: enscript highlighting test
To: You <you>,
        Hime <him>,
        Her <her>

Doesn't work as expected: does it?
--- cut here ---

The second and third recipients will be highlighted as if they were
header names, and the body line will be highlighted as if it was a
header line.

>Fix:
Index: print/enscript/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/enscript/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- print/enscript/distinfo	6 Apr 2006 16:16:38 -0000	1.6
+++ print/enscript/distinfo	7 Jul 2007 09:45:42 -0000
@@ -5,5 +5,6 @@ RMD160 (enscript-1.6.3.tar.gz) = 7aafd03
 Size (enscript-1.6.3.tar.gz) = 814308 bytes
 SHA1 (patch-aa) = 4f958c8e2b01cf6934beebe249f1f67da2fb3f11
 SHA1 (patch-ab) = 13885dbd3aa0d0e90f8aa07640c4d917d7feaf13
+SHA1 (patch-ac) = ab1ac300ffe7cdf37ad788239ec10d5679419aa9
 SHA1 (patch-ad) = b2f12cc6875289978194315927ccbc8e963476a2
 SHA1 (patch-ae) = 9a3209196eea1c6ed1f07f39fb7b4f1c35cdb850
--- /dev/null	2007-07-07 11:44:46.000000000 +0200
+++ print/enscript/patches/patch-ac	2007-07-07 11:43:30.000000000 +0200
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- states/hl/mail.st.orig	2003-03-05 08:26:33.000000000 +0100
++++ states/hl/mail.st	2007-07-05 09:08:04.000000000 +0200
+@@ -27,7 +27,7 @@ state mail_header extends Highlight
+   END {
+     comment_face (true);
+   }
+-  /:/ {
++  /(:|^[ \t])/ {
+     language_print ($0);
+     return;
+   }