YAZ  5.34.0
Data Structures | Macros | Functions
header.h File Reference
#include <limits.h>
#include "api.h"

Go to the source code of this file.

Data Structures

struct  among
 

Macros

#define MAXINT   INT_MAX
 
#define MININT   INT_MIN
 
#define HEAD   2*sizeof(int)
 
#define SIZE(p)   ((int *)(p))[-1]
 
#define SET_SIZE(p, n)   ((int *)(p))[-1] = n
 
#define CAPACITY(p)   ((int *)(p))[-2]
 

Functions

symbolcreate_s (void)
 
void lose_s (symbol *p)
 
int skip_utf8 (const symbol *p, int c, int lb, int l, int n)
 
int in_grouping_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int in_grouping_b_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping_b_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int in_grouping (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int in_grouping_b (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping_b (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int eq_s (struct SN_env *z, int s_size, const symbol *s)
 
int eq_s_b (struct SN_env *z, int s_size, const symbol *s)
 
int eq_v (struct SN_env *z, const symbol *p)
 
int eq_v_b (struct SN_env *z, const symbol *p)
 
int find_among (struct SN_env *z, const struct among *v, int v_size)
 
int find_among_b (struct SN_env *z, const struct among *v, int v_size)
 
int replace_s (struct SN_env *z, int c_bra, int c_ket, int s_size, const symbol *s, int *adjustment)
 
int slice_from_s (struct SN_env *z, int s_size, const symbol *s)
 
int slice_from_v (struct SN_env *z, const symbol *p)
 
int slice_del (struct SN_env *z)
 
int insert_s (struct SN_env *z, int bra, int ket, int s_size, const symbol *s)
 
int insert_v (struct SN_env *z, int bra, int ket, const symbol *p)
 
symbolslice_to (struct SN_env *z, symbol *p)
 
symbolassign_to (struct SN_env *z, symbol *p)
 
void debug (struct SN_env *z, int number, int line_count)
 

Macro Definition Documentation

◆ CAPACITY

#define CAPACITY (   p)    ((int *)(p))[-2]

Definition at line 13 of file header.h.

◆ HEAD

#define HEAD   2*sizeof(int)

Definition at line 9 of file header.h.

◆ MAXINT

#define MAXINT   INT_MAX

Definition at line 6 of file header.h.

◆ MININT

#define MININT   INT_MIN

Definition at line 7 of file header.h.

◆ SET_SIZE

#define SET_SIZE (   p,
 
)    ((int *)(p))[-1] = n

Definition at line 12 of file header.h.

◆ SIZE

#define SIZE (   p)    ((int *)(p))[-1]

Definition at line 11 of file header.h.

Function Documentation

◆ assign_to()

symbol* assign_to ( struct SN_env z,
symbol p 
)

Definition at line 446 of file utilities.c.

References CAPACITY, increase_size(), SN_env::l, SN_env::p, and SET_SIZE.

◆ create_s()

symbol* create_s ( void  )

Definition at line 12 of file utilities.c.

References CAPACITY, CREATE_SIZE, HEAD, malloc(), and SET_SIZE.

Referenced by replace_s(), and SN_create_env().

◆ debug()

void debug ( struct SN_env z,
int  number,
int  line_count 
)

◆ eq_s()

int eq_s ( struct SN_env z,
int  s_size,
const symbol s 
)

◆ eq_s_b()

int eq_s_b ( struct SN_env z,
int  s_size,
const symbol s 
)

◆ eq_v()

int eq_v ( struct SN_env z,
const symbol p 
)

Definition at line 204 of file utilities.c.

References eq_s(), and SIZE.

◆ eq_v_b()

int eq_v_b ( struct SN_env z,
const symbol p 
)

Definition at line 208 of file utilities.c.

References eq_s_b(), and SIZE.

Referenced by r_tidy(), and r_undouble().

◆ find_among()

int find_among ( struct SN_env z,
const struct among v,
int  v_size 
)

◆ find_among_b()

int find_among_b ( struct SN_env z,
const struct among v,
int  v_size 
)

◆ in_grouping()

int in_grouping ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

Definition at line 146 of file utilities.c.

References SN_env::c, SN_env::l, and SN_env::p.

Referenced by porter_ISO_8859_1_stem(), r_mark_regions(), and r_prelude().

◆ in_grouping_b()

int in_grouping_b ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ in_grouping_b_U()

int in_grouping_b_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ in_grouping_U()

int in_grouping_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

Definition at line 96 of file utilities.c.

References SN_env::c, get_utf8(), SN_env::l, SN_env::p, and unless.

Referenced by porter_UTF_8_stem(), r_mark_regions(), and r_prelude().

◆ insert_s()

int insert_s ( struct SN_env z,
int  bra,
int  ket,
int  s_size,
const symbol s 
)

◆ insert_v()

int insert_v ( struct SN_env z,
int  bra,
int  ket,
const symbol p 
)

Definition at line 419 of file utilities.c.

References SN_env::bra, SN_env::ket, replace_s(), and SIZE.

◆ lose_s()

void lose_s ( symbol p)

Definition at line 22 of file utilities.c.

References free(), and HEAD.

Referenced by increase_size(), slice_to(), and SN_close_env().

◆ out_grouping()

int out_grouping ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

Definition at line 170 of file utilities.c.

References SN_env::c, SN_env::l, SN_env::p, and unless.

Referenced by porter_ISO_8859_1_stem(), and r_mark_regions().

◆ out_grouping_b()

int out_grouping_b ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ out_grouping_b_U()

int out_grouping_b_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ out_grouping_U()

int out_grouping_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ replace_s()

int replace_s ( struct SN_env z,
int  c_bra,
int  c_ket,
int  s_size,
const symbol s,
int *  adjustment 
)

◆ skip_utf8()

int skip_utf8 ( const symbol p,
int  c,
int  lb,
int  l,
int  n 
)

◆ slice_del()

int slice_del ( struct SN_env z)

◆ slice_from_s()

int slice_from_s ( struct SN_env z,
int  s_size,
const symbol s 
)

◆ slice_from_v()

int slice_from_v ( struct SN_env z,
const symbol p 
)

Definition at line 402 of file utilities.c.

References SIZE, and slice_from_s().

◆ slice_to()

symbol* slice_to ( struct SN_env z,
symbol p 
)

Definition at line 428 of file utilities.c.

References SN_env::bra, CAPACITY, increase_size(), SN_env::ket, lose_s(), SN_env::p, SET_SIZE, and slice_check().

Referenced by r_tidy(), and r_undouble().