grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

put.c File Reference

RowIO library - Write a row. More...

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

Go to the source code of this file.


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.

Original author CERL

Definition in file 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.

Rpointer to ROWIO structure
bufpointer to data buffer
rowrow number

Definition at line 42 of file 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.