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

Function Documentation

◆ swedish_ISO_8859_1_close_env()

void swedish_ISO_8859_1_close_env ( struct SN_env z)

Definition at line 306 of file stem_ISO_8859_1_swedish.c.

References SN_close_env().

306 { SN_close_env(z, 0); }
void SN_close_env(struct SN_env *z, int S_size)
Definition: api.c:40

◆ swedish_ISO_8859_1_create_env()

struct SN_env* swedish_ISO_8859_1_create_env ( void  )

Definition at line 304 of file stem_ISO_8859_1_swedish.c.

References SN_create_env().

304 { return SN_create_env(0, 2, 0); }
struct SN_env * SN_create_env(int S_size, int I_size, int B_size)
Definition: api.c:3

◆ swedish_ISO_8859_1_stem()

int swedish_ISO_8859_1_stem ( struct SN_env z)

Definition at line 265 of file stem_ISO_8859_1_swedish.c.

References SN_env::c, SN_env::l, SN_env::lb, r_consonant_pair(), r_main_suffix(), r_mark_regions(), and r_other_suffix().

265  {
266  { int c1 = z->c; /* do, line 66 */
267  { int ret = r_mark_regions(z);
268  if (ret == 0) goto lab0; /* call mark_regions, line 66 */
269  if (ret < 0) return ret;
270  }
271  lab0:
272  z->c = c1;
273  }
274  z->lb = z->c; z->c = z->l; /* backwards, line 67 */
275 
276  { int m2 = z->l - z->c; (void)m2; /* do, line 68 */
277  { int ret = r_main_suffix(z);
278  if (ret == 0) goto lab1; /* call main_suffix, line 68 */
279  if (ret < 0) return ret;
280  }
281  lab1:
282  z->c = z->l - m2;
283  }
284  { int m3 = z->l - z->c; (void)m3; /* do, line 69 */
285  { int ret = r_consonant_pair(z);
286  if (ret == 0) goto lab2; /* call consonant_pair, line 69 */
287  if (ret < 0) return ret;
288  }
289  lab2:
290  z->c = z->l - m3;
291  }
292  { int m4 = z->l - z->c; (void)m4; /* do, line 70 */
293  { int ret = r_other_suffix(z);
294  if (ret == 0) goto lab3; /* call other_suffix, line 70 */
295  if (ret < 0) return ret;
296  }
297  lab3:
298  z->c = z->l - m4;
299  }
300  z->c = z->lb;
301  return 1;
302 }
static int r_consonant_pair(struct SN_env *z)
int c
Definition: api.h:16
int lb
Definition: api.h:16
static int r_main_suffix(struct SN_env *z)
int l
Definition: api.h:16
static int r_mark_regions(struct SN_env *z)
static int r_other_suffix(struct SN_env *z)