IDZEBRA
2.2.7
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include "reckeys.h"
#include <yaz/nmem.h>
#include <yaz/xmalloc.h>
Go to the source code of this file.
Data Structures | |
struct | zebra_rec_key_entry |
struct | zebra_rec_keys_t_ |
Functions | |
struct zebra_rec_key_entry ** | zebra_rec_keys_mk_hash (zebra_rec_keys_t p, const char *buf, size_t len, const struct it_key *key) |
static void | init_hash (zebra_rec_keys_t p) |
zebra_rec_keys_t | zebra_rec_keys_open (void) |
void | zebra_rec_keys_set_buf (zebra_rec_keys_t p, char *buf, size_t sz, int copy_buf) |
void | zebra_rec_keys_get_buf (zebra_rec_keys_t p, char **buf, size_t *sz) |
void | zebra_rec_keys_close (zebra_rec_keys_t p) |
int | zebra_rec_keys_add_hash (zebra_rec_keys_t keys, const char *str, size_t slen, const struct it_key *key) |
void | zebra_rec_keys_write (zebra_rec_keys_t keys, const char *str, size_t slen, const struct it_key *key) |
void | zebra_rec_keys_reset (zebra_rec_keys_t keys) |
int | zebra_rec_keys_rewind (zebra_rec_keys_t keys) |
int | zebra_rec_keys_empty (zebra_rec_keys_t keys) |
int | zebra_rec_keys_read (zebra_rec_keys_t keys, const char **str, size_t *slen, struct it_key *key) |
zint | zebra_rec_keys_get_custom_record_id (zebra_rec_keys_t keys) |
|
static |
Definition at line 75 of file reckeys.c.
References zebra_rec_keys_t_::entries, zebra_rec_keys_t_::hash_size, and zebra_rec_keys_t_::nmem.
Referenced by zebra_rec_keys_open(), and zebra_rec_keys_reset().
int zebra_rec_keys_add_hash | ( | zebra_rec_keys_t | keys, |
const char * | str, | ||
size_t | slen, | ||
const struct it_key * | key | ||
) |
Definition at line 158 of file reckeys.c.
References zebra_rec_key_entry::buf, zebra_rec_key_entry::key, key_compare(), zebra_rec_key_entry::len, zebra_rec_key_entry::next, zebra_rec_keys_t_::nmem, and zebra_rec_keys_mk_hash().
Referenced by zebra_rec_keys_write().
void zebra_rec_keys_close | ( | zebra_rec_keys_t | p | ) |
Definition at line 143 of file reckeys.c.
References zebra_rec_keys_t_::buf, zebra_rec_keys_t_::decode_handle, zebra_rec_keys_t_::encode_handle, iscz1_stop(), zebra_rec_keys_t_::nmem, and zebra_rec_keys_t_::owner_of_buffer.
Referenced by perform_facet_index(), zebra_extract_explain(), zebra_extract_record_stream(), zebra_record_check(), and zebra_register_close().
int zebra_rec_keys_empty | ( | zebra_rec_keys_t | keys | ) |
Definition at line 252 of file reckeys.c.
References zebra_rec_keys_t_::buf_used.
Referenced by perform_facet_index(), and zebra_extract_record_stream().
void zebra_rec_keys_get_buf | ( | zebra_rec_keys_t | p, |
char ** | buf, | ||
size_t * | sz | ||
) |
Definition at line 133 of file reckeys.c.
References zebra_rec_key_entry::buf, zebra_rec_keys_t_::buf, zebra_rec_keys_t_::buf_max, and zebra_rec_keys_t_::buf_used.
Referenced by zebra_extract_explain(), and zebra_extract_record_stream().
zint zebra_rec_keys_get_custom_record_id | ( | zebra_rec_keys_t | keys | ) |
Definition at line 286 of file reckeys.c.
References zebra_rec_keys_t_::custom_record_id.
Referenced by zebra_extract_record_stream().
struct zebra_rec_key_entry** zebra_rec_keys_mk_hash | ( | zebra_rec_keys_t | p, |
const char * | buf, | ||
size_t | len, | ||
const struct it_key * | key | ||
) |
Definition at line 56 of file reckeys.c.
References zebra_rec_key_entry::buf, CAST_ZINT_TO_INT, zebra_rec_keys_t_::entries, zebra_rec_keys_t_::hash_size, zebra_rec_key_entry::key, it_key::len, zebra_rec_key_entry::len, and it_key::mem.
Referenced by zebra_rec_keys_add_hash().
zebra_rec_keys_t zebra_rec_keys_open | ( | void | ) |
Definition at line 88 of file reckeys.c.
References zebra_rec_keys_t_::buf, zebra_rec_keys_t_::buf_max, zebra_rec_keys_t_::buf_used, zebra_rec_keys_t_::custom_record_id, zebra_rec_keys_t_::decode_handle, zebra_rec_keys_t_::encode_handle, zebra_rec_keys_t_::entries, zebra_rec_keys_t_::fetch_offset, zebra_rec_keys_t_::hash_size, init_hash(), iscz1_start(), zebra_rec_keys_t_::nmem, and zebra_rec_keys_t_::owner_of_buffer.
Referenced by perform_facet_index(), zebra_extract_explain(), zebra_extract_record_stream(), zebra_record_check(), and zebra_register_open().
int zebra_rec_keys_read | ( | zebra_rec_keys_t | keys, |
const char ** | str, | ||
size_t * | slen, | ||
struct it_key * | key | ||
) |
Definition at line 259 of file reckeys.c.
References zebra_rec_keys_t_::buf, zebra_rec_keys_t_::buf_used, zebra_rec_keys_t_::decode_handle, zebra_rec_keys_t_::fetch_offset, iscz1_decode(), and zebra_rec_key_entry::key.
Referenced by extract_flush_record_keys2(), extract_flush_sort_keys(), extract_rec_keys_adjust(), extract_rec_keys_log(), perform_facet_index(), print_rec_keys(), searchRecordKey(), zebra_rec_keys_to_snippets1(), and zebra_record_check().
void zebra_rec_keys_reset | ( | zebra_rec_keys_t | keys | ) |
Definition at line 230 of file reckeys.c.
References zebra_rec_keys_t_::buf_used, zebra_rec_keys_t_::encode_handle, init_hash(), and iscz1_reset().
Referenced by zebra_extract_explain(), and zebra_extract_record_stream().
int zebra_rec_keys_rewind | ( | zebra_rec_keys_t | keys | ) |
Definition at line 240 of file reckeys.c.
References zebra_rec_keys_t_::buf_used, zebra_rec_keys_t_::decode_handle, zebra_rec_keys_t_::fetch_offset, and iscz1_reset().
Referenced by extract_flush_record_keys2(), extract_flush_sort_keys(), extract_rec_keys_adjust(), extract_rec_keys_log(), perform_facet_index(), print_rec_keys(), searchRecordKey(), zebra_rec_keys_to_snippets1(), and zebra_record_check().
void zebra_rec_keys_set_buf | ( | zebra_rec_keys_t | p, |
char * | buf, | ||
size_t | sz, | ||
int | copy_buf | ||
) |
Definition at line 109 of file reckeys.c.
References zebra_rec_key_entry::buf, zebra_rec_keys_t_::buf, zebra_rec_keys_t_::buf_max, zebra_rec_keys_t_::buf_used, and zebra_rec_keys_t_::owner_of_buffer.
Referenced by perform_facet_index(), zebra_extract_explain(), zebra_extract_record_stream(), and zebra_record_check().
void zebra_rec_keys_write | ( | zebra_rec_keys_t | keys, |
const char * | str, | ||
size_t | slen, | ||
const struct it_key * | key | ||
) |
Definition at line 188 of file reckeys.c.
References zebra_rec_keys_t_::buf, zebra_rec_keys_t_::buf_max, zebra_rec_keys_t_::buf_used, zebra_rec_keys_t_::custom_record_id, zebra_rec_keys_t_::encode_handle, iscz1_encode(), zebra_rec_key_entry::key, it_key::len, it_key::mem, zebra_rec_keys_t_::owner_of_buffer, zebra_rec_keys_add_hash(), and ZINT_FORMAT.
Referenced by extract_add_index_string(), and extract_add_sort_string().