[GRASS-SVN] r62418 - grass/branches/releasebranch_7_0/general/g.remove
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 27 08:42:25 PDT 2014
Author: hcho
Date: 2014-10-27 08:42:25 -0700 (Mon, 27 Oct 2014)
New Revision: 62418
Modified:
grass/branches/releasebranch_7_0/general/g.remove/construct_pattern.c
grass/branches/releasebranch_7_0/general/g.remove/main.c
Log:
g.remove: Rename names= to name= (merge r62417 from trunk)
Modified: grass/branches/releasebranch_7_0/general/g.remove/construct_pattern.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.remove/construct_pattern.c 2014-10-27 15:40:21 UTC (rev 62417)
+++ grass/branches/releasebranch_7_0/general/g.remove/construct_pattern.c 2014-10-27 15:42:25 UTC (rev 62418)
@@ -54,7 +54,7 @@
*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;
Modified: grass/branches/releasebranch_7_0/general/g.remove/main.c
===================================================================
--- grass/branches/releasebranch_7_0/general/g.remove/main.c 2014-10-27 15:40:21 UTC (rev 62417)
+++ grass/branches/releasebranch_7_0/general/g.remove/main.c 2014-10-27 15:42:25 UTC (rev 62418)
@@ -44,7 +44,7 @@
struct Option *type;
struct Option *pattern;
struct Option *exclude;
- struct Option *names;
+ struct Option *name;
struct Option *ignore;
} opt;
struct
@@ -78,15 +78,16 @@
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 = _("Names");
+ 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";
@@ -94,8 +95,8 @@
opt.ignore->multiple = YES;
opt.ignore->gisprompt = "old,element,element";
opt.ignore->description =
- _("File names to ignore separated by a comma (default: none)");
- opt.ignore->guisection = _("Names");
+ _("Name of file(s) to ignore (default: none)");
+ opt.ignore->guisection = _("Pattern");
opt.pattern = G_define_option();
opt.pattern->key = "pattern";
@@ -123,6 +124,7 @@
flag.force = G_define_flag();
flag.force->key = 'f';
+ flag.force->guisection = _("Basic");
flag.force->description =
_("Force removal (required for actual deletion of files)");
@@ -131,9 +133,9 @@
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);
@@ -141,7 +143,7 @@
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;
More information about the grass-commit
mailing list