This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: Why this change?
- To: hjl@lucon.org (H.J. Lu)
- Subject: Re: Why this change?
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 13 Nov 1998 19:10:57 -0800
- Cc: libc-hacker@cygnus.com
- References: <m0zeVxm-000395C@ocean.lucon.org>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
hjl@lucon.org (H.J. Lu) writes:
> 1. When did "%D" become invalid?
It never was valid after libc4 according to the reporter. I do not
even know where this came from.
> 2. What should
>
> sscanf ("12345", "%Z", &x)
>
> return? Both Solaris and HP-UX return 0 when the format specifier is
> invalid.
The problem is that invalid formats are then unrecognizable from those
which haven't performed any assignment:
sscanf ("12345", "%*Z", &x)
You'll never know when the call failed because of an invalid format
string since it also returns 0 if it is successful.
The ISO standard leaves this completely unspecified.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------