From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5541 invoked by alias); 8 Apr 2007 14:11:01 -0000 Received: (qmail 5527 invoked by uid 22791); 8 Apr 2007 14:11:00 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 08 Apr 2007 15:10:59 +0100 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 40F8F4B267; Sun, 8 Apr 2007 09:10:57 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 60A994B262; Sun, 8 Apr 2007 09:10:52 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HaY6V-0003W8-Jn; Sun, 08 Apr 2007 10:10:51 -0400 Date: Sun, 08 Apr 2007 14:11:00 -0000 From: Daniel Jacobowitz To: Andreas Schwab Cc: Eli Zaretskii , mark.kettenis@xs4all.nl, sje@cup.hp.com, gdb-patches@sourceware.org Subject: Re: Patch for isdigit/isalpha/etc. macro arguments Message-ID: <20070408141051.GA13486@caradoc.them.org> Mail-Followup-To: Andreas Schwab , Eli Zaretskii , mark.kettenis@xs4all.nl, sje@cup.hp.com, gdb-patches@sourceware.org References: <200704062336.QAA17806@hpsje.cup.hp.com> <200704062348.l36NmiwC025816@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.14+cvs20070313 (2007-03-13) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00059.txt.bz2 On Sun, Apr 08, 2007 at 11:32:34AM +0200, Andreas Schwab wrote: > Eli Zaretskii writes: > > >> From: Andreas Schwab > >> Cc: mark.kettenis@xs4all.nl, sje@cup.hp.com, > >> gdb-patches@sourceware.org > >> Date: Sat, 07 Apr 2007 19:55:08 +0200 > >> > >> How can it distinguish EOF from '\377'? > > > > The same way you want the calling code to do that. > > So tell me how to distinguish two identical values? I don't think we're getting anywhere... The only thing I can see is that if the caller knows it is not EOF, it should cast to unsigned char. Otherwise if there are signed characters on a platform I don't see any way the library can do the right thing; the cast to int will leave '\377' == EOF. -- Daniel Jacobowitz CodeSourcery