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


Groups > comp.lang.c > #23836

Re: fseek

From Les Cargill <lcargill99@comcast.com>
Newsgroups comp.lang.c
Subject Re: fseek
Date 2012-07-27 23:10 -0500
Organization A noiseless patient Spider
Message-ID <juvofr$ocs$1@dont-email.me> (permalink)
References (1 earlier) <jut49v$bgf$1@dont-email.me> <jutthc$24u$1@dont-email.me> <juuk9g$fal$2@dont-email.me> <lntxws6bqa.fsf@nuthaus.mib.org> <lna9yk69pr.fsf@nuthaus.mib.org>

Show all headers | View raw


Keith Thompson wrote:
> Keith Thompson <kst-u@mib.org> writes:
>> Les Cargill <lcargill99@comcast.com> writes:
>>> James Kuyper wrote:
>>
>> Not necessarily.
>>
>> N1570 7.21.2p3:
>>
>>      A binary stream is an ordered sequence of characters that can
>>      transparently record internal data. Data read in from a binary
>>      stream shall compare equal to the data that were earlier written
>>      out to that stream, under the same implementation. Such a stream
>>      may, however, have an implementation-defined number of null
>>      characters appended to the end of the stream.
>>
>> For example, a system might only support binary files consisting of a
>> whole number of fixed-size blocks.
>
> Whoops, I goofed when trimming the quoted text.  Here's the context I
> *meant* to quote:
>
> Les Cargill <lcargill99@comcast.com> writes:
>> James Kuyper wrote:
> [...]
>>> 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)
>>>
>>
>> Wow - didn't know that. Thanks! Hopefully, it returns  a nonzero
>> when it does not apply to that stream.
>
> ...
>

James, I have been programming in 'C'... perhaps longer than
I should have, and I have never come across a device that would not 
feeek(...,SEEK_END) exactly as one would expect it would.

I remember nine-track tape too, but I wasn't doing *that* in 'C'.

Yadda, yadda, etc, esp ipsioders infinitum. :)

:)

(it even works on USB! Sacre mirablieu!!)

--
Les Cargill

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