PostgreSQL Source Code git master
stem_UTF_8_finnish.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_envfinnish_UTF_8_create_env (void)
 
void finnish_UTF_8_close_env (struct SN_env *z)
 
int finnish_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ finnish_UTF_8_close_env()

void finnish_UTF_8_close_env ( struct SN_env z)

Definition at line 776 of file stem_UTF_8_finnish.c.

776 {
777 if (z) {
778 lose_s(((SN_local *)z)->s_x);
779 }
780 SN_delete_env(z);
781}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18
void lose_s(symbol *p)
Definition: utilities.c:31

References lose_s(), and SN_delete_env().

Referenced by finnish_UTF_8_create_env().

◆ finnish_UTF_8_create_env()

struct SN_env * finnish_UTF_8_create_env ( void  )

Definition at line 760 of file stem_UTF_8_finnish.c.

760 {
761 struct SN_env * z = SN_new_env(sizeof(SN_local));
762 if (z) {
763 ((SN_local *)z)->b_ending_removed = 0;
764 ((SN_local *)z)->s_x = NULL;
765 ((SN_local *)z)->i_p2 = 0;
766 ((SN_local *)z)->i_p1 = 0;
767
768 if ((((SN_local *)z)->s_x = create_s()) == NULL) {
770 return NULL;
771 }
772 }
773 return z;
774}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
void finnish_UTF_8_close_env(struct SN_env *z)
Definition: api.h:15
symbol * create_s(void)
Definition: utilities.c:20

References create_s(), finnish_UTF_8_close_env(), and SN_new_env().

◆ finnish_UTF_8_stem()

int finnish_UTF_8_stem ( struct SN_env z)

Definition at line 684 of file stem_UTF_8_finnish.c.

684 {
685 {
686 int v_1 = z->c;
687 {
688 int ret = r_mark_regions(z);
689 if (ret < 0) return ret;
690 }
691 z->c = v_1;
692 }
693 ((SN_local *)z)->b_ending_removed = 0;
694 z->lb = z->c; z->c = z->l;
695 {
696 int v_2 = z->l - z->c;
697 {
698 int ret = r_particle_etc(z);
699 if (ret < 0) return ret;
700 }
701 z->c = z->l - v_2;
702 }
703 {
704 int v_3 = z->l - z->c;
705 {
706 int ret = r_possessive(z);
707 if (ret < 0) return ret;
708 }
709 z->c = z->l - v_3;
710 }
711 {
712 int v_4 = z->l - z->c;
713 {
714 int ret = r_case_ending(z);
715 if (ret < 0) return ret;
716 }
717 z->c = z->l - v_4;
718 }
719 {
720 int v_5 = z->l - z->c;
721 {
722 int ret = r_other_endings(z);
723 if (ret < 0) return ret;
724 }
725 z->c = z->l - v_5;
726 }
727 do {
728 if (!((SN_local *)z)->b_ending_removed) goto lab0;
729 {
730 int v_6 = z->l - z->c;
731 {
732 int ret = r_i_plural(z);
733 if (ret < 0) return ret;
734 }
735 z->c = z->l - v_6;
736 }
737 break;
738 lab0:
739 {
740 int v_7 = z->l - z->c;
741 {
742 int ret = r_t_plural(z);
743 if (ret < 0) return ret;
744 }
745 z->c = z->l - v_7;
746 }
747 } while (0);
748 {
749 int v_8 = z->l - z->c;
750 {
751 int ret = r_tidy(z);
752 if (ret < 0) return ret;
753 }
754 z->c = z->l - v_8;
755 }
756 z->c = z->lb;
757 return 1;
758}
static int r_case_ending(struct SN_env *z)
static int r_tidy(struct SN_env *z)
static int r_other_endings(struct SN_env *z)
static int r_t_plural(struct SN_env *z)
static int r_i_plural(struct SN_env *z)
static int r_possessive(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
static int r_particle_etc(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_case_ending(), r_i_plural(), r_mark_regions(), r_other_endings(), r_particle_etc(), r_possessive(), r_t_plural(), and r_tidy().