[GRASS-SVN] r34198 - grass/trunk/raster/r.terraflow

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 8 20:49:27 EST 2008


Author: glynn
Date: 2008-11-08 20:49:27 -0500 (Sat, 08 Nov 2008)
New Revision: 34198

Modified:
   grass/trunk/raster/r.terraflow/main.cc
Log:
Removee -q flag
Call G_parser() before other libgis functions


Modified: grass/trunk/raster/r.terraflow/main.cc
===================================================================
--- grass/trunk/raster/r.terraflow/main.cc	2008-11-09 01:48:28 UTC (rev 34197)
+++ grass/trunk/raster/r.terraflow/main.cc	2008-11-09 01:49:27 UTC (rev 34198)
@@ -134,14 +134,6 @@
   streamdir->description=
      _("Directory to hold temporary files (they can be large)");
 
-  /* verbose flag */
-  /* please, remove before GRASS 7 released */
-  struct Flag *quiet;
-  quiet = G_define_flag() ;
-  quiet->key         = 'q' ;
-  quiet->description = _("Quiet");
-  /* quiet->answer = 'n'; */
-
  /* stats file */
   struct Option *stats_opt;
   stats_opt = G_define_option() ;
@@ -177,20 +169,8 @@
   opt->mem = atoi(mem->answer);
   opt->streamdir = streamdir->answer;
 
-  opt->verbose = FALSE;
-/* please, remove before GRASS 7 released */
-  if(quiet->answer) {
-    G_warning(_("The '-q' flag is superseded and will be removed "
-	"in future. Please use '--quiet' instead."));
-    G_putenv("GRASS_VERBOSE","0");
-    opt->verbose = FALSE;
-  }
-  else {
-    if(G_verbose() == G_verbose_max())
-	opt->verbose = TRUE;
-  }
+  opt->verbose = G_verbose() == G_verbose_max();
 
-
   opt->stats = stats_opt->answer;
 
   /* somebody should delete the options */
@@ -471,6 +451,13 @@
   module->description = _("Flow computation for massive grids (Float version).");
 #endif
 
+  /* read user options; fill in global <opt> */  
+  opt = (userOptions*)malloc(sizeof(userOptions));
+  assert(opt);
+  
+  parse_args(argc, argv);
+  check_args();
+
   /* get the current region and dimensions */  
   region = (struct Cell_head*)malloc(sizeof(struct Cell_head));
   assert(region);
@@ -487,13 +474,6 @@
     ncols = (dimension_type)nc;
   }
 
-  /* read user options; fill in global <opt> */  
-  opt = (userOptions*)malloc(sizeof(userOptions));
-  assert(opt);
-  
-  parse_args(argc, argv);
-  check_args();
-
   G_verbose_message( _("Region size is %d x %d"), nrows, ncols);
  
   /* check STREAM path (the place where intermediate STREAMs are placed) */



More information about the grass-commit mailing list