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.
-- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature
