[Top][All Lists]

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

Re: [Nmh-workers] cleaning out the cobwebs

From: Peter Maydell
Subject: Re: [Nmh-workers] cleaning out the cobwebs
Date: Wed, 03 Nov 2010 21:40:56 +0000

Jon Steinhart wrote:
>> Yes. m_getfld will give you the body text (in a series of chunks
>> the size of the buffer you hand it, IIRC) and what you do with
>> it after that is up to you. This is how nmh's existing MIME
>> handling code works. (I suppose you could propose replacing
>> m_getfld completely with something with a different and MIME
>> aware API, but that would be an extensive project...)

>Well, yeah, that is what I'm thinking about.  Seems silly to have m_getfld call
>something that sort of looks like m_getfld but is different.  Making it work 
>to all of the body parts would in my mind be architecturally better for nmh.  
>as you say, more work.

If you did want to replace it I would suggest that a new API
ought to involve just getting a complete header/body part
in one go rather than m_getfld's keep-looping-round-til-I-say-stop
approach. That design made sense on the VAX (it is attempting
to avoid memory allocations) but on a modern machine it
just makes the calling code jump through hoops and liable
to buffer overruns or random fixed length limits.

m_getfld but with some extra states for MIME parts I think
would not be a very useful direction to go in.

-- PMM

reply via email to

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