nmh-workers
[Top][All Lists]
Advanced

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

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


From: Ralph Corderoy
Subject: Re: [Nmh-workers] Starting the final call for features for 1.7
Date: Tue, 11 Oct 2016 11:12:09 +0100

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]