Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2001 20:52:42 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        Bill Fenner <fenner@research.att.com>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/lib/libc/stdlib strtod.c strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c strtoumax.c src/lib/libc/stdio vfscanf.c src/share/mklocale hi_IN.ISCII-DEV.src
Message-ID:  <20011129202803.L1034-100000@gamplex.bde.org>
In-Reply-To: <20011129040314.GA14465@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 29 Nov 2001, Andrey A. Chernov wrote:

> On Wed, Nov 28, 2001 at 19:30:28 -0800, Bill Fenner wrote:
> >
> > >  Back out national digits support, POSIX explicetely disallows it:
> >
> > 	In other than the C  or POSIX locales, other
> > 	implementation-defined subject sequences may be accepted.
> >
> > Maybe I'm misunderstanding what you're saying, but POSIX allows
> > strtol and friends to use locale-specific numbers.
>
> Yes, but not from DIGIT/XDIGIT class. I.e. they must be defined in another
> alternative way, isdigit() and isxdigit() macros must not sense them.
> Currently we don't have any alternative ways.

It's not clear that these apply to the strtol() family.  Footnote 175
in th n869.txt draft of C99 says that neither isdigit() nor isxdigit()
is affected by the locale.  But the strtol() family is not required
to use these (and it can't, for "digits" 16 through 35).  The specification
of the strtol() family in both standards seems so be fuzzy enough to
support each "digit" having many representations (and actually mapping
all of them to the same numeric digit).  OTOH, it doesn't require this.
It permits a simplistic mapping of only '0' (the single compile time
respresentation of '0') to 0, etc., like the sources already do (modulo
the assumption that letters are contiguous and some recently introduced
bugs).  (Please ignore part of my previous private mail about this.)

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011129202803.L1034-100000>