sniper          Sat Jun 11 16:21:51 2005 EDT

  Modified files:              (Branch: PHP_4_4)
    /php-src/ext/standard       var_unserializer.c url_scanner_ex.c 
  Log:
  regenerated with re2c 0.9.7
  
http://cvs.php.net/diff.php/php-src/ext/standard/var_unserializer.c?r1=1.18.4.24&r2=1.18.4.24.2.1&ty=u
Index: php-src/ext/standard/var_unserializer.c
diff -u php-src/ext/standard/var_unserializer.c:1.18.4.24 
php-src/ext/standard/var_unserializer.c:1.18.4.24.2.1
--- php-src/ext/standard/var_unserializer.c:1.18.4.24   Thu Apr 14 18:41:39 2005
+++ php-src/ext/standard/var_unserializer.c     Sat Jun 11 16:21:50 2005
@@ -1,24 +1,24 @@
-/* Generated by re2c 0.9.6 on Fri Apr 15 01:41:08 2005 */
-#line 1 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+/* Generated by re2c 0.9.7 on Sat Jun 11 22:56:18 2005 */
+#line 1 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 /*
-   +----------------------------------------------------------------------+
-   | PHP Version 4                                                        |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2003 The PHP Group                                |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 2.02 of the PHP license,      |
-   | that is bundled with this package in the file LICENSE, and is        |
-   | available at through the world-wide-web at                           |
-   | http://www.php.net/license/2_02.txt.                                 |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | [EMAIL PROTECTED] so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Authors: Sascha Schumann <[EMAIL PROTECTED]>                        |
-   +----------------------------------------------------------------------+
+  +----------------------------------------------------------------------+
+  | PHP Version 5                                                        |
+  +----------------------------------------------------------------------+
+  | Copyright (c) 1997-2004 The PHP Group                                |
+  +----------------------------------------------------------------------+
+  | This source file is subject to version 3.0 of the PHP license,       |
+  | that is bundled with this package in the file LICENSE, and is        |
+  | available through the world-wide-web at the following url:           |
+  | http://www.php.net/license/3_0.txt.                                  |
+  | If you did not receive a copy of the PHP license and are unable to   |
+  | obtain it through the world-wide-web, please send a note to          |
+  | [EMAIL PROTECTED] so we can mail you a copy immediately.               |
+  +----------------------------------------------------------------------+
+  | Author: Sascha Schumann <[EMAIL PROTECTED]>                         |
+  +----------------------------------------------------------------------+
 */
 
-/* $Id: var_unserializer.c,v 1.18.4.24 2005/04/14 22:41:39 sniper Exp $ */
+/* $Id: var_unserializer.c,v 1.18.4.24.2.1 2005/06/11 20:21:50 sniper Exp $ */
 
 #include "php.h"
 #include "ext/standard/php_var.h"
@@ -89,7 +89,7 @@
                for (i = 0; i < var_hash->used_slots; i++) {
                        if (var_hash->data[i] == ozval) {
                                var_hash->data[i] = *nzval;
-                               return;
+                               /* do not break here */
                        }
                }
                var_hash = var_hash->next;
@@ -125,7 +125,7 @@
                efree(var_hash);
                var_hash = next;
        }
-       
+
        var_hash = var_hashx->first_dtor;
        
        while (var_hash) {
@@ -147,7 +147,7 @@
 #define YYMARKER marker
 
 
-#line 154 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 155 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 
 
 
@@ -277,10 +277,37 @@
        return 0;
 }
 
-static inline int object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
+static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
 {
-       long elements;
+       long datalen;
+
+       if(ce->unserialize == NULL) {
+               zend_error(E_WARNING, "Class %s has no unserializer", ce->name);
+               return 0;
+       }
+
+       datalen = parse_iv2((*p) + 2, p);
+
+       (*p) += 2;
+
+       if(datalen < 0 || (*p) + datalen >= max) {
+               zend_error(E_WARNING, "Insufficient data for unserializing - 
%ld required, %d present", datalen, max - (*p));
+               return 0;
+       }
+
+       if(ce->unserialize(rval, ce, (const unsigned char*)*p, datalen, 
(zend_unserialize_data *)var_hash TSRMLS_CC) != SUCCESS) {
+               return 0;
+       }
+
+       (*p) += datalen;
 
+       return finish_nested_data(UNSERIALIZE_PASSTHRU);
+}
+
+static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
+{
+       long elements;
+       
        elements = parse_iv2((*p) + 2, p);
 
        (*p) += 2;
@@ -298,9 +325,12 @@
                return 0;
        }
 
-       INIT_PZVAL(&fname);
-       ZVAL_STRINGL(&fname, "__wakeup", sizeof("__wakeup") - 1, 0);
-       call_user_function_ex(CG(function_table), rval, &fname, &retval_ptr, 0, 
0, 1, NULL TSRMLS_CC);
+       if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY &&
+           zend_hash_exists(&Z_OBJCE_PP(rval)->function_table, "__wakeup", 
sizeof("__wakeup"))) {
+               INIT_PZVAL(&fname);
+               ZVAL_STRINGL(&fname, "__wakeup", sizeof("__wakeup") - 1, 0);
+               call_user_function_ex(CG(function_table), rval, &fname, 
&retval_ptr, 0, 0, 1, NULL TSRMLS_CC);
+       }
 
        if (retval_ptr)
                zval_ptr_dtor(&retval_ptr);
@@ -309,20 +339,6 @@
 
 }
 
-static char *str_tolower_copy(char *dest, const char *source, unsigned int 
length)
-{
-       register unsigned char *str = (unsigned char*)source;
-       register unsigned char *result = (unsigned char*)dest;
-       register unsigned char *end = str + length;
-
-       while (str < end) {
-               *result++ = tolower((int)*str++);
-       }
-       *result = *end;
-
-       return dest;
-}
-
 PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
 {
        const unsigned char *cursor, *limit, *marker, *start;
@@ -338,11 +354,6 @@
 
        
        
-
-#line 7 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
@@ -377,34 +388,40 @@
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
        };
+
+#line 393 "<stdout>"
+{
+       YYCTYPE yych;
+       unsigned int yyaccept;
        goto yy0;
        ++YYCURSOR;
 yy0:
        if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
        yych = *YYCURSOR;
-       if(yych <= 'd'){
-               if(yych <= 'R'){
-                       if(yych <= 'N'){
-                               if(yych <= 'M') goto yy16;
-                               goto yy6;
+       if(yych <= 'c'){
+               if(yych <= 'O'){
+                       if(yych <= 'C'){
+                               if(yych <= 'B') goto yy16;
+                               goto yy13;
                        } else {
-                               if(yych <= 'O') goto yy13;
-                               if(yych <= 'Q') goto yy16;
-                               goto yy3;
+                               if(yych <= 'M') goto yy16;
+                               if(yych <= 'N') goto yy6;
+                               goto yy13;
                        }
                } else {
-                       if(yych <= 'a'){
-                               if(yych <= '`') goto yy16;
-                               goto yy11;
+                       if(yych <= '`'){
+                               if(yych == 'R') goto yy3;
+                               goto yy16;
                        } else {
+                               if(yych <= 'a') goto yy11;
                                if(yych <= 'b') goto yy7;
-                               if(yych <= 'c') goto yy16;
-                               goto yy9;
+                               goto yy16;
                        }
                }
        } else {
                if(yych <= 'q'){
                        if(yych <= 'i'){
+                               if(yych <= 'd') goto yy9;
                                if(yych <= 'h') goto yy16;
                                goto yy8;
                        } else {
@@ -432,9 +449,9 @@
        if(yych == ':') goto yy87;
        goto yy4;
 yy4:
-#line 590 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 626 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 { return 0; }
-#line 102 "<stdout>"
+#line 455 "<stdout>"
 yy5:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        if(yych == ':') goto yy81;
@@ -473,13 +490,13 @@
 yy14:  ++YYCURSOR;
        goto yy15;
 yy15:
-#line 584 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 620 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        /* this is the case where we have less data than planned */
        php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of 
serialized data");
        return 0; /* not sure if it should be 0 or 1 here? */
 }
-#line 147 "<stdout>"
+#line 500 "<stdout>"
 yy16:  yych = *++YYCURSOR;
        goto yy4;
 yy17:  yych = *++YYCURSOR;
@@ -508,18 +525,25 @@
 yy22:  ++YYCURSOR;
        goto yy23;
 yy23:
-#line 495 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 508 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        size_t len, len2, len3, maxlen;
        long elements;
        char *class_name;
        zend_class_entry *ce;
+       zend_class_entry **pce;
        int incomplete_class = 0;
-       
+
+       int custom_object = 0;
+
        zval *user_func;
        zval *retval_ptr;
        zval **args[1];
        zval *arg_func_name;
+
+       if(*start == 'C') {
+               custom_object = 1;
+       }
        
        INIT_PZVAL(*rval);
        len2 = len = parse_uiv(start + 2);
@@ -541,63 +565,79 @@
                *p = YYCURSOR+1;
                return 0;
        }
-       
-       class_name = str_tolower_copy((char *)emalloc(len+1), class_name, len);
-       class_name[len] = '\0';
-       
-       len3 = strspn(class_name, "0123456789_abcdefghijklmnopqrstuvwxyz");
+
+       len3 = strspn(class_name, 
"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377");
        if (len3 != len)
        {
                *p = YYCURSOR + len3 - len;
-               efree(class_name);
                return 0;
        }
 
-       if (zend_hash_find(CG(class_table), class_name, len + 1, (void **) &ce) 
!= SUCCESS) {
+       class_name = estrndup(class_name, len);
+
+       do {
+               /* Try to find class directly */
+               if (zend_lookup_class(class_name, len2, &pce TSRMLS_CC) == 
SUCCESS) {
+                       ce = *pce;
+                       break;
+               }
+               
+               /* Check for unserialize callback */
                if ((PG(unserialize_callback_func) == NULL) || 
(PG(unserialize_callback_func)[0] == '\0')) {
                        incomplete_class = 1;
                        ce = PHP_IC_ENTRY;
+                       break;
+               }
+               
+               /* Call unserialize callback */
+               MAKE_STD_ZVAL(user_func);
+               ZVAL_STRING(user_func, PG(unserialize_callback_func), 1);
+               args[0] = &arg_func_name;
+               MAKE_STD_ZVAL(arg_func_name);
+               ZVAL_STRING(arg_func_name, class_name, 1);
+               if (call_user_function_ex(CG(function_table), NULL, user_func, 
&retval_ptr, 1, args, 0, NULL TSRMLS_CC) != SUCCESS) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "defined 
(%s) but not found", user_func->value.str.val);
+                       incomplete_class = 1;
+                       ce = PHP_IC_ENTRY;
+                       zval_ptr_dtor(&user_func);
+                       zval_ptr_dtor(&arg_func_name);
+                       break;
+               }
+               if (retval_ptr) {
+                       zval_ptr_dtor(&retval_ptr);
+               }
+               
+               /* The callback function may have defined the class */
+               if (zend_lookup_class(class_name, len2, &pce TSRMLS_CC) == 
SUCCESS) {
+                       ce = *pce;
                } else {
-                       MAKE_STD_ZVAL(user_func);
-                       ZVAL_STRING(user_func, PG(unserialize_callback_func), 
1);
-
-                       args[0] = &arg_func_name;
-                       MAKE_STD_ZVAL(arg_func_name);
-                       ZVAL_STRING(arg_func_name, class_name, 1);
-                               
-                       if (call_user_function_ex(CG(function_table), NULL, 
user_func, &retval_ptr, 1, args, 0, NULL TSRMLS_CC) != SUCCESS) {
-                               zend_error(E_WARNING, 
"'unserialize_callback_func' defined (%s) but not found", 
user_func->value.str.val);
-                               incomplete_class = 1;
-                               ce = PHP_IC_ENTRY;
-                       } else {
-                               if (zend_hash_find(CG(class_table), class_name, 
len + 1, (void **) &ce) != SUCCESS) {
-                                       zend_error(E_WARNING, 
"'unserialize_callback_func' (%s) hasn't defined the class it was called for", 
user_func->value.str.val);
-                                       incomplete_class = 1;
-                                       ce = PHP_IC_ENTRY;
-                               } else {
-#ifdef ZEND_ENGINE_2
-                                       ce = *(zend_class_entry **)ce; /* Bad 
hack, TBF! */
-#endif 
-                               }
-                       }
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function 
%s() hasn't defined the class it was called for", user_func->value.str.val);
+                       incomplete_class = 1;
+                       ce = PHP_IC_ENTRY;
                }
-       } else {
-#ifdef ZEND_ENGINE_2
-               ce = *(zend_class_entry **)ce; /* Bad hack, TBF! */
-#endif 
-       }
+
+               zval_ptr_dtor(&user_func);
+               zval_ptr_dtor(&arg_func_name);
+               break;
+       } while (1);
 
        *p = YYCURSOR;
+
+       if(custom_object) {
+               efree(class_name);
+               return object_custom(UNSERIALIZE_PASSTHRU, ce);
+       }
+       
        elements = object_common1(UNSERIALIZE_PASSTHRU, ce);
 
        if (incomplete_class) {
-               php_store_class_name(*rval, class_name, len2 TSRMLS_CC);
+               php_store_class_name(*rval, class_name, len2);
        }
        efree(class_name);
 
        return object_common2(UNSERIALIZE_PASSTHRU, elements);
 }
-#line 266 "<stdout>"
+#line 641 "<stdout>"
 yy24:  yych = *++YYCURSOR;
        if(yych <= ','){
                if(yych != '+') goto yy2;
@@ -626,7 +666,7 @@
 yy29:  ++YYCURSOR;
        goto yy30;
 yy30:
-#line 487 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 500 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
 
        INIT_PZVAL(*rval);
@@ -634,7 +674,7 @@
        return object_common2(UNSERIALIZE_PASSTHRU,
                        object_common1(UNSERIALIZE_PASSTHRU, 
ZEND_STANDARD_CLASS_DEF_PTR));
 }
-#line 304 "<stdout>"
+#line 678 "<stdout>"
 yy31:  yych = *++YYCURSOR;
        if(yych == '+') goto yy32;
        if(yych <= '/') goto yy2;
@@ -658,7 +698,7 @@
 yy36:  ++YYCURSOR;
        goto yy37;
 yy37:
-#line 461 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 478 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        long elements = parse_iv(start + 2);
        /* use iv() not uiv() in order to check data range */
@@ -668,10 +708,6 @@
                return 0;
        }
 
-       if (elements < 0) {
-               return 0;
-       }
-
        INIT_PZVAL(*rval);
        Z_TYPE_PP(rval) = IS_ARRAY;
        ALLOC_HASHTABLE(Z_ARRVAL_PP(rval));
@@ -684,7 +720,7 @@
 
        return finish_nested_data(UNSERIALIZE_PASSTHRU);
 }
-#line 355 "<stdout>"
+#line 724 "<stdout>"
 yy38:  yych = *++YYCURSOR;
        if(yych == '+') goto yy39;
        if(yych <= '/') goto yy2;
@@ -708,7 +744,7 @@
 yy43:  ++YYCURSOR;
        goto yy44;
 yy44:
-#line 433 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 450 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        size_t len, maxlen;
        char *str;
@@ -736,7 +772,7 @@
        ZVAL_STRINGL(*rval, str, len, 1);
        return 1;
 }
-#line 408 "<stdout>"
+#line 776 "<stdout>"
 yy45:  yych = *++YYCURSOR;
        if(yych <= '/'){
                if(yych <= ','){
@@ -825,14 +861,14 @@
 yy55:  ++YYCURSOR;
        goto yy56;
 yy56:
-#line 426 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 443 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        *p = YYCURSOR;
        INIT_PZVAL(*rval);
        ZVAL_DOUBLE(*rval, zend_strtod((const char *)start + 2, NULL));
        return 1;
 }
-#line 506 "<stdout>"
+#line 872 "<stdout>"
 yy57:  yych = *++YYCURSOR;
        if(yych <= ','){
                if(yych != '+') goto yy2;
@@ -892,7 +928,7 @@
 yy66:  ++YYCURSOR;
        goto yy67;
 yy67:
-#line 411 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 428 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        *p = YYCURSOR;
        INIT_PZVAL(*rval);
@@ -907,7 +943,7 @@
 
        return 1;
 }
-#line 583 "<stdout>"
+#line 947 "<stdout>"
 yy68:  yych = *++YYCURSOR;
        if(yych == 'N') goto yy65;
        goto yy2;
@@ -936,14 +972,14 @@
 yy73:  ++YYCURSOR;
        goto yy74;
 yy74:
-#line 404 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 421 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        *p = YYCURSOR;
        INIT_PZVAL(*rval);
        ZVAL_LONG(*rval, parse_iv(start + 2));
        return 1;
 }
-#line 620 "<stdout>"
+#line 983 "<stdout>"
 yy75:  yych = *++YYCURSOR;
        if(yych <= '/') goto yy2;
        if(yych >= '2') goto yy2;
@@ -954,25 +990,25 @@
 yy77:  ++YYCURSOR;
        goto yy78;
 yy78:
-#line 397 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 414 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        *p = YYCURSOR;
        INIT_PZVAL(*rval);
        ZVAL_BOOL(*rval, parse_iv(start + 2));
        return 1;
 }
-#line 638 "<stdout>"
+#line 1001 "<stdout>"
 yy79:  ++YYCURSOR;
        goto yy80;
 yy80:
-#line 390 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 407 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        *p = YYCURSOR;
        INIT_PZVAL(*rval);
        ZVAL_NULL(*rval);
        return 1;
 }
-#line 649 "<stdout>"
+#line 1012 "<stdout>"
 yy81:  yych = *++YYCURSOR;
        if(yych <= ','){
                if(yych != '+') goto yy2;
@@ -998,7 +1034,7 @@
 yy85:  ++YYCURSOR;
        goto yy86;
 yy86:
-#line 367 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 384 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        long id;
 
@@ -1009,19 +1045,19 @@
        if (id == -1 || var_access(var_hash, id, &rval_ref) != SUCCESS) {
                return 0;
        }
-       
+
        if (*rval == *rval_ref) return 0;
 
        if (*rval != NULL) {
-       zval_ptr_dtor(rval);
+               zval_ptr_dtor(rval);
        }
        *rval = *rval_ref;
        (*rval)->refcount++;
-       (*rval)->is_ref = 1;
+       (*rval)->is_ref = 0;
        
        return 1;
 }
-#line 699 "<stdout>"
+#line 1061 "<stdout>"
 yy87:  yych = *++YYCURSOR;
        if(yych <= ','){
                if(yych != '+') goto yy2;
@@ -1047,7 +1083,7 @@
 yy91:  ++YYCURSOR;
        goto yy92;
 yy92:
-#line 346 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 363 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 {
        long id;
 
@@ -1060,7 +1096,7 @@
        }
 
        if (*rval != NULL) {
-       zval_ptr_dtor(rval);
+               zval_ptr_dtor(rval);
        }
        *rval = *rval_ref;
        (*rval)->refcount++;
@@ -1068,9 +1104,9 @@
        
        return 1;
 }
-#line 747 "<stdout>"
+#line 1108 "<stdout>"
 }
-#line 592 "/usr/src/php/php_4_3/ext/standard/var_unserializer.re"
+#line 628 "/usr/src/php/php5/ext/standard/var_unserializer.re"
 
 
        return 0;
http://cvs.php.net/diff.php/php-src/ext/standard/url_scanner_ex.c?r1=1.72.2.15&r2=1.72.2.15.2.1&ty=u
Index: php-src/ext/standard/url_scanner_ex.c
diff -u php-src/ext/standard/url_scanner_ex.c:1.72.2.15 
php-src/ext/standard/url_scanner_ex.c:1.72.2.15.2.1
--- php-src/ext/standard/url_scanner_ex.c:1.72.2.15     Thu Apr 14 18:41:39 2005
+++ php-src/ext/standard/url_scanner_ex.c       Sat Jun 11 16:21:50 2005
@@ -1,15 +1,15 @@
-/* Generated by re2c 0.9.6 on Fri Apr 15 01:41:19 2005 */
-#line 1 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+/* Generated by re2c 0.9.7 on Sat Jun 11 22:56:09 2005 */
+#line 1 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 /*
   +----------------------------------------------------------------------+
-  | PHP Version 4                                                        |
+  | PHP Version 5                                                        |
   +----------------------------------------------------------------------+
-  | Copyright (c) 1997-2003 The PHP Group                                |
+  | Copyright (c) 1997-2004 The PHP Group                                |
   +----------------------------------------------------------------------+
-  | This source file is subject to version 2.02 of the PHP license,      |
+  | This source file is subject to version 3.0 of the PHP license,       |
   | that is bundled with this package in the file LICENSE, and is        |
-  | available at through the world-wide-web at                           |
-  | http://www.php.net/license/2_02.txt.                                 |
+  | available through the world-wide-web at the following url:           |
+  | http://www.php.net/license/3_0.txt.                                  |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to          |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.               |
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: url_scanner_ex.c,v 1.72.2.15 2005/04/14 22:41:39 sniper Exp $ */
+/* $Id: url_scanner_ex.c,v 1.72.2.15.2.1 2005/06/11 20:21:50 sniper Exp $ */
 
 #include "php.h"
 
@@ -91,7 +91,7 @@
        STD_PHP_INI_ENTRY("url_rewriter.tags", 
"a=href,area=href,frame=src,form=,fieldset=", PHP_INI_ALL, OnUpdateTags, 
url_adapt_state_ex, php_basic_globals, basic_globals)
 PHP_INI_END()
 
-#line 97 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 97 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 
 #define YYFILL(n) goto done
@@ -109,11 +109,6 @@
        q = (p = url->c) + url->len;
 
 scan:
-
-#line 7 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
        128, 128, 128, 128, 128, 128, 128, 128, 
        128, 128, 128, 128, 128, 128, 128, 128, 
@@ -148,6 +143,10 @@
        128, 128, 128, 128, 128, 128, 128, 128, 
        128, 128, 128, 128, 128, 128, 128, 128, 
        };
+
+#line 148 "<stdout>"
+{
+       YYCTYPE yych;
        goto yy0;
        ++YYCURSOR;
 yy0:
@@ -162,21 +161,21 @@
 yy2:   ++YYCURSOR;
        goto yy3;
 yy3:
-#line 115 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 115 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { smart_str_append(dest, url); return; }
-#line 61 "<stdout>"
+#line 167 "<stdout>"
 yy4:   ++YYCURSOR;
        goto yy5;
 yy5:
-#line 116 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 116 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { sep = separator; goto scan; }
-#line 67 "<stdout>"
+#line 173 "<stdout>"
 yy6:   ++YYCURSOR;
        goto yy7;
 yy7:
-#line 117 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 117 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { bash = p - 1; goto done; }
-#line 73 "<stdout>"
+#line 179 "<stdout>"
 yy8:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -186,11 +185,11 @@
        }
        goto yy10;
 yy10:
-#line 118 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 118 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { goto scan; }
-#line 86 "<stdout>"
+#line 191 "<stdout>"
 }
-#line 119 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 119 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 done:
        
@@ -358,11 +357,6 @@
        
 state_plain:
        start = YYCURSOR;
-
-#line 90 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
        128, 128, 128, 128, 128, 128, 128, 128, 
        128, 128, 128, 128, 128, 128, 128, 128, 
@@ -397,6 +391,10 @@
        128, 128, 128, 128, 128, 128, 128, 128, 
        128, 128, 128, 128, 128, 128, 128, 128, 
        };
+
+#line 396 "<stdout>"
+{
+       YYCTYPE yych;
        goto yy11;
        ++YYCURSOR;
 yy11:
@@ -409,9 +407,9 @@
 yy13:  ++YYCURSOR;
        goto yy14;
 yy14:
-#line 287 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 287 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; }
-#line 142 "<stdout>"
+#line 413 "<stdout>"
 yy15:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -421,20 +419,15 @@
        }
        goto yy17;
 yy17:
-#line 288 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 288 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); goto state_plain; }
-#line 155 "<stdout>"
+#line 425 "<stdout>"
 }
-#line 289 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 289 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 
 state_tag:     
        start = YYCURSOR;
-
-#line 159 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
@@ -469,6 +462,10 @@
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
        };
+
+#line 467 "<stdout>"
+{
+       YYCTYPE yych;
        goto yy18;
        ++YYCURSOR;
 yy18:
@@ -483,15 +480,15 @@
        yych = *YYCURSOR;
        goto yy25;
 yy21:
-#line 294 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 294 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == 
STATE_PLAIN) goto state_plain; else goto state_next_arg; }
-#line 212 "<stdout>"
+#line 486 "<stdout>"
 yy22:  ++YYCURSOR;
        goto yy23;
 yy23:
-#line 295 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 295 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); goto state_plain_begin; }
-#line 218 "<stdout>"
+#line 492 "<stdout>"
 yy24:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -501,7 +498,7 @@
        }
        goto yy21;
 }
-#line 296 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 296 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 
 state_next_arg_begin:
@@ -509,11 +506,6 @@
        
 state_next_arg:
        start = YYCURSOR;
-
-#line 231 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
          0,   0,   0,   0,   0,   0,   0,   0, 
          0, 128, 128, 128,   0,   0,   0,   0, 
@@ -548,6 +540,10 @@
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
        };
+
+#line 545 "<stdout>"
+{
+       YYCTYPE yych;
        goto yy26;
        ++YYCURSOR;
 yy26:
@@ -575,28 +571,28 @@
 yy28:  ++YYCURSOR;
        goto yy29;
 yy29:
-#line 304 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 304 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; }
-#line 298 "<stdout>"
+#line 577 "<stdout>"
 yy30:  ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy37;
 yy31:
-#line 305 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 305 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); goto state_next_arg; }
-#line 304 "<stdout>"
+#line 584 "<stdout>"
 yy32:  ++YYCURSOR;
        goto yy33;
 yy33:
-#line 306 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 306 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { --YYCURSOR; STATE = STATE_ARG; goto state_arg; }
-#line 310 "<stdout>"
+#line 590 "<stdout>"
 yy34:  ++YYCURSOR;
        goto yy35;
 yy35:
-#line 307 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 307 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); goto state_plain_begin; }
-#line 316 "<stdout>"
+#line 596 "<stdout>"
 yy36:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -606,16 +602,11 @@
        }
        goto yy31;
 }
-#line 308 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 308 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 
 state_arg:
        start = YYCURSOR;
-
-#line 329 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
@@ -650,6 +641,10 @@
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
        };
+
+#line 646 "<stdout>"
+{
+       YYCTYPE yych;
        goto yy38;
        ++YYCURSOR;
 yy38:
@@ -664,15 +659,15 @@
        yych = *YYCURSOR;
        goto yy45;
 yy41:
-#line 313 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 313 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto 
state_before_val; }
-#line 382 "<stdout>"
+#line 665 "<stdout>"
 yy42:  ++YYCURSOR;
        goto yy43;
 yy43:
-#line 314 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 314 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; }
-#line 388 "<stdout>"
+#line 671 "<stdout>"
 yy44:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -682,16 +677,11 @@
        }
        goto yy41;
 }
-#line 315 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 315 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 
 state_before_val:
        start = YYCURSOR;
-
-#line 401 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
@@ -726,6 +716,11 @@
          0,   0,   0,   0,   0,   0,   0,   0, 
          0,   0,   0,   0,   0,   0,   0,   0, 
        };
+
+#line 721 "<stdout>"
+{
+       YYCTYPE yych;
+       unsigned int yyaccept;
        goto yy46;
        ++YYCURSOR;
 yy46:
@@ -740,16 +735,16 @@
        if(yych == '=') goto yy53;
        goto yy49;
 yy49:
-#line 321 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 321 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { --YYCURSOR; goto state_next_arg_begin; }
-#line 455 "<stdout>"
+#line 741 "<stdout>"
 yy50:  ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy54;
 yy51:
-#line 320 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 320 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; }
-#line 461 "<stdout>"
+#line 748 "<stdout>"
 yy52:  yych = *++YYCURSOR;
        goto yy49;
 yy53:  ++YYCURSOR;
@@ -772,17 +767,12 @@
        case 0: goto yy49;
        }
 }
-#line 322 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 322 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 
 
 state_val:
        start = YYCURSOR;
-
-#line 488 "<stdout>"
-{
-       YYCTYPE yych;
-       unsigned int yyaccept;
        static unsigned char yybm[] = {
        248, 248, 248, 248, 248, 248, 248, 248, 
        248, 160, 160, 248, 248, 248, 248, 248, 
@@ -817,6 +807,11 @@
        248, 248, 248, 248, 248, 248, 248, 248, 
        248, 248, 248, 248, 248, 248, 248, 248, 
        };
+
+#line 812 "<stdout>"
+{
+       YYCTYPE yych;
+       unsigned int yyaccept;
        goto yy58;
        ++YYCURSOR;
 yy58:
@@ -844,9 +839,9 @@
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy77;
 yy61:
-#line 330 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 330 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { handle_val(STD_ARGS, 0, '\0'); goto state_next_arg_begin; }
-#line 555 "<stdout>"
+#line 845 "<stdout>"
 yy62:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy69;
@@ -855,9 +850,9 @@
 yy64:  ++YYCURSOR;
        goto yy65;
 yy65:
-#line 331 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 331 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { passthru(STD_ARGS); goto state_next_arg_begin; }
-#line 566 "<stdout>"
+#line 856 "<stdout>"
 yy66:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -884,9 +879,9 @@
        }
        goto yy71;
 yy71:
-#line 329 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 329 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
-#line 595 "<stdout>"
+#line 885 "<stdout>"
 yy72:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -920,9 +915,9 @@
        }
        goto yy79;
 yy79:
-#line 328 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 328 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
-#line 631 "<stdout>"
+#line 921 "<stdout>"
 yy80:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
@@ -936,7 +931,7 @@
        yych = *YYCURSOR;
        goto yy79;
 }
-#line 332 "/usr/src/php/php_4_3/ext/standard/url_scanner_ex.re"
+#line 332 "/usr/src/php/php5/ext/standard/url_scanner_ex.re"
 
 
 stop:
@@ -1115,6 +1110,7 @@
 PHP_MSHUTDOWN_FUNCTION(url_scanner)
 {
        UNREGISTER_INI_ENTRIES();
+
        return SUCCESS;
 }
 

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

Reply via email to