[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] m_getfld() interface
From: |
David Levine |
Subject: |
Re: [Nmh-workers] m_getfld() interface |
Date: |
Tue, 25 Dec 2012 12:59:05 -0500 |
I wrote:
> 1) Changed type of name argument from unsigned char * to
> unsigned char[NAMESZ].
>
> 2) Changed msg_style and msg_delim to be file static.
>
> 3) Change bufsz to be in-out instead of in, and therefore
> int * instead of int, and use that instead of global
> msg_count.
I created an m_getfld branch and made those changes.
Then for fun, I replaced all that stdio buffer nastiness in
m_getfld.c with a single call to fread() and then some
almost straightforward buffer manipulations. It passes the
test suite and seems to perform the same (even 1-2% percent
faster), so I committed to the branch.
There are plenty of ways to improve what's there, but I
think this is a step forward and doesn't give up anything.
Needlesstosay, it needs to be reviewed.
David