I don't think getline() is a generic enough interface,
especially for a utility used to introduce new lines.

Consider for example you want 80x10 lines of "y",
you could do this previously with:

  $ yes | tr -d '\n' | fold -w 80 | head -n 10

While now fold will just consume all of memory.
Instead you might fread() to an IO_BUFSIZE buffer?

cheers,
Padraig

Reply via email to