[GRASS-SVN] r64286 - in grass/branches/releasebranch_7_0: display/d.vect raster/r.external raster/r.mapcalc raster/r.neighbors raster/r.quant raster/r.resamp.filter raster/r.series raster/r.series.interp raster/r.stats.quantile vector/v.colors vector/v.external.out

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 22 19:10:42 PST 2015


Author: annakrat
Date: 2015-01-22 19:10:42 -0800 (Thu, 22 Jan 2015)
New Revision: 64286

Modified:
   grass/branches/releasebranch_7_0/display/d.vect/shape.c
   grass/branches/releasebranch_7_0/raster/r.external/main.c
   grass/branches/releasebranch_7_0/raster/r.mapcalc/main.c
   grass/branches/releasebranch_7_0/raster/r.neighbors/main.c
   grass/branches/releasebranch_7_0/raster/r.quant/main.c
   grass/branches/releasebranch_7_0/raster/r.resamp.filter/main.c
   grass/branches/releasebranch_7_0/raster/r.series.interp/main.c
   grass/branches/releasebranch_7_0/raster/r.series/main.c
   grass/branches/releasebranch_7_0/raster/r.stats.quantile/main.c
   grass/branches/releasebranch_7_0/vector/v.colors/main.c
   grass/branches/releasebranch_7_0/vector/v.external.out/args.c
Log:
Consolite option/flag mutually exslusive messages (merge from trunk, r60703)

Modified: grass/branches/releasebranch_7_0/display/d.vect/shape.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.vect/shape.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/display/d.vect/shape.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -183,8 +183,8 @@
 	    z_style = NULL;
 	}
         else if (rgb_column) {
-            G_warning(_("Options <%s> and <%s> are mutually exclusive. "
-                        "Option <%s> will be ignored."), "zcolor", "rgb_column", "zcolor");
+            G_warning(_("%s= and %s= are mutually exclusive. "
+                        "%s= will be ignored."), "zcolor", "rgb_column", "zcolor");
 	    z_style = NULL;
         }
 	else {

Modified: grass/branches/releasebranch_7_0/raster/r.external/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.external/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.external/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -140,11 +140,11 @@
 	title = NULL;
 
     if (!input && !source)
-	G_fatal_error(_("One of options <%s> or <%s> must be given"),
+	G_fatal_error(_("%s= or %s= must be given"),
 		      parm.input->key, parm.source->key);
 
     if (input && source)
-	G_fatal_error(_("Option <%s> and <%s> are mutually exclusive"),
+	G_fatal_error(_("%s= and %s= are mutually exclusive"),
 		      parm.input->key, parm.source->key);
     
     if (input && !G_is_absolute_path(input)) {

Modified: grass/branches/releasebranch_7_0/raster/r.mapcalc/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.mapcalc/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.mapcalc/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -156,7 +156,8 @@
     overwrite_flag = module->overwrite;
 
     if (expr->answer && file->answer)
-	G_fatal_error(_("file= and expression= are mutually exclusive"));
+	G_fatal_error(_("%s= and %s= are mutually exclusive"),
+			expr->key, file->key);
 
     if (seed->answer && random->answer)
 	G_fatal_error(_("%s= and -%c are mutually exclusive"),

Modified: grass/branches/releasebranch_7_0/raster/r.neighbors/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.neighbors/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.neighbors/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -259,10 +259,12 @@
     ncb.dist = ncb.nsize / 2;
 
     if (parm.weight->answer && flag.circle->answer)
-	G_fatal_error(_("weight= and -c are mutually exclusive"));
+	G_fatal_error(_("-%c and %s= are mutually exclusive"),
+			flag.circle->key, parm.weight->key);
 
     if (parm.weight->answer && parm.gauss->answer)
-	G_fatal_error(_("weight= and gauss= are mutually exclusive"));
+	G_fatal_error(_("%s= and %s= are mutually exclusive"),
+			parm.weight->key, parm.gauss->key);
 
     ncb.oldcell = parm.input->answer;
 
@@ -288,7 +290,8 @@
     for (i = 0; parm.method->answers[i]; i++)
 	;
     if (num_outputs != i)
-	G_fatal_error(_("output= and method= must have the same number of values"));
+	G_fatal_error(_("%s= and %s= must have the same number of values"),
+			parm.output->key, parm.method->key);
 
     outputs = G_calloc(num_outputs, sizeof(struct output));
 

Modified: grass/branches/releasebranch_7_0/raster/r.quant/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.quant/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.quant/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -108,7 +108,8 @@
     if (rules->answer)
 	i++;
     if (i > 1)
-	G_fatal_error(_("-t, -r, rules=, basemap= and fprange= are mutually exclusive"));
+	G_fatal_error(_("-%c, -%c, %s=, %s= and %s= are mutually exclusive"),
+			trunc->key, rnd->key, rules->key, basemap->key, fprange->key);
 
     i = 0;
     if (fprange->answer)
@@ -116,7 +117,8 @@
     if (range->answer)
 	i++;
     if (i == 1)
-	G_fatal_error(_("fprange= and range= must be used together"));
+	G_fatal_error(_("%s= and %s= must be used together"),
+			fprange->key, range->key);
 
     for (noi = 0; input->answers[noi]; noi++)
 	;
@@ -158,9 +160,11 @@
     else if (fprange->answer)
     {
 	if (sscanf(fprange->answer, "%lf,%lf", &new_dmin, &new_dmax) != 2)
-	    G_fatal_error(_("invalid value for fprange= <%s>"), fprange->answer);
+	    G_fatal_error(_("invalid value for %s= <%s>"),
+			    fprange->key, fprange->answer);
 	if (sscanf(range->answer, "%d,%d", &new_min, &new_max) != 2)
-	    G_fatal_error(_("invalid value for range= <%s>"), range->answer);
+	    G_fatal_error(_("invalid value for %s= <%s>"),
+			    range->key, range->answer);
 	G_message(_("Setting quant rules for input map(s) to (%f,%f) -> (%d,%d)"),
 		  new_dmin, new_dmax, new_min, new_max);
 	Rast_quant_add_rule(&quant_struct, new_dmin, new_dmax, new_min, new_max);

Modified: grass/branches/releasebranch_7_0/raster/r.resamp.filter/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.resamp.filter/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.resamp.filter/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -429,13 +429,16 @@
 
     if (parm.radius->answer) {
 	if (parm.x_radius->answer || parm.y_radius->answer)
-	    G_fatal_error(_("radius= and x_radius=/y_radius= are mutually exclusive"));
+	    G_fatal_error(_("%s= and %s=/%s= are mutually exclusive"),
+			    parm.radius->key, parm.x_radius->key, parm.y_radius->key);
     }
     else {
 	if (!parm.x_radius->answer && !parm.y_radius->answer)
-	    G_fatal_error(_("Either radius= or x_radius=/y_radius= required"));
+	    G_fatal_error(_("Either %s= or %s=/%s= required"),
+			    parm.radius->key, parm.x_radius->key, parm.y_radius->key);
 	if (!parm.x_radius->answer || !parm.y_radius->answer)
-	    G_fatal_error(_("Both x_radius= and y_radius= required"));
+	    G_fatal_error(_("Both %s= and %s= required"),
+			    parm.x_radius->key, parm.y_radius->key);
     }
 
     nulls = flag.nulls->answer;

Modified: grass/branches/releasebranch_7_0/raster/r.series/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.series/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.series/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -195,10 +195,12 @@
     }
     
     if (parm.input->answer && parm.file->answer)
-        G_fatal_error(_("input= and file= are mutually exclusive"));
+        G_fatal_error(_("%s= and %s= are mutually exclusive"),
+			parm.input->key, parm.file->key);
  
     if (!parm.input->answer && !parm.file->answer)
-        G_fatal_error(_("Please specify input= or file="));
+        G_fatal_error(_("Please specify %s= or %s="),
+			parm.input->key, parm.file->key);
 
 
     /* process the input maps from the file */

Modified: grass/branches/releasebranch_7_0/raster/r.series.interp/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.series.interp/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.series.interp/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -115,28 +115,36 @@
 	exit(EXIT_FAILURE);
 
     if (parm.output->answer && parm.outfile->answer)
-        G_fatal_error(_("output= and outfile= are mutually exclusive"));
+        G_fatal_error(_("%s= and %s= are mutually exclusive"),
+			parm.output->key, parm.outfile->key);
  
     if (parm.samplingpos->answer && parm.outfile->answer)
-        G_fatal_error(_("samplingpos= and outfile= are mutually exclusive"));
+        G_fatal_error(_("%s= and %s= are mutually exclusive"),
+			parm.samplingpos->key, parm.outfile->key);
  
     if (!parm.output->answer && !parm.outfile->answer)
-        G_fatal_error(_("Please specify output= or outfile="));
+        G_fatal_error(_("Please specify %s= or %s="),
+			parm.output->key, parm.outfile->key);
  
     if (parm.output->answer && !parm.samplingpos->answer)
-        G_fatal_error(_("Please specify output= and samplingpos="));
+        G_fatal_error(_("Please specify %s= and %s="),
+			parm.output->key, parm.samplingpos->key);
 
     if (parm.input->answer && parm.infile->answer)
-        G_fatal_error(_("input= and infile= are mutually exclusive"));
+        G_fatal_error(_("%s= and %s= are mutually exclusive"),
+			parm.input->key, parm.infile->key);
  
     if (parm.datapos->answer && parm.infile->answer)
-        G_fatal_error(_("datapos= and infile= are mutually exclusive"));
+        G_fatal_error(_("%s= and %s= are mutually exclusive"),
+			parm.datapos->key, parm.infile->key);
  
     if (!parm.input->answer && !parm.infile->answer)
-        G_fatal_error(_("Please specify input= or infile="));
+        G_fatal_error(_("Please specify %s= or %s="),
+			parm.input->key, parm.infile->key);
  
     if (parm.input->answer && !parm.datapos->answer)
-        G_fatal_error(_("Please specify input= and datapos="));
+        G_fatal_error(_("Please specify %s= and %s="),
+			parm.input->key, parm.datapos->key);
 
     if(G_strncasecmp(parm.method->answer, "linear", 6) == 0)
         interpol_method = LINEAR_INTERPOLATION;

Modified: grass/branches/releasebranch_7_0/raster/r.stats.quantile/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.stats.quantile/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/raster/r.stats.quantile/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -439,10 +439,12 @@
     print = flag.p->answer;
 
     if (!print && !opt.output->answers)
-	G_fatal_error(_("Either -p or output= must be given"));
+	G_fatal_error(_("Either -%c or %s= must be given"),
+			flag.p->key, opt.output->key);
 
     if (print && opt.output->answers)
-	G_fatal_error(_("-p and output= are mutually exclusive"));
+	G_fatal_error(_("-%c and %s= are mutually exclusive"),
+			flag.p->key, opt.output->key);
 
     num_slots = atoi(opt.slots->answer);
 

Modified: grass/branches/releasebranch_7_0/vector/v.colors/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.colors/main.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/vector/v.colors/main.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -204,7 +204,7 @@
     }
 
     if (opt.rast->answer && opt.volume->answer)
-        G_fatal_error(_("Options <%s> and <%s> are mutually exclusive"),
+        G_fatal_error(_("%s= and %s= are mutually exclusive"),
 		      opt.rast->key, opt.volume->key);
 
     cmap = NULL;
@@ -214,21 +214,20 @@
         cmap = opt.volume->answer;
     
     if (!cmap && !style && !rules && !remove && !convert)
-        G_fatal_error(_("One of -%c, -%c or options <%s>, <%s> or <%s> "
+        G_fatal_error(_("One of -%c, -%c or %s=, %s= or %s= "
 			"must be specified"), flag.r->key, flag.c->key, 
 		      opt.colr->key, opt.rast->key, opt.rules->key);
     
     if (!!style + !!cmap + !!rules > 1)
-        G_fatal_error(_("Options <%s>, <%s>, and <%s> are mutually "
-			"exclusive"), opt.colr->key, opt.rules->key,
-		      opt.rast->key);
+        G_fatal_error(_("%s=, %s= and %s= are mutually exclusive"),
+			opt.colr->key, opt.rules->key, opt.rast->key);
 
     if (flag.g->answer && flag.a->answer)
-        G_fatal_error(_("Flags -%c and -%c are mutually exclusive"),
+        G_fatal_error(_("-%c and -%c are mutually exclusive"),
 		      flag.g->key, flag.a->key);
 
     if (flag.c->answer && !rgbcolumn) 
-	G_fatal_error(_("Option <%s> required for flag -%c"),
+	G_fatal_error(_("%s= required for -%c"),
 		      opt.rgbcol->key, flag.c->key);
 
     is_from_stdin = rules && strcmp(rules, "-") == 0;

Modified: grass/branches/releasebranch_7_0/vector/v.external.out/args.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.external.out/args.c	2015-01-23 02:47:14 UTC (rev 64285)
+++ grass/branches/releasebranch_7_0/vector/v.external.out/args.c	2015-01-23 03:10:42 UTC (rev 64286)
@@ -87,17 +87,17 @@
     /* check options */
     if (options->dsn->answer && options->format->answer &&
         options->input->answer)
-        G_fatal_error(_("Options <%s/%s> and <%s> are mutually exclusive"),
-                      options->dsn->key, options->format->key,
-                      options->input->key);
+        G_fatal_error(_("%s= and %s=/%s= are mutually exclusive"),
+                      options->input->key,
+                      options->dsn->key, options->format->key);
     if (flags->f->answer || flags->p->answer || flags->r->answer || flags->g->answer ||
         options->output->answer)
         return;
 
     if (!options->dsn->answer && !options->input->answer)
-        G_fatal_error(_("One of options <%s> or <%s> must be specified"),
+        G_fatal_error(_("%s= or %s= must be specified"),
                       options->dsn->key, options->input->key);
     if (options->dsn->answer && !options->format->answer)
-        G_fatal_error(_("Option <%s> must be specified"),
+        G_fatal_error(_("%s= must be specified"),
                       options->format->key);
 }



More information about the grass-commit mailing list