[PATCH] Tiny libc fixes

Petter Reinholdtsen pere@hungry.com
Tue Apr 20 15:36:00 GMT 2004


[Jakub Jelinek]
> 1) Reverting the %% whitespace change from yesterday.
>    Some OSes don't eat the whitespace there while others do, the ISO
>    C99 standard only lists %c, %[ and %n as not eating whitespace,
>    so it is probably better to stay with previous glibc behaviour
>    here.

I agree that it is probably a good idea to stay conservative, but
believe it is a good idea to ask for the C standard to be made clearer
on this point.

Do you have information on how the various implementations of sscanf()
behave in this respect?

The Open Group Base Specification seem clearer on the issue
<URL:http://www.opengroup.org/onlinepubs/007904975/functions/sscanf.html>:

  Input white-space characters (as specified by isspace() ) shall be
  skipped, unless the conversion specification includes a [ , c , C ,
  or n conversion specifier.



More information about the Libc-hacker mailing list