From: Andi Gutmans Date: Wed, 2 May 2001 21:52:30 +0000 (+0000) Subject: - Support \r as newline in the ini scanner X-Git-Tag: php-4.0.6RC1~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5aec595716cba2fb9e85cccc8e415f654fc829ab;p=php - Support \r as newline in the ini scanner --- diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index 0c5e43e8b1..d78a146dfe 100644 --- a/Zend/zend_ini_scanner.l +++ b/Zend/zend_ini_scanner.l @@ -162,6 +162,8 @@ void zend_ini_close_file(zend_file_handle *fh) %} +NEWLINE ("\r"|"\n"|"\r\n") + %option noyywrap %option yylineno @@ -183,7 +185,7 @@ void zend_ini_close_file(zend_file_handle *fh) return CFG_FALSE; } -[[][^[]+[\]]([\n]?|"\r\n"?) { +[[][^[]+[\]]{NEWLINE}? { /* SECTION */ /* eat trailng ] */ @@ -261,11 +263,11 @@ void zend_ini_close_file(zend_file_handle *fh) return yytext[0]; } -"\r\n" { +{NEWLINE} { return '\n'; } -[;][^\r\n]*[\r\n]? { +[;][^\r\n]*{NEWLINE}? { /* comment */ return '\n'; }