From e3297a928252ad52d0290eadbb1fbe75c6954233 Mon Sep 17 00:00:00 2001
From: Daniel Peter Chokola <daniel.chokola@cobhamaes.com>
Date: Tue, 5 Jan 2021 10:18:44 -0500
Subject: [PATCH] pretty-print the LUT 8 columns per line

---
 crc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crc.c b/crc.c
index 4bbe123..e0e4950 100644
--- a/crc.c
+++ b/crc.c
@@ -38,7 +38,9 @@ int main()
 	printf("CRC byte lookup table:\n0x0000");
 	for(i = 0; i < 255; i++)
 	{
-		printf(", 0x%04x", crc16_lut[i + 1]);
+		printf(",%s0x%04x",
+		       (i && !((i + 1) % 8)) ? "\n" : " ",
+		       crc16_lut[i + 1]);
 	}
 	printf("\n\n");