Complete the qstat fix.

This commit is contained in:
Jeff Teunissen 2000-10-02 04:24:08 +00:00
parent 3742a9e158
commit 04074515eb
4 changed files with 22 additions and 47 deletions

View file

@ -390,17 +390,17 @@ void Con_Printf (char *fmt, ...)
vsnprintf (msg, sizeof(msg), fmt, argptr);
va_end (argptr);
// also echo to debugging console
// also echo to debugging console
Sys_Printf ("%s", msg); // also echo to debugging console
// log all messages to file
// log all messages to file
if (con_debuglog)
Sys_DebugLog(va("%s/qconsole.log",com_gamedir), "%s", msg);
Sys_DebugLog (va ("%s/qconsole.log", com_gamedir), "%s", msg);
if (!con_initialized)
return;
// write it to the scrollable buffer
// write it to the scrollable buffer
Con_Print (msg);
}

View file

@ -147,7 +147,7 @@ void Con_Printf (char *fmt, ...)
va_end (argptr);
if (sv_redirected) { // Add to redirected message
if (strlen (msg) + strlen(outputbuf) > sizeof (outputbuf) - 1)
if (strlen (msg) + strlen (outputbuf) > sizeof (outputbuf) - 1)
SV_FlushRedirect ();
strcat (outputbuf, msg);
return;
@ -200,7 +200,7 @@ void Con_DPrintf (char *fmt, ...)
return;
va_start (argptr, fmt);
vsnprintf (msg, sizeof(msg), fmt, argptr);
vsnprintf (msg, sizeof (msg), fmt, argptr);
va_end (argptr);
Con_Printf ("%s", msg);

View file

@ -98,32 +98,19 @@ void Sys_Printf (char *fmt, ...)
{
va_list argptr;
char msg[MAXPRINTMSG];
#if 0
static char lastmessage[MAXPRINTMSG];
static int msgcount=0;
#endif
unsigned char *p;
if (sys_nostdout->value) return;
va_start(argptr,fmt);
vsnprintf(msg, sizeof(msg), fmt, argptr);
va_end(argptr);
#if 0
if (strncmp(lastmessage,msg,MAXPRINTMSG)==0) {
msgcount+=1;
if (sys_nostdout->value)
return;
} else {
if (msgcount>0) printf("Last message repeated %d times\n",msgcount);
strncpy(lastmessage,msg,MAXPRINTMSG);
msgcount=0;
}
#endif
va_start (argptr, fmt);
vsnprintf(msg, sizeof (msg), fmt, argptr);
va_end (argptr);
/* translate to ASCII instead of printing [xx] --KB */
for (p = (unsigned char *)msg; *p; p++)
putc(qfont_table[*p], stdout);
for (p = (unsigned char *) msg; *p; p++)
putc (qfont_table[*p], stdout);
fflush (stdout);
}

View file

@ -105,6 +105,7 @@ double Sys_DoubleTime (void)
return (now - starttime) / 1000.0;
}
#define MAXPRINTMSG 4096
/*
================
@ -115,34 +116,21 @@ void Sys_Printf (char *fmt, ...)
{
va_list argptr;
char msg[MAXPRINTMSG];
#if 0
static char lastmessage[MAXPRINTMSG];
static int msgcount=0;
#endif
unsigned char *p;
if (sys_nostdout->value)
return;
va_start (argptr, fmt);
vsnprintf (msg, sizeof(msg), fmt, argptr);
vsnprintf (msg, sizeof (msg), fmt, argptr);
va_end (argptr);
#if 0
if (strncmp(lastmessage,msg,MAXPRINTMSG)==0) {
msgcount+=1;
return;
} else {
if (msgcount>0) printf("Last message repeated %d times\n",msgcount);
strncpy(lastmessage,msg,MAXPRINTMSG);
msgcount=0;
}
#endif
/* translate to ASCII instead of printing [xx] --KB */
for (p = (unsigned char *)msg; *p; p++)
putc(qfont_table[*p], stdout);
fflush(stdout);
for (p = (unsigned char *) msg; *p; p++)
putc (qfont_table[*p], stdout);
fflush (stdout);
}
/*