From 6ba1936d42634a83e9a5e2b8894b707191fb1087 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 3 Mar 2012 18:12:08 +0100 Subject: Enigmail 1.4 for Thunderbird 10.0.2 --- enigmail-fixlang.php | 91 ---------------------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 enigmail-fixlang.php (limited to 'enigmail-fixlang.php') diff --git a/enigmail-fixlang.php b/enigmail-fixlang.php deleted file mode 100644 index 188b558..0000000 --- a/enigmail-fixlang.php +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/php -$/', $buf, $res)) { - //echo "+ Line '".$res[1]."'\n"; - $ind=trim($res[1]); - $tab[$ind] = $res[1].'"'.$res[2].'">'; - $prev=false; - } else if (preg_match('/^$/', $buf, $res)) { - //echo "+ End '".$prev."'\n"; - $tab[$prev] .= "\n".$res[1].'">'; - $prev=false; - } else if ($prev && preg_match('/^(.*)$/', $buf, $res)) { - //echo "+ Cont. '".$prev."'\n"; - $tab[$prev] .= "\n".$res[1]; - } else { - die("- unkonwn ($buf) !\n"); - } - } -} -function loadprop ($file, &$tab) { - - echo "+ Loading $file\n"; - $tab=array(); - - $fic=fopen($file, "r"); - if ($fic) while ($buf=fgets($fic)) { - if (empty($buf) || $buf=="\n") { - //echo "+ empty\n"; - } else if (preg_match('/^#/', $buf, $res)) { - //echo "+ comments\n"; - } else if (preg_match('/^([A-Za-z0-9._]*)[[:space:]]*=[[:space:]]*(.*)/', $buf, $res)) { - //echo "+ Value '".$res[1]."'\n"; - $ind=trim($res[1]); - $tab[$ind] = $res[1].'='.$res[2]; - } else { - echo("\tIgnored ($buf) !\n"); - } - } -} -if ($_SERVER["argc"]<3) die ("usage enigmail-fixlang.php fromdir destdir\n"); -$from=$_SERVER["argv"][1]; -$dest=$_SERVER["argv"][2]; -if (!is_file("$from/enigmail.dtd")) die ("$from/enigmail.dtd not found\n"); -if (!is_file("$from/enigmail.properties")) die ("$from/enigmail.properties not found\n"); -if (!is_file("$dest/enigmail.dtd")) die ("$dest/enigmail.dtd not found\n"); -if (!is_file("$dest/enigmail.properties")) die ("$dest/enigmail.properties not found\n"); - -loaddtd("$from/enigmail.dtd", $endtd); -loaddtd("$dest/enigmail.dtd", $frdtd); - -echo "+ Writing $dest/enigmail.dtd\n"; -$fic=fopen("$dest/enigmail.dtd", "w"); -foreach($endtd as $ind => $line) - if (isset($frdtd[$ind])) { - fputs($fic, " $line) - if (isset($frprop[$ind])) { - fputs($fic, $frprop[$ind]."\n"); - } else { - echo "\tAdding missing $ind\n"; - fputs($fic, $enprop[$ind]."\n"); - } -fclose($fic); -?> - -- cgit