move Sys_DebugLog

This commit is contained in:
Bill Currie 2002-05-31 22:50:43 +00:00
parent e8026d9c76
commit fc0bb7e175
9 changed files with 15 additions and 103 deletions

View file

@ -414,3 +414,18 @@ Sys_PageIn (void *ptr, int size)
}
//#endif
}
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
va_list argptr;
static char data[1024]; // why static ?
int fd;
va_start (argptr, fmt);
vsnprintf (data, sizeof (data), fmt, argptr);
va_end (argptr);
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
write (fd, data, strlen (data));
close (fd);
}

View file

@ -118,21 +118,6 @@ shutdown (void)
#endif
}
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
int fd;
static char data[1024]; // why static ?
va_list argptr;
va_start (argptr, fmt);
vsnprintf (data, sizeof (data), fmt, argptr);
va_end (argptr);
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
write (fd, data, strlen (data));
close (fd);
};
/*
Sys_ConsoleInput

View file

@ -78,22 +78,6 @@ shutdown (void)
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
}
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
va_list argptr;
static char data[1024];
int fd;
va_start (argptr, fmt);
vsnprintf (data, sizeof (data), fmt, argptr);
va_end (argptr);
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
write (fd, data, strlen (data));
close (fd);
}
void
floating_point_exception_handler (int whatever)
{

View file

@ -69,22 +69,6 @@ qboolean isDedicated = true;
int nostdout = 0;
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
va_list argptr;
static char data[1024];
int fd;
va_start (argptr, fmt);
vsnprintf (data, sizeof (data), fmt, argptr);
va_end (argptr);
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
write (fd, data, strlen (data));
close (fd);
}
static void
shutdown (void)
{

View file

@ -181,11 +181,6 @@ shutdown (void)
DeinitConProc ();
}
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
}
const char *
Sys_ConsoleInput (void)
{

View file

@ -56,11 +56,6 @@ VFile *sys_handles[MAX_HANDLES];
// SYSTEM IO ==================================================================
void
Sys_DebugLog (char *file, char *fmt, ...)
{
}
void
IN_SendKeyEvents (void)
{

View file

@ -115,21 +115,6 @@ shutdown (void)
#endif
}
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
int fd;
static char data[1024]; // why static ?
va_list argptr;
va_start (argptr, fmt);
vsnprintf (data, sizeof (data), fmt, argptr);
va_end (argptr);
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
write (fd, data, strlen (data));
close (fd);
};
#ifndef USE_INTEL_ASM
void
Sys_HighFPPrecision (void)

View file

@ -90,22 +90,6 @@ Sys_Warn (char *warning, ...)
fprintf (stderr, "Warning: %s", string);
}
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
va_list argptr;
static char data[1024]; // why static ?
int fd;
va_start (argptr, fmt);
vsnprintf (data, sizeof (data), fmt, argptr);
va_end (argptr);
// fd = open(file, O_WRONLY | O_BINARY | O_CREAT | O_APPEND, 0666);
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
write (fd, data, strlen (data));
close (fd);
}
void
floating_point_exception_handler (int whatever)
{

View file

@ -139,21 +139,6 @@ shutdown (void)
CloseHandle (qwclsemaphore);
}
void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
static char data[1024];
int fd;
va_list argptr;
va_start (argptr, fmt);
vsnprintf (data, sizeof (data), fmt, argptr);
va_end (argptr);
fd = open (file, O_WRONLY | O_CREAT | O_APPEND, 0666);
write (fd, data, strlen (data));
close (fd);
};
void
SleepUntilInput (int time)
{