1
1
/* Expression parsing and evaluation for plural form selection.
2
Copyright (C) 2000-2003 Free Software Foundation, Inc.
2
Copyright (C) 2000-2003, 2005-2007 Free Software Foundation, Inc.
3
3
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
5
5
This program is free software; you can redistribute it and/or modify it
15
15
You should have received a copy of the GNU Library General Public
16
16
License along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20
20
#ifndef _PLURAL_EXP_H
28
28
# define attribute_hidden
36
enum expression_operator
38
/* Without arguments: */
39
var, /* The variable "n". */
40
num, /* Decimal number. */
41
/* Unary operators: */
42
lnot, /* Logical NOT. */
43
/* Binary operators: */
44
mult, /* Multiplication. */
45
divide, /* Division. */
46
module, /* Modulo operation. */
48
minus, /* Subtraction. */
49
less_than, /* Comparison. */
50
greater_than, /* Comparison. */
51
less_or_equal, /* Comparison. */
52
greater_or_equal, /* Comparison. */
53
equal, /* Comparison for equality. */
54
not_equal, /* Comparison for inequality. */
55
land, /* Logical AND. */
56
lor, /* Logical OR. */
57
/* Ternary operators: */
58
qmop /* Question mark operator. */
32
61
/* This is the representation of the expressions to determine the
36
65
int nargs; /* Number of arguments. */
39
/* Without arguments: */
40
var, /* The variable "n". */
41
num, /* Decimal number. */
42
/* Unary operators: */
43
lnot, /* Logical NOT. */
44
/* Binary operators: */
45
mult, /* Multiplication. */
46
divide, /* Division. */
47
module, /* Modulo operation. */
49
minus, /* Subtraction. */
50
less_than, /* Comparison. */
51
greater_than, /* Comparison. */
52
less_or_equal, /* Comparison. */
53
greater_or_equal, /* Comparison. */
54
equal, /* Comparison for equality. */
55
not_equal, /* Comparison for inequality. */
56
land, /* Logical AND. */
57
lor, /* Logical OR. */
58
/* Ternary operators: */
59
qmop /* Question mark operator. */
66
enum expression_operator operation;
63
69
unsigned long int num; /* Number value for `num'. */
106
112
extern int PLURAL_PARSE (void *arg);
107
113
extern struct expression GERMANIC_PLURAL attribute_hidden;
108
114
extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
109
struct expression **pluralp,
115
const struct expression **pluralp,
110
116
unsigned long int *npluralsp)
111
117
internal_function;
113
#if !defined (_LIBC) && !defined (IN_LIBINTL)
114
extern unsigned long int plural_eval (struct expression *pexp,
119
#if !defined (_LIBC) && !defined (IN_LIBINTL) && !defined (IN_LIBGLOCALE)
120
extern unsigned long int plural_eval (const struct expression *pexp,
115
121
unsigned long int n);
118
129
#endif /* _PLURAL_EXP_H */