Re: Shorten FOPENed file



How do I write an EOF?

Kevin

ReIncarnated wrote:
> You will need an EOF (End Of File) marker - not an empty string (that
> is simply data in a file)
>
> On Sun, 29 Jan 2006 17:41:08 +0000 (UTC), pete@xxxxxxxxxxxxxxxxxx
> wrote:
>
> >
> >FSEEK() to the position at which you want to truncate and
> >FWRITE() an empty string, i.e.
> >
> > FWRITE (fh, "")
> >
> >That should do it,
> >Pete
> John.

.



Relevant Pages

  • RE: DbDataReader.Read() result
    ... which mean EOF. ... Kevin Yu ... "This posting is provided "AS IS" with no warranties, ... Prev by Date: ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: feof(), fseek(), fread()
    ... offset of a file and still be able to detect EOF?i.e. ... this without fseek(), that's why I posted this question. ... EOF is a macro defined in stdio.h probably as.. ... eoff = ftell; ...
    (comp.lang.c)
  • Re: reading file
    ... Does fseek() clears the EOF if I don't move beyond EOF? ... A more correct statement of your question is: ... Does fseekclear the end-of-file indicator if I don't move beyond ...
    (comp.lang.c)
  • Re: feof(), fseek(), fread()
    ... offset of a file and still be able to detect EOF?i.e. ... I still don't know how can I detect EOF while I'm always use fseek() ... The end-of-file indicator indicates that the last attempt to read from ...
    (comp.lang.c)
  • Re: Determining EOF using fseek()?
    ... I'm using fseek to traverse through the file from start to end ... However, my loop ... to hold the value of EOF. ... So u can get an logical error while reading ...
    (comp.lang.c)