From: Keith Packard Date: Fri, 15 Jul 2016 19:53:50 +0000 (-0700) Subject: nickle's parse_csv doesn't strip quotes, so we have to X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=b7b04d6b9ec023d8ba56cf4fc5d17bdc77809c50;p=hw%2Faltusmetrum nickle's parse_csv doesn't strip quotes, so we have to This appears to just be a bug in the nickle code which has been fixed upstream. This local fix only strips quotes if present, so it will work with either nickle version unless we have names starting with " Signed-off-by: Keith Packard --- diff --git a/bin/partslist-vendor b/bin/partslist-vendor index 44054c7..03e3aae 100755 --- a/bin/partslist-vendor +++ b/bin/partslist-vendor @@ -26,7 +26,11 @@ string[*] read_line(file f) { lineno++; string line = fgets(f); - return String::parse_csv(line); + string[*] elts = String::parse_csv(line); + for (int i = 0; i < dim(elts); i++) + if (elts[i][0] == '"') + elts[i] = String::dequote(elts[i]); + return elts; } string[*] header;