Browse Source

g.parser: Support "required" rule
(merge https://trac.osgeo.org/grass/changeset/62850 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@63179 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 years ago
parent
commit
93110d7de1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      general/g.parser/rules.c

+ 5 - 0
general/g.parser/rules.c

@@ -61,6 +61,11 @@ void parse_rule(struct context *ctx, const char *cmd, const char *arg)
 	return;
     }
 
+    if (G_strcasecmp(cmd, "required") == 0) {
+	add_rule(ctx, RULE_REQUIRED, arg);
+	return;
+    }
+
     if (G_strcasecmp(cmd, "requires") == 0) {
 	add_rule(ctx, RULE_REQUIRES, arg);
 	return;