Update of /cvsroot/csp/APPLICATIONS/CSPFlightSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv6756
Modified Files:
Platform.cpp
Log Message:
Fixing path separator for windows
Index: Platform.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPFlightSim/Source/Platform.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Platform.cpp 13 Dec 2002 04:36:59 -0000 1.1
--- Platform.cpp 14 Dec 2002 18:51:30 -0000 1.2
***************
*** 39,44 ****
#include <string.h>
#include <errno.h>
- #include <unistd.h>
-
#ifdef NATIVE_WIN32
--- 39,42 ----
***************
*** 51,58 ****
# include <io.h>
# endif /* _MSC_VER */
! #endif /* NATIVE_WIN32 */
!
! std::string OSPath::basename(const string &path)
{
std::string::size_type base;
--- 49,57 ----
# include <io.h>
# endif /* _MSC_VER */
! #else /* NATIVE_WIN32 */
! # include <unistd.h>
! #endif
! std::string OSPath::basename(const std::string &path)
{
std::string::size_type base;
***************
*** 143,147 ****
char *idx = str;
for (; *idx; idx++) {
! if (*idx == '\\') *idx = '/';
}
result = str;
--- 142,146 ----
char *idx = str;
for (; *idx; idx++) {
! if (*idx == '/') *idx = '\\';
}
result = str;
|