/*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+ Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
This file is part of GtkRadiant.
#define __CMDLIB__
#include "bytebool.h"
+#include "globaldefs.h"
-#ifdef _WIN32
+#if GDEF_COMPILER_MSVC
#pragma warning(disable : 4244) // MIPS
#pragma warning(disable : 4136) // X86
#pragma warning(disable : 4051) // ALPHA
#include <time.h>
#include <stdarg.h>
-#ifdef _WIN32
+#if GDEF_COMPILER_MSVC
#pragma intrinsic( memset, memcpy )
// the dec offsetof macro doesnt work very well...
#define myoffsetof( type,identifier ) ( (size_t)& ( (type *)0 )->identifier )
-#define SAFE_MALLOC
-#ifdef SAFE_MALLOC
void *safe_malloc( size_t size );
void *safe_malloc_info( size_t size, char* info );
-#else
-#define safe_malloc( a ) malloc( a )
-#endif /* SAFE_MALLOC */
+void *safe_malloc0( size_t size );
+void *safe_malloc0_info( size_t size, char* info );
// set these before calling CheckParm
extern int myargc;
void SetQdirFromPath( const char *path );
char *ExpandArg( const char *path ); // from cmd line
char *ExpandPath( const char *path ); // from scripts
-char *ExpandGamePath( const char *path );
-char *ExpandPathAndArchive( const char *path );
void ExpandWildcards( int *argc, char ***argv );
double I_FloatTime( void );
-void Error( const char *error, ... )
-#ifdef __GNUC__
-__attribute__( ( noreturn ) )
-#endif
-;
+void Error( const char *error, ... ) GDEF_ATTRIBUTE_NORETURN;
int CheckParm( const char *check );
FILE *SafeOpenWrite( const char *filename );