Loading...
Searching...
No Matches
get.c File Reference

RowIO library - Get a row. More...

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

Go to the source code of this file.

## Functions

void * | Rowio_get (ROWIO *R, int row)
| Read a row.
void | Rowio_flush (ROWIO *R)
| Flush data.

## Detailed Description

RowIO library - Get 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/get.c.

## Function Documentation

## Rowio_flush()

void Rowio_flush | ( | ROWIO * | R | ) |

Flush data.

Parameters

  R | pointer to ROWIO structure

Definition at line 88 of file rowio/get.c.

## Rowio_get()

void * Rowio_get | ( | ROWIO * | R,
|  | int | row )

Read a row.

Rowio_get() returns a buffer which holds the data for row from the file associated with ROWIO structure R. If the row requested is not in memory, the getrow() routine specified in Rowio_setup() is called to read row into memory and a pointer to the memory buffer containing the row is returned. If the data currently in the buffer had been changed by Rowio_put(), the putrow() routine specified in Rowio_setup() is called first to write the changed row to disk. If row is already in memory, no disk read is done. The pointer to the data is simply returned.

Parameters

  R | pointer to ROWIO structure
  row | row number

Returns
  NULL on error
  pointer to the buffer containing row

Definition at line 40 of file rowio/get.c.

References NULL.