IDZEBRA  2.2.7
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

◆ MC_SF

#define MC_SF   1

Definition at line 37 of file marcomp.h.

◆ MC_SFGROUP

#define MC_SFGROUP   2

Definition at line 38 of file marcomp.h.

◆ MC_SFVARIANT

#define MC_SFVARIANT   3

Definition at line 39 of file marcomp.h.

◆ SZ_FNAME

#define SZ_FNAME   3

Definition at line 47 of file marcomp.h.

◆ SZ_IND

#define SZ_IND   1

Definition at line 48 of file marcomp.h.

◆ SZ_PREFIX

#define SZ_PREFIX   1

Definition at line 50 of file marcomp.h.

◆ SZ_SFNAME

#define SZ_SFNAME   1

Definition at line 49 of file marcomp.h.

◆ SZ_SUFFIX

#define SZ_SUFFIX   1

Definition at line 51 of file marcomp.h.

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

void mc_destroy_field ( mc_field p)

◆ mc_destroy_subfield()

void mc_destroy_subfield ( mc_subfield p)

◆ mc_destroy_subfields_recursive()

void mc_destroy_subfields_recursive ( mc_subfield p)

◆ 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_field* mc_getfield ( mc_context c)

◆ mc_getsubfields()

mc_subfield* mc_getsubfields ( mc_context c,
mc_subfield parent 
)

◆ 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 
)