lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


At any rate, what does it mean for a line to have a <CR>
in the middle of it? I understand you can use a trick
like this in a terminal to overwrite something, or in a
printer to do a cheap boldface, but it doesn't seem to
make much sense anywhere else.

Macs before MacOS X (MacOS 9 and older) all use a single
carriage return as the line terminator character.
Linefeeds are not used. I don't know if they take this
"outside the box" and use it for HTTP, so I'm not sure if
it's relevant to the discussion. Most MacOS text/source
editors still support different types of line endings,
CR-only included.

I realize that. And the end of line normalization in the
MIME module deals with any combination of these. What I
meant is for a line that is not terminated by <CR> to have a
<CR> in the middle of it, and only in the context of
receive(), which deals with <CR> and <CRLF>.

If anyone has a reasonable solution for this problem that
does not involve a look-ahead, please feel free to propose.
What I can't do is see a <CR> and return a line, then see a
<LF> on the next read and return an empty line. Or worse,
wait for a <LF> after a <CR> that would never come if I
accepted <CR> as a terminator.