mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-02 17:41:10 +00:00
- improvements of how message contents are printed, which is #if 0'd
anyway :)
This commit is contained in:
parent
e3bf60bda3
commit
f2cf4388d9
1 changed files with 11 additions and 5 deletions
|
@ -47,6 +47,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
|
|
||||||
|
@ -240,15 +241,20 @@ QW_Master (struct sockaddr_in *addr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
printf ("Contents:");
|
printf ("Message Contents: '");
|
||||||
{ // so that 'j' isn't unused when commented out
|
{ // so that 'j' isn't unused when commented out
|
||||||
int j;
|
int j;
|
||||||
for (j = 0; j < size; j++)
|
for (j = 0; j < size; j++)
|
||||||
printf (" %02x", buf[j]);
|
if (isprint (buf[j]))
|
||||||
|
printf ("%c", buf[j]);
|
||||||
|
else {
|
||||||
|
switch (buf[j]) {
|
||||||
|
case '\n': printf ("\\n"); break;
|
||||||
|
case '\0': printf ("\\0"); break;
|
||||||
|
default: printf ("(%02x)", buf[j]);
|
||||||
}
|
}
|
||||||
printf ("\n");
|
}
|
||||||
buf[size] = '\0';
|
printf ("'\n");
|
||||||
printf ("in ascii: '%s'\n", buf);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QW_TimeoutHearts (servers, serverlen);
|
QW_TimeoutHearts (servers, serverlen);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue