IDZEBRA
2.2.7
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include "key_block.h"
#include <yaz/nmem.h>
#include <yaz/xmalloc.h>
#include <yaz/snprintf.h>
Go to the source code of this file.
Data Structures | |
struct | zebra_key_block |
struct | encode_info |
Macros | |
#define | ENCODE_BUFLEN 768 |
#define | USE_SHELLSORT 0 |
Functions | |
static void | encode_key_init (struct encode_info *i) |
static void | encode_key_write (const char *k, struct encode_info *i, FILE *outf) |
static void | encode_key_flush (struct encode_info *i, FILE *outf) |
void | key_block_flush_int (zebra_key_block_t p, char **key_buf, size_t ptr_top, size_t ptr_i) |
zebra_key_block_t | key_block_create (size_t mem, const char *key_tmp_dir, int use_threads) |
void | key_block_destroy (zebra_key_block_t *pp) |
void | key_block_write (zebra_key_block_t p, zint sysno, struct it_key *key_in, int cmd, const char *str_buf, size_t str_len, zint staticrank, int static_rank_enable) |
void | key_block_flush (zebra_key_block_t p, int is_final) |
int | key_block_get_no_files (zebra_key_block_t p) |
#define ENCODE_BUFLEN 768 |
Definition at line 62 of file key_block.c.
#define USE_SHELLSORT 0 |
Definition at line 69 of file key_block.c.
|
static |
Definition at line 153 of file key_block.c.
References encode_info::decode_handle, encode_info::encode_handle, and iscz1_stop().
Referenced by key_block_flush_int().
|
static |
Definition at line 97 of file key_block.c.
References encode_info::decode_handle, encode_info::encode_handle, and iscz1_start().
Referenced by key_block_flush_int().
|
static |
Definition at line 103 of file key_block.c.
References encode_info::buf, encode_info::decode_handle, encode_info::encode_handle, iscz1_decode(), iscz1_encode(), key_logdump_txt(), it_key::mem, outf, and zebra_exit().
Referenced by key_block_flush_int().
zebra_key_block_t key_block_create | ( | size_t | mem, |
const char * | key_tmp_dir, | ||
int | use_threads | ||
) |
Definition at line 191 of file key_block.c.
References zebra_key_block::alt_buf, zebra_key_block::key_buf, zebra_key_block::key_buf_used, zebra_key_block::key_file_no, zebra_key_block::key_tmp_dir, it_key::mem, zebra_key_block::ptr_i, zebra_key_block::ptr_top, and zebra_key_block::use_threads.
Referenced by extract_flush_record_keys2().
void key_block_destroy | ( | zebra_key_block_t * | pp | ) |
Definition at line 226 of file key_block.c.
References zebra_key_block::alt_buf, zebra_key_block::key_buf, zebra_key_block::key_tmp_dir, and zebra_key_block::use_threads.
Referenced by zebra_index_merge(), and zebra_register_close().
void key_block_flush | ( | zebra_key_block_t | p, |
int | is_final | ||
) |
Definition at line 370 of file key_block.c.
References zebra_key_block::alt_buf, key_block_flush_int(), zebra_key_block::key_buf, zebra_key_block::key_buf_used, zebra_key_block::ptr_i, zebra_key_block::ptr_top, and zebra_key_block::use_threads.
Referenced by key_block_write(), and zebra_flush_reg().
void key_block_flush_int | ( | zebra_key_block_t | p, |
char ** | key_buf, | ||
size_t | ptr_top, | ||
size_t | ptr_i | ||
) |
Definition at line 311 of file key_block.c.
References encode_key_flush(), encode_key_init(), encode_key_write(), zebra_key_block::key_file_no, key_qsort_compare(), zebra_key_block::key_tmp_dir, outf, and zebra_exit().
Referenced by key_block_flush().
int key_block_get_no_files | ( | zebra_key_block_t | p | ) |
Definition at line 411 of file key_block.c.
References zebra_key_block::key_file_no.
Referenced by zebra_index_merge().
void key_block_write | ( | zebra_key_block_t | p, |
zint | sysno, | ||
struct it_key * | key_in, | ||
int | cmd, | ||
const char * | str_buf, | ||
size_t | str_len, | ||
zint | staticrank, | ||
int | static_rank_enable | ||
) |
Definition at line 259 of file key_block.c.
References CAST_ZINT_TO_INT, key_block_flush(), zebra_key_block::key_buf, zebra_key_block::key_buf_used, key_SU_encode(), it_key::len, it_key::mem, zebra_key_block::ptr_i, and zebra_key_block::ptr_top.
Referenced by extract_flush_record_keys2().