version 1.1.1.1, 2012/02/21 23:47:52
|
version 1.1.1.3, 2013/07/22 01:32:15
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Zend Engine | |
| Zend Engine | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) | | | Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 2.00 of the Zend license, | |
| This source file is subject to version 2.00 of the Zend 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 56 ZEND_API void zend_html_putc(char c)
|
Line 56 ZEND_API void zend_html_putc(char c)
|
|
|
ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC) |
ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC) |
{ |
{ |
const char *ptr=s, *end=s+len; | const unsigned char *ptr = (const unsigned char*)s, *end = ptr + len; |
| unsigned char *filtered; |
| size_t filtered_len; |
|
|
#ifdef ZEND_MULTIBYTE |
|
char *filtered; |
|
int filtered_len; |
|
|
|
if (LANG_SCNG(output_filter)) { |
if (LANG_SCNG(output_filter)) { |
LANG_SCNG(output_filter)(&filtered, &filtered_len, s, len TSRMLS_CC); | LANG_SCNG(output_filter)(&filtered, &filtered_len, ptr, len TSRMLS_CC); |
ptr = filtered; |
ptr = filtered; |
end = filtered + filtered_len; |
end = filtered + filtered_len; |
} |
} |
#endif /* ZEND_MULTIBYTE */ |
|
|
|
while (ptr<end) { |
while (ptr<end) { |
if (*ptr==' ') { |
if (*ptr==' ') { |
Line 79 ZEND_API void zend_html_puts(const char *s, uint len T
|
Line 76 ZEND_API void zend_html_puts(const char *s, uint len T
|
} |
} |
} |
} |
|
|
#ifdef ZEND_MULTIBYTE |
|
if (LANG_SCNG(output_filter)) { |
if (LANG_SCNG(output_filter)) { |
efree(filtered); |
efree(filtered); |
} |
} |
#endif /* ZEND_MULTIBYTE */ |
|
} |
} |
|
|
|
|
Line 120 ZEND_API void zend_highlight(zend_syntax_highlighter_i
|
Line 115 ZEND_API void zend_highlight(zend_syntax_highlighter_i
|
next_color = syntax_highlighter_ini->highlight_string; |
next_color = syntax_highlighter_ini->highlight_string; |
break; |
break; |
case T_WHITESPACE: |
case T_WHITESPACE: |
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); /* no color needed */ | zend_html_puts((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); /* no color needed */ |
token.type = 0; |
token.type = 0; |
continue; |
continue; |
break; |
break; |
Line 143 ZEND_API void zend_highlight(zend_syntax_highlighter_i
|
Line 138 ZEND_API void zend_highlight(zend_syntax_highlighter_i
|
} |
} |
} |
} |
|
|
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); | zend_html_puts((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); |
|
|
if (token.type == IS_STRING) { |
if (token.type == IS_STRING) { |
switch (token_type) { |
switch (token_type) { |
Line 192 ZEND_API void zend_strip(TSRMLS_D)
|
Line 187 ZEND_API void zend_strip(TSRMLS_D)
|
continue; |
continue; |
|
|
case T_END_HEREDOC: |
case T_END_HEREDOC: |
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); | zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); |
efree(token.value.str.val); |
efree(token.value.str.val); |
/* read the following character, either newline or ; */ |
/* read the following character, either newline or ; */ |
if (lex_scan(&token TSRMLS_CC) != T_WHITESPACE) { |
if (lex_scan(&token TSRMLS_CC) != T_WHITESPACE) { |
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); | zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); |
} |
} |
zend_write("\n", sizeof("\n") - 1); |
zend_write("\n", sizeof("\n") - 1); |
prev_space = 1; |
prev_space = 1; |
Line 204 ZEND_API void zend_strip(TSRMLS_D)
|
Line 199 ZEND_API void zend_strip(TSRMLS_D)
|
continue; |
continue; |
|
|
default: |
default: |
zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); | zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); |
break; |
break; |
} |
} |
|
|