YAZ 5.35.1
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 
)
extern

Definition at line 627 of file utilities.c.

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

◆ create_s()

symbol * create_s ( void  )
extern

Definition at line 13 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 
)
extern

◆ eq_s()

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

◆ eq_s_b()

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

Definition at line 290 of file utilities.c.

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

Referenced by eq_v_b(), french_ISO_8859_1_stem(), french_UTF_8_stem(), portuguese_ISO_8859_1_stem(), portuguese_UTF_8_stem(), r_adjectival(), r_adjectival(), r_append_U_to_stems_ending_with_d_or_g(), r_attached_pronoun(), r_attached_pronoun(), r_case_ending(), r_case_ending(), r_check_vowel_harmony(), r_e_ending(), r_e_ending(), r_en_ending(), r_en_ending(), r_main_suffix(), r_main_suffix(), r_mark_ki(), r_mark_suffix_with_optional_n_consonant(), r_mark_suffix_with_optional_s_consonant(), r_mark_suffix_with_optional_y_consonant(), r_mark_yken(), r_other_endings(), r_other_endings(), r_other_suffix(), r_other_suffix(), r_perfective_gerund(), r_perfective_gerund(), r_possessive(), r_possessive(), r_residual_form(), r_residual_form(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_step_0(), r_step_0(), r_Step_1c(), r_Step_1c(), r_Step_1c(), r_Step_1c(), r_Step_2(), r_Step_2(), r_Step_4(), r_Step_4(), r_Step_4(), r_Step_4(), r_Step_5(), r_Step_5(), r_Step_5a(), r_Step_5a(), r_Step_5b(), r_Step_5b(), r_t_plural(), r_t_plural(), r_tidy(), r_tidy(), r_tidy_up(), r_tidy_up(), r_un_accent(), r_un_accent(), r_verb(), r_verb(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_VI(), r_VI(), r_vowel_suffix(), r_vowel_suffix(), r_y_verb_suffix(), r_y_verb_suffix(), russian_KOI8_R_stem(), and russian_UTF_8_stem().

◆ eq_v()

int eq_v ( struct SN_env z,
const symbol p 
)
extern

Definition at line 300 of file utilities.c.

References eq_s(), and SIZE.

◆ eq_v_b()

int eq_v_b ( struct SN_env z,
const symbol p 
)
extern

Definition at line 306 of file utilities.c.

References eq_s_b(), and SIZE.

Referenced by r_tidy(), r_tidy(), r_undouble(), and r_undouble().

◆ find_among()

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

◆ find_among_b()

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

Definition at line 400 of file utilities.c.

References SN_env::c, among::function, SN_env::lb, SN_env::p, among::result, among::s, among::s_size, and among::substring_i.

Referenced by r_adjectival(), r_adjectival(), r_adjective(), r_adjective(), r_attached_pronoun(), r_attached_pronoun(), r_attached_pronoun(), r_attached_pronoun(), r_case(), r_case(), r_case_ending(), r_case_ending(), r_case_other(), r_case_other(), r_case_special(), r_case_special(), r_combo_suffix(), r_combo_suffix(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_derivational(), r_derivational(), r_double(), r_double(), r_exception2(), r_exception2(), r_factive(), r_factive(), r_i_plural(), r_i_plural(), r_i_verb_suffix(), r_i_verb_suffix(), r_instrum(), r_instrum(), r_LONG(), r_LONG(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_mark_cAsInA(), r_mark_DA(), r_mark_DAn(), r_mark_DUr(), r_mark_lAr(), r_mark_lArI(), r_mark_nA(), r_mark_ncA(), r_mark_ndA(), r_mark_ndAn(), r_mark_nU(), r_mark_nUn(), r_mark_nUz(), r_mark_possessives(), r_mark_sUn(), r_mark_sUnUz(), r_mark_yA(), r_mark_yDU(), r_mark_ylA(), r_mark_ymUs_(), r_mark_ysA(), r_mark_yUm(), r_mark_yUz(), r_noun(), r_noun(), r_other_endings(), r_other_endings(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_owned(), r_owned(), r_particle_etc(), r_particle_etc(), r_perfective_gerund(), r_perfective_gerund(), r_plur_owner(), r_plur_owner(), r_plural(), r_plural(), r_possessive(), r_possessive(), r_post_process_last_consonants(), r_reflexive(), r_reflexive(), r_residual_form(), r_residual_form(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_sing_owner(), r_sing_owner(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_step_0(), r_step_0(), r_Step_1a(), r_Step_1a(), r_Step_1a(), r_Step_1a(), r_Step_1b(), r_Step_1b(), r_Step_1b(), r_Step_1b(), r_Step_2(), r_Step_2(), r_Step_2(), r_Step_2(), r_Step_3(), r_Step_3(), r_Step_3(), r_Step_3(), r_Step_4(), r_Step_4(), r_Step_4(), r_Step_4(), r_Step_5(), r_Step_5(), r_t_plural(), r_t_plural(), r_tidy_up(), r_tidy_up(), r_un_double(), r_un_double(), r_undouble(), r_undouble(), r_v_ending(), r_v_ending(), r_verb(), r_verb(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_vowel_suffix(), r_vowel_suffix(), r_y_verb_suffix(), and r_y_verb_suffix().

◆ in_grouping()

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

◆ in_grouping_b()

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

◆ in_grouping_b_U()

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

◆ in_grouping_U()

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

◆ insert_s()

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

◆ insert_v()

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

Definition at line 592 of file utilities.c.

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

◆ lose_s()

void lose_s ( symbol p)
extern

Definition at line 26 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 
)
extern

◆ out_grouping_b()

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

◆ out_grouping_b_U()

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

◆ out_grouping_U()

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

◆ replace_s()

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

◆ skip_utf8()

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

◆ slice_del()

int slice_del ( struct SN_env z)
extern

Definition at line 573 of file utilities.c.

References slice_from_s().

Referenced by portuguese_ISO_8859_1_stem(), portuguese_UTF_8_stem(), r_adjectival(), r_adjectival(), r_adjective(), r_adjective(), r_attached_pronoun(), r_attached_pronoun(), r_attached_pronoun(), r_attached_pronoun(), r_case(), r_case(), r_case_ending(), r_case_ending(), r_case_other(), r_case_other(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_consonant_pair(), r_derivational(), r_derivational(), r_e_ending(), r_e_ending(), r_en_ending(), r_en_ending(), r_factive(), r_factive(), r_i_plural(), r_i_plural(), r_i_verb_suffix(), r_i_verb_suffix(), r_instrum(), r_instrum(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_main_suffix(), r_noun(), r_noun(), r_other_endings(), r_other_endings(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_owned(), r_owned(), r_particle_etc(), r_particle_etc(), r_perfective_gerund(), r_perfective_gerund(), r_plur_owner(), r_plur_owner(), r_plural(), r_plural(), r_possessive(), r_possessive(), r_prelude(), r_prelude(), r_reflexive(), r_reflexive(), r_residual_form(), r_residual_form(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_residual_suffix(), r_sing_owner(), r_sing_owner(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_stem_nominal_verb_suffixes(), r_stem_noun_suffixes(), r_stem_suffix_chain_before_ki(), r_step_0(), r_step_0(), r_Step_1a(), r_Step_1a(), r_Step_1a(), r_Step_1a(), r_Step_1b(), r_Step_1b(), r_Step_1b(), r_Step_1b(), r_Step_2(), r_Step_2(), r_Step_3(), r_Step_3(), r_Step_3(), r_Step_3(), r_Step_4(), r_Step_4(), r_Step_4(), r_Step_4(), r_Step_5(), r_Step_5(), r_Step_5a(), r_Step_5a(), r_Step_5b(), r_Step_5b(), r_t_plural(), r_t_plural(), r_tidy(), r_tidy(), r_tidy_up(), r_tidy_up(), r_un_double(), r_un_double(), r_undouble(), r_undouble(), r_undouble(), r_undouble(), r_undouble(), r_undouble(), r_verb(), r_verb(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_verb_suffix(), r_vowel_suffix(), r_vowel_suffix(), r_vowel_suffix(), r_vowel_suffix(), r_y_verb_suffix(), r_y_verb_suffix(), russian_KOI8_R_stem(), and russian_UTF_8_stem().

◆ slice_from_s()

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

Definition at line 559 of file utilities.c.

References SN_env::bra, SN_env::ket, replace_s(), among::s, among::s_size, and slice_check().

Referenced by french_ISO_8859_1_stem(), french_UTF_8_stem(), porter_ISO_8859_1_stem(), porter_UTF_8_stem(), r_attached_pronoun(), r_attached_pronoun(), r_attached_pronoun(), r_attached_pronoun(), r_case_other(), r_case_other(), r_case_special(), r_case_special(), r_combo_suffix(), r_combo_suffix(), r_exception1(), r_exception1(), r_main_suffix(), r_main_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_other_suffix(), r_owned(), r_owned(), r_plur_owner(), r_plur_owner(), r_plural(), r_plural(), r_possessive(), r_possessive(), r_post_process_last_consonants(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_postlude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_prelude(), r_residual_form(), r_residual_form(), r_residual_suffix(), r_residual_suffix(), r_sing_owner(), r_sing_owner(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_standard_suffix(), r_step_0(), r_step_0(), r_Step_1a(), r_Step_1a(), r_Step_1a(), r_Step_1a(), r_Step_1b(), r_Step_1b(), r_Step_1b(), r_Step_1b(), r_Step_1c(), r_Step_1c(), r_Step_1c(), r_Step_1c(), r_Step_2(), r_Step_2(), r_Step_2(), r_Step_2(), r_Step_3(), r_Step_3(), r_Step_3(), r_Step_3(), r_un_accent(), r_un_accent(), r_v_ending(), r_v_ending(), slice_del(), and slice_from_v().

◆ slice_from_v()

int slice_from_v ( struct SN_env z,
const symbol p 
)
extern

Definition at line 567 of file utilities.c.

References SIZE, and slice_from_s().

◆ slice_to()

symbol * slice_to ( struct SN_env z,
symbol p 
)
extern