*/
#include "misc.h"
+#include "globaldefs.h"
#include <list>
#include "str.h"
#include "funchandlers.h"
-#ifdef __linux__
+#if GDEF_OS_POSIX
#include <sys/types.h>
#include <unistd.h>
#endif
std::size_t l = strlen( buf );
char* out = buf2;
- for ( int i = 0 ; i < l ; i++ )
+ for ( std::size_t i = 0 ; i < l ; i++ )
{
if ( buf[i] == '\n' ) {
*out++ = '\r';
char* UnixToDosPath( char* path ){
-#ifndef WIN32
+#if !GDEF_OS_WINDOWS
return path;
#else
for ( char* p = path; *p; p++ )
return buffer;
}*/
-#if defined ( POSIX )
+#if GDEF_OS_POSIX
// the bCreateConsole parameter is ignored on linux ..
bool Q_Exec( const char *pCmd, bool bCreateConsole ){
switch ( fork() )
// Error ("CreateProcess failed");
break;
case 0:
-#ifdef _DEBUG
+#if GDEF_DEBUG
printf( "Running system...\n" );
printf( "Command: %s\n", pCmd );
#endif
}
#endif
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
#include <windows.h>
}
char* GetFilename( char* buffer, const char* filename ) {
- strcpy( buffer, GlobalRadiant().getAppPath() );
+ strcpy( buffer, GlobalRadiant().getDataPath() );
strcat( buffer, "plugins/" );
strcat( buffer, filename );
return buffer;