grub2: bring back build of aros-side grub2 tools
[AROS.git] / rom / usb / poseidon / debug.c
blob06bc22040e3eb8831a2ec728e97cab9a9ae821cd
1 #include "debug.h"
3 #ifdef DEBUG
4 void dumpmem_poseidon(void *mem, unsigned long int len)
6 unsigned char *p;
8 if (!mem || !len) { return; }
10 p = (unsigned char *) mem;
12 KPrintF("\n");
16 unsigned char b, c, str[17];
18 for (b = 0; b < 16; b++)
20 c = *p++;
21 str[b] = ((c >= ' ') && (c <= 'z')) ? c : '.';
22 str[b + 1] = 0;
23 KPrintF("%02lx ", c);
24 if (--len == 0) break;
27 while (++b < 16)
29 KPrintF(" ");
32 KPrintF(" %s\n", str);
33 } while (len);
35 KPrintF("\n\n");
38 #endif /* DEBUG */