Cutting lines before passing 80 characters a row in logcomp.
authorRafał Długołęcki <kontakt@dlugolecki.net.pl>
Fri, 12 Jul 2013 15:27:42 +0000 (17:27 +0200)
committerRafał Długołęcki <kontakt@dlugolecki.net.pl>
Fri, 12 Jul 2013 15:27:42 +0000 (17:27 +0200)
src/preproc/prep.cpp

index 7a00924f8a3c59c289b477bead18ee5cbc1d07db..285b2c899d69502b0dea048527afa23de6a7a9d3 100644 (file)
@@ -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());