Am Mittwoch, den 14.02.2007, 02:19 -0600 schrieb
[EMAIL PROTECTED]:
> 
> Hi Erwin, 
> 
> > > The problem is, that it seems that sscanf doesn't check the  
> > > range of the var to which the digits should be converted. 
> > >  
> > > [...]
> > > 
> > > In the first case, sscanf doesn't work fine. The problem is, that
> > > th  
> > > maximum integer is 0xffffffff whis is 4294967295. So, my input is
>  
> > > bigger than the maximum value. 
> > > I thought, that in this case, sscanf should set the &ouput  
> > > to INFINITY. Or, at least, it should return 0. But it looks like
> > > sscanf 
> > > just returns a meaningless value. 
> > 
> > why don't you like the idea that I suggested a while ago to set
> errno=0
> > before calling sscanf and check the value of errno afterwards? 
> 
> I'm sorry, but i think that I have not been clear enough that while
> ago. 
> You're idea didn't work. I set errno=0 and after the call to sscanf it
> is  
> still set to 0. 

Sorry, I had simply forgotten that. However, if you use strtol,  errno
will be set properly.

Regards,
Erwin


_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to