diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-08 12:10:17 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-08 12:10:17 (GMT) |
commit | 7d4f5205482b0f0212707d573c8c668a0125cc9f (patch) | |
tree | 83fa73cff0fbcd62182aff0cce8de83064954f45 /src/util.cpp | |
parent | 6d4835dbe01a27923db8a1e4559b61da5065cb7a (diff) | |
parent | 6382986b77d302be187d95aaa850eff132ec1d7d (diff) | |
download | Doxygen-7d4f5205482b0f0212707d573c8c668a0125cc9f.zip Doxygen-7d4f5205482b0f0212707d573c8c668a0125cc9f.tar.gz Doxygen-7d4f5205482b0f0212707d573c8c668a0125cc9f.tar.bz2 |
Merge branch 'memory_leakage_fix' of https://github.com/virusxp/doxygen into virusxp-memory_leakage_fix
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/util.cpp b/src/util.cpp index 5868b62..92d5548 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2428,7 +2428,7 @@ static QCString getFilterFromList(const char *name,const QStrList &filterList,bo if (i_equals!=-1) { QCString filterPattern = fs.left(i_equals); - QRegExp fpat(filterPattern,portable_fileSystemIsCaseSensitive(),TRUE); + QRegExp fpat(filterPattern,Portables::fileSystemIsCaseSensitive(),TRUE); if (fpat.match(name)!=-1) { // found a match! @@ -2589,7 +2589,7 @@ QCString fileToString(const char *name,bool filter,bool isSourceCode) static QDateTime getCurrentDateTime() { QDateTime current = QDateTime::currentDateTime(); - QCString sourceDateEpoch = portable_getenv("SOURCE_DATE_EPOCH"); + QCString sourceDateEpoch = Portables::getenv("SOURCE_DATE_EPOCH"); if (!sourceDateEpoch.isEmpty()) { bool ok; @@ -7928,14 +7928,22 @@ void stackTrace() p += sprintf(p,"%p ", backtraceFrames[x]); } fprintf(stderr,"========== STACKTRACE START ==============\n"); - if (FILE *fp = popen(cmd, "r")) + #if defined(_WIN32) && !defined(__CYGWIN__) + if (FILE *fp = _popen(cmd, "r")) + #else + if (FILE *fp = ::popen(cmd, "r")) + #endif { char resBuf[512]; while (size_t len = fread(resBuf, 1, sizeof(resBuf), fp)) { fwrite(resBuf, 1, len, stderr); } - pclose(fp); + #if defined(_WIN32) && !defined(__CYGWIN__) + _pclose(fp); + #else + ::pclose(fp); + #endif } fprintf(stderr,"============ STACKTRACE END ==============\n"); //fprintf(stderr,"%s\n", frameStrings[x]); @@ -8011,7 +8019,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC { QCString cmd=filterName+" \""+fileName+"\""; Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd)); - FILE *f=portable_popen(cmd,"r"); + FILE *f=Portables::popen(cmd,"r"); if (!f) { err("could not execute filter %s\n",filterName.data()); @@ -8025,7 +8033,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC //printf(">>>>>>>>Reading %d bytes\n",numRead); inBuf.addArray(buf,numRead),size+=numRead; } - portable_pclose(f); + Portables::pclose(f); inBuf.at(inBuf.curPos()) ='\0'; Debug::print(Debug::FilterOutput, 0, "Filter output\n"); Debug::print(Debug::FilterOutput,0,"-------------\n%s\n-------------\n",qPrint(inBuf)); |