|
IDZEBRA 2.2.8
|
#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <string.h>#include <idzebra/isamb.h>#include <yaz/yaz-util.h>#include "recindex.h"Go to the source code of this file.
Data Structures | |
| struct | recindex |
| struct | record_index_entry |
| struct | code_read_data |
Macros | |
| #define | RIDX_CHUNK 128 |
Functions | |
| static void | rect_log_item (int level, const void *b, const char *txt) |
| int | rect_compare (const void *a, const void *b) |
| void * | rect_code_start (void) |
| void | rect_encode (void *p, char **dst, const char **src) |
| void | rect_decode (void *p, char **dst, const char **src) |
| void | rect_code_reset (void *p) |
| void | rect_code_stop (void *p) |
| recindex_t | recindex_open (BFiles bfs, int rw, int use_isamb) |
| opens record index handle | |
| static void | log_pr (const char *txt) |
| void | recindex_close (recindex_t p) |
| closes record index handle | |
| int | recindex_read_head (recindex_t p, void *buf) |
| const char * | recindex_get_fname (recindex_t p) |
| ZEBRA_RES | recindex_write_head (recindex_t p, const void *buf, size_t len) |
| int | recindex_read_indx (recindex_t p, zint sysno, void *buf, int itemsize, int ignoreError) |
| int | bt_code_read (void *vp, char **dst, int *insertMode) |
| void | recindex_write_indx (recindex_t p, zint sysno, void *buf, int itemsize) |
Variables | |
| struct record_index_entry | ent |
| #define RIDX_CHUNK 128 |
Definition at line 32 of file recindex.c.
| int bt_code_read | ( | void * | vp, |
| char ** | dst, | ||
| int * | insertMode | ||
| ) |
Definition at line 293 of file recindex.c.
References code_read_data::buf, code_read_data::insert_flag, code_read_data::itemsize, code_read_data::no, and code_read_data::sysno.
Referenced by recindex_write_indx().
|
static |
Definition at line 176 of file recindex.c.
Referenced by recindex_close().
| void recindex_close | ( | recindex_t | p | ) |
closes record index handle
| p | records handle |
Definition at line 182 of file recindex.c.
References bf_close(), recindex::index_BFile, recindex::isam_p, recindex::isamb, isamb_close(), isamb_dump(), isamb_set_root_ptr(), and log_pr().
Referenced by rec_close().
| const char * recindex_get_fname | ( | recindex_t | p | ) |
Definition at line 203 of file recindex.c.
References recindex::index_fname.
Referenced by rec_open().
| recindex_t recindex_open | ( | BFiles | bfs, |
| int | rw, | ||
| int | use_isamb | ||
| ) |
opens record index handle
| bfs | Block files handle |
| rw | 1 for read and write; 0 for read-only |
| use_isamb | 1 if ISAMB is to used for record index; 0 for flat (old) |
Definition at line 134 of file recindex.c.
References bf_open(), ISAMC_M_s::codec, ISAMC_M_s::compare_item, ISAM_CODEC::decode, ISAM_CODEC::encode, recindex::index_BFile, recindex::index_fname, recindex::isam_p, recindex::isamb, isamb_get_root_ptr(), isamb_open2(), ISAMC_M_s::log_item, rect_code_reset(), rect_code_start(), rect_code_stop(), rect_compare(), rect_decode(), rect_encode(), rect_log_item(), ISAM_CODEC::reset, RIDX_CHUNK, ISAM_CODEC::start, and ISAM_CODEC::stop.
Referenced by rec_open().
| int recindex_read_head | ( | recindex_t | p, |
| void * | buf | ||
| ) |
Definition at line 198 of file recindex.c.
References bf_read(), and recindex::index_BFile.
Referenced by rec_open().
| int recindex_read_indx | ( | recindex_t | p, |
| zint | sysno, | ||
| void * | buf, | ||
| int | itemsize, | ||
| int | ignoreError | ||
| ) |
Definition at line 225 of file recindex.c.
References bf_read(), CAST_ZINT_TO_INT, recindex::index_BFile, recindex::index_fname, recindex::isam_p, recindex::isamb, isamb_pp_close(), isamb_pp_forward(), isamb_pp_open(), record_index_entry::next, RIDX_CHUNK, record_index_entry::size, and ZINT_FORMAT.
Referenced by rec_get_int(), rec_new_int(), and rec_release_blocks().
| ZEBRA_RES recindex_write_head | ( | recindex_t | p, |
| const void * | buf, | ||
| size_t | len | ||
| ) |
Definition at line 208 of file recindex.c.
References bf_write(), recindex::index_BFile, recindex::index_fname, ZEBRA_FAIL, and ZEBRA_OK.
Referenced by rec_close(), and rec_open().
| void recindex_write_indx | ( | recindex_t | p, |
| zint | sysno, | ||
| void * | buf, | ||
| int | itemsize | ||
| ) |
Definition at line 312 of file recindex.c.
References bf_write(), bt_code_read(), code_read_data::buf, CAST_ZINT_TO_INT, recindex::index_BFile, code_read_data::insert_flag, recindex::isam_p, recindex::isamb, isamb_merge(), code_read_data::itemsize, code_read_data::no, RIDX_CHUNK, code_read_data::sysno, and ZINT_FORMAT.
Referenced by rec_delete_single(), and rec_write_tmp_buf().
| void rect_code_reset | ( | void * | p | ) |
Definition at line 125 of file recindex.c.
Referenced by recindex_open().
| void * rect_code_start | ( | void | ) |
Definition at line 82 of file recindex.c.
Referenced by recindex_open().
| void rect_code_stop | ( | void * | p | ) |
Definition at line 129 of file recindex.c.
Referenced by recindex_open().
| int rect_compare | ( | const void * | a, |
| const void * | b | ||
| ) |
Definition at line 68 of file recindex.c.
Referenced by recindex_open().
| void rect_decode | ( | void * | p, |
| char ** | dst, | ||
| const char ** | src | ||
| ) |
Definition at line 106 of file recindex.c.
References zebra_zint_decode().
Referenced by recindex_open().
| void rect_encode | ( | void * | p, |
| char ** | dst, | ||
| const char ** | src | ||
| ) |
Definition at line 87 of file recindex.c.
References zebra_zint_encode().
Referenced by recindex_open().
|
static |
Definition at line 48 of file recindex.c.
References ent, record_index_entry::next, record_index_entry::size, and ZINT_FORMAT.
Referenced by recindex_open().
| struct record_index_entry ent |
Referenced by rect_log_item(), and zebra_strmap_it_next().