nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] cleaning out the cobwebs

2010-11-03 21:05:36
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 
down
to all of the body parts would in my mind be architecturally better for nmh.  
But,
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

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>