Skip to content

Commit

Permalink
g.remove: Rename names= to name=
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62417 15284696-431f-4ddb-bdfa-cd5b030d7da7
  • Loading branch information
HuidaeCho committed Oct 27, 2014
1 parent 19eb08e commit 49924bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion general/g.remove/construct_pattern.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ char *construct_pattern(char **names)
*p = '\0';

if (found_illegal_names)
G_fatal_error(_("Illegal filenames not allowed in the names or ignore "
G_fatal_error(_("Illegal filenames not allowed in the name or ignore "
"option."));

return pattern;
Expand Down
26 changes: 13 additions & 13 deletions general/g.remove/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int main(int argc, char *argv[])
struct Option *type;
struct Option *pattern;
struct Option *exclude;
struct Option *names;
struct Option *name;
struct Option *ignore;
} opt;
struct
Expand Down Expand Up @@ -78,24 +78,24 @@ int main(int argc, char *argv[])
opt.type->multiple = YES;
opt.type->options = M_get_options(TRUE);
opt.type->descriptions = M_get_option_desc(TRUE);
opt.type->guidependency = "pattern,exclude,names,ignore";
opt.type->guidependency = "pattern,exclude,name,ignore";
opt.type->guisection = _("Basic");

opt.names = G_define_option();
opt.names->key = "names";
opt.names->type = TYPE_STRING;
opt.names->multiple = YES;
opt.names->gisprompt = "old,element,element";
opt.names->description = _("File names separated by a comma");
opt.names->guisection = _("Basic");
opt.name = G_define_option();
opt.name->key = "name";
opt.name->type = TYPE_STRING;
opt.name->multiple = YES;
opt.name->gisprompt = "old,element,element";
opt.name->description = _("Name of file(s) to remove");
opt.name->guisection = _("Basic");

opt.ignore = G_define_option();
opt.ignore->key = "ignore";
opt.ignore->type = TYPE_STRING;
opt.ignore->multiple = YES;
opt.ignore->gisprompt = "old,element,element";
opt.ignore->description =
_("File names to ignore separated by a comma (default: none)");
_("Name of file(s) to ignore (default: none)");
opt.ignore->guisection = _("Pattern");

opt.pattern = G_define_option();
Expand Down Expand Up @@ -133,17 +133,17 @@ int main(int argc, char *argv[])
flag.basemap->description = _("Remove base raster maps");

G_option_exclusive(flag.regex, flag.extended, NULL);
G_option_exclusive(opt.pattern, opt.names, NULL);
G_option_exclusive(opt.pattern, opt.name, NULL);
G_option_exclusive(opt.exclude, opt.ignore, NULL);
G_option_required(opt.pattern, opt.names, NULL);
G_option_required(opt.pattern, opt.name, NULL);

if (G_parser(argc, argv))
exit(EXIT_FAILURE);

if (opt.pattern->answer)
pattern = opt.pattern->answer;
else
pattern = construct_pattern(opt.names->answers);
pattern = construct_pattern(opt.name->answers);

if (opt.exclude->answer)
exclude = opt.exclude->answer;
Expand Down

0 comments on commit 49924bb

Please sign in to comment.