From 627bc70e0ffdf4bdf04cb1ff96c6077b5995f2e9 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 22 May 2020 22:31:04 -0400 Subject: [PATCH] Show printable frame bytes in src/decode.c --- src/decode.c | 49 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/src/decode.c b/src/decode.c index f6ac1f4..dda3722 100644 --- a/src/decode.c +++ b/src/decode.c @@ -32,42 +32,57 @@ static int callsign_fprint(FILE *stream, const patty_ax25_address *address) { return 0; } +#define printable(c) \ + (c >= 0x20 && c < 0x7f) + static int hexdump_fprint(FILE *stream, void *data, size_t len) { size_t i; - for (i=0; i