IDZEBRA  2.1.2
Data Structures | Macros | Typedefs | Enumerations | Functions
marcomp.h File Reference

Go to the source code of this file.

Data Structures

struct  mc_subfield
 
struct  mc_field
 
struct  mc_context
 

Macros

#define MC_SF   1
 
#define MC_SFGROUP   2
 
#define MC_SFVARIANT   3
 
#define SZ_FNAME   3
 
#define SZ_IND   1
 
#define SZ_SFNAME   1
 
#define SZ_PREFIX   1
 
#define SZ_SUFFIX   1
 

Typedefs

typedef struct mc_subfield mc_subfield
 
typedef struct mc_field mc_field
 
typedef struct mc_context mc_context
 

Enumerations

enum  mc_token {
  NOP, REGULAR, LVARIANT, RVARIANT,
  LGROUP, RGROUP, LINLINE, RINLINE,
  SUBFIELD, LINTERVAL, RINTERVAL
}
 
enum  mc_errcode {
  EMCOK = 0, EMCNOMEM, EMCF, EMCSF,
  EMCSFGROUP, EMCSFVAR, EMCSFINLINE, EMCEND
}
 

Functions

mc_contextmc_mk_context (const char *s)
 
void mc_destroy_context (mc_context *c)
 
mc_fieldmc_getfield (mc_context *c)
 
void mc_destroy_field (mc_field *p)
 
void mc_pr_field (mc_field *p, int offset)
 
mc_subfieldmc_getsubfields (mc_context *c, mc_subfield *parent)
 
void mc_destroy_subfield (mc_subfield *p)
 
void mc_destroy_subfields_recursive (mc_subfield *p)
 
void mc_pr_subfields (mc_subfield *p, int offset)
 
mc_errcode mc_errno (mc_context *c)
 
const char * mc_error (mc_errcode no)
 

Macro Definition Documentation

#define MC_SF   1
#define MC_SFGROUP   2
#define MC_SFVARIANT   3
#define SZ_FNAME   3

Definition at line 47 of file marcomp.h.

Referenced by inline_mk_field(), inline_parse(), mc_getfield(), and mc_mk_field().

#define SZ_IND   1

Definition at line 48 of file marcomp.h.

Referenced by inline_mk_field(), mc_getfield(), and mc_mk_field().

#define SZ_PREFIX   1

Definition at line 50 of file marcomp.h.

Referenced by mc_getsubfields(), and mc_mk_subfield().

#define SZ_SFNAME   1

Definition at line 49 of file marcomp.h.

Referenced by inline_mk_subfield(), mc_getsubfields(), and mc_mk_subfield().

#define SZ_SUFFIX   1

Definition at line 51 of file marcomp.h.

Referenced by mc_getsubfields(), and mc_mk_subfield().

Typedef Documentation

typedef struct mc_context mc_context
typedef struct mc_field mc_field
typedef struct mc_subfield mc_subfield

Enumeration Type Documentation

enum mc_errcode
Enumerator
EMCOK 
EMCNOMEM 
EMCF 
EMCSF 
EMCSFGROUP 
EMCSFVAR 
EMCSFINLINE 
EMCEND 

Definition at line 80 of file marcomp.h.

enum mc_token
Enumerator
NOP 
REGULAR 
LVARIANT 
RVARIANT 
LGROUP 
RGROUP 
LINLINE 
RINLINE 
SUBFIELD 
LINTERVAL 
RINTERVAL 

Definition at line 65 of file marcomp.h.

Function Documentation

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)
void mc_destroy_subfield ( mc_subfield p)
void mc_destroy_subfields_recursive ( mc_subfield p)
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.

mc_field* mc_getfield ( mc_context c)
mc_subfield* mc_getsubfields ( mc_context c,
mc_subfield parent 
)
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().

void mc_pr_field ( mc_field p,
int  offset 
)
void mc_pr_subfields ( mc_subfield p,
int  offset 
)