~ubuntu-branches/ubuntu/natty/amavisd-new/natty

« back to all changes in this revision

Viewing changes to debian/disabled.old-headerfolding-patch.diff

  • Committer: Bazaar Package Importer
  • Author(s): Christian Perrier
  • Date: 2007-02-24 19:27:53 UTC
  • mfrom: (3.1.7 feisty)
  • Revision ID: james.westby@ubuntu.com-20070224192753-fvvima53q1jrp34x
Tags: 1:2.4.2-6.1
* Non-maintainer upload to fix pending l10n issues.
* Debconf translations
  - Remove extra debian/po/de.po~
  - Convert all translation files to UTF-8
  - Russian. Closes: #405243
  - Spanish. Closes: #408734
  - Italian. Closes: #409831
* Add very simple LSB headers to init scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: amavisd
 
2
===================================================================
 
3
RCS file: /cvsroot/amavisd-new/amavisd-new/amavisd,v
 
4
retrieving revision 1.1.1.15
 
5
retrieving revision 1.44
 
6
diff -u -r1.1.1.15 -r1.44
 
7
--- amavisd     21 Aug 2005 23:46:15 -0000      1.1.1.15
 
8
+++ amavisd     25 Feb 2006 15:59:35 -0000      1.44
 
9
@@ -3778,17 +3801,23 @@
 
10
   $str =~ s/\n([ \t]*\n)+/\n/g;    # remove empty lines
 
11
   chomp($str);                     # chop off trailing NL if present
 
12
   if ($structured) {
 
13
+    $str =~ s/[ \t]+/ /g;       # collapse spaces and tabs to a single space
 
14
     my(@sublines) = split(/\n/, $str, -1);
 
15
-    $str = ''; my($s) = ''; my($s_l) = 0;
 
16
+    $str = ''; my($s) = ''; my($s_l) = 0; my($s_il)=0;
 
17
     for (@sublines) {              # join shorter field sections
 
18
-      if ($s !~ /^\s*\z/ && $s_l + length($_) > 78) {
 
19
-        $str .= "\n"  if $str ne '';
 
20
+      if ($s !~ /^\s*\z/ && $s_l + $s_il + length($_) > 78) {
 
21
+        $s_il = 8; # length of the initial tab
 
22
+        $str .= "\n\t"  if $str ne '';
 
23
+        $s =~ s/^[ \t]+//g; # remove leading and trailing whitespace
 
24
+        $s =~ s/[ \t]+$//g;
 
25
         $str .= $s; $s = ''; $s_l = 0;
 
26
       }
 
27
       $s .= $_; $s_l += length($_);
 
28
     }
 
29
     if ($s !~ /^\s*\z/) {
 
30
-      $str .= "\n"  if $str ne '';
 
31
+      $str .= "\n\t"  if $str ne '';
 
32
+      $s =~ s/^[ \t]+//g; # remove leading and trailing whitespace
 
33
+      $s =~ s/[ \t]+$//g;
 
34
       $str .= $s;
 
35
     }
 
36
   } elsif (length($str) > 998) {