Browse Source

v.db.select: fix sep=newline

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56593 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 years ago
parent
commit
76e0bca924
1 changed files with 2 additions and 11 deletions
  1. 2 11
      vector/v.db.select/main.c

+ 2 - 11
vector/v.db.select/main.c

@@ -128,17 +128,8 @@ int main(int argc, char **argv)
     }
 
     /* 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);