dmitry          Tue Oct  4 02:33:14 2005 EDT

  Modified files:              
    /php-src/ext/standard       string.c 
  Log:
  Fixed compilation error (gcc-4).
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.491&r2=1.492&ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.491 php-src/ext/standard/string.c:1.492
--- php-src/ext/standard/string.c:1.491 Mon Oct  3 13:00:00 2005
+++ php-src/ext/standard/string.c       Tue Oct  4 02:33:10 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: string.c,v 1.491 2005/10/03 17:00:00 rolland Exp $ */
+/* $Id: string.c,v 1.492 2005/10/04 06:33:10 dmitry Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -3469,46 +3469,46 @@
 }
 /* }}} */
 
-/* {{{ php_u_similar_char
+/* {{{ php_similar_char
  */
-static int php_u_similar_char(const UChar *txt1, int32_t len1, const UChar 
*txt2, int32_t len2)
+static int php_similar_char(const char *txt1, int len1, const char *txt2, int 
len2)
 {
-       int sum, max;
-       int32_t pos1, pos2, end1, end2;
+       int sum;
+       int pos1, pos2, max;
 
-       php_u_similar_str(txt1, len1, txt2, len2, &pos1, &end1, &pos2, &end2, 
&max);
+       php_similar_str(txt1, len1, txt2, len2, &pos1, &pos2, &max);
        if ((sum = max)) {
                if (pos1 && pos2) {
-                       sum += php_u_similar_char(txt1, pos1, txt2, pos2);
+                       sum += php_similar_char(txt1, pos1, 
+                                                                       txt2, 
pos2);
                }
-               if ((pos1 + end1 < len1) && (pos2 + end2 < len2)) {
-                       sum += php_similar_char((UChar *)txt1+pos1+end1, 
len1-pos1-end1,
-                                                                       (UChar 
*)txt2+pos2+end2, len2-pos2-end2);
+               if ((pos1 + max < len1) && (pos2 + max < len2)) {
+                       sum += php_similar_char(txt1 + pos1 + max, len1 - pos1 
- max, 
+                                                                       txt2 + 
pos2 + max, len2 - pos2 - max);
                }
        }
+
        return sum;
 }
 /* }}} */
 
-/* {{{ php_similar_char
+/* {{{ php_u_similar_char
  */
-static int php_similar_char(const char *txt1, int len1, const char *txt2, int 
len2)
+static int php_u_similar_char(const UChar *txt1, int32_t len1, const UChar 
*txt2, int32_t len2)
 {
-       int sum;
-       int pos1, pos2, max;
+       int sum, max;
+       int32_t pos1, pos2, end1, end2;
 
-       php_similar_str(txt1, len1, txt2, len2, &pos1, &pos2, &max);
+       php_u_similar_str(txt1, len1, txt2, len2, &pos1, &end1, &pos2, &end2, 
&max);
        if ((sum = max)) {
                if (pos1 && pos2) {
-                       sum += php_similar_char(txt1, pos1, 
-                                                                       txt2, 
pos2);
+                       sum += php_u_similar_char(txt1, pos1, txt2, pos2);
                }
-               if ((pos1 + max < len1) && (pos2 + max < len2)) {
-                       sum += php_similar_char(txt1 + pos1 + max, len1 - pos1 
- max, 
-                                                                       txt2 + 
pos2 + max, len2 - pos2 - max);
+               if ((pos1 + end1 < len1) && (pos2 + end2 < len2)) {
+                       sum += php_similar_char((UChar *)txt1+pos1+end1, 
len1-pos1-end1,
+                                                                       (UChar 
*)txt2+pos2+end2, len2-pos2-end2);
                }
        }
-
        return sum;
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to