]> granicus.if.org Git - php/commitdiff
- Fix compiler warnings.
authorMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 21 Feb 2005 07:57:08 +0000 (07:57 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 21 Feb 2005 07:57:08 +0000 (07:57 +0000)
15 files changed:
ext/mbstring/libmbfl/filters/mk_sb_tbl.awk
ext/mbstring/libmbfl/filters/unicode_table_iso8859_10.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_13.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_14.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_15.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_16.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_2.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_3.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_4.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_5.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_6.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_7.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_8.h
ext/mbstring/libmbfl/filters/unicode_table_iso8859_9.h
ext/mbstring/mbstring.c

index ae090b5aa55583d8efbd6c76a6e23472e6857d0f..f0ad290e241738441e42a32c545a9e8fff3853db 100755 (executable)
@@ -5,6 +5,29 @@
 # Description: a script that generates a single byte code set to Unicode
 # mapping table.
 #
+
+function conv(str) {
+       if (!match(str, "^0[xX]")) {
+               return 0 + str
+       }
+
+       retval = 0
+
+       for (i = 3; i <= length(str); i++) {
+               n = index("0123456789abcdefABCDEF", substr(str, i, 1)) - 1
+
+               if (n < 0) {
+                       return 0 + str;
+               } else if (n >= 16) {
+                       n -= 6;
+               }
+
+               retval = retval * 16 + n
+       }
+
+       return retval
+}
+
 BEGIN {
        FS="[ \t#]"
 }
@@ -14,7 +37,7 @@ BEGIN {
 }
 
 {
-       tbl[$1 + 0] = $2
+       tbl[conv($1)] = conv($2)
 }
 
 END {
@@ -23,14 +46,14 @@ END {
                print "#ifndef " IFNDEF_NAME
        }
 
-       print "static const unsigned int " TABLE_NAME "[] = {"
+       print "static const int " TABLE_NAME "[] = {"
        i = 160;
        for (;;) {
                printf("\t0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x, 0x%04x", tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++], tbl[i++]);
                if (i != 256) {
                        printf(",\n");
                } else {
-                       print
+                       print ""
                        break;
                }
        }       
index 48b1301b729489747c8b657401d2b29f31a96b56..2b6b78f32bd674ae3acd65c77d41d98967783207 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_10_H
-static const unsigned int iso8859_10_ucs_table[] = {
+static const int iso8859_10_ucs_table[] = {
        0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7,
        0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a,
        0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7,
index e7991f8e2848b85931ffbd1b609f2eb886185f52..5822396525c5e970ef30090bd33474fc92c290b1 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_13_H
-static const unsigned int iso8859_13_ucs_table[] = {
+static const int iso8859_13_ucs_table[] = {
        0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7,
        0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6,
        0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7,
index 8c0bfe133ae3c7e2d10b5fb18656d92f4819b712..6bd03b367ab43b8214a0a67abf574848d1d2e461 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_14_H
-static const unsigned int iso8859_14_ucs_table[] = {
+static const int iso8859_14_ucs_table[] = {
        0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7,
        0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178,
        0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56,
index 82743da2b5eb76f86c2e60fbd9826db3eaa31c7b..029a2bcfc4e43d2fa8e8dfa5ef32336926241fb5 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_15_H
-static const unsigned int iso8859_15_ucs_table[] = {
+static const int iso8859_15_ucs_table[] = {
        0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7,
        0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
        0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7,
index 256865fd6161e762287c633600146a0560ec86b7..555472d0dc149378c3844c40c89ad02303691b6a 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLEISO8859_16_H
-static const unsigned int iso8859_16_ucs_table[] = {
+static const int iso8859_16_ucs_table[] = {
        0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7,
        0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b,
        0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7,
index ab1ca6eea83df5a9b0e0eb16843f83e69ef4285b..12bb3cb2dc3e37ba301395a6cea97e3989760c1d 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_2_H
-static const unsigned int iso8859_2_ucs_table[] = {
+static const int iso8859_2_ucs_table[] = {
        0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7,
        0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b,
        0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7,
index f0501787e3dd58902b09f35f15f1c5b671ea5b70..f50c348affed6290768469cb83efc6f7f0dd9a38 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_3_H
-static const unsigned int iso8859_3_ucs_table[] = {
+static const int iso8859_3_ucs_table[] = {
        0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0x0000, 0x0124, 0x00a7,
        0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0x0000, 0x017b,
        0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7,
index 01f90fb3e9d418d32f0846015e52d397d4a899de..ff7ecdb4c0b80493da25d2089014d5f5861ee6f9 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_4_H
-static const unsigned int iso8859_4_ucs_table[] = {
+static const int iso8859_4_ucs_table[] = {
        0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7,
        0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af,
        0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7,
index 70c9f38c5e8cc6121cb737b61e8632e3eeefaf7f..411ab84b60574409ebdafaf0c535d3d44f1a4c8f 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_5_H
-static const unsigned int iso8859_5_ucs_table[] = {
+static const int iso8859_5_ucs_table[] = {
        0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
        0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
        0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
index c9d66243370ee5f5278a37bc374a9f49f8116a26..0b3952e3a0b87a66ee20539da2c9ad5ebce1204f 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_6_H
-static const unsigned int iso8859_6_ucs_table[] = {
+static const int iso8859_6_ucs_table[] = {
        0x00a0, 0x0000, 0x0000, 0x0000, 0x00a4, 0x0000, 0x0000, 0x0000,
        0x0000, 0x0000, 0x0000, 0x0000, 0x060c, 0x00ad, 0x0000, 0x0000,
        0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
index 4961c30f928c6c4a2e43cc61f1d30eb43c990f38..687f4cbc744af98bade1272296faac000ca15c40 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_7_H
-static const unsigned int iso8859_7_ucs_table[] = {
+static const int iso8859_7_ucs_table[] = {
        0x00a0, 0x2018, 0x2019, 0x00a3, 0x20ac, 0x20af, 0x00a6, 0x00a7,
        0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0x0000, 0x2015,
        0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7,
index 3a52badb36b170bb8fa24337e5f4fca8ddde212d..4ec6490bae49bb65b89685857c094afc26e800d2 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_8_H
-static const unsigned int iso8859_8_ucs_table[] = {
+static const int iso8859_8_ucs_table[] = {
        0x00a0, 0x0000, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
        0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
        0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
index eaac8c6723d397046ab405c7026cc90e7f80ca05..12f988ad7a2af3230d391029798f99ae74b61ae9 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is automatically generated. Do not edit! */
 #ifndef UNICODE_TABLE_ISO8859_9_H
-static const unsigned int iso8859_9_ucs_table[] = {
+static const int iso8859_9_ucs_table[] = {
        0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
        0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
        0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
index 068cb9666999a349827848b51169289917c3f486..0988a6607844d0d82fb57e01457cdfbdc825d455 100644 (file)
@@ -134,7 +134,7 @@ static const enum mbfl_no_encoding php_mb_default_identify_list_neut[] = {
 };
 
 
-php_mb_nls_ident_list php_mb_default_identify_list[] = {
+static const php_mb_nls_ident_list php_mb_default_identify_list[] = {
        { mbfl_no_language_japanese, php_mb_default_identify_list_ja, sizeof(php_mb_default_identify_list_ja) / sizeof(php_mb_default_identify_list_ja[0]) },
        { mbfl_no_language_korean, php_mb_default_identify_list_kr, sizeof(php_mb_default_identify_list_kr) / sizeof(php_mb_default_identify_list_kr[0]) },
        { mbfl_no_language_traditional_chinese, php_mb_default_identify_list_tw_hk, sizeof(php_mb_default_identify_list_tw_hk) / sizeof(php_mb_default_identify_list_tw_hk[0]) },