[GRASS-SVN] r52891 - grass/branches/releasebranch_6_4/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 25 05:07:04 PDT 2012


Author: mmetz
Date: 2012-08-25 05:07:04 -0700 (Sat, 25 Aug 2012)
New Revision: 52891

Modified:
   grass/branches/releasebranch_6_4/lib/gis/clicker.c
Log:
libgis: G_clicker(), respect verbose level, cf. G_percent()

Modified: grass/branches/releasebranch_6_4/lib/gis/clicker.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/clicker.c	2012-08-25 12:02:02 UTC (rev 52890)
+++ grass/branches/releasebranch_6_4/lib/gis/clicker.c	2012-08-25 12:07:04 UTC (rev 52891)
@@ -7,17 +7,22 @@
  * 
  */
 #include <stdio.h>
+#include <grass/gis.h>
 
 static int G_clicker_prev = 0;
 
 int G_clicker(void)
 {
-    int x;
+    int x, format;
     static char clicks[] = "|/-\\";
 
+    /* be verbose only 1> */
+    format = G_info_format();
+    if (format == G_INFO_FORMAT_SILENT || G_verbose() < 1)
+        return 0;
+
     if (G_clicker_prev == -1 || G_clicker_prev == 3)
 	x = 0;
-
     else
 	x = G_clicker_prev + 1;
 



More information about the grass-commit mailing list