Makefile.am: Add a dist-zip target for making .zip distros.

sv_send.c: This _should_ be the proper fix for qstat.
This commit is contained in:
Jeff Teunissen 2000-10-02 04:02:48 +00:00
parent 21ff288d88
commit 3742a9e158
2 changed files with 39 additions and 41 deletions

View File

@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign dist-zip
SUBDIRS = include source doc SUBDIRS = include source doc

View File

@ -134,56 +134,54 @@ void Con_Printf (char *fmt, ...)
char msg[MAXPRINTMSG]; char msg[MAXPRINTMSG];
char msg2[MAXPRINTMSG]; char msg2[MAXPRINTMSG];
char msg3[MAXPRINTMSG]; char msg3[MAXPRINTMSG];
#if 0
static char lastmessage[MAXPRINTMSG]; static char lastmessage[MAXPRINTMSG];
static int msgcount=0; static int msgcount = 0;
#endif
time_t mytime = 0; time_t mytime = 0;
struct tm *local = NULL; struct tm *local = NULL;
qboolean timestamps = false; qboolean timestamps = false;
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 (sv_redirected) { // Add to redirected message
if (strncmp(lastmessage,msg,MAXPRINTMSG)==0) { if (strlen (msg) + strlen(outputbuf) > sizeof (outputbuf) - 1)
msgcount+=1;
return;
} else {
strncpy(lastmessage,msg,MAXPRINTMSG);
if (msgcount>0) {
Sys_Printf ("Last message repeated %d times\n", msgcount);
if (sv_logfile)
Qprintf (sv_logfile, "Last message repeated %d times\n", msgcount);
msgcount=0;
}
}
#endif
if (sv_timestamps && sv_timefmt && sv_timefmt->string && sv_timestamps->value)
timestamps = true;
if (timestamps) {
mytime = time (NULL);
local = localtime (&mytime);
strftime (msg3, sizeof (msg3), sv_timefmt->string, local);
snprintf (msg2, sizeof (msg2), "%s%s", msg3, msg);
} else {
snprintf (msg2, sizeof (msg2), "%s", msg);
}
if (sv_redirected) { // add to redirected message
if (strlen (msg2) + strlen(outputbuf) > sizeof(outputbuf) - 1)
SV_FlushRedirect (); SV_FlushRedirect ();
strcat (outputbuf, msg2); strcat (outputbuf, msg);
return; return;
} } else { // We want to output to console and maybe logfile
if (strncmp (lastmessage, msg, MAXPRINTMSG) == 0) {
msgcount += 1;
return;
} else {
strncpy (lastmessage, msg, MAXPRINTMSG);
if (msgcount > 0) {
Sys_Printf ("Last message repeated %d times\n", msgcount);
if (sv_logfile)
Qprintf (sv_logfile, "Last message repeated %d times\n", msgcount);
msgcount=0;
}
}
Sys_Printf ("%s", msg2); // also echo to debugging console if (sv_timestamps && sv_timefmt && sv_timefmt->string && sv_timestamps->value)
if (sv_logfile) timestamps = true;
Qprintf (sv_logfile, "%s", msg2);
if (timestamps) {
mytime = time (NULL);
local = localtime (&mytime);
strftime (msg3, sizeof (msg3), sv_timefmt->string, local);
snprintf (msg2, sizeof (msg2), "%s%s", msg3, msg);
} else {
snprintf (msg2, sizeof (msg2), "%s", msg);
}
Sys_Printf ("%s", msg2); // also echo to debugging console
if (sv_logfile)
Qprintf (sv_logfile, "%s", msg2);
}
} }
/* /*