GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71790
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gis/seek.c File Reference

GIS Library - file seek routines. More...

#include <stdio.h>
#include <sys/types.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for gis/seek.c:

Go to the source code of this file.


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...

Detailed Description

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.

Glynn Clements

Definition in file gis/seek.c.

Function Documentation

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.

fpfile descriptor

Definition at line 48 of file gis/seek.c.

References _, and G_fatal_error().

Referenced by dfread_header(), dfwrite_header(), dig_file_load(), dig_fseek(), G__read_Cell_head(), G_get_element_window(), IL_output_2d(), IL_resample_output_2d(), IL_write_temp_2d(), new_dspf(), open_stream(), Rast__read_colors(), Rast_put_reclass(), read_cube(), reset_reads(), AMI_STREAM< T >::seek(), AMI_STREAM< T >::stream_len(), Vect__open_old(), Vect_hist_copy(), and Vect_open_fidx().

off_t G_ftell ( FILE *  fp)

Get the current file position of the stream.

fpfile descriptor
file position
-1 on failure

Definition at line 27 of file gis/seek.c.

Referenced by dfwrite_header(), dig_ftell(), G_get_element_window(), AMI_STREAM< T >::read_array(), read_cube(), AMI_STREAM< T >::read_item(), AMI_STREAM< T >::stream_len(), Vect_hist_copy(), AMI_STREAM< T >::write_array(), and AMI_STREAM< T >::write_item().