86 |
int i, j; |
int i, j; |
87 |
unsigned char *p = data; |
unsigned char *p = data; |
88 |
|
|
89 |
if(PARAM_DEBUG_LEVEL < 3) return; |
if(PARAM_DEBUG_LEVEL < DEBUG_MAX) return; |
90 |
debug (3, "%s raw dump: \n",text); |
debug (DEBUG_MAX, "%s raw dump: \n",text); |
91 |
for (i = 0; i < size; i += 16) |
for (i = 0; i < size; i += 16) |
92 |
{ |
{ |
93 |
debug (3, " %04x: ", i); |
debug (DEBUG_MAX, " %04x: ", i); |
94 |
for (j = 0; j < 8; j++) |
for (j = 0; j < 8; j++) |
95 |
if (i + j < size) |
if (i + j < size) |
96 |
debug (3, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.'); |
debug (DEBUG_MAX, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.'); |
97 |
else |
else |
98 |
debug (3, " "); |
debug (DEBUG_MAX, " "); |
99 |
|
|
100 |
debug (3, " "); |
debug (DEBUG_MAX, " "); |
101 |
|
|
102 |
for (j = 8; j < 16; j++) |
for (j = 8; j < 16; j++) |
103 |
if (i + j < size) |
if (i + j < size) |
104 |
debug (3, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.'); |
debug (DEBUG_MAX, "%c", (p[i + j] > 32 && p[i + j] < 127) ? p[i + j] : '.'); |
105 |
else |
else |
106 |
debug (3, " "); |
debug (DEBUG_MAX, " "); |
107 |
|
|
108 |
debug (3, " | "); |
debug (DEBUG_MAX, " | "); |
109 |
|
|
110 |
for (j = 0; i + j < size && j < 8; j++) |
for (j = 0; i + j < size && j < 8; j++) |
111 |
debug (3, "%02x", p[i + j]); |
debug (DEBUG_MAX, "%02x", p[i + j]); |
112 |
debug (3, " "); |
debug (DEBUG_MAX, " "); |
113 |
for (j = 8; i + j < size && j < 16; j++) |
for (j = 8; i + j < size && j < 16; j++) |
114 |
debug (3, "%02x", p[i + j]); |
debug (DEBUG_MAX, "%02x", p[i + j]); |
115 |
debug (3, "\n"); |
debug (DEBUG_MAX, "\n"); |
116 |
} |
} |
117 |
debug (3, "\n"); |
debug (DEBUG_MAX, "\n"); |
118 |
} |
} |