[GRASS-SVN] r54813 - grass/trunk/raster/r.category
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 30 03:19:09 PST 2013
Author: lucadelu
Date: 2013-01-30 03:19:09 -0800 (Wed, 30 Jan 2013)
New Revision: 54813
Modified:
grass/trunk/raster/r.category/main.c
Log:
fix separator in r.category
Modified: grass/trunk/raster/r.category/main.c
===================================================================
--- grass/trunk/raster/r.category/main.c 2013-01-28 13:23:18 UTC (rev 54812)
+++ grass/trunk/raster/r.category/main.c 2013-01-30 11:19:09 UTC (rev 54813)
@@ -109,16 +109,18 @@
name = parm.map->answer;
/* see v.in.ascii for a better solution */
- if (parm.fs->answer != NULL) {
- if (strcmp(parm.fs->answer, "space") == 0)
- fs = ' ';
- else if (strcmp(parm.fs->answer, "tab") == 0)
- fs = '\t';
- else if (strcmp(parm.fs->answer, "\\t") == 0)
- fs = '\t';
- else
- fs = parm.fs->answer[0];
- }
+ 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];
mapset = G_find_raster2(name, "");
if (mapset == NULL)
More information about the grass-commit
mailing list