| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Message-ID: | <01f201c0b8d5$6e9c5d60$0200a8c0@lifelesswks> |
| From: | "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au> |
| To: | "Mumit Khan" <khan AT NanoTech DOT Wisc DOT EDU>, |
| "Uwe Pahner" <uwe DOT pahner AT esat DOT kuleuven DOT ac DOT be> | |
| Cc: | <cygwin AT cygwin DOT com> |
| References: | <Pine DOT HPP DOT 3 DOT 96 DOT 1010329222253 DOT 29265D-100000 AT hp2 DOT xraylith DOT wisc DOT edu> |
| Subject: | Re: fscanf does not return EOF |
| Date: | Fri, 30 Mar 2001 14:53:52 +1000 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook Express 5.50.4133.2400 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
| X-OriginalArrivalTime: | 30 Mar 2001 04:48:40.0199 (UTC) FILETIME=[B09C6170:01C0B8D4] |
----- Original Message ----- From: "Mumit Khan" <khan AT NanoTech DOT Wisc DOT EDU> To: "Uwe Pahner" <uwe DOT pahner AT esat DOT kuleuven DOT ac DOT be> Cc: <cygwin AT cygwin DOT com> Sent: Friday, March 30, 2001 2:31 PM Subject: Re: fscanf does not return EOF > On Thu, 29 Mar 2001, Uwe Pahner wrote: > > > Hi, > > > > I suggest portable coding, where you read the lines one by one using > fgets, checking for EOF, and if not, pass the line buffer it to sscanf. > Or, use fscanf, but check explicitly for eof on the stream when you > see a return value of 0. > > I may of course be reading the specification wrong. > > Regards, > Mumit > I think you're right: I am using fscanf in my fifo tests, and the first iteration was written without checking the specs:].. as soon as I ran man 3 fscanf on my opsnBSD machine (best man pages ever) I saw the same point of confusion. Coding to the spec worked fine on cygwin. Rob -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |