repo.or.cz
/
xapian.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[ci] Test Tcl bindings for dragonfly/freebsd
[xapian.git]
/
xapian-applications
/
omega
/
cdb_unpack.cc
blob
c0b091cd73e1317155f82b4688f78c3285ebf33f
1
/* $Id: cdb_unpack.c,v 1.5 2003/11/03 16:42:41 mjt Exp $
2
* unpack 32bit integer
3
*
4
* This file is a part of tinycdb package by Michael Tokarev, mjt@corpit.ru.
5
* Public domain.
6
*/
7
8
#include <config.h>
9
10
#include
"cdb.h"
11
12
unsigned
13
cdb_unpack
(
const unsigned char
buf
[
4
])
14
{
15
unsigned
n
=
buf
[
3
];
16
n
<<=
8
;
n
|=
buf
[
2
];
17
n
<<=
8
;
n
|=
buf
[
1
];
18
n
<<=
8
;
n
|=
buf
[
0
];
19
return
n
;
20
}