- if (c == '\"') {
- buff.clear();
-
- do {
- is.get(cc);
- c = cc;
- if (c != '\r')
- buff.push_back(c);
- } while (c != '\"' && c != '\n' && is);
-
- if (c != '\"') {
- printError("Missing quote");
- if (c == '\n')
- ++lineno;
- }
-
- buff.resize(buff.size()-1);
- status = LEX_DATA;
- break;
- }
-
- if (c == ',')
- continue; /* Skip ','s */
-
- // using relational operators with chars other
- // than == and != is not safe. And if it is done
- // the type _have_ to be unsigned. It usually a
- // lot better to use the functions from cctype
- if (c > ' ' && is) {
- buff.clear();
-
- do {
- buff.push_back(c);
- is.get(cc);
- c = cc;
- } while (c > ' ' && c != ',' && is);
-
- status = LEX_TOKEN;
- }
-
- if (c == '\r' && is) {
- // The Windows support has lead to the
- // possibility of "\r\n" at the end of
- // a line. This will stop LyX choking
- // when it expected to find a '\n'
- is.get(cc);
- c = cc;
- }
-
- if (c == '\n')
- ++lineno;
-
- }
- if (status)
- return true;
-
- status = is.eof() ? LEX_FEOF: LEX_UNDEF;
- buff.clear();
- return false;
- } else {
- unsigned char c = 0; // getc() returns an int
- char cc = 0;
-
- status = 0;
- while (is && !status) {
- is.get(cc);
- c = cc;
-
- // skip ','s
- if (c == ',')
- continue;