nmh-workers
[Top][All Lists]
Advanced

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

Re: some thought on m_getfld


From: David Levine
Subject: Re: some thought on m_getfld
Date: Sat, 16 Sep 2023 12:31:22 -0400

Philipp wrote:

> [2023-09-02 14:41] Ken Hornstein <kenh@pobox.com>
> >
> > I think you are thinking at the wrong scale.  The problem with m_getfld()
> > is not the interface, it is that it should not exist at all.
>
> Actually not quite, I think step by step. First get a good function
> parsing the fields. Then look how this function can be used to parse the
> complete header.

With a scanner/parser approach, I don't think it's necessary to consider
those separately.

I agree with Ken:

> > So this suggests to me that really in most cases the whole header should
> > just be read and then you get some accessor functions to get out the
> > headers you care about.

The nmh code for interfacing with GMail APIs (on the gmailapis branch) does
that.  It's in Python and needs some optimizing, but at least it's brief
and corresponds to the RFCs.

David



reply via email to

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