瀏覽代碼

libgis: chop options

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@62764 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 10 年之前
父節點
當前提交
139df7098e
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lib/gis/parser.c

+ 4 - 1
lib/gis/parser.c

@@ -352,6 +352,7 @@ int G_parser(int argc, char **argv)
 
 	    i = 0;
 	    while (tokens[i]) {
+		G_chop(tokens[i]);
 		cnt++;
 		i++;
 	    }
@@ -378,6 +379,8 @@ int G_parser(int argc, char **argv)
 		    if (!tokens[i + 1])
 			break;
 
+		    G_chop(tokens[i]);
+
 		    j = 0;
 		    found = 0;
 		    while (opt->opts[j]) {
@@ -420,7 +423,7 @@ int G_parser(int argc, char **argv)
     /* If there are NO arguments, go interactive */
 
     if (argc < 2 && (st->has_required || G__has_required_rule())
-	&& !st->no_interactive && isatty(0)) {
+        && !st->no_interactive && isatty(0)) {
 	module_gui_wx();
 	return -1;
     }