mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 00:24:12 +00:00
still more inline guff
This commit is contained in:
parent
63c804310c
commit
c903cfdb78
1 changed files with 19 additions and 16 deletions
|
@ -74,22 +74,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
|
|
||||||
static void __attribute__ ((format (printf, 1, 2)))
|
static void __attribute__ ((format (printf, 1, 2)))
|
||||||
ma_log (const char *fmt, ...)
|
ma_log (const char *fmt, ...);
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
time_t mytime = 0;
|
|
||||||
struct tm *local = NULL;
|
|
||||||
char stamp[1024];
|
|
||||||
|
|
||||||
mytime = time (NULL);
|
|
||||||
local = localtime (&mytime);
|
|
||||||
strftime (stamp, sizeof (stamp), "[%b %e %X] ", local);
|
|
||||||
fprintf (stdout, "%s", stamp);
|
|
||||||
va_start (args, fmt);
|
|
||||||
vfprintf (stdout, fmt, args);
|
|
||||||
va_end (args);
|
|
||||||
fflush (stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_IN_PKTINFO
|
#ifdef HAVE_IN_PKTINFO
|
||||||
static int
|
static int
|
||||||
|
@ -509,3 +494,21 @@ main (int argc, char **argv)
|
||||||
QW_Master (&addr);
|
QW_Master (&addr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __attribute__ ((format (printf, 1, 2)))
|
||||||
|
ma_log (const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
time_t mytime = 0;
|
||||||
|
struct tm *local = NULL;
|
||||||
|
char stamp[1024];
|
||||||
|
|
||||||
|
mytime = time (NULL);
|
||||||
|
local = localtime (&mytime);
|
||||||
|
strftime (stamp, sizeof (stamp), "[%b %e %X] ", local);
|
||||||
|
fprintf (stdout, "%s", stamp);
|
||||||
|
va_start (args, fmt);
|
||||||
|
vfprintf (stdout, fmt, args);
|
||||||
|
va_end (args);
|
||||||
|
fflush (stdout);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue