lua-users home
lua-l archive

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


On Sat, May 4, 2013 at 6:01 PM, Petite Abeille <petite.abeille@gmail.com> wrote:

On May 4, 2013, at 11:55 PM, Coda Highland <chighland@gmail.com> wrote:

> The problem with that, little bee, is that it stops reading on EOF,
> not EOL, which was the request.

Not a problem. Rather an opportunity to read a file in controlled chunks length, which is the crux of the issue, and simply recompose the lines by oneself. So… instead of complicating the read() API with obscure notations, just turn the problem around.



That's true. I was just thinking '*l' without a length limit is vulnerable to being given a potentially endless line, but I guess that's more a reason to not use '*l' in cases where the input can't be trusted than to change how it works.

--
Sent from my Game Boy.