#include <cpExtensions/Config.h>
// -------------------------------------------------------------------------
-#ifdef cpPlugins_OS_Windows
+#ifdef cpExtensions_OS_Windows
# define cpExtensions_STRTOK( A, B, N ) strtok_s( A, B, N )
# define cpExtensions_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O );
-#else // cpPlugins_OS_Windows
+#else // cpExtensions_OS_Windows
# define cpExtensions_STRTOK( A, B, N ) std::strtok( A, B )
# define cpExtensions_SPRINTF( B, S, O ) std::sprintf( B, "%s", O );
-#endif // cpPlugins_OS_Windows
+#endif // cpExtensions_OS_Windows
// -------------------------------------------------------------------------
#define cpExtensions_CHRONO \
// -----------------------------------------------------------------------
inline bool IsPathSeparator( char c )
{
-#ifdef cpPlugins_Windows
- return( c == '\\' || c == cpExtensions_PATH_SEPARATOR );
-#else // cpPlugins_Windows
+#ifdef cpExtensions_OS_Windows
+ return( c == '/' || c == cpExtensions_PATH_SEPARATOR );
+#else // cpExtensions_OS_Windows
return( c == cpExtensions_PATH_SEPARATOR );
-#endif // cpPlugins_Windows
+#endif // cpExtensions_OS_Windows
}
// -----------------------------------------------------------------------
inline std::string CanonicalPath( const std::string& path )
{
std::string ret = "";
-#ifdef cpPlugins_OS_Windows
+#ifdef cpExtensions_OS_Windows
TCHAR buffer[ 4096 ] = TEXT( "" );
TCHAR** lppPart = { NULL };
GetFullPathName( path.c_str( ), 4096, buffer, lppPart );
ret = std::string( buffer );
-#else // cpPlugins_OS_Windows
+#else // cpExtensions_OS_Windows
char* canonical_path = realpath( path.c_str( ), NULL );
if( canonical_path != NULL )
{
free( canonical_path );
} // fi
-#endif // cpPlugins_OS_Windows
+#endif // cpExtensions_OS_Windows
return( ret );
}