]> git.deb.at Git - pkg/abook.git/blobdiff - intl/plural.y
Autotools update to autoconf-2.68 / automake-1.11 / gettextize 0.18.1.
[pkg/abook.git] / intl / plural.y
index 4d33bd7c71667eb810c3eecba56950a3d867c278..ec36a09b8d786b7d921542d8933f904419e04b85 100644 (file)
@@ -1,6 +1,6 @@
 %{
 /* Expression parsing for plural form selection.
-   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2000-2001, 2003, 2005-2006 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
 
    You should have received a copy of the GNU Library General Public
    License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   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
@@ -32,6 +33,7 @@
 
 #include <stddef.h>
 #include <stdlib.h>
+#include <string.h>
 #include "plural-exp.h"
 
 /* The main function generated by the parser is called __gettextparse,
@@ -48,7 +50,7 @@
 
 %union {
   unsigned long int num;
-  enum operator op;
+  enum expression_operator op;
   struct expression *exp;
 }
 
@@ -60,7 +62,8 @@ static void yyerror (const char *str);
 /* Allocation of expressions.  */
 
 static struct expression *
-new_exp (int nargs, enum operator op, struct expression * const *args)
+new_exp (int nargs, enum expression_operator op,
+        struct expression * const *args)
 {
   int i;
   struct expression *newp;
@@ -89,13 +92,13 @@ new_exp (int nargs, enum operator op, struct expression * const *args)
 }
 
 static inline struct expression *
-new_exp_0 (enum operator op)
+new_exp_0 (enum expression_operator op)
 {
   return new_exp (0, op, NULL);
 }
 
 static inline struct expression *
-new_exp_1 (enum operator op, struct expression *right)
+new_exp_1 (enum expression_operator op, struct expression *right)
 {
   struct expression *args[1];
 
@@ -104,7 +107,8 @@ new_exp_1 (enum operator op, struct expression *right)
 }
 
 static struct expression *
-new_exp_2 (enum operator op, struct expression *left, struct expression *right)
+new_exp_2 (enum expression_operator op, struct expression *left,
+          struct expression *right)
 {
   struct expression *args[2];
 
@@ -114,7 +118,7 @@ new_exp_2 (enum operator op, struct expression *left, struct expression *right)
 }
 
 static inline struct expression *
-new_exp_3 (enum operator op, struct expression *bexp,
+new_exp_3 (enum expression_operator op, struct expression *bexp,
           struct expression *tbranch, struct expression *fbranch)
 {
   struct expression *args[3];