This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Why this change?


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   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]