From 65fea57d305ccc8d64fa83759d5b32bb69617b95 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 8 May 2005 10:42:51 +0000 Subject: [PATCH] various printf/fprintf calls are now Con_Printf, and some other minor cleanups git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5246 d7cf8633-e32d-0410-b094-e92efae38249 --- sys_linux.c | 7 ++----- sys_sdl.c | 7 ++----- vid_glx.c | 2 +- vid_null.c | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sys_linux.c b/sys_linux.c index 3f67c89a..f3db25ef 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -42,11 +42,8 @@ void Sys_Error (const char *error, ...) va_start (argptr,error); dpvsnprintf (string, sizeof (string), error, argptr); va_end (argptr); - fprintf(stderr, "Error: %s\n", string); - Con_Print ("Quake Error: "); - Con_Print (string); - Con_Print ("\n"); + Con_Printf ("Quake Error: %s\n", string); Host_Shutdown (); exit (1); @@ -54,7 +51,7 @@ void Sys_Error (const char *error, ...) void Sys_PrintToTerminal(const char *text) { - printf("%s", text); + fprintf(stdout, "%s", text); } double Sys_DoubleTime (void) diff --git a/sys_sdl.c b/sys_sdl.c index bdefa122..39c57df9 100644 --- a/sys_sdl.c +++ b/sys_sdl.c @@ -40,11 +40,8 @@ void Sys_Error (const char *error, ...) va_start (argptr,error); dpvsnprintf (string, sizeof (string), error, argptr); va_end (argptr); - fprintf(stderr, "Error: %s\n", string); - Con_Print ("Quake Error: "); - Con_Print (string); - Con_Print ("\n"); + Con_Printf ("Quake Error: %s\n", string); Host_Shutdown (); exit (1); @@ -52,7 +49,7 @@ void Sys_Error (const char *error, ...) void Sys_PrintToTerminal(const char *text) { - printf("%s", text); + fprintf(stdout, "%s", text); } double Sys_DoubleTime (void) diff --git a/vid_glx.c b/vid_glx.c index efad71fd..fbbb5b08 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -618,7 +618,7 @@ void VID_Shutdown(void) void signal_handler(int sig) { - printf("Received signal %d, exiting...\n", sig); + Con_Printf("Received signal %d, exiting...\n", sig); VID_RestoreSystemGamma(); Sys_Quit(); exit(0); diff --git a/vid_null.c b/vid_null.c index 19af599e..0b3f0c27 100644 --- a/vid_null.c +++ b/vid_null.c @@ -28,7 +28,7 @@ void VID_Shutdown(void) void signal_handler(int sig) { - printf("Received signal %d, exiting...\n", sig); + Con_Printf("Received signal %d, exiting...\n", sig); Sys_Quit(); exit(0); } -- 2.39.2