linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Bernat <vincent@bernat.im>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Paul Mackerras <paulus@samba.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] ppc/xmon: use isxdigit/isspace/isalnum from ctype.h
Date: Tue, 15 Jul 2014 11:38:51 +0200	[thread overview]
Message-ID: <m3pph7x8pg.fsf@neo.luffy.cx> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D17272643@AcuExch.aculab.com> (David Laight's message of "Tue, 15 Jul 2014 08:55:07 +0000")

 =E2=9D=A6 15 juillet 2014 08:55 GMT, David Laight <David.Laight@ACULAB.COM=
>=C2=A0:

>> Use linux/ctype.h instead of defining custom versions of
>> isxdigit/isspace/isalnum.
>
> ...
>> -#define isspace(c)	(c =3D=3D ' ' || c =3D=3D '\t' || c =3D=3D 10 || c =
=3D=3D 13 || c =3D=3D 0)
>
> That is different from the version in linux/ctype.h
> Especially for 'c =3D=3D 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.
--=20
Parenthesise to avoid ambiguity.
            - The Elements of Programming Style (Kernighan & Plauger)

  reply	other threads:[~2014-07-15  9:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15  7:28 [PATCH] ppc/xmon: use isxdigit/isspace/isalnum from ctype.h Vincent Bernat
2014-07-15  8:55 ` David Laight
2014-07-15  9:38   ` Vincent Bernat [this message]
2014-07-15 11:43     ` [PATCH] ppc/xmon: use isspace/isxdigit/isalnum from linux/ctype.h Vincent Bernat
2014-07-15 23:46       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3pph7x8pg.fsf@neo.luffy.cx \
    --to=vincent@bernat.im \
    --cc=David.Laight@ACULAB.COM \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).