nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Starting the final call for features for 1.7

2016-10-11 05:12:33
Hi Ken,

I think that buf may only be len long on occasion when the NUL is
added.

So could we get a Ralph-ified version?  I think the necessary
configure glue should be straightforward, but someone else will have
to test it.  I'd be glad to commit it, though.

I've written a getline(3) from scratch based on
https://manned.org/getdelim.3p and am happy for it to have whatever
licence nmh needs.  I've assumed POSIX, e.g. stdbool.h, SSIZE_MAX, etc.,
so it may need some conditional preprocessor bits for portability to
older systems.

It's quite a fun problem because it's a bit of a "loop and a half" where
you don't want more input, but need to produce a bit more output.  One
can spend ages re-arranging the deckchairs, but I finally went with the
attached.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

Attachment: getline.c
Description: getline.c implementation by Ralph Corderoy

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers
<Prev in Thread] Current Thread [Next in Thread>