cvs commit: hugs98/src input.c
nordland@glass.cse.ogi.edu
nordland@glass.cse.ogi.edu
Wed, 5 Dec 2001 16:50:13 -0800
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