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


Groups > comp.lang.c > #23793

Re: fseek

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: fseek
Date 2012-07-27 07:20 -0400
Organization A noiseless patient Spider
Message-ID <jutthc$24u$1@dont-email.me> (permalink)
References <ab0dc9f6-1432-4b00-b8db-a68d3b14f6a9@googlegroups.com> <jut49v$bgf$1@dont-email.me>

Show all headers | View raw


On 07/27/2012 12:13 AM, Les Cargill wrote:
...
> #include <stdio.h>
> #include <assert.h>
> 
> int main(void)
> {
>     FILE *fp;
>     fp=fopen("j","rb");
>     assert(fp);
> 
>     long l = fseek(fp,0L,SEEK_END);

While that will often do precisely what you're expecting it to do, "A
binary stream need not meaningfully support fseek calls with a whence
value of SEEK_END." (7.21.9.2p3)
-- 
James Kuyper
n

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


Thread

fseek Bill Cunningham <billcun@suddenlink.net> - 2012-07-26 19:22 -0700
  Re: fseek cartec69@gmail.com - 2012-07-26 20:46 -0700
    Re: fseek Les Cargill <lcargill99@comcast.com> - 2012-07-26 23:15 -0500
  Re: fseek Les Cargill <lcargill99@comcast.com> - 2012-07-26 23:13 -0500
    Re: fseek James Kuyper <jameskuyper@verizon.net> - 2012-07-27 07:20 -0400
      Re: fseek Les Cargill <lcargill99@comcast.com> - 2012-07-27 12:52 -0500
        Re: fseek Keith Thompson <kst-u@mib.org> - 2012-07-27 16:11 -0700
          Re: fseek Keith Thompson <kst-u@mib.org> - 2012-07-27 16:54 -0700
            Re: fseek Les Cargill <lcargill99@comcast.com> - 2012-07-27 23:10 -0500
              Re: fseek James Kuyper <jameskuyper@verizon.net> - 2012-07-28 11:25 -0400
              Re: fseek Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-28 17:02 +0100
                Re: fseek Les Cargill <lcargill99@comcast.com> - 2012-07-28 11:39 -0500
                Re: fseek Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-28 17:58 +0100
                Re: fseek Les Cargill <lcargill99@comcast.com> - 2012-07-28 16:07 -0500
                Re: fseek Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-07-28 22:30 +0100
  Re: fseek John Gordon <gordon@panix.com> - 2012-07-27 05:26 +0000
  Re: fseek gordonb.rclzu@burditt.org (Gordon Burditt) - 2012-07-27 12:30 -0500
    Re: fseek Bill Cunningham <billcun@suddenlink.net> - 2012-07-27 15:36 -0700
    Re: fseek Bill Cunningham <billcun@suddenlink.net> - 2012-07-27 15:36 -0700

csiph-web