[GRASS-SVN] r45026 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 14 08:09:02 EST 2011


Author: martinl
Date: 2011-01-14 05:09:02 -0800 (Fri, 14 Jan 2011)
New Revision: 45026

Modified:
   grass/branches/develbranch_6/lib/gis/parser.c
Log:
gislib: check --help for all parameters
(merge r45025 from relbr64)


Modified: grass/branches/develbranch_6/lib/gis/parser.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/parser.c	2011-01-14 13:07:01 UTC (rev 45025)
+++ grass/branches/develbranch_6/lib/gis/parser.c	2011-01-14 13:09:02 UTC (rev 45026)
@@ -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