[GRASS-SVN] r47883 - grass/trunk/lib/vector/diglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 25 07:47:40 EDT 2011
Author: mmetz
Date: 2011-08-25 04:47:40 -0700 (Thu, 25 Aug 2011)
New Revision: 47883
Modified:
grass/trunk/lib/vector/diglib/plus_struct.c
Log:
diglib: print some info when failing to open old vector topology
Modified: grass/trunk/lib/vector/diglib/plus_struct.c
===================================================================
--- grass/trunk/lib/vector/diglib/plus_struct.c 2011-08-25 11:38:19 UTC (rev 47882)
+++ grass/trunk/lib/vector/diglib/plus_struct.c 2011-08-25 11:47:40 UTC (rev 47883)
@@ -529,7 +529,19 @@
" Consider to rebuild topology or upgrade GRASS.",
ptr->Version_Major, ptr->Version_Minor);
}
+ if (ptr->Version_Major < GV_TOPO_VER_MAJOR ||
+ (ptr->Version_Major == GV_TOPO_VER_MAJOR &&
+ ptr->Version_Minor < GV_TOPO_VER_MINOR)) {
+ /* The file was created by GRASS library with lower version than this one */
+ /* This version of GRASS lib can not read this old format */
+ G_warning
+ ("Old topology format version %d.%d is not supported by this release."
+ " Try to rebuild topology.",
+ ptr->Version_Major, ptr->Version_Minor);
+ return (-1);
+ }
+
/* init Port_info structure and set as default */
dig_init_portable(&(ptr->port), byte_order);
dig_set_cur_port(&(ptr->port));
More information about the grass-commit
mailing list