- ep = cp + len;
- if (dls->delim != 0) {
- if (*cp==dls->delim) {
- cp++;
- }
- } else {
-
- /* Skip leading whitespace and commas. */
- while ((isspace ((unsigned char) *cp) || *cp == ',') && cp < ep)
- cp++;
- }
- if (cp >= ep)
- return 0;
-
- /* Three types of fields: quoted with ', quoted with ", unquoted. */
- /* Quoting does not escape the effects of delimiters for explicitly */
- /* specified delims */
- /* (consistency with SPSS doco: */
- /* For data with explicitly specified value delimiters (for example, */
- /* DATA LIST FREE (","): */
- /* - Multiple delimiters without any intervening space can be used */
- /* to specify missing data. */
- /* - The specified delimiters cannot occur within a data value, even */
- /* if you enclose the value in quotation marks or apostrophes. */
- if (dls->delim==0 && (*cp == '\'' || *cp == '"'))