[GRASS-SVN] r60094 - grass/trunk/display/d.histogram

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 4 23:27:39 PDT 2014


Author: hamish
Date: 2014-05-04 23:27:39 -0700 (Sun, 04 May 2014)
New Revision: 60094

Modified:
   grass/trunk/display/d.histogram/dhist.h
   grass/trunk/display/d.histogram/get_stats.c
   grass/trunk/display/d.histogram/main.c
Log:
quiet handled by --quiet

Modified: grass/trunk/display/d.histogram/dhist.h
===================================================================
--- grass/trunk/display/d.histogram/dhist.h	2014-05-05 06:07:16 UTC (rev 60093)
+++ grass/trunk/display/d.histogram/dhist.h	2014-05-05 06:27:39 UTC (rev 60094)
@@ -40,8 +40,9 @@
 		      double, double);
 int draw_slice(struct Colors *, int, DCELL, DCELL, int, double, double,
 	       double, double, double);
+
 /* get_stats.c */
-int get_stats(const char *, struct stat_list *, int);
+int get_stats(const char *, struct stat_list *);
 
 /* pie.c */
 int pie(struct stat_list *, struct Colors *);

Modified: grass/trunk/display/d.histogram/get_stats.c
===================================================================
--- grass/trunk/display/d.histogram/get_stats.c	2014-05-05 06:07:16 UTC (rev 60093)
+++ grass/trunk/display/d.histogram/get_stats.c	2014-05-05 06:27:39 UTC (rev 60094)
@@ -8,7 +8,7 @@
 #include "options.h"
 #include "dhist.h"
 
-static void run_stats(const char *mapname, int quiet, const char *tempfile)
+static void run_stats(const char *mapname, const char *tempfile)
 {
     char buf[32];
     const char *argv[12];
@@ -19,8 +19,7 @@
     argv[argc++] = "-r";
     if (cat_ranges)
 	argv[argc++] = "-C";
-    if (quiet)
-	argv[argc++] = "-q";
+
     argv[argc++] = type == COUNT
 	? "-c"
 	: "-a";
@@ -43,8 +42,7 @@
 	G_fatal_error("error running r.stats");
 }
 
-int get_stats(const char *mapname, struct stat_list *dist_stats,	/* linked list of stats */
-	      int quiet)
+int get_stats(const char *mapname, struct stat_list *dist_stats)	/* linked list of stats */
 {
     char buf[1024];		/* input buffer for reading stats */
     int done = 0;
@@ -72,7 +70,7 @@
 	    G_fatal_error("Can't read frange file");
     }
 
-    run_stats(mapname, quiet, tempfile);
+    run_stats(mapname, tempfile);
 
     /* open temp file and read the stats into a linked list */
     fd = fopen(tempfile, "r");

Modified: grass/trunk/display/d.histogram/main.c
===================================================================
--- grass/trunk/display/d.histogram/main.c	2014-05-05 06:07:16 UTC (rev 60093)
+++ grass/trunk/display/d.histogram/main.c	2014-05-05 06:27:39 UTC (rev 60094)
@@ -66,7 +66,6 @@
     char title[GNAME_MAX];
     double tt, tb, tl, tr;
     double t, b, l, r;
-    int quiet;
     struct GModule *module;
     struct Option *opt1;
     struct Option *opt2, *bg_opt;
@@ -129,10 +128,6 @@
     flag1->key = 'n';
     flag1->description = _("Display information for null cells");
 
-    flag2 = G_define_flag();
-    flag2->key = 'q';
-    flag2->description = _("Gather the histogram quietly");
-
     flag3 = G_define_flag();
     flag3->key = 'C';
     flag3->description =
@@ -168,7 +163,6 @@
 	G_warning(_("When -C flag is set, the nsteps argument is ignored"));
 
     nodata = flag1->answer;
-    quiet = flag2->answer ? YES : NO;
 
     if (Rast_read_colors(map_name, "", &pcolors) == -1)
 	G_fatal_error(_("Color file for <%s> not available"), map_name);
@@ -182,7 +176,7 @@
 
     /* get the distribution statistics */
 
-    get_stats(map_name, &dist_stats, quiet);
+    get_stats(map_name, &dist_stats);
 
     /* set up the graphics driver and initialize its color-table */
 



More information about the grass-commit mailing list