IDZEBRA  2.1.2
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.

#define R_OK   4

Definition at line 711 of file kinput.c.

Referenced by zebra_index_merge().

Function Documentation

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

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

int heap_cread_item ( void *  vp,
char **  dst,
int *  insertMode 
int heap_cread_item2 ( void *  vp,
char **  dst,
int *  insertMode 
int heap_inpb ( struct heap_cread_info hci,
struct heap_info hi 
int heap_inpc ( struct heap_cread_info hci,
struct heap_info hi 
int heap_inps ( struct heap_cread_info hci,
struct heap_info hi 
static int heap_read_one ( struct heap_info hi,
char *  name,
char *  key 
void key_file_chunk_read ( struct key_file f)
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().

int key_file_getc ( struct key_file f)
struct key_file* key_file_init ( int  no,
int  chunk,
Res  res 
int key_file_read ( struct key_file f,
char *  key 
static void key_heap_delete ( struct heap_info hi)
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().

struct heap_info* key_heap_init_file ( ZebraHandle  zh,
int  nkeys,
int(*)(const void *p1, const void *p2)  cmp 
static void key_heap_insert ( struct heap_info hi,
const char *  buf,
int  nbytes,
struct key_file kf 
static struct heap_info* key_heap_malloc ( void  )
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().

void progressFunc ( struct key_file keyp,
void *  info 
void zebra_index_merge ( ZebraHandle  zh)
void zebra_log_dict_entry ( ZebraHandle  zh,
const char *  s