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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 26 12:30:09 PST 2014


Author: glynn
Date: 2014-12-26 12:30:09 -0800 (Fri, 26 Dec 2014)
New Revision: 63765

Modified:
   grass/trunk/lib/gis/parser.c
Log:
Add GRASS_FULL_OPTION_NAMES environment variable (issue #2409, comment:175)


Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c	2014-12-26 11:02:19 UTC (rev 63764)
+++ grass/trunk/lib/gis/parser.c	2014-12-26 20:30:09 UTC (rev 63765)
@@ -1034,6 +1034,9 @@
         append_error(err);
         return;
     }
+
+    if (getenv("GRASS_FULL_OPTION_NAMES") && strcmp(the_key, opt->key) != 0)
+	G_warning(_("<%s> is an abbreviation for <%s>"), the_key, opt->key);
     
     /* Allocate memory where answer is stored */
     if (opt->count++) {
@@ -1277,6 +1280,9 @@
     if (found == 1)
 	*result = matches[0];
 
+    if (found > 0 && getenv("GRASS_FULL_OPTION_NAMES") && strcmp(ans, opts[matches[0]]) != 0)
+	G_warning(_("<%s> is an abbreviation for <%s>"), ans, opts[matches[0]]);
+
     switch (found) {
     case 0: return OUT_OF_RANGE;
     case 1: return REPLACED;



More information about the grass-commit mailing list