diff options
author | Tim Angus <tim@ngus.net> | 2009-10-03 15:17:16 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:38 +0000 |
commit | 6d2ffb4c637a49983bc6ce22b68ccec0ed09e0f4 (patch) | |
tree | ff15343e4a2ae5a2512c1c21e05a3821a46f10da /src/tools | |
parent | e9e52d0b7ec9bae071534df7581126d69d3e9bf8 (diff) |
* Merge ioq3-r1637
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/asm/cmdlib.c | 8 | ||||
-rw-r--r-- | src/tools/asm/q3asm.c | 17 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/tools/asm/cmdlib.c b/src/tools/asm/cmdlib.c index ac088675..aca34313 100644 --- a/src/tools/asm/cmdlib.c +++ b/src/tools/asm/cmdlib.c @@ -186,7 +186,7 @@ void _printf( const char *format, ... ) { vsprintf (text, format, argptr); va_end (argptr); - printf(text); + printf("%s", text); #ifdef WIN32 if (!lookedForServer) { @@ -397,10 +397,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 diff --git a/src/tools/asm/q3asm.c b/src/tools/asm/q3asm.c index 3c334815..481a1acb 100644 --- a/src/tools/asm/q3asm.c +++ b/src/tools/asm/q3asm.c @@ -490,10 +490,10 @@ static void CodeError( char *fmt, ... ) { errorCount++; - report( "%s:%i ", currentFileName, currentFileLine ); + fprintf( stderr, "%s:%i ", currentFileName, currentFileLine ); va_start( argptr,fmt ); - vprintf( fmt,argptr ); + vfprintf( stderr, fmt, argptr ); va_end( argptr ); } @@ -1521,12 +1521,13 @@ static void ShowHelp( char *argv0 ) { Error("Usage: %s [OPTION]... [FILES]...\n\ Assemble LCC bytecode assembly to Q3VM bytecode.\n\ \n\ - -o OUTPUT Write assembled output to file OUTPUT.qvm\n\ - -f LISTFILE Read options and list of files to assemble from LISTFILE.q3asm\n\ - -b BUCKETS Set symbol hash table to BUCKETS buckets\n\ - -v Verbose compilation report\n\ - -vq3 Produce a qvm file compatible with Q3 1.32b\n\ - -h --help -? Show this help\n\ + -o OUTPUT Write assembled output to file OUTPUT.qvm\n\ + -f LISTFILE Read options and list of files to assemble from LISTFILE.q3asm\n\ + -b BUCKETS Set symbol hash table to BUCKETS buckets\n\ + -m Generate a mapfile for each OUTPUT.qvm\n\ + -v Verbose compilation report\n\ + -vq3 Produce a qvm file compatible with Q3 1.32b\n\ + -h --help -? Show this help\n\ ", argv0); } |