Patch to CSV Parser

Joseph Donaldson <[email protected]>
Newsgroups gmane.lisp.scheme.bigloo
Message-ID <[email protected]>
Hello, Manuel,

The attached patch fixes a bug that prevented the proper parsing of csv files containing fields consisting of only space. 

Best Regards,
Joseph Donaldson
csv.patch (text/x-patch, 500 B)
--- bigloo4.2a/api/csv/src/Llib/csv.scm	2014-04-19 07:10:02.000000000 -0400
+++ bigloo4.2a_mod/api/csv/src/Llib/csv.scm	2014-05-09 14:47:37.907822030 -0400
@@ -50,10 +50,18 @@
       (field
 	 (()
 	  "")
+	 ((spaces)
+	   spaces)
 	 ((possible-space@a text possible-space@b)
 	  (string-append a text b))
 	 ((possible-space@a escaped possible-space@b)
 	  escaped))
+
+      (spaces
+	 ((space)
+	  space)
+	 ((spaces space)
+	  (string-append spaces space)))
       
       (possible-space
 	 (()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.