Use of isspace() and friends in Cyrus

Bron Gondwana brong at fastmail.fm
Fri Mar 20 06:36:45 EDT 2009


On Fri, Mar 20, 2009 at 09:59:37AM +0000, David Carter wrote:
> On Fri, 20 Mar 2009, Bron Gondwana wrote:
>
>> Yeah - there are two choices there, Uisspace, or actually fix all the
>> code to pass unsigned explicitly to isspace.  I don't see any problem
>> with Uisspace.  There's already cyrus_isdigit that I wrote a while
>> back because isdigit() was taking an awful amount of processor for
>> something that really was /[0-9]/ in meaning.
>>
>> So - where would you put the macro?
>
> lib/util.h? That already has:
>
>   #define TOUPPER(c) (convert_to_uppercase[(unsigned char)(c)])
>   #define TOLOWER(c) (convert_to_lowercase[(unsigned char)(c)])

Yeah, that makes sense.  I'd say go for it :)

Bron.


More information about the Cyrus-devel mailing list