X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=src%2Fpreproc%2Fprep.cpp;h=020b3321845d595edc32cfa84d78c13b0244c6c9;hb=HEAD;hp=00b564edd523de2ea95e80c86b2f1adf17134635;hpb=b48a74556fd21dfc175d754058d22b9216e6b12e;p=vlp.git diff --git a/src/preproc/prep.cpp b/src/preproc/prep.cpp index 00b564e..020b332 100644 --- a/src/preproc/prep.cpp +++ b/src/preproc/prep.cpp @@ -6,7 +6,6 @@ #include #include #include -#include class IncFile { @@ -31,7 +30,7 @@ IncFile *findTrueLine(int ln, int *trueline) int c1 = 0; // int c2 = 0; - QListIterator incFileIterator(inc); + QListIterator incFileIterator(inc); if (!incFileIterator.hasNext()) { *trueline = ln; return NULL; @@ -53,7 +52,7 @@ IncFile *findTrueLine(int ln, int *trueline) } if (incFileIterator.hasNext()) { - QListIterator plIterator(pl); + QListIterator plIterator(pl); c1=0; while (plIterator.hasNext()) { pom1 = plIterator.next(); @@ -84,7 +83,7 @@ int main(int argc,char **argv) int currentline = 1; int i, j, line, tline; - + inc.clear(); poms.sprintf("%s", argv[1]); i = poms.findRev('/', poms.length() - 1, FALSE); @@ -128,7 +127,7 @@ int main(int argc,char **argv) } if (!srcfile.open(IO_ReadOnly)) { - fprintf(stdout, "Cannot open file\n"); + fprintf(stdout, "Cannot open file: %s\n", srcfile.fileName().toStdString().c_str()); exit(1); } @@ -202,7 +201,12 @@ int main(int argc,char **argv) unlink(poms1.toStdString().c_str()); } } else { - fprintf(stdout, "Errors\n"); + QString errors; + errors.sprintf("Errors: %s does not exists, current path: %s\n", + poms.toStdString().c_str(), + QDir::currentPath().toStdString().c_str() + ); + fprintf(stdout, errors.toStdString().c_str()); poms.sprintf("%s/.cmp00", mydir); QFile err(poms.toStdString().c_str());