win32 line endings again

From: Date: Sat, 17 Sep 2005 05:37:50 +0000
Subject: win32 line endings again
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1653@lists.php.net to get a copy of this message
Hi I just did a completely new checkout and came across a problem with windows line endings again in the generator scripts. This patch fixes the problem. diff -u -w -b -r1.28 override.php --- override.php 4 Sep 2005 06:02:27 -0000 1.28 +++ override.php 17 Sep 2005 05:35:30 -0000 @@ -92,9 +92,11 @@ function _parse_block($block, $blocklineno, $file_name) { - if (strpos($block, "\n")) - list($line, $rest) = explode("\n", $block, 2); - else { + if (strpos($block, "\n")) { + $test = preg_split('/\r\n|\n/',ltrim($block)); + $line = array_shift($test); + $rest = implode("\n",$test); + } else { $line = $block; $rest = ''; } -- Tom

« previous php.gtk.dev (#1653) next »