GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
rewind_nat.c
Go to the documentation of this file.
1 /*
2  ****************************************************************************
3  *
4  * MODULE: Vector library
5  *
6  * AUTHOR(S): Original author CERL, probably Dave Gerdes or Mike Higgins.
7  * Update to GRASS 5.7 Radim Blazek and David D. Gray.
8  *
9  * PURPOSE: Higher level functions for reading/writing/manipulating vectors.
10  *
11  * COPYRIGHT: (C) 2001 by the GRASS Development Team
12  *
13  * This program is free software under the GNU General Public
14  * License (>=v2). Read the file COPYING that comes with GRASS
15  * for details.
16  *
17  *****************************************************************************/
18 #include <grass/Vect.h>
19 
20 /* Rewind vector data file to cause reads to start at beginning.
21  ** returns 0 on success
22  ** -1 on error
23  */
24 int V1_rewind_nat(struct Map_info *Map)
25 {
26  return (dig_fseek(&(Map->dig_fp), Map->head.head_size, SEEK_SET));
27 }
28 
29 int V2_rewind_nat(struct Map_info *Map)
30 {
31  Map->next_line = 1;
32  return V1_rewind_nat(Map); /* make sure level 1 reads are reset too */
33 }
int V1_rewind_nat(struct Map_info *Map)
Definition: rewind_nat.c:24
int dig_fseek(GVFILE *file, long offset, int whence)
Set GVFILE position.
Definition: file.c:60
int V2_rewind_nat(struct Map_info *Map)
Definition: rewind_nat.c:29
tuple Map
Definition: render.py:1310