Import and merge Wine-20041201
Added: trunk/reactos/lib/msi/
Added: trunk/reactos/lib/msi/Makefile
Added: trunk/reactos/lib/msi/Makefile.ros-template
Modified: trunk/reactos/lib/msi/action.c
Added: trunk/reactos/lib/msi/cond.tab.c
Added: trunk/reactos/lib/msi/cond.tab.h
Modified: trunk/reactos/lib/msi/msi.c
Modified: trunk/reactos/lib/msi/msiquery.c
Modified: trunk/reactos/lib/msi/record.c
Added: trunk/reactos/lib/msi/sql.tab.c
Added: trunk/reactos/lib/msi/sql.tab.h
Modified: trunk/reactos/lib/msi/sql.y
Modified: trunk/reactos/lib/msi/suminfo.c
Modified: trunk/reactos/lib/msi/table.c
_____
Copied: trunk/reactos/lib/msi (from rev 12568,
vendor/wine/dlls/msi/current)
_____
Added: trunk/reactos/lib/msi/Makefile
--- vendor/wine/dlls/msi/current/Makefile 2004-12-31 15:10:26 UTC
(rev 12568)
+++ trunk/reactos/lib/msi/Makefile 2004-12-31 15:11:31 UTC (rev
12569)
@@ -0,0 +1,9 @@
+# $Id: Makefile 11877 2004-11-30 19:10:50Z jimtabor $
+
+PATH_TO_TOP = ../..
+
+TARGET_TYPE = winedll
+
+include $(PATH_TO_TOP)/rules.mak
+
+include $(TOOLS_PATH)/helper.mk
_____
Added: trunk/reactos/lib/msi/Makefile.ros-template
--- vendor/wine/dlls/msi/current/Makefile.ros-template 2004-12-31
15:10:26 UTC (rev 12568)
+++ trunk/reactos/lib/msi/Makefile.ros-template 2004-12-31 15:11:31 UTC
(rev 12569)
@@ -0,0 +1,39 @@
+# $Id: Makefile.ros-template
+
+TARGET_NAME = msi
+
+TARGET_OBJECTS = @C_SRCS@ @EXTRA_OBJS@
+
+TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__
+
+TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a wine_unicode.a
ntdll.a
+
+TARGET_BASE = $(TARGET_BASE_LIB_WINMM)
+
+TARGET_RC_SRCS = @RC_SRCS@
+TARGET_RC_BINSRC = @RC_BINSRC@
+TARGET_RC_BINARIES = @RC_BINARIES@
+
+#TARGET_CLEAN = *.tab.c *.tab.h
+
+default: all
+
+DEP_OBJECTS = $(TARGET_OBJECTS)
+
+include $(TOOLS_PATH)/depend.mk
+
+#
+# Optional use of bison, this will allow independent building from
+# Wine.
+#
+# Bison is requiered for building msi.dll. If MingW32 for windows,
+# download bison from
http://gnuwin32.sourceforge.net/
+# Make sure bison.exe is placed in your command path for
execution.
+#
+#
+
+#sql.tab.c sql.tab.h: sql.y
+# bison -p SQL_ -d ./sql.y -o sql.tab.c
+
+#cond.tab.c cond.tab.h: cond.y
+# bison -p COND_ -d ./cond.y -o cond.tab.c
_____
Modified: trunk/reactos/lib/msi/action.c
--- vendor/wine/dlls/msi/current/action.c 2004-12-31 15:10:26 UTC
(rev 12568)
+++ trunk/reactos/lib/msi/action.c 2004-12-31 15:11:31 UTC (rev
12569)
@@ -29,6 +29,7 @@
#include <stdarg.h>
#include <stdio.h>
+#include <fcntl.h>
#define COBJMACROS
#include "windef.h"
@@ -39,7 +40,7 @@
#include "fdi.h"
#include "msi.h"
#include "msiquery.h"
-#include "msvcrt/fcntl.h"
+//#include "msvcrt/fcntl.h"
#include "objbase.h"
#include "objidl.h"
#include "msipriv.h"
_____
Added: trunk/reactos/lib/msi/cond.tab.c
--- vendor/wine/dlls/msi/current/cond.tab.c 2004-12-31 15:10:26 UTC
(rev 12568)
+++ trunk/reactos/lib/msi/cond.tab.c 2004-12-31 15:11:31 UTC (rev
12569)
@@ -0,0 +1,2022 @@
+/* A Bison parser, made from ./cond.y
+ by GNU bison 1.35. */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define yyparse COND_parse
+#define yylex COND_lex
+#define yyerror COND_error
+#define yylval COND_lval
+#define yychar COND_char
+#define yydebug COND_debug
+#define yynerrs COND_nerrs
+# define COND_SPACE 257
+# define COND_EOF 258
+# define COND_OR 259
+# define COND_AND 260
+# define COND_NOT 261
+# define COND_LT 262
+# define COND_GT 263
+# define COND_EQ 264
+# define COND_LPAR 265
+# define COND_RPAR 266
+# define COND_TILDA 267
+# define COND_PERCENT 268
+# define COND_DOLLARS 269
+# define COND_QUESTION 270
+# define COND_AMPER 271
+# define COND_EXCLAM 272
+# define COND_IDENT 273
+# define COND_NUMBER 274
+# define COND_LITER 275
+# define COND_ERROR 276
+
+#line 1 "./cond.y"
+
+
+/*
+ * Implementation of the Microsoft Installer (msi.dll)
+ *
+ * Copyright 2003 Mike McCormack for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
+ */
+
+#include "config.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#include "msi.h"
+#include "msiquery.h"
+#include "msipriv.h"
+
+#define YYLEX_PARAM info
+#define YYPARSE_PARAM info
+
+static int COND_error(char *str);
+
+WINE_DEFAULT_DEBUG_CHANNEL(msi);
+
+typedef struct tag_yyinput
+{
+ MSIPACKAGE *package;
+ LPCWSTR str;
+ INT n;
+ MSICONDITION result;
+} COND_input;
+
+struct cond_str {
+ LPCWSTR data;
+ INT len;
+};
+
+static LPWSTR COND_GetString( struct cond_str *str );
+static LPWSTR COND_GetLiteral( struct cond_str *str );
+static int COND_lex( void *COND_lval, COND_input *info);
+
+typedef INT (*comp_int)(INT a, INT b);
+typedef INT (*comp_str)(LPWSTR a, LPWSTR b, BOOL caseless);
+typedef INT (*comp_m1)(LPWSTR a,int b);
+typedef INT (*comp_m2)(int a,LPWSTR b);
+
+static INT comp_lt_i(INT a, INT b);
+static INT comp_gt_i(INT a, INT b);
+static INT comp_le_i(INT a, INT b);
+static INT comp_ge_i(INT a, INT b);
+static INT comp_eq_i(INT a, INT b);
+static INT comp_ne_i(INT a, INT b);
+static INT comp_bitand(INT a, INT b);
+static INT comp_highcomp(INT a, INT b);
+static INT comp_lowcomp(INT a, INT b);
+
+static INT comp_eq_s(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_ne_s(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_lt_s(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_gt_s(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_le_s(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_ge_s(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_substring(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_start(LPWSTR a, LPWSTR b, BOOL casless);
+static INT comp_end(LPWSTR a, LPWSTR b, BOOL casless);
+
+static INT comp_eq_m1(LPWSTR a, INT b);
+static INT comp_ne_m1(LPWSTR a, INT b);
+static INT comp_lt_m1(LPWSTR a, INT b);
+static INT comp_gt_m1(LPWSTR a, INT b);
+static INT comp_le_m1(LPWSTR a, INT b);
+static INT comp_ge_m1(LPWSTR a, INT b);
+
+static INT comp_eq_m2(INT a, LPWSTR b);
+static INT comp_ne_m2(INT a, LPWSTR b);
+static INT comp_lt_m2(INT a, LPWSTR b);
+static INT comp_gt_m2(INT a, LPWSTR b);
+static INT comp_le_m2(INT a, LPWSTR b);
+static INT comp_ge_m2(INT a, LPWSTR b);
+
+
+#line 105 "./cond.y"
+#ifndef YYSTYPE
+typedef union
+{
+ struct cond_str str;
+ LPWSTR string;
+ INT value;
+ comp_int fn_comp_int;
+ comp_str fn_comp_str;
+ comp_m1 fn_comp_m1;
+ comp_m2 fn_comp_m2;
+} yystype;
+# define YYSTYPE yystype
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+
+
+#define YYFINAL 74
+#define YYFLAG -32768
+#define YYNTBASE 23
+
+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
+#define YYTRANSLATE(x) ((unsigned)(x) <= 276 ? yytranslate[x] : 39)
+
+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
+static const char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2,
2,
+ 2, 2, 2, 2, 2, 2, 1, 3, 4,
5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14,
15,
+ 16, 17, 18, 19, 20, 21, 22
+};
+
+#if YYDEBUG
+static const short yyprhs[] =
+{
+ 0, 0, 2, 4, 8, 10, 14, 16, 19,
21,
+ 23, 27, 31, 36, 40, 44, 48, 50, 53,
55,
+ 57, 60, 63, 66, 69, 72, 74, 77, 79,
81,
+ 84, 87, 90, 93, 96, 98, 101, 103, 105,
108,
+ 111, 114, 117, 120, 122, 125, 127, 129, 132,
135,
+ 138, 141, 144, 146, 148, 150, 152, 154, 157,
160,
+ 163, 166, 168, 171, 173
+};
+static const short yyrhs[] =
+{
+ 24, 0, 25, 0, 25, 5, 24, 0, 26,
0,
+ 25, 6, 26, 0, 27, 0, 7, 27, 0,
32,
+ 0, 33, 0, 32, 28, 32, 0, 33, 29,
33,
+ 0, 33, 13, 29, 33, 0, 33, 30, 32,
0,
+ 32, 31, 33, 0, 11, 24, 12, 0, 10,
0,
+ 8, 9, 0, 8, 0, 9, 0, 8, 10,
0,
+ 9, 10, 0, 9, 8, 0, 8, 8, 0,
9,
+ 9, 0, 10, 0, 8, 9, 0, 8, 0,
9,
+ 0, 8, 10, 0, 9, 10, 0, 9, 8,
0,
+ 8, 8, 0, 9, 9, 0, 10, 0, 8,
9,
+ 0, 8, 0, 9, 0, 8, 10, 0, 9,
10,
+ 0, 9, 8, 0, 8, 8, 0, 9, 9,
0,
+ 10, 0, 8, 9, 0, 8, 0, 9, 0,
8,
+ 10, 0, 9, 10, 0, 9, 8, 0, 8,
8,
+ 0, 9, 9, 0, 35, 0, 38, 0, 36,
0,
+ 34, 0, 21, 0, 15, 37, 0, 16, 37,
0,
+ 17, 37, 0, 18, 37, 0, 37, 0, 14,
37,
+ 0, 19, 0, 20, 0
+};
+
+#endif
+
+#if YYDEBUG
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const short yyrline[] =
+{
+ 0, 135, 143, 148, 154, 159, 165, 170, 177,
182,
+ 186, 190, 194, 198, 202, 206, 212, 218, 222,
226,
+ 230, 234, 239, 243, 247, 253, 259, 263, 267,
271,
+ 275, 280, 284, 288, 294, 300, 304, 308, 312,
316,
+ 321, 325, 329, 335, 341, 345, 349, 353, 357,
362,
+ 366, 370, 376, 381, 387, 392, 398, 407, 417,
426,
+ 435, 446, 462, 475, 484
+};
+#endif
+
+
+#if (YYDEBUG) || defined YYERROR_VERBOSE
+
+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
+static const char *const yytname[] =
+{
+ "$", "error", "$undefined.", "COND_SPACE",
"COND_EOF", "COND_OR",
+ "COND_AND", "COND_NOT", "COND_LT", "COND_GT",
"COND_EQ", "COND_LPAR",
+ "COND_RPAR", "COND_TILDA", "COND_PERCENT",
"COND_DOLLARS",
+ "COND_QUESTION", "COND_AMPER", "COND_EXCLAM",
"COND_IDENT",
+ "COND_NUMBER", "COND_LITER", "COND_ERROR",
"condition", "expression",
+ "boolean_term", "boolean_factor", "term",
"comp_op_i", "comp_op_s",
+ "comp_op_m1", "comp_op_m2", "value_i",
"value_s", "literal",
"symbol_i",
+ "symbol_s", "identifier", "integer", 0
+};
+#endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const short yyr1[] =
+{
+ 0, 23, 24, 24, 25, 25, 26, 26, 27,
27,
+ 27, 27, 27, 27, 27, 27, 28, 28, 28,
28,
+ 28, 28, 28, 28, 28, 29, 29, 29, 29,
29,
+ 29, 29, 29, 29, 30, 30, 30, 30, 30,
30,
+ 30, 30, 30, 31, 31, 31, 31, 31, 31,
31,
+ 31, 31, 32, 32, 33, 33, 34, 35, 35,
35,
+ 35, 36, 36, 37, 38
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule
YYN. */
+static const short yyr2[] =
+{
+ 0, 1, 1, 3, 1, 3, 1, 2, 1,
1,
+ 3, 3, 4, 3, 3, 3, 1, 2, 1,
1,
+ 2, 2, 2, 2, 2, 1, 2, 1, 1,
2,
+ 2, 2, 2, 2, 1, 2, 1, 1, 2,
2,
+ 2, 2, 2, 1, 2, 1, 1, 2, 2,
2,
+ 2, 2, 1, 1, 1, 1, 1, 2, 2,
2,
+ 2, 1, 2, 1, 1
+};
+
+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+ doesn't specify something else to do. Zero means the default is an
+ error. */
+static const short yydefact[] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 63,
64,
+ 56, 1, 2, 4, 6, 8, 9, 55, 52,
54,
+ 61, 53, 7, 0, 62, 57, 58, 59, 60,
0,
+ 0, 18, 19, 16, 0, 0, 36, 37, 34,
0,
+ 0, 0, 15, 3, 5, 23, 17, 20, 22,
24,
+ 21, 10, 14, 41, 35, 38, 40, 42, 39,
27,
+ 28, 25, 0, 11, 13, 32, 26, 29, 31,
33,
+ 30, 12, 0, 0, 0
+};
+
+static const short yydefgoto[] =
+{
+ 72, 11, 12, 13, 14, 34, 40, 41, 35,
15,
+ 16, 17, 18, 19, 20, 21
+};
+
+static const short yypact[] =
+{
+ -5, 50, -5, -12, -12, -12, -12,
-12,-32768,-32768,
+ -32768,-32768, -2,-32768,-32768, 48,
123,-32768,-32768,-32768,
+ -32768,-32768,-32768, -4,-32768,-32768,-32768,-32768,-32768,
-5,
+ -5, 10, 24, 33, 110, 58, 27, 41, 59,
135,
+ 58, 110,-32768,-32768,-32768, 62, 68, 71, 72,
80,
+ 81,-32768,-32768, 84, 90, 93, 94, 102, 103,
138,
+ 141,-32768,
58,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+ -32768,-32768, 17, 21,-32768
+};
+
+static const short yypgoto[] =
+{
+ -32768, -1,-32768, -8, 25,-32768, -14,-32768,-32768,
-11,
+ -35,-32768,-32768,-32768, 134,-32768
+};
+
+
+#define YYLAST 151
+
+
+static const short yytable[] =
+{
+ 52, 23, 1, 29, 30, 63, 2, 8, 42,
3,
+ 4, 5, 6, 7, 8, 9, 10, 73, 45,
46,
+ 47, 74, 44, 51, -45, 62, 22, 71, 43,
-45,
+ 64, -45, 48, 49, 50, 53, 54, 55, -46,
0,
+ 0, -27, 0, -46, 0, -46, -27, -43, -27,
56,
+ 57, 58, -43, 0, -43, -28, 31, 32, 33,
0,
+ -28, 2, -28, 0, 3, 4, 5, 6, 7,
8,
+ 9, 10, 3, -25, 0, 0, -50, 8, -25,
10,
+ -25, -50, -44, -50, 0, -47, -49, -44, 0,
-44,
+ -47, -49, -47, -49, -51, -48, 0, 0, -32,
-51,
+ -48, -51, -48, -32, -26, -32, 0, -29, -31,
-26,
+ 0, -26, -29, -31, -29, -31, -33, -30, 0,
0,
+ 0, -33, -30, -33, -30, 4, 5, 6, 7,
0,
+ 9, 36, 37, 38, 0, 0, 39, 24, 25,
26,
+ 27, 28, 0, 59, 60, 61, 65, 66, 67,
68,
+ 69, 70
+};
+
+static const short yycheck[] =
+{
+ 35, 2, 7, 5, 6, 40, 11, 19, 12,
14,
+ 15, 16, 17, 18, 19, 20, 21, 0, 8,
9,
+ 10, 0, 30, 34, 14, 39, 1, 62, 29,
19,
+ 41, 21, 8, 9, 10, 8, 9, 10, 14,
-1,
+ -1, 14, -1, 19, -1, 21, 19, 14, 21,
8,
+ 9, 10, 19, -1, 21, 14, 8, 9, 10,
-1,
+ 19, 11, 21, -1, 14, 15, 16, 17, 18,
19,
+ 20, 21, 14, 14, -1, -1, 14, 19, 19,
21,
+ 21, 19, 14, 21, -1, 14, 14, 19, -1,
21,
+ 19, 19, 21, 21, 14, 14, -1, -1, 14,
19,
+ 19, 21, 21, 19, 14, 21, -1, 14, 14,
19,
+ -1, 21, 19, 19, 21, 21, 14, 14, -1,
-1,
+ -1, 19, 19, 21, 21, 15, 16, 17, 18,
-1,
+ 20, 8, 9, 10, -1, -1, 13, 3, 4,
5,
+ 6, 7, -1, 8, 9, 10, 8, 9, 10,
8,
+ 9, 10
+};
+#define YYPURE 1
+
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/share/bison/bison.simple"
+
+/* Skeleton output parser for bison,
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU 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, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* This is the parser code that is written into each bison parser when
+ the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
+
+/* The parser invokes alloca or malloc; define the necessary symbols.
*/
+
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
+# else
+# ifndef YYSTACK_USE_ALLOCA
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC malloc
+# define YYSTACK_FREE free
+# endif
+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short yyss;
+ YYSTYPE yyvs;
+# if YYLSP_NEEDED
+ YYLTYPE yyls;
+# endif
+};
+
+/* The size of the maximum gap between one aligned stack and the next.
*/
+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# if YYLSP_NEEDED
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))
\
+ + 2 * YYSTACK_GAP_MAX)
+# else
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE))
\
+ + YYSTACK_GAP_MAX)
+# endif
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number
of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack)
\
+ do
\
+ {
\
+ YYSIZE_T yynewbytes;
\
+ YYCOPY (&yyptr->Stack, Stack, yysize);
\
+ Stack = &yyptr->Stack;
\
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;
\
+ yyptr += yynewbytes / sizeof (*yyptr);
\
+ }
\
+ while (0)
+
+#endif
+
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token);
\
+ yylval = (Value);
\
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror ("syntax error: cannot back up");
\
+ YYERROR; \
+ } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
+ are run).
+
+ When YYLLOC_DEFAULT is run, CURRENT is set the location of the
+ first token. By default, to implement support for ranges, extend
+ its range to the last symbol. */
+
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ Current.last_line = Rhs[N].last_line; \
+ Current.last_column = Rhs[N].last_column;
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#if YYPURE
+# if YYLSP_NEEDED
+# ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
+# else
+# define YYLEX yylex (&yylval, &yylloc)
+# endif
+# else /* !YYLSP_NEEDED */
+# ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+# else
+# define YYLEX yylex (&yylval)
+# endif
+# endif /* !YYLSP_NEEDED */
+#else /* !YYPURE */
+# define YYLEX yylex ()
+#endif /* !YYPURE */
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+#endif /* !YYDEBUG */
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#if YYMAXDEPTH == 0
+# undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+#ifdef YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined
(_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0'
in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+#endif
+
+#line 315 "/usr/share/bison/bison.simple"
+
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be
passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+# define YYPARSE_PARAM_DECL
+# else
+# define YYPARSE_PARAM_ARG YYPARSE_PARAM
+# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+# endif
+#else /* !YYPARSE_PARAM */
+# define YYPARSE_PARAM_ARG
+# define YYPARSE_PARAM_DECL
+#endif /* !YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+# ifdef YYPARSE_PARAM
+int yyparse (void *);
+# else
+int yyparse (void);
+# endif
+#endif
+
+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
+ variables are global, or local to YYPARSE. */
+
+#define YY_DECL_NON_LSP_VARIABLES \
+/* The lookahead symbol. */ \
+int yychar; \
+ \
+/* The semantic value of the lookahead symbol. */ \
+YYSTYPE yylval; \
+ \
+/* Number of parse errors so far. */ \
+int yynerrs;
+
+#if YYLSP_NEEDED
+# define YY_DECL_VARIABLES \
+YY_DECL_NON_LSP_VARIABLES \
+ \
+/* Location data for the lookahead symbol. */ \
+YYLTYPE yylloc;
+#else
+# define YY_DECL_VARIABLES \
+YY_DECL_NON_LSP_VARIABLES
+#endif
+
+
+/* If nonreentrant, generate the variables here. */
+
+#if !YYPURE
+YY_DECL_VARIABLES
+#endif /* !YYPURE */
+
+int
+yyparse (YYPARSE_PARAM_ARG)
+ YYPARSE_PARAM_DECL
+{
+ /* If reentrant, generate the variables here. */
+#if YYPURE
+ YY_DECL_VARIABLES
+#endif /* !YYPURE */
+
+ register int yystate;
+ register int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Lookahead token as an internal (translated) token number. */
+ int yychar1 = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
+
+#if YYLSP_NEEDED
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+#endif
+
+#if YYLSP_NEEDED
+# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+# define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+#if YYLSP_NEEDED
+ YYLTYPE yyloc;
+#endif
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+#if YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Get the current used size of the three stacks, in elements.
*/
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. */
+# if YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
+ &yystacksize);
+ yyls = yyls1;
+# else
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+# endif
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyoverflowlab;
+# else
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ goto yyoverflowlab;
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyoverflowlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+# if YYLSP_NEEDED
+ YYSTACK_RELOCATE (yyls);
+# endif
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+#if YYLSP_NEEDED
+ yylsp = yyls + yysize - 1;
+#endif
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
[truncated at 1000 lines; 3662 more skipped]