mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "protocol.h"
|
||||
|
||||
|
@ -240,15 +241,20 @@ QW_Master (struct sockaddr_in *addr)
|
|||
#endif
|
||||
|
||||
#if 0
|
||||
printf ("Contents:");
|
||||
printf ("Message Contents: '");
|
||||
{ // so that 'j' isn't unused when commented out
|
||||
int 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 ("in ascii: '%s'\n", buf);
|
||||
printf ("'\n");
|
||||
#endif
|
||||
|
||||
QW_TimeoutHearts (servers, serverlen);
|
||||
|
|
Loading…
Reference in a new issue