HCoop
/
hcoop
/
zz_old
/
debian
/
djbdns.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
release
[hcoop/zz_old/debian/djbdns.git]
/
uint32_pack.c
1
#include
"uint32.h"
2
3
void
uint32_pack
(
char
s
[
4
],
uint32 u
)
4
{
5
s
[
0
] =
u
&
255
;
6
u
>>=
8
;
7
s
[
1
] =
u
&
255
;
8
u
>>=
8
;
9
s
[
2
] =
u
&
255
;
10
s
[
3
] =
u
>>
8
;
11
}
12
13
void
uint32_pack_big
(
char
s
[
4
],
uint32 u
)
14
{
15
s
[
3
] =
u
&
255
;
16
u
>>=
8
;
17
s
[
2
] =
u
&
255
;
18
u
>>=
8
;
19
s
[
1
] =
u
&
255
;
20
s
[
0
] =
u
>>
8
;
21
}