IDZEBRA  2.1.2
Data Structures | Macros | Functions | Variables
mod_grs_marc.c File Reference
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
#include <yaz/yaz-util.h>
#include <yaz/marcdisp.h>
#include <idzebra/recgrs.h>
#include "marcomp.h"
#include "inline.h"

Go to the source code of this file.

Data Structures

struct  marc_info
 

Macros

#define MARC_DEBUG   0
 
#define MARCOMP_DEBUG   0
 

Functions

static data1_nodegrs_read_iso2709 (struct grs_read_info *p, int marc_xml)
 
static char * get_data (data1_node *n, int *len)
 
static data1_nodelookup_subfield (data1_node *node, const char *name)
 
static inline_subfieldlookup_inline_subfield (inline_subfield *pisf, const char *name)
 
static inline_subfieldcat_inline_subfield (mc_subfield *psf, WRBUF buf, inline_subfield *pisf)
 
static void cat_inline_field (mc_field *pf, WRBUF buf, data1_node *subfield)
 
static data1_nodecat_subfield (mc_subfield *psf, WRBUF buf, data1_node *subfield)
 
static data1_nodecat_field (struct grs_read_info *p, mc_field *pf, WRBUF buf, data1_node *field)
 
static int is_empty (char *s)
 
static void parse_data1_tree (struct grs_read_info *p, const char *mc_stmnt, data1_node *root)
 
data1_nodegrs_read_marcxml (struct grs_read_info *p)
 
data1_nodegrs_read_marc (struct grs_read_info *p)
 
static void * init_marc (Res res, RecType rt)
 
static ZEBRA_RES config_marc (void *clientData, Res res, const char *args)
 
static void destroy_marc (void *clientData)
 
static int extract_marc (void *clientData, struct recExtractCtrl *ctrl)
 
static int retrieve_marc (void *clientData, struct recRetrieveCtrl *ctrl)
 
static int extract_marcxml (void *clientData, struct recExtractCtrl *ctrl)
 
static int retrieve_marcxml (void *clientData, struct recRetrieveCtrl *ctrl)
 

Variables

static struct recType marc_type
 
static struct recType marcxml_type
 
RecType idzebra_filter []
 

Macro Definition Documentation

#define MARC_DEBUG   0

Definition at line 33 of file mod_grs_marc.c.

Referenced by grs_read_iso2709().

#define MARCOMP_DEBUG   0

Definition at line 34 of file mod_grs_marc.c.

Function Documentation

static data1_node* cat_field ( struct grs_read_info p,
mc_field pf,
WRBUF  buf,
data1_node field 
)
static
static void cat_inline_field ( mc_field pf,
WRBUF  buf,
data1_node subfield 
)
static
static inline_subfield* cat_inline_subfield ( mc_subfield psf,
WRBUF  buf,
inline_subfield pisf 
)
static
static data1_node* cat_subfield ( mc_subfield psf,
WRBUF  buf,
data1_node subfield 
)
static
static ZEBRA_RES config_marc ( void *  clientData,
Res  res,
const char *  args 
)
static

Definition at line 840 of file mod_grs_marc.c.

References marc_info::type, and ZEBRA_OK.

static void destroy_marc ( void *  clientData)
static

Definition at line 848 of file mod_grs_marc.c.

static int extract_marc ( void *  clientData,
struct recExtractCtrl ctrl 
)
static

Definition at line 855 of file mod_grs_marc.c.

References grs_read_marc(), and zebra_grs_extract().

static int extract_marcxml ( void *  clientData,
struct recExtractCtrl ctrl 
)
static

Definition at line 875 of file mod_grs_marc.c.

References grs_read_marcxml(), and zebra_grs_extract().

static char* get_data ( data1_node n,
int *  len 
)
static
static data1_node* grs_read_iso2709 ( struct grs_read_info p,
int  marc_xml 
)
static
data1_node* grs_read_marc ( struct grs_read_info p)
data1_node* grs_read_marcxml ( struct grs_read_info p)
static void* init_marc ( Res  res,
RecType  rt 
)
static

Definition at line 833 of file mod_grs_marc.c.

References marc_info::type.

static int is_empty ( char *  s)
static

Definition at line 703 of file mod_grs_marc.c.

Referenced by parse_data1_tree().

static inline_subfield* lookup_inline_subfield ( inline_subfield pisf,
const char *  name 
)
static

Definition at line 385 of file mod_grs_marc.c.

References inline_subfield::name, and inline_subfield::next.

Referenced by cat_inline_subfield().

static data1_node* lookup_subfield ( data1_node node,
const char *  name 
)
static

Definition at line 373 of file mod_grs_marc.c.

References data1_node::next, data1_node::tag, and data1_node::u.

Referenced by cat_subfield().

static void parse_data1_tree ( struct grs_read_info p,
const char *  mc_stmnt,
data1_node root 
)
static
static int retrieve_marc ( void *  clientData,
struct recRetrieveCtrl ctrl 
)
static

Definition at line 860 of file mod_grs_marc.c.

References grs_read_marc(), and zebra_grs_retrieve().

static int retrieve_marcxml ( void *  clientData,
struct recRetrieveCtrl ctrl 
)
static

Definition at line 880 of file mod_grs_marc.c.

References grs_read_marcxml(), and zebra_grs_retrieve().

Variable Documentation

RecType idzebra_filter[]
Initial value:
= {
0,
}
static struct recType marcxml_type
Definition: mod_grs_marc.c:885
static struct recType marc_type
Definition: mod_grs_marc.c:865

Definition at line 902 of file mod_grs_marc.c.

struct recType marc_type
static
Initial value:
= {
0,
"grs.marc",
}
static void destroy_marc(void *clientData)
Definition: mod_grs_marc.c:848
static void * init_marc(Res res, RecType rt)
Definition: mod_grs_marc.c:833
static int retrieve_marc(void *clientData, struct recRetrieveCtrl *ctrl)
Definition: mod_grs_marc.c:860
static ZEBRA_RES config_marc(void *clientData, Res res, const char *args)
Definition: mod_grs_marc.c:840
static int extract_marc(void *clientData, struct recExtractCtrl *ctrl)
Definition: mod_grs_marc.c:855

Definition at line 865 of file mod_grs_marc.c.

struct recType marcxml_type
static
Initial value:
= {
0,
"grs.marcxml",
}
static void destroy_marc(void *clientData)
Definition: mod_grs_marc.c:848
static int extract_marcxml(void *clientData, struct recExtractCtrl *ctrl)
Definition: mod_grs_marc.c:875
static void * init_marc(Res res, RecType rt)
Definition: mod_grs_marc.c:833
static int retrieve_marcxml(void *clientData, struct recRetrieveCtrl *ctrl)
Definition: mod_grs_marc.c:880
static ZEBRA_RES config_marc(void *clientData, Res res, const char *args)
Definition: mod_grs_marc.c:840

Definition at line 885 of file mod_grs_marc.c.