repo.or.cz
/
mkp224o.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix base32 mask calculation
[mkp224o.git]
/
hex.h
blob
c2f9c44bde349ac316e116fbed453de034d2390f
1
#include <stdio.h>
2
3
static const char
hext
[] =
"0123456789ABCDEF"
;
4
static void
printhex
(
const char
*
z
,
size_t
l
)
5
{
6
printf
(
"["
);
7
for
(
size_t
i
=
0
;
i
<
l
; ++
i
) {
8
printf
(
"%c%c"
,
hext
[*
z
>>
4
],
hext
[*
z
&
0xF
]);
9
++
z
;
10
}
11
printf
(
"]
\n
"
);
12
}