PostgreSQL Source Code git master
stem_UTF_8_swedish.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_envswedish_UTF_8_create_env (void)
 
void swedish_UTF_8_close_env (struct SN_env *z)
 
int swedish_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ swedish_UTF_8_close_env()

void swedish_UTF_8_close_env ( struct SN_env z)

Definition at line 409 of file stem_UTF_8_swedish.c.

409 {
410 SN_delete_env(z);
411}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ swedish_UTF_8_create_env()

struct SN_env * swedish_UTF_8_create_env ( void  )

Definition at line 401 of file stem_UTF_8_swedish.c.

401 {
402 struct SN_env * z = SN_new_env(sizeof(SN_local));
403 if (z) {
404 ((SN_local *)z)->i_p1 = 0;
405 }
406 return z;
407}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ swedish_UTF_8_stem()

int swedish_UTF_8_stem ( struct SN_env z)

Definition at line 363 of file stem_UTF_8_swedish.c.

363 {
364 {
365 int v_1 = z->c;
366 {
367 int ret = r_mark_regions(z);
368 if (ret < 0) return ret;
369 }
370 z->c = v_1;
371 }
372 z->lb = z->c; z->c = z->l;
373 {
374 int v_2 = z->l - z->c;
375 {
376 int ret = r_main_suffix(z);
377 if (ret < 0) return ret;
378 }
379 z->c = z->l - v_2;
380 }
381 {
382 int v_3 = z->l - z->c;
383 {
384 int ret = r_consonant_pair(z);
385 if (ret < 0) return ret;
386 }
387 z->c = z->l - v_3;
388 }
389 {
390 int v_4 = z->l - z->c;
391 {
392 int ret = r_other_suffix(z);
393 if (ret < 0) return ret;
394 }
395 z->c = z->l - v_4;
396 }
397 z->c = z->lb;
398 return 1;
399}
static int r_other_suffix(struct SN_env *z)
static int r_consonant_pair(struct SN_env *z)
static int r_main_suffix(struct SN_env *z)
static int r_mark_regions(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_consonant_pair(), r_main_suffix(), r_mark_regions(), and r_other_suffix().