IDZEBRA  2.1.4
Data Structures | Macros | Functions
kinput.c File Reference
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "index.h"

Go to the source code of this file.

Data Structures

struct  key_file
struct  heap_info
struct  heap_cread_info
struct  progressInfo


#define KEY_SIZE   (1+sizeof(struct it_key))
#define INP_NAME_MAX   768
#define PR_KEY_LOW   0
#define PR_KEY_TOP   0
#define R_OK   4


void getFnameTmp (Res res, char *fname, int no)
void extract_get_fname_tmp (ZebraHandle zh, char *fname, int no)
void key_file_chunk_read (struct key_file *f)
void key_file_destroy (struct key_file *f)
struct key_filekey_file_init (int no, int chunk, Res res)
int key_file_getc (struct key_file *f)
int key_file_read (struct key_file *f, char *key)
static struct heap_infokey_heap_malloc (void)
struct heap_infokey_heap_init_file (ZebraHandle zh, int nkeys, int(*cmp)(const void *p1, const void *p2))
void key_heap_destroy (struct heap_info *hi, int nkeys)
static void key_heap_swap (struct heap_info *hi, int i1, int i2)
static void key_heap_delete (struct heap_info *hi)
static void key_heap_insert (struct heap_info *hi, const char *buf, int nbytes, struct key_file *kf)
static int heap_read_one (struct heap_info *hi, char *name, char *key)
void zebra_log_dict_entry (ZebraHandle zh, const char *s)
static int heap_cread_item (void *vp, char **dst, int *insertMode)
int heap_cread_item2 (void *vp, char **dst, int *insertMode)
int heap_inpc (struct heap_cread_info *hci, struct heap_info *hi)
int heap_inpb (struct heap_cread_info *hci, struct heap_info *hi)
int heap_inps (struct heap_cread_info *hci, struct heap_info *hi)
void progressFunc (struct key_file *keyp, void *info)
void zebra_index_merge (ZebraHandle zh)

Macro Definition Documentation


#define INP_NAME_MAX   768


#define KEY_SIZE   (1+sizeof(struct it_key))

Definition at line 37 of file kinput.c.

Referenced by heap_read_one(), and zebra_index_merge().


#define PR_KEY_LOW   0

Definition at line 57 of file kinput.c.


#define PR_KEY_TOP   0

Definition at line 58 of file kinput.c.

◆ R_OK

#define R_OK   4

Definition at line 711 of file kinput.c.

Referenced by zebra_index_merge().

Function Documentation

◆ extract_get_fname_tmp()

void extract_get_fname_tmp ( ZebraHandle  zh,
char *  fname,
int  no 

Definition at line 77 of file kinput.c.

References zebra_session::res, and res_get_def().

Referenced by zebra_index_merge().

◆ getFnameTmp()

void getFnameTmp ( Res  res,
char *  fname,
int  no 

Definition at line 69 of file kinput.c.

References res_get_def().

Referenced by key_file_chunk_read().

◆ heap_cread_item()

int heap_cread_item ( void *  vp,
char **  dst,
int *  insertMode 

◆ heap_cread_item2()

int heap_cread_item2 ( void *  vp,
char **  dst,
int *  insertMode 

◆ heap_inpb()

int heap_inpb ( struct heap_cread_info hci,
struct heap_info hi 

◆ heap_inpc()

int heap_inpc ( struct heap_cread_info hci,
struct heap_info hi 

◆ heap_inps()

int heap_inps ( struct heap_cread_info hci,
struct heap_info hi 

◆ heap_read_one()

static int heap_read_one ( struct heap_info hi,
char *  name,
char *  key 

◆ key_file_chunk_read()

void key_file_chunk_read ( struct key_file f)

◆ key_file_destroy()

void key_file_destroy ( struct key_file f)

Definition at line 133 of file kinput.c.

References key_file::buf, key_file::decode_handle, iscz1_stop(), and key_file::prev_name.

Referenced by zebra_index_merge().

◆ key_file_getc()

int key_file_getc ( struct key_file f)

◆ key_file_init()

struct key_file* key_file_init ( int  no,
int  chunk,
Res  res 

◆ key_file_read()

int key_file_read ( struct key_file f,
char *  key 

◆ key_heap_delete()

static void key_heap_delete ( struct heap_info hi)

◆ key_heap_destroy()

void key_heap_destroy ( struct heap_info hi,
int  nkeys 

Definition at line 280 of file kinput.c.

References heap_info::buf, heap_info::file, heap_info::info, and heap_info::ptr.

Referenced by zebra_index_merge().

◆ key_heap_init_file()

struct heap_info* key_heap_init_file ( ZebraHandle  zh,
int  nkeys,
int(*)(const void *p1, const void *p2)  cmp 

◆ key_heap_insert()

static void key_heap_insert ( struct heap_info hi,
const char *  buf,
int  nbytes,
struct key_file kf 

◆ key_heap_malloc()

static struct heap_info* key_heap_malloc ( void  )

◆ key_heap_swap()

static void key_heap_swap ( struct heap_info hi,
int  i1,
int  i2 

Definition at line 291 of file kinput.c.

References heap_info::ptr.

Referenced by key_heap_delete(), and key_heap_insert().

◆ progressFunc()

void progressFunc ( struct key_file keyp,
void *  info 

◆ zebra_index_merge()

void zebra_index_merge ( ZebraHandle  zh)

◆ zebra_log_dict_entry()

void zebra_log_dict_entry ( ZebraHandle  zh,
const char *  s