[GRASS-SVN] r45025 - grass/branches/releasebranch_6_4/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 14 08:07:01 EST 2011


Author: martinl
Date: 2011-01-14 05:07:01 -0800 (Fri, 14 Jan 2011)
New Revision: 45025

Modified:
   grass/branches/releasebranch_6_4/lib/gis/parser.c
Log:
gislib: check --help for all parameters 


Modified: grass/branches/releasebranch_6_4/lib/gis/parser.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/parser.c	2011-01-14 13:00:01 UTC (rev 45024)
+++ grass/branches/releasebranch_6_4/lib/gis/parser.c	2011-01-14 13:07:01 UTC (rev 45025)
@@ -902,6 +902,12 @@
 	while (--argc) {
 	    ptr = *(++argv);
 
+	    if (strcmp(ptr, "help") == 0 ||
+		strcmp(ptr, "-help") == 0 || strcmp(ptr, "--help") == 0) {
+		G_usage();
+		exit(EXIT_SUCCESS);
+	    }
+
 	    /* Overwrite option */
 	    if (strcmp(ptr, "--o") == 0 || strcmp(ptr, "--overwrite") == 0) {
 		overwrite = 1;



More information about the grass-commit mailing list