|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* Generated by re2c 0.13.5 */ |
|
|
|
#line 1 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 1 "url_scanner_ex.re" |
|
|
|
/* |
|
|
|
+----------------------------------------------------------------------+ |
|
|
|
| PHP Version 5 | |
|
|
|
@ -74,7 +74,7 @@ static PHP_INI_MH(OnUpdateTags) |
|
|
|
val = strchr(key, '='); |
|
|
|
if (val) { |
|
|
|
char *q; |
|
|
|
int keylen; |
|
|
|
zend_str_size_int keylen; |
|
|
|
|
|
|
|
*val++ = '\0'; |
|
|
|
for (q = key; *q; q++) |
|
|
|
@ -95,7 +95,7 @@ PHP_INI_BEGIN() |
|
|
|
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 102 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 102 "url_scanner_ex.re" |
|
|
|
|
|
|
|
|
|
|
|
#define YYFILL(n) goto done |
|
|
|
@ -114,7 +114,7 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st |
|
|
|
|
|
|
|
scan: |
|
|
|
|
|
|
|
#line 118 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 118 "url_scanner_ex.c" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
static const unsigned char yybm[] = { |
|
|
|
@ -160,19 +160,19 @@ scan: |
|
|
|
if (yych <= '9') goto yy6; |
|
|
|
if (yych >= ';') goto yy4; |
|
|
|
++YYCURSOR; |
|
|
|
#line 120 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 120 "url_scanner_ex.re" |
|
|
|
{ smart_str_append(dest, url); return; } |
|
|
|
#line 166 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 166 "url_scanner_ex.c" |
|
|
|
yy4: |
|
|
|
++YYCURSOR; |
|
|
|
#line 121 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 121 "url_scanner_ex.re" |
|
|
|
{ sep = separator; goto scan; } |
|
|
|
#line 171 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 171 "url_scanner_ex.c" |
|
|
|
yy6: |
|
|
|
++YYCURSOR; |
|
|
|
#line 122 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 122 "url_scanner_ex.re" |
|
|
|
{ bash = p - 1; goto done; } |
|
|
|
#line 176 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 176 "url_scanner_ex.c" |
|
|
|
yy8: |
|
|
|
++YYCURSOR; |
|
|
|
if (YYLIMIT <= YYCURSOR) YYFILL(1); |
|
|
|
@ -180,11 +180,11 @@ yy8: |
|
|
|
if (yybm[0+yych] & 128) { |
|
|
|
goto yy8; |
|
|
|
} |
|
|
|
#line 123 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 123 "url_scanner_ex.re" |
|
|
|
{ goto scan; } |
|
|
|
#line 186 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 186 "url_scanner_ex.c" |
|
|
|
} |
|
|
|
#line 124 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 124 "url_scanner_ex.re" |
|
|
|
|
|
|
|
done: |
|
|
|
|
|
|
|
@ -364,7 +364,7 @@ state_plain_begin: |
|
|
|
state_plain: |
|
|
|
start = YYCURSOR; |
|
|
|
|
|
|
|
#line 368 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 368 "url_scanner_ex.c" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
static const unsigned char yybm[] = { |
|
|
|
@ -407,9 +407,9 @@ state_plain: |
|
|
|
goto yy15; |
|
|
|
} |
|
|
|
++YYCURSOR; |
|
|
|
#line 303 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 303 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; } |
|
|
|
#line 413 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 413 "url_scanner_ex.c" |
|
|
|
yy15: |
|
|
|
++YYCURSOR; |
|
|
|
if (YYLIMIT <= YYCURSOR) YYFILL(1); |
|
|
|
@ -417,17 +417,17 @@ yy15: |
|
|
|
if (yybm[0+yych] & 128) { |
|
|
|
goto yy15; |
|
|
|
} |
|
|
|
#line 304 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 304 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); goto state_plain; } |
|
|
|
#line 423 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 423 "url_scanner_ex.c" |
|
|
|
} |
|
|
|
#line 305 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 305 "url_scanner_ex.re" |
|
|
|
|
|
|
|
|
|
|
|
state_tag: |
|
|
|
start = YYCURSOR; |
|
|
|
|
|
|
|
#line 431 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 431 "url_scanner_ex.c" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
static const unsigned char yybm[] = { |
|
|
|
@ -478,14 +478,14 @@ yy20: |
|
|
|
yych = *YYCURSOR; |
|
|
|
goto yy25; |
|
|
|
yy21: |
|
|
|
#line 310 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 310 "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 484 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 484 "url_scanner_ex.c" |
|
|
|
yy22: |
|
|
|
++YYCURSOR; |
|
|
|
#line 311 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 311 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); goto state_plain_begin; } |
|
|
|
#line 489 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 489 "url_scanner_ex.c" |
|
|
|
yy24: |
|
|
|
++YYCURSOR; |
|
|
|
if (YYLIMIT <= YYCURSOR) YYFILL(1); |
|
|
|
@ -496,7 +496,7 @@ yy25: |
|
|
|
} |
|
|
|
goto yy21; |
|
|
|
} |
|
|
|
#line 312 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 312 "url_scanner_ex.re" |
|
|
|
|
|
|
|
|
|
|
|
state_next_arg_begin: |
|
|
|
@ -505,7 +505,7 @@ state_next_arg_begin: |
|
|
|
state_next_arg: |
|
|
|
start = YYCURSOR; |
|
|
|
|
|
|
|
#line 509 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 509 "url_scanner_ex.c" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
static const unsigned char yybm[] = { |
|
|
|
@ -570,28 +570,28 @@ yy28: |
|
|
|
++YYCURSOR; |
|
|
|
if ((yych = *YYCURSOR) == '>') goto yy39; |
|
|
|
yy29: |
|
|
|
#line 323 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 323 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); goto state_plain_begin; } |
|
|
|
#line 576 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 576 "url_scanner_ex.c" |
|
|
|
yy30: |
|
|
|
++YYCURSOR; |
|
|
|
yy31: |
|
|
|
#line 320 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 320 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; } |
|
|
|
#line 582 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 582 "url_scanner_ex.c" |
|
|
|
yy32: |
|
|
|
++YYCURSOR; |
|
|
|
yych = *YYCURSOR; |
|
|
|
goto yy38; |
|
|
|
yy33: |
|
|
|
#line 321 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 321 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); goto state_next_arg; } |
|
|
|
#line 590 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 590 "url_scanner_ex.c" |
|
|
|
yy34: |
|
|
|
++YYCURSOR; |
|
|
|
#line 322 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 322 "url_scanner_ex.re" |
|
|
|
{ --YYCURSOR; STATE = STATE_ARG; goto state_arg; } |
|
|
|
#line 595 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 595 "url_scanner_ex.c" |
|
|
|
yy36: |
|
|
|
yych = *++YYCURSOR; |
|
|
|
goto yy29; |
|
|
|
@ -609,13 +609,13 @@ yy39: |
|
|
|
yych = *YYCURSOR; |
|
|
|
goto yy31; |
|
|
|
} |
|
|
|
#line 324 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 324 "url_scanner_ex.re" |
|
|
|
|
|
|
|
|
|
|
|
state_arg: |
|
|
|
start = YYCURSOR; |
|
|
|
|
|
|
|
#line 619 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 619 "url_scanner_ex.c" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
static const unsigned char yybm[] = { |
|
|
|
@ -663,14 +663,14 @@ yy42: |
|
|
|
yych = *YYCURSOR; |
|
|
|
goto yy47; |
|
|
|
yy43: |
|
|
|
#line 329 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 329 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; } |
|
|
|
#line 669 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 669 "url_scanner_ex.c" |
|
|
|
yy44: |
|
|
|
++YYCURSOR; |
|
|
|
#line 330 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 330 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; } |
|
|
|
#line 674 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 674 "url_scanner_ex.c" |
|
|
|
yy46: |
|
|
|
++YYCURSOR; |
|
|
|
if (YYLIMIT <= YYCURSOR) YYFILL(1); |
|
|
|
@ -681,13 +681,13 @@ yy47: |
|
|
|
} |
|
|
|
goto yy43; |
|
|
|
} |
|
|
|
#line 331 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 331 "url_scanner_ex.re" |
|
|
|
|
|
|
|
|
|
|
|
state_before_val: |
|
|
|
start = YYCURSOR; |
|
|
|
|
|
|
|
#line 691 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 691 "url_scanner_ex.c" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
static const unsigned char yybm[] = { |
|
|
|
@ -734,17 +734,17 @@ yy50: |
|
|
|
if (yych == ' ') goto yy57; |
|
|
|
if (yych == '=') goto yy55; |
|
|
|
yy51: |
|
|
|
#line 337 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 337 "url_scanner_ex.re" |
|
|
|
{ --YYCURSOR; goto state_next_arg_begin; } |
|
|
|
#line 740 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 740 "url_scanner_ex.c" |
|
|
|
yy52: |
|
|
|
++YYCURSOR; |
|
|
|
yych = *YYCURSOR; |
|
|
|
goto yy56; |
|
|
|
yy53: |
|
|
|
#line 336 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 336 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; } |
|
|
|
#line 748 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 748 "url_scanner_ex.c" |
|
|
|
yy54: |
|
|
|
yych = *++YYCURSOR; |
|
|
|
goto yy51; |
|
|
|
@ -766,14 +766,14 @@ yy57: |
|
|
|
YYCURSOR = YYMARKER; |
|
|
|
goto yy51; |
|
|
|
} |
|
|
|
#line 338 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 338 "url_scanner_ex.re" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state_val: |
|
|
|
start = YYCURSOR; |
|
|
|
|
|
|
|
#line 777 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 777 "url_scanner_ex.c" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
static const unsigned char yybm[] = { |
|
|
|
@ -834,9 +834,9 @@ state_val: |
|
|
|
yych = *(YYMARKER = ++YYCURSOR); |
|
|
|
if (yych != '>') goto yy76; |
|
|
|
yy63: |
|
|
|
#line 347 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 347 "url_scanner_ex.re" |
|
|
|
{ passthru(STD_ARGS); goto state_next_arg_begin; } |
|
|
|
#line 840 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 840 "url_scanner_ex.c" |
|
|
|
yy64: |
|
|
|
yych = *(YYMARKER = ++YYCURSOR); |
|
|
|
if (yych == '>') goto yy63; |
|
|
|
@ -846,9 +846,9 @@ yy65: |
|
|
|
yych = *YYCURSOR; |
|
|
|
goto yy69; |
|
|
|
yy66: |
|
|
|
#line 346 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 346 "url_scanner_ex.re" |
|
|
|
{ handle_val(STD_ARGS, 0, ' '); goto state_next_arg_begin; } |
|
|
|
#line 852 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 852 "url_scanner_ex.c" |
|
|
|
yy67: |
|
|
|
yych = *++YYCURSOR; |
|
|
|
goto yy63; |
|
|
|
@ -875,9 +875,9 @@ yy72: |
|
|
|
goto yy63; |
|
|
|
yy73: |
|
|
|
++YYCURSOR; |
|
|
|
#line 345 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 345 "url_scanner_ex.re" |
|
|
|
{ handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; } |
|
|
|
#line 881 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 881 "url_scanner_ex.c" |
|
|
|
yy75: |
|
|
|
++YYCURSOR; |
|
|
|
if (YYLIMIT <= YYCURSOR) YYFILL(1); |
|
|
|
@ -888,11 +888,11 @@ yy76: |
|
|
|
} |
|
|
|
if (yych >= '>') goto yy72; |
|
|
|
++YYCURSOR; |
|
|
|
#line 344 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 344 "url_scanner_ex.re" |
|
|
|
{ handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; } |
|
|
|
#line 894 "ext/standard/url_scanner_ex.c" |
|
|
|
#line 894 "url_scanner_ex.c" |
|
|
|
} |
|
|
|
#line 348 "ext/standard/url_scanner_ex.re" |
|
|
|
#line 348 "url_scanner_ex.re" |
|
|
|
|
|
|
|
|
|
|
|
stop: |
|
|
|
@ -978,7 +978,7 @@ static int php_url_scanner_ex_deactivate(TSRMLS_D) |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
static void php_url_scanner_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC) |
|
|
|
static void php_url_scanner_output_handler(char *output, zend_str_size_uint output_len, char **handled_output, zend_str_size_uint *handled_output_len, int mode TSRMLS_DC) |
|
|
|
{ |
|
|
|
size_t len; |
|
|
|
|
|
|
|
@ -1009,10 +1009,10 @@ static void php_url_scanner_output_handler(char *output, uint output_len, char * |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int value_len, int urlencode TSRMLS_DC) |
|
|
|
PHPAPI int php_url_scanner_add_var(char *name, zend_str_size_int name_len, char *value, zend_str_size_int value_len, int urlencode TSRMLS_DC) |
|
|
|
{ |
|
|
|
char *encoded; |
|
|
|
int encoded_len; |
|
|
|
zend_str_size_int encoded_len; |
|
|
|
smart_str val; |
|
|
|
|
|
|
|
if (! BG(url_adapt_state_ex).active) { |
|
|
|
|