mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-06-02 10:01:54 +00:00
Complete the qstat fix.
This commit is contained in:
parent
3742a9e158
commit
04074515eb
4 changed files with 22 additions and 47 deletions
|
@ -98,29 +98,16 @@ void Sys_Printf (char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char msg[MAXPRINTMSG];
|
char msg[MAXPRINTMSG];
|
||||||
#if 0
|
|
||||||
static char lastmessage[MAXPRINTMSG];
|
|
||||||
static int msgcount=0;
|
|
||||||
#endif
|
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
|
||||||
if (sys_nostdout->value) return;
|
if (sys_nostdout->value)
|
||||||
|
return;
|
||||||
|
|
||||||
va_start (argptr, fmt);
|
va_start (argptr, fmt);
|
||||||
vsnprintf(msg, sizeof (msg), fmt, argptr);
|
vsnprintf(msg, sizeof (msg), fmt, argptr);
|
||||||
va_end (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 */
|
/* translate to ASCII instead of printing [xx] --KB */
|
||||||
for (p = (unsigned char *) msg; *p; p++)
|
for (p = (unsigned char *) msg; *p; p++)
|
||||||
putc (qfont_table[*p], stdout);
|
putc (qfont_table[*p], stdout);
|
||||||
|
|
|
@ -105,6 +105,7 @@ double Sys_DoubleTime (void)
|
||||||
|
|
||||||
return (now - starttime) / 1000.0;
|
return (now - starttime) / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAXPRINTMSG 4096
|
#define MAXPRINTMSG 4096
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
|
@ -115,10 +116,7 @@ void Sys_Printf (char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char msg[MAXPRINTMSG];
|
char msg[MAXPRINTMSG];
|
||||||
#if 0
|
|
||||||
static char lastmessage[MAXPRINTMSG];
|
|
||||||
static int msgcount=0;
|
|
||||||
#endif
|
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
|
||||||
if (sys_nostdout->value)
|
if (sys_nostdout->value)
|
||||||
|
@ -128,20 +126,10 @@ void Sys_Printf (char *fmt, ...)
|
||||||
vsnprintf (msg, sizeof (msg), fmt, argptr);
|
vsnprintf (msg, sizeof (msg), fmt, argptr);
|
||||||
va_end (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 */
|
/* translate to ASCII instead of printing [xx] --KB */
|
||||||
for (p = (unsigned char *) msg; *p; p++)
|
for (p = (unsigned char *) msg; *p; p++)
|
||||||
putc (qfont_table[*p], stdout);
|
putc (qfont_table[*p], stdout);
|
||||||
|
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue