diff options
author | root <root@lamia.panaceas.james.local> | 2016-08-20 14:04:59 +0100 |
---|---|---|
committer | root <root@lamia.panaceas.james.local> | 2016-08-20 14:04:59 +0100 |
commit | b063a2da3024a2e3175e1ba9b0a87cb6c7470765 (patch) | |
tree | f5c90c4119b091876a3f53acf4e581316eec4926 /host/hexdump.c | |
parent | bc832d6d342922a828aebb997d1d9c6626898487 (diff) | |
download | candlestick-b063a2da3024a2e3175e1ba9b0a87cb6c7470765.tar.gz candlestick-b063a2da3024a2e3175e1ba9b0a87cb6c7470765.tar.bz2 candlestick-b063a2da3024a2e3175e1ba9b0a87cb6c7470765.zip |
candlestick
Diffstat (limited to 'host/hexdump.c')
-rw-r--r-- | host/hexdump.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/host/hexdump.c b/host/hexdump.c deleted file mode 100644 index 127faab..0000000 --- a/host/hexdump.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * hexdump.c - * - * Copyright (c) 2011 Citrix Sysmtes Inc., - * All rights reserved. - * - */ - -#include "project.h" - -void -hexdump (char *prefix, void *_d, int len) -{ - uint8_t *d = (uint8_t *) _d; - int i, j, k; - int e; - - printf ("%s %d bytes from %p\n", prefix, len, d); - - if (!d || len < 0) - return; - - e = len + 15; - e &= ~15; - - for (i = 0; i < e; i += 16) - { - printf ("%s %05x:", prefix, i); - for (j = 0; j < 16; ++j) - { - k = i + j; - - if (k < len) - printf (" %02x", d[k]); - else - printf (" "); - - if (j == 7) - printf (" "); - } - - printf (" "); - for (j = 0; j < 16; ++j) - { - k = i + j; - if (k < len) - { - uint8_t c = d[k]; - if (c < 33) - c = '.'; - if (c > 126) - c = '.'; - printf ("%c", c); - } - if (j == 7) - printf (" "); - } - printf ("\n"); - } -} |