From f981087d7ab3aef8cb07d9111f4a6435571b0298 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Wed, 15 Jun 2011 15:31:37 +0000 Subject: [PATCH] - Merge http://svn.icculus.org/tremulous?view=rev&revision=2185, patch by Chris Schwarz - Remove Q_snprintf as Com_sprintf exists already --- code/game/bg_lib.c | 12 ------------ code/game/bg_lib.h | 1 - code/game/g_main.c | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/code/game/bg_lib.c b/code/game/bg_lib.c index 2517e3c8..2b74c166 100644 --- a/code/game/bg_lib.c +++ b/code/game/bg_lib.c @@ -2083,18 +2083,6 @@ int Q_vsnprintf(char *str, size_t length, const char *fmt, va_list args) return dopr(str, length, fmt, args); } -int Q_snprintf(char *str, size_t length, const char *fmt, ...) -{ - va_list ap; - int retval; - - va_start(ap, fmt); - retval = Q_vsnprintf(str, length, fmt, ap); - va_end(ap); - - return retval; -} - /* this is really crappy */ int sscanf( const char *buffer, const char *fmt, ... ) { int cmd; diff --git a/code/game/bg_lib.h b/code/game/bg_lib.h index 305edca5..75e3a44e 100644 --- a/code/game/bg_lib.h +++ b/code/game/bg_lib.h @@ -102,7 +102,6 @@ int _atoi( const char **stringPtr ); long strtol( const char *nptr, char **endptr, int base ); int Q_vsnprintf( char *buffer, size_t length, const char *fmt, va_list argptr ); -int Q_snprintf( char *buffer, size_t length, const char *fmt, ... ) __attribute__ ((format (printf, 3, 4))); int sscanf( const char *buffer, const char *fmt, ... ) __attribute__ ((format (scanf, 2, 3))); diff --git a/code/game/g_main.c b/code/game/g_main.c index 30925fc8..2b2fb3ff 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -1113,7 +1113,7 @@ void QDECL G_LogPrintf( const char *fmt, ... ) { char string[1024]; int min, tens, sec; - sec = level.time / 1000; + sec = ( level.time - level.startTime ) / 1000; min = sec / 60; sec -= min * 60;