00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <grass/Vect.h>
00019
00020
00021
00022
00023 static int
00024 rew_dummy ()
00025 {
00026 return -1;
00027 }
00028
00029
00030 #ifndef HAVE_OGR
00031 static int format () { G_fatal_error ("Requested format is not compiled in this version"); return 0; }
00032 #endif
00033
00034
00035 static int (*Rewind_array[][3]) () =
00036 {
00037 { rew_dummy, V1_rewind_nat, V2_rewind_nat }
00038 #ifdef HAVE_OGR
00039 ,{ rew_dummy, V1_rewind_ogr, V2_rewind_ogr }
00040 #else
00041 ,{ rew_dummy, format, format }
00042 #endif
00043 };
00044
00045
00052 int
00053 Vect_rewind (struct Map_info *Map)
00054 {
00055 if (!VECT_OPEN (Map))
00056 return -1;
00057
00058 G_debug (1, "Vect_Rewind(): name = %s", Map->name);
00059
00060 return (*Rewind_array[Map->format][Map->level]) (Map);
00061 }