[GRASS-SVN] r60245 - grass/branches/releasebranch_6_4/vector/v.external

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 15 02:42:36 PDT 2014


Author: martinl
Date: 2014-05-15 02:42:36 -0700 (Thu, 15 May 2014)
New Revision: 60245

Modified:
   grass/branches/releasebranch_6_4/vector/v.external/main.c
Log:
v.external: don't list formats in module description (see #2159)

Modified: grass/branches/releasebranch_6_4/vector/v.external/main.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.external/main.c	2014-05-14 22:40:40 UTC (rev 60244)
+++ grass/branches/releasebranch_6_4/vector/v.external/main.c	2014-05-15 09:42:36 UTC (rev 60245)
@@ -34,7 +34,6 @@
     FILE *fd;
     struct Map_info Map;
     OGRDataSourceH Ogr_ds;
-    OGRSFDriverH Ogr_driver;
     OGRLayerH Ogr_layer;
     OGRFeatureDefnH Ogr_featuredefn;
     int nlayers;
@@ -43,22 +42,10 @@
 
     G_gisinit(argv[0]);
 
-    OGRRegisterAll();
-
-    /* Module options */
-    sprintf(buf, "Available drivers: ");
-    for (i = 0; i < OGRGetDriverCount(); i++) {
-	Ogr_driver = OGRGetDriver(i);
-	if (i == 0)
-	    sprintf(buf, "%s%s", buf, OGR_Dr_GetName(Ogr_driver));
-	else
-	    sprintf(buf, "%s,%s", buf, OGR_Dr_GetName(Ogr_driver));
-    }
     module = G_define_module();
     module->keywords = _("vector, external, import");
-    module->label =
+    module->description =
 	_("Creates a new vector as a read-only link to OGR layer.");
-    module->description = G_store(buf);
 
     dsn_opt = G_define_option();
     dsn_opt->key = "dsn";
@@ -90,6 +77,8 @@
     if (!out_opt->answer && layer_opt->answer)
 	G_fatal_error(_("Output vector name was not specified"));
 
+    OGRRegisterAll();
+
     /* Open OGR DSN */
     Ogr_ds = OGROpen(dsn_opt->answer, FALSE, NULL);
     if (Ogr_ds == NULL)



More information about the grass-commit mailing list