[GRASS-SVN] r29569 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 5 07:11:14 EST 2008


Author: martinl
Date: 2008-01-05 07:11:13 -0500 (Sat, 05 Jan 2008)
New Revision: 29569

Modified:
   grass/trunk/lib/gis/parser.c
Log:
GForge/436 Concurrent quiet and verbose mode: print warning when both --q and --v are given (cosmetics)

Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c	2008-01-05 11:22:13 UTC (rev 29568)
+++ grass/trunk/lib/gis/parser.c	2008-01-05 12:11:13 UTC (rev 29569)
@@ -1,7 +1,7 @@
 /**
  * \file parser.c
  *
- * \brief Argument parsing functions.
+ * \brief GIS library - Argument parsing functions.
  *
  * This program is free software under the GNU General Public License
  * (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -889,10 +889,14 @@
                         else if ( strcmp(ptr,"--v") == 0 || strcmp(ptr,"--verbose") == 0 )
 			{
                             char buff[32];
-                            /* print everything: verbosity level 2 */
+                            /* print everything: max verbosity level */
 			    module_info.verbose = G_verbose_max();
                             sprintf(buff,"GRASS_VERBOSE=%d",G_verbose_max()) ;
                             putenv(G_store(buff));
+			    if (quiet == 1) {
+				G_warning(_("Use either --quiet or --verbose flag, not both. Assuming --verbose."));
+			    }
+			    quiet = -1;
 			}
 
 			/* Quiet option */
@@ -903,11 +907,12 @@
 			    module_info.verbose = G_verbose_min();
                             sprintf(buff,"GRASS_VERBOSE=%d",G_verbose_min()) ;
                             putenv(G_store(buff));
+			    if (quiet == -1) {
+				G_warning(_("Use either --quiet or --verbose flag, not both. Assuming --quiet."));
+			    }
 			    quiet = 1; /* for passing to gui init */
 			}
 
-
-
 			/* Force gui to come up */
 			else if ( strcmp(ptr,"--ui") == 0 )
 			{



More information about the grass-commit mailing list