瀏覽代碼

Removee -q flag
Call G_parser() before other libgis functions


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34198 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements 16 年之前
父節點
當前提交
90afb80af3
共有 1 個文件被更改,包括 8 次插入28 次删除
  1. 8 28
      raster/r.terraflow/main.cc

+ 8 - 28
raster/r.terraflow/main.cc

@@ -134,14 +134,6 @@ parse_args(int argc, char *argv[]) {
   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,19 +169,7 @@ parse_args(int argc, char *argv[]) {
   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;
 
@@ -471,6 +451,13 @@ main(int argc, char *argv[]) {
   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 @@ main(int argc, char *argv[]) {
     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) */