Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBp3H-000220-Ll for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:22:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBp3E-00020Z-Lr for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:22:22 -0500 Received: from [199.232.76.173] (port=56536 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBp3D-00020O-M5 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:22:19 -0500 Received: from mail.gmx.net ([213.165.64.20]:42440) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LBp3C-0004N7-RN for qemu-devel@nongnu.org; Sun, 14 Dec 2008 06:22:19 -0500 Date: Sun, 14 Dec 2008 12:23:45 +0100 (CET) From: Johannes Schindelin Subject: Re: [Qemu-devel] [6023] Use a hex value instead of possibly ambiguous 8 bit character In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas Schwab Cc: Blue Swirl , qemu-devel@nongnu.org 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 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