From: Rafał Długołęcki Date: Fri, 12 Jul 2013 15:27:42 +0000 (+0200) Subject: Cutting lines before passing 80 characters a row in logcomp. X-Git-Tag: 3.1~52 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=bf20a1e75abf4e71158ad555858144d57b2afc27;p=vlp.git Cutting lines before passing 80 characters a row in logcomp. --- diff --git a/src/preproc/prep.cpp b/src/preproc/prep.cpp index 7a00924..285b2c8 100644 --- a/src/preproc/prep.cpp +++ b/src/preproc/prep.cpp @@ -120,7 +120,8 @@ int main(int argc,char **argv) QFile srcfile(argv[1]); if (!compfile.open(IO_WriteOnly)) { - fprintf(stdout,"Cannot open temp file to write %s\n", poms1.data()); + fprintf(stdout,"Cannot open temp file to write %s\n", + poms1.data()); exit(1); } @@ -144,11 +145,13 @@ int main(int argc,char **argv) if ((i != -1) && (j != -1)) { IncFile *p; poms1 = poms.mid(i + 1, j - i - 1); - p = new IncFile((char*)poms1.ascii(), currentline); + p = new IncFile((char*)poms1.ascii(), + currentline); poms2.sprintf("%s%s", homedir, poms1.data()); QFile pomf(poms2.data()); if (!pomf.open(IO_ReadOnly)) { - fprintf(stdout, "Cannot open include file: %s\n", poms2.data()); + fprintf(stdout, "Cannot open include " + "file: %s\n", poms2.data()); exit(1); } QTextStream pomstream(&pomf); @@ -213,7 +216,7 @@ int main(int argc,char **argv) while ((!errstream.eof()) && (i == -1)) { poms = errstream.readLine(); i = poms.find("LOGLAN-82"); - } // *** + } while (!errstream.eof()) { poms = errstream.readLine(); @@ -221,17 +224,18 @@ int main(int argc,char **argv) if (i != -1) { i = i-2; j = poms.findRev(' ', i); - poms1 = poms.mid(j+1, i-j); + poms1 = poms.mid(j + 1, i - j); line = poms1.toInt(); fl = findTrueLine(line, &tline); poms2 = poms.right(poms.length() - i - 1); if (fl != NULL) fprintf(stdout, "%s: ", fl->filename); - fprintf(stdout, "%d %s\n", tline, poms2.data()); + fprintf(stdout, "%d %s\n", + tline, poms2.data()); } } err.close(); - } // errors + } /* errors */ poms.sprintf("%s/cmp01.log",mydir); unlink(poms.data());