~ubuntu-branches/ubuntu/hardy/gnupg2/hardy

« back to all changes in this revision

Viewing changes to intl/plural.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia, Michael Bienia, Kees Cook
  • Date: 2006-12-07 00:28:23 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20061207002823-0i7ittrpmsm1nv0i
Tags: 2.0.1-0ubuntu1
[ Michael Bienia ]
* New upstream version.
* Remaining changes:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).
* g10/encr-data.c: remotely controllable function pointer (CVE-2006-6235)
* debian/control: add libcurl3-gnutls-dev to build-depends 
  (Closes Ubuntu: #62864)

[ Kees Cook ]
* debian/rules: include doc/ files as done with gnupg

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#line 1 "plural.y"
20
20
 
21
21
/* Expression parsing for plural form selection.
22
 
   Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
 
22
   Copyright (C) 2000-2001, 2003, 2005 Free Software Foundation, Inc.
23
23
   Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
24
24
 
25
25
   This program is free software; you can redistribute it and/or modify it
34
34
 
35
35
   You should have received a copy of the GNU Library General Public
36
36
   License along with this program; if not, write to the Free Software
37
 
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 
37
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
38
38
   USA.  */
39
39
 
40
 
/* The bison generated parser uses alloca.  AIX 3 forces us to put this
41
 
   declaration at the beginning of the file.  The declaration in bison's
42
 
   skeleton file comes too late.  This must come before <config.h>
43
 
   because <config.h> may include arbitrary system headers.  */
 
40
/* For bison < 2.0, the bison generated parser uses alloca.  AIX 3 forces us
 
41
   to put this declaration at the beginning of the file.  The declaration in
 
42
   bison's skeleton file comes too late.  This must come before <config.h>
 
43
   because <config.h> may include arbitrary system headers.
 
44
   This can go away once the AM_INTL_SUBDIR macro requires bison >= 2.0.  */
44
45
#if defined _AIX && !defined __GNUC__
45
46
 #pragma alloca
46
47
#endif
51
52
 
52
53
#include <stddef.h>
53
54
#include <stdlib.h>
 
55
#include <string.h>
54
56
#include "plural-exp.h"
55
57
 
56
58
/* The main function generated by the parser is called __gettextparse,
62
64
#define YYLEX_PARAM     &((struct parse_args *) arg)->cp
63
65
#define YYPARSE_PARAM   arg
64
66
 
65
 
#line 49 "plural.y"
 
67
#line 51 "plural.y"
66
68
#ifndef YYSTYPE
67
69
typedef union {
68
70
  unsigned long int num;
72
74
# define YYSTYPE yystype
73
75
# define YYSTYPE_IS_TRIVIAL 1
74
76
#endif
75
 
#line 55 "plural.y"
 
77
#line 57 "plural.y"
76
78
 
77
79
/* Prototypes for local functions.  */
78
80
static int yylex (YYSTYPE *lval, const char **pexp);
212
214
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
213
215
static const short yyrline[] =
214
216
{
215
 
       0,   150,   158,   162,   166,   170,   174,   178,   182,   186,
216
 
     190,   194,   199
 
217
       0,   152,   160,   164,   168,   172,   176,   180,   184,   188,
 
218
     192,   196,   201
217
219
};
218
220
#endif
219
221
 
296
298
#define YYPURE 1
297
299
 
298
300
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
299
 
#line 3 "/usr/local/share/bison/bison.simple"
 
301
#line 3 "bison.simple"
300
302
 
301
303
/* Skeleton output parser for bison,
302
304
 
609
611
# endif
610
612
#endif
611
613
 
612
 
#line 315 "/usr/local/share/bison/bison.simple"
 
614
#line 315 "bison.simple"
613
615
 
614
616
 
615
617
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
1003
1005
  switch (yyn) {
1004
1006
 
1005
1007
case 1:
1006
 
#line 151 "plural.y"
 
1008
#line 153 "plural.y"
1007
1009
{
1008
1010
            if (yyvsp[0].exp == NULL)
1009
1011
              YYABORT;
1011
1013
          }
1012
1014
    break;
1013
1015
case 2:
1014
 
#line 159 "plural.y"
 
1016
#line 161 "plural.y"
1015
1017
{
1016
1018
            yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
1017
1019
          }
1018
1020
    break;
1019
1021
case 3:
1020
 
#line 163 "plural.y"
 
1022
#line 165 "plural.y"
1021
1023
{
1022
1024
            yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
1023
1025
          }
1024
1026
    break;
1025
1027
case 4:
1026
 
#line 167 "plural.y"
 
1028
#line 169 "plural.y"
1027
1029
{
1028
1030
            yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
1029
1031
          }
1030
1032
    break;
1031
1033
case 5:
1032
 
#line 171 "plural.y"
 
1034
#line 173 "plural.y"
1033
1035
{
1034
1036
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1035
1037
          }
1036
1038
    break;
1037
1039
case 6:
1038
 
#line 175 "plural.y"
 
1040
#line 177 "plural.y"
1039
1041
{
1040
1042
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1041
1043
          }
1042
1044
    break;
1043
1045
case 7:
1044
 
#line 179 "plural.y"
 
1046
#line 181 "plural.y"
1045
1047
{
1046
1048
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1047
1049
          }
1048
1050
    break;
1049
1051
case 8:
1050
 
#line 183 "plural.y"
 
1052
#line 185 "plural.y"
1051
1053
{
1052
1054
            yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
1053
1055
          }
1054
1056
    break;
1055
1057
case 9:
1056
 
#line 187 "plural.y"
 
1058
#line 189 "plural.y"
1057
1059
{
1058
1060
            yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
1059
1061
          }
1060
1062
    break;
1061
1063
case 10:
1062
 
#line 191 "plural.y"
 
1064
#line 193 "plural.y"
1063
1065
{
1064
1066
            yyval.exp = new_exp_0 (var);
1065
1067
          }
1066
1068
    break;
1067
1069
case 11:
1068
 
#line 195 "plural.y"
 
1070
#line 197 "plural.y"
1069
1071
{
1070
1072
            if ((yyval.exp = new_exp_0 (num)) != NULL)
1071
1073
              yyval.exp->val.num = yyvsp[0].num;
1072
1074
          }
1073
1075
    break;
1074
1076
case 12:
1075
 
#line 200 "plural.y"
 
1077
#line 202 "plural.y"
1076
1078
{
1077
1079
            yyval.exp = yyvsp[-1].exp;
1078
1080
          }
1079
1081
    break;
1080
1082
}
1081
1083
 
1082
 
#line 705 "/usr/local/share/bison/bison.simple"
 
1084
#line 705 "bison.simple"
1083
1085
 
1084
1086
 
1085
1087
  yyvsp -= yylen;
1310
1312
#endif
1311
1313
  return yyresult;
1312
1314
}
1313
 
#line 205 "plural.y"
 
1315
#line 207 "plural.y"
1314
1316
 
1315
1317
 
1316
1318
void