"Gary T. Leavens" <[EMAIL PROTECTED]> writes:
> Why do you want to treat ^M as anything other than a whitespace character?

Careful examination reveals that we do actually treat it as a whitespace
 character.  Except when looking for blank lines in literate scripts!

The following patch fixes that:

diff -c -r1.28 input.c
*** input.c     1998/01/29 18:52:20     1.28
--- input.c     1998/02/19 19:00:30
***************
*** 562,568 ****
                  litLines++;
                  return;
              }
!             while (c0==' ' || c0=='\t')/* maybe line is blank?             */
                  skip();
              if (c0=='\n' || c0==EOF)
                  thisLineIs(BLANKLINE);
--- 562,568 ----
                  litLines++;
                  return;
              }
!             while (c0 != '\n' && isIn(c0,SPACE)) /* maybe line is blank?   */
                  skip();
              if (c0=='\n' || c0==EOF)
                  thisLineIs(BLANKLINE);

This will be in the next release but it should be easy enough to apply
 it yourself on Unix.


> You must already be [treating ^M as whitespace] on PCs, so the code
> is there...

Actually, the standard C library functions delete ^M for us so we
never had to explicitly worry about this before.

-- 
Alastair Reid              Yale Haskell Project Hacker
[EMAIL PROTECTED]  http://WWW.CS.Yale.EDU/homes/reid-alastair/


Reply via email to