Loading src/definition.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -755,6 +755,7 @@ bool readCodeFragment(const char *fileName, { { while ((c=fgetc(f))!='\n' && c!=EOF) /* skip */; while ((c=fgetc(f))!='\n' && c!=EOF) /* skip */; lineNr++; lineNr++; if (found && c == '\n') c = '\0'; } } if (!feof(f)) if (!feof(f)) { { Loading @@ -763,7 +764,7 @@ bool readCodeFragment(const char *fileName, while (lineNr<=endLine && !feof(f) && !found) while (lineNr<=endLine && !feof(f) && !found) { { int pc=0; int pc=0; while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) // } so vi matching brackets has no problem { { //printf("parsing char `%c'\n",c); //printf("parsing char `%c'\n",c); if (c=='\n') if (c=='\n') Loading Loading @@ -816,7 +817,7 @@ bool readCodeFragment(const char *fileName, result+=spaces; result+=spaces; } } // copy until end of line // copy until end of line result+=c; if (c) result+=c; startLine=lineNr; startLine=lineNr; if (c==':') if (c==':') { { Loading Loading
src/definition.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -755,6 +755,7 @@ bool readCodeFragment(const char *fileName, { { while ((c=fgetc(f))!='\n' && c!=EOF) /* skip */; while ((c=fgetc(f))!='\n' && c!=EOF) /* skip */; lineNr++; lineNr++; if (found && c == '\n') c = '\0'; } } if (!feof(f)) if (!feof(f)) { { Loading @@ -763,7 +764,7 @@ bool readCodeFragment(const char *fileName, while (lineNr<=endLine && !feof(f) && !found) while (lineNr<=endLine && !feof(f) && !found) { { int pc=0; int pc=0; while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) while ((c=fgetc(f))!='{' && c!=':' && c!=EOF) // } so vi matching brackets has no problem { { //printf("parsing char `%c'\n",c); //printf("parsing char `%c'\n",c); if (c=='\n') if (c=='\n') Loading Loading @@ -816,7 +817,7 @@ bool readCodeFragment(const char *fileName, result+=spaces; result+=spaces; } } // copy until end of line // copy until end of line result+=c; if (c) result+=c; startLine=lineNr; startLine=lineNr; if (c==':') if (c==':') { { Loading