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


Groups > comp.lang.c > #7264

Re: Determining EOF using fseek()?

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.c
Subject Re: Determining EOF using fseek()?
Date 2011-06-30 03:55 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <iugs3f$djf$1@reader1.panix.com> (permalink)
References <iug5sl$5je$1@speranza.aioe.org> <iugksq$4ev$1@dont-email.me>

Show all headers | View raw


In <iugksq$4ev$1@dont-email.me> Eric Sosman <esosman@ieee-dot-org.invalid> writes:

> > while ((a = fseek(fp,0,SEEK_CUR)) == 0){

>      The fseek() here looks a lot like a no-op: "Go to the position
> zero bytes distant from the current position (i.e., go to Right Here),
> and tell me if you couldn't get there."  What were you expecting it
> to do?  And why?

I think he's trying to use it as a roundabout substitute for feof().

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

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


Thread

Determining EOF using fseek()? Orion <won@bigpond.net.au> - 2011-06-29 21:36 +0000
  Re: Determining EOF using fseek()? John Gordon <gordon@panix.com> - 2011-06-29 21:46 +0000
  Re: Determining EOF using fseek()? Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-29 21:51 -0400
    Re: Determining EOF using fseek()? John Gordon <gordon@panix.com> - 2011-06-30 03:55 +0000
  Re: Determining EOF using fseek()? David Thompson <dave.thompson2@verizon.net> - 2011-07-11 00:26 -0400
  Re: Determining EOF using fseek()? Squeamizh <squeamz@hotmail.com> - 2011-07-10 23:40 -0700
    Re: Determining EOF using fseek()? Uno <merrilljensen@q.com> - 2011-07-16 23:21 -0700

csiph-web