Diff for /embedaddon/php/ext/standard/url_scanner_ex.c between versions 1.1.1.1 and 1.1.1.5

version 1.1.1.1, 2012/02/21 23:48:02 version 1.1.1.5, 2014/06/15 20:03:57
Line 1 Line 1
/* Generated by re2c 0.13.5 on Fri Dec 31 23:52:51 2010 *//* Generated by re2c 0.13.5 */
 /*  /*
   +----------------------------------------------------------------------+    +----------------------------------------------------------------------+
   | PHP Version 5                                                        |    | PHP Version 5                                                        |
   +----------------------------------------------------------------------+    +----------------------------------------------------------------------+
  | Copyright (c) 1997-2006 The PHP Group                                |  | Copyright (c) 1997-2014 The PHP Group                                |
   +----------------------------------------------------------------------+    +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |    | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |    | that is bundled with this package in the file LICENSE, and is        |
Line 62  static PHP_INI_MH(OnUpdateTags) Line 62  static PHP_INI_MH(OnUpdateTags)
                         return FAILURE;                          return FAILURE;
                 }                  }
         }          }
   
         zend_hash_init(ctx->tags, 0, NULL, NULL, 1);          zend_hash_init(ctx->tags, 0, NULL, NULL, 1);
                   
         for (key = php_strtok_r(tmp, ",", &lasts);          for (key = php_strtok_r(tmp, ",", &lasts);
Line 300  static void handle_form(STD_PARA)  Line 301  static void handle_form(STD_PARA) 
 static inline void handle_tag(STD_PARA)   static inline void handle_tag(STD_PARA) 
 {  {
         int ok = 0;          int ok = 0;
        int i;        unsigned int i;
   
         ctx->tag.len = 0;          ctx->tag.len = 0;
         smart_str_appendl(&ctx->tag, start, YYCURSOR - start);          smart_str_appendl(&ctx->tag, start, YYCURSOR - start);
Line 716  state_val: Line 717  state_val:
 {  {
         YYCTYPE yych;          YYCTYPE yych;
         static const unsigned char yybm[] = {          static const unsigned char yybm[] = {
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 160, 160, 248, 248, 160, 248, 248,                 224, 192, 192, 224, 224, 192, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                160, 248,  56, 248, 248, 248, 248, 200,                 192, 224,  64, 224, 224, 224, 224, 128, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248,   0, 248,                 224, 224, 224, 224, 224, 224,   0, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
                248, 248, 248, 248, 248, 248, 248, 248,                 224, 224, 224, 224, 224, 224, 224, 224, 
         };          };
        if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);        if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
         yych = *YYCURSOR;          yych = *YYCURSOR;
         if (yych <= ' ') {          if (yych <= ' ') {
                 if (yych <= '\f') {                  if (yych <= '\f') {
                         if (yych <= 0x08) goto yy63;                          if (yych <= 0x08) goto yy63;
                        if (yych <= '\n') goto yy64;                        if (yych <= '\n') goto yy65;
                         goto yy63;                          goto yy63;
                 } else {                  } else {
                        if (yych <= '\r') goto yy64;                        if (yych <= '\r') goto yy65;
                         if (yych <= 0x1F) goto yy63;                          if (yych <= 0x1F) goto yy63;
                        goto yy64;                        goto yy65;
                 }                  }
         } else {          } else {
                 if (yych <= '&') {                  if (yych <= '&') {
                         if (yych != '"') goto yy63;                          if (yych != '"') goto yy63;
                 } else {                  } else {
                         if (yych <= '\'') goto yy62;                          if (yych <= '\'') goto yy62;
                        if (yych == '>') goto yy64;                        if (yych == '>') goto yy65;
                         goto yy63;                          goto yy63;
                 }                  }
         }          }
         yych = *(YYMARKER = ++YYCURSOR);          yych = *(YYMARKER = ++YYCURSOR);
        goto yy77;        if (yych != '>') goto yy74;
 yy61:  yy61:
        { handle_val(STD_ARGS, 0, ' '); goto state_next_arg_begin; }        { passthru(STD_ARGS); goto state_next_arg_begin; }
 yy62:  yy62:
         yych = *(YYMARKER = ++YYCURSOR);          yych = *(YYMARKER = ++YYCURSOR);
           if (yych == '>') goto yy61;
         goto yy69;          goto yy69;
 yy63:  yy63:
        yych = *++YYCURSOR;        ++YYCURSOR;
         yych = *YYCURSOR;
         goto yy67;          goto yy67;
 yy64:  yy64:
        ++YYCURSOR;        { handle_val(STD_ARGS, 0, ' '); goto state_next_arg_begin; }
        { passthru(STD_ARGS); goto state_next_arg_begin; }yy65:
         yych = *++YYCURSOR;
         goto yy61;
 yy66:  yy66:
         ++YYCURSOR;          ++YYCURSOR;
         if (YYLIMIT <= YYCURSOR) YYFILL(1);          if (YYLIMIT <= YYCURSOR) YYFILL(1);
         yych = *YYCURSOR;          yych = *YYCURSOR;
 yy67:  yy67:
        if (yybm[0+yych] & 8) {        if (yybm[0+yych] & 32) {
                 goto yy66;                  goto yy66;
         }          }
        goto yy61;        goto yy64;
 yy68:  yy68:
        YYMARKER = ++YYCURSOR;        ++YYCURSOR;
        if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);        if (YYLIMIT <= YYCURSOR) YYFILL(1);
         yych = *YYCURSOR;          yych = *YYCURSOR;
 yy69:  yy69:
        if (yybm[0+yych] & 16) {        if (yybm[0+yych] & 64) {
                 goto yy68;                  goto yy68;
         }          }
        if (yych <= '&') goto yy72;        if (yych <= '=') goto yy71;
        if (yych >= '(') goto yy61;yy70:
        ++YYCURSOR; 
        if (yybm[0+(yych = *YYCURSOR)] & 8) { 
                goto yy66; 
        } 
yy71: 
        { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; } 
yy72: 
        ++YYCURSOR; 
        if (YYLIMIT <= YYCURSOR) YYFILL(1); 
        yych = *YYCURSOR; 
        if (yybm[0+yych] & 32) { 
                goto yy72; 
        } 
        if (yych <= '=') goto yy75; 
yy74: 
         YYCURSOR = YYMARKER;          YYCURSOR = YYMARKER;
         goto yy61;          goto yy61;
yy75:yy71:
        yych = *++YYCURSOR; 
        goto yy71; 
yy76: 
        YYMARKER = ++YYCURSOR; 
        if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); 
        yych = *YYCURSOR; 
yy77: 
        if (yybm[0+yych] & 64) { 
                goto yy76; 
        } 
        if (yych <= '!') goto yy80; 
        if (yych >= '#') goto yy61; 
         ++YYCURSOR;          ++YYCURSOR;
        if (yybm[0+(yych = *YYCURSOR)] & 8) {        { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
                goto yy66;yy73:
        } 
yy79: 
        { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; } 
yy80: 
         ++YYCURSOR;          ++YYCURSOR;
         if (YYLIMIT <= YYCURSOR) YYFILL(1);          if (YYLIMIT <= YYCURSOR) YYFILL(1);
         yych = *YYCURSOR;          yych = *YYCURSOR;
   yy74:
         if (yybm[0+yych] & 128) {          if (yybm[0+yych] & 128) {
                goto yy80;                goto yy73;
         }          }
        if (yych >= '>') goto yy74;        if (yych >= '>') goto yy70;
         ++YYCURSOR;          ++YYCURSOR;
        yych = *YYCURSOR;        { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
        goto yy79; 
 }  }
   
   
Line 940  static void php_url_scanner_output_handler(char *outpu Line 914  static void php_url_scanner_output_handler(char *outpu
         size_t len;          size_t len;
   
         if (BG(url_adapt_state_ex).url_app.len != 0) {          if (BG(url_adapt_state_ex).url_app.len != 0) {
                *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC);                *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT | PHP_OUTPUT_HANDLER_FLUSH | PHP_OUTPUT_HANDLER_FINAL) ? 1 : 0) TSRMLS_CC);
                 if (sizeof(uint) < sizeof(size_t)) {                  if (sizeof(uint) < sizeof(size_t)) {
                         if (len > UINT_MAX)                          if (len > UINT_MAX)
                                 len = UINT_MAX;                                  len = UINT_MAX;
Line 959  static void php_url_scanner_output_handler(char *outpu Line 933  static void php_url_scanner_output_handler(char *outpu
                         ctx->result.len = 0;                          ctx->result.len = 0;
                         smart_str_free(&ctx->buf);                          smart_str_free(&ctx->buf);
                 } else {                  } else {
                        *handled_output = NULL;                        *handled_output = estrndup(output, *handled_output_len = output_len);
                 }                  }
         } else {          } else {
                 *handled_output = NULL;                  *handled_output = NULL;
Line 974  PHPAPI int php_url_scanner_add_var(char *name, int nam Line 948  PHPAPI int php_url_scanner_add_var(char *name, int nam
                   
         if (! BG(url_adapt_state_ex).active) {          if (! BG(url_adapt_state_ex).active) {
                 php_url_scanner_ex_activate(TSRMLS_C);                  php_url_scanner_ex_activate(TSRMLS_C);
                php_ob_set_internal_handler(php_url_scanner_output_handler, 0, "URL-Rewriter", 1 TSRMLS_CC);                php_output_start_internal(ZEND_STRL("URL-Rewriter"), php_url_scanner_output_handler, 0, PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC);
                 BG(url_adapt_state_ex).active = 1;                  BG(url_adapt_state_ex).active = 1;
         }          }
   

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>