Sfoglia il codice sorgente

libgis: Backport https://trac.osgeo.org/grass/changeset/61351

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@62411 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 10 anni fa
parent
commit
a82861b027
2 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 2 1
      lib/gis/parser.c
  2. 4 0
      lib/gis/parser_local_proto.h

+ 2 - 1
lib/gis/parser.c

@@ -419,7 +419,8 @@ int G_parser(int argc, char **argv)
 
     /* If there are NO arguments, go interactive */
 
-    if (argc < 2 && st->has_required && !st->no_interactive && isatty(0)) {
+    if (argc < 2 && (st->has_required || G__has_required_rule())
+	&& !st->no_interactive && isatty(0)) {
 	module_gui_wx();
 	return -1;
     }

+ 4 - 0
lib/gis/parser_local_proto.h

@@ -54,5 +54,9 @@ void G__wps_print_process_description(void);
 int  G__uses_new_gisprompt(void);
 void G__print_keywords(FILE *, void (*)(FILE *, const char *));
 
+void G__check_option_rules(void);
+void G__describe_option_rules(void);
+int G__has_required_rule(void);
+
 #endif