cvs commit: hugs98/src input.c

Sigbjorn Finne sof@galois.com
Wed, 5 Dec 2001 22:43:59 -0800


It seems to work, but  given the amount of bugs & issues the topic
of line termination have been the source of in numerous other
cross-platform systems, my humble opinion is that it would be
prudent not to make this change so close to a new release.

--sigbjorn

----- Original Message -----
From: <nordland@glass.cse.ogi.edu>
To: <cvs-hugs@haskell.org>
Sent: Wednesday, December 05, 2001 16:50
Subject: cvs commit: hugs98/src input.c


> nordland    2001/12/05 16:50:13 PST
>
>   Modified files:
>     src                  input.c
>   Log:
>   ***EXPERIMENTAL*** Added support for both \n and \r as line terminators.
>   Works fine under unixen and MacOS 8, but I haven't tried it under
WinDOS.
>   It should work, though, as I understand the assumption here is that
every
>   CRLF is converted to a single \n before Hugs will ever see any chars.
So
>   line numbers should be reported correctly for every combination of
platform
>   and linefeed-convention, except for DOS files under unix and MacOS.
>
>   Would someone (Sigbjorn?) be kind enough to recompile and check this as
>   soon as possible?  If there are any problems I'll withdraw this change
>   immediately!
>
>   One could also consider a more robust scheme, where source files are
>   analyzed to determine their linefeed-convention.  But I don't think it's
>   worth the trouble, and my fix will already take care of most examples
>   of cross-platform problems...
>
>   Revision  Changes    Path
>   1.30      +16 -16    hugs98/src/input.c
>
> _______________________________________________
> Cvs-hugs mailing list
> Cvs-hugs@haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-hugs