X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxlex.C;h=00a488341b39b41059953efc1acf892f799379cd;hb=e8022b10a11e41d56897e3b066aa5180025165cc;hp=517bad5e00c492d9e7ca3ab632372edd2a7dc50c;hpb=35584afc1162dec2cf9fff79305e95cb3b75aefb;p=lyx.git diff --git a/src/lyxlex.C b/src/lyxlex.C index 517bad5e00..00a488341b 100644 --- a/src/lyxlex.C +++ b/src/lyxlex.C @@ -56,7 +56,7 @@ void LyXLex::popTable() void LyXLex::printTable() { lyxerr << "\nNumber of tags: " << no_items << endl; - for(int i=0; i ' ' && !feof(file)) { @@ -306,7 +306,7 @@ bool LyXLex::next(bool esc) status = LEX_TOKEN; } - if (c== '\r' && !feof(file)) { + if (c == '\r' && !feof(file)) { // The Windows support has lead to the // possibility of "\r\n" at the end of // a line. This will stop LyX choking @@ -314,7 +314,7 @@ bool LyXLex::next(bool esc) c = getc(file); } - if (c=='\n') + if (c == '\n') ++lineno; } @@ -333,9 +333,9 @@ bool LyXLex::next(bool esc) c = getc(file); // skip ','s - if (c==',') continue; + if (c == ',') continue; - if (c=='\\') { + if (c == '\\') { // escape int i = 0; do { @@ -355,7 +355,7 @@ bool LyXLex::next(bool esc) continue; } - if (c=='#') { + if (c == '#') { // Read rest of line (fast :-) fgets(buff, sizeof(buff), file); ++lineno; @@ -363,7 +363,7 @@ bool LyXLex::next(bool esc) } // string - if (c=='\"') { + if (c == '\"') { int i = -1; bool escaped = false; do { @@ -378,18 +378,18 @@ bool LyXLex::next(bool esc) buff[++i] = c; if (!escaped && c == '\"') break; - } while (c!='\n' && !feof(file) && - i!=(LEX_MAX_BUFF-2)); + } while (c!= '\n' && !feof(file) && + i!= (LEX_MAX_BUFF-2)); - if (i==(LEX_MAX_BUFF-2)) { + if (i == (LEX_MAX_BUFF-2)) { printError("Line too long"); c = '\"'; // Pretend we got a " ++i; } - if (c!='\"') { + if (c!= '\"') { printError("Missing quote"); - if (c=='\n') + if (c == '\n') ++lineno; } @@ -418,7 +418,7 @@ bool LyXLex::next(bool esc) } // new line - if (c=='\n') + if (c == '\n') ++lineno; } @@ -460,12 +460,12 @@ bool LyXLex::nextToken() printError("Line too long"); } - if (c == '\\') ungetc(c,file); // put it back + if (c == '\\') ungetc(c, file); // put it back buff[i] = '\0'; status = LEX_TOKEN; } - if (c=='\n') + if (c == '\n') ++lineno; }