Fix tg_termpos1 for 64-bit termpos
[xapian.git] / xapian-applications / omega / cdb_unpack.cc
blobc0b091cd73e1317155f82b4688f78c3285ebf33f
1 /* $Id: cdb_unpack.c,v 1.5 2003/11/03 16:42:41 mjt Exp $
2 * unpack 32bit integer
4 * This file is a part of tinycdb package by Michael Tokarev, mjt@corpit.ru.
5 * Public domain.
6 */
8 #include <config.h>
10 #include "cdb.h"
12 unsigned
13 cdb_unpack(const unsigned char buf[4])
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;