mirror of
https://github.com/louisrubet/rpn
synced 2025-01-19 10:26:22 +01:00
tabs to spaces
This commit is contained in:
parent
6a4d8a6256
commit
f62805cfd3
1 changed files with 26 additions and 26 deletions
52
src/debug.h
52
src/debug.h
|
@ -4,38 +4,38 @@ static void dump8(unsigned char* to_dump, unsigned long offset,
|
||||||
const int block_size = 1;
|
const int block_size = 1;
|
||||||
const int block_per_line = 16;
|
const int block_per_line = 16;
|
||||||
int max_line = size / block_size;
|
int max_line = size / block_size;
|
||||||
unsigned char mychar;
|
unsigned char mychar;
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
for (i = 0; i < max_line; i++)
|
for (i = 0; i < max_line; i++)
|
||||||
{
|
{
|
||||||
if ((i % block_per_line) == 0)
|
if ((i % block_per_line) == 0)
|
||||||
{
|
{
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
printf(" ");
|
printf(" ");
|
||||||
for (j = i - block_per_line; j < i; j++)
|
for (j = i - block_per_line; j < i; j++)
|
||||||
{
|
{
|
||||||
mychar = *(to_dump + j);
|
mychar = *(to_dump + j);
|
||||||
if ((mychar < 32) || (mychar >= 127))
|
if ((mychar < 32) || (mychar >= 127))
|
||||||
mychar = '.';
|
mychar = '.';
|
||||||
printf("%c", mychar);
|
printf("%c", mychar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("\n%08lX:", offset + i * block_size);
|
printf("\n%08lX:", offset + i * block_size);
|
||||||
}
|
}
|
||||||
printf(" %02hhX", *(to_dump + i));
|
printf(" %02hhX", *(to_dump + i));
|
||||||
}
|
}
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
printf(" ");
|
printf(" ");
|
||||||
for (j = (i >= block_per_line) ? (i - block_per_line) : 0; j < i; j++)
|
for (j = (i >= block_per_line) ? (i - block_per_line) : 0; j < i; j++)
|
||||||
{
|
{
|
||||||
mychar = *(to_dump + j);
|
mychar = *(to_dump + j);
|
||||||
if ((mychar < 32) || (mychar >= 127))
|
if ((mychar < 32) || (mychar >= 127))
|
||||||
mychar = '.';
|
mychar = '.';
|
||||||
printf("%c", mychar);
|
printf("%c", mychar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue