From af316021e8f69896cd0d246114962e48b973972f Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 16 Mar 2008 21:06:55 +0000 Subject: - Rewrite scanner to be based on re2c instead of flex The full patch is available as: http://php.net/~helly/php-re2c-5.3-20080316.diff.txt This is against php-re2c repository version 98 An older patch against version 97 is available under: http://php.net/~helly/php-re2c-97-20080316.diff.txt --- sapi/cli/php_cli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sapi/cli/php_cli.c') diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 806cc214c2..3392fb0b22 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -550,6 +550,9 @@ static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file, *lineno = 1; + file_handle->type = ZEND_HANDLE_FP; + file_handle->opened_path = NULL; + file_handle->free_filename = 0; if (!(file_handle->handle.fp = VCWD_FOPEN(script_file, "rb"))) { php_printf("Could not open input file: %s\n", script_file); return FAILURE; @@ -1166,7 +1169,7 @@ int main(int argc, char *argv[]) case PHP_MODE_INDENT: open_file_for_scanning(&file_handle TSRMLS_CC); zend_indent(); - fclose(file_handle.handle.fp); + zend_file_handle_dtor(file_handle.handle TSRMLS_CC); goto out; break; #endif -- cgit v1.2.1