PostgreSQL Source Code git master
stem_ISO_8859_1_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_ISO_8859_1_create_env (void)
 
void finnish_ISO_8859_1_close_env (struct SN_env *z)
 
int finnish_ISO_8859_1_stem (struct SN_env *z)
 

Function Documentation

◆ finnish_ISO_8859_1_close_env()

void finnish_ISO_8859_1_close_env ( struct SN_env z)

Definition at line 770 of file stem_ISO_8859_1_finnish.c.

770 {
771 if (z) {
772 lose_s(((SN_local *)z)->s_x);
773 }
774 SN_delete_env(z);
775}
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_ISO_8859_1_create_env().

◆ finnish_ISO_8859_1_create_env()

struct SN_env * finnish_ISO_8859_1_create_env ( void  )

Definition at line 754 of file stem_ISO_8859_1_finnish.c.

754 {
755 struct SN_env * z = SN_new_env(sizeof(SN_local));
756 if (z) {
757 ((SN_local *)z)->b_ending_removed = 0;
758 ((SN_local *)z)->s_x = NULL;
759 ((SN_local *)z)->i_p2 = 0;
760 ((SN_local *)z)->i_p1 = 0;
761
762 if ((((SN_local *)z)->s_x = create_s()) == NULL) {
764 return NULL;
765 }
766 }
767 return z;
768}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
void finnish_ISO_8859_1_close_env(struct SN_env *z)
Definition: api.h:15
symbol * create_s(void)
Definition: utilities.c:20

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

◆ finnish_ISO_8859_1_stem()

int finnish_ISO_8859_1_stem ( struct SN_env z)

Definition at line 678 of file stem_ISO_8859_1_finnish.c.

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