pazpar2  1.13.0
Data Structures | Macros | Functions
marchash.h File Reference

Go to the source code of this file.

Data Structures

struct  marchash
struct  marcfield
struct  marcsubfield


#define MARCHASH_MASK   127


struct marchashmarchash_create (NMEM nmem)
void marchash_ingest_marcxml (struct marchash *marchash, xmlNodePtr rec_node)
struct marcfieldmarchash_add_field (struct marchash *marchash, const char *key, const char *value)
struct marcsubfieldmarchash_add_subfield (struct marchash *marchash, struct marcfield *field, const char key, const char *value)
struct marcfieldmarchash_get_field (struct marchash *marchash, const char *key, struct marcfield *last)
struct marcsubfieldmarchash_get_subfield (char key, struct marcfield *field, struct marcsubfield *last)
char * marchash_catenate_subfields (struct marcfield *field, const char *delim, NMEM nmem)

Macro Definition Documentation

#define MARCHASH_MASK   127

Definition at line 23 of file marchash.h.

Referenced by marchash_add_field(), and marchash_get_field().

Function Documentation

struct marcfield* marchash_add_field ( struct marchash marchash,
const char *  key,
const char *  value 
struct marcsubfield* marchash_add_subfield ( struct marchash marchash,
struct marcfield field,
const char  key,
const char *  value 
char* marchash_catenate_subfields ( struct marcfield field,
const char *  delim,
NMEM  nmem 

Definition at line 243 of file marchash.c.

References marcsubfield::next, strtrimcat(), and marcsubfield::val.

Referenced by marcmap_apply().

struct marchash* marchash_create ( NMEM  nmem)

Definition at line 75 of file marchash.c.

References marchash::nmem.

Referenced by marcmap_apply().

struct marcfield* marchash_get_field ( struct marchash marchash,
const char *  key,
struct marcfield last 

Definition at line 208 of file marchash.c.

References jenkins_hash(), marcfield::key, MARCHASH_MASK, marcfield::next, and marchash::table.

Referenced by marcmap_apply().

struct marcsubfield* marchash_get_subfield ( char  key,
struct marcfield field,
struct marcsubfield last 

Definition at line 225 of file marchash.c.

References marcsubfield::key, marcsubfield::next, and marcfield::subfields.

Referenced by marcmap_apply().

void marchash_ingest_marcxml ( struct marchash marchash,
xmlNodePtr  rec_node 

Definition at line 84 of file marchash.c.

References marchash_add_field(), and marchash_add_subfield().

Referenced by marcmap_apply().