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