[GRASS5] Non-portable code in 5.1 portability test

Radim Blazek blazek at itc.it
Mon Mar 3 08:34:46 EST 2003

> If the vector is opened for update Vect_open_update() and new line is
> written Vect_write_line()(calls fflush()) and read by Vect_read_next_line()
> or Vect_read_line() (do not call fflush()) next call to Vect_write_line()
> should fail, is it right? Can you give any recommendation where to add
> fflush(). I think that before fwrite() in Vect_write_line().

On Saturday 01 March 2003 08:54 pm, Eric G. Miller wrote:
> Theoretically, this is true of any C FILE stream.  If opened for reading
> and writing one must at least perform fflush or a file positioning
> function (fseek/ftell/rewind/fgetpos/fsetpos) if changing between
> reading and writing.  Many systems handle the change transparently,
> though they are not required to do so.

Vect_write_line() starts by fseek(), so is it OK?


More information about the grass-dev mailing list