[GRASS-SVN] r56593 - grass/trunk/vector/v.db.select

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 4 09:37:31 PDT 2013


Author: martinl
Date: 2013-06-04 09:37:30 -0700 (Tue, 04 Jun 2013)
New Revision: 56593

Modified:
   grass/trunk/vector/v.db.select/main.c
Log:
v.db.select: fix sep=newline


Modified: grass/trunk/vector/v.db.select/main.c
===================================================================
--- grass/trunk/vector/v.db.select/main.c	2013-06-04 16:01:32 UTC (rev 56592)
+++ grass/trunk/vector/v.db.select/main.c	2013-06-04 16:37:30 UTC (rev 56593)
@@ -128,17 +128,8 @@
     }
 
     /* the field separator */
-    fs = fs_opt->answer;
-/* FIXME: malloc() or G_store() needed for *fs since the sep can be multiple chars? */
-    if (strcmp(fs, "\\t") == 0)
-        fs = "\t";
-    if (strcmp(fs, "tab") == 0)
-        fs = "\t";
-    if (strcmp(fs, "space") == 0)
-        fs = " ";
-    if (strcmp(fs, "comma") == 0)
-        fs = ",";
-
+    fs = G_option_to_separator(fs_opt);
+    
     db_init_string(&sql);
     db_init_string(&value_string);
 



More information about the grass-commit mailing list