[GRASS-SVN] r60637 - grass/branches/releasebranch_7_0/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 31 07:47:31 PDT 2014
Author: martinl
Date: 2014-05-31 07:47:31 -0700 (Sat, 31 May 2014)
New Revision: 60637
Modified:
grass/branches/releasebranch_7_0/lib/gis/parser.c
grass/branches/releasebranch_7_0/lib/gis/parser_standard_options.c
Log:
hcho: G_OPT_F_SEP: added "pipe" for "|"
(merge r60614 from trunk)
Modified: grass/branches/releasebranch_7_0/lib/gis/parser.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/parser.c 2014-05-31 14:45:48 UTC (rev 60636)
+++ grass/branches/releasebranch_7_0/lib/gis/parser.c 2014-05-31 14:47:31 UTC (rev 60637)
@@ -1448,15 +1448,17 @@
if (option->answer == NULL)
G_fatal_error(_("No separator given"));
- if (strcmp(option->answer, "space") == 0)
+ if (strcmp(option->answer, "pipe") == 0)
+ sep = G_store("|");
+ else if (strcmp(option->answer, "comma") == 0)
+ sep = G_store(",");
+ else if (strcmp(option->answer, "space") == 0)
sep = G_store(" ");
else if (strcmp(option->answer, "tab") == 0 ||
strcmp(option->answer, "\\t") == 0)
sep = G_store("\t");
else if (strcmp(option->answer, "newline") == 0)
sep = G_store("\n");
- else if (strcmp(option->answer, "comma") == 0)
- sep = G_store(",");
else {
sep = G_store(option->answer);
}
Modified: grass/branches/releasebranch_7_0/lib/gis/parser_standard_options.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/gis/parser_standard_options.c 2014-05-31 14:45:48 UTC (rev 60636)
+++ grass/branches/releasebranch_7_0/lib/gis/parser_standard_options.c 2014-05-31 14:47:31 UTC (rev 60637)
@@ -544,9 +544,9 @@
Opt->type = TYPE_STRING;
Opt->key_desc = "character";
Opt->required = NO;
- Opt->answer = "|";
+ Opt->answer = "pipe";
Opt->label = _("Field separator");
- Opt->description = _("Special characters: newline, space, comma, tab");
+ Opt->description = _("Special characters: pipe, comma, space, tab, newline");
break;
/* colors */
More information about the grass-commit
mailing list