[GRASS5] Non-portable code in 5.1 portability test
Eric G. Miller
egm2 at jps.net
Mon Mar 3 11:17:32 EST 2003
On Mon, Mar 03, 2003 at 02:34:46PM +0100, Radim Blazek wrote:
> > 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?
Should be sufficient.
echo ">gra.fcw at 2ztr< eryyvZ .T pveR" | rot13 | reverse
More information about the grass-dev