Re: win32 line endings again
| From: | Frank M. Kromann | Date: | Sat, 17 Sep 2005 14:34:06 +0000 |
| Subject: | Re: win32 line endings again | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-1657@lists.php.net to get a copy of this message | ||
It's most likely not the OS but the cvs client. The cvs client has settings
that specify how linefeeds are handled on checkout and import/commit.
- Frank
> Hiya Tom,
>
> I'm totally confused as to why we're seeing different behaviour under
the
> same plaform, but it's not the first time you've mentioned this.
>
> It'll need an OS check...
>
> - Steph
>
> ----- Original Message -----
> From: "Tom Rogers" <trogers@kwikin.com>
> To: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
> Sent: Saturday, September 17, 2005 6:37 AM
> Subject: [PHP-GTK-DEV] win32 line endings again
>
>
> > 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
> >
> > --
> > PHP-GTK Development Mailing List (http://gtk.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP-GTK Development Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>