diff --git a/cppcheck.cbproj b/cppcheck.cbproj index 5dd7158c2..c08b11a56 100644 --- a/cppcheck.cbproj +++ b/cppcheck.cbproj @@ -18,46 +18,46 @@ Base - true exe - JPHNE + true NO_STRICT + JPHNE true false - true C:\cppcheck;src - CppConsoleApplication + true true - .\ + CppConsoleApplication false - true + .\ vcl.bpi;rtl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;vcldbx.bpi;bdertl.bpi;A407_R110.bpi;DreamEdit_C6.bpi + true true false $(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;C:\cppcheck;src $(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;C:\cppcheck;src - true true + true - false false - true + false _DEBUG;$(Defines) + true true false true None DEBUG true - false .\ + false bcb_Debug true true true - true $(BDS)\lib\debug;$(ILINK_LibraryPath) + true Full true @@ -77,65 +77,80 @@ + + src\checkautovariables.h + 0 + src\checkbufferoverrun.h - 0 + 1 src\checkclass.h - 1 + 2 src\checkdangerousfunctions.h - 15 - - - src\checkfunctionusage.h - 2 + 3 src\checkheaders.h - 3 + 4 src\checkmemoryleak.h - 4 + 5 src\checkother.h - 5 - - 6 - + + src\checkstl.h 7 - - src\errormessage.h + + src\checkunusedfunctions.h 8 + + 9 + + + 10 + + + src\errorlogger.h + 11 + src\filelister.h - 9 + 12 - 10 + 13 + + + src\mathlib.h + 14 src\preprocessor.h - 11 + 15 - 12 + 16 + + + 17 src\token.h - 13 + 18 src\tokenize.h - 14 + 19 Cfg_1 diff --git a/src/filelister.cpp b/src/filelister.cpp index 22344fb23..f311d51b2 100644 --- a/src/filelister.cpp +++ b/src/filelister.cpp @@ -30,8 +30,12 @@ #endif #if defined(__BORLANDC__) || defined(_MSC_VER) || defined(__MINGW32__) #include +#ifdef __BORLANDC__ +#include +#else #include #endif +#endif std::string FileLister::simplifyPath(const char *originalPath) { @@ -198,9 +202,16 @@ static HANDLE MyFindFirstFile(std::string path, LPWIN32_FIND_DATA findData) static BOOL MyIsDirectory(std::string path) { - // See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx - BOOL res = PathIsDirectory(path.c_str()); - return res; +#ifdef __BORLANDC__ + struct ffblk ffblk; + int ret = findfirst(path.c_str(), &ffblk, FA_DIREC); + if (ret == 0) + findclose(&ffblk); + return !ret; +#else + // See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx + return PathIsDirectory(path.c_str()); +#endif } static HANDLE MyFindFirstFile(std::string path, LPWIN32_FIND_DATA findData)