qemu-devel
[Top][All Lists]
Advanced

[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: Blue Swirl
Subject: Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character
Date: Sun, 14 Dec 2008 14:15:41 +0200

On 12/14/08, Johannes Schindelin <address@hidden> wrote:
> 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 agree that we should not use plain old isprint, but instead the
highly advanced, omnipresent qemu_isprint which has none of the
problems of what isprint may have. ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]