PE> ret = sscanf(buf, "%d %d p", &x, &y);
MB> I think that EMX is behaving correctly. If 'p' is not matched exactly,
MB> that is a failure of the input stream, and sscanf() should return EOF.
MB> I checked using Borland C and Watcom C, and both return 2. Reading the
MB> spec document, however, suggests that the proper return is, in fact, EOF.
I disagree, here is the relevant quote...
"The sscanf function returns the value of the macro EOF if an
input failure occurs before any conversion. Otherwise, the
^^^^^^ ^^^^^^^^^
sscanf function returns the number of input items assigned,
which can be fewer than provided for, or even zero, in the
event of an early matching failure".
Paul
@EOT:
---
* Origin: This is just another kludge line like SEENBY (3:711/934.9)
|