GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
rowio/put.c File Reference

RowIO library - Write a row. More...

#include <stdio.h>
#include <string.h>
#include <grass/rowio.h>
Include dependency graph for rowio/put.c:

Go to the source code of this file.

Functions

int Rowio_put (ROWIO *R, const void *buf, int row)
 Write a row. More...
 

Detailed Description

RowIO library - Write a row.

(C) 2001-2009 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Original author CERL

Definition in file rowio/put.c.

Function Documentation

◆ Rowio_put()

int Rowio_put ( ROWIO R,
const void *  buf,
int  row 
)

Write a row.

Writes the buffer buf, which holds the data for row n, into the ROWIO structure r. If the row requested is currently in memory, the buffer is simply copied into the structure and marked as having been changed. It will be written out later. Otherwise it is written immediately. Note that when the row is finally written to disk, the putrow() routine specified in Rowio_setup() is called to write row n to the file. Rowio_flush() force pending updates to disk ROWIO *r; Rowio_flush() forces all rows modified by Rowio_put() to be written to the file. This routine must be called before closing the file or releasing the rowio structure if Rowio_put() has been called.

Parameters
Rpointer to ROWIO structure
bufpointer to data buffer
rowrow number
Returns

Definition at line 42 of file rowio/put.c.

References ROWIO::ROWIO_RCB::buf, ROWIO::ROWIO_RCB::dirty, ROWIO::fd, ROWIO::len, ROWIO::nrows, ROWIO::putrow, ROWIO::rcb, and ROWIO::ROWIO_RCB::row.