Subject: muttprint: does not honour the PAPERSIZE environment variable

From: Maximiliano Curia <[email-masked]>
Date: Thu, 15 Aug 2013 11:57:16 +0200

Control: tags -1 + patch

Hi,

Attaching a simple patch to fix this.

-- 
"When explaining a command, or language feature, or hardware widget, first
describe the problem it is designed to solve."
-- David Martin
Saludos /\/\ /\ >< `/
diff -Naru muttprint-0.73.old/muttprint muttprint-0.73/muttprint
--- muttprint-0.73.old/muttprint	2008-12-26 01:33:36.000000000 +0100
+++ muttprint-0.73/muttprint	2013-08-13 11:38:43.140123580 +0200
@@ -927,6 +927,20 @@
 	my $paperFormat;
 	my $Papersize = "/etc/papersize";
 
+	if (defined $ENV{PAPERSIZE}) {
+
+		if ($ENV{PAPERSIZE} ~ /a4/i) {
+			$DebianPaper = "A4";
+		} elsif ($ENV{PAPERSIZE} ~ /letter/i) {
+			$DebianPaper = "latter";
+		} else {
+			$DebianPaper = $ENV{PAPERSIZE};
+		}
+
+		return $DebianPaper;
+
+	}
+
 	return unless (-r $Papersize);
 
 	open (RCFILE, $Papersize) or fatalError "Could not open $Papersize:\n$!";