summaryrefslogtreecommitdiff
path: root/Zend/zend_highlight.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-08-10 22:16:46 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-08-10 22:16:46 +0000
commit60b6ac053e67ca46f674d1ef4876a06bce290a74 (patch)
tree0fe9d64d6c458be7abe9ba29a033cec0f58aa57d /Zend/zend_highlight.c
parentcad60c3760b7c858b3280ad1f1b9ea9f4187c710 (diff)
downloadphp-git-60b6ac053e67ca46f674d1ef4876a06bce290a74.tar.gz
Fixed bug #29606 (php_strip_whitespace() prints to stdout rather then
returning the value).
Diffstat (limited to 'Zend/zend_highlight.c')
-rw-r--r--Zend/zend_highlight.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c
index 757a4a1284..da74069b55 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -203,7 +203,7 @@ ZEND_API void zend_strip(TSRMLS_D)
switch (token_type) {
case T_WHITESPACE:
if (!prev_space) {
- putchar(' ');
+ zend_write(" ", sizeof(" ") - 1);
prev_space = 1;
}
/* lack of break; is intentional */
@@ -215,9 +215,9 @@ ZEND_API void zend_strip(TSRMLS_D)
case T_END_HEREDOC: {
char *ptr = LANG_SCNG(yy_text);
- fwrite(ptr, LANG_SCNG(yy_leng) - 1, 1, stdout);
+ zend_write(ptr, LANG_SCNG(yy_leng) - 1);
/* The ensure that we only write one ; and that it followed by the required newline */
- putchar('\n');
+ zend_write("\n", sizeof("\n") - 1);
if (ptr[LANG_SCNG(yy_leng) - 1] == ';') {
lex_scan(&token TSRMLS_CC);
}
@@ -226,7 +226,7 @@ ZEND_API void zend_strip(TSRMLS_D)
break;
default:
- fwrite(LANG_SCNG(yy_text), LANG_SCNG(yy_leng), 1, stdout);
+ zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
}