www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/04/04/14:26:41

Message-Id: <9604041923.AA21912@gnu.mc.xerox.com>
To: "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>
Cc: djgpp-workers AT delorie DOT com
Subject: Re: scanf doubts
In-Reply-To: Your message of "Wed, 03 Apr 1996 10:09:57 PST."
<199604031809 DOT WAA29469 AT video DOT yars DOT free DOT net>
Mime-Version: 1.0
Date: Thu, 4 Apr 1996 11:23:35 PST
From: "Marty Leisner" <leisner AT sdsp DOT mc DOT xerox DOT com>

> 
> In some docs I've read that scanf returns EOF only in case it can
> read no characters at all. Is that correct? If so, the current
> doscan implementation is broken about it and I have to fix it.

Does this include blocking behavior?

I stay away from scanf, its often better to do

fgets(buffer)
sscanf(buffer,...)

and deal with stuff a line at a time...

scanf may well be broken, but I'll try not to find out.


-- 
marty
leisner AT sdsp DOT mc DOT xerox DOT com  
Member of the League for Programming Freedom


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019