IDZEBRA
2.2.7
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <yaz/yaz-util.h>
#include "marcomp.h"
Go to the source code of this file.
Data Structures | |
struct | mc_errmsg |
Functions | |
static mc_token | mc_gettoken (mc_context *c) |
static void | mc_ungettoken (mc_context *c) |
static int | mc_getval (mc_context *c) |
static int | mc_getdata (mc_context *c, char *s, int sz) |
static void | mc_getinterval (mc_context *c, int *start, int *end) |
static mc_subfield * | mc_mk_subfield (mc_subfield *parent) |
static mc_field * | mc_mk_field (void) |
mc_errcode | mc_errno (mc_context *c) |
const char * | mc_error (mc_errcode no) |
mc_context * | mc_mk_context (const char *s) |
void | mc_destroy_context (mc_context *c) |
void | mc_destroy_field (mc_field *p) |
mc_field * | mc_getfield (mc_context *c) |
void | mc_destroy_subfield (mc_subfield *p) |
void | mc_destroy_subfields_recursive (mc_subfield *p) |
mc_subfield * | mc_getsubfields (mc_context *c, mc_subfield *parent) |
Variables | |
static struct mc_errmsg | mc_errmsg [] |
void mc_destroy_context | ( | mc_context * | c | ) |
Definition at line 86 of file marcomp.c.
Referenced by parse_data1_tree().
void mc_destroy_field | ( | mc_field * | p | ) |
Definition at line 204 of file marcomp.c.
References mc_field::ind1, mc_field::ind2, mc_field::list, mc_destroy_subfields_recursive(), and mc_field::name.
Referenced by mc_destroy_subfield(), mc_destroy_subfields_recursive(), mc_getfield(), and parse_data1_tree().
void mc_destroy_subfield | ( | mc_subfield * | p | ) |
Definition at line 275 of file marcomp.c.
References mc_subfield::child, mc_subfield::in_line, mc_destroy_field(), mc_destroy_subfields_recursive(), MC_SF, MC_SFGROUP, MC_SFVARIANT, mc_subfield::name, mc_subfield::next, mc_subfield::parent, mc_subfield::prefix, mc_subfield::suffix, mc_subfield::u, and mc_subfield::which.
Referenced by mc_getsubfields().
void mc_destroy_subfields_recursive | ( | mc_subfield * | p | ) |
Definition at line 296 of file marcomp.c.
References mc_subfield::child, mc_subfield::in_line, mc_destroy_field(), MC_SF, MC_SFGROUP, MC_SFVARIANT, mc_subfield::name, mc_subfield::next, mc_subfield::parent, mc_subfield::prefix, mc_subfield::suffix, mc_subfield::u, and mc_subfield::which.
Referenced by mc_destroy_field(), and mc_destroy_subfield().
mc_errcode mc_errno | ( | mc_context * | c | ) |
Definition at line 55 of file marcomp.c.
References mc_context::errcode.
const char* mc_error | ( | mc_errcode | no | ) |
Definition at line 59 of file marcomp.c.
References EMCEND, EMCOK, and mc_errmsg::msg.
|
static |
Definition at line 136 of file marcomp.c.
References mc_gettoken(), mc_getval(), mc_ungettoken(), and REGULAR.
Referenced by mc_getfield(), and mc_getsubfields().
mc_field* mc_getfield | ( | mc_context * | c | ) |
Definition at line 214 of file marcomp.c.
References EMCF, EMCNOMEM, mc_field::end, mc_context::errcode, mc_field::ind1, mc_field::ind2, mc_field::interval, LINTERVAL, mc_field::list, mc_destroy_field(), mc_getdata(), mc_getinterval(), mc_getsubfields(), mc_gettoken(), mc_mk_field(), mc_ungettoken(), mc_field::name, mc_field::start, SZ_FNAME, and SZ_IND.
Referenced by mc_getsubfields(), and parse_data1_tree().
|
static |
Definition at line 153 of file marcomp.c.
References end(), LINTERVAL, mc_gettoken(), mc_getval(), NOP, and RINTERVAL.
Referenced by mc_getfield(), and mc_getsubfields().
mc_subfield* mc_getsubfields | ( | mc_context * | c, |
mc_subfield * | parent | ||
) |
Definition at line 320 of file marcomp.c.
References mc_subfield::child, EMCNOMEM, EMCSF, EMCSFGROUP, EMCSFINLINE, EMCSFVAR, mc_subfield::end, mc_context::errcode, mc_subfield::in_line, mc_subfield::interval, LGROUP, LINLINE, LINTERVAL, LVARIANT, mc_destroy_subfield(), mc_getdata(), mc_getfield(), mc_getinterval(), mc_gettoken(), mc_mk_subfield(), MC_SF, MC_SFGROUP, MC_SFVARIANT, mc_ungettoken(), mc_subfield::name, mc_subfield::next, NOP, mc_subfield::prefix, REGULAR, RGROUP, RINLINE, RVARIANT, mc_subfield::start, SUBFIELD, mc_subfield::suffix, SZ_PREFIX, SZ_SFNAME, SZ_SUFFIX, mc_subfield::u, and mc_subfield::which.
Referenced by mc_getfield().
|
static |
Definition at line 90 of file marcomp.c.
References mc_context::crrtok, mc_context::crrval, mc_context::data, mc_context::len, LGROUP, LINLINE, LINTERVAL, LVARIANT, NOP, mc_context::offset, REGULAR, RGROUP, RINLINE, RINTERVAL, RVARIANT, and SUBFIELD.
Referenced by mc_getdata(), mc_getfield(), mc_getinterval(), and mc_getsubfields().
|
static |
Definition at line 132 of file marcomp.c.
References mc_context::crrval.
Referenced by mc_getdata(), and mc_getinterval().
mc_context* mc_mk_context | ( | const char * | s | ) |
Definition at line 66 of file marcomp.c.
References mc_context::crrtok, mc_context::data, EMCOK, mc_context::errcode, mc_context::len, and NOP.
Referenced by parse_data1_tree().
|
static |
Definition at line 187 of file marcomp.c.
References mc_field::end, mc_field::ind1, mc_field::ind2, mc_field::interval, mc_field::name, mc_field::start, SZ_FNAME, and SZ_IND.
Referenced by mc_getfield().
|
static |
Definition at line 256 of file marcomp.c.
References mc_subfield::end, mc_subfield::interval, MC_SF, mc_subfield::name, mc_subfield::parent, mc_subfield::prefix, mc_subfield::start, mc_subfield::suffix, SZ_PREFIX, SZ_SFNAME, SZ_SUFFIX, and mc_subfield::which.
Referenced by mc_getsubfields().
|
static |
Definition at line 127 of file marcomp.c.
References mc_context::offset.
Referenced by mc_getdata(), mc_getfield(), and mc_getsubfields().