PostgreSQL Source Code git master
stem_ISO_8859_1_danish.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_envdanish_ISO_8859_1_create_env (void)
 
void danish_ISO_8859_1_close_env (struct SN_env *z)
 
int danish_ISO_8859_1_stem (struct SN_env *z)
 

Function Documentation

◆ danish_ISO_8859_1_close_env()

void danish_ISO_8859_1_close_env ( struct SN_env z)

Definition at line 348 of file stem_ISO_8859_1_danish.c.

348 {
349 if (z) {
350 lose_s(((SN_local *)z)->s_ch);
351 }
352 SN_delete_env(z);
353}
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 danish_ISO_8859_1_create_env().

◆ danish_ISO_8859_1_create_env()

struct SN_env * danish_ISO_8859_1_create_env ( void  )

Definition at line 334 of file stem_ISO_8859_1_danish.c.

334 {
335 struct SN_env * z = SN_new_env(sizeof(SN_local));
336 if (z) {
337 ((SN_local *)z)->i_p1 = 0;
338 ((SN_local *)z)->s_ch = NULL;
339
340 if ((((SN_local *)z)->s_ch = create_s()) == NULL) {
342 return NULL;
343 }
344 }
345 return z;
346}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
void danish_ISO_8859_1_close_env(struct SN_env *z)
Definition: api.h:15
symbol * create_s(void)
Definition: utilities.c:20

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

◆ danish_ISO_8859_1_stem()

int danish_ISO_8859_1_stem ( struct SN_env z)

Definition at line 288 of file stem_ISO_8859_1_danish.c.

288 {
289 {
290 int v_1 = z->c;
291 {
292 int ret = r_mark_regions(z);
293 if (ret < 0) return ret;
294 }
295 z->c = v_1;
296 }
297 z->lb = z->c; z->c = z->l;
298 {
299 int v_2 = z->l - z->c;
300 {
301 int ret = r_main_suffix(z);
302 if (ret < 0) return ret;
303 }
304 z->c = z->l - v_2;
305 }
306 {
307 int v_3 = z->l - z->c;
308 {
309 int ret = r_consonant_pair(z);
310 if (ret < 0) return ret;
311 }
312 z->c = z->l - v_3;
313 }
314 {
315 int v_4 = z->l - z->c;
316 {
317 int ret = r_other_suffix(z);
318 if (ret < 0) return ret;
319 }
320 z->c = z->l - v_4;
321 }
322 {
323 int v_5 = z->l - z->c;
324 {
325 int ret = r_undouble(z);
326 if (ret < 0) return ret;
327 }
328 z->c = z->l - v_5;
329 }
330 z->c = z->lb;
331 return 1;
332}
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_undouble(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(), r_other_suffix(), and r_undouble().