backends/flint/flint_btreebase.cc File Reference

#include <config.h>
#include "safeerrno.h"
#include "flint_btreebase.h"
#include "flint_io.h"
#include "flint_utils.h"
#include "utils.h"
#include <xapian/error.h>
#include "omassert.h"
#include <limits.h>
#include <algorithm>
#include <cstring>

Include dependency graph for flint_btreebase.cc:

Go to the source code of this file.

Classes

class  fdcloser
 A tiny class used to close a filehandle safely in the presence of exceptions. More...

Defines

#define CURR_FORMAT   5U
 This is the current description of the base file format:.
#define DO_UNPACK_UINT_ERRCHECK(start, end, var)
#define REASONABLE_BASE_SIZE   1024
#define BIT_MAP_INC   1000


Define Documentation

#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 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 86 of file flint_btreebase.cc.

#define DO_UNPACK_UINT_ERRCHECK ( start,
end,
var   ) 

Value:

do { \
    if (!do_unpack_uint(start, end, &var, err_msg, basename, #var)) { \
        return false; \
    } \
} while(0)

Definition at line 169 of file flint_btreebase.cc.

#define REASONABLE_BASE_SIZE   1024

Definition at line 182 of file flint_btreebase.cc.

#define BIT_MAP_INC   1000

Definition at line 369 of file flint_btreebase.cc.

Referenced by Btree_base::extend_bit_map(), and FlintTable_base::extend_bit_map().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.