[PATCH] Fix *scanf and *strto*
Andreas Jaeger
aj@suse.de
Thu Jul 27 08:30:00 GMT 2000
>>>>> Jakub Jelinek writes:
> Hi!
> This patch fixes a few bugs I found in scanf, strtol and the unused
> indigits*.h headers. Included is a testcase as well.
> BTW: Can we have some testing foo_FOO locale which will have multiple
> characters long indigits and thousand separators?
It shouldn't be a problem to add a locale to localedata/tests.
> Also, in the I18N fix I assumed (because indigits.h seem to do that) that
> if a number starts with a digit from script N, then all the remaining digits
> in the number must be from the same script. Is that good assumption?
> Otherwise I'd have to slightly modify __vfscanf.
[...]
> --- libc/stdio-common/tst-sscanf.c.jj Thu Jul 27 16:05:03 2000
> +++ libc/stdio-common/tst-sscanf.c Thu Jul 27 16:33:39 2000
> @@ -0,0 +1,114 @@
> > + tst_locale = 1;
> + if (tst_locale)
> + if (setlocale(LC_ALL, "en_US") == NULL)
You should add a file stdio-common/Depend that contains "localedata" -
and then add in the Makefile:
tst-sscanf-ENV=$(common-objpfx)localedata
Upps, libio and posix also need a dependency on localedata, I'll send
a separate patch.
Otherwise en_US will not exist - and better use en_US.ANSI_X3.4-1968
(aka ASCII) or en_US.ISO-8859-1.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
More information about the Libc-hacker
mailing list