Re: fseek past the eof

From: Xenos (dont.spam.me_at_spamhate.com)
Date: 11/30/04


Date: Tue, 30 Nov 2004 10:10:56 -0500


"Joe Wright" <joewwright@comcast.net> wrote in message
news:weadnfEJcudrUjbcRVn-iA@comcast.com...
> Xenos wrote:
> > Can anyone tell me what the standard says about using fseek (on a binary
> > file) to seek past the end-of-file? I can't find anything in my (draft)
> > copy of the standard, nor in the FAQ.
> >
> > Thanks
>
> I'm curious why you would, and what you would expect to find,
> seeking past end-of-file. Perhaps I misunderstand.
>
> Still curious, how would you know where end-of-file is and that you
> are seeking past it?
>
I'm not. We have some vendor code that does, which is having problems.
Before I talk to them about it, I want to understand the standard. I don't
want to run my mouth without knowing what the hell I'm talking about.

Why do it? It creates what is called a "sparse file," a file with holes.
A lot of executables to it (but for what reason, I do not know). It can be
done on Windows and Unix, but I don't know if its implementation specific or
part of the standard.

Thanks.



Relevant Pages

  • Re: Other issues with the FAQ
    ... Only the standard itself does that. ... though the C99 standard does. ... >> it should be mentioned in the FAQ anyway. ... Why would be Steve any different? ...
    (comp.lang.c)
  • Re: Other issues with the FAQ
    ... > shows no signs of intending to change the FAQ in this direction. ... > for anyone interested in portable C programming, ... As a group, we discuss "standard" C, and are quick to point out the ... C99. ...
    (comp.lang.c)
  • Re: help
    ... I would be mildly surprised if the instructor did not expect the OP to use a delay/sleep/wait type function provided by the implementation rather than a loop, so I would consider Richard's suggestion to be more helpful. ... I had hoped that the bad old days of teaching a computer language along with a mish-mash of vendor specific extensions was behind us. ... If I was the instructor then maximum points would be for using a system specific solution and providing a good reason why a system specific solution should be used and also say what the solution using standard C is. ... Of course, if the answer is in the FAQ then the question should not be asked because the FAQ should be checked first, but that is dealt with by pointing them at the FAQ so they know to check next time. ...
    (comp.lang.c)
  • Re: Subtle Date Problems
    ... Javascript, by the ISO/IEC standard, is required to use only current ... those locations that currently have Summer Time, ... It's a good idea to read the newsgroup and its FAQ. ...
    (comp.lang.javascript)
  • Re: simple algorithm for finding primes
    ... > Then the numbers that are left are the primes. ... If you must be rude, ... > it has to be platform specific and non standard. ... You did read the FAQ, ...
    (comp.lang.c)