IDZEBRA  2.2.7
Data Structures | Functions
trunc.c File Reference
#include <stdio.h>
#include <assert.h>
#include "index.h"
#include <rset.h>

Go to the source code of this file.

Data Structures

struct  trunc_info
 

Functions

static void heap_swap (struct trunc_info *ti, int i1, int i2)
 
static void heap_delete (struct trunc_info *ti)
 
static void heap_insert (struct trunc_info *ti, const char *buf, int indx)
 
static struct trunc_infoheap_init (int size, int key_size, int(*cmp)(const void *p1, const void *p2))
 
static void heap_close (struct trunc_info *ti)
 
static RSET rset_trunc_r (ZebraHandle zi, const char *term, int length, const char *flags, ISAM_P *isam_p, int from, int to, int merge_chunk, int preserve_position, int term_type, NMEM rset_nmem, struct rset_key_control *kctrl, int scope, TERMID termid)
 
static int isams_trunc_cmp (const void *p1, const void *p2)
 
static int isamc_trunc_cmp (const void *p1, const void *p2)
 
RSET rset_trunc (ZebraHandle zh, ISAM_P *isam_p, int no, const char *term, int length, const char *flags, int preserve_position, int term_type, NMEM rset_nmem, struct rset_key_control *kctrl, int scope, struct ord_list *ol, const char *index_type, zint hits_limit, const char *term_ref_id)
 

Function Documentation

◆ heap_close()

static void heap_close ( struct trunc_info ti)
static

◆ heap_delete()

static void heap_delete ( struct trunc_info ti)
static

Definition at line 51 of file trunc.c.

References trunc_info::cmp, trunc_info::heap, heap_swap(), trunc_info::heapnum, and trunc_info::ptr.

Referenced by rset_trunc_r().

◆ heap_init()

static struct trunc_info* heap_init ( int  size,
int  key_size,
int(*)(const void *p1, const void *p2)  cmp 
)
static

◆ heap_insert()

static void heap_insert ( struct trunc_info ti,
const char *  buf,
int  indx 
)
static

◆ heap_swap()

static void heap_swap ( struct trunc_info ti,
int  i1,
int  i2 
)
static

Definition at line 42 of file trunc.c.

References trunc_info::ptr.

Referenced by heap_delete(), and heap_insert().

◆ isamc_trunc_cmp()

static int isamc_trunc_cmp ( const void *  p1,
const void *  p2 
)
static

Definition at line 387 of file trunc.c.

References isamc_block, and isamc_type.

Referenced by rset_trunc().

◆ isams_trunc_cmp()

static int isams_trunc_cmp ( const void *  p1,
const void *  p2 
)
static

Definition at line 375 of file trunc.c.

Referenced by rset_trunc().

◆ rset_trunc()

RSET rset_trunc ( ZebraHandle  zh,
ISAM_P isam_p,
int  no,
const char *  term,
int  length,
const char *  flags,
int  preserve_position,
int  term_type,
NMEM  rset_nmem,
struct rset_key_control kctrl,
int  scope,
struct ord_list ol,
const char *  index_type,
zint  hits_limit,
const char *  term_ref_id 
)

◆ rset_trunc_r()

static RSET rset_trunc_r ( ZebraHandle  zi,
const char *  term,
int  length,
const char *  flags,
ISAM_P isam_p,
int  from,
int  to,
int  merge_chunk,
int  preserve_position,
int  term_type,
NMEM  rset_nmem,
struct rset_key_control kctrl,
int  scope,
TERMID  termid 
)
static