GRASS Programmer's Manual
6.4.3(2013)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
vector/Vlib/rewind.c
Go to the documentation of this file.
1
21
#include <grass/Vect.h>
22
#include <grass/glocale.h>
23
24
/* Rewind vector data file to cause reads to start at beginning */
25
/* returns 0 on success, -1 on error */
26
static
int
rew_dummy()
27
{
28
return
-1;
29
}
30
31
32
#ifndef HAVE_OGR
33
static
int
format()
34
{
35
G_fatal_error
(_(
"Requested format is not compiled in this version"
));
36
return
0;
37
}
38
#endif
39
40
41
static
int (*Rewind_array[][3]) () = {
42
{
43
rew_dummy,
V1_rewind_nat
,
V2_rewind_nat
}
44
#ifdef HAVE_OGR
45
, {
46
rew_dummy,
V1_rewind_ogr
,
V2_rewind_ogr
}
47
#else
48
, {
49
rew_dummy, format, format}
50
#endif
51
};
52
53
62
int
Vect_rewind
(
struct
Map_info *
Map
)
63
{
64
if
(!VECT_OPEN(Map))
65
return
-1;
66
67
G_debug
(1,
"Vect_Rewind(): name = %s"
, Map->name);
68
69
return
(*Rewind_array[Map->format][Map->level]) (
Map
);
70
}
lib
vector
Vlib
rewind.c
Generated on Sat Oct 5 2013 12:11:10 for GRASS Programmer's Manual by
1.8.4