Subject: Re: [PATCH] ppc/xmon: use isxdigit/isspace/isalnum from ctype.h

From: Vincent Bernat <[email-masked]>
Date: Tue, 15 Jul 2014 11:38:51 +0200

❦ 15 juillet 2014 08:55 GMT, David Laight <[email-masked]> :

>> Use linux/ctype.h instead of defining custom versions of
>> isxdigit/isspace/isalnum.
>
> ...
>> -#define isspace(c)	(c == ' ' || c == '\t' || c == 10 || c == 13 || c == 0)
>
> That is different from the version in linux/ctype.h
> Especially for 'c == 0', but probably also vertical tab and form feed.

OK. Looking more carefully, the one in ctype.h is 9-13 (11 is vertical
tab, 12 is form feed), 32 and 160 (non-breaking space, not ASCII).

For isxdigit, this is the same. For isalnum, the one in ctype.h does
accept non ASCII chars from 223.

Also, in xmon.c, isxdigit is defined twice.
-- 
Parenthesise to avoid ambiguity.
            - The Elements of Programming Style (Kernighan & Plauger)