From: Zeev Suraski Date: Mon, 6 Aug 2001 14:26:05 +0000 (+0000) Subject: Better shared code X-Git-Tag: PRE_ENGINE2_SPLIT~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85875e83ae665f1d00b3d6f6d6924b683a905514;p=php Better shared code --- diff --git a/Zend/flex.skl b/Zend/flex.skl index d84fa3dd6a..596c6dcddf 100644 --- a/Zend/flex.skl +++ b/Zend/flex.skl @@ -229,8 +229,6 @@ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; - /* Points to current character in buffer. */ #define yy_c_buf_p SCNG(c_buf_p) #define yy_init SCNG(init) @@ -292,14 +290,12 @@ static void yy_flex_free YY_PROTO(( void * )); #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) %% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here -#ifdef ZTS #undef yyleng #define yyleng SCNG(yy_leng) #undef yytext #define yytext SCNG(yy_text) #undef yytext_ptr #define yytext_ptr SCNG(yy_text) -#endif %- Standard (non-C++) definition diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c index 5fde390a7a..ec14175320 100644 --- a/Zend/zend_highlight.c +++ b/Zend/zend_highlight.c @@ -25,14 +25,6 @@ #include "zend_ptr_stack.h" #include "zend_globals.h" -#ifndef ZTS -extern char *zendtext; -extern int zendleng; -#else -#define zendtext LANG_SCNG(yy_text) -#define zendleng LANG_SCNG(yy_leng) -#endif - ZEND_API void zend_html_putc(char c) { switch (c) { @@ -116,7 +108,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini in_string = !in_string; break; case T_WHITESPACE: - zend_html_puts(zendtext, zendleng); /* no color needed */ + zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); /* no color needed */ token.type = 0; continue; break; @@ -147,7 +139,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini zend_html_puts(token.value.str.val, token.value.str.len); break; default: - zend_html_puts(zendtext, zendleng); + zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); break; }