[GRASS-SVN] r60612 - grass/trunk/raster/r.univar
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri May 30 08:53:52 PDT 2014
Author: hcho
Date: 2014-05-30 08:53:52 -0700 (Fri, 30 May 2014)
New Revision: 60612
Modified:
grass/trunk/raster/r.univar/r.univar_main.c
grass/trunk/raster/r.univar/r3.univar_main.c
Log:
r.univar: use G_option_to_separator()
Modified: grass/trunk/raster/r.univar/r.univar_main.c
===================================================================
--- grass/trunk/raster/r.univar/r.univar_main.c 2014-05-30 15:16:47 UTC (rev 60611)
+++ grass/trunk/raster/r.univar/r.univar_main.c 2014-05-30 15:53:52 UTC (rev 60612)
@@ -120,15 +120,7 @@
G_get_window(®ion);
/* table field separator */
- zone_info.sep = param.separator->answer;
- if (strcmp(zone_info.sep, "\\t") == 0)
- zone_info.sep = "\t";
- if (strcmp(zone_info.sep, "tab") == 0)
- zone_info.sep = "\t";
- if (strcmp(zone_info.sep, "space") == 0)
- zone_info.sep = " ";
- if (strcmp(zone_info.sep, "comma") == 0)
- zone_info.sep = ",";
+ zone_info.sep = G_option_to_separator(param.separator);
zone_info.min = 0.0 / 0.0; /* set to nan as default */
zone_info.max = 0.0 / 0.0; /* set to nan as default */
Modified: grass/trunk/raster/r.univar/r3.univar_main.c
===================================================================
--- grass/trunk/raster/r.univar/r3.univar_main.c 2014-05-30 15:16:47 UTC (rev 60611)
+++ grass/trunk/raster/r.univar/r3.univar_main.c 2014-05-30 15:53:52 UTC (rev 60612)
@@ -126,15 +126,7 @@
}
/* table field separator */
- zone_info.sep = param.separator->answer;
- if (strcmp(zone_info.sep, "\\t") == 0)
- zone_info.sep = "\t";
- if (strcmp(zone_info.sep, "tab") == 0)
- zone_info.sep = "\t";
- if (strcmp(zone_info.sep, "space") == 0)
- zone_info.sep = " ";
- if (strcmp(zone_info.sep, "comma") == 0)
- zone_info.sep = ",";
+ zone_info.sep = G_option_to_separator(param.separator);
dmin = 0.0 / 0.0; /* set to nan as default */
dmax = 0.0 / 0.0; /* set to nan as default */
More information about the grass-commit
mailing list