Package: manpages-dev
Version: 3.74-1

Currently `man sscanf`` reads as:

[...]
RETURN VALUE
       These functions return the number of input items successfully
matched and assigned, which can be fewer than provided for, or even
zero in the event of an early matching failure.
[...]

This is incorrect in case a read failure occurs before the first
receiving argument. cppreference reads as (suggested change):

[...]
Return value

Number of receiving arguments successfully assigned, or EOF if read
failure occurs before the first receiving argument was assigned.
[...]

ref: http://en.cppreference.com/w/cpp/io/c/fscanf

example:

[...]
int i;
int n = sscanf( "ABC", "ABCD%d", &i ); // n -> EOF
[...]

Reply via email to