PostgreSQL Source Code git master
stem_ISO_8859_2_polish.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_envpolish_ISO_8859_2_create_env (void)
 
void polish_ISO_8859_2_close_env (struct SN_env *z)
 
int polish_ISO_8859_2_stem (struct SN_env *z)
 

Function Documentation

◆ polish_ISO_8859_2_close_env()

void polish_ISO_8859_2_close_env ( struct SN_env z)

Definition at line 517 of file stem_ISO_8859_2_polish.c.

517 {
518 SN_delete_env(z);
519}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ polish_ISO_8859_2_create_env()

struct SN_env * polish_ISO_8859_2_create_env ( void  )

Definition at line 509 of file stem_ISO_8859_2_polish.c.

509 {
510 struct SN_env * z = SN_new_env(sizeof(SN_local));
511 if (z) {
512 ((SN_local *)z)->i_p1 = 0;
513 }
514 return z;
515}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ polish_ISO_8859_2_stem()

int polish_ISO_8859_2_stem ( struct SN_env z)

Definition at line 476 of file stem_ISO_8859_2_polish.c.

476 {
477 {
478 int v_1 = z->c;
479 {
480 int ret = r_mark_regions(z);
481 if (ret < 0) return ret;
482 }
483 z->c = v_1;
484 }
485 do {
486 int v_2 = z->c;
487 if (z->c + 2 > z->l) goto lab0;
488 z->c += 2;
489 z->lb = z->c; z->c = z->l;
490 {
491 int ret = r_remove_endings(z);
492 if (ret == 0) goto lab0;
493 if (ret < 0) return ret;
494 }
495 z->c = z->lb;
496 break;
497 lab0:
498 z->c = v_2;
499 z->lb = z->c; z->c = z->l;
500 {
501 int ret = r_normalize_consonant(z);
502 if (ret <= 0) return ret;
503 }
504 z->c = z->lb;
505 } while (0);
506 return 1;
507}
static int r_normalize_consonant(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
static int r_remove_endings(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_mark_regions(), r_normalize_consonant(), and r_remove_endings().