IDZEBRA 2.2.11
key_block.c File Reference
#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)

Macro Definition Documentation

◆ ENCODE_BUFLEN

#define ENCODE_BUFLEN   768

Definition at line 62 of file key_block.c.

◆ USE_SHELLSORT

#define USE_SHELLSORT   0

Definition at line 69 of file key_block.c.

Function Documentation

◆ encode_key_flush()

void encode_key_flush ( struct encode_info * i,
FILE * outf )
static

Definition at line 153 of file key_block.c.

References encode_info::decode_handle, encode_info::encode_handle, iscz1_stop(), and outf.

Referenced by key_block_flush_int().

◆ encode_key_init()

void encode_key_init ( struct encode_info * i)
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().

◆ encode_key_write()

void encode_key_write ( const char * k,
struct encode_info * i,
FILE * outf )
static

◆ key_block_create()

◆ key_block_destroy()

◆ key_block_flush()

◆ key_block_flush_int()

void key_block_flush_int ( zebra_key_block_t p,
char ** key_buf,
size_t ptr_top,
size_t ptr_i )

◆ key_block_get_no_files()

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().

◆ key_block_write()

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 )