diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-12-08 16:31:24 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-12-08 17:00:23 +0100 |
| commit | 4da7a3e44d2bbd7b21ae05c7b6604748e7227227 (patch) | |
| tree | cbb81eed24dd2bed75998e4f8ffb803dd479a6df /src/net/win9x | |
| parent | de3532bd6b685c66015202a48d53e1b8fa4900f5 (diff) | |
| download | jancity-4da7a3e44d2bbd7b21ae05c7b6604748e7227227.tar.gz | |
wip2
Diffstat (limited to 'src/net/win9x')
| -rw-r--r-- | src/net/win9x/src/serial.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/win9x/src/serial.c b/src/net/win9x/src/serial.c index c1cffb6..57d7261 100644 --- a/src/net/win9x/src/serial.c +++ b/src/net/win9x/src/serial.c @@ -1,6 +1,7 @@ #include <net.h> #include <net_private.h> #include <windows.h> +#include <ctype.h> #include <errno.h> #include <stddef.h> #include <stdio.h> @@ -244,6 +245,22 @@ static int on_write(const void *const buf, const size_t n, void *const arg) __func__, GetLastError()); goto failure; } + + printf("%s: outgoing packet, buf: %p, n: %u: [", __func__, buf, (unsigned)n); + + for (size_t i = 0; i < n; i++) + { + const char b = ((const char *)buf)[i]; + printf("%02hhx", b); + + if (isprint((unsigned char)b)) + printf(" (%c)", b); + + if (i + 1 < n) + printf(", "); + } + + printf("]\n"); } return get_result(h, r); |
