On Thu, Feb 19, 2026 at 08:30:56PM +0800, Kevin J. McCarthy wrote:
> On Wed, Feb 18, 2026 at 03:20:25PM +0100, Alejandro Colomar wrote:
> > I've been looking at these functions and macros recently in neomutt(1),
> > and I was thinking that maybe we should have macros that define the
> > specific different kinds of white space.  Something like this:
> > 
> >     #define MUTT_CTYPE_SPACE_C      " \t\n\v\f\r"  // [:space:]
> >     #define MUTT_CTYPE_RFC5322_FWS  " \t\r\n"   // 'FWS' (3.2.2.)
> > 
> > then, we could use it for example here to replace the SKIPWS() call as
> > 
> >     s += strspn(s, MUTT_CTYPE_SPACE_C);
> > 
> > The name of the white-space macro would make it more readable to
> > understand exactly which kind of white space is used in each call.
> > 
> > Also, strspn() is C89 standard, and quite simple to understand, compared
> > to groking all the different macros --with inconsistent names-- we have.
> > 
> > What do you think?
> 
> I'm not dead set against it, but I've never thought the macros or naming
> were confusing.
> 
> Making the implementation of each the same seems like a good idea, but I
> think it would be a shame to get ride of the skip_xxx() and is_xxx() macros.
> To me they make the code more readable, not less.
> 
> However, I've been looking at the code for a long time, so I'm sure I'm
> biased by familiarity.

A little late, but I had that mail still laying around, I think those
macros do read fine. Let's keep them.

Reply via email to