[GRASS-SVN] r53188 - grass/trunk/raster/r.distance

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 17 01:40:18 PDT 2012


Author: martinl
Date: 2012-09-17 01:40:17 -0700 (Mon, 17 Sep 2012)
New Revision: 53188

Modified:
   grass/trunk/raster/r.distance/main.c
   grass/trunk/raster/r.distance/parse.c
Log:
r.distance: bugfix #1731


Modified: grass/trunk/raster/r.distance/main.c
===================================================================
--- grass/trunk/raster/r.distance/main.c	2012-09-17 08:33:27 UTC (rev 53187)
+++ grass/trunk/raster/r.distance/main.c	2012-09-17 08:40:17 UTC (rev 53188)
@@ -8,11 +8,11 @@
  * PURPOSE:      Locates the closest points between objects in two 
  *               raster maps.
  *
- * COPYRIGHT:    (C) 2003 by the GRASS Development Team
+ * COPYRIGHT:    (C) 2003, 2012 by the GRASS Development Team
  *
- *               This program is free software under the GNU General Public
- *               License (>=v2). Read the file COPYING that comes with GRASS
- *               for details.
+ *               This program is free software under the GNU General
+ *               Public License (>=v2). Read the file COPYING that
+ *               comes with GRASS for details.
  *
  ***************************************************************************/
 
@@ -51,5 +51,5 @@
 
     report(&parms);
 
-    return 0;
+    exit(EXIT_SUCCESS);
 }

Modified: grass/trunk/raster/r.distance/parse.c
===================================================================
--- grass/trunk/raster/r.distance/parse.c	2012-09-17 08:33:27 UTC (rev 53187)
+++ grass/trunk/raster/r.distance/parse.c	2012-09-17 08:40:17 UTC (rev 53188)
@@ -28,23 +28,12 @@
     struct Flag *labels, *overlap;
     const char *name, *mapset;
 
-    maps = G_define_option();
+    maps = G_define_standard_option(G_OPT_R_MAPS);
+    maps->key_desc = "name1,name2";
+    maps->description = _("Name of two input raster maps for computing inter-class distances");
 
-    maps->key = "maps";
-    maps->key_desc = "map1,map2";
-    maps->required = YES;
-    maps->multiple = NO;
-    maps->type = TYPE_STRING;
-    maps->description = _("Maps for computing inter-class distances");
-    maps->gisprompt = "old,cell,raster";
-
-    fs = G_define_option();
-    fs->key = "fs";
-    fs->required = NO;
-    fs->multiple = NO;
+    fs = G_define_standard_option(G_OPT_F_SEP);
     fs->answer = ":";		/* colon is default output fs */
-    fs->type = TYPE_STRING;
-    fs->description = _("Output field separator");
 
     labels = G_define_flag();
     labels->key = 'l';



More information about the grass-commit mailing list