[GRASS-SVN] r58681 - grass/trunk/raster/r.statistics

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 12 10:11:15 PST 2014


Author: neteler
Date: 2014-01-12 10:11:15 -0800 (Sun, 12 Jan 2014)
New Revision: 58681

Modified:
   grass/trunk/raster/r.statistics/main.c
Log:
r.statistics: expand methods description in help text (as in r.statistics2)

Modified: grass/trunk/raster/r.statistics/main.c
===================================================================
--- grass/trunk/raster/r.statistics/main.c	2014-01-12 12:56:22 UTC (rev 58680)
+++ grass/trunk/raster/r.statistics/main.c	2014-01-12 18:11:15 UTC (rev 58681)
@@ -61,6 +61,12 @@
 
     covermap = G_define_standard_option(G_OPT_R_COVER);
 
+    method = G_define_option();
+    method->key = "method";
+    method->type = TYPE_STRING;
+    method->required = YES;
+    method->description = _("Method of object-based statistic");
+
     for (o_method = 0; menu[o_method].name; o_method++) {
 	if (o_method)
 	    strcat(methods, ",");
@@ -68,13 +74,18 @@
 	    *(methods) = 0;
 	strcat(methods, menu[o_method].name);
     }
+    method->options = G_store(methods);
 
-    method = G_define_option();
-    method->key = "method";
-    method->type = TYPE_STRING;
-    method->required = YES;
-    method->description = _("Method of object-based statistic");
-    method->options = methods;
+    for (o_method = 0; menu[o_method].name; o_method++) {
+	if (o_method)
+	    strcat(methods, ";");
+	else
+	    *(methods) = 0;
+	strcat(methods, menu[o_method].name);
+	strcat(methods, ";");
+	strcat(methods, menu[o_method].text);
+    }
+    method->descriptions = G_store(methods);
 
     outputmap = G_define_standard_option(G_OPT_R_OUTPUT);
     outputmap->description = _("Resultant raster map");



More information about the grass-commit mailing list