| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
#ifndef _PLURAL_EXP_H |
| 21 |
#define _PLURAL_EXP_H |
| 22 |
|
| 23 |
#ifndef PARAMS |
| 24 |
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES |
| 25 |
# define PARAMS(args) args |
| 26 |
# else |
| 27 |
# define PARAMS(args) () |
| 28 |
# endif |
| 29 |
#endif |
| 30 |
|
| 31 |
#ifndef internal_function |
| 32 |
# define internal_function |
| 33 |
#endif |
| 34 |
|
| 35 |
#ifndef attribute_hidden |
| 36 |
# define attribute_hidden |
| 37 |
#endif |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
struct expression |
| 43 |
{ |
| 44 |
int nargs; |
| 45 |
enum operator |
| 46 |
{ |
| 47 |
|
| 48 |
var, |
| 49 |
num, |
| 50 |
|
| 51 |
lnot, |
| 52 |
|
| 53 |
mult, |
| 54 |
divide, |
| 55 |
module, |
| 56 |
plus, |
| 57 |
minus, |
| 58 |
less_than, |
| 59 |
greater_than, |
| 60 |
less_or_equal, |
| 61 |
greater_or_equal, |
| 62 |
equal, |
| 63 |
not_equal, |
| 64 |
land, |
| 65 |
lor, |
| 66 |
|
| 67 |
qmop |
| 68 |
} operation; |
| 69 |
union |
| 70 |
{ |
| 71 |
unsigned long int num; |
| 72 |
struct expression *args[3]; |
| 73 |
} val; |
| 74 |
}; |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
struct parse_args |
| 79 |
{ |
| 80 |
const char *cp; |
| 81 |
struct expression *res; |
| 82 |
}; |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
#ifdef _LIBC |
| 96 |
# define FREE_EXPRESSION __gettext_free_exp |
| 97 |
# define PLURAL_PARSE __gettextparse |
| 98 |
# define GERMANIC_PLURAL __gettext_germanic_plural |
| 99 |
# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural |
| 100 |
#elif defined (IN_LIBINTL) |
| 101 |
# define FREE_EXPRESSION libintl_gettext_free_exp |
| 102 |
# define PLURAL_PARSE libintl_gettextparse |
| 103 |
# define GERMANIC_PLURAL libintl_gettext_germanic_plural |
| 104 |
# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural |
| 105 |
#else |
| 106 |
# define FREE_EXPRESSION free_plural_expression |
| 107 |
# define PLURAL_PARSE parse_plural_expression |
| 108 |
# define GERMANIC_PLURAL germanic_plural |
| 109 |
# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression |
| 110 |
#endif |
| 111 |
|
| 112 |
extern void FREE_EXPRESSION PARAMS ((struct expression *exp)) |
| 113 |
internal_function; |
| 114 |
extern int PLURAL_PARSE PARAMS ((void *arg)); |
| 115 |
extern struct expression GERMANIC_PLURAL attribute_hidden; |
| 116 |
extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry, |
| 117 |
struct expression **pluralp, |
| 118 |
unsigned long int *npluralsp)) |
| 119 |
internal_function; |
| 120 |
|
| 121 |
#if !defined (_LIBC) && !defined (IN_LIBINTL) |
| 122 |
extern unsigned long int plural_eval PARAMS ((struct expression *pexp, |
| 123 |
unsigned long int n)); |
| 124 |
#endif |
| 125 |
|
| 126 |
#endif |