Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #25883

Re: code

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: code
Date 2012-09-03 18:27 -0700
Organization None to speak of
Message-ID <ln392yvapm.fsf@nuthaus.mib.org> (permalink)
References (1 earlier) <0.c99f3778f5dea1cf9e21.20120903115142BST.87obln4bwh.fsf@bsb.me.uk> <k22u1n$km6$1@speranza.aioe.org> <ln4nnex3ww.fsf@nuthaus.mib.org> <k2385q$elj$1@speranza.aioe.org> <aaknd0F57fU1@mid.individual.net>

Show all headers | View raw


"osmium" <r124c4u102@comcast.net> writes:
> "Bill Cunningham" wrote:
[...]
>>    I did read the man pages but evedently didn't understand them. The man 
>> page said fscanf returns EOF thus it is in my code. EOF on error and end 
>> of file the way I understand it.
>
> Your man page doesn't say that, now does it?

Why do you assume that?  fscanf does return EOF in certain
circumstances.

Here's what "man fscanf" says on my system:

    These functions return the number of input items successfully
    matched and assigned, which can be fewer than provided for,
    or even zero in the event of an early matching failure.

    The value EOF is returned if the end of input is reached before
    either the first successful conversion or a matching failure
    occurs. EOF is also returned if a read error occurs, in which
    case the error indicator for the stream (see ferror(3)) is set,
    and errno is set indicate the error.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-02 22:50 -0400
  Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-02 22:53 -0400
  Re: code Barry Schwarz <schwarzb@dqel.com> - 2012-09-02 21:21 -0700
  Re: code Keith Thompson <kst-u@mib.org> - 2012-09-02 22:23 -0700
    Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 06:56 -0400
  Re: code Angel <angel+news@spamcop.net> - 2012-09-03 07:47 +0000
  Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-03 11:51 +0100
    Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 09:02 -0400
      Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-03 15:02 +0100
        Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-03 17:20 +0100
        Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 14:33 -0400
    Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 14:48 -0400
      Re: code Keith Thompson <kst-u@mib.org> - 2012-09-03 13:11 -0700
        Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 17:41 -0400
          Re: code Keith Thompson <kst-u@mib.org> - 2012-09-03 14:53 -0700
            Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-03 23:10 +0100
          Re: code "osmium" <r124c4u102@comcast.net> - 2012-09-03 16:56 -0500
            Re: code Keith Thompson <kst-u@mib.org> - 2012-09-03 18:27 -0700
        Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 17:50 -0400
          Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 17:54 -0400
            Re: code Barry Schwarz <schwarzb@dqel.com> - 2012-09-03 15:12 -0700
            Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-03 23:23 +0100
              Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 18:42 -0400
                Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 19:11 -0400
                Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-04 00:16 +0100
                Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 20:01 -0400
                Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-04 02:07 +0100
                Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-03 21:17 -0400
                Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-04 02:24 +0100
                Re: code Barry Schwarz <schwarzb@dqel.com> - 2012-09-03 20:55 -0700
                Re: code Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-09-04 11:16 +0100
              Re: code Kenneth Brody <kenbrody@spamcop.net> - 2012-09-04 14:09 -0400
          Re: code Kenneth Brody <kenbrody@spamcop.net> - 2012-09-04 14:07 -0400
            Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-04 18:35 -0400
              Re: code Les Cargill <lcargill99@comcast.com> - 2012-09-04 18:49 -0500
                Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-04 20:56 -0400
                Re: code "Bill Cunningham" <nospam@nspam.invalid> - 2012-09-04 22:05 -0400

csiph-web