TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Edwards
from: Roy McNeill
date: 1995-03-21 00:24:42
subject: emx bug

PE> /* According to my interpretation of ISO/IEC 9899:1990, this

 PE>    program should print "2".  It prints "-1"
instead, under

 PE>    EMX 0.9a. */



 PE> #include 



 PE> int main(void)

 PE> {

 PE>     char buf[50] = "5 6";

 PE>     int x, y;

 PE>     int ret;



 PE>     ret = sscanf(buf, "%d %d p", &x, &y);

 PE>     printf("ret is %d\n", ret);

 PE>     return (0);

 PE> }



Dunno about EMX, but quoting from my much-maligned Borland manual,



"If sscanf attempts to read at end-of-string, the return value is EOF."



Cheers



--- PPoint 1.88


* Origin: Silicon Heaven (3:711/934.16)
SEEN-BY: 711/809 934
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.