PostgreSQL Source Code git master
stem_UTF_8_norwegian.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_envnorwegian_UTF_8_create_env (void)
 
void norwegian_UTF_8_close_env (struct SN_env *z)
 
int norwegian_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ norwegian_UTF_8_close_env()

void norwegian_UTF_8_close_env ( struct SN_env z)

Definition at line 353 of file stem_UTF_8_norwegian.c.

353 {
354 SN_delete_env(z);
355}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ norwegian_UTF_8_create_env()

struct SN_env * norwegian_UTF_8_create_env ( void  )

Definition at line 345 of file stem_UTF_8_norwegian.c.

345 {
346 struct SN_env * z = SN_new_env(sizeof(SN_local));
347 if (z) {
348 ((SN_local *)z)->i_p1 = 0;
349 }
350 return z;
351}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ norwegian_UTF_8_stem()

int norwegian_UTF_8_stem ( struct SN_env z)

Definition at line 307 of file stem_UTF_8_norwegian.c.

307 {
308 {
309 int v_1 = z->c;
310 {
311 int ret = r_mark_regions(z);
312 if (ret < 0) return ret;
313 }
314 z->c = v_1;
315 }
316 z->lb = z->c; z->c = z->l;
317 {
318 int v_2 = z->l - z->c;
319 {
320 int ret = r_main_suffix(z);
321 if (ret < 0) return ret;
322 }
323 z->c = z->l - v_2;
324 }
325 {
326 int v_3 = z->l - z->c;
327 {
328 int ret = r_consonant_pair(z);
329 if (ret < 0) return ret;
330 }
331 z->c = z->l - v_3;
332 }
333 {
334 int v_4 = z->l - z->c;
335 {
336 int ret = r_other_suffix(z);
337 if (ret < 0) return ret;
338 }
339 z->c = z->l - v_4;
340 }
341 z->c = z->lb;
342 return 1;
343}
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().