# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
# USA.
# Maintained by Jonathan Kamens <jik@kamens.brookline.ma.us>.
use Date::Parse;
my($whoami) = basename $0;
-my($version) = '$Revision: 1.2 $';
+my($version) = '$Revision$';
my($usage) = "Usage: $whoami [--help] [--version] [--[no]full-headers] [Babyl-file]
\tBy default, full headers are printed.\n";
$labels = $1;
# Strip the integer indicating whether the header is pruned
- $labels =~ s/^(\d+)[,\s]*//;
+ $labels =~ s/^(\d+)[,\s]*//;
$pruned = $1;
s/(?:((?:.+\n)+)\n*)?\*\*\* EOOH \*\*\*\n+// || goto malformatted;
$full_header = $header;
}
- # End message with a single newline
- s/\s+$/\n/;
+ # End message with two newlines (some mbox parsers require a blank
+ # line before the next "From " line).
+ s/\s+$/\n\n/;
# Quote "^From "
s/(^|\n)From /$1>From /g;
$labels =~ s/[,\s]+$//;
# Now collapse extra commas and whitespace in the remaining label string
$labels =~ s/[,\s]+/, /g;
-
+
foreach my $rmail_header qw(summary-line x-coding-system) {
$full_header =~ s/(^|\n)$rmail_header:.*\n/$1/i;
}
}
close(STDOUT) || die "$whoami: Error closing stdout: $!\n";
+
+# arch-tag: 8c7c8ab0-721c-46d7-ba3e-139801240aa8