[q-lang-cvs] q-csv README,1.10,1.11 csv.q,1.15,1.16
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2008-02-11 02:31:40
|
Update of /cvsroot/q-lang/q-csv In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15905 Modified Files: README csv.q Log Message: fix typos and formatting glitches Index: README =================================================================== RCS file: /cvsroot/q-lang/q-csv/README,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** README 22 Jan 2008 16:47:30 -0000 1.10 --- README 11 Feb 2008 02:31:30 -0000 1.11 *************** *** 23,27 **** are created using csv_dialect with a list of specifications outlined in csv.q. ! - sreadcsv reads a CSV formated string and converts it to a tuple of fields according to the dialect specified. If no dialect is specified, conversion is performed using RFC 4180 rules (http://www.ietf.org/rfc/rfc4180.txt). --- 23,27 ---- are created using csv_dialect with a list of specifications outlined in csv.q. ! - sreadcsv reads a CSV formatted string and converts it to a tuple of fields according to the dialect specified. If no dialect is specified, conversion is performed using RFC 4180 rules (http://www.ietf.org/rfc/rfc4180.txt). *************** *** 30,34 **** - swritecsv converts a tuple of fields, which includes only strings, integers, ! and floats to a CSV formated string according to the dialect specified. If no dialect is specified, conversion is performed using RFC 4180 rules (http://www.ietf.org/rfc/rfc4180.txt). Tuples that are not strings, integers, --- 30,34 ---- - swritecsv converts a tuple of fields, which includes only strings, integers, ! and floats to a CSV formatted string according to the dialect specified. If no dialect is specified, conversion is performed using RFC 4180 rules (http://www.ietf.org/rfc/rfc4180.txt). Tuples that are not strings, integers, *************** *** 56,60 **** provided to convert between entire CSV files and lists of tuples. Note that these require that the entire data fits into RAM and will thus be inefficient ! for huge datasets. NOTES --- 56,60 ---- provided to convert between entire CSV files and lists of tuples. Note that these require that the entire data fits into RAM and will thus be inefficient ! for huge datasets. NOTES Index: csv.q =================================================================== RCS file: /cvsroot/q-lang/q-csv/csv.q,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** csv.q 25 Jan 2008 22:09:47 -0000 1.15 --- csv.q 11 Feb 2008 02:31:30 -0000 1.16 *************** *** 42,48 **** csv_quote: Quote character. Defaults to "\"". Note: If embedded quotes are doubled, csv_escape must equal ! csv_quote. The csv_dialect function will automatically set ! the csv_escape character to csv_quote if csv_escape is not ! specified. csv_quoting: Quoting options: Defaults to csv_quote_strings. --- 42,48 ---- csv_quote: Quote character. Defaults to "\"". Note: If embedded quotes are doubled, csv_escape must equal ! csv_quote. The csv_dialect function will ! automatically set the csv_escape character to ! csv_quote if csv_escape is not specified. csv_quoting: Quoting options: Defaults to csv_quote_strings. *************** *** 52,60 **** csv_skipspace: Skip white space flag. Defaults to true. ! Reading/Writing: If true, white spaces before fields are removed. ! Quoted fields always retain white space. */ ! public type DialectOption = const csv_delimiter, csv_escape, csv_quote, csv_quoting, ! csv_lineterminator, csv_skipspace; /* QuoteStyle constants used by csv quoting. --- 52,61 ---- csv_skipspace: Skip white space flag. Defaults to true. ! Reading/Writing: If true, white spaces before fields are ! removed. Quoted fields always retain ! white space. */ ! public type DialectOption = const csv_delimiter, csv_escape, csv_quote, ! csv_quoting, csv_lineterminator, csv_skipspace; /* QuoteStyle constants used by csv quoting. *************** *** 64,68 **** terminators, or escaped quotes are quoted. */ ! public type QuoteStyle = const csv_quote_all, csv_quote_strings, csv_quote_none; /* Defaults are set to RFC 4180 (http://www.ietf.org/rfc/rfc4180.txt) */ --- 65,70 ---- terminators, or escaped quotes are quoted. */ ! public type QuoteStyle = const csv_quote_all, csv_quote_strings, ! csv_quote_none; /* Defaults are set to RFC 4180 (http://www.ietf.org/rfc/rfc4180.txt) */ *************** *** 82,87 **** $ foldl insert (insert DEFAULTS (csv_escape, D!csv_quote)) $ Opts ! if (member D csv_quote) and then (not member D csv_escape) ! where D = dict Opts; = tuple $ vals $ foldl insert DEFAULTS $ Opts; --- 84,89 ---- $ foldl insert (insert DEFAULTS (csv_escape, D!csv_quote)) $ Opts ! if (member D csv_quote) and then (not member D csv_escape) ! where D = dict Opts; = tuple $ vals $ foldl insert DEFAULTS $ Opts; *************** *** 107,111 **** = tuple_to_csvstr RFC4180 Rec; ! /* Convert a list of tuples to a list of CSV formated strings. */ public swritecsvlist ARGS; swritecsvlist (Dialect:Tuple, L:List) --- 109,113 ---- = tuple_to_csvstr RFC4180 Rec; ! /* Convert a list of tuples to a list of CSV formatted strings. */ public swritecsvlist ARGS; swritecsvlist (Dialect:Tuple, L:List) *************** *** 127,131 **** = csvstr_to_tuple RFC4180 Rec; ! /* Convert a list of CSV formated strings to a list of tuples */ public sreadcsvlist ARGS; sreadcsvlist (L:List, Dialect:Tuple) --- 129,133 ---- = csvstr_to_tuple RFC4180 Rec; ! /* Convert a list of CSV formatted strings to a list of tuples */ public sreadcsvlist ARGS; sreadcsvlist (L:List, Dialect:Tuple) |