[GRASS-SVN] r54814 - grass/trunk/raster/r.category
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 30 03:24:14 PST 2013
Author: martinl
Date: 2013-01-30 03:24:13 -0800 (Wed, 30 Jan 2013)
New Revision: 54814
Modified:
grass/trunk/raster/r.category/main.c
Log:
r.category: use G_option_to_separator()
Modified: grass/trunk/raster/r.category/main.c
===================================================================
--- grass/trunk/raster/r.category/main.c 2013-01-30 11:19:09 UTC (rev 54813)
+++ grass/trunk/raster/r.category/main.c 2013-01-30 11:24:13 UTC (rev 54814)
@@ -108,20 +108,8 @@
name = parm.map->answer;
- /* see v.in.ascii for a better solution */
- if (strcmp(parm.fs->answer, "space") == 0)
- fs = ' ';
- else if (strcmp(parm.fs->answer, "\\t") == 0)
- fs = '\t';
- else if (strcmp(parm.fs->answer, "newline") == 0)
- fs = '\n';
- else if (strcmp(parm.fs->answer, "comma") == 0)
- fs = ',';
- else if (strcmp(parm.fs->answer, "tab") == 0)
- fs = '\t';
- else
- fs = parm.fs->answer[0];
-
+ fs = G_option_to_separator(parm.fs);
+
mapset = G_find_raster2(name, "");
if (mapset == NULL)
G_fatal_error(_("Raster map <%s> not found"), name);
More information about the grass-commit
mailing list