xapian-core
1.4.26
|
#include <config.h>
#include <xapian/error.h>
#include "chert_btreebase.h"
#include "errno_to_string.h"
#include "fd.h"
#include "io_utils.h"
#include "omassert.h"
#include "pack.h"
#include "posixy_wrapper.h"
#include "str.h"
#include <algorithm>
#include <cerrno>
#include <climits>
#include <cstring>
Go to the source code of this file.
Macros | |
#define | CURR_FORMAT 5U |
This is the current description of the base file format: More... | |
#define | DO_UNPACK_UINT_ERRCHECK(start, end, var) |
#define | REASONABLE_BASE_SIZE 1024 |
#define | BIT_MAP_INC 1000 |
Functions | |
static bool | do_unpack_uint (const char **start, const char *end, uint4 *dest, string &err_msg, const string &basename, const char *varname) |
Do most of the error handling from unpack_uint() More... | |
static bool | do_unpack_uint (const char **start, const char *end, chert_tablesize_t *dest, string &err_msg, const string &basename, const char *varname) |
#define BIT_MAP_INC 1000 |
Definition at line 386 of file chert_btreebase.cc.
Referenced by ChertTable_base::extend_bit_map().
#define CURR_FORMAT 5U |
This is the current description of the base file format:
Numbers are (unless mentioned otherwise) stored in the variable length format used by pack_uint() - that is 7 bits at a time in a byte, starting with lower-order bits, and setting the high bit on all bytes before the last one.
The format consists of a sequence of numbers in this order:
REVISION FORMAT will be = CURR_FORMAT for the current format. If this value higher then it is a different format which we doesn't yet understand, so we bomb out. If it's lower, then it depends if we have backwards-compatibility code implemented (we don't for format versions < 5). BLOCK_SIZE ROOT LEVEL BIT_MAP_SIZE ITEM_COUNT LAST_BLOCK HAVE_FAKEROOT SEQUENTIAL REVISION2 A second copy of the revision number, for consistency checks. BITMAP The bitmap. This will be BIT_MAP_SIZE raw bytes. REVISION3 A third copy of the revision number, for consistency checks.
Definition at line 72 of file chert_btreebase.cc.
Referenced by ChertTable_base::read(), and ChertTable_base::write_to_file().
#define DO_UNPACK_UINT_ERRCHECK | ( | start, | |
end, | |||
var | |||
) |
Definition at line 150 of file chert_btreebase.cc.
Referenced by ChertTable_base::read().
#define REASONABLE_BASE_SIZE 1024 |
Definition at line 163 of file chert_btreebase.cc.
Referenced by ChertTable_base::read().
|
static |
Do most of the error handling from unpack_uint()
Definition at line 117 of file chert_btreebase.cc.
References rare, and unpack_uint().
|
static |
Definition at line 134 of file chert_btreebase.cc.
References rare, and unpack_uint().