[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8
From: |
Johannes Schindelin |
Subject: |
Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character |
Date: |
Sun, 14 Dec 2008 12:23:45 +0100 (CET) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
Hi,
Please Cc: me, I only did not miss your message because it is a slow
Sunday morning (_and_ I am not in a deep hacking session).
On Sun, 14 Dec 2008, Andreas Schwab wrote:
> Johannes Schindelin <address@hidden> writes:
>
> > +#define ADD_CHAR(c) buffer[j++] = (c) ? '.' : (c)
Oops. This is obviously wrong, and should read
#define ADD_CHAR(c) buffer[j++] = (c) < ' ' ? '.' : (c)
> isprint(c) perhaps?
I vote against using isprint(c). The code is simple as it is, otherwise
you'd have to look up what isprint() does, _and_ rely on isprint() being
present.
I know, there are many people on this list who are all too happy to rely
on new-fangled C99 stuff or lock themselves (and others) in with GCCisms.
Peronally, though, I find it utterly stupid to do that unless you really
have to.
Ciao,
Dscho
- [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Blue Swirl, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Johannes Schindelin, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Blue Swirl, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Johannes Schindelin, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Andreas Schwab, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character,
Johannes Schindelin <=
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Erik de Castro Lopo, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Johannes Schindelin, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Jamie Lokier, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, M. Warner Losh, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Blue Swirl, 2008/12/14
- Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character, Blue Swirl, 2008/12/14