]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/normal/UtfNormalGenerate.php
MediaWiki 1.17.0
[autoinstallsdev/mediawiki.git] / includes / normal / UtfNormalGenerate.php
index 83f3085e9231cfc1a4481ae04fba67239da0cbcb..a5e2885ae87d17c73ad9afc10be2b5a4b8528804 100644 (file)
@@ -1,32 +1,30 @@
 <?php
-# Copyright (C) 2004 Brion Vibber <brion@pobox.com>
-# http://www.mediawiki.org/
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# 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.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# http://www.gnu.org/copyleft/gpl.html
-
 /**
  * This script generates UniNormalData.inc from the Unicode Character Database
  * and supplementary files.
  *
- * @addtogroup UtfNormal
- * @access private
+ * Copyright (C) 2004 Brion Vibber <brion@pobox.com>
+ * http://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup UtfNormal
  */
 
-/** */
-
 if( php_sapi_name() != 'cli' ) {
        die( "Run me from the command line please.\n" );
 }
@@ -37,7 +35,7 @@ $in = fopen("DerivedNormalizationProps.txt", "rt" );
 if( !$in ) {
        print "Can't open DerivedNormalizationProps.txt for reading.\n";
        print "If necessary, fetch this file from the internet:\n";
-       print "http://www.unicode.org/Public/UNIDATA/CompositionExclusions.txt\n";
+       print "http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt\n";
        exit(-1);
 }
 print "Initializing normalization quick check tables...\n";
@@ -91,7 +89,7 @@ $canon = 0;
 
 print "Reading character definitions...\n";
 while( false !== ($line = fgets( $in ) ) ) {
-       $columns = split(';', $line);
+       $columns = explode(';', $line);
        $codepoint = $columns[0];
        $name = $columns[1];
        $canonicalCombiningClass = $columns[3];
@@ -175,14 +173,15 @@ if( $out ) {
 /**
  * This file was automatically generated -- do not edit!
  * Run UtfNormalGenerate.php to create this file again (make clean && make)
+ *
+ * @file
  */
-/** */
-global \$utfCombiningClass, \$utfCanonicalComp, \$utfCanonicalDecomp, \$utfCheckNFC;
-\$utfCombiningClass = unserialize( '$serCombining' );
-\$utfCanonicalComp = unserialize( '$serComp' );
-\$utfCanonicalDecomp = unserialize( '$serCanon' );
-\$utfCheckNFC = unserialize( '$serCheckNFC' );
-?" . ">\n";
+UtfNormal::\$utfCombiningClass = unserialize( '$serCombining' );
+UtfNormal::\$utfCanonicalComp = unserialize( '$serComp' );
+UtfNormal::\$utfCanonicalDecomp = unserialize( '$serCanon' );
+UtfNormal::\$utfCheckNFC = unserialize( '$serCheckNFC' );
+\n";
        fputs( $out, $outdata );
        fclose( $out );
        print "Wrote out UtfNormalData.inc\n";
@@ -199,11 +198,12 @@ if( $out ) {
 /**
  * This file was automatically generated -- do not edit!
  * Run UtfNormalGenerate.php to create this file again (make clean && make)
+ *
+ * @file
  */
-/** */
-global \$utfCompatibilityDecomp;
-\$utfCompatibilityDecomp = unserialize( '$serCompat' );
-?" . ">\n";
+
+UtfNormal::\$utfCompatibilityDecomp = unserialize( '$serCompat' );
+\n";
        fputs( $out, $outdata );
        fclose( $out );
        print "Wrote out UtfNormalDataK.inc\n";
@@ -230,5 +230,3 @@ function callbackCompat( $matches ) {
        }
        return $matches[1];
 }
-
-