PostgreSQL Source Code git master
stem_UTF_8_lithuanian.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_envlithuanian_UTF_8_create_env (void)
 
void lithuanian_UTF_8_close_env (struct SN_env *z)
 
int lithuanian_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ lithuanian_UTF_8_close_env()

void lithuanian_UTF_8_close_env ( struct SN_env z)

Definition at line 816 of file stem_UTF_8_lithuanian.c.

816 {
817 SN_delete_env(z);
818}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ lithuanian_UTF_8_create_env()

struct SN_env * lithuanian_UTF_8_create_env ( void  )

Definition at line 808 of file stem_UTF_8_lithuanian.c.

808 {
809 struct SN_env * z = SN_new_env(sizeof(SN_local));
810 if (z) {
811 ((SN_local *)z)->i_p1 = 0;
812 }
813 return z;
814}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ lithuanian_UTF_8_stem()

int lithuanian_UTF_8_stem ( struct SN_env z)

Definition at line 729 of file stem_UTF_8_lithuanian.c.

729 {
730 ((SN_local *)z)->i_p1 = z->l;
731 {
732 int v_1 = z->c;
733 {
734 int v_2 = z->c;
735 if (z->c == z->l || z->p[z->c] != 'a') { z->c = v_2; goto lab1; }
736 z->c++;
737 if (len_utf8(z->p) <= 6) { z->c = v_2; goto lab1; }
738 lab1:
739 ;
740 }
741 {
742 int ret = out_grouping_U(z, g_v, 97, 371, 1);
743 if (ret < 0) goto lab0;
744 z->c += ret;
745 }
746 {
747 int ret = in_grouping_U(z, g_v, 97, 371, 1);
748 if (ret < 0) goto lab0;
749 z->c += ret;
750 }
751 ((SN_local *)z)->i_p1 = z->c;
752 lab0:
753 z->c = v_1;
754 }
755 z->lb = z->c; z->c = z->l;
756 {
757 int v_3 = z->l - z->c;
758 {
759 int ret = r_fix_conflicts(z);
760 if (ret < 0) return ret;
761 }
762 z->c = z->l - v_3;
763 }
764 {
765 int v_4 = z->l - z->c;
766 {
767 int ret = r_step1(z);
768 if (ret < 0) return ret;
769 }
770 z->c = z->l - v_4;
771 }
772 {
773 int v_5 = z->l - z->c;
774 {
775 int ret = r_fix_chdz(z);
776 if (ret < 0) return ret;
777 }
778 z->c = z->l - v_5;
779 }
780 {
781 int v_6 = z->l - z->c;
782 {
783 int ret = r_step2(z);
784 if (ret < 0) return ret;
785 }
786 z->c = z->l - v_6;
787 }
788 {
789 int v_7 = z->l - z->c;
790 {
791 int ret = r_fix_chdz(z);
792 if (ret < 0) return ret;
793 }
794 z->c = z->l - v_7;
795 }
796 {
797 int v_8 = z->l - z->c;
798 {
799 int ret = r_fix_gd(z);
800 if (ret < 0) return ret;
801 }
802 z->c = z->l - v_8;
803 }
804 z->c = z->lb;
805 return 1;
806}
static int r_step1(struct SN_env *z)
static int r_fix_gd(struct SN_env *z)
static int r_fix_chdz(struct SN_env *z)
static int r_step2(struct SN_env *z)
static int r_fix_conflicts(struct SN_env *z)
static const unsigned char g_v[]
int out_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:157
int in_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:133
int len_utf8(const symbol *p)
Definition: utilities.c:501

References SN_env::c, g_v, in_grouping_U(), SN_env::l, SN_env::lb, len_utf8(), out_grouping_U(), SN_env::p, r_fix_chdz(), r_fix_conflicts(), r_fix_gd(), r_step1(), and r_step2().