[GRASS-SVN] r62922 - grass/branches/releasebranch_7_0/display/d.histogram

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 25 01:39:42 PST 2014


Author: martinl
Date: 2014-11-25 01:39:42 -0800 (Tue, 25 Nov 2014)
New Revision: 62922

Modified:
   grass/branches/releasebranch_7_0/display/d.histogram/dhist.h
   grass/branches/releasebranch_7_0/display/d.histogram/get_stats.c
   grass/branches/releasebranch_7_0/display/d.histogram/main.c
Log:
d.histogram: remove -q flag


Modified: grass/branches/releasebranch_7_0/display/d.histogram/dhist.h
===================================================================
--- grass/branches/releasebranch_7_0/display/d.histogram/dhist.h	2014-11-25 09:30:25 UTC (rev 62921)
+++ grass/branches/releasebranch_7_0/display/d.histogram/dhist.h	2014-11-25 09:39:42 UTC (rev 62922)
@@ -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/branches/releasebranch_7_0/display/d.histogram/get_stats.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.histogram/get_stats.c	2014-11-25 09:30:25 UTC (rev 62921)
+++ grass/branches/releasebranch_7_0/display/d.histogram/get_stats.c	2014-11-25 09:39:42 UTC (rev 62922)
@@ -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/branches/releasebranch_7_0/display/d.histogram/main.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.histogram/main.c	2014-11-25 09:30:25 UTC (rev 62921)
+++ grass/branches/releasebranch_7_0/display/d.histogram/main.c	2014-11-25 09:39:42 UTC (rev 62922)
@@ -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