|
GRASS GIS 8 Programmer's Manual
8.4.2dev(2025)-5620950973
|
GIS Library - file seek routines. More...
#include <stdio.h>#include <errno.h>#include <string.h>#include <sys/types.h>#include <grass/gis.h>#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
| off_t | G_ftell (FILE *fp) |
| Get the current file position of the stream. More... | |
| void | G_fseek (FILE *fp, off_t offset, int whence) |
| Change the file position of the stream. More... | |
GIS Library - file seek routines.
(C) 2009-2010 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.
Definition in file gis/seek.c.
| void G_fseek | ( | FILE * | fp, |
| off_t | offset, | ||
| int | whence | ||
| ) |
Change the file position of the stream.
The value of whence must be one of the constants ‘SEEK_SET’, ‘SEEK_CUR’, or ‘SEEK_END’, to indicate whether the offset is relative to the beginning of the file, the current file position, or the end of the file, respectively.
| fp | file descriptor |
| offset | offset |
| whence |
Definition at line 50 of file gis/seek.c.
References G_fatal_error().
Referenced by dfread_header(), dfwrite_header(), G__read_Cell_head(), IL_write_temp_2d(), new_dspf(), and open_stream().
| off_t G_ftell | ( | FILE * | fp | ) |
Get the current file position of the stream.
| fp | file descriptor |
Definition at line 29 of file gis/seek.c.
Referenced by dfwrite_header().