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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 5 02:13:02 PDT 2013


Author: martinl
Date: 2013-06-05 02:13:01 -0700 (Wed, 05 Jun 2013)
New Revision: 56597

Modified:
   grass/trunk/vector/v.db.select/main.c
Log:
v.db.select: fix vertical separator, use G_option_to_separator()


Modified: grass/trunk/vector/v.db.select/main.c
===================================================================
--- grass/trunk/vector/v.db.select/main.c	2013-06-05 08:36:44 UTC (rev 56596)
+++ grass/trunk/vector/v.db.select/main.c	2013-06-05 09:13:01 UTC (rev 56597)
@@ -44,7 +44,7 @@
     struct Map_info Map;
     char query[1024];
     struct ilist *list_lines;
-    char *fs;
+    char *fs, *vs;
     struct bound_box *min_box, *line_box;
     int i, line, area, init_box, cat;
 
@@ -129,6 +129,10 @@
 
     /* the field separator */
     fs = G_option_to_separator(fs_opt);
+    if (vs_opt->answer)
+        vs = G_option_to_separator(vs_opt);
+    else
+        vs = NULL;
     
     db_init_string(&sql);
     db_init_string(&value_string);
@@ -261,8 +265,8 @@
 	else {
 	    if (!v_flag->answer)
 		fprintf(stdout, "\n");
-	    else if (vs_opt->answer)
-		fprintf(stdout, "%s\n", vs_opt->answer);
+	    else if (vs)
+		fprintf(stdout, "%s\n", vs);
 	}
     }
 



More information about the grass-commit mailing list