IDZEBRA  2.1.2
Data Structures | Macros | Functions
res.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <yaz/tokenizer.h>
#include <yaz/yaz-util.h>
#include <idzebra/res.h>

Go to the source code of this file.

Data Structures

struct  res_entry
 
struct  res_struct
 

Macros

#define YLOG_RES   0
 

Functions

static Res res_incref (Res r)
 
static struct res_entryadd_entry (Res r)
 
static char * xstrdup_env (const char *src)
 
ZEBRA_RES res_read_file (Res r, const char *fname)
 
Res res_open (Res def_res, Res over_res)
 
void res_clear (Res r)
 
void res_close (Res r)
 
const char * res_get_prefix (Res r, const char *name, const char *prefix, const char *def)
 
const char * res_get (Res r, const char *name)
 
const char * res_get_def (Res r, const char *name, const char *def)
 
int res_get_match (Res r, const char *name, const char *value, const char *s)
 
void res_set (Res r, const char *name, const char *value)
 
int res_trav (Res r, const char *prefix, void *p, void(*f)(void *p, const char *name, const char *value))
 
ZEBRA_RES res_write_file (Res r, const char *fname)
 
ZEBRA_RES res_get_int (Res r, const char *name, int *val)
 
void res_add (Res r, const char *name, const char *value)
 
void res_dump (Res r, int level)
 
int res_check (Res r_i, Res r_v)
 

Macro Definition Documentation

#define YLOG_RES   0

Definition at line 38 of file res.c.

Referenced by res_add().

Function Documentation

static struct res_entry* add_entry ( Res  r)
static

Definition at line 60 of file res.c.

References res_struct::first, res_struct::last, and res_entry::next.

Referenced by res_add(), res_read_file(), and res_set().

void res_add ( Res  r,
const char *  name,
const char *  value 
)

Definition at line 445 of file res.c.

References add_entry(), res_entry::name, res_entry::value, xstrdup_env(), and YLOG_RES.

Referenced by zebra_check_res().

int res_check ( Res  r_i,
Res  r_v 
)

Definition at line 479 of file res.c.

References res_struct::first, res_entry::name, res_entry::next, and res_entry::value.

Referenced by zebra_check_res().

void res_clear ( Res  r)

Definition at line 246 of file res.c.

References res_struct::first, res_struct::last, res_entry::name, res_entry::next, and res_entry::value.

Referenced by res_close().

void res_close ( Res  r)
void res_dump ( Res  r,
int  level 
)
const char* res_get ( Res  r,
const char *  name 
)
const char* res_get_def ( Res  r,
const char *  name,
const char *  def 
)
ZEBRA_RES res_get_int ( Res  r,
const char *  name,
int *  val 
)

Definition at line 432 of file res.c.

References res_get(), ZEBRA_FAIL, and ZEBRA_OK.

Referenced by dict_open_res(), facet_fetch(), perform_facet_index(), and zebra_select_register().

int res_get_match ( Res  r,
const char *  name,
const char *  value,
const char *  s 
)

Definition at line 327 of file res.c.

References res_get().

Referenced by zebra_register_open().

const char* res_get_prefix ( Res  r,
const char *  name,
const char *  prefix,
const char *  def 
)

Definition at line 272 of file res.c.

References res_get().

Referenced by read_res_for_transaction(), and zebra_select_default_database().

static Res res_incref ( Res  r)
static

Definition at line 53 of file res.c.

References res_struct::ref_count.

Referenced by res_open().

Res res_open ( Res  def_res,
Res  over_res 
)
ZEBRA_RES res_read_file ( Res  r,
const char *  fname 
)
void res_set ( Res  r,
const char *  name,
const char *  value 
)
int res_trav ( Res  r,
const char *  prefix,
void *  p,
void(*)(void *p, const char *name, const char *value)  f 
)
ZEBRA_RES res_write_file ( Res  r,
const char *  fname 
)
static char* xstrdup_env ( const char *  src)
static

Definition at line 77 of file res.c.

Referenced by res_add(), res_read_file(), and res_set().