IDZEBRA 2.2.11
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_context * mc_mk_context (const char *s)
void mc_destroy_context (mc_context *c)
mc_field * mc_getfield (mc_context *c)
void mc_destroy_field (mc_field *p)
void mc_pr_field (mc_field *p, int offset)
mc_subfield * mc_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

◆ MC_SF

◆ MC_SFGROUP

#define MC_SFGROUP   2

◆ MC_SFVARIANT

#define MC_SFVARIANT   3

◆ SZ_FNAME

#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().

◆ SZ_IND

#define SZ_IND   1

Definition at line 48 of file marcomp.h.

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

◆ SZ_PREFIX

#define SZ_PREFIX   1

Definition at line 50 of file marcomp.h.

Referenced by mc_getsubfields(), and mc_mk_subfield().

◆ SZ_SFNAME

#define SZ_SFNAME   1

Definition at line 49 of file marcomp.h.

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

◆ SZ_SUFFIX

#define SZ_SUFFIX   1

Definition at line 51 of file marcomp.h.

Referenced by mc_getsubfields(), and mc_mk_subfield().

Typedef Documentation

◆ mc_context

typedef struct mc_context mc_context

◆ mc_field

typedef struct mc_field mc_field

◆ mc_subfield

typedef struct mc_subfield mc_subfield

Enumeration Type Documentation

◆ mc_errcode

enum mc_errcode
Enumerator
EMCOK 
EMCNOMEM 
EMCF 
EMCSF 
EMCSFGROUP 
EMCSFVAR 
EMCSFINLINE 
EMCEND 

Definition at line 80 of file marcomp.h.

◆ mc_token

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

◆ mc_destroy_context()

void mc_destroy_context ( mc_context * c)

Definition at line 86 of file marcomp.c.

Referenced by parse_data1_tree().

◆ mc_destroy_field()

◆ mc_destroy_subfield()

◆ mc_destroy_subfields_recursive()

◆ mc_errno()

mc_errcode mc_errno ( mc_context * c)

Definition at line 55 of file marcomp.c.

References mc_context::errcode.

◆ mc_error()

const char * mc_error ( mc_errcode no)

Definition at line 59 of file marcomp.c.

References EMCEND, EMCOK, and mc_errmsg::msg.

◆ mc_getfield()

◆ mc_getsubfields()

◆ mc_mk_context()

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().

◆ mc_pr_field()

void mc_pr_field ( mc_field * p,
int offset )

◆ mc_pr_subfields()

void mc_pr_subfields ( mc_subfield * p,
int offset )