Imported Upstream version 1.98 upstream/1.98
authorGerfried Fuchs <rhonda@debian.at>
Wed, 17 Feb 2010 19:24:07 +0000 (20:24 +0100)
committerGerfried Fuchs <rhonda@debian.at>
Wed, 17 Feb 2010 19:24:07 +0000 (20:24 +0100)
ChangeLog
TODO
contrib/README.patches
contrib/t-prot-r1.220-mutt157.diff [deleted file]
contrib/t-prot-r1.222-gpg126.diff [deleted file]
contrib/t-prot-r1.225-mutt157.diff [new file with mode: 0644]
contrib/t-prot-r1.227-gpg126.diff [new file with mode: 0644]
t-prot
t-prot.1

index afef141aca9220b0a6f5e8e27705c046c35a41c4..490681d4e82b9cfca2851323183f687c40a5c5ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+2005-03-01 15:20  Jochen Striepe
+
+       * t-prot: Release as v1.98.
+
+2005-03-01 15:20  Jochen Striepe
+
+       * t-prot: Gerfried Fuchs pointed out that some locale maintainers
+       might avoid quote signs, so we check for "%" too when extracting
+       some locale strings. This still is not *really* bullet-proof,
+       because e.g. the percent sign might be protected by an escape. This
+       possibility should be quite unlikely, though, so we stick with it
+       for now.
+
+2005-02-24 23:34  Jochen Striepe
+
+       * t-prot.1: Fix broken URL -- the Learn To Edit Messages Howto is
+       no longer available at Sven Gucke's old site.
+
+2005-02-24 22:45  Jochen Striepe
+
+       * t-prot: Make esc() superfluous, use \Q and \E instead. Thanks to
+       Gerfried Fuchs.
+
+2005-02-23 13:07  Jochen Striepe
+
+       * t-prot.1: Remove misleading information about locale names.
+
+2005-02-23 12:39  Jochen Striepe
+
+       * t-prot: Release as v1.97.
+
+2005-02-23 12:38  Jochen Striepe
+
+       * t-prot: Fix French (and probably many other) locales extraction.
+       Many thanks to Philippe Berini and Gerfried Fuchs who helped a
+       great deal with the bug hunt.
+
+2005-02-14 15:02  Jochen Striepe
+
+       * t-prot.1: Remove unnecessary lines.
+
+2005-02-14 15:01  Jochen Striepe
+
+       * t-prot.1: Fix copyright time stamp.
+
 2005-02-14 14:19  Jochen Striepe
 
        * t-prot: Release as v1.96.
diff --git a/TODO b/TODO
index 73a5f44cfea7c79f6c0ce310c00a4a421511a999..321512fc7375017ed8f302c094bcb0b90917be6b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -13,7 +13,7 @@ Known Bugs (more severe ones come first)
 ========================================
     * In raw multipart messages we snip MS-like TOFU even if there
 is no relevant text above -- we will have to detect Boundaries and
-Content-Type lines as for "$mua eq mutt" in t-prot, l.1142.
+Content-Type lines as for "$mua eq mutt" in t-prot, l.671.
 
 
 Wishlist
index 9710a460716a07ea4c8a47db77abf9b5c73cb846..7154cd90981c199d290cff6e08275f64bc1dce92 100644 (file)
@@ -30,12 +30,13 @@ t-prot-*-mutt15*.diff and t-prot-*-gpg1*.diff
 You want to be on the bleeding edge, using a developer version of mutt?
 Your distribution provides just an outdated version of gnupg?
 
-No problem, these patches add the locales needed for them working
+No problem, these patches add the locales needed for them to work
 smoothly. Please send a bug report if there are some great new
 features in the new mutt or gnupg which break anything inside t-prot.
 
-Please note that this patch will most likely be applied by the t-prot
-package maintainer of your distribution, e.g. Debian Testing/Unstable.
+Please note that this patches will most likely be applied by the t-prot
+package maintainer(s) of your distribution (if the distribution makes
+use of said mutt and gnupg versions), e.g. Debian Testing/Unstable.
 
 
 OBSOLETE PATCHES
diff --git a/contrib/t-prot-r1.220-mutt157.diff b/contrib/t-prot-r1.220-mutt157.diff
deleted file mode 100644 (file)
index 46133c6..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
---- t-prot     Mon Feb 14 14:29:31 2005
-+++ t-prot-M157        Fri Feb 11 13:53:28 2005
-@@ -32,7 +32,7 @@
-     $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned
-     $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted
--    $mutt_pgpoutstart $mutt_pgpoutend
-+    $mutt_pgpoutstart $mutt_pgpoutend $mutt_ssloutstart $mutt_ssloutend
- );
-@@ -69,6 +69,8 @@
- $mutt_pgpencrypted      = '[-- End of PGP/MIME encrypted data --]';
- $mutt_pgpoutstart       = '[-- PGP output follows (current time:';
- $mutt_pgpoutend         = '[-- End of PGP output --]';
-+$mutt_ssloutstart       = '[-- OpenSSL output follows';
-+$mutt_ssloutend         = '[-- End of OpenSSL output --]';
- # set the defaults to the C locale
- $gpg_WARNING            = 'WARNING: ';
-@@ -332,7 +334,7 @@
-     for (my $x=0; $x<scalar(@$L); $x++) {
-         if ($$V[$x]) { next; }
--        if ($$L[$x]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutstart)/o)
-+        if ($$L[$x]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutstart|$mutt_ssloutstart)/o)
-         {
-             my $from;
-             for (my $m=0; $m<scalar(@$H); $m++) {
-@@ -358,7 +360,7 @@
-                     splice(@$V, $i, 1);
-                     $i--;
-                 }
--                elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutend)/o)
-+                elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutend|$mutt_ssloutend)/o)
-                 {
-                     if ($pgpmove ||
-                         ($pgpmovevrf && (!$sigint) && verified($L, $x+1, $i)))
-@@ -653,7 +655,7 @@
-                     'Forwarded message',
-                     'Weitergeleitete Nachricht / Forwarded Message');
-         my $k = 0;    # any text above?
--        my $tmp = 0;  # flagged if inside PGP output
-+        my $tmp = 0;  # flagged if inside PGP or SSL output
-         DONE: for ($x=0; $x<scalar(@$lines); $x++) { 
-             if (!$vrb[$x]) {
-@@ -674,7 +676,8 @@
-                     ((!$spass) || $$lines[$x]!~/^$spass_prefix/o))
-                 {
-                     if ($mua eq 'mutt' && (!$tmp) &&
--                        $$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_pgpoutstart)/o) {
-+                        ($$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_pgpoutstart)/o ||
-+                         $$lines[$x] !~ /^(?:\e.+?\a)?(?:$mutt_ssloutstart)/o)) {
-                         $tmp = 1; 
-                     } elsif ($mua eq 'mutt' && $tmp && 
-                         ($$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_beginsigned)/o ||
-@@ -940,8 +943,8 @@
-                 Locale::gettext::gettext("[-- Type: %s/%s, Encoding: %s, Size: %s --]\n") =~
-                 m/^([^%]*)/o;
-             ($mutt_pgpsigned) =
--                Locale::gettext::gettext("[-- End of signed data --]\n")  =~
--                m/^(.*?)\n/mo;
-+                Locale::gettext::gettext("\n[-- End of signed data --]\n")  =~
-+                m/^\n*(.*?)\n/mo;
-             ($mutt_beginsigned) =
-                 Locale::gettext::gettext("[-- The following data is signed --]\n\n") =~
-                 m/^(.*?)\n/mo;
-@@ -949,16 +952,24 @@
-                 Locale::gettext::gettext("[-- END PGP SIGNED MESSAGE --]\n") =~
-                 m/^(.*?)\n/mo;
-             ($mutt_pgpclearsigstart) =
--                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n") =~
-+                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n\n") =~
-                 m/^(.*?)\n/mo;
-             ($mutt_pgpencrypted) =
-                 Locale::gettext::gettext("[-- End of PGP/MIME encrypted data --]\n") =~
-                 m/^(.*?)\n/mo;
-             ($mutt_pgpoutstart) =
--                Locale::gettext::gettext("[-- PGP output follows (current time: %c) --]\n") =~
--                m/^([^%]*)/o;
-+                Locale::gettext::gettext("[-- %s output follows%s --]\n") =~
-+                m/^(.*)%s/o;
-+            $mutt_pgpoutstart =~ s/%s/PGP/;
-             ($mutt_pgpoutend) =
--                Locale::gettext::gettext("[-- End of PGP output --]\n") =~
-+                Locale::gettext::gettext("[-- End of PGP output --]\n\n") =~
-+                m/^(.*?)\n/mo;
-+            ($mutt_ssloutstart) =
-+                Locale::gettext::gettext("[-- %s output follows%s --]\n") =~
-+                m/^(.*)%s/o;
-+            $mutt_ssloutstart =~ s/%s/OpenSSL/;
-+            ($mutt_ssloutend) =
-+                Locale::gettext::gettext("[-- End of OpenSSL output --]\n\n") =~
-                 m/^(.*?)\n/mo;
-             Locale::gettext::textdomain('gnupg');
-@@ -998,6 +1009,8 @@
-     esc(\$mutt_pgpencrypted);
-     esc(\$mutt_pgpoutstart);
-     esc(\$mutt_pgpoutend);
-+    esc(\$mutt_ssloutstart);
-+    esc(\$mutt_ssloutend);
-     esc(\$gpg_WARNING);
-     esc(\$gpg_Warning);
diff --git a/contrib/t-prot-r1.222-gpg126.diff b/contrib/t-prot-r1.222-gpg126.diff
deleted file mode 100644 (file)
index 1d05254..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- t-prot     Mon Feb 14 15:17:19 2005
-+++ t-prot-G126        Mon Feb 14 15:15:30 2005
-@@ -972,16 +972,16 @@
-                 Locale::gettext::gettext("Can't check signature: %s\n") =~
-                 m/^([^%]*)/o;
-             ($gpg_aka) =
--                Locale::gettext::gettext((' 'x16).'aka "%s"') =~
-+                Locale::gettext::gettext((' 'x16).'aka "') =~
-                 m/^(.*?)"/o;
-             ($gpg_bad) =
--                Locale::gettext::gettext('BAD signature from "%s"') =~
-+                Locale::gettext::gettext('BAD signature from "') =~
-                 m/^(.*?)"/o;
-             ($gpg_expired) =
-                 Locale::gettext::gettext("Note: This key has expired!\n") =~
-                 m/^(.*?)\n/mo;
-             ($gpg_good) =
--                Locale::gettext::gettext('Good signature from "%s"') =~
-+                Locale::gettext::gettext('Good signature from "') =~
-                 m/^(.*?)"/o;
-             ($gpg_bug) =
-                 Locale::gettext::gettext("... this is a bug (%s:%d:%s)\n") =~
diff --git a/contrib/t-prot-r1.225-mutt157.diff b/contrib/t-prot-r1.225-mutt157.diff
new file mode 100644 (file)
index 0000000..20c5a3e
--- /dev/null
@@ -0,0 +1,97 @@
+--- t-prot     Thu Feb 24 23:31:55 2005
++++ t-prot-M157        Thu Feb 24 23:41:45 2005
+@@ -32,7 +32,7 @@
+     $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned
+     $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted
+-    $mutt_pgpoutstart $mutt_pgpoutend
++    $mutt_pgpoutstart $mutt_pgpoutend $mutt_ssloutstart $mutt_ssloutend
+ );
+@@ -69,6 +69,8 @@
+ $mutt_pgpencrypted      = '[-- End of PGP/MIME encrypted data --]';
+ $mutt_pgpoutstart       = '[-- PGP output follows (current time:';
+ $mutt_pgpoutend         = '[-- End of PGP output --]';
++$mutt_ssloutstart       = '[-- OpenSSL output follows';
++$mutt_ssloutend         = '[-- End of OpenSSL output --]';
+ # set the defaults to the C locale
+ $gpg_WARNING            = 'WARNING: ';
+@@ -329,7 +331,7 @@
+     for (my $x=0; $x<scalar(@$L); $x++) {
+         if ($$V[$x]) { next; }
+-        if ($$L[$x]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutstart\E)/o)
++        if ($$L[$x]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutstart\E|\Q$mutt_ssloutstart\E)/o)
+         {
+             my $from;
+             for (my $m=0; $m<scalar(@$H); $m++) {
+@@ -354,7 +356,7 @@
+                     splice(@$V, $i, 1);
+                     $i--;
+                 }
+-                elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutend\E)/o)
++                elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutend\E|\Q$mutt_ssloutend\E)/o)
+                 {
+                     if ($pgpmove ||
+                         ($pgpmovevrf && (!$sigint) && verified($L, $x+1, $i)))
+@@ -649,7 +651,7 @@
+                     'Forwarded message',
+                     'Weitergeleitete Nachricht / Forwarded Message');
+         my $k = 0;    # any text above?
+-        my $tmp = 0;  # flagged if inside PGP output
++        my $tmp = 0;  # flagged if inside PGP or SSL output
+         DONE: for ($x=0; $x<scalar(@$lines); $x++) { 
+             if (!$vrb[$x]) {
+@@ -670,7 +672,8 @@
+                     ((!$spass) || $$lines[$x]!~/^\Q$spass_prefix/o))
+                 {
+                     if ($mua eq 'mutt' && (!$tmp) &&
+-                        $$lines[$x] =~ /^(?:\e.+?\a)?(?:\Q$mutt_pgpoutstart\E)/o) {
++                        ($$lines[$x] =~ /^(?:\e.+?\a)?(?:\Q$mutt_pgpoutstart\E)/o ||
++                         $$lines[$x] !~ /^(?:\e.+?\a)?(?:\Q$mutt_ssloutstart\E)/o)) {
+                         $tmp = 1; 
+                     } elsif ($mua eq 'mutt' && $tmp && 
+                         ($$lines[$x] =~ /^(?:\e.+?\a)?(?:\Q$mutt_beginsigned\E)/o ||
+@@ -936,8 +939,8 @@
+                 Locale::gettext::gettext("[-- Type: %s/%s, Encoding: %s, Size: %s --]\n") =~
+                 m/^([^%]*)/o;
+             ($mutt_pgpsigned) =
+-                Locale::gettext::gettext("[-- End of signed data --]\n")  =~
+-                m/^(.*?)\n/mo;
++                Locale::gettext::gettext("\n[-- End of signed data --]\n")  =~
++                m/^\n*(.*?)\n/mo;
+             ($mutt_beginsigned) =
+                 Locale::gettext::gettext("[-- The following data is signed --]\n\n") =~
+                 m/^(.*?)\n/mo;
+@@ -945,16 +948,24 @@
+                 Locale::gettext::gettext("[-- END PGP SIGNED MESSAGE --]\n") =~
+                 m/^(.*?)\n/mo;
+             ($mutt_pgpclearsigstart) =
+-                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n") =~
++                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n\n") =~
+                 m/^(.*?)\n/mo;
+             ($mutt_pgpencrypted) =
+                 Locale::gettext::gettext("[-- End of PGP/MIME encrypted data --]\n") =~
+                 m/^(.*?)\n/mo;
+             ($mutt_pgpoutstart) =
+-                Locale::gettext::gettext("[-- PGP output follows (current time: %c) --]\n") =~
+-                m/^([^%]*)/o;
++                Locale::gettext::gettext("[-- %s output follows%s --]\n") =~
++                m/^(.*)%s/o;
++            $mutt_pgpoutstart =~ s/%s/PGP/;
+             ($mutt_pgpoutend) =
+-                Locale::gettext::gettext("[-- End of PGP output --]\n") =~
++                Locale::gettext::gettext("[-- End of PGP output --]\n\n") =~
++                m/^(.*?)\n/mo;
++            ($mutt_ssloutstart) =
++                Locale::gettext::gettext("[-- %s output follows%s --]\n") =~
++                m/^(.*)%s/o;
++            $mutt_ssloutstart =~ s/%s/OpenSSL/;
++            ($mutt_ssloutend) =
++                Locale::gettext::gettext("[-- End of OpenSSL output --]\n\n") =~
+                 m/^(.*?)\n/mo;
+             Locale::gettext::textdomain('gnupg');
diff --git a/contrib/t-prot-r1.227-gpg126.diff b/contrib/t-prot-r1.227-gpg126.diff
new file mode 100644 (file)
index 0000000..7d1e6ab
--- /dev/null
@@ -0,0 +1,22 @@
+--- t-prot     Tue Mar  1 16:20:49 2005
++++ t-prot-G126        Tue Mar  1 16:21:49 2005
+@@ -968,16 +968,16 @@
+                 Locale::gettext::gettext("Can't check signature: %s\n") =~
+                 m/^([^%]*)/o;
+             ($gpg_aka) =
+-                Locale::gettext::gettext((' 'x16).'aka "%s"') =~
++                Locale::gettext::gettext((' 'x16).'aka "') =~
+                 m/^(.*?)["«%]/o;
+             ($gpg_bad) =
+-                Locale::gettext::gettext('BAD signature from "%s"') =~
++                Locale::gettext::gettext('BAD signature from "') =~
+                 m/^(.*?)["«%]/o;
+             ($gpg_expired) =
+                 Locale::gettext::gettext("Note: This key has expired!\n") =~
+                 m/^(.*?)\n/mo;
+             ($gpg_good) =
+-                Locale::gettext::gettext('Good signature from "%s"') =~
++                Locale::gettext::gettext('Good signature from "') =~
+                 m/^(.*?)["«%]/o;
+             ($gpg_bug) =
+                 Locale::gettext::gettext("... this is a bug (%s:%d:%s)\n") =~
diff --git a/t-prot b/t-prot
index 199daba5b45480da9bd5fd94ccbb04363b3a1d8d..446c0eb15c7e8151f668f69ebff319d676d16e40 100755 (executable)
--- a/t-prot
+++ b/t-prot
@@ -1,13 +1,13 @@
 #!/usr/bin/perl -w
-# $Id: t-prot,v 1.222 2005/02/14 14:19:14 jochen Exp $
+# $Id: t-prot,v 1.227 2005/03/01 15:20:49 jochen Exp $
 
 require 5.006;
 use strict;
 use Fcntl qw(O_EXCL O_WRONLY O_CREAT);
 use Getopt::Mixed qw(nextOption);
-use constant VER            => '1.96';
+use constant VER            => '1.98';
 use constant REV            => '';
-use constant REL            => q$Revision: 1.222 $=~m/(\d+(?:\.\d+)+)/;
+use constant REL            => q$Revision: 1.227 $=~m/(\d+(?:\.\d+)+)/;
 # MTA expecting mail on STDIN
 # (you might have to adjust this if using a different MTA)
 use constant SENDMAIL       => '/usr/sbin/sendmail -oi';
@@ -143,9 +143,6 @@ sub sigint_handler {
     $sigint = 1;
 }
 
-# esc(): escapes a scalar reference for use in perl regexp
-sub esc { ${$_[0]} =~ s/([\[\]\(\)\*\.\-\^\$\@])/\\$1/go; }
-
 # remove_footers(): remove any trailing appearance of footers contained
 # in the given directory.
 sub remove_footers {
@@ -310,11 +307,11 @@ sub pgp {
                my $ok = 0;
 
         while ($X<$Z) {
-            if ($$L[$X] =~ /^gpg:\s(?:$gpg_WARNING|$gpg_Warning|$gpg_bad|$gpg_Cantcheck|$gpg_expired)/o)
+            if ($$L[$X] =~ /^gpg:\s(?:\Q$gpg_WARNING\E|\Q$gpg_Warning\E|\Q$gpg_bad\E|\Q$gpg_Cantcheck\E|\Q$gpg_expired\E)/o)
                 { return 0; }
-            if ($$L[$X] =~ /^gpg:\s$gpg_bug/o)
+            if ($$L[$X] =~ /^gpg:\s\Q$gpg_bug/o)
                 { return 0; }
-            if ($$L[$X] =~ /^gpg:\s$gpg_good/o)
+            if ($$L[$X] =~ /^gpg:\s\Q$gpg_good/o)
                 { $ok = 1; }
             $X++;
         }
@@ -332,7 +329,7 @@ sub pgp {
     for (my $x=0; $x<scalar(@$L); $x++) {
         if ($$V[$x]) { next; }
 
-        if ($$L[$x]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutstart)/o)
+        if ($$L[$x]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutstart\E)/o)
         {
             my $from;
             for (my $m=0; $m<scalar(@$H); $m++) {
@@ -344,21 +341,20 @@ sub pgp {
                 }
             }
             ($from) = $from=~m/([a-z\d][a-z_\d\+-\.]*\@(?:[a-z_\d\+-\.]+\.)+[a-z]{2,})/i;
-            esc(\$from);
 
             my $uid = 1;
 
             for (my $i=$x+1; $i<scalar(@$L); $i++) {
-                if ($pgpshort && $$L[$i] =~ /^gpg:\s$gpg_aka/o) { $uid++; }
+                if ($pgpshort && $$L[$i] =~ /^gpg:\s\Q$gpg_aka/o) { $uid++; }
 
                 if ($pgpshort && $uid>1 &&
-                    $$L[$i] =~ /^gpg:\s$gpg_aka/o && $$L[$i] !~ /$from/)
+                    $$L[$i] =~ /^gpg:\s\Q$gpg_aka/o && $$L[$i] !~ /\Q$from/)
                 { 
                     splice(@$L, $i, 1);
                     splice(@$V, $i, 1);
                     $i--;
                 }
-                elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutend)/o)
+                elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutend\E)/o)
                 {
                     if ($pgpmove ||
                         ($pgpmovevrf && (!$sigint) && verified($L, $x+1, $i)))
@@ -374,7 +370,7 @@ sub pgp {
             }
         }
         elsif ($tmp &&
-            $$L[$x]=~/^(?:\e.+?\a)?(?:$mutt_pgpencrypted|$mutt_pgpclearsigned|$mutt_pgpsigned)/o)
+            $$L[$x]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpencrypted\E|\Q$mutt_pgpclearsigned\E|\Q$mutt_pgpsigned\E)/o)
         {
             splice(@$L, $x+1, 0, @{$tmp[$tmp]});
             for (my $i=$x; $i<scalar(@{$tmp[$tmp]}); $i++) {
@@ -546,11 +542,11 @@ sub process_msg {
             if ($vrb[$x]) { next; }
             # The following regexp's are quite ugly because for most users
             # these lines are coloured using termcap... (bah!)
-            if (($$lines[$x] =~ /^(?:\e.+?\a)?$mutt_attachment(\d+)(?::.*)? \-\-\]/o &&
+            if (($$lines[$x] =~ /^(?:\e.+?\a)?\Q$mutt_attachment\E(\d+)(?::.*)? \-\-\]/o &&
                     (($1 ne '1') ||
                     ($x<$#$lines &&
-                        $$lines[$x+1] !~ /^(?:\e.+?\a)?(?:$mutt_contenttype)(?:text\/plain|application\/pgp)/io))) ||
-                ($$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_pgpsigned|$mutt_pgpclearsigned|$mutt_pgpencrypted)/o))
+                        $$lines[$x+1] !~ /^(?:\e.+?\a)?(?:\Q$mutt_contenttype\E)(?:text\/plain|application\/pgp)/io))) ||
+                ($$lines[$x] =~ /^(?:\e.+?\a)?(?:\Q$mutt_pgpsigned\E|\Q$mutt_pgpclearsigned\E|\Q$mutt_pgpencrypted\E)/o))
             { 
                 # Strip attachments to prepare further processing
                 unshift(@att, @$lines[$x..$#$lines]);
@@ -583,8 +579,8 @@ sub process_msg {
                 # situations.
                 # The following regexp is quite ugly because for most
                 # users the line is coloured using termcap... (bah!)
-                if ($att[$x]=~/^(?:\e.+?\a)?$mutt_attachment\d+.* --\]/o &&
-                    $att[$x+1] =~ /^(?:\e.+?\a)?(?:$mutt_contenttype)message\/rfc822/o)
+                if ($att[$x]=~/^(?:\e.+?\a)?\Q$mutt_attachment\E\d+.* --\]/o &&
+                    $att[$x+1] =~ /^(?:\e.+?\a)?(?:\Q$mutt_contenttype\E)message\/rfc822/o)
                 {
                     $x += 2;
                     while ($att[$x] !~ /^\s*$/) { $x++; }
@@ -669,16 +665,16 @@ sub process_msg {
                 if ((!$k) && $$lines[$x] !~ /^\s*$/o &&
                     ((!$mua) ||
                      ($mua eq 'mutt' &&
-                         $$lines[$x] !~ /^(?:\e.+?\a)?(?:$mutt_attachment)/o &&
-                         $$lines[$x] !~ /^(?:\e.+?\a)?(?:$mutt_contenttype)/o)) &&
-                    ((!$spass) || $$lines[$x]!~/^$spass_prefix/o))
+                         $$lines[$x] !~ /^(?:\e.+?\a)?(?:\Q$mutt_attachment\E)/o &&
+                         $$lines[$x] !~ /^(?:\e.+?\a)?(?:\Q$mutt_contenttype\E)/o)) &&
+                    ((!$spass) || $$lines[$x]!~/^\Q$spass_prefix/o))
                 {
                     if ($mua eq 'mutt' && (!$tmp) &&
-                        $$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_pgpoutstart)/o) {
+                        $$lines[$x] =~ /^(?:\e.+?\a)?(?:\Q$mutt_pgpoutstart\E)/o) {
                         $tmp = 1; 
                     } elsif ($mua eq 'mutt' && $tmp && 
-                        ($$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_beginsigned)/o ||
-                         $$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_pgpclearsigstart)/o)) {
+                        ($$lines[$x] =~ /^(?:\e.+?\a)?(?:\Q$mutt_beginsigned\E)/o ||
+                         $$lines[$x] =~ /^(?:\e.+?\a)?(?:\Q$mutt_pgpclearsigstart\E)/o)) {
                         $tmp = 0;
                     } elsif (!$tmp) {
                         $k = 1;
@@ -696,7 +692,7 @@ sub process_msg {
             my $p = 0;    # levels of pgp signed parts
 
             for (my $i=$x+1; $i<scalar(@$lines); $i++) {
-                if ($$lines[$i] =~ /^(?:\e.+?\a)?(?:$mutt_pgpclearsigstart)/o) {
+                if ($$lines[$i] =~ /^(?:\e.+?\a)?(?:\Q$mutt_pgpclearsigstart\E)/o) {
                     $p++;
                 }
             }
@@ -706,7 +702,7 @@ sub process_msg {
                         splice(@att, 0, $i);
                         unshift(@att, "\n");
                         goto CLEAN;
-                    } elsif ($att[$i] =~ /^(?:\e.+?\a)?(?:$mutt_pgpclearsigned)/o) {
+                    } elsif ($att[$i] =~ /^(?:\e.+?\a)?(?:\Q$mutt_pgpclearsigned\E)/o) {
                         splice(@att, 0, $i+1);
                         $p--;
                         goto STAIRS;
@@ -973,47 +969,27 @@ if ($mua eq 'mutt') {
                 m/^([^%]*)/o;
             ($gpg_aka) =
                 Locale::gettext::gettext((' 'x16).'aka "%s"') =~
-                m/^(.*?)"/o;
+                m/^(.*?)["«%]/o;
             ($gpg_bad) =
                 Locale::gettext::gettext('BAD signature from "%s"') =~
-                m/^(.*?)"/o;
+                m/^(.*?)["«%]/o;
             ($gpg_expired) =
                 Locale::gettext::gettext("Note: This key has expired!\n") =~
                 m/^(.*?)\n/mo;
             ($gpg_good) =
                 Locale::gettext::gettext('Good signature from "%s"') =~
-                m/^(.*?)"/o;
+                m/^(.*?)["«%]/o;
             ($gpg_bug) =
                 Locale::gettext::gettext("... this is a bug (%s:%d:%s)\n") =~
                 m/^([^%]*)/o;
         }
     }
 
-    esc(\$mutt_attachment);
-    esc(\$mutt_contenttype);
-    esc(\$mutt_pgpsigned);
-    esc(\$mutt_beginsigned);
-    esc(\$mutt_pgpclearsigned);
-    esc(\$mutt_pgpclearsigstart);
-    esc(\$mutt_pgpencrypted);
-    esc(\$mutt_pgpoutstart);
-    esc(\$mutt_pgpoutend);
-
-    esc(\$gpg_WARNING);
-    esc(\$gpg_Warning);
-    esc(\$gpg_Cantcheck);
-    esc(\$gpg_aka);
-    esc(\$gpg_bad);
-    esc(\$gpg_expired);
-    esc(\$gpg_good);
-    esc(\$gpg_bug);
 }
 else {
     if ($ms_smart || $pgpshort || $pgpmove || $pgpmovevrf) { help(); }
 }
 
-esc(\$spass_prefix);
-
 
 # Read message:
 if (!open(IN, $ifile)) { print STDERR "Could not open $ifile: $!\n"; exit(EX_IOERR); }
index b4bc79142d39bbf9784c8bb08eb1ce14059f8d43..af5ec539217ac862c7f9149cd76ff139e9dae30c 100644 (file)
--- a/t-prot.1
+++ b/t-prot.1
@@ -1,7 +1,4 @@
-.\" Copyright Jochen Striepe <t-prot@tolot.escape.de>, 2001-2004.
-.\" License see below.
-.\" 
-.\" $Id: t-prot.1,v 1.93 2005/02/14 13:26:36 jochen Exp $
+.\" $Id: t-prot.1,v 1.97 2005/02/24 23:34:29 jochen Exp $
 .\"
 .TH T-PROT "1" "Feb 2005" "T-PROT"
 .SH NAME
@@ -228,18 +225,6 @@ is specified, but this may change in future. You need the Perl module
 .I "Locale::gettext"
 for this feature.
 .sp
-Valid values for LOCALE are the locale names in the mutt(1) and gpg(1)
-po file names.
-In mutt-1.3.28 (and newer) these are:
-.I ca cs da de el eo es et fr gl hu id it ja ko lt nl pl pt_BR ru sk sv
-.IR "tr uk zh_CN zh_TW" .
-In mutt-1.4.1
-.I bg
-was added.
-In gnupg-1.2.5 (and newer) these are:
-.I be ca cs da de el eo es et fi fr gl hu id it ja nl pl pt pt_BR ro ru
-.IR "sk sv tr zh_CN zh_TW" .
-.sp
 .IR Note :
 If you use
 .B mutt
@@ -431,7 +416,7 @@ obviously they think that quoted text must not be changed at all.
 This is quite annoying as it needlessly sends a lot of data
 even when it is not required. Some editing of messages is desired.
 Please point these people to the page 
-.I http://learn.to/edit_messages
+.I http://www.river.com/users/share/etiquette/edit.html
 - thank you!
 .SH TROUBLESHOOTING
 .TP
@@ -489,7 +474,7 @@ Text coming now is not.
 .SH AUTHOR AND COPYRIGHT
 Written by Jochen Striepe <t-prot@tolot.escape.de>.
 .br
-Copyright \(co 2001, 2002, 2003, 2004 Jochen Striepe.
+Copyright \(co 2001-2005 Jochen Striepe.
 .PP
 This is free software; you may use the source to whatever you like.
 Just keep in mind to mention the original source of the script and the manpage