summaryrefslogtreecommitdiffstats
path: root/intl/plural.c
diff options
context:
space:
mode:
authorPedro J. Ruiz Lopez <holzplatten@es.gnu.org>2007-02-18 19:35:04 +0000
committerPedro J. Ruiz Lopez <holzplatten@es.gnu.org>2007-02-18 19:35:04 +0000
commitd49b34302a70ad948ce9cbf5778b1b39adb4286d (patch)
treed67ad1453f9380f549d880e5ffbc43df8ba63828 /intl/plural.c
parent80f3bd30c7521091c1dea118603b20a76c2a180c (diff)
downloadidutils-d49b34302a70ad948ce9cbf5778b1b39adb4286d.tar.gz
idutils-d49b34302a70ad948ce9cbf5778b1b39adb4286d.tar.bz2
idutils-d49b34302a70ad948ce9cbf5778b1b39adb4286d.zip
Upgrade to gettext 0.16.1
Diffstat (limited to 'intl/plural.c')
-rw-r--r--intl/plural.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/intl/plural.c b/intl/plural.c
index 78a223d..5f73b40 100644
--- a/intl/plural.c
+++ b/intl/plural.c
@@ -19,7 +19,7 @@
#line 1 "plural.y"
/* Expression parsing for plural form selection.
- Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2003, 2005 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
This program is free software; you can redistribute it and/or modify it
@@ -37,10 +37,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
-/* The bison generated parser uses alloca. AIX 3 forces us to put this
- declaration at the beginning of the file. The declaration in bison's
- skeleton file comes too late. This must come before <config.h>
- because <config.h> may include arbitrary system headers. */
+/* For bison < 2.0, the bison generated parser uses alloca. AIX 3 forces us
+ to put this declaration at the beginning of the file. The declaration in
+ bison's skeleton file comes too late. This must come before <config.h>
+ because <config.h> may include arbitrary system headers.
+ This can go away once the AM_INTL_SUBDIR macro requires bison >= 2.0. */
#if defined _AIX && !defined __GNUC__
#pragma alloca
#endif
@@ -51,6 +52,7 @@
#include <stddef.h>
#include <stdlib.h>
+#include <string.h>
#include "plural-exp.h"
/* The main function generated by the parser is called __gettextparse,
@@ -62,7 +64,7 @@
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
#define YYPARSE_PARAM arg
-#line 49 "plural.y"
+#line 51 "plural.y"
#ifndef YYSTYPE
typedef union {
unsigned long int num;
@@ -72,7 +74,7 @@ typedef union {
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
-#line 55 "plural.y"
+#line 57 "plural.y"
/* Prototypes for local functions. */
static int yylex (YYSTYPE *lval, const char **pexp);
@@ -212,8 +214,8 @@ static const short yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
- 0, 150, 158, 162, 166, 170, 174, 178, 182, 186,
- 190, 194, 199
+ 0, 152, 160, 164, 168, 172, 176, 180, 184, 188,
+ 192, 196, 201
};
#endif
@@ -296,7 +298,7 @@ static const short yycheck[] =
#define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/home/haible/gnu/arch/linuxlibc6/share/bison/bison.simple"
+#line 3 "bison.simple"
/* Skeleton output parser for bison,
@@ -609,7 +611,7 @@ yystpcpy (yydest, yysrc)
# endif
#endif
-#line 315 "/home/haible/gnu/arch/linuxlibc6/share/bison/bison.simple"
+#line 315 "bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
@@ -1003,7 +1005,7 @@ yyreduce:
switch (yyn) {
case 1:
-#line 151 "plural.y"
+#line 153 "plural.y"
{
if (yyvsp[0].exp == NULL)
YYABORT;
@@ -1011,75 +1013,75 @@ case 1:
}
break;
case 2:
-#line 159 "plural.y"
+#line 161 "plural.y"
{
yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 3:
-#line 163 "plural.y"
+#line 165 "plural.y"
{
yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 4:
-#line 167 "plural.y"
+#line 169 "plural.y"
{
yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 5:
-#line 171 "plural.y"
+#line 173 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 6:
-#line 175 "plural.y"
+#line 177 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 7:
-#line 179 "plural.y"
+#line 181 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 8:
-#line 183 "plural.y"
+#line 185 "plural.y"
{
yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
}
break;
case 9:
-#line 187 "plural.y"
+#line 189 "plural.y"
{
yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
}
break;
case 10:
-#line 191 "plural.y"
+#line 193 "plural.y"
{
yyval.exp = new_exp_0 (var);
}
break;
case 11:
-#line 195 "plural.y"
+#line 197 "plural.y"
{
if ((yyval.exp = new_exp_0 (num)) != NULL)
yyval.exp->val.num = yyvsp[0].num;
}
break;
case 12:
-#line 200 "plural.y"
+#line 202 "plural.y"
{
yyval.exp = yyvsp[-1].exp;
}
break;
}
-#line 705 "/home/haible/gnu/arch/linuxlibc6/share/bison/bison.simple"
+#line 705 "bison.simple"
yyvsp -= yylen;
@@ -1310,7 +1312,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 205 "plural.y"
+#line 207 "plural.y"
void