Update of /cvsroot/q-lang/q-csv
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27335
Modified Files:
README csv.q
Log Message:
fixed README and csv.q comments to reflect changes
Index: README
===================================================================
RCS file: /cvsroot/q-lang/q-csv/README,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** README 11 Feb 2008 14:15:38 -0000 1.12
--- README 6 Mar 2008 21:24:15 -0000 1.13
***************
*** 39,55 ****
- fwritecsv is equivalent to swritecsv except that writing is to a file.
- The above routines are defined in terms of the following primary interface
- functions fread_csvstr, csvstr_to_tuple and tuple_to_csvstr:
-
- - fread_csvstr reads a single CSV record from a file. This essentially works
- like freads, but handles quoted newlines embedded in a field value. Note
- that fread_csvstr does *not* verify that the string actually conforms to CSV
- syntax.
-
- - csvstr_to_tuple and tuple_to_csvstr convert CSV formatted strings to tuples
- and vice versa. These functions check for correct CSV syntax and proper
- field values, respectively, and return a 'csv_error MSG' term in case of an
- error condition (see NOTES below).
-
The routines described above read/write one record at a time. Additional
functions (sreadcsvlist, swritecsvlist, freadcsvlist and fwritecsvlist) are
--- 39,42 ----
Index: csv.q
===================================================================
RCS file: /cvsroot/q-lang/q-csv/csv.q,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** csv.q 6 Mar 2008 16:19:08 -0000 1.18
--- csv.q 6 Mar 2008 21:24:15 -0000 1.19
***************
*** 31,34 ****
--- 31,48 ----
from dict import dict, insert, vals, member;
+ /* Public Routines are defined in terms of the following primary interface
+ functions fread_csvstr, csvstr_to_tuple and tuple_to_csvstr:
+
+ - fread_csvstr reads a single CSV record from a file. This essentially works
+ like freads, but handles quoted newlines embedded in a field value. Note
+ that fread_csvstr does *not* verify that the string actually conforms to CSV
+ syntax.
+
+ - csvstr_to_tuple and tuple_to_csvstr convert CSV formatted strings to tuples
+ and vice versa. These functions check for correct CSV syntax and proper
+ field values, respectively, and return a 'csv_error MSG' term in case of an
+ error condition.
+ */
+
private extern fread_csvstr FILE QUOTE;
private extern tuple_to_csvstr ARGS REC;
***************
*** 105,112 ****
/* Convert a tuple (record) to a CSV string.
Dialect: CSV format specification. If none is given, defaults to
RFC4180 for Windows and UNIX for all other OSs.
- Rec: Tuple of fields to be converted to CSV format.
-
NOTE: Rec must contain ONLY strings, integers, and floating point numbers.
If a field is some other type, the 'csv_error MSG' rule is invoked.
--- 119,125 ----
/* Convert a tuple (record) to a CSV string.
+ Rec: Tuple of fields to be converted to CSV format.
Dialect: CSV format specification. If none is given, defaults to
RFC4180 for Windows and UNIX for all other OSs.
NOTE: Rec must contain ONLY strings, integers, and floating point numbers.
If a field is some other type, the 'csv_error MSG' rule is invoked.
***************
*** 126,132 ****
/* Convert a tuple (record) to a CSV string
Dialect: CSV format specification. If none is given, defaults to
RFC4180 for Windows and UNIX for all other OSs.
- Rec: Tuple of fields to be converted to CSV format.
NOTE: The 'csv_error MSG' rule is invoked on improperly formatted strings.
--- 139,145 ----
/* Convert a tuple (record) to a CSV string
+ Rec: Tuple of fields to be converted to CSV format.
Dialect: CSV format specification. If none is given, defaults to
RFC4180 for Windows and UNIX for all other OSs.
NOTE: The 'csv_error MSG' rule is invoked on improperly formatted strings.
|