mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-27 03:43:37 +08:00
widl: Update to current Wine version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
e98e24be8c
commit
95a2cf4b72
@ -1 +1 @@
|
||||
WIDL version 8.21
|
||||
WIDL version 9.0-rc2
|
||||
|
20
mingw-w64-tools/widl/configure
vendored
20
mingw-w64-tools/widl/configure
vendored
@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for widl 8.21.
|
||||
# Generated by GNU Autoconf 2.71 for widl 9.0-rc2.
|
||||
#
|
||||
# Report bugs to <mingw-w64-public@lists.sourceforge.net>.
|
||||
#
|
||||
@ -610,8 +610,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='widl'
|
||||
PACKAGE_TARNAME='widl'
|
||||
PACKAGE_VERSION='8.21'
|
||||
PACKAGE_STRING='widl 8.21'
|
||||
PACKAGE_VERSION='9.0-rc2'
|
||||
PACKAGE_STRING='widl 9.0-rc2'
|
||||
PACKAGE_BUGREPORT='mingw-w64-public@lists.sourceforge.net'
|
||||
PACKAGE_URL=''
|
||||
|
||||
@ -1319,7 +1319,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures widl 8.21 to adapt to many kinds of systems.
|
||||
\`configure' configures widl 9.0-rc2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@ -1391,7 +1391,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of widl 8.21:";;
|
||||
short | recursive ) echo "Configuration of widl 9.0-rc2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@ -1493,7 +1493,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
widl configure 8.21
|
||||
widl configure 9.0-rc2
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@ -1905,7 +1905,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by widl $as_me 8.21, which was
|
||||
It was created by widl $as_me 9.0-rc2, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@ -3295,7 +3295,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='widl'
|
||||
VERSION='8.21'
|
||||
VERSION='9.0-rc2'
|
||||
|
||||
|
||||
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
||||
@ -5789,7 +5789,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by widl $as_me 8.21, which was
|
||||
This file was extended by widl $as_me 9.0-rc2, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@ -5857,7 +5857,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
widl config.status 8.21
|
||||
widl config.status 9.0-rc2
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@ -1771,6 +1771,20 @@ typedef struct _WIN32_MEMORY_RANGE_ENTRY
|
||||
SIZE_T NumberOfBytes;
|
||||
} WIN32_MEMORY_RANGE_ENTRY, *PWIN32_MEMORY_RANGE_ENTRY;
|
||||
|
||||
typedef enum _MACHINE_ATTRIBUTES
|
||||
{
|
||||
UserEnabled = 0x00000001,
|
||||
KernelEnabled = 0x00000002,
|
||||
Wow64Container = 0x00000004,
|
||||
} MACHINE_ATTRIBUTES;
|
||||
|
||||
typedef struct _PROCESS_MACHINE_INFORMATION
|
||||
{
|
||||
USHORT ProcessMachine;
|
||||
USHORT Res0;
|
||||
MACHINE_ATTRIBUTES MachineAttributes;
|
||||
} PROCESS_MACHINE_INFORMATION;
|
||||
|
||||
typedef enum _PROCESS_INFORMATION_CLASS
|
||||
{
|
||||
ProcessMemoryPriority,
|
||||
@ -2274,6 +2288,7 @@ WINBASEAPI BOOL WINAPI GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR
|
||||
WINBASEAPI DWORD WINAPI GetProcessHeaps(DWORD,PHANDLE);
|
||||
WINBASEAPI DWORD WINAPI GetProcessId(HANDLE);
|
||||
WINBASEAPI DWORD WINAPI GetProcessIdOfThread(HANDLE);
|
||||
WINBASEAPI BOOL WINAPI GetProcessInformation(HANDLE,PROCESS_INFORMATION_CLASS,void*,DWORD);
|
||||
WINBASEAPI BOOL WINAPI GetProcessIoCounters(HANDLE,PIO_COUNTERS);
|
||||
WINBASEAPI BOOL WINAPI GetProcessPriorityBoost(HANDLE,PBOOL);
|
||||
WINBASEAPI BOOL WINAPI GetProcessShutdownParameters(LPDWORD,LPDWORD);
|
||||
|
@ -248,7 +248,6 @@ typedef unsigned int DWORD, *PDWORD, *LPDWORD;
|
||||
|
||||
#ifdef __WINESRC__
|
||||
#define WINE_NO_UNICODE_MACROS 1
|
||||
#define WINE_STRICT_PROTOTYPES 1
|
||||
#endif
|
||||
|
||||
#ifdef WINE_NO_UNICODE_MACROS
|
||||
@ -326,7 +325,7 @@ typedef HICON HCURSOR;
|
||||
|
||||
/* Callback function pointers types */
|
||||
|
||||
#ifdef WINE_STRICT_PROTOTYPES
|
||||
#ifndef WINE_NO_STRICT_PROTOTYPES
|
||||
typedef INT_PTR (CALLBACK *FARPROC)(void);
|
||||
typedef INT_PTR (CALLBACK *NEARPROC)(void);
|
||||
typedef INT_PTR (CALLBACK *PROC)(void);
|
||||
|
@ -51,16 +51,16 @@ extern "C" {
|
||||
#define NTAPI __stdcall
|
||||
#define FASTCALL __fastcall
|
||||
|
||||
#ifndef MIDL_PASS
|
||||
#ifndef DECLSPEC_IMPORT
|
||||
# if defined(_MSC_VER)
|
||||
# define DECLSPEC_IMPORT __declspec(dllimport)
|
||||
# elif defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
# define DECLSPEC_IMPORT __attribute__((dllimport))
|
||||
# elif defined(__GNUC__)
|
||||
# define DECLSPEC_IMPORT __attribute__((visibility ("hidden")))
|
||||
# else
|
||||
# define DECLSPEC_IMPORT DECLSPEC_HIDDEN
|
||||
# define DECLSPEC_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define DECLSPEC_IMPORT
|
||||
#endif
|
||||
|
||||
#ifndef DECLSPEC_NORETURN
|
||||
@ -193,16 +193,6 @@ extern "C" {
|
||||
# define DECLSPEC_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DECLSPEC_HIDDEN
|
||||
# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) || defined(__sun)
|
||||
# define DECLSPEC_HIDDEN
|
||||
# elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
||||
# define DECLSPEC_HIDDEN __attribute__((visibility ("hidden")))
|
||||
# else
|
||||
# define DECLSPEC_HIDDEN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
@ -6605,6 +6595,17 @@ typedef struct _SYSTEM_CPU_SET_INFORMATION
|
||||
} DUMMYUNIONNAME;
|
||||
} SYSTEM_CPU_SET_INFORMATION, *PSYSTEM_CPU_SET_INFORMATION;
|
||||
|
||||
typedef struct _SYSTEM_SUPPORTED_PROCESSOR_ARCHITECTURES_INFORMATION
|
||||
{
|
||||
DWORD Machine : 16;
|
||||
DWORD KernelMode : 1;
|
||||
DWORD UserMode : 1;
|
||||
DWORD Native : 1;
|
||||
DWORD Process : 1;
|
||||
DWORD WoW64Container : 1;
|
||||
DWORD ReservedZero0 : 11;
|
||||
} SYSTEM_SUPPORTED_PROCESSOR_ARCHITECTURES_INFORMATION;
|
||||
|
||||
/* Threadpool things */
|
||||
typedef DWORD TP_VERSION,*PTP_VERSION;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
/* A Bison parser, made by GNU Bison 3.8.2.46-9785. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2022 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
/* A Bison parser, made by GNU Bison 3.8.2.46-9785. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2022 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@ -49,7 +49,7 @@
|
||||
#define YYBISON 30802
|
||||
|
||||
/* Bison version string. */
|
||||
#define YYBISON_VERSION "3.8.2"
|
||||
#define YYBISON_VERSION "3.8.2.46-9785"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -516,7 +516,8 @@ typedef int yy_state_fast_t;
|
||||
|
||||
|
||||
#ifndef YY_ATTRIBUTE_PURE
|
||||
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
|
||||
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) \
|
||||
|| (defined __has_attribute && __has_attribute(__pure__))
|
||||
# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
|
||||
# else
|
||||
# define YY_ATTRIBUTE_PURE
|
||||
@ -524,7 +525,8 @@ typedef int yy_state_fast_t;
|
||||
#endif
|
||||
|
||||
#ifndef YY_ATTRIBUTE_UNUSED
|
||||
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
|
||||
# if (defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)) \
|
||||
|| (defined __has_attribute && __has_attribute(__unused__))
|
||||
# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
# else
|
||||
# define YY_ATTRIBUTE_UNUSED
|
||||
@ -1471,25 +1473,25 @@ yyreduce:
|
||||
case 4: /* preprocessor: tINCLUDE tDQSTRING tNL */
|
||||
#line 181 "tools/wrc/ppy.y"
|
||||
{ pp_do_include((yyvsp[-1].cptr), 1); }
|
||||
#line 1475 "tools/wrc/ppy.tab.c"
|
||||
#line 1477 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 5: /* preprocessor: tINCLUDE tIQSTRING tNL */
|
||||
#line 182 "tools/wrc/ppy.y"
|
||||
{ pp_do_include((yyvsp[-1].cptr), 0); }
|
||||
#line 1481 "tools/wrc/ppy.tab.c"
|
||||
#line 1483 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 6: /* preprocessor: tIF pp_expr tNL */
|
||||
#line 183 "tools/wrc/ppy.y"
|
||||
{ pp_next_if_state(boolean(&(yyvsp[-1].cval))); }
|
||||
#line 1487 "tools/wrc/ppy.tab.c"
|
||||
#line 1489 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 7: /* preprocessor: tIFDEF tIDENT tNL */
|
||||
#line 184 "tools/wrc/ppy.y"
|
||||
{ pp_next_if_state(pplookup((yyvsp[-1].cptr)) != NULL); free((yyvsp[-1].cptr)); }
|
||||
#line 1493 "tools/wrc/ppy.tab.c"
|
||||
#line 1495 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 8: /* preprocessor: tIFNDEF tIDENT tNL */
|
||||
@ -1514,7 +1516,7 @@ yyreduce:
|
||||
fprintf(stderr, "tIFNDEF: %s:%d: include_state=%d, include_ppp='%s', include_ifdepth=%d\n",
|
||||
pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth);
|
||||
}
|
||||
#line 1518 "tools/wrc/ppy.tab.c"
|
||||
#line 1520 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 9: /* preprocessor: tELIF pp_expr tNL */
|
||||
@ -1541,7 +1543,7 @@ yyreduce:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#line 1545 "tools/wrc/ppy.tab.c"
|
||||
#line 1547 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 10: /* preprocessor: tELSE tNL */
|
||||
@ -1570,7 +1572,7 @@ yyreduce:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#line 1574 "tools/wrc/ppy.tab.c"
|
||||
#line 1576 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 11: /* preprocessor: tENDIF tNL */
|
||||
@ -1592,19 +1594,19 @@ yyreduce:
|
||||
pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth);
|
||||
}
|
||||
}
|
||||
#line 1596 "tools/wrc/ppy.tab.c"
|
||||
#line 1598 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 12: /* preprocessor: tUNDEF tIDENT tNL */
|
||||
#line 268 "tools/wrc/ppy.y"
|
||||
{ pp_del_define((yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); }
|
||||
#line 1602 "tools/wrc/ppy.tab.c"
|
||||
#line 1604 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 13: /* preprocessor: tDEFINE opt_text tNL */
|
||||
#line 269 "tools/wrc/ppy.y"
|
||||
{ pp_add_define((yyvsp[-2].cptr), (yyvsp[-1].cptr)); free((yyvsp[-2].cptr)); free((yyvsp[-1].cptr)); }
|
||||
#line 1608 "tools/wrc/ppy.tab.c"
|
||||
#line 1610 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 14: /* preprocessor: tMACRO res_arg allmargs tMACROEND opt_mtexts tNL */
|
||||
@ -1612,67 +1614,67 @@ yyreduce:
|
||||
{
|
||||
pp_add_macro((yyvsp[-5].cptr), macro_args, nmacro_args, macro_variadic, (yyvsp[-1].mtext));
|
||||
}
|
||||
#line 1616 "tools/wrc/ppy.tab.c"
|
||||
#line 1618 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 15: /* preprocessor: tLINE tSINT tDQSTRING tNL */
|
||||
#line 273 "tools/wrc/ppy.y"
|
||||
{ if((yyvsp[-1].cptr)) fprintf(ppy_out, "# %d %s\n", (yyvsp[-2].sint) , (yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); }
|
||||
#line 1622 "tools/wrc/ppy.tab.c"
|
||||
#line 1624 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 16: /* preprocessor: tGCCLINE tSINT tDQSTRING tNL */
|
||||
#line 274 "tools/wrc/ppy.y"
|
||||
{ if((yyvsp[-1].cptr)) fprintf(ppy_out, "# %d %s\n", (yyvsp[-2].sint) , (yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); }
|
||||
#line 1628 "tools/wrc/ppy.tab.c"
|
||||
#line 1630 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 17: /* preprocessor: tGCCLINE tSINT tDQSTRING tSINT tNL */
|
||||
#line 276 "tools/wrc/ppy.y"
|
||||
{ if((yyvsp[-2].cptr)) fprintf(ppy_out, "# %d %s %d\n", (yyvsp[-3].sint), (yyvsp[-2].cptr), (yyvsp[-1].sint)); free((yyvsp[-2].cptr)); }
|
||||
#line 1634 "tools/wrc/ppy.tab.c"
|
||||
#line 1636 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 18: /* preprocessor: tGCCLINE tSINT tDQSTRING tSINT tSINT tNL */
|
||||
#line 278 "tools/wrc/ppy.y"
|
||||
{ if((yyvsp[-3].cptr)) fprintf(ppy_out, "# %d %s %d %d\n", (yyvsp[-4].sint) ,(yyvsp[-3].cptr), (yyvsp[-2].sint), (yyvsp[-1].sint)); free((yyvsp[-3].cptr)); }
|
||||
#line 1640 "tools/wrc/ppy.tab.c"
|
||||
#line 1642 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 19: /* preprocessor: tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tNL */
|
||||
#line 280 "tools/wrc/ppy.y"
|
||||
{ if((yyvsp[-4].cptr)) fprintf(ppy_out, "# %d %s %d %d %d\n", (yyvsp[-5].sint) ,(yyvsp[-4].cptr) ,(yyvsp[-3].sint) ,(yyvsp[-2].sint), (yyvsp[-1].sint)); free((yyvsp[-4].cptr)); }
|
||||
#line 1646 "tools/wrc/ppy.tab.c"
|
||||
#line 1648 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 20: /* preprocessor: tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL */
|
||||
#line 282 "tools/wrc/ppy.y"
|
||||
{ if((yyvsp[-5].cptr)) fprintf(ppy_out, "# %d %s %d %d %d %d\n", (yyvsp[-6].sint) ,(yyvsp[-5].cptr) ,(yyvsp[-4].sint) ,(yyvsp[-3].sint), (yyvsp[-2].sint), (yyvsp[-1].sint)); free((yyvsp[-5].cptr)); }
|
||||
#line 1652 "tools/wrc/ppy.tab.c"
|
||||
#line 1654 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 22: /* preprocessor: tERROR opt_text tNL */
|
||||
#line 284 "tools/wrc/ppy.y"
|
||||
{ ppy_error("#error directive: '%s'", (yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); }
|
||||
#line 1658 "tools/wrc/ppy.tab.c"
|
||||
#line 1660 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 23: /* preprocessor: tWARNING opt_text tNL */
|
||||
#line 285 "tools/wrc/ppy.y"
|
||||
{ ppy_warning("#warning directive: '%s'", (yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); }
|
||||
#line 1664 "tools/wrc/ppy.tab.c"
|
||||
#line 1666 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 24: /* preprocessor: tPRAGMA opt_text tNL */
|
||||
#line 286 "tools/wrc/ppy.y"
|
||||
{ fprintf(ppy_out, "#pragma %s\n", (yyvsp[-1].cptr) ? (yyvsp[-1].cptr) : ""); free((yyvsp[-1].cptr)); }
|
||||
#line 1670 "tools/wrc/ppy.tab.c"
|
||||
#line 1672 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 25: /* preprocessor: tPPIDENT opt_text tNL */
|
||||
#line 287 "tools/wrc/ppy.y"
|
||||
{ if(pedantic) ppy_warning("#ident ignored (arg: '%s')", (yyvsp[-1].cptr)); free((yyvsp[-1].cptr)); }
|
||||
#line 1676 "tools/wrc/ppy.tab.c"
|
||||
#line 1678 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 26: /* preprocessor: tRCINCLUDE tRCINCLUDEPATH */
|
||||
@ -1680,7 +1682,7 @@ yyreduce:
|
||||
{
|
||||
pp_do_include(strmake( "\"%s\"", (yyvsp[0].cptr) ),1);
|
||||
}
|
||||
#line 1684 "tools/wrc/ppy.tab.c"
|
||||
#line 1686 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 27: /* preprocessor: tRCINCLUDE tDQSTRING */
|
||||
@ -1688,109 +1690,109 @@ yyreduce:
|
||||
{
|
||||
pp_do_include((yyvsp[0].cptr),1);
|
||||
}
|
||||
#line 1692 "tools/wrc/ppy.tab.c"
|
||||
#line 1694 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 28: /* opt_text: %empty */
|
||||
#line 297 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = NULL; }
|
||||
#line 1698 "tools/wrc/ppy.tab.c"
|
||||
#line 1700 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 29: /* opt_text: text */
|
||||
#line 298 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = (yyvsp[0].cptr); }
|
||||
#line 1704 "tools/wrc/ppy.tab.c"
|
||||
#line 1706 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 30: /* text: tLITERAL */
|
||||
#line 301 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = (yyvsp[0].cptr); }
|
||||
#line 1710 "tools/wrc/ppy.tab.c"
|
||||
#line 1712 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 31: /* text: tDQSTRING */
|
||||
#line 302 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = (yyvsp[0].cptr); }
|
||||
#line 1716 "tools/wrc/ppy.tab.c"
|
||||
#line 1718 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 32: /* text: tSQSTRING */
|
||||
#line 303 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = (yyvsp[0].cptr); }
|
||||
#line 1722 "tools/wrc/ppy.tab.c"
|
||||
#line 1724 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 33: /* text: text tLITERAL */
|
||||
#line 304 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = merge_text((yyvsp[-1].cptr), (yyvsp[0].cptr)); }
|
||||
#line 1728 "tools/wrc/ppy.tab.c"
|
||||
#line 1730 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 34: /* text: text tDQSTRING */
|
||||
#line 305 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = merge_text((yyvsp[-1].cptr), (yyvsp[0].cptr)); }
|
||||
#line 1734 "tools/wrc/ppy.tab.c"
|
||||
#line 1736 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 35: /* text: text tSQSTRING */
|
||||
#line 306 "tools/wrc/ppy.y"
|
||||
{ (yyval.cptr) = merge_text((yyvsp[-1].cptr), (yyvsp[0].cptr)); }
|
||||
#line 1740 "tools/wrc/ppy.tab.c"
|
||||
#line 1742 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 36: /* res_arg: %empty */
|
||||
#line 309 "tools/wrc/ppy.y"
|
||||
{ macro_args = NULL; nmacro_args = 0; macro_variadic = 0; }
|
||||
#line 1746 "tools/wrc/ppy.tab.c"
|
||||
#line 1748 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 37: /* allmargs: %empty */
|
||||
#line 312 "tools/wrc/ppy.y"
|
||||
{ (yyval.sint) = 0; macro_args = NULL; nmacro_args = 0; macro_variadic = 0; }
|
||||
#line 1752 "tools/wrc/ppy.tab.c"
|
||||
#line 1754 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 38: /* allmargs: emargs */
|
||||
#line 313 "tools/wrc/ppy.y"
|
||||
{ (yyval.sint) = nmacro_args; }
|
||||
#line 1758 "tools/wrc/ppy.tab.c"
|
||||
#line 1760 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 39: /* emargs: margs */
|
||||
#line 316 "tools/wrc/ppy.y"
|
||||
{ (yyval.marg) = (yyvsp[0].marg); }
|
||||
#line 1764 "tools/wrc/ppy.tab.c"
|
||||
#line 1766 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 40: /* emargs: margs ',' tELLIPSIS */
|
||||
#line 317 "tools/wrc/ppy.y"
|
||||
{ macro_variadic = 1; }
|
||||
#line 1770 "tools/wrc/ppy.tab.c"
|
||||
#line 1772 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 41: /* emargs: tELLIPSIS */
|
||||
#line 318 "tools/wrc/ppy.y"
|
||||
{ macro_args = NULL; nmacro_args = 0; macro_variadic = 1; }
|
||||
#line 1776 "tools/wrc/ppy.tab.c"
|
||||
#line 1778 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 42: /* margs: margs ',' tIDENT */
|
||||
#line 321 "tools/wrc/ppy.y"
|
||||
{ (yyval.marg) = add_new_marg((yyvsp[0].cptr)); }
|
||||
#line 1782 "tools/wrc/ppy.tab.c"
|
||||
#line 1784 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 43: /* margs: tIDENT */
|
||||
#line 322 "tools/wrc/ppy.y"
|
||||
{ (yyval.marg) = add_new_marg((yyvsp[0].cptr)); }
|
||||
#line 1788 "tools/wrc/ppy.tab.c"
|
||||
#line 1790 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 44: /* opt_mtexts: %empty */
|
||||
#line 326 "tools/wrc/ppy.y"
|
||||
{ (yyval.mtext) = NULL; }
|
||||
#line 1794 "tools/wrc/ppy.tab.c"
|
||||
#line 1796 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 45: /* opt_mtexts: mtexts */
|
||||
@ -1799,43 +1801,43 @@ yyreduce:
|
||||
for((yyval.mtext) = (yyvsp[0].mtext); (yyval.mtext) && (yyval.mtext)->prev; (yyval.mtext) = (yyval.mtext)->prev)
|
||||
;
|
||||
}
|
||||
#line 1803 "tools/wrc/ppy.tab.c"
|
||||
#line 1805 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 46: /* mtexts: mtext */
|
||||
#line 333 "tools/wrc/ppy.y"
|
||||
{ (yyval.mtext) = (yyvsp[0].mtext); }
|
||||
#line 1809 "tools/wrc/ppy.tab.c"
|
||||
#line 1811 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 47: /* mtexts: mtexts mtext */
|
||||
#line 334 "tools/wrc/ppy.y"
|
||||
{ (yyval.mtext) = combine_mtext((yyvsp[-1].mtext), (yyvsp[0].mtext)); }
|
||||
#line 1815 "tools/wrc/ppy.tab.c"
|
||||
#line 1817 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 48: /* mtext: tLITERAL */
|
||||
#line 337 "tools/wrc/ppy.y"
|
||||
{ (yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text); }
|
||||
#line 1821 "tools/wrc/ppy.tab.c"
|
||||
#line 1823 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 49: /* mtext: tDQSTRING */
|
||||
#line 338 "tools/wrc/ppy.y"
|
||||
{ (yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text); }
|
||||
#line 1827 "tools/wrc/ppy.tab.c"
|
||||
#line 1829 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 50: /* mtext: tSQSTRING */
|
||||
#line 339 "tools/wrc/ppy.y"
|
||||
{ (yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text); }
|
||||
#line 1833 "tools/wrc/ppy.tab.c"
|
||||
#line 1835 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 51: /* mtext: tCONCAT */
|
||||
#line 340 "tools/wrc/ppy.y"
|
||||
{ (yyval.mtext) = new_mtext(NULL, 0, exp_concat); }
|
||||
#line 1839 "tools/wrc/ppy.tab.c"
|
||||
#line 1841 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 52: /* mtext: tSTRINGIZE tIDENT */
|
||||
@ -1847,7 +1849,7 @@ yyreduce:
|
||||
else
|
||||
(yyval.mtext) = new_mtext(NULL, mat, exp_stringize);
|
||||
}
|
||||
#line 1851 "tools/wrc/ppy.tab.c"
|
||||
#line 1853 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 53: /* mtext: tIDENT */
|
||||
@ -1859,203 +1861,203 @@ yyreduce:
|
||||
else if((yyvsp[0].cptr))
|
||||
(yyval.mtext) = new_mtext((yyvsp[0].cptr), 0, exp_text);
|
||||
}
|
||||
#line 1863 "tools/wrc/ppy.tab.c"
|
||||
#line 1865 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 54: /* pp_expr: tSINT */
|
||||
#line 357 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sint; (yyval.cval).val.si = (yyvsp[0].sint); }
|
||||
#line 1869 "tools/wrc/ppy.tab.c"
|
||||
#line 1871 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 55: /* pp_expr: tUINT */
|
||||
#line 358 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_uint; (yyval.cval).val.ui = (yyvsp[0].uint); }
|
||||
#line 1875 "tools/wrc/ppy.tab.c"
|
||||
#line 1877 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 56: /* pp_expr: tSLONG */
|
||||
#line 359 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_slong; (yyval.cval).val.sl = (yyvsp[0].slong); }
|
||||
#line 1881 "tools/wrc/ppy.tab.c"
|
||||
#line 1883 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 57: /* pp_expr: tULONG */
|
||||
#line 360 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_ulong; (yyval.cval).val.ul = (yyvsp[0].ulong); }
|
||||
#line 1887 "tools/wrc/ppy.tab.c"
|
||||
#line 1889 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 58: /* pp_expr: tSLONGLONG */
|
||||
#line 361 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sll; (yyval.cval).val.sll = (yyvsp[0].sll); }
|
||||
#line 1893 "tools/wrc/ppy.tab.c"
|
||||
#line 1895 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 59: /* pp_expr: tULONGLONG */
|
||||
#line 362 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_ull; (yyval.cval).val.ull = (yyvsp[0].ull); }
|
||||
#line 1899 "tools/wrc/ppy.tab.c"
|
||||
#line 1901 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 60: /* pp_expr: tDEFINED tIDENT */
|
||||
#line 363 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sint; (yyval.cval).val.si = pplookup((yyvsp[0].cptr)) != NULL; }
|
||||
#line 1905 "tools/wrc/ppy.tab.c"
|
||||
#line 1907 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 61: /* pp_expr: tDEFINED '(' tIDENT ')' */
|
||||
#line 364 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sint; (yyval.cval).val.si = pplookup((yyvsp[-1].cptr)) != NULL; }
|
||||
#line 1911 "tools/wrc/ppy.tab.c"
|
||||
#line 1913 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 62: /* pp_expr: tIDENT */
|
||||
#line 365 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sint; (yyval.cval).val.si = 0; }
|
||||
#line 1917 "tools/wrc/ppy.tab.c"
|
||||
#line 1919 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 63: /* pp_expr: pp_expr tLOGOR pp_expr */
|
||||
#line 366 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sint; (yyval.cval).val.si = boolean(&(yyvsp[-2].cval)) || boolean(&(yyvsp[0].cval)); }
|
||||
#line 1923 "tools/wrc/ppy.tab.c"
|
||||
#line 1925 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 64: /* pp_expr: pp_expr tLOGAND pp_expr */
|
||||
#line 367 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sint; (yyval.cval).val.si = boolean(&(yyvsp[-2].cval)) && boolean(&(yyvsp[0].cval)); }
|
||||
#line 1929 "tools/wrc/ppy.tab.c"
|
||||
#line 1931 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 65: /* pp_expr: pp_expr tEQ pp_expr */
|
||||
#line 368 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), ==); }
|
||||
#line 1935 "tools/wrc/ppy.tab.c"
|
||||
#line 1937 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 66: /* pp_expr: pp_expr tNE pp_expr */
|
||||
#line 369 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), !=); }
|
||||
#line 1941 "tools/wrc/ppy.tab.c"
|
||||
#line 1943 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 67: /* pp_expr: pp_expr '<' pp_expr */
|
||||
#line 370 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), <); }
|
||||
#line 1947 "tools/wrc/ppy.tab.c"
|
||||
#line 1949 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 68: /* pp_expr: pp_expr '>' pp_expr */
|
||||
#line 371 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), >); }
|
||||
#line 1953 "tools/wrc/ppy.tab.c"
|
||||
#line 1955 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 69: /* pp_expr: pp_expr tLTE pp_expr */
|
||||
#line 372 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), <=); }
|
||||
#line 1959 "tools/wrc/ppy.tab.c"
|
||||
#line 1961 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 70: /* pp_expr: pp_expr tGTE pp_expr */
|
||||
#line 373 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), >=); }
|
||||
#line 1965 "tools/wrc/ppy.tab.c"
|
||||
#line 1967 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 71: /* pp_expr: pp_expr '+' pp_expr */
|
||||
#line 374 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), +); }
|
||||
#line 1971 "tools/wrc/ppy.tab.c"
|
||||
#line 1973 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 72: /* pp_expr: pp_expr '-' pp_expr */
|
||||
#line 375 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), -); }
|
||||
#line 1977 "tools/wrc/ppy.tab.c"
|
||||
#line 1979 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 73: /* pp_expr: pp_expr '^' pp_expr */
|
||||
#line 376 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), ^); }
|
||||
#line 1983 "tools/wrc/ppy.tab.c"
|
||||
#line 1985 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 74: /* pp_expr: pp_expr '&' pp_expr */
|
||||
#line 377 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), &); }
|
||||
#line 1989 "tools/wrc/ppy.tab.c"
|
||||
#line 1991 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 75: /* pp_expr: pp_expr '|' pp_expr */
|
||||
#line 378 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), |); }
|
||||
#line 1995 "tools/wrc/ppy.tab.c"
|
||||
#line 1997 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 76: /* pp_expr: pp_expr '*' pp_expr */
|
||||
#line 379 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), *); }
|
||||
#line 2001 "tools/wrc/ppy.tab.c"
|
||||
#line 2003 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 77: /* pp_expr: pp_expr '/' pp_expr */
|
||||
#line 380 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), /); }
|
||||
#line 2007 "tools/wrc/ppy.tab.c"
|
||||
#line 2009 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 78: /* pp_expr: pp_expr tLSHIFT pp_expr */
|
||||
#line 381 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), <<); }
|
||||
#line 2013 "tools/wrc/ppy.tab.c"
|
||||
#line 2015 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 79: /* pp_expr: pp_expr tRSHIFT pp_expr */
|
||||
#line 382 "tools/wrc/ppy.y"
|
||||
{ promote_equal_size(&(yyvsp[-2].cval), &(yyvsp[0].cval)); BIN_OP((yyval.cval), (yyvsp[-2].cval), (yyvsp[0].cval), >>); }
|
||||
#line 2019 "tools/wrc/ppy.tab.c"
|
||||
#line 2021 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 80: /* pp_expr: '+' pp_expr */
|
||||
#line 383 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval) = (yyvsp[0].cval); }
|
||||
#line 2025 "tools/wrc/ppy.tab.c"
|
||||
#line 2027 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 81: /* pp_expr: '-' pp_expr */
|
||||
#line 384 "tools/wrc/ppy.y"
|
||||
{ UNARY_OP((yyval.cval), (yyvsp[0].cval), -); }
|
||||
#line 2031 "tools/wrc/ppy.tab.c"
|
||||
#line 2033 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 82: /* pp_expr: '~' pp_expr */
|
||||
#line 385 "tools/wrc/ppy.y"
|
||||
{ UNARY_OP((yyval.cval), (yyvsp[0].cval), ~); }
|
||||
#line 2037 "tools/wrc/ppy.tab.c"
|
||||
#line 2039 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 83: /* pp_expr: '!' pp_expr */
|
||||
#line 386 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval).type = cv_sint; (yyval.cval).val.si = !boolean(&(yyvsp[0].cval)); }
|
||||
#line 2043 "tools/wrc/ppy.tab.c"
|
||||
#line 2045 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 84: /* pp_expr: '(' pp_expr ')' */
|
||||
#line 387 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval) = (yyvsp[-1].cval); }
|
||||
#line 2049 "tools/wrc/ppy.tab.c"
|
||||
#line 2051 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
case 85: /* pp_expr: pp_expr '?' pp_expr ':' pp_expr */
|
||||
#line 388 "tools/wrc/ppy.y"
|
||||
{ (yyval.cval) = boolean(&(yyvsp[-4].cval)) ? (yyvsp[-2].cval) : (yyvsp[0].cval); }
|
||||
#line 2055 "tools/wrc/ppy.tab.c"
|
||||
#line 2057 "tools/wrc/ppy.tab.c"
|
||||
break;
|
||||
|
||||
|
||||
#line 2059 "tools/wrc/ppy.tab.c"
|
||||
#line 2061 "tools/wrc/ppy.tab.c"
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
/* A Bison parser, made by GNU Bison 3.8.2.46-9785. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2022 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -745,8 +745,41 @@ static int type_has_pointers(const type_t *type)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int type_has_full_pointer(const type_t *type, const attr_list_t *attrs,
|
||||
int toplevel_param)
|
||||
struct visited_struct_array
|
||||
{
|
||||
const type_t **structs;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
};
|
||||
|
||||
static inline int array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
|
||||
{
|
||||
size_t new_capacity, max_capacity;
|
||||
void *new_elements;
|
||||
|
||||
if (count <= *capacity)
|
||||
return TRUE;
|
||||
|
||||
max_capacity = ~(size_t)0 / size;
|
||||
if (count > max_capacity)
|
||||
return FALSE;
|
||||
|
||||
new_capacity = max(4, *capacity);
|
||||
while (new_capacity < count && new_capacity <= max_capacity / 2)
|
||||
new_capacity *= 2;
|
||||
if (new_capacity < count)
|
||||
new_capacity = max_capacity;
|
||||
|
||||
if (!(new_elements = realloc(*elements, new_capacity * size)))
|
||||
return FALSE;
|
||||
|
||||
*elements = new_elements;
|
||||
*capacity = new_capacity;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int type_has_full_pointer_recurse(const type_t *type, const attr_list_t *attrs,
|
||||
int toplevel_param, struct visited_struct_array *visited_structs)
|
||||
{
|
||||
switch (typegen_detect_type(type, NULL, TDT_IGNORE_STRINGS))
|
||||
{
|
||||
@ -756,22 +789,43 @@ static int type_has_full_pointer(const type_t *type, const attr_list_t *attrs,
|
||||
if (get_pointer_fc(type, attrs, toplevel_param) == FC_FP)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
return type_has_full_pointer_recurse(type_pointer_get_ref_type(type), NULL, FALSE, visited_structs);
|
||||
case TGT_ARRAY:
|
||||
if (get_pointer_fc(type, attrs, toplevel_param) == FC_FP)
|
||||
return TRUE;
|
||||
else
|
||||
return type_has_full_pointer(type_array_get_element_type(type), NULL, FALSE);
|
||||
return type_has_full_pointer_recurse(type_array_get_element_type(type), NULL, FALSE, visited_structs);
|
||||
case TGT_STRUCT:
|
||||
{
|
||||
unsigned int i;
|
||||
int ret = FALSE;
|
||||
var_list_t *fields = type_struct_get_fields(type);
|
||||
const var_t *field;
|
||||
|
||||
for (i = 0; i < visited_structs->count; i++)
|
||||
{
|
||||
if (visited_structs->structs[i] == type)
|
||||
{
|
||||
/* Found struct we visited already, abort to prevent infinite loop.
|
||||
* Can't be at the first struct we visit, so we can skip cleanup and just return */
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
array_reserve((void**)&visited_structs->structs, &visited_structs->capacity, visited_structs->count + 1, sizeof(struct type_t*));
|
||||
visited_structs->structs[visited_structs->count] = type;
|
||||
|
||||
visited_structs->count++;
|
||||
if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry )
|
||||
{
|
||||
if (type_has_full_pointer(field->declspec.type, field->attrs, FALSE))
|
||||
return TRUE;
|
||||
if (type_has_full_pointer_recurse(field->declspec.type, field->attrs, FALSE, visited_structs))
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
visited_structs->count--;
|
||||
return ret;
|
||||
}
|
||||
case TGT_UNION:
|
||||
{
|
||||
@ -780,7 +834,7 @@ static int type_has_full_pointer(const type_t *type, const attr_list_t *attrs,
|
||||
fields = type_union_get_cases(type);
|
||||
if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry )
|
||||
{
|
||||
if (field->declspec.type && type_has_full_pointer(field->declspec.type, field->attrs, FALSE))
|
||||
if (field->declspec.type && type_has_full_pointer_recurse(field->declspec.type, field->attrs, FALSE, visited_structs))
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@ -799,6 +853,15 @@ static int type_has_full_pointer(const type_t *type, const attr_list_t *attrs,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int type_has_full_pointer(const type_t *type, const attr_list_t *attrs, int toplevel_param)
|
||||
{
|
||||
int ret;
|
||||
struct visited_struct_array visited_structs = {0};
|
||||
ret = type_has_full_pointer_recurse(type, attrs, toplevel_param, &visited_structs);
|
||||
free(visited_structs.structs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static unsigned short user_type_offset(const char *name)
|
||||
{
|
||||
user_type_t *ut;
|
||||
|
Loading…
Reference in New Issue
Block a user