From bart at keithp.com Thu Nov 19 10:22:35 2009 From: bart at keithp.com (Bart Massey) Date: Thu, 19 Nov 2009 10:22:35 -0800 (PST) Subject: [Nickle] nickle: Branch 'master' Message-ID: <20091119182235.C2B31B9402F@keithp.com> string.5c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 168c8e3f857956401306d90f7bd3d3c8d17ad493 Author: Bart Massey Date: Thu Nov 19 10:22:31 2009 -0800 made parse_csv_t public diff --git a/string.5c b/string.5c index 835dad9..1a234ea 100644 --- a/string.5c +++ b/string.5c @@ -188,7 +188,7 @@ extend namespace String { (quote_context) { .oq = "\"", .cq = "\"", .qq = "\\"} ); - typedef (string[*])(string) parse_csv_t; + public typedef (string[*])(string) parse_csv_t; public parse_csv_t make_parse_csv(quote_context q) /* From bart at keithp.com Thu Nov 19 10:29:50 2009 From: bart at keithp.com (Bart Massey) Date: Thu, 19 Nov 2009 10:29:50 -0800 (PST) Subject: [Nickle] nickle: Branch 'master' Message-ID: <20091119182950.78594B9402F@keithp.com> builtin-sockets.c | 4 ++++ 1 file changed, 4 insertions(+) New commits: commit ba82f22cf8eafa406618a93ec26bfc08e069627e Author: Bart Massey Date: Thu Nov 19 10:28:17 2009 -0800 Included a definition of SUN_LEN for systems that don't have it. This fix responded to a bug report from Claude Marinier that Nickle networking wouldn't build on Solaris. diff --git a/builtin-sockets.c b/builtin-sockets.c index 213f0d4..9bbdbbb 100644 --- a/builtin-sockets.c +++ b/builtin-sockets.c @@ -17,6 +17,10 @@ #include #include #include +#ifndef SUN_LEN +#define SUN_LEN(ptr) \ + (sizeof(*(ptr)) - sizeof((ptr)->sun_path) + strlen((ptr)->sun_path) + 1) +#endif #include #include #include From bart at keithp.com Thu Nov 19 11:29:40 2009 From: bart at keithp.com (Bart Massey) Date: Thu, 19 Nov 2009 11:29:40 -0800 (PST) Subject: [Nickle] nickle: Branch 'master' Message-ID: <20091119192940.A3A2CB9402F@keithp.com> string.5c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 3111c1bbe21202ca13b0c3bba39ce61b87197269 Author: Bart Massey Date: Thu Nov 19 11:29:36 2009 -0800 changd csv parser to throw a bad_csv_parse exception on unclosed quotes diff --git a/string.5c b/string.5c index 1a234ea..52bae33 100644 --- a/string.5c +++ b/string.5c @@ -190,6 +190,9 @@ extend namespace String { public typedef (string[*])(string) parse_csv_t; + public exception bad_csv_parse(string error_msg, + string[*] partial_parse); + public parse_csv_t make_parse_csv(quote_context q) /* * Construct a CSV file parsing context from 'q' @@ -240,8 +243,8 @@ extend namespace String { cur++; } if (t == qstate.openq) - raise invalid_argument("parse_csv: unexpected " + - "end of csv line", 0, s); + raise bad_csv_parse("parse_csv: unexpected " + + "end of csv line", ss); consume(); return ss; }