From 9ee3cb888394ce4a1646e553953404d3b584ac75 Mon Sep 17 00:00:00 2001 From: chicco Date: Thu, 2 Jul 2009 19:50:16 +0200 Subject: [PATCH] Vous aimez les trolls? Ignore-this: b9cc5120be8fc38bc0cd2e9d0ef56d3b darcs-hash:20090702175016-b1672-77afcc502ecd37839d2addf8d42d3992ed22d2f8.gz --- impression/wrapper_canon.ml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/impression/wrapper_canon.ml b/impression/wrapper_canon.ml index 7d5e69a4..69177d35 100644 --- a/impression/wrapper_canon.ml +++ b/impression/wrapper_canon.ml @@ -31,12 +31,21 @@ let copies = ref 1 let _Copies () = "%d" % !copies let papier = ref "a4" -let _MediaSize () = match !papier with - "a4" | "A4" -> "5" - | "a3" | "A3" -> "6" - | "A5" -> "16" | "B4" -> "12" | "B5" -> "13" | "LTR" -> "1" | "LGL" -> "2" - | "11x17" -> "3" | "EXEC" -> "4" | "Com-10" -> "7" | "Monarch" -> "8" - | "C5 Env" -> "9" | "B5 Env" -> "10" | "DL Env" -> "11" +let _MediaSize () = string_of_int (match String.lowercase (!papier) with + | "a4" -> 5 + | "a3" -> 6 + | "a5" -> 16 + | "b4" -> 12 + | "b5" -> 13 + | "ltr" -> 1 + | "lgl" -> 2 + | "11x17" -> 3 + | "exec" -> 4 + | "com-10" -> 7 + | "monarch" -> 8 + | "c5 env" -> 9 + | "b5 env" -> 10 + | "dl env" -> 11 | _ -> raise (Arg.Bad ("%s wrong papersize" % !papier)) let papertype = ref "Ordinaire"