Use the QVM build toolchain from ioq3
This commit is contained in:
@@ -63,9 +63,9 @@ char *ex_argv[MAX_EX_ARGC];
|
||||
void ExpandWildcards( int *argc, char ***argv )
|
||||
{
|
||||
struct _finddata_t fileinfo;
|
||||
int handle;
|
||||
intptr_t handle;
|
||||
int i;
|
||||
char filename[1024];
|
||||
char filename[2048];
|
||||
char filebase[1024];
|
||||
char *path;
|
||||
|
||||
@@ -88,7 +88,7 @@ void ExpandWildcards( int *argc, char ***argv )
|
||||
|
||||
do
|
||||
{
|
||||
sprintf (filename, "%s%s", filebase, fileinfo.name);
|
||||
snprintf (filename, sizeof(filename), "%s%s", filebase, fileinfo.name);
|
||||
ex_argv[ex_argc++] = copystring (filename);
|
||||
} while (_findnext( handle, &fileinfo ) != -1);
|
||||
|
||||
@@ -126,7 +126,7 @@ void Error( const char *error, ... )
|
||||
vsprintf (text, error,argptr);
|
||||
va_end (argptr);
|
||||
|
||||
sprintf (text2, "%s\nGetLastError() = %i", text, err);
|
||||
snprintf (text2, sizeof(text2), "%s\nGetLastError() = %i", text, err);
|
||||
MessageBox(NULL, text2, "Error", 0 /* MB_OK */ );
|
||||
|
||||
exit (1);
|
||||
@@ -185,7 +185,7 @@ void _printf( const char *format, ... ) {
|
||||
vsprintf (text, format, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
printf(text);
|
||||
printf("%s", text);
|
||||
|
||||
#ifdef WIN32
|
||||
if (!lookedForServer) {
|
||||
@@ -318,7 +318,7 @@ char *ExpandPath (const char *path)
|
||||
strcpy( full, path );
|
||||
return full;
|
||||
}
|
||||
sprintf (full, "%s%s", qdir, path);
|
||||
snprintf (full, sizeof(full), "%s%s", qdir, path);
|
||||
return full;
|
||||
}
|
||||
|
||||
@@ -331,20 +331,20 @@ char *ExpandGamePath (const char *path)
|
||||
strcpy( full, path );
|
||||
return full;
|
||||
}
|
||||
sprintf (full, "%s%s", gamedir, path);
|
||||
snprintf (full, sizeof(full), "%s%s", gamedir, path);
|
||||
return full;
|
||||
}
|
||||
|
||||
char *ExpandPathAndArchive (const char *path)
|
||||
{
|
||||
char *expanded;
|
||||
char archivename[1024];
|
||||
char archivename[2048];
|
||||
|
||||
expanded = ExpandPath (path);
|
||||
|
||||
if (archive)
|
||||
{
|
||||
sprintf (archivename, "%s/%s", archivedir, path);
|
||||
snprintf (archivename, sizeof(archivename), "%s/%s", archivedir, path);
|
||||
QCopyFile (expanded, archivename);
|
||||
}
|
||||
return expanded;
|
||||
@@ -396,10 +396,12 @@ void Q_getwd (char *out)
|
||||
int i = 0;
|
||||
|
||||
#ifdef WIN32
|
||||
_getcwd (out, 256);
|
||||
if (_getcwd (out, 256) == NULL)
|
||||
strcpy(out, "."); /* shrug */
|
||||
strcat (out, "\\");
|
||||
#else
|
||||
getcwd (out, 256);
|
||||
if (getcwd (out, 256) == NULL)
|
||||
strcpy(out, "."); /* shrug */
|
||||
strcat (out, "/");
|
||||
#endif
|
||||
|
||||
@@ -732,7 +734,7 @@ int LoadFile( const char *filename, void **bufferptr )
|
||||
==============
|
||||
LoadFileBlock
|
||||
-
|
||||
rounds up memory allocation to 4K boundry
|
||||
rounds up memory allocation to 4K boundary
|
||||
-
|
||||
==============
|
||||
*/
|
||||
@@ -808,7 +810,7 @@ void DefaultExtension (char *path, const char *extension)
|
||||
{
|
||||
char *src;
|
||||
//
|
||||
// if path doesnt have a .EXT, append extension
|
||||
// if path doesn't have a .EXT, append extension
|
||||
// (extension should include the .)
|
||||
//
|
||||
src = path + strlen(path) - 1;
|
||||
|
||||
Reference in New Issue
Block a user