[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] read-line
From: |
Felix Winkelmann |
Subject: |
Re: [Chicken-users] read-line |
Date: |
Wed, 11 Dec 2002 14:41:06 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530 |
Joerg F. Wittenberger wrote:
Hi,
I found read-line working somewhat unexpected on network streams
(where the ^M^J or the "apple" line feed rule applies): it inserts
empty lines in between the line feed.
Anybody who objects this change, which understands any of:
#\newline #\return
#\return #\newline
#\newline
#\return
as line delimiter. Sequences, though, should result in empty lines.
There is one little problem, though: when reading data
interactively, and we have normal (1-byte) line-terminators,
then your solution will have to read the next line from the user,
before it can process the current line.
I propose to add an optional flag to `read-line' that
states wether extra line-terminators should be consumed
or not (defaulting to not).
cheers,
felix