PostgreSQL Source Code git master
stem_UTF_8_serbian.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct SN_envserbian_UTF_8_create_env (void)
 
void serbian_UTF_8_close_env (struct SN_env *z)
 
int serbian_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ serbian_UTF_8_close_env()

void serbian_UTF_8_close_env ( struct SN_env z)

Definition at line 6849 of file stem_UTF_8_serbian.c.

6849 {
6850 SN_delete_env(z);
6851}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ serbian_UTF_8_create_env()

struct SN_env * serbian_UTF_8_create_env ( void  )

Definition at line 6840 of file stem_UTF_8_serbian.c.

6840 {
6841 struct SN_env * z = SN_new_env(sizeof(SN_local));
6842 if (z) {
6843 ((SN_local *)z)->i_p1 = 0;
6844 ((SN_local *)z)->b_no_diacritics = 0;
6845 }
6846 return z;
6847}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ serbian_UTF_8_stem()

int serbian_UTF_8_stem ( struct SN_env z)

Definition at line 6793 of file stem_UTF_8_serbian.c.

6793 {
6794 {
6795 int ret = r_cyr_to_lat(z);
6796 if (ret < 0) return ret;
6797 }
6798 {
6799 int ret = r_prelude(z);
6800 if (ret < 0) return ret;
6801 }
6802 {
6803 int ret = r_mark_regions(z);
6804 if (ret < 0) return ret;
6805 }
6806 z->lb = z->c; z->c = z->l;
6807 {
6808 int v_1 = z->l - z->c;
6809 {
6810 int ret = r_Step_1(z);
6811 if (ret < 0) return ret;
6812 }
6813 z->c = z->l - v_1;
6814 }
6815 {
6816 int v_2 = z->l - z->c;
6817 do {
6818 int v_3 = z->l - z->c;
6819 {
6820 int ret = r_Step_2(z);
6821 if (ret == 0) goto lab1;
6822 if (ret < 0) return ret;
6823 }
6824 break;
6825 lab1:
6826 z->c = z->l - v_3;
6827 {
6828 int ret = r_Step_3(z);
6829 if (ret == 0) goto lab0;
6830 if (ret < 0) return ret;
6831 }
6832 } while (0);
6833 lab0:
6834 z->c = z->l - v_2;
6835 }
6836 z->c = z->lb;
6837 return 1;
6838}
static int r_cyr_to_lat(struct SN_env *z)
static int r_Step_3(struct SN_env *z)
static int r_Step_1(struct SN_env *z)
static int r_prelude(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
static int r_Step_2(struct SN_env *z)
int lb
Definition: api.h:17
int c
Definition: api.h:17
int l
Definition: api.h:17

References SN_env::c, SN_env::l, SN_env::lb, r_cyr_to_lat(), r_mark_regions(), r_prelude(), r_Step_1(), r_Step_2(), and r_Step_3().