]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
sys: Rename Sys_Print(f)ToTerminal to Sys_Print(f) for consistency
authorCloudwalk <cloudwalk009@gmail.com>
Fri, 30 Jul 2021 15:17:02 +0000 (11:17 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Fri, 30 Jul 2021 17:30:01 +0000 (13:30 -0400)
cl_screen.c
console.c
sys.h
sys_sdl.c
sys_shared.c
sys_unix.c
sys_win.c
thread.h
thread_pthread.c
thread_sdl.c
thread_win.c

index 50a9df41fc183545355df6b3371e032ad14522d8..44b493e4771d4105abb1e3750fe54951a9f174f3 100644 (file)
@@ -1206,7 +1206,7 @@ static void SCR_CaptureVideo_VideoFrame(int newframestepframenum)
                        double fps1 = (cls.capturevideo.frame - cls.capturevideo.lastfpsframe) / (t - cls.capturevideo.lastfpstime + 0.0000001);
                        double fps  = (cls.capturevideo.frame                                ) / (t - cls.capturevideo.starttime   + 0.0000001);
                        dpsnprintf(buf, sizeof(buf), "capturevideo: (%.1fs) last second %.3ffps, total %.3ffps\n", cls.capturevideo.frame / cls.capturevideo.framerate, fps1, fps);
-                       Sys_PrintToTerminal(buf);
+                       Sys_Print(buf);
                        cls.capturevideo.lastfpstime = t;
                        cls.capturevideo.lastfpsframe = cls.capturevideo.frame;
                }
index e7e810e63eb6169b9f85cbcc5974deb8fc8609a7..b0afdd4c6835fa5ccb741339f67a5042d93c0dfa 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1361,11 +1361,11 @@ void Con_MaskPrint(int additionalmask, const char *msg)
                                                *out++ = 'm';
                                        }
                                        *out++ = 0;
-                                       Sys_PrintToTerminal(printline);
+                                       Sys_Print(printline);
                                }
                                else if(sys_colortranslation.integer == 2) // Quake
                                {
-                                       Sys_PrintToTerminal(line);
+                                       Sys_Print(line);
                                }
                                else // strip
                                {
@@ -1416,7 +1416,7 @@ void Con_MaskPrint(int additionalmask, const char *msg)
                                                }
                                        }
                                        *out++ = 0;
-                                       Sys_PrintToTerminal(printline);
+                                       Sys_Print(printline);
                                }
                        }
                        // empty the line buffer
@@ -1667,7 +1667,7 @@ static float Con_WordWidthFunc(void *passthrough, const char *w, size_t *length,
                return DrawQ_TextWidth(w, *length, ti->fontsize, ti->fontsize, false, ti->font);
        else
        {
-               Sys_PrintfToTerminal("Con_WordWidthFunc: can't get here (maxWidth should never be %f)\n", maxWidth);
+               Sys_Printf("Con_WordWidthFunc: can't get here (maxWidth should never be %f)\n", maxWidth);
                // Note: this is NOT a Con_Printf, as it could print recursively
                return 0;
        }
diff --git a/sys.h b/sys.h
index ea711f661e7f00a5687988a76f9869f175108a27..d9a9d335dab78c600172c262817d54ffe1bb04f3 100644 (file)
--- a/sys.h
+++ b/sys.h
@@ -209,8 +209,8 @@ char *Sys_TimeString(const char *timeformat);
 void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN;
 
 /// (may) output text to terminal which launched program
-void Sys_PrintToTerminal(const char *text);
-void Sys_PrintfToTerminal(const char *fmt, ...);
+void Sys_Print(const char *text);
+void Sys_Printf(const char *fmt, ...);
 
 /// INFO: This is only called by Host_Shutdown so we dont need testing for recursion
 void Sys_Shutdown (void);
index 3f37a8e4f0af84045d82228817d890117bfe0816..4a14441472e32c4fa54aaf65d223037ce9099525 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
@@ -70,7 +70,7 @@ void Sys_Error (const char *error, ...)
        exit (1);
 }
 
-void Sys_PrintToTerminal(const char *text)
+void Sys_Print(const char *text)
 {
 #ifdef __ANDROID__
        if (developer.integer > 0)
index 3c6b0356698b63bb9bf8007ff6c5c9e8820739da..39c9bf8bf4e1507d37a0d59b831e078dae5c63a9 100644 (file)
@@ -504,11 +504,11 @@ void Sys_Sleep(int microseconds)
        if(sys_debugsleep.integer)
        {
                t = Sys_DirtyTime() - t;
-               Sys_PrintfToTerminal("%d %d # debugsleep\n", microseconds, (unsigned int)(t * 1000000));
+               Sys_Printf("%d %d # debugsleep\n", microseconds, (unsigned int)(t * 1000000));
        }
 }
 
-void Sys_PrintfToTerminal(const char *fmt, ...)
+void Sys_Printf(const char *fmt, ...)
 {
        va_list argptr;
        char msg[MAX_INPUTLINE];
@@ -517,7 +517,7 @@ void Sys_PrintfToTerminal(const char *fmt, ...)
        dpvsnprintf(msg,sizeof(msg),fmt,argptr);
        va_end(argptr);
 
-       Sys_PrintToTerminal(msg);
+       Sys_Print(msg);
 }
 
 #ifndef WIN32
index eccf986e3791149cbf604cb3f3506b7852430cd9..ff332a68f7f6208fd5bdfa7bf995743fbc034752 100644 (file)
@@ -46,7 +46,7 @@ void Sys_Error (const char *error, ...)
        exit (1);
 }
 
-void Sys_PrintToTerminal(const char *text)
+void Sys_Print(const char *text)
 {
        if(sys.outfd < 0)
                return;
index 8ae3bbe9d239a791189e0a74d078917c33941b09..237670fc148159df9709b3058632687fa8fc7f75 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -112,7 +112,7 @@ void Sys_Shutdown (void)
 #endif
 }
 
-void Sys_PrintToTerminal(const char *text)
+void Sys_Print(const char *text)
 {
        DWORD dummy;
        extern HANDLE houtput;
index 05b0f8595cdbe43a6b705b8318e0162b8eddaf8c..ac72b2827e22955788278655c1e1b6c63a430d1b 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -3,7 +3,7 @@
 
 #include "qtypes.h"
 
-// enable Sys_PrintfToTerminal calls on nearly every threading call
+// enable Sys_Printf calls on nearly every threading call
 //#define THREADDEBUG
 //#define THREADDISABLE
 // use recursive mutex (non-posix) extensions in thread_pthread
index 2f8273ab41315f578c998a0344705ff8bbf864c8..bd96b101653ab9016675dadfbcea997dc3a4bc46 100644 (file)
@@ -28,7 +28,7 @@ void *_Thread_CreateMutex(const char *filename, int fileline)
 #endif
        pthread_mutex_t *mutexp = (pthread_mutex_t *) Z_Malloc(sizeof(pthread_mutex_t));
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex create %s:%i\n" , mutexp, filename, fileline);
+       Sys_Printf("%p mutex create %s:%i\n" , mutexp, filename, fileline);
 #endif
 #ifdef THREADRECURSIVE
        pthread_mutexattr_init(&attr);
@@ -45,7 +45,7 @@ void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex destroy %s:%i\n", mutex, filename, fileline);
+       Sys_Printf("%p mutex destroy %s:%i\n", mutex, filename, fileline);
 #endif
        pthread_mutex_destroy(mutexp);
        Z_Free(mutexp);
@@ -55,7 +55,7 @@ int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex lock %s:%i\n"   , mutex, filename, fileline);
+       Sys_Printf("%p mutex lock %s:%i\n"   , mutex, filename, fileline);
 #endif
        return pthread_mutex_lock(mutexp);
 }
@@ -64,7 +64,7 @@ int _Thread_UnlockMutex(void *mutex, const char *filename, int fileline)
 {
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex unlock %s:%i\n" , mutex, filename, fileline);
+       Sys_Printf("%p mutex unlock %s:%i\n" , mutex, filename, fileline);
 #endif
        return pthread_mutex_unlock(mutexp);
 }
@@ -74,7 +74,7 @@ void *_Thread_CreateCond(const char *filename, int fileline)
        pthread_cond_t *condp = (pthread_cond_t *) Z_Malloc(sizeof(pthread_cond_t));
        pthread_cond_init(condp, NULL);
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond create %s:%i\n"   , condp, filename, fileline);
+       Sys_Printf("%p cond create %s:%i\n"   , condp, filename, fileline);
 #endif
        return condp;
 }
@@ -83,7 +83,7 @@ void _Thread_DestroyCond(void *cond, const char *filename, int fileline)
 {
        pthread_cond_t *condp = (pthread_cond_t *) cond;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond destroy %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond destroy %s:%i\n"   , cond, filename, fileline);
 #endif
        pthread_cond_destroy(condp);
        Z_Free(condp);
@@ -93,7 +93,7 @@ int _Thread_CondSignal(void *cond, const char *filename, int fileline)
 {
        pthread_cond_t *condp = (pthread_cond_t *) cond;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond signal %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond signal %s:%i\n"   , cond, filename, fileline);
 #endif
        return pthread_cond_signal(condp);
 }
@@ -102,7 +102,7 @@ int _Thread_CondBroadcast(void *cond, const char *filename, int fileline)
 {
        pthread_cond_t *condp = (pthread_cond_t *) cond;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond broadcast %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond broadcast %s:%i\n"   , cond, filename, fileline);
 #endif
        return pthread_cond_broadcast(condp);
 }
@@ -112,7 +112,7 @@ int _Thread_CondWait(void *cond, void *mutex, const char *filename, int fileline
        pthread_cond_t *condp = (pthread_cond_t *) cond;
        pthread_mutex_t *mutexp = (pthread_mutex_t *) mutex;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond wait %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond wait %s:%i\n"   , cond, filename, fileline);
 #endif
        return pthread_cond_wait(condp, mutexp);
 }
@@ -121,7 +121,7 @@ void *_Thread_CreateThread(int (*fn)(void *), void *data, const char *filename,
 {
        pthread_t *threadp = (pthread_t *) Z_Malloc(sizeof(pthread_t));
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p thread create %s:%i\n"   , threadp, filename, fileline);
+       Sys_Printf("%p thread create %s:%i\n"   , threadp, filename, fileline);
 #endif
        int r = pthread_create(threadp, NULL, (void * (*) (void *)) fn, data);
        if(r)
@@ -137,7 +137,7 @@ int _Thread_WaitThread(void *thread, int retval, const char *filename, int filel
        pthread_t *threadp = (pthread_t *) thread;
        void *status = (void *) (intptr_t) retval;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p thread wait %s:%i\n"   , thread, filename, fileline);
+       Sys_Printf("%p thread wait %s:%i\n"   , thread, filename, fileline);
 #endif
        pthread_join(*threadp, &status);
        Z_Free(threadp);
@@ -149,7 +149,7 @@ void *_Thread_CreateBarrier(unsigned int count, const char *filename, int fileli
 {
        pthread_barrier_t *b = (pthread_barrier_t *) Z_Malloc(sizeof(pthread_barrier_t));
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
+       Sys_Printf("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
 #endif
        pthread_barrier_init(b, NULL, count);
        return (void *) b;
@@ -159,7 +159,7 @@ void _Thread_DestroyBarrier(void *barrier, const char *filename, int fileline)
 {
        pthread_barrier_t *b = (pthread_barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier destroy %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier destroy %s:%i\n", b, filename, fileline);
 #endif
        pthread_barrier_destroy(b);
 }
@@ -168,7 +168,7 @@ void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
 {
        pthread_barrier_t *b = (pthread_barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier wait %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier wait %s:%i\n", b, filename, fileline);
 #endif
        pthread_barrier_wait(b);
 }
@@ -186,7 +186,7 @@ void *_Thread_CreateBarrier(unsigned int count, const char *filename, int fileli
 {
        volatile barrier_t *b = (volatile barrier_t *) Z_Malloc(sizeof(barrier_t));
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
+       Sys_Printf("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
 #endif
        b->needed = count;
        b->called = 0;
@@ -199,7 +199,7 @@ void _Thread_DestroyBarrier(void *barrier, const char *filename, int fileline)
 {
        volatile barrier_t *b = (volatile barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier destroy %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier destroy %s:%i\n", b, filename, fileline);
 #endif
        Thread_DestroyMutex(b->mutex);
        Thread_DestroyCond(b->cond);
@@ -209,7 +209,7 @@ void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
 {
        volatile barrier_t *b = (volatile barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier wait %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier wait %s:%i\n", b, filename, fileline);
 #endif
        Thread_LockMutex(b->mutex);
        b->called++;
index 3ce56c89f77e369049178099b741e5af9371e3e0..8e0f49b79177c7d036115f2015f9f20e1b5b47c8 100644 (file)
@@ -28,7 +28,7 @@ void *_Thread_CreateMutex(const char *filename, int fileline)
 {
        void *mutex = SDL_CreateMutex();
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex create %s:%i\n" , mutex, filename, fileline);
+       Sys_Printf("%p mutex create %s:%i\n" , mutex, filename, fileline);
 #endif
        return mutex;
 }
@@ -36,7 +36,7 @@ void *_Thread_CreateMutex(const char *filename, int fileline)
 void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex destroy %s:%i\n", mutex, filename, fileline);
+       Sys_Printf("%p mutex destroy %s:%i\n", mutex, filename, fileline);
 #endif
        SDL_DestroyMutex((SDL_mutex *)mutex);
 }
@@ -44,7 +44,7 @@ void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
 int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex lock %s:%i\n"   , mutex, filename, fileline);
+       Sys_Printf("%p mutex lock %s:%i\n"   , mutex, filename, fileline);
 #endif
        return SDL_LockMutex((SDL_mutex *)mutex);
 }
@@ -52,7 +52,7 @@ int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
 int _Thread_UnlockMutex(void *mutex, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex unlock %s:%i\n" , mutex, filename, fileline);
+       Sys_Printf("%p mutex unlock %s:%i\n" , mutex, filename, fileline);
 #endif
        return SDL_UnlockMutex((SDL_mutex *)mutex);
 }
@@ -61,7 +61,7 @@ void *_Thread_CreateCond(const char *filename, int fileline)
 {
        void *cond = (void *)SDL_CreateCond();
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond create %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond create %s:%i\n"   , cond, filename, fileline);
 #endif
        return cond;
 }
@@ -69,7 +69,7 @@ void *_Thread_CreateCond(const char *filename, int fileline)
 void _Thread_DestroyCond(void *cond, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond destroy %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond destroy %s:%i\n"   , cond, filename, fileline);
 #endif
        SDL_DestroyCond((SDL_cond *)cond);
 }
@@ -77,7 +77,7 @@ void _Thread_DestroyCond(void *cond, const char *filename, int fileline)
 int _Thread_CondSignal(void *cond, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond signal %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond signal %s:%i\n"   , cond, filename, fileline);
 #endif
        return SDL_CondSignal((SDL_cond *)cond);
 }
@@ -85,7 +85,7 @@ int _Thread_CondSignal(void *cond, const char *filename, int fileline)
 int _Thread_CondBroadcast(void *cond, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond broadcast %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond broadcast %s:%i\n"   , cond, filename, fileline);
 #endif
        return SDL_CondBroadcast((SDL_cond *)cond);
 }
@@ -93,7 +93,7 @@ int _Thread_CondBroadcast(void *cond, const char *filename, int fileline)
 int _Thread_CondWait(void *cond, void *mutex, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond wait %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond wait %s:%i\n"   , cond, filename, fileline);
 #endif
        return SDL_CondWait((SDL_cond *)cond, (SDL_mutex *)mutex);
 }
@@ -102,7 +102,7 @@ void *_Thread_CreateThread(int (*fn)(void *), void *data, const char *filename,
 {
        void *thread = (void *)SDL_CreateThread(fn, filename, data);
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p thread create %s:%i\n"   , thread, filename, fileline);
+       Sys_Printf("%p thread create %s:%i\n"   , thread, filename, fileline);
 #endif
        return thread;
 }
@@ -111,7 +111,7 @@ int _Thread_WaitThread(void *thread, int retval, const char *filename, int filel
 {
        int status = retval;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p thread wait %s:%i\n"   , thread, filename, fileline);
+       Sys_Printf("%p thread wait %s:%i\n"   , thread, filename, fileline);
 #endif
        SDL_WaitThread((SDL_Thread *)thread, &status);
        return status;
@@ -130,7 +130,7 @@ void *_Thread_CreateBarrier(unsigned int count, const char *filename, int fileli
 {
        volatile barrier_t *b = (volatile barrier_t *) Z_Malloc(sizeof(barrier_t));
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
+       Sys_Printf("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
 #endif
        b->needed = count;
        b->called = 0;
@@ -143,7 +143,7 @@ void _Thread_DestroyBarrier(void *barrier, const char *filename, int fileline)
 {
        volatile barrier_t *b = (volatile barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier destroy %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier destroy %s:%i\n", b, filename, fileline);
 #endif
        Thread_DestroyMutex(b->mutex);
        Thread_DestroyCond(b->cond);
@@ -153,7 +153,7 @@ void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
 {
        volatile barrier_t *b = (volatile barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier wait %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier wait %s:%i\n", b, filename, fileline);
 #endif
        Thread_LockMutex(b->mutex);
        b->called++;
@@ -171,7 +171,7 @@ void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
 int _Thread_AtomicGet(Thread_Atomic *a, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic get at %s:%i\n", a, filename, fileline);
+       Sys_Printf("%p atomic get at %s:%i\n", a, filename, fileline);
 #endif
        return SDL_AtomicGet((SDL_atomic_t *)a);
 }
@@ -179,7 +179,7 @@ int _Thread_AtomicGet(Thread_Atomic *a, const char *filename, int fileline)
 int _Thread_AtomicSet(Thread_Atomic *a, int v, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic set %v at %s:%i\n", a, v, filename, fileline);
+       Sys_Printf("%p atomic set %v at %s:%i\n", a, v, filename, fileline);
 #endif
        return SDL_AtomicSet((SDL_atomic_t *)a, v);
 }
@@ -187,7 +187,7 @@ int _Thread_AtomicSet(Thread_Atomic *a, int v, const char *filename, int filelin
 int _Thread_AtomicAdd(Thread_Atomic *a, int v, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic add %v at %s:%i\n", a, v, filename, fileline);
+       Sys_Printf("%p atomic add %v at %s:%i\n", a, v, filename, fileline);
 #endif
        return SDL_AtomicAdd((SDL_atomic_t *)a, v);
 }
@@ -195,7 +195,7 @@ int _Thread_AtomicAdd(Thread_Atomic *a, int v, const char *filename, int filelin
 void _Thread_AtomicIncRef(Thread_Atomic *a, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic incref %s:%i\n", a, filename, fileline);
+       Sys_Printf("%p atomic incref %s:%i\n", a, filename, fileline);
 #endif
        SDL_AtomicIncRef((SDL_atomic_t *)a);
 }
@@ -203,7 +203,7 @@ void _Thread_AtomicIncRef(Thread_Atomic *a, const char *filename, int fileline)
 qbool _Thread_AtomicDecRef(Thread_Atomic *a, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic decref %s:%i\n", a, filename, fileline);
+       Sys_Printf("%p atomic decref %s:%i\n", a, filename, fileline);
 #endif
        return SDL_AtomicDecRef((SDL_atomic_t *)a) != SDL_FALSE;
 }
@@ -211,7 +211,7 @@ qbool _Thread_AtomicDecRef(Thread_Atomic *a, const char *filename, int fileline)
 qbool _Thread_AtomicTryLock(Thread_SpinLock *lock, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic try lock %s:%i\n", lock, filename, fileline);
+       Sys_Printf("%p atomic try lock %s:%i\n", lock, filename, fileline);
 #endif
        return SDL_AtomicTryLock(lock) != SDL_FALSE;
 }
@@ -219,7 +219,7 @@ qbool _Thread_AtomicTryLock(Thread_SpinLock *lock, const char *filename, int fil
 void _Thread_AtomicLock(Thread_SpinLock *lock, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic lock %s:%i\n", lock, filename, fileline);
+       Sys_Printf("%p atomic lock %s:%i\n", lock, filename, fileline);
 #endif
        SDL_AtomicLock(lock);
 }
@@ -227,7 +227,7 @@ void _Thread_AtomicLock(Thread_SpinLock *lock, const char *filename, int filelin
 void _Thread_AtomicUnlock(Thread_SpinLock *lock, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p atomic unlock %s:%i\n", lock, filename, fileline);
+       Sys_Printf("%p atomic unlock %s:%i\n", lock, filename, fileline);
 #endif
        SDL_AtomicUnlock(lock);
 }
index fa282f4d4f61dd13e48e2db20b1ce86c4e419237..1cfad9a40031eabbd32d9412e45a4b5976de680d 100644 (file)
@@ -27,7 +27,7 @@ void *_Thread_CreateMutex(const char *filename, int fileline)
 {
        void *mutex = (void *)CreateMutex(NULL, FALSE, NULL);
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex create %s:%i\n" , mutex, filename, fileline);
+       Sys_Printf("%p mutex create %s:%i\n" , mutex, filename, fileline);
 #endif
        return mutex;
 }
@@ -35,7 +35,7 @@ void *_Thread_CreateMutex(const char *filename, int fileline)
 void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex destroy %s:%i\n", mutex, filename, fileline);
+       Sys_Printf("%p mutex destroy %s:%i\n", mutex, filename, fileline);
 #endif
        CloseHandle(mutex);
 }
@@ -43,7 +43,7 @@ void _Thread_DestroyMutex(void *mutex, const char *filename, int fileline)
 int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex lock %s:%i\n"   , mutex, filename, fileline);
+       Sys_Printf("%p mutex lock %s:%i\n"   , mutex, filename, fileline);
 #endif
        return (WaitForSingleObject(mutex, INFINITE) == WAIT_FAILED) ? -1 : 0;
 }
@@ -51,7 +51,7 @@ int _Thread_LockMutex(void *mutex, const char *filename, int fileline)
 int _Thread_UnlockMutex(void *mutex, const char *filename, int fileline)
 {
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p mutex unlock %s:%i\n" , mutex, filename, fileline);
+       Sys_Printf("%p mutex unlock %s:%i\n" , mutex, filename, fileline);
 #endif
        return (ReleaseMutex(mutex) == false) ? -1 : 0;
 }
@@ -118,7 +118,7 @@ void *_Thread_CreateCond(const char *filename, int fileline)
        c->waiting = 0;
        c->signals = 0;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond create %s:%i\n"   , c, filename, fileline);
+       Sys_Printf("%p cond create %s:%i\n"   , c, filename, fileline);
 #endif
        return c;
 }
@@ -127,7 +127,7 @@ void _Thread_DestroyCond(void *cond, const char *filename, int fileline)
 {
        thread_cond_t *c = (thread_cond_t *)cond;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond destroy %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond destroy %s:%i\n"   , cond, filename, fileline);
 #endif
        Thread_DestroySemaphore(c->sem);
        Thread_DestroySemaphore(c->done);
@@ -139,7 +139,7 @@ int _Thread_CondSignal(void *cond, const char *filename, int fileline)
        thread_cond_t *c = (thread_cond_t *)cond;
        int n;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond signal %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond signal %s:%i\n"   , cond, filename, fileline);
 #endif
        WaitForSingleObject(c->mutex, INFINITE);
        n = c->waiting - c->signals;
@@ -160,7 +160,7 @@ int _Thread_CondBroadcast(void *cond, const char *filename, int fileline)
        int i = 0;
        int n = 0;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond broadcast %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond broadcast %s:%i\n"   , cond, filename, fileline);
 #endif
        WaitForSingleObject(c->mutex, INFINITE);
        n = c->waiting - c->signals;
@@ -181,7 +181,7 @@ int _Thread_CondWait(void *cond, void *mutex, const char *filename, int fileline
        thread_cond_t *c = (thread_cond_t *)cond;
        int waitresult;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p cond wait %s:%i\n"   , cond, filename, fileline);
+       Sys_Printf("%p cond wait %s:%i\n"   , cond, filename, fileline);
 #endif
 
        WaitForSingleObject(c->mutex, INFINITE);
@@ -228,7 +228,7 @@ void *_Thread_CreateThread(int (*fn)(void *), void *data, const char *filename,
 {
        threadwrapper_t *w = (threadwrapper_t *)calloc(sizeof(*w), 1);
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p thread create %s:%i\n"   , w, filename, fileline);
+       Sys_Printf("%p thread create %s:%i\n"   , w, filename, fileline);
 #endif
        w->fn = fn;
        w->data = data;
@@ -242,7 +242,7 @@ int _Thread_WaitThread(void *d, int retval, const char *filename, int fileline)
 {
        threadwrapper_t *w = (threadwrapper_t *)d;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p thread wait %s:%i\n"   , w, filename, fileline);
+       Sys_Printf("%p thread wait %s:%i\n"   , w, filename, fileline);
 #endif
        WaitForSingleObject(w->handle, INFINITE);
        CloseHandle(w->handle);
@@ -264,7 +264,7 @@ void *_Thread_CreateBarrier(unsigned int count, const char *filename, int fileli
 {
        volatile barrier_t *b = (volatile barrier_t *) Z_Malloc(sizeof(barrier_t));
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
+       Sys_Printf("%p barrier create(%d) %s:%i\n", b, count, filename, fileline);
 #endif
        b->needed = count;
        b->called = 0;
@@ -277,7 +277,7 @@ void _Thread_DestroyBarrier(void *barrier, const char *filename, int fileline)
 {
        volatile barrier_t *b = (volatile barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier destroy %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier destroy %s:%i\n", b, filename, fileline);
 #endif
        Thread_DestroyMutex(b->mutex);
        Thread_DestroyCond(b->cond);
@@ -287,7 +287,7 @@ void _Thread_WaitBarrier(void *barrier, const char *filename, int fileline)
 {
        volatile barrier_t *b = (volatile barrier_t *) barrier;
 #ifdef THREADDEBUG
-       Sys_PrintfToTerminal("%p barrier wait %s:%i\n", b, filename, fileline);
+       Sys_Printf("%p barrier wait %s:%i\n", b, filename, fileline);
 #endif
        Thread_LockMutex(b->mutex);
        b->called++;