summaryrefslogtreecommitdiffstats
path: root/host/hexdump.c
diff options
context:
space:
mode:
authorroot <root@lamia.panaceas.james.local>2016-08-20 14:04:59 +0100
committerroot <root@lamia.panaceas.james.local>2016-08-20 14:04:59 +0100
commitb063a2da3024a2e3175e1ba9b0a87cb6c7470765 (patch)
treef5c90c4119b091876a3f53acf4e581316eec4926 /host/hexdump.c
parentbc832d6d342922a828aebb997d1d9c6626898487 (diff)
downloadcandlestick-b063a2da3024a2e3175e1ba9b0a87cb6c7470765.tar.gz
candlestick-b063a2da3024a2e3175e1ba9b0a87cb6c7470765.tar.bz2
candlestick-b063a2da3024a2e3175e1ba9b0a87cb6c7470765.zip
candlestick
Diffstat (limited to 'host/hexdump.c')
-rw-r--r--host/hexdump.c60
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");
- }
-}