From owner-freebsd-standards@FreeBSD.ORG Tue Jun 24 06:25:55 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39C2537B401 for ; Tue, 24 Jun 2003 06:25:55 -0700 (PDT) Received: from HAL9000.homeunix.com (ip114.bella-vista.sfo.interquest.net [66.199.86.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B55D43F75 for ; Tue, 24 Jun 2003 06:25:54 -0700 (PDT) (envelope-from das@freebsd.org) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h5ODPriP038573; Tue, 24 Jun 2003 06:25:53 -0700 (PDT) (envelope-from das@freebsd.org) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h5ODPq56038567; Tue, 24 Jun 2003 06:25:52 -0700 (PDT) (envelope-from das@freebsd.org) Date: Tue, 24 Jun 2003 06:25:52 -0700 From: David Schultz To: Andrey Chernov Message-ID: <20030624132552.GA33228@HAL9000.homeunix.com> Mail-Followup-To: Andrey Chernov , standards@freebsd.org References: <20030624114418.GA58305@HAL9000.homeunix.com> <20030624124233.GA83552@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030624124233.GA83552@nagual.pp.ru> cc: standards@freebsd.org Subject: Re: scanf(3) patch for C99-conformant FP parsing X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 13:25:55 -0000 On Tue, Jun 24, 2003, Andrey Chernov wrote: > On Tue, Jun 24, 2003 at 04:44:18 -0700, David Schultz wrote: > > Outstanding issues: > > - I'm not sure that it's okay to use isdigit(3) and > > friends in sprintf(). The standard seems to imply that > > it would be okay if every digit in the C locale were > > also a digit in all other locales. > > isdigit() always for 0..9 only, isxdigit() is a like, don't know, what > you mean by 'friends'. > > > + } else if (!isalnum(c) && c != '_') > > F.e. isalnum() you should use with care, it may hit national characters. That's what I was worried about. I believe that's okay by the standard as long as isalnum() still accepts *at least* [a-z][A-Z][0-9] in any locale. Is this a valid assumption or do I need to test by hand? > BTW, in all cases calling is*() macros on char may have side effects, you > need to promote argument to (unsigned char) first. Okay, I'll do that. Thanks.