winprefsyacc.c revision 35c4bbdf
135c4bbdfSmrg/* A Bison parser, made by GNU Bison 3.0.4.  */
205b261ecSmrg
39ace9065Smrg/* Bison implementation for Yacc-like parsers in C
435c4bbdfSmrg
535c4bbdfSmrg   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
635c4bbdfSmrg
74642e01fSmrg   This program is free software: you can redistribute it and/or modify
805b261ecSmrg   it under the terms of the GNU General Public License as published by
94642e01fSmrg   the Free Software Foundation, either version 3 of the License, or
104642e01fSmrg   (at your option) any later version.
1135c4bbdfSmrg
1205b261ecSmrg   This program is distributed in the hope that it will be useful,
1305b261ecSmrg   but WITHOUT ANY WARRANTY; without even the implied warranty of
1405b261ecSmrg   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1505b261ecSmrg   GNU General Public License for more details.
1635c4bbdfSmrg
1705b261ecSmrg   You should have received a copy of the GNU General Public License
184642e01fSmrg   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
1905b261ecSmrg
2005b261ecSmrg/* As a special exception, you may create a larger work that contains
2105b261ecSmrg   part or all of the Bison parser skeleton and distribute that work
2205b261ecSmrg   under terms of your choice, so long as that work isn't itself a
2305b261ecSmrg   parser generator using the skeleton or a modified version thereof
2405b261ecSmrg   as a parser skeleton.  Alternatively, if you modify or redistribute
2505b261ecSmrg   the parser skeleton itself, you may (at your option) remove this
2605b261ecSmrg   special exception, which will cause the skeleton and the resulting
2705b261ecSmrg   Bison output files to be licensed under the GNU General Public
2805b261ecSmrg   License without this special exception.
2935c4bbdfSmrg
3005b261ecSmrg   This special exception was added by the Free Software Foundation in
3105b261ecSmrg   version 2.2 of Bison.  */
3205b261ecSmrg
3305b261ecSmrg/* C LALR(1) parser skeleton written by Richard Stallman, by
3405b261ecSmrg   simplifying the original so-called "semantic" parser.  */
3505b261ecSmrg
3605b261ecSmrg/* All symbols defined below should begin with yy or YY, to avoid
3705b261ecSmrg   infringing on user name space.  This should be done even for local
3805b261ecSmrg   variables, as they might otherwise be expanded by user macros.
3905b261ecSmrg   There are some unavoidable exceptions within include files to
4005b261ecSmrg   define necessary library symbols; they are noted "INFRINGES ON
4105b261ecSmrg   USER NAME SPACE" below.  */
4205b261ecSmrg
4305b261ecSmrg/* Identify Bison output.  */
4405b261ecSmrg#define YYBISON 1
4505b261ecSmrg
4605b261ecSmrg/* Bison version.  */
4735c4bbdfSmrg#define YYBISON_VERSION "3.0.4"
4805b261ecSmrg
4905b261ecSmrg/* Skeleton name.  */
5005b261ecSmrg#define YYSKELETON_NAME "yacc.c"
5105b261ecSmrg
5205b261ecSmrg/* Pure parsers.  */
5305b261ecSmrg#define YYPURE 0
5405b261ecSmrg
554642e01fSmrg/* Push parsers.  */
564642e01fSmrg#define YYPUSH 0
5705b261ecSmrg
584642e01fSmrg/* Pull parsers.  */
594642e01fSmrg#define YYPULL 1
6005b261ecSmrg
6105b261ecSmrg
6205b261ecSmrg
6305b261ecSmrg
6405b261ecSmrg/* Copy the first part of user declarations.  */
6535c4bbdfSmrg#line 1 "winprefsyacc.y" /* yacc.c:339  */
6605b261ecSmrg
6705b261ecSmrg/*
6805b261ecSmrg * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
696747b715Smrg * Copyright (C) Colin Harrison 2005-2008
7005b261ecSmrg *
7105b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining
7205b261ecSmrg * a copy of this software and associated documentation files (the
7305b261ecSmrg * "Software"), to deal in the Software without restriction, including
7405b261ecSmrg * without limitation the rights to use, copy, modify, merge, publish,
7505b261ecSmrg * distribute, sublicense, and/or sell copies of the Software, and to
7605b261ecSmrg * permit persons to whom the Software is furnished to do so, subject to
7705b261ecSmrg * the following conditions:
7805b261ecSmrg *
7905b261ecSmrg * The above copyright notice and this permission notice shall be
8005b261ecSmrg * included in all copies or substantial portions of the Software.
8105b261ecSmrg *
8205b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
8305b261ecSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8405b261ecSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
8505b261ecSmrg * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
8605b261ecSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
8705b261ecSmrg * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
8805b261ecSmrg * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8905b261ecSmrg *
9005b261ecSmrg * Except as contained in this notice, the name of the XFree86 Project
9105b261ecSmrg * shall not be used in advertising or otherwise to promote the sale, use
9205b261ecSmrg * or other dealings in this Software without prior written authorization
9305b261ecSmrg * from the XFree86 Project.
9405b261ecSmrg *
9505b261ecSmrg * Authors:     Earle F. Philhower, III
966747b715Smrg *              Colin Harrison
9705b261ecSmrg */
9805b261ecSmrg/* $XFree86: $ */
9905b261ecSmrg
10005b261ecSmrg#ifdef HAVE_XWIN_CONFIG_H
10105b261ecSmrg#include <xwin-config.h>
10205b261ecSmrg#endif
10305b261ecSmrg#include <stdio.h>
10405b261ecSmrg#include <stdlib.h>
10535c4bbdfSmrg#define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */
10605b261ecSmrg#include <string.h>
10705b261ecSmrg#include "winprefs.h"
10805b261ecSmrg
10905b261ecSmrg/* The following give better error messages in bison at the cost of a few KB */
11005b261ecSmrg#define YYERROR_VERBOSE 1
11105b261ecSmrg
1126747b715Smrg/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
1136747b715Smrg#define YYLTYPE_IS_TRIVIAL 1
1146747b715Smrg#define YYENABLE_NLS 0
1156747b715Smrg
11605b261ecSmrg/* The global pref settings */
11705b261ecSmrgWINPREFS pref;
11805b261ecSmrg
11905b261ecSmrg/* The working menu */
12005b261ecSmrgstatic MENUPARSED menu;
12105b261ecSmrg
12205b261ecSmrg/* Functions for parsing the tokens into out structure */
12305b261ecSmrg/* Defined at the end section of this file */
12405b261ecSmrg
12505b261ecSmrgstatic void SetIconDirectory (char *path);
12605b261ecSmrgstatic void SetDefaultIcon (char *fname);
12705b261ecSmrgstatic void SetRootMenu (char *menu);
12805b261ecSmrgstatic void SetDefaultSysMenu (char *menu, int pos);
12905b261ecSmrgstatic void SetTrayIcon (char *fname);
13005b261ecSmrg
13105b261ecSmrgstatic void OpenMenu(char *menuname);
13235c4bbdfSmrgstatic void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param);
13305b261ecSmrgstatic void CloseMenu(void);
13405b261ecSmrg
13505b261ecSmrgstatic void OpenIcons(void);
13605b261ecSmrgstatic void AddIconLine(char *matchstr, char *iconfile);
13705b261ecSmrgstatic void CloseIcons(void);
13805b261ecSmrg
1396747b715Smrgstatic void OpenStyles(void);
1406747b715Smrgstatic void AddStyleLine(char *matchstr, unsigned long style);
1416747b715Smrgstatic void CloseStyles(void);
1426747b715Smrg
14305b261ecSmrgstatic void OpenSysMenu(void);
14405b261ecSmrgstatic void AddSysMenuLine(char *matchstr, char *menuname, int pos);
14505b261ecSmrgstatic void CloseSysMenu(void);
14605b261ecSmrg
14735c4bbdfSmrgstatic int yyerror (const char *s);
14805b261ecSmrg
14905b261ecSmrgextern char *yytext;
15035c4bbdfSmrgextern int yylineno;
15105b261ecSmrgextern int yylex(void);
15205b261ecSmrg
15305b261ecSmrg
15435c4bbdfSmrg#line 155 "winprefsyacc.c" /* yacc.c:339  */
15505b261ecSmrg
15635c4bbdfSmrg# ifndef YY_NULLPTR
15735c4bbdfSmrg#  if defined __cplusplus && 201103L <= __cplusplus
15835c4bbdfSmrg#   define YY_NULLPTR nullptr
15935c4bbdfSmrg#  else
16035c4bbdfSmrg#   define YY_NULLPTR 0
16135c4bbdfSmrg#  endif
16235c4bbdfSmrg# endif
16305b261ecSmrg
16405b261ecSmrg/* Enabling verbose error messages.  */
16505b261ecSmrg#ifdef YYERROR_VERBOSE
16605b261ecSmrg# undef YYERROR_VERBOSE
16705b261ecSmrg# define YYERROR_VERBOSE 1
16805b261ecSmrg#else
16905b261ecSmrg# define YYERROR_VERBOSE 0
17005b261ecSmrg#endif
17105b261ecSmrg
17235c4bbdfSmrg/* In a future release of Bison, this section will be replaced
17335c4bbdfSmrg   by #include "y.tab.h".  */
17435c4bbdfSmrg#ifndef YY_YY_WINPREFSYACC_H_INCLUDED
17535c4bbdfSmrg# define YY_YY_WINPREFSYACC_H_INCLUDED
17635c4bbdfSmrg/* Debug traces.  */
17735c4bbdfSmrg#ifndef YYDEBUG
17835c4bbdfSmrg# define YYDEBUG 0
17935c4bbdfSmrg#endif
18035c4bbdfSmrg#if YYDEBUG
18135c4bbdfSmrgextern int yydebug;
18205b261ecSmrg#endif
18305b261ecSmrg
18435c4bbdfSmrg/* Token type.  */
1854642e01fSmrg#ifndef YYTOKENTYPE
1864642e01fSmrg# define YYTOKENTYPE
18735c4bbdfSmrg  enum yytokentype
18835c4bbdfSmrg  {
18935c4bbdfSmrg    NEWLINE = 258,
19035c4bbdfSmrg    MENU = 259,
19135c4bbdfSmrg    LB = 260,
19235c4bbdfSmrg    RB = 261,
19335c4bbdfSmrg    ICONDIRECTORY = 262,
19435c4bbdfSmrg    DEFAULTICON = 263,
19535c4bbdfSmrg    ICONS = 264,
19635c4bbdfSmrg    STYLES = 265,
19735c4bbdfSmrg    TOPMOST = 266,
19835c4bbdfSmrg    MAXIMIZE = 267,
19935c4bbdfSmrg    MINIMIZE = 268,
20035c4bbdfSmrg    BOTTOM = 269,
20135c4bbdfSmrg    NOTITLE = 270,
20235c4bbdfSmrg    OUTLINE = 271,
20335c4bbdfSmrg    NOFRAME = 272,
20435c4bbdfSmrg    DEFAULTSYSMENU = 273,
20535c4bbdfSmrg    SYSMENU = 274,
20635c4bbdfSmrg    ROOTMENU = 275,
20735c4bbdfSmrg    SEPARATOR = 276,
20835c4bbdfSmrg    ATSTART = 277,
20935c4bbdfSmrg    ATEND = 278,
21035c4bbdfSmrg    EXEC = 279,
21135c4bbdfSmrg    ALWAYSONTOP = 280,
21235c4bbdfSmrg    DEBUGOUTPUT = 281,
21335c4bbdfSmrg    RELOAD = 282,
21435c4bbdfSmrg    TRAYICON = 283,
21535c4bbdfSmrg    FORCEEXIT = 284,
21635c4bbdfSmrg    SILENTEXIT = 285,
21735c4bbdfSmrg    STRING = 286
21835c4bbdfSmrg  };
2194642e01fSmrg#endif
2204642e01fSmrg/* Tokens.  */
2214642e01fSmrg#define NEWLINE 258
2224642e01fSmrg#define MENU 259
2234642e01fSmrg#define LB 260
2244642e01fSmrg#define RB 261
2254642e01fSmrg#define ICONDIRECTORY 262
2264642e01fSmrg#define DEFAULTICON 263
2274642e01fSmrg#define ICONS 264
2286747b715Smrg#define STYLES 265
2296747b715Smrg#define TOPMOST 266
2306747b715Smrg#define MAXIMIZE 267
2316747b715Smrg#define MINIMIZE 268
2326747b715Smrg#define BOTTOM 269
2336747b715Smrg#define NOTITLE 270
2346747b715Smrg#define OUTLINE 271
2356747b715Smrg#define NOFRAME 272
2366747b715Smrg#define DEFAULTSYSMENU 273
2376747b715Smrg#define SYSMENU 274
2386747b715Smrg#define ROOTMENU 275
2396747b715Smrg#define SEPARATOR 276
2406747b715Smrg#define ATSTART 277
2416747b715Smrg#define ATEND 278
2426747b715Smrg#define EXEC 279
2436747b715Smrg#define ALWAYSONTOP 280
2446747b715Smrg#define DEBUGOUTPUT 281
2456747b715Smrg#define RELOAD 282
2466747b715Smrg#define TRAYICON 283
2476747b715Smrg#define FORCEEXIT 284
2486747b715Smrg#define SILENTEXIT 285
2496747b715Smrg#define STRING 286
2504642e01fSmrg
25135c4bbdfSmrg/* Value type.  */
25205b261ecSmrg#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
2534642e01fSmrg
25435c4bbdfSmrgunion YYSTYPE
25535c4bbdfSmrg{
25635c4bbdfSmrg#line 90 "winprefsyacc.y" /* yacc.c:355  */
2574642e01fSmrg
25805b261ecSmrg  char *sVal;
2596747b715Smrg  unsigned long uVal;
26005b261ecSmrg  int iVal;
2614642e01fSmrg
26235c4bbdfSmrg#line 263 "winprefsyacc.c" /* yacc.c:355  */
26335c4bbdfSmrg};
2644642e01fSmrg
26535c4bbdfSmrgtypedef union YYSTYPE YYSTYPE;
2664642e01fSmrg# define YYSTYPE_IS_TRIVIAL 1
26705b261ecSmrg# define YYSTYPE_IS_DECLARED 1
26805b261ecSmrg#endif
26905b261ecSmrg
27005b261ecSmrg
27135c4bbdfSmrgextern YYSTYPE yylval;
27235c4bbdfSmrg
27335c4bbdfSmrgint yyparse (void);
27405b261ecSmrg
27535c4bbdfSmrg#endif /* !YY_YY_WINPREFSYACC_H_INCLUDED  */
27635c4bbdfSmrg
27735c4bbdfSmrg/* Copy the second part of user declarations.  */
27805b261ecSmrg
27935c4bbdfSmrg#line 280 "winprefsyacc.c" /* yacc.c:358  */
28005b261ecSmrg
28105b261ecSmrg#ifdef short
28205b261ecSmrg# undef short
28305b261ecSmrg#endif
28405b261ecSmrg
28505b261ecSmrg#ifdef YYTYPE_UINT8
28605b261ecSmrgtypedef YYTYPE_UINT8 yytype_uint8;
28705b261ecSmrg#else
28805b261ecSmrgtypedef unsigned char yytype_uint8;
28905b261ecSmrg#endif
29005b261ecSmrg
29105b261ecSmrg#ifdef YYTYPE_INT8
29205b261ecSmrgtypedef YYTYPE_INT8 yytype_int8;
29305b261ecSmrg#else
29435c4bbdfSmrgtypedef signed char yytype_int8;
29505b261ecSmrg#endif
29605b261ecSmrg
29705b261ecSmrg#ifdef YYTYPE_UINT16
29805b261ecSmrgtypedef YYTYPE_UINT16 yytype_uint16;
29905b261ecSmrg#else
30005b261ecSmrgtypedef unsigned short int yytype_uint16;
30105b261ecSmrg#endif
30205b261ecSmrg
30305b261ecSmrg#ifdef YYTYPE_INT16
30405b261ecSmrgtypedef YYTYPE_INT16 yytype_int16;
30505b261ecSmrg#else
30605b261ecSmrgtypedef short int yytype_int16;
30705b261ecSmrg#endif
30805b261ecSmrg
30905b261ecSmrg#ifndef YYSIZE_T
31005b261ecSmrg# ifdef __SIZE_TYPE__
31105b261ecSmrg#  define YYSIZE_T __SIZE_TYPE__
31205b261ecSmrg# elif defined size_t
31305b261ecSmrg#  define YYSIZE_T size_t
31435c4bbdfSmrg# elif ! defined YYSIZE_T
31505b261ecSmrg#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
31605b261ecSmrg#  define YYSIZE_T size_t
31705b261ecSmrg# else
31805b261ecSmrg#  define YYSIZE_T unsigned int
31905b261ecSmrg# endif
32005b261ecSmrg#endif
32105b261ecSmrg
32205b261ecSmrg#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
32305b261ecSmrg
32405b261ecSmrg#ifndef YY_
3256747b715Smrg# if defined YYENABLE_NLS && YYENABLE_NLS
32605b261ecSmrg#  if ENABLE_NLS
32705b261ecSmrg#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
32835c4bbdfSmrg#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
32905b261ecSmrg#  endif
33005b261ecSmrg# endif
33105b261ecSmrg# ifndef YY_
33235c4bbdfSmrg#  define YY_(Msgid) Msgid
33335c4bbdfSmrg# endif
33435c4bbdfSmrg#endif
33535c4bbdfSmrg
33635c4bbdfSmrg#ifndef YY_ATTRIBUTE
33735c4bbdfSmrg# if (defined __GNUC__                                               \
33835c4bbdfSmrg      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
33935c4bbdfSmrg     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
34035c4bbdfSmrg#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
34135c4bbdfSmrg# else
34235c4bbdfSmrg#  define YY_ATTRIBUTE(Spec) /* empty */
34335c4bbdfSmrg# endif
34435c4bbdfSmrg#endif
34535c4bbdfSmrg
34635c4bbdfSmrg#ifndef YY_ATTRIBUTE_PURE
34735c4bbdfSmrg# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
34835c4bbdfSmrg#endif
34935c4bbdfSmrg
35035c4bbdfSmrg#ifndef YY_ATTRIBUTE_UNUSED
35135c4bbdfSmrg# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
35235c4bbdfSmrg#endif
35335c4bbdfSmrg
35435c4bbdfSmrg#if !defined _Noreturn \
35535c4bbdfSmrg     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
35635c4bbdfSmrg# if defined _MSC_VER && 1200 <= _MSC_VER
35735c4bbdfSmrg#  define _Noreturn __declspec (noreturn)
35835c4bbdfSmrg# else
35935c4bbdfSmrg#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
36005b261ecSmrg# endif
36105b261ecSmrg#endif
36205b261ecSmrg
36305b261ecSmrg/* Suppress unused-variable warnings by "using" E.  */
36405b261ecSmrg#if ! defined lint || defined __GNUC__
36535c4bbdfSmrg# define YYUSE(E) ((void) (E))
36605b261ecSmrg#else
36735c4bbdfSmrg# define YYUSE(E) /* empty */
36805b261ecSmrg#endif
36905b261ecSmrg
37035c4bbdfSmrg#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
37135c4bbdfSmrg/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
37235c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
37335c4bbdfSmrg    _Pragma ("GCC diagnostic push") \
37435c4bbdfSmrg    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
37535c4bbdfSmrg    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
37635c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
37735c4bbdfSmrg    _Pragma ("GCC diagnostic pop")
37805b261ecSmrg#else
37935c4bbdfSmrg# define YY_INITIAL_VALUE(Value) Value
38005b261ecSmrg#endif
38135c4bbdfSmrg#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
38235c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
38335c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END
38435c4bbdfSmrg#endif
38535c4bbdfSmrg#ifndef YY_INITIAL_VALUE
38635c4bbdfSmrg# define YY_INITIAL_VALUE(Value) /* Nothing. */
38705b261ecSmrg#endif
38805b261ecSmrg
38935c4bbdfSmrg
39005b261ecSmrg#if ! defined yyoverflow || YYERROR_VERBOSE
39105b261ecSmrg
39205b261ecSmrg/* The parser invokes alloca or malloc; define the necessary symbols.  */
39305b261ecSmrg
39405b261ecSmrg# ifdef YYSTACK_USE_ALLOCA
39505b261ecSmrg#  if YYSTACK_USE_ALLOCA
39605b261ecSmrg#   ifdef __GNUC__
39705b261ecSmrg#    define YYSTACK_ALLOC __builtin_alloca
39805b261ecSmrg#   elif defined __BUILTIN_VA_ARG_INCR
39905b261ecSmrg#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
40005b261ecSmrg#   elif defined _AIX
40105b261ecSmrg#    define YYSTACK_ALLOC __alloca
40205b261ecSmrg#   elif defined _MSC_VER
40305b261ecSmrg#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
40405b261ecSmrg#    define alloca _alloca
40505b261ecSmrg#   else
40605b261ecSmrg#    define YYSTACK_ALLOC alloca
40735c4bbdfSmrg#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
40805b261ecSmrg#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
40935c4bbdfSmrg      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
4109ace9065Smrg#     ifndef EXIT_SUCCESS
4119ace9065Smrg#      define EXIT_SUCCESS 0
41205b261ecSmrg#     endif
41305b261ecSmrg#    endif
41405b261ecSmrg#   endif
41505b261ecSmrg#  endif
41605b261ecSmrg# endif
41705b261ecSmrg
41805b261ecSmrg# ifdef YYSTACK_ALLOC
41935c4bbdfSmrg   /* Pacify GCC's 'empty if-body' warning.  */
42035c4bbdfSmrg#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
42105b261ecSmrg#  ifndef YYSTACK_ALLOC_MAXIMUM
42205b261ecSmrg    /* The OS might guarantee only one guard page at the bottom of the stack,
42305b261ecSmrg       and a page size can be as small as 4096 bytes.  So we cannot safely
42405b261ecSmrg       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
42505b261ecSmrg       to allow for a few compiler-allocated temporary stack slots.  */
42605b261ecSmrg#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
42705b261ecSmrg#  endif
42805b261ecSmrg# else
42905b261ecSmrg#  define YYSTACK_ALLOC YYMALLOC
43005b261ecSmrg#  define YYSTACK_FREE YYFREE
43105b261ecSmrg#  ifndef YYSTACK_ALLOC_MAXIMUM
43205b261ecSmrg#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
43305b261ecSmrg#  endif
4349ace9065Smrg#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
43505b261ecSmrg       && ! ((defined YYMALLOC || defined malloc) \
43635c4bbdfSmrg             && (defined YYFREE || defined free)))
43705b261ecSmrg#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
4389ace9065Smrg#   ifndef EXIT_SUCCESS
4399ace9065Smrg#    define EXIT_SUCCESS 0
44005b261ecSmrg#   endif
44105b261ecSmrg#  endif
44205b261ecSmrg#  ifndef YYMALLOC
44305b261ecSmrg#   define YYMALLOC malloc
44435c4bbdfSmrg#   if ! defined malloc && ! defined EXIT_SUCCESS
44505b261ecSmrgvoid *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
44605b261ecSmrg#   endif
44705b261ecSmrg#  endif
44805b261ecSmrg#  ifndef YYFREE
44905b261ecSmrg#   define YYFREE free
45035c4bbdfSmrg#   if ! defined free && ! defined EXIT_SUCCESS
45105b261ecSmrgvoid free (void *); /* INFRINGES ON USER NAME SPACE */
45205b261ecSmrg#   endif
45305b261ecSmrg#  endif
45405b261ecSmrg# endif
45505b261ecSmrg#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
45605b261ecSmrg
45705b261ecSmrg
45805b261ecSmrg#if (! defined yyoverflow \
45905b261ecSmrg     && (! defined __cplusplus \
46035c4bbdfSmrg         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
46105b261ecSmrg
46205b261ecSmrg/* A type that is properly aligned for any stack member.  */
46305b261ecSmrgunion yyalloc
46405b261ecSmrg{
4654642e01fSmrg  yytype_int16 yyss_alloc;
4664642e01fSmrg  YYSTYPE yyvs_alloc;
4674642e01fSmrg};
46805b261ecSmrg
46905b261ecSmrg/* The size of the maximum gap between one aligned stack and the next.  */
47005b261ecSmrg# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
47105b261ecSmrg
47205b261ecSmrg/* The size of an array large to enough to hold all stacks, each with
47305b261ecSmrg   N elements.  */
47405b261ecSmrg# define YYSTACK_BYTES(N) \
47505b261ecSmrg     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
47605b261ecSmrg      + YYSTACK_GAP_MAXIMUM)
47705b261ecSmrg
4789ace9065Smrg# define YYCOPY_NEEDED 1
47905b261ecSmrg
48005b261ecSmrg/* Relocate STACK from its old location to the new one.  The
48105b261ecSmrg   local variables YYSIZE and YYSTACKSIZE give the old and new number of
48205b261ecSmrg   elements in the stack, and YYPTR gives the new location of the
48305b261ecSmrg   stack.  Advance YYPTR to a properly aligned location for the next
48405b261ecSmrg   stack.  */
48535c4bbdfSmrg# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
48635c4bbdfSmrg    do                                                                  \
48735c4bbdfSmrg      {                                                                 \
48835c4bbdfSmrg        YYSIZE_T yynewbytes;                                            \
48935c4bbdfSmrg        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
49035c4bbdfSmrg        Stack = &yyptr->Stack_alloc;                                    \
49135c4bbdfSmrg        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
49235c4bbdfSmrg        yyptr += yynewbytes / sizeof (*yyptr);                          \
49335c4bbdfSmrg      }                                                                 \
49435c4bbdfSmrg    while (0)
49505b261ecSmrg
49605b261ecSmrg#endif
49705b261ecSmrg
4989ace9065Smrg#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
49935c4bbdfSmrg/* Copy COUNT objects from SRC to DST.  The source and destination do
5009ace9065Smrg   not overlap.  */
5019ace9065Smrg# ifndef YYCOPY
5029ace9065Smrg#  if defined __GNUC__ && 1 < __GNUC__
50335c4bbdfSmrg#   define YYCOPY(Dst, Src, Count) \
50435c4bbdfSmrg      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
5059ace9065Smrg#  else
50635c4bbdfSmrg#   define YYCOPY(Dst, Src, Count)              \
50735c4bbdfSmrg      do                                        \
50835c4bbdfSmrg        {                                       \
50935c4bbdfSmrg          YYSIZE_T yyi;                         \
51035c4bbdfSmrg          for (yyi = 0; yyi < (Count); yyi++)   \
51135c4bbdfSmrg            (Dst)[yyi] = (Src)[yyi];            \
51235c4bbdfSmrg        }                                       \
51335c4bbdfSmrg      while (0)
5149ace9065Smrg#  endif
5159ace9065Smrg# endif
5169ace9065Smrg#endif /* !YYCOPY_NEEDED */
5179ace9065Smrg
51805b261ecSmrg/* YYFINAL -- State number of the termination state.  */
51905b261ecSmrg#define YYFINAL  2
52005b261ecSmrg/* YYLAST -- Last index in YYTABLE.  */
5216747b715Smrg#define YYLAST   98
52205b261ecSmrg
52305b261ecSmrg/* YYNTOKENS -- Number of terminals.  */
5246747b715Smrg#define YYNTOKENS  32
52505b261ecSmrg/* YYNNTS -- Number of nonterminals.  */
5266747b715Smrg#define YYNNTS  33
52705b261ecSmrg/* YYNRULES -- Number of rules.  */
5286747b715Smrg#define YYNRULES  65
52935c4bbdfSmrg/* YYNSTATES -- Number of states.  */
5306747b715Smrg#define YYNSTATES  121
53105b261ecSmrg
53235c4bbdfSmrg/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
53335c4bbdfSmrg   by yylex, with out-of-bounds checking.  */
53405b261ecSmrg#define YYUNDEFTOK  2
5356747b715Smrg#define YYMAXUTOK   286
53605b261ecSmrg
53735c4bbdfSmrg#define YYTRANSLATE(YYX)                                                \
53805b261ecSmrg  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
53905b261ecSmrg
54035c4bbdfSmrg/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
54135c4bbdfSmrg   as returned by yylex, without out-of-bounds checking.  */
54205b261ecSmrgstatic const yytype_uint8 yytranslate[] =
54305b261ecSmrg{
54405b261ecSmrg       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
54505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
54605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
54705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
54805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
54905b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55005b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55105b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55205b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55305b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55405b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
55905b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56005b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56105b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56205b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56305b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56405b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
56905b261ecSmrg       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
57005b261ecSmrg       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
5716747b715Smrg      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
5726747b715Smrg      25,    26,    27,    28,    29,    30,    31
57305b261ecSmrg};
57405b261ecSmrg
57505b261ecSmrg#if YYDEBUG
57635c4bbdfSmrg  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
57705b261ecSmrgstatic const yytype_uint8 yyrline[] =
57805b261ecSmrg{
57935c4bbdfSmrg       0,   133,   133,   134,   137,   138,   142,   143,   146,   147,
58035c4bbdfSmrg     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
58135c4bbdfSmrg     160,   163,   166,   169,   172,   175,   176,   177,   178,   179,
58235c4bbdfSmrg     182,   183,   186,   186,   189,   192,   193,   196,   196,   199,
58335c4bbdfSmrg     200,   201,   202,   205,   206,   207,   210,   211,   212,   213,
58435c4bbdfSmrg     216,   219,   220,   223,   223,   226,   227,   228,   231,   234,
58535c4bbdfSmrg     235,   238,   238,   241,   244,   247
58605b261ecSmrg};
58705b261ecSmrg#endif
58805b261ecSmrg
58935c4bbdfSmrg#if YYDEBUG || YYERROR_VERBOSE || 0
59005b261ecSmrg/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
59105b261ecSmrg   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
59205b261ecSmrgstatic const char *const yytname[] =
59305b261ecSmrg{
59405b261ecSmrg  "$end", "error", "$undefined", "NEWLINE", "MENU", "LB", "RB",
5956747b715Smrg  "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", "MAXIMIZE",
5966747b715Smrg  "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", "DEFAULTSYSMENU",
5976747b715Smrg  "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", "EXEC",
5986747b715Smrg  "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT",
5996747b715Smrg  "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada",
6006747b715Smrg  "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon",
6016747b715Smrg  "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline",
6026747b715Smrg  "iconlist", "icons", "$@2", "group1", "group2", "stylecombo",
6036747b715Smrg  "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline",
60435c4bbdfSmrg  "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", YY_NULLPTR
60505b261ecSmrg};
60605b261ecSmrg#endif
60705b261ecSmrg
60805b261ecSmrg# ifdef YYPRINT
60935c4bbdfSmrg/* YYTOKNUM[NUM] -- (External) token number corresponding to the
61035c4bbdfSmrg   (internal) symbol number NUM (which must be that of a token).  */
61105b261ecSmrgstatic const yytype_uint16 yytoknum[] =
61205b261ecSmrg{
61305b261ecSmrg       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
61405b261ecSmrg     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
6156747b715Smrg     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
6166747b715Smrg     285,   286
61705b261ecSmrg};
61805b261ecSmrg# endif
61905b261ecSmrg
62035c4bbdfSmrg#define YYPACT_NINF -47
62105b261ecSmrg
62235c4bbdfSmrg#define yypact_value_is_default(Yystate) \
62335c4bbdfSmrg  (!!((Yystate) == (-47)))
62405b261ecSmrg
62535c4bbdfSmrg#define YYTABLE_NINF -1
62605b261ecSmrg
62735c4bbdfSmrg#define yytable_value_is_error(Yytable_value) \
62835c4bbdfSmrg  0
62905b261ecSmrg
63035c4bbdfSmrg  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
63135c4bbdfSmrg     STATE-NUM.  */
63205b261ecSmrgstatic const yytype_int8 yypact[] =
63305b261ecSmrg{
6346747b715Smrg     -47,     7,   -47,   -47,    -1,     0,     1,    18,    29,    15,
6356747b715Smrg      42,    17,    19,    20,    46,    50,   -47,   -47,   -47,   -47,
6366747b715Smrg     -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,
6376747b715Smrg      49,    53,    54,   -47,   -47,     6,    55,    56,    57,    58,
6386747b715Smrg     -47,   -47,   -47,   -47,   -47,    61,    61,   -47,   -47,    62,
6396747b715Smrg     -47,   -47,   -47,   -47,    61,    61,    35,    38,   -47,    61,
6406747b715Smrg     -19,   -47,    39,    35,    66,    27,    38,    67,    43,    72,
6416747b715Smrg      -3,   -19,    70,    74,   -47,   -47,   -47,   -47,   -47,   -47,
6426747b715Smrg     -47,   -47,   -47,     3,    -8,    75,   -47,   -47,    48,    43,
6436747b715Smrg      76,    61,    52,    59,    77,    78,   -47,   -47,    61,   -47,
6446747b715Smrg     -47,    61,     6,   -47,   -47,   -47,    81,    82,    61,    61,
6456747b715Smrg     -47,   -47,    83,    61,    61,   -47,   -47,    61,   -47,   -47,
6466747b715Smrg     -47
64705b261ecSmrg};
64805b261ecSmrg
64935c4bbdfSmrg  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
65035c4bbdfSmrg     Performed when YYTABLE does not specify something else to do.  Zero
65135c4bbdfSmrg     means the default is an error.  */
65235c4bbdfSmrgstatic const yytype_uint8 yydefact[] =
65335c4bbdfSmrg{
65435c4bbdfSmrg       2,     0,     1,     4,     0,     0,     0,     0,     0,     0,
65535c4bbdfSmrg       0,     0,     0,     0,     0,     0,     3,     5,    17,    14,
65635c4bbdfSmrg      15,     8,     9,    10,    11,    12,    13,    18,    19,    16,
65735c4bbdfSmrg       0,     0,     0,    37,    53,    55,     0,     0,     0,     0,
65835c4bbdfSmrg      63,    64,    32,    24,    23,     6,     6,    56,    57,     0,
65935c4bbdfSmrg      61,    21,    65,    20,     6,     6,     0,     0,    22,     6,
66035c4bbdfSmrg       0,     7,     0,    35,     0,     0,    51,     0,     0,     0,
66135c4bbdfSmrg       0,    30,     0,     0,    36,    38,    39,    40,    41,    42,
66235c4bbdfSmrg      43,    44,    45,    46,    47,     0,    52,    54,     0,    59,
66335c4bbdfSmrg       0,     6,     0,     0,     0,     0,    31,    33,     6,    48,
66435c4bbdfSmrg      49,     6,    55,    60,    62,    25,     0,     0,     6,     6,
66535c4bbdfSmrg      34,    50,     0,     6,     6,    26,    29,     6,    28,    27,
66635c4bbdfSmrg      58
66735c4bbdfSmrg};
66835c4bbdfSmrg
66935c4bbdfSmrg  /* YYPGOTO[NTERM-NUM].  */
67005b261ecSmrgstatic const yytype_int8 yypgoto[] =
67105b261ecSmrg{
6726747b715Smrg     -47,   -47,   -47,   -46,   -47,   -47,   -47,   -47,   -47,   -47,
6736747b715Smrg     -47,    16,   -47,   -47,   -47,    25,   -47,   -47,     5,     8,
6746747b715Smrg     -47,   -47,    26,   -47,   -47,    -9,   -47,     9,   -47,   -47,
6756747b715Smrg     -47,   -47,   -47
67605b261ecSmrg};
67705b261ecSmrg
67835c4bbdfSmrg  /* YYDEFGOTO[NTERM-NUM].  */
67935c4bbdfSmrgstatic const yytype_int8 yydefgoto[] =
68035c4bbdfSmrg{
68135c4bbdfSmrg      -1,     1,    16,    56,    17,    18,    19,    20,    21,    22,
68235c4bbdfSmrg      71,    72,    23,    54,    63,    64,    24,    45,    83,    84,
68335c4bbdfSmrg      85,    66,    67,    25,    46,    49,    89,    90,    26,    59,
68435c4bbdfSmrg      27,    28,    29
68535c4bbdfSmrg};
68635c4bbdfSmrg
68735c4bbdfSmrg  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
68835c4bbdfSmrg     positive, shift that token.  If negative, reduce the rule whose
68935c4bbdfSmrg     number is the opposite.  If YYTABLE_NINF, syntax error.  */
69005b261ecSmrgstatic const yytype_uint8 yytable[] =
69105b261ecSmrg{
6926747b715Smrg      57,    92,    69,    76,    77,    78,    79,     2,    60,    61,
6936747b715Smrg       3,     4,    70,    68,     5,     6,     7,     8,    80,    81,
6946747b715Smrg      82,    93,    94,    33,    95,     9,    10,    11,    47,    48,
6956747b715Smrg      30,    31,    32,    12,    34,    13,    14,    15,    76,    77,
6966747b715Smrg      78,    79,    80,    81,    82,   105,    35,    36,    37,    40,
6976747b715Smrg      38,    39,   110,    41,    42,   111,    43,    44,    50,    51,
6986747b715Smrg      52,    53,   115,   116,    55,    58,    62,   118,   119,    65,
6996747b715Smrg      73,   120,    75,    87,    88,    91,    97,    98,   101,   102,
7006747b715Smrg     108,   109,   104,   106,   113,   114,   117,    96,    74,   100,
7016747b715Smrg     107,    99,    86,   112,     0,     0,     0,     0,   103
70205b261ecSmrg};
70305b261ecSmrg
7046747b715Smrgstatic const yytype_int8 yycheck[] =
70505b261ecSmrg{
7066747b715Smrg      46,     4,    21,    11,    12,    13,    14,     0,    54,    55,
7076747b715Smrg       3,     4,    31,    59,     7,     8,     9,    10,    15,    16,
7086747b715Smrg      17,    24,    25,     5,    27,    18,    19,    20,    22,    23,
7096747b715Smrg      31,    31,    31,    26,     5,    28,    29,    30,    11,    12,
7106747b715Smrg      13,    14,    15,    16,    17,    91,    31,     5,    31,     3,
7116747b715Smrg      31,    31,    98,     3,     5,   101,     3,     3,     3,     3,
7126747b715Smrg       3,     3,   108,   109,     3,     3,    31,   113,   114,    31,
7136747b715Smrg      31,   117,     6,     6,    31,     3,     6,     3,     3,    31,
7146747b715Smrg       3,     3,     6,    31,     3,     3,     3,    71,    63,    84,
7156747b715Smrg      31,    83,    66,   102,    -1,    -1,    -1,    -1,    89
71605b261ecSmrg};
71705b261ecSmrg
71835c4bbdfSmrg  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
71935c4bbdfSmrg     symbol of state STATE-NUM.  */
72005b261ecSmrgstatic const yytype_uint8 yystos[] =
72105b261ecSmrg{
7226747b715Smrg       0,    33,     0,     3,     4,     7,     8,     9,    10,    18,
7236747b715Smrg      19,    20,    26,    28,    29,    30,    34,    36,    37,    38,
7246747b715Smrg      39,    40,    41,    44,    48,    55,    60,    62,    63,    64,
7256747b715Smrg      31,    31,    31,     5,     5,    31,     5,    31,    31,    31,
7266747b715Smrg       3,     3,     5,     3,     3,    49,    56,    22,    23,    57,
7276747b715Smrg       3,     3,     3,     3,    45,     3,    35,    35,     3,    61,
7286747b715Smrg      35,    35,    31,    46,    47,    31,    53,    54,    35,    21,
7296747b715Smrg      31,    42,    43,    31,    47,     6,    11,    12,    13,    14,
7306747b715Smrg      15,    16,    17,    50,    51,    52,    54,     6,    31,    58,
7316747b715Smrg      59,     3,     4,    24,    25,    27,    43,     6,     3,    51,
7326747b715Smrg      50,     3,    31,    59,     6,    35,    31,    31,     3,     3,
7336747b715Smrg      35,    35,    57,     3,     3,    35,    35,     3,    35,    35,
7346747b715Smrg      35
73505b261ecSmrg};
73605b261ecSmrg
73735c4bbdfSmrg  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
73835c4bbdfSmrgstatic const yytype_uint8 yyr1[] =
73935c4bbdfSmrg{
74035c4bbdfSmrg       0,    32,    33,    33,    34,    34,    35,    35,    36,    36,
74135c4bbdfSmrg      36,    36,    36,    36,    36,    36,    36,    36,    36,    36,
74235c4bbdfSmrg      37,    38,    39,    40,    41,    42,    42,    42,    42,    42,
74335c4bbdfSmrg      43,    43,    45,    44,    46,    47,    47,    49,    48,    50,
74435c4bbdfSmrg      50,    50,    50,    51,    51,    51,    52,    52,    52,    52,
74535c4bbdfSmrg      53,    54,    54,    56,    55,    57,    57,    57,    58,    59,
74635c4bbdfSmrg      59,    61,    60,    62,    63,    64
74735c4bbdfSmrg};
74805b261ecSmrg
74935c4bbdfSmrg  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
75035c4bbdfSmrgstatic const yytype_uint8 yyr2[] =
75135c4bbdfSmrg{
75235c4bbdfSmrg       0,     2,     0,     2,     1,     1,     0,     2,     1,     1,
75335c4bbdfSmrg       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
75435c4bbdfSmrg       3,     3,     4,     3,     3,     3,     4,     5,     5,     4,
75535c4bbdfSmrg       1,     2,     0,     7,     4,     1,     2,     0,     6,     1,
75635c4bbdfSmrg       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
75735c4bbdfSmrg       4,     1,     2,     0,     6,     0,     1,     1,     5,     1,
75835c4bbdfSmrg       2,     0,     7,     2,     2,     3
75935c4bbdfSmrg};
76005b261ecSmrg
76105b261ecSmrg
76235c4bbdfSmrg#define yyerrok         (yyerrstatus = 0)
76335c4bbdfSmrg#define yyclearin       (yychar = YYEMPTY)
76435c4bbdfSmrg#define YYEMPTY         (-2)
76535c4bbdfSmrg#define YYEOF           0
76605b261ecSmrg
76735c4bbdfSmrg#define YYACCEPT        goto yyacceptlab
76835c4bbdfSmrg#define YYABORT         goto yyabortlab
76935c4bbdfSmrg#define YYERROR         goto yyerrorlab
77005b261ecSmrg
77105b261ecSmrg
77235c4bbdfSmrg#define YYRECOVERING()  (!!yyerrstatus)
77335c4bbdfSmrg
77435c4bbdfSmrg#define YYBACKUP(Token, Value)                                  \
77535c4bbdfSmrgdo                                                              \
77635c4bbdfSmrg  if (yychar == YYEMPTY)                                        \
77735c4bbdfSmrg    {                                                           \
77835c4bbdfSmrg      yychar = (Token);                                         \
77935c4bbdfSmrg      yylval = (Value);                                         \
78035c4bbdfSmrg      YYPOPSTACK (yylen);                                       \
78135c4bbdfSmrg      yystate = *yyssp;                                         \
78235c4bbdfSmrg      goto yybackup;                                            \
78335c4bbdfSmrg    }                                                           \
78435c4bbdfSmrg  else                                                          \
78535c4bbdfSmrg    {                                                           \
78635c4bbdfSmrg      yyerror (YY_("syntax error: cannot back up")); \
78735c4bbdfSmrg      YYERROR;                                                  \
78835c4bbdfSmrg    }                                                           \
78935c4bbdfSmrgwhile (0)
79035c4bbdfSmrg
79135c4bbdfSmrg/* Error token number */
79235c4bbdfSmrg#define YYTERROR        1
79335c4bbdfSmrg#define YYERRCODE       256
79405b261ecSmrg
79505b261ecSmrg
79605b261ecSmrg
79705b261ecSmrg/* Enable debugging if requested.  */
79805b261ecSmrg#if YYDEBUG
79905b261ecSmrg
80005b261ecSmrg# ifndef YYFPRINTF
80105b261ecSmrg#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
80205b261ecSmrg#  define YYFPRINTF fprintf
80305b261ecSmrg# endif
80405b261ecSmrg
80535c4bbdfSmrg# define YYDPRINTF(Args)                        \
80635c4bbdfSmrgdo {                                            \
80735c4bbdfSmrg  if (yydebug)                                  \
80835c4bbdfSmrg    YYFPRINTF Args;                             \
80935c4bbdfSmrg} while (0)
81005b261ecSmrg
81135c4bbdfSmrg/* This macro is provided for backward compatibility. */
81235c4bbdfSmrg#ifndef YY_LOCATION_PRINT
81335c4bbdfSmrg# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
81435c4bbdfSmrg#endif
81505b261ecSmrg
81605b261ecSmrg
81735c4bbdfSmrg# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
81835c4bbdfSmrgdo {                                                                      \
81935c4bbdfSmrg  if (yydebug)                                                            \
82035c4bbdfSmrg    {                                                                     \
82135c4bbdfSmrg      YYFPRINTF (stderr, "%s ", Title);                                   \
82235c4bbdfSmrg      yy_symbol_print (stderr,                                            \
82335c4bbdfSmrg                  Type, Value); \
82435c4bbdfSmrg      YYFPRINTF (stderr, "\n");                                           \
82535c4bbdfSmrg    }                                                                     \
82635c4bbdfSmrg} while (0)
82735c4bbdfSmrg
82835c4bbdfSmrg
82935c4bbdfSmrg/*----------------------------------------.
83035c4bbdfSmrg| Print this symbol's value on YYOUTPUT.  |
83135c4bbdfSmrg`----------------------------------------*/
83205b261ecSmrg
83305b261ecSmrgstatic void
83405b261ecSmrgyy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
83505b261ecSmrg{
83635c4bbdfSmrg  FILE *yyo = yyoutput;
83735c4bbdfSmrg  YYUSE (yyo);
83805b261ecSmrg  if (!yyvaluep)
83905b261ecSmrg    return;
84005b261ecSmrg# ifdef YYPRINT
84105b261ecSmrg  if (yytype < YYNTOKENS)
84205b261ecSmrg    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
84305b261ecSmrg# endif
84435c4bbdfSmrg  YYUSE (yytype);
84505b261ecSmrg}
84605b261ecSmrg
84705b261ecSmrg
84805b261ecSmrg/*--------------------------------.
84905b261ecSmrg| Print this symbol on YYOUTPUT.  |
85005b261ecSmrg`--------------------------------*/
85105b261ecSmrg
85205b261ecSmrgstatic void
85305b261ecSmrgyy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
85405b261ecSmrg{
85535c4bbdfSmrg  YYFPRINTF (yyoutput, "%s %s (",
85635c4bbdfSmrg             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
85705b261ecSmrg
85805b261ecSmrg  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
85905b261ecSmrg  YYFPRINTF (yyoutput, ")");
86005b261ecSmrg}
86105b261ecSmrg
86205b261ecSmrg/*------------------------------------------------------------------.
86305b261ecSmrg| yy_stack_print -- Print the state stack from its BOTTOM up to its |
86405b261ecSmrg| TOP (included).                                                   |
86505b261ecSmrg`------------------------------------------------------------------*/
86605b261ecSmrg
86705b261ecSmrgstatic void
8684642e01fSmrgyy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
86905b261ecSmrg{
87005b261ecSmrg  YYFPRINTF (stderr, "Stack now");
8714642e01fSmrg  for (; yybottom <= yytop; yybottom++)
8724642e01fSmrg    {
8734642e01fSmrg      int yybot = *yybottom;
8744642e01fSmrg      YYFPRINTF (stderr, " %d", yybot);
8754642e01fSmrg    }
87605b261ecSmrg  YYFPRINTF (stderr, "\n");
87705b261ecSmrg}
87805b261ecSmrg
87935c4bbdfSmrg# define YY_STACK_PRINT(Bottom, Top)                            \
88035c4bbdfSmrgdo {                                                            \
88135c4bbdfSmrg  if (yydebug)                                                  \
88235c4bbdfSmrg    yy_stack_print ((Bottom), (Top));                           \
88335c4bbdfSmrg} while (0)
88405b261ecSmrg
88505b261ecSmrg
88605b261ecSmrg/*------------------------------------------------.
88705b261ecSmrg| Report that the YYRULE is going to be reduced.  |
88805b261ecSmrg`------------------------------------------------*/
88905b261ecSmrg
89005b261ecSmrgstatic void
89135c4bbdfSmrgyy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
89205b261ecSmrg{
89335c4bbdfSmrg  unsigned long int yylno = yyrline[yyrule];
89405b261ecSmrg  int yynrhs = yyr2[yyrule];
89505b261ecSmrg  int yyi;
89605b261ecSmrg  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
89735c4bbdfSmrg             yyrule - 1, yylno);
89805b261ecSmrg  /* The symbols being reduced.  */
89905b261ecSmrg  for (yyi = 0; yyi < yynrhs; yyi++)
90005b261ecSmrg    {
9014642e01fSmrg      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
90235c4bbdfSmrg      yy_symbol_print (stderr,
90335c4bbdfSmrg                       yystos[yyssp[yyi + 1 - yynrhs]],
90435c4bbdfSmrg                       &(yyvsp[(yyi + 1) - (yynrhs)])
90535c4bbdfSmrg                                              );
9064642e01fSmrg      YYFPRINTF (stderr, "\n");
90705b261ecSmrg    }
90805b261ecSmrg}
90905b261ecSmrg
91035c4bbdfSmrg# define YY_REDUCE_PRINT(Rule)          \
91135c4bbdfSmrgdo {                                    \
91235c4bbdfSmrg  if (yydebug)                          \
91335c4bbdfSmrg    yy_reduce_print (yyssp, yyvsp, Rule); \
91435c4bbdfSmrg} while (0)
91505b261ecSmrg
91605b261ecSmrg/* Nonzero means print parse trace.  It is left uninitialized so that
91705b261ecSmrg   multiple parsers can coexist.  */
91805b261ecSmrgint yydebug;
91905b261ecSmrg#else /* !YYDEBUG */
92005b261ecSmrg# define YYDPRINTF(Args)
92105b261ecSmrg# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
92205b261ecSmrg# define YY_STACK_PRINT(Bottom, Top)
92305b261ecSmrg# define YY_REDUCE_PRINT(Rule)
92405b261ecSmrg#endif /* !YYDEBUG */
92505b261ecSmrg
92605b261ecSmrg
92705b261ecSmrg/* YYINITDEPTH -- initial size of the parser's stacks.  */
92835c4bbdfSmrg#ifndef YYINITDEPTH
92905b261ecSmrg# define YYINITDEPTH 200
93005b261ecSmrg#endif
93105b261ecSmrg
93205b261ecSmrg/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
93305b261ecSmrg   if the built-in stack extension method is used).
93405b261ecSmrg
93505b261ecSmrg   Do not make this value too large; the results are undefined if
93605b261ecSmrg   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
93705b261ecSmrg   evaluated with infinite-precision integer arithmetic.  */
93805b261ecSmrg
93905b261ecSmrg#ifndef YYMAXDEPTH
94005b261ecSmrg# define YYMAXDEPTH 10000
94105b261ecSmrg#endif
94205b261ecSmrg
94305b261ecSmrg
94405b261ecSmrg#if YYERROR_VERBOSE
94505b261ecSmrg
94605b261ecSmrg# ifndef yystrlen
94705b261ecSmrg#  if defined __GLIBC__ && defined _STRING_H
94805b261ecSmrg#   define yystrlen strlen
94905b261ecSmrg#  else
95005b261ecSmrg/* Return the length of YYSTR.  */
95105b261ecSmrgstatic YYSIZE_T
95205b261ecSmrgyystrlen (const char *yystr)
95305b261ecSmrg{
95405b261ecSmrg  YYSIZE_T yylen;
95505b261ecSmrg  for (yylen = 0; yystr[yylen]; yylen++)
95605b261ecSmrg    continue;
95705b261ecSmrg  return yylen;
95805b261ecSmrg}
95905b261ecSmrg#  endif
96005b261ecSmrg# endif
96105b261ecSmrg
96205b261ecSmrg# ifndef yystpcpy
96305b261ecSmrg#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
96405b261ecSmrg#   define yystpcpy stpcpy
96505b261ecSmrg#  else
96605b261ecSmrg/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
96705b261ecSmrg   YYDEST.  */
96805b261ecSmrgstatic char *
96905b261ecSmrgyystpcpy (char *yydest, const char *yysrc)
97005b261ecSmrg{
97105b261ecSmrg  char *yyd = yydest;
97205b261ecSmrg  const char *yys = yysrc;
97305b261ecSmrg
97405b261ecSmrg  while ((*yyd++ = *yys++) != '\0')
97505b261ecSmrg    continue;
97605b261ecSmrg
97705b261ecSmrg  return yyd - 1;
97805b261ecSmrg}
97905b261ecSmrg#  endif
98005b261ecSmrg# endif
98105b261ecSmrg
98205b261ecSmrg# ifndef yytnamerr
98305b261ecSmrg/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
98405b261ecSmrg   quotes and backslashes, so that it's suitable for yyerror.  The
98505b261ecSmrg   heuristic is that double-quoting is unnecessary unless the string
98605b261ecSmrg   contains an apostrophe, a comma, or backslash (other than
98705b261ecSmrg   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
98805b261ecSmrg   null, do not copy; instead, return the length of what the result
98905b261ecSmrg   would have been.  */
99005b261ecSmrgstatic YYSIZE_T
99105b261ecSmrgyytnamerr (char *yyres, const char *yystr)
99205b261ecSmrg{
99305b261ecSmrg  if (*yystr == '"')
99405b261ecSmrg    {
99505b261ecSmrg      YYSIZE_T yyn = 0;
99605b261ecSmrg      char const *yyp = yystr;
99705b261ecSmrg
99805b261ecSmrg      for (;;)
99935c4bbdfSmrg        switch (*++yyp)
100035c4bbdfSmrg          {
100135c4bbdfSmrg          case '\'':
100235c4bbdfSmrg          case ',':
100335c4bbdfSmrg            goto do_not_strip_quotes;
100435c4bbdfSmrg
100535c4bbdfSmrg          case '\\':
100635c4bbdfSmrg            if (*++yyp != '\\')
100735c4bbdfSmrg              goto do_not_strip_quotes;
100835c4bbdfSmrg            /* Fall through.  */
100935c4bbdfSmrg          default:
101035c4bbdfSmrg            if (yyres)
101135c4bbdfSmrg              yyres[yyn] = *yyp;
101235c4bbdfSmrg            yyn++;
101335c4bbdfSmrg            break;
101435c4bbdfSmrg
101535c4bbdfSmrg          case '"':
101635c4bbdfSmrg            if (yyres)
101735c4bbdfSmrg              yyres[yyn] = '\0';
101835c4bbdfSmrg            return yyn;
101935c4bbdfSmrg          }
102005b261ecSmrg    do_not_strip_quotes: ;
102105b261ecSmrg    }
102205b261ecSmrg
102305b261ecSmrg  if (! yyres)
102405b261ecSmrg    return yystrlen (yystr);
102505b261ecSmrg
102605b261ecSmrg  return yystpcpy (yyres, yystr) - yyres;
102705b261ecSmrg}
102805b261ecSmrg# endif
102905b261ecSmrg
10309ace9065Smrg/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
10319ace9065Smrg   about the unexpected token YYTOKEN for the state stack whose top is
10329ace9065Smrg   YYSSP.
103305b261ecSmrg
10349ace9065Smrg   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
10359ace9065Smrg   not large enough to hold the message.  In that case, also set
10369ace9065Smrg   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
10379ace9065Smrg   required number of bytes is too large to store.  */
10389ace9065Smrgstatic int
10399ace9065Smrgyysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
10409ace9065Smrg                yytype_int16 *yyssp, int yytoken)
10419ace9065Smrg{
104235c4bbdfSmrg  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
10439ace9065Smrg  YYSIZE_T yysize = yysize0;
10449ace9065Smrg  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
10459ace9065Smrg  /* Internationalized format string. */
104635c4bbdfSmrg  const char *yyformat = YY_NULLPTR;
10479ace9065Smrg  /* Arguments of yyformat. */
10489ace9065Smrg  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
10499ace9065Smrg  /* Number of reported tokens (one for the "unexpected", one per
10509ace9065Smrg     "expected"). */
10519ace9065Smrg  int yycount = 0;
10529ace9065Smrg
10539ace9065Smrg  /* There are many possibilities here to consider:
10549ace9065Smrg     - If this state is a consistent state with a default action, then
10559ace9065Smrg       the only way this function was invoked is if the default action
10569ace9065Smrg       is an error action.  In that case, don't check for expected
10579ace9065Smrg       tokens because there are none.
10589ace9065Smrg     - The only way there can be no lookahead present (in yychar) is if
10599ace9065Smrg       this state is a consistent state with a default action.  Thus,
10609ace9065Smrg       detecting the absence of a lookahead is sufficient to determine
10619ace9065Smrg       that there is no unexpected or expected token to report.  In that
10629ace9065Smrg       case, just report a simple "syntax error".
10639ace9065Smrg     - Don't assume there isn't a lookahead just because this state is a
10649ace9065Smrg       consistent state with a default action.  There might have been a
10659ace9065Smrg       previous inconsistent state, consistent state with a non-default
10669ace9065Smrg       action, or user semantic action that manipulated yychar.
10679ace9065Smrg     - Of course, the expected token list depends on states to have
10689ace9065Smrg       correct lookahead information, and it depends on the parser not
10699ace9065Smrg       to perform extra reductions after fetching a lookahead from the
10709ace9065Smrg       scanner and before detecting a syntax error.  Thus, state merging
10719ace9065Smrg       (from LALR or IELR) and default reductions corrupt the expected
10729ace9065Smrg       token list.  However, the list is correct for canonical LR with
10739ace9065Smrg       one exception: it will still contain any token that will not be
10749ace9065Smrg       accepted due to an error action in a later state.
10759ace9065Smrg  */
10769ace9065Smrg  if (yytoken != YYEMPTY)
107705b261ecSmrg    {
10789ace9065Smrg      int yyn = yypact[*yyssp];
10799ace9065Smrg      yyarg[yycount++] = yytname[yytoken];
10809ace9065Smrg      if (!yypact_value_is_default (yyn))
10819ace9065Smrg        {
10829ace9065Smrg          /* Start YYX at -YYN if negative to avoid negative indexes in
10839ace9065Smrg             YYCHECK.  In other words, skip the first -YYN actions for
10849ace9065Smrg             this state because they are default actions.  */
10859ace9065Smrg          int yyxbegin = yyn < 0 ? -yyn : 0;
10869ace9065Smrg          /* Stay within bounds of both yycheck and yytname.  */
10879ace9065Smrg          int yychecklim = YYLAST - yyn + 1;
10889ace9065Smrg          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
10899ace9065Smrg          int yyx;
10909ace9065Smrg
10919ace9065Smrg          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
10929ace9065Smrg            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
10939ace9065Smrg                && !yytable_value_is_error (yytable[yyx + yyn]))
10949ace9065Smrg              {
10959ace9065Smrg                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
10969ace9065Smrg                  {
10979ace9065Smrg                    yycount = 1;
10989ace9065Smrg                    yysize = yysize0;
10999ace9065Smrg                    break;
11009ace9065Smrg                  }
11019ace9065Smrg                yyarg[yycount++] = yytname[yyx];
110235c4bbdfSmrg                {
110335c4bbdfSmrg                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
110435c4bbdfSmrg                  if (! (yysize <= yysize1
110535c4bbdfSmrg                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
110635c4bbdfSmrg                    return 2;
110735c4bbdfSmrg                  yysize = yysize1;
110835c4bbdfSmrg                }
11099ace9065Smrg              }
11109ace9065Smrg        }
11119ace9065Smrg    }
111205b261ecSmrg
11139ace9065Smrg  switch (yycount)
11149ace9065Smrg    {
11159ace9065Smrg# define YYCASE_(N, S)                      \
11169ace9065Smrg      case N:                               \
11179ace9065Smrg        yyformat = S;                       \
11189ace9065Smrg      break
11199ace9065Smrg      YYCASE_(0, YY_("syntax error"));
11209ace9065Smrg      YYCASE_(1, YY_("syntax error, unexpected %s"));
11219ace9065Smrg      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
11229ace9065Smrg      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
11239ace9065Smrg      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
11249ace9065Smrg      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
11259ace9065Smrg# undef YYCASE_
11269ace9065Smrg    }
112705b261ecSmrg
112835c4bbdfSmrg  {
112935c4bbdfSmrg    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
113035c4bbdfSmrg    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
113135c4bbdfSmrg      return 2;
113235c4bbdfSmrg    yysize = yysize1;
113335c4bbdfSmrg  }
113405b261ecSmrg
11359ace9065Smrg  if (*yymsg_alloc < yysize)
11369ace9065Smrg    {
11379ace9065Smrg      *yymsg_alloc = 2 * yysize;
11389ace9065Smrg      if (! (yysize <= *yymsg_alloc
11399ace9065Smrg             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
11409ace9065Smrg        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
11419ace9065Smrg      return 1;
114205b261ecSmrg    }
11439ace9065Smrg
11449ace9065Smrg  /* Avoid sprintf, as that infringes on the user's name space.
11459ace9065Smrg     Don't have undefined behavior even if the translation
11469ace9065Smrg     produced a string with the wrong number of "%s"s.  */
11479ace9065Smrg  {
11489ace9065Smrg    char *yyp = *yymsg;
11499ace9065Smrg    int yyi = 0;
11509ace9065Smrg    while ((*yyp = *yyformat) != '\0')
11519ace9065Smrg      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
11529ace9065Smrg        {
11539ace9065Smrg          yyp += yytnamerr (yyp, yyarg[yyi++]);
11549ace9065Smrg          yyformat += 2;
11559ace9065Smrg        }
11569ace9065Smrg      else
11579ace9065Smrg        {
11589ace9065Smrg          yyp++;
11599ace9065Smrg          yyformat++;
11609ace9065Smrg        }
11619ace9065Smrg  }
11629ace9065Smrg  return 0;
116305b261ecSmrg}
116405b261ecSmrg#endif /* YYERROR_VERBOSE */
116505b261ecSmrg
116605b261ecSmrg/*-----------------------------------------------.
116705b261ecSmrg| Release the memory associated to this symbol.  |
116805b261ecSmrg`-----------------------------------------------*/
116905b261ecSmrg
117005b261ecSmrgstatic void
117105b261ecSmrgyydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
117205b261ecSmrg{
117305b261ecSmrg  YYUSE (yyvaluep);
117405b261ecSmrg  if (!yymsg)
117505b261ecSmrg    yymsg = "Deleting";
117605b261ecSmrg  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
117705b261ecSmrg
117835c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
117935c4bbdfSmrg  YYUSE (yytype);
118035c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_END
118105b261ecSmrg}
118205b261ecSmrg
11839ace9065Smrg
118405b261ecSmrg
118505b261ecSmrg
11864642e01fSmrg/* The lookahead symbol.  */
118705b261ecSmrgint yychar;
118805b261ecSmrg
11894642e01fSmrg/* The semantic value of the lookahead symbol.  */
119005b261ecSmrgYYSTYPE yylval;
119105b261ecSmrg/* Number of syntax errors so far.  */
119205b261ecSmrgint yynerrs;
119305b261ecSmrg
119405b261ecSmrg
11959ace9065Smrg/*----------.
11969ace9065Smrg| yyparse.  |
11979ace9065Smrg`----------*/
119805b261ecSmrg
119905b261ecSmrgint
120005b261ecSmrgyyparse (void)
120105b261ecSmrg{
12024642e01fSmrg    int yystate;
12034642e01fSmrg    /* Number of tokens to shift before error messages enabled.  */
12044642e01fSmrg    int yyerrstatus;
120505b261ecSmrg
12064642e01fSmrg    /* The stacks and their tools:
120735c4bbdfSmrg       'yyss': related to states.
120835c4bbdfSmrg       'yyvs': related to semantic values.
120905b261ecSmrg
121035c4bbdfSmrg       Refer to the stacks through separate pointers, to allow yyoverflow
12114642e01fSmrg       to reallocate them elsewhere.  */
121205b261ecSmrg
12134642e01fSmrg    /* The state stack.  */
12144642e01fSmrg    yytype_int16 yyssa[YYINITDEPTH];
12154642e01fSmrg    yytype_int16 *yyss;
12164642e01fSmrg    yytype_int16 *yyssp;
121705b261ecSmrg
12184642e01fSmrg    /* The semantic value stack.  */
12194642e01fSmrg    YYSTYPE yyvsa[YYINITDEPTH];
12204642e01fSmrg    YYSTYPE *yyvs;
12214642e01fSmrg    YYSTYPE *yyvsp;
122205b261ecSmrg
12234642e01fSmrg    YYSIZE_T yystacksize;
122405b261ecSmrg
12254642e01fSmrg  int yyn;
12264642e01fSmrg  int yyresult;
12274642e01fSmrg  /* Lookahead token as an internal (translated) token number.  */
122835c4bbdfSmrg  int yytoken = 0;
122905b261ecSmrg  /* The variables used to return semantic value and location from the
123005b261ecSmrg     action routines.  */
123105b261ecSmrg  YYSTYPE yyval;
123205b261ecSmrg
12334642e01fSmrg#if YYERROR_VERBOSE
12344642e01fSmrg  /* Buffer for error messages, and its allocated size.  */
12354642e01fSmrg  char yymsgbuf[128];
12364642e01fSmrg  char *yymsg = yymsgbuf;
12374642e01fSmrg  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
12384642e01fSmrg#endif
12394642e01fSmrg
12404642e01fSmrg#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
124105b261ecSmrg
124205b261ecSmrg  /* The number of symbols on the RHS of the reduced rule.
124305b261ecSmrg     Keep to zero when no symbol should be popped.  */
124405b261ecSmrg  int yylen = 0;
124505b261ecSmrg
124635c4bbdfSmrg  yyssp = yyss = yyssa;
124735c4bbdfSmrg  yyvsp = yyvs = yyvsa;
12484642e01fSmrg  yystacksize = YYINITDEPTH;
12494642e01fSmrg
125005b261ecSmrg  YYDPRINTF ((stderr, "Starting parse\n"));
125105b261ecSmrg
125205b261ecSmrg  yystate = 0;
125305b261ecSmrg  yyerrstatus = 0;
125405b261ecSmrg  yynerrs = 0;
12554642e01fSmrg  yychar = YYEMPTY; /* Cause a token to be read.  */
125605b261ecSmrg  goto yysetstate;
125705b261ecSmrg
125805b261ecSmrg/*------------------------------------------------------------.
125905b261ecSmrg| yynewstate -- Push a new state, which is found in yystate.  |
126005b261ecSmrg`------------------------------------------------------------*/
126105b261ecSmrg yynewstate:
126205b261ecSmrg  /* In all cases, when you get here, the value and location stacks
126305b261ecSmrg     have just been pushed.  So pushing a state here evens the stacks.  */
126405b261ecSmrg  yyssp++;
126505b261ecSmrg
126605b261ecSmrg yysetstate:
126705b261ecSmrg  *yyssp = yystate;
126805b261ecSmrg
126905b261ecSmrg  if (yyss + yystacksize - 1 <= yyssp)
127005b261ecSmrg    {
127105b261ecSmrg      /* Get the current used size of the three stacks, in elements.  */
127205b261ecSmrg      YYSIZE_T yysize = yyssp - yyss + 1;
127305b261ecSmrg
127405b261ecSmrg#ifdef yyoverflow
127505b261ecSmrg      {
127635c4bbdfSmrg        /* Give user a chance to reallocate the stack.  Use copies of
127735c4bbdfSmrg           these so that the &'s don't force the real ones into
127835c4bbdfSmrg           memory.  */
127935c4bbdfSmrg        YYSTYPE *yyvs1 = yyvs;
128035c4bbdfSmrg        yytype_int16 *yyss1 = yyss;
128135c4bbdfSmrg
128235c4bbdfSmrg        /* Each stack pointer address is followed by the size of the
128335c4bbdfSmrg           data in use in that stack, in bytes.  This used to be a
128435c4bbdfSmrg           conditional around just the two extra args, but that might
128535c4bbdfSmrg           be undefined if yyoverflow is a macro.  */
128635c4bbdfSmrg        yyoverflow (YY_("memory exhausted"),
128735c4bbdfSmrg                    &yyss1, yysize * sizeof (*yyssp),
128835c4bbdfSmrg                    &yyvs1, yysize * sizeof (*yyvsp),
128935c4bbdfSmrg                    &yystacksize);
129035c4bbdfSmrg
129135c4bbdfSmrg        yyss = yyss1;
129235c4bbdfSmrg        yyvs = yyvs1;
129305b261ecSmrg      }
129405b261ecSmrg#else /* no yyoverflow */
129505b261ecSmrg# ifndef YYSTACK_RELOCATE
129605b261ecSmrg      goto yyexhaustedlab;
129705b261ecSmrg# else
129805b261ecSmrg      /* Extend the stack our own way.  */
129905b261ecSmrg      if (YYMAXDEPTH <= yystacksize)
130035c4bbdfSmrg        goto yyexhaustedlab;
130105b261ecSmrg      yystacksize *= 2;
130205b261ecSmrg      if (YYMAXDEPTH < yystacksize)
130335c4bbdfSmrg        yystacksize = YYMAXDEPTH;
130405b261ecSmrg
130505b261ecSmrg      {
130635c4bbdfSmrg        yytype_int16 *yyss1 = yyss;
130735c4bbdfSmrg        union yyalloc *yyptr =
130835c4bbdfSmrg          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
130935c4bbdfSmrg        if (! yyptr)
131035c4bbdfSmrg          goto yyexhaustedlab;
131135c4bbdfSmrg        YYSTACK_RELOCATE (yyss_alloc, yyss);
131235c4bbdfSmrg        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
131305b261ecSmrg#  undef YYSTACK_RELOCATE
131435c4bbdfSmrg        if (yyss1 != yyssa)
131535c4bbdfSmrg          YYSTACK_FREE (yyss1);
131605b261ecSmrg      }
131705b261ecSmrg# endif
131805b261ecSmrg#endif /* no yyoverflow */
131905b261ecSmrg
132005b261ecSmrg      yyssp = yyss + yysize - 1;
132105b261ecSmrg      yyvsp = yyvs + yysize - 1;
132205b261ecSmrg
132305b261ecSmrg      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
132435c4bbdfSmrg                  (unsigned long int) yystacksize));
132505b261ecSmrg
132605b261ecSmrg      if (yyss + yystacksize - 1 <= yyssp)
132735c4bbdfSmrg        YYABORT;
132805b261ecSmrg    }
132905b261ecSmrg
133005b261ecSmrg  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
133105b261ecSmrg
13324642e01fSmrg  if (yystate == YYFINAL)
13334642e01fSmrg    YYACCEPT;
13344642e01fSmrg
133505b261ecSmrg  goto yybackup;
133605b261ecSmrg
133705b261ecSmrg/*-----------.
133805b261ecSmrg| yybackup.  |
133905b261ecSmrg`-----------*/
134005b261ecSmrgyybackup:
134105b261ecSmrg
134205b261ecSmrg  /* Do appropriate processing given the current state.  Read a
13434642e01fSmrg     lookahead token if we need one and don't already have one.  */
134405b261ecSmrg
13454642e01fSmrg  /* First try to decide what to do without reference to lookahead token.  */
134605b261ecSmrg  yyn = yypact[yystate];
13479ace9065Smrg  if (yypact_value_is_default (yyn))
134805b261ecSmrg    goto yydefault;
134905b261ecSmrg
13504642e01fSmrg  /* Not known => get a lookahead token if don't already have one.  */
135105b261ecSmrg
13524642e01fSmrg  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
135305b261ecSmrg  if (yychar == YYEMPTY)
135405b261ecSmrg    {
135505b261ecSmrg      YYDPRINTF ((stderr, "Reading a token: "));
135635c4bbdfSmrg      yychar = yylex ();
135705b261ecSmrg    }
135805b261ecSmrg
135905b261ecSmrg  if (yychar <= YYEOF)
136005b261ecSmrg    {
136105b261ecSmrg      yychar = yytoken = YYEOF;
136205b261ecSmrg      YYDPRINTF ((stderr, "Now at end of input.\n"));
136305b261ecSmrg    }
136405b261ecSmrg  else
136505b261ecSmrg    {
136605b261ecSmrg      yytoken = YYTRANSLATE (yychar);
136705b261ecSmrg      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
136805b261ecSmrg    }
136905b261ecSmrg
137005b261ecSmrg  /* If the proper action on seeing token YYTOKEN is to reduce or to
137105b261ecSmrg     detect an error, take that action.  */
137205b261ecSmrg  yyn += yytoken;
137305b261ecSmrg  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
137405b261ecSmrg    goto yydefault;
137505b261ecSmrg  yyn = yytable[yyn];
137605b261ecSmrg  if (yyn <= 0)
137705b261ecSmrg    {
13789ace9065Smrg      if (yytable_value_is_error (yyn))
13799ace9065Smrg        goto yyerrlab;
138005b261ecSmrg      yyn = -yyn;
138105b261ecSmrg      goto yyreduce;
138205b261ecSmrg    }
138305b261ecSmrg
138405b261ecSmrg  /* Count tokens shifted since error; after three, turn off error
138505b261ecSmrg     status.  */
138605b261ecSmrg  if (yyerrstatus)
138705b261ecSmrg    yyerrstatus--;
138805b261ecSmrg
13894642e01fSmrg  /* Shift the lookahead token.  */
139005b261ecSmrg  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
139105b261ecSmrg
13924642e01fSmrg  /* Discard the shifted token.  */
13934642e01fSmrg  yychar = YYEMPTY;
139405b261ecSmrg
139505b261ecSmrg  yystate = yyn;
139635c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
139705b261ecSmrg  *++yyvsp = yylval;
139835c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_END
139905b261ecSmrg
140005b261ecSmrg  goto yynewstate;
140105b261ecSmrg
140205b261ecSmrg
140305b261ecSmrg/*-----------------------------------------------------------.
140405b261ecSmrg| yydefault -- do the default action for the current state.  |
140505b261ecSmrg`-----------------------------------------------------------*/
140605b261ecSmrgyydefault:
140705b261ecSmrg  yyn = yydefact[yystate];
140805b261ecSmrg  if (yyn == 0)
140905b261ecSmrg    goto yyerrlab;
141005b261ecSmrg  goto yyreduce;
141105b261ecSmrg
141205b261ecSmrg
141305b261ecSmrg/*-----------------------------.
141405b261ecSmrg| yyreduce -- Do a reduction.  |
141505b261ecSmrg`-----------------------------*/
141605b261ecSmrgyyreduce:
141705b261ecSmrg  /* yyn is the number of a rule to reduce with.  */
141805b261ecSmrg  yylen = yyr2[yyn];
141905b261ecSmrg
142005b261ecSmrg  /* If YYLEN is nonzero, implement the default value of the action:
142135c4bbdfSmrg     '$$ = $1'.
142205b261ecSmrg
142305b261ecSmrg     Otherwise, the following line sets YYVAL to garbage.
142405b261ecSmrg     This behavior is undocumented and Bison
142505b261ecSmrg     users should not rely upon it.  Assigning to YYVAL
142605b261ecSmrg     unconditionally makes the parser a bit smaller, and it avoids a
142705b261ecSmrg     GCC warning that YYVAL may be used uninitialized.  */
142805b261ecSmrg  yyval = yyvsp[1-yylen];
142905b261ecSmrg
143005b261ecSmrg
143105b261ecSmrg  YY_REDUCE_PRINT (yyn);
143205b261ecSmrg  switch (yyn)
143305b261ecSmrg    {
14346747b715Smrg        case 20:
143535c4bbdfSmrg#line 160 "winprefsyacc.y" /* yacc.c:1646  */
143635c4bbdfSmrg    { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
143735c4bbdfSmrg#line 1438 "winprefsyacc.c" /* yacc.c:1646  */
143805b261ecSmrg    break;
143905b261ecSmrg
14406747b715Smrg  case 21:
144135c4bbdfSmrg#line 163 "winprefsyacc.y" /* yacc.c:1646  */
144235c4bbdfSmrg    { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
144335c4bbdfSmrg#line 1444 "winprefsyacc.c" /* yacc.c:1646  */
144405b261ecSmrg    break;
144505b261ecSmrg
14466747b715Smrg  case 22:
144735c4bbdfSmrg#line 166 "winprefsyacc.y" /* yacc.c:1646  */
144835c4bbdfSmrg    { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); }
144935c4bbdfSmrg#line 1450 "winprefsyacc.c" /* yacc.c:1646  */
145005b261ecSmrg    break;
145105b261ecSmrg
14526747b715Smrg  case 23:
145335c4bbdfSmrg#line 169 "winprefsyacc.y" /* yacc.c:1646  */
145435c4bbdfSmrg    { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
145535c4bbdfSmrg#line 1456 "winprefsyacc.c" /* yacc.c:1646  */
145605b261ecSmrg    break;
145705b261ecSmrg
14586747b715Smrg  case 24:
145935c4bbdfSmrg#line 172 "winprefsyacc.y" /* yacc.c:1646  */
146035c4bbdfSmrg    { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
146135c4bbdfSmrg#line 1462 "winprefsyacc.c" /* yacc.c:1646  */
146205b261ecSmrg    break;
146305b261ecSmrg
14646747b715Smrg  case 25:
146535c4bbdfSmrg#line 175 "winprefsyacc.y" /* yacc.c:1646  */
146605b261ecSmrg    { AddMenuLine("-", CMD_SEPARATOR, ""); }
146735c4bbdfSmrg#line 1468 "winprefsyacc.c" /* yacc.c:1646  */
146805b261ecSmrg    break;
146905b261ecSmrg
14706747b715Smrg  case 26:
147135c4bbdfSmrg#line 176 "winprefsyacc.y" /* yacc.c:1646  */
147235c4bbdfSmrg    { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); }
147335c4bbdfSmrg#line 1474 "winprefsyacc.c" /* yacc.c:1646  */
147405b261ecSmrg    break;
147505b261ecSmrg
14766747b715Smrg  case 27:
147735c4bbdfSmrg#line 177 "winprefsyacc.y" /* yacc.c:1646  */
147835c4bbdfSmrg    { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
147935c4bbdfSmrg#line 1480 "winprefsyacc.c" /* yacc.c:1646  */
148005b261ecSmrg    break;
148105b261ecSmrg
14826747b715Smrg  case 28:
148335c4bbdfSmrg#line 178 "winprefsyacc.y" /* yacc.c:1646  */
148435c4bbdfSmrg    { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
148535c4bbdfSmrg#line 1486 "winprefsyacc.c" /* yacc.c:1646  */
148605b261ecSmrg    break;
148705b261ecSmrg
14886747b715Smrg  case 29:
148935c4bbdfSmrg#line 179 "winprefsyacc.y" /* yacc.c:1646  */
149035c4bbdfSmrg    { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); }
149135c4bbdfSmrg#line 1492 "winprefsyacc.c" /* yacc.c:1646  */
149205b261ecSmrg    break;
149305b261ecSmrg
14946747b715Smrg  case 32:
149535c4bbdfSmrg#line 186 "winprefsyacc.y" /* yacc.c:1646  */
149635c4bbdfSmrg    { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
149735c4bbdfSmrg#line 1498 "winprefsyacc.c" /* yacc.c:1646  */
149805b261ecSmrg    break;
149905b261ecSmrg
15006747b715Smrg  case 33:
150135c4bbdfSmrg#line 186 "winprefsyacc.y" /* yacc.c:1646  */
150205b261ecSmrg    {CloseMenu();}
150335c4bbdfSmrg#line 1504 "winprefsyacc.c" /* yacc.c:1646  */
150405b261ecSmrg    break;
150505b261ecSmrg
15066747b715Smrg  case 34:
150735c4bbdfSmrg#line 189 "winprefsyacc.y" /* yacc.c:1646  */
150835c4bbdfSmrg    { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); }
150935c4bbdfSmrg#line 1510 "winprefsyacc.c" /* yacc.c:1646  */
151005b261ecSmrg    break;
151105b261ecSmrg
15126747b715Smrg  case 37:
151335c4bbdfSmrg#line 196 "winprefsyacc.y" /* yacc.c:1646  */
151405b261ecSmrg    {OpenIcons();}
151535c4bbdfSmrg#line 1516 "winprefsyacc.c" /* yacc.c:1646  */
151605b261ecSmrg    break;
151705b261ecSmrg
15186747b715Smrg  case 38:
151935c4bbdfSmrg#line 196 "winprefsyacc.y" /* yacc.c:1646  */
152005b261ecSmrg    {CloseIcons();}
152135c4bbdfSmrg#line 1522 "winprefsyacc.c" /* yacc.c:1646  */
152205b261ecSmrg    break;
152305b261ecSmrg
15246747b715Smrg  case 39:
152535c4bbdfSmrg#line 199 "winprefsyacc.y" /* yacc.c:1646  */
15266747b715Smrg    { (yyval.uVal)=STYLE_TOPMOST; }
152735c4bbdfSmrg#line 1528 "winprefsyacc.c" /* yacc.c:1646  */
15286747b715Smrg    break;
15296747b715Smrg
15306747b715Smrg  case 40:
153135c4bbdfSmrg#line 200 "winprefsyacc.y" /* yacc.c:1646  */
15326747b715Smrg    { (yyval.uVal)=STYLE_MAXIMIZE; }
153335c4bbdfSmrg#line 1534 "winprefsyacc.c" /* yacc.c:1646  */
15346747b715Smrg    break;
15356747b715Smrg
15366747b715Smrg  case 41:
153735c4bbdfSmrg#line 201 "winprefsyacc.y" /* yacc.c:1646  */
15386747b715Smrg    { (yyval.uVal)=STYLE_MINIMIZE; }
153935c4bbdfSmrg#line 1540 "winprefsyacc.c" /* yacc.c:1646  */
15406747b715Smrg    break;
15416747b715Smrg
15426747b715Smrg  case 42:
154335c4bbdfSmrg#line 202 "winprefsyacc.y" /* yacc.c:1646  */
15446747b715Smrg    { (yyval.uVal)=STYLE_BOTTOM; }
154535c4bbdfSmrg#line 1546 "winprefsyacc.c" /* yacc.c:1646  */
15466747b715Smrg    break;
15476747b715Smrg
15486747b715Smrg  case 43:
154935c4bbdfSmrg#line 205 "winprefsyacc.y" /* yacc.c:1646  */
15506747b715Smrg    { (yyval.uVal)=STYLE_NOTITLE; }
155135c4bbdfSmrg#line 1552 "winprefsyacc.c" /* yacc.c:1646  */
15526747b715Smrg    break;
15536747b715Smrg
15546747b715Smrg  case 44:
155535c4bbdfSmrg#line 206 "winprefsyacc.y" /* yacc.c:1646  */
15566747b715Smrg    { (yyval.uVal)=STYLE_OUTLINE; }
155735c4bbdfSmrg#line 1558 "winprefsyacc.c" /* yacc.c:1646  */
15586747b715Smrg    break;
15596747b715Smrg
15606747b715Smrg  case 45:
156135c4bbdfSmrg#line 207 "winprefsyacc.y" /* yacc.c:1646  */
15626747b715Smrg    { (yyval.uVal)=STYLE_NOFRAME; }
156335c4bbdfSmrg#line 1564 "winprefsyacc.c" /* yacc.c:1646  */
15646747b715Smrg    break;
15656747b715Smrg
15666747b715Smrg  case 46:
156735c4bbdfSmrg#line 210 "winprefsyacc.y" /* yacc.c:1646  */
156835c4bbdfSmrg    { (yyval.uVal)=(yyvsp[0].uVal); }
156935c4bbdfSmrg#line 1570 "winprefsyacc.c" /* yacc.c:1646  */
15706747b715Smrg    break;
15716747b715Smrg
15726747b715Smrg  case 47:
157335c4bbdfSmrg#line 211 "winprefsyacc.y" /* yacc.c:1646  */
157435c4bbdfSmrg    { (yyval.uVal)=(yyvsp[0].uVal); }
157535c4bbdfSmrg#line 1576 "winprefsyacc.c" /* yacc.c:1646  */
15766747b715Smrg    break;
15776747b715Smrg
15786747b715Smrg  case 48:
157935c4bbdfSmrg#line 212 "winprefsyacc.y" /* yacc.c:1646  */
158035c4bbdfSmrg    { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
158135c4bbdfSmrg#line 1582 "winprefsyacc.c" /* yacc.c:1646  */
15826747b715Smrg    break;
15836747b715Smrg
15846747b715Smrg  case 49:
158535c4bbdfSmrg#line 213 "winprefsyacc.y" /* yacc.c:1646  */
158635c4bbdfSmrg    { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
158735c4bbdfSmrg#line 1588 "winprefsyacc.c" /* yacc.c:1646  */
15886747b715Smrg    break;
15896747b715Smrg
15906747b715Smrg  case 50:
159135c4bbdfSmrg#line 216 "winprefsyacc.y" /* yacc.c:1646  */
159235c4bbdfSmrg    { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); }
159335c4bbdfSmrg#line 1594 "winprefsyacc.c" /* yacc.c:1646  */
15946747b715Smrg    break;
15956747b715Smrg
15966747b715Smrg  case 53:
159735c4bbdfSmrg#line 223 "winprefsyacc.y" /* yacc.c:1646  */
15986747b715Smrg    {OpenStyles();}
159935c4bbdfSmrg#line 1600 "winprefsyacc.c" /* yacc.c:1646  */
16006747b715Smrg    break;
16016747b715Smrg
16026747b715Smrg  case 54:
160335c4bbdfSmrg#line 223 "winprefsyacc.y" /* yacc.c:1646  */
16046747b715Smrg    {CloseStyles();}
160535c4bbdfSmrg#line 1606 "winprefsyacc.c" /* yacc.c:1646  */
16066747b715Smrg    break;
16076747b715Smrg
16086747b715Smrg  case 55:
160935c4bbdfSmrg#line 226 "winprefsyacc.y" /* yacc.c:1646  */
161005b261ecSmrg    { (yyval.iVal)=AT_END; }
161135c4bbdfSmrg#line 1612 "winprefsyacc.c" /* yacc.c:1646  */
161205b261ecSmrg    break;
161305b261ecSmrg
16146747b715Smrg  case 56:
161535c4bbdfSmrg#line 227 "winprefsyacc.y" /* yacc.c:1646  */
161605b261ecSmrg    { (yyval.iVal)=AT_START; }
161735c4bbdfSmrg#line 1618 "winprefsyacc.c" /* yacc.c:1646  */
161805b261ecSmrg    break;
161905b261ecSmrg
16206747b715Smrg  case 57:
162135c4bbdfSmrg#line 228 "winprefsyacc.y" /* yacc.c:1646  */
162205b261ecSmrg    { (yyval.iVal)=AT_END; }
162335c4bbdfSmrg#line 1624 "winprefsyacc.c" /* yacc.c:1646  */
162405b261ecSmrg    break;
162505b261ecSmrg
16266747b715Smrg  case 58:
162735c4bbdfSmrg#line 231 "winprefsyacc.y" /* yacc.c:1646  */
162835c4bbdfSmrg    { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); }
162935c4bbdfSmrg#line 1630 "winprefsyacc.c" /* yacc.c:1646  */
163005b261ecSmrg    break;
163105b261ecSmrg
16326747b715Smrg  case 61:
163335c4bbdfSmrg#line 238 "winprefsyacc.y" /* yacc.c:1646  */
163405b261ecSmrg    {OpenSysMenu();}
163535c4bbdfSmrg#line 1636 "winprefsyacc.c" /* yacc.c:1646  */
163605b261ecSmrg    break;
163705b261ecSmrg
16386747b715Smrg  case 62:
163935c4bbdfSmrg#line 238 "winprefsyacc.y" /* yacc.c:1646  */
164005b261ecSmrg    {CloseSysMenu();}
164135c4bbdfSmrg#line 1642 "winprefsyacc.c" /* yacc.c:1646  */
164205b261ecSmrg    break;
164305b261ecSmrg
16446747b715Smrg  case 63:
164535c4bbdfSmrg#line 241 "winprefsyacc.y" /* yacc.c:1646  */
16466747b715Smrg    { pref.fForceExit = TRUE; }
164735c4bbdfSmrg#line 1648 "winprefsyacc.c" /* yacc.c:1646  */
16486747b715Smrg    break;
16496747b715Smrg
16506747b715Smrg  case 64:
165135c4bbdfSmrg#line 244 "winprefsyacc.y" /* yacc.c:1646  */
165205b261ecSmrg    { pref.fSilentExit = TRUE; }
165335c4bbdfSmrg#line 1654 "winprefsyacc.c" /* yacc.c:1646  */
165405b261ecSmrg    break;
165505b261ecSmrg
16566747b715Smrg  case 65:
165735c4bbdfSmrg#line 247 "winprefsyacc.y" /* yacc.c:1646  */
165835c4bbdfSmrg    { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
165935c4bbdfSmrg#line 1660 "winprefsyacc.c" /* yacc.c:1646  */
166005b261ecSmrg    break;
166105b261ecSmrg
166205b261ecSmrg
166335c4bbdfSmrg#line 1664 "winprefsyacc.c" /* yacc.c:1646  */
166405b261ecSmrg      default: break;
166505b261ecSmrg    }
16669ace9065Smrg  /* User semantic actions sometimes alter yychar, and that requires
16679ace9065Smrg     that yytoken be updated with the new translation.  We take the
16689ace9065Smrg     approach of translating immediately before every use of yytoken.
16699ace9065Smrg     One alternative is translating here after every semantic action,
16709ace9065Smrg     but that translation would be missed if the semantic action invokes
16719ace9065Smrg     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
16729ace9065Smrg     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
16739ace9065Smrg     incorrect destructor might then be invoked immediately.  In the
16749ace9065Smrg     case of YYERROR or YYBACKUP, subsequent parser actions might lead
16759ace9065Smrg     to an incorrect destructor call or verbose syntax error message
16769ace9065Smrg     before the lookahead is translated.  */
167705b261ecSmrg  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
167805b261ecSmrg
167905b261ecSmrg  YYPOPSTACK (yylen);
168005b261ecSmrg  yylen = 0;
168105b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
168205b261ecSmrg
168305b261ecSmrg  *++yyvsp = yyval;
168405b261ecSmrg
168535c4bbdfSmrg  /* Now 'shift' the result of the reduction.  Determine what state
168605b261ecSmrg     that goes to, based on the state we popped back to and the rule
168705b261ecSmrg     number reduced by.  */
168805b261ecSmrg
168905b261ecSmrg  yyn = yyr1[yyn];
169005b261ecSmrg
169105b261ecSmrg  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
169205b261ecSmrg  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
169305b261ecSmrg    yystate = yytable[yystate];
169405b261ecSmrg  else
169505b261ecSmrg    yystate = yydefgoto[yyn - YYNTOKENS];
169605b261ecSmrg
169705b261ecSmrg  goto yynewstate;
169805b261ecSmrg
169905b261ecSmrg
170035c4bbdfSmrg/*--------------------------------------.
170135c4bbdfSmrg| yyerrlab -- here on detecting error.  |
170235c4bbdfSmrg`--------------------------------------*/
170305b261ecSmrgyyerrlab:
17049ace9065Smrg  /* Make sure we have latest lookahead translation.  See comments at
17059ace9065Smrg     user semantic actions for why this is necessary.  */
17069ace9065Smrg  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
17079ace9065Smrg
170805b261ecSmrg  /* If not already recovering from an error, report this error.  */
170905b261ecSmrg  if (!yyerrstatus)
171005b261ecSmrg    {
171105b261ecSmrg      ++yynerrs;
171205b261ecSmrg#if ! YYERROR_VERBOSE
171305b261ecSmrg      yyerror (YY_("syntax error"));
171405b261ecSmrg#else
17159ace9065Smrg# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
17169ace9065Smrg                                        yyssp, yytoken)
171705b261ecSmrg      {
17189ace9065Smrg        char const *yymsgp = YY_("syntax error");
17199ace9065Smrg        int yysyntax_error_status;
17209ace9065Smrg        yysyntax_error_status = YYSYNTAX_ERROR;
17219ace9065Smrg        if (yysyntax_error_status == 0)
17229ace9065Smrg          yymsgp = yymsg;
17239ace9065Smrg        else if (yysyntax_error_status == 1)
17249ace9065Smrg          {
17259ace9065Smrg            if (yymsg != yymsgbuf)
17269ace9065Smrg              YYSTACK_FREE (yymsg);
17279ace9065Smrg            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
17289ace9065Smrg            if (!yymsg)
17299ace9065Smrg              {
17309ace9065Smrg                yymsg = yymsgbuf;
17319ace9065Smrg                yymsg_alloc = sizeof yymsgbuf;
17329ace9065Smrg                yysyntax_error_status = 2;
17339ace9065Smrg              }
17349ace9065Smrg            else
17359ace9065Smrg              {
17369ace9065Smrg                yysyntax_error_status = YYSYNTAX_ERROR;
17379ace9065Smrg                yymsgp = yymsg;
17389ace9065Smrg              }
17399ace9065Smrg          }
17409ace9065Smrg        yyerror (yymsgp);
17419ace9065Smrg        if (yysyntax_error_status == 2)
17429ace9065Smrg          goto yyexhaustedlab;
174305b261ecSmrg      }
17449ace9065Smrg# undef YYSYNTAX_ERROR
174505b261ecSmrg#endif
174605b261ecSmrg    }
174705b261ecSmrg
174805b261ecSmrg
174905b261ecSmrg
175005b261ecSmrg  if (yyerrstatus == 3)
175105b261ecSmrg    {
17524642e01fSmrg      /* If just tried and failed to reuse lookahead token after an
175335c4bbdfSmrg         error, discard it.  */
175405b261ecSmrg
175505b261ecSmrg      if (yychar <= YYEOF)
175635c4bbdfSmrg        {
175735c4bbdfSmrg          /* Return failure if at end of input.  */
175835c4bbdfSmrg          if (yychar == YYEOF)
175935c4bbdfSmrg            YYABORT;
176035c4bbdfSmrg        }
176105b261ecSmrg      else
176235c4bbdfSmrg        {
176335c4bbdfSmrg          yydestruct ("Error: discarding",
176435c4bbdfSmrg                      yytoken, &yylval);
176535c4bbdfSmrg          yychar = YYEMPTY;
176635c4bbdfSmrg        }
176705b261ecSmrg    }
176805b261ecSmrg
17694642e01fSmrg  /* Else will try to reuse lookahead token after shifting the error
177005b261ecSmrg     token.  */
177105b261ecSmrg  goto yyerrlab1;
177205b261ecSmrg
177305b261ecSmrg
177405b261ecSmrg/*---------------------------------------------------.
177505b261ecSmrg| yyerrorlab -- error raised explicitly by YYERROR.  |
177605b261ecSmrg`---------------------------------------------------*/
177705b261ecSmrgyyerrorlab:
177805b261ecSmrg
177905b261ecSmrg  /* Pacify compilers like GCC when the user code never invokes
178005b261ecSmrg     YYERROR and the label yyerrorlab therefore never appears in user
178105b261ecSmrg     code.  */
178205b261ecSmrg  if (/*CONSTCOND*/ 0)
178305b261ecSmrg     goto yyerrorlab;
178405b261ecSmrg
178535c4bbdfSmrg  /* Do not reclaim the symbols of the rule whose action triggered
178605b261ecSmrg     this YYERROR.  */
178705b261ecSmrg  YYPOPSTACK (yylen);
178805b261ecSmrg  yylen = 0;
178905b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
179005b261ecSmrg  yystate = *yyssp;
179105b261ecSmrg  goto yyerrlab1;
179205b261ecSmrg
179305b261ecSmrg
179405b261ecSmrg/*-------------------------------------------------------------.
179505b261ecSmrg| yyerrlab1 -- common code for both syntax error and YYERROR.  |
179605b261ecSmrg`-------------------------------------------------------------*/
179705b261ecSmrgyyerrlab1:
179835c4bbdfSmrg  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
179905b261ecSmrg
180005b261ecSmrg  for (;;)
180105b261ecSmrg    {
180205b261ecSmrg      yyn = yypact[yystate];
18039ace9065Smrg      if (!yypact_value_is_default (yyn))
180435c4bbdfSmrg        {
180535c4bbdfSmrg          yyn += YYTERROR;
180635c4bbdfSmrg          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
180735c4bbdfSmrg            {
180835c4bbdfSmrg              yyn = yytable[yyn];
180935c4bbdfSmrg              if (0 < yyn)
181035c4bbdfSmrg                break;
181135c4bbdfSmrg            }
181235c4bbdfSmrg        }
181305b261ecSmrg
181405b261ecSmrg      /* Pop the current state because it cannot handle the error token.  */
181505b261ecSmrg      if (yyssp == yyss)
181635c4bbdfSmrg        YYABORT;
181705b261ecSmrg
181805b261ecSmrg
181905b261ecSmrg      yydestruct ("Error: popping",
182035c4bbdfSmrg                  yystos[yystate], yyvsp);
182105b261ecSmrg      YYPOPSTACK (1);
182205b261ecSmrg      yystate = *yyssp;
182305b261ecSmrg      YY_STACK_PRINT (yyss, yyssp);
182405b261ecSmrg    }
182505b261ecSmrg
182635c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
182705b261ecSmrg  *++yyvsp = yylval;
182835c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_END
182905b261ecSmrg
183005b261ecSmrg
183105b261ecSmrg  /* Shift the error token.  */
183205b261ecSmrg  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
183305b261ecSmrg
183405b261ecSmrg  yystate = yyn;
183505b261ecSmrg  goto yynewstate;
183605b261ecSmrg
183705b261ecSmrg
183805b261ecSmrg/*-------------------------------------.
183905b261ecSmrg| yyacceptlab -- YYACCEPT comes here.  |
184005b261ecSmrg`-------------------------------------*/
184105b261ecSmrgyyacceptlab:
184205b261ecSmrg  yyresult = 0;
184305b261ecSmrg  goto yyreturn;
184405b261ecSmrg
184505b261ecSmrg/*-----------------------------------.
184605b261ecSmrg| yyabortlab -- YYABORT comes here.  |
184705b261ecSmrg`-----------------------------------*/
184805b261ecSmrgyyabortlab:
184905b261ecSmrg  yyresult = 1;
185005b261ecSmrg  goto yyreturn;
185105b261ecSmrg
185235c4bbdfSmrg#if !defined yyoverflow || YYERROR_VERBOSE
185305b261ecSmrg/*-------------------------------------------------.
185405b261ecSmrg| yyexhaustedlab -- memory exhaustion comes here.  |
185505b261ecSmrg`-------------------------------------------------*/
185605b261ecSmrgyyexhaustedlab:
185705b261ecSmrg  yyerror (YY_("memory exhausted"));
185805b261ecSmrg  yyresult = 2;
185905b261ecSmrg  /* Fall through.  */
186005b261ecSmrg#endif
186105b261ecSmrg
186205b261ecSmrgyyreturn:
18634642e01fSmrg  if (yychar != YYEMPTY)
18649ace9065Smrg    {
18659ace9065Smrg      /* Make sure we have latest lookahead translation.  See comments at
18669ace9065Smrg         user semantic actions for why this is necessary.  */
18679ace9065Smrg      yytoken = YYTRANSLATE (yychar);
18689ace9065Smrg      yydestruct ("Cleanup: discarding lookahead",
18699ace9065Smrg                  yytoken, &yylval);
18709ace9065Smrg    }
187135c4bbdfSmrg  /* Do not reclaim the symbols of the rule whose action triggered
187205b261ecSmrg     this YYABORT or YYACCEPT.  */
187305b261ecSmrg  YYPOPSTACK (yylen);
187405b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
187505b261ecSmrg  while (yyssp != yyss)
187605b261ecSmrg    {
187705b261ecSmrg      yydestruct ("Cleanup: popping",
187835c4bbdfSmrg                  yystos[*yyssp], yyvsp);
187905b261ecSmrg      YYPOPSTACK (1);
188005b261ecSmrg    }
188105b261ecSmrg#ifndef yyoverflow
188205b261ecSmrg  if (yyss != yyssa)
188305b261ecSmrg    YYSTACK_FREE (yyss);
188405b261ecSmrg#endif
188505b261ecSmrg#if YYERROR_VERBOSE
188605b261ecSmrg  if (yymsg != yymsgbuf)
188705b261ecSmrg    YYSTACK_FREE (yymsg);
188805b261ecSmrg#endif
188935c4bbdfSmrg  return yyresult;
189005b261ecSmrg}
189135c4bbdfSmrg#line 251 "winprefsyacc.y" /* yacc.c:1906  */
189205b261ecSmrg
189305b261ecSmrg/*
189405b261ecSmrg * Errors in parsing abort and print log messages
189505b261ecSmrg */
189605b261ecSmrgstatic int
189735c4bbdfSmrgyyerror (const char *s)
189805b261ecSmrg{
189905b261ecSmrg  ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
190005b261ecSmrg  return 1;
190105b261ecSmrg}
190205b261ecSmrg
190305b261ecSmrg/* Miscellaneous functions to store TOKENs into the structure */
190405b261ecSmrgstatic void
190505b261ecSmrgSetIconDirectory (char *path)
190605b261ecSmrg{
190705b261ecSmrg  strncpy (pref.iconDirectory, path, PATH_MAX);
190805b261ecSmrg  pref.iconDirectory[PATH_MAX] = 0;
190905b261ecSmrg}
191005b261ecSmrg
191105b261ecSmrgstatic void
191205b261ecSmrgSetDefaultIcon (char *fname)
191305b261ecSmrg{
191405b261ecSmrg  strncpy (pref.defaultIconName, fname, NAME_MAX);
191505b261ecSmrg  pref.defaultIconName[NAME_MAX] = 0;
191605b261ecSmrg}
191705b261ecSmrg
191805b261ecSmrgstatic void
191905b261ecSmrgSetTrayIcon (char *fname)
192005b261ecSmrg{
192105b261ecSmrg  strncpy (pref.trayIconName, fname, NAME_MAX);
192205b261ecSmrg  pref.trayIconName[NAME_MAX] = 0;
192305b261ecSmrg}
192405b261ecSmrg
192505b261ecSmrgstatic void
192635c4bbdfSmrgSetRootMenu (char *menuname)
192705b261ecSmrg{
192835c4bbdfSmrg  strncpy (pref.rootMenuName, menuname, MENU_MAX);
192905b261ecSmrg  pref.rootMenuName[MENU_MAX] = 0;
193005b261ecSmrg}
193105b261ecSmrg
193205b261ecSmrgstatic void
193335c4bbdfSmrgSetDefaultSysMenu (char *menuname, int pos)
193405b261ecSmrg{
193535c4bbdfSmrg  strncpy (pref.defaultSysMenuName, menuname, MENU_MAX);
193605b261ecSmrg  pref.defaultSysMenuName[MENU_MAX] = 0;
193705b261ecSmrg  pref.defaultSysMenuPos = pos;
193805b261ecSmrg}
193905b261ecSmrg
194005b261ecSmrgstatic void
194105b261ecSmrgOpenMenu (char *menuname)
194205b261ecSmrg{
194305b261ecSmrg  if (menu.menuItem) free(menu.menuItem);
194405b261ecSmrg  menu.menuItem = NULL;
194505b261ecSmrg  strncpy(menu.menuName, menuname, MENU_MAX);
194605b261ecSmrg  menu.menuName[MENU_MAX] = 0;
194705b261ecSmrg  menu.menuItems = 0;
194805b261ecSmrg}
194905b261ecSmrg
195005b261ecSmrgstatic void
195135c4bbdfSmrgAddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param)
195205b261ecSmrg{
195305b261ecSmrg  if (menu.menuItem==NULL)
195435c4bbdfSmrg    menu.menuItem = malloc(sizeof(MENUITEM));
195505b261ecSmrg  else
195635c4bbdfSmrg    menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
195705b261ecSmrg
195805b261ecSmrg  strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
195905b261ecSmrg  menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
196005b261ecSmrg
196105b261ecSmrg  menu.menuItem[menu.menuItems].cmd = cmd;
196205b261ecSmrg
196305b261ecSmrg  strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
196405b261ecSmrg  menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
196505b261ecSmrg
196605b261ecSmrg  menu.menuItem[menu.menuItems].commandID = 0;
196705b261ecSmrg
196805b261ecSmrg  menu.menuItems++;
196905b261ecSmrg}
197005b261ecSmrg
197105b261ecSmrgstatic void
197205b261ecSmrgCloseMenu (void)
197305b261ecSmrg{
197405b261ecSmrg  if (menu.menuItem==NULL || menu.menuItems==0)
197505b261ecSmrg    {
197605b261ecSmrg      ErrorF("LoadPreferences: Empty menu detected\n");
197705b261ecSmrg      return;
197805b261ecSmrg    }
197905b261ecSmrg
198005b261ecSmrg  if (pref.menuItems)
198135c4bbdfSmrg    pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
198205b261ecSmrg  else
198335c4bbdfSmrg    pref.menu = malloc (sizeof(MENUPARSED));
198405b261ecSmrg
198505b261ecSmrg  memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
198605b261ecSmrg  pref.menuItems++;
198705b261ecSmrg
198805b261ecSmrg  memset (&menu, 0, sizeof(MENUPARSED));
198905b261ecSmrg}
199005b261ecSmrg
199105b261ecSmrgstatic void
199205b261ecSmrgOpenIcons (void)
199305b261ecSmrg{
199405b261ecSmrg  if (pref.icon != NULL) {
199505b261ecSmrg    ErrorF("LoadPreferences: Redefining icon mappings\n");
199605b261ecSmrg    free(pref.icon);
199705b261ecSmrg    pref.icon = NULL;
199805b261ecSmrg  }
199905b261ecSmrg  pref.iconItems = 0;
200005b261ecSmrg}
200105b261ecSmrg
200205b261ecSmrgstatic void
200305b261ecSmrgAddIconLine (char *matchstr, char *iconfile)
200405b261ecSmrg{
200505b261ecSmrg  if (pref.icon==NULL)
200635c4bbdfSmrg    pref.icon = malloc(sizeof(ICONITEM));
200705b261ecSmrg  else
200835c4bbdfSmrg    pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
200905b261ecSmrg
201005b261ecSmrg  strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
201105b261ecSmrg  pref.icon[pref.iconItems].match[MENU_MAX] = 0;
201205b261ecSmrg
201305b261ecSmrg  strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
201405b261ecSmrg  pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
201505b261ecSmrg
201605b261ecSmrg  pref.icon[pref.iconItems].hicon = 0;
201705b261ecSmrg
201805b261ecSmrg  pref.iconItems++;
201905b261ecSmrg}
202005b261ecSmrg
202105b261ecSmrgstatic void
202205b261ecSmrgCloseIcons (void)
202305b261ecSmrg{
202405b261ecSmrg}
202505b261ecSmrg
20266747b715Smrgstatic void
20276747b715SmrgOpenStyles (void)
20286747b715Smrg{
20296747b715Smrg  if (pref.style != NULL) {
20306747b715Smrg    ErrorF("LoadPreferences: Redefining window style\n");
20316747b715Smrg    free(pref.style);
20326747b715Smrg    pref.style = NULL;
20336747b715Smrg  }
20346747b715Smrg  pref.styleItems = 0;
20356747b715Smrg}
20366747b715Smrg
20376747b715Smrgstatic void
20386747b715SmrgAddStyleLine (char *matchstr, unsigned long style)
20396747b715Smrg{
20406747b715Smrg  if (pref.style==NULL)
204135c4bbdfSmrg    pref.style = malloc(sizeof(STYLEITEM));
20426747b715Smrg  else
204335c4bbdfSmrg    pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
20446747b715Smrg
20456747b715Smrg  strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
20466747b715Smrg  pref.style[pref.styleItems].match[MENU_MAX] = 0;
20476747b715Smrg
20486747b715Smrg  pref.style[pref.styleItems].type = style;
20496747b715Smrg
20506747b715Smrg  pref.styleItems++;
20516747b715Smrg}
20526747b715Smrg
20536747b715Smrgstatic void
20546747b715SmrgCloseStyles (void)
20556747b715Smrg{
20566747b715Smrg}
20576747b715Smrg
205805b261ecSmrgstatic void
205905b261ecSmrgOpenSysMenu (void)
206005b261ecSmrg{
206105b261ecSmrg  if (pref.sysMenu != NULL) {
206205b261ecSmrg    ErrorF("LoadPreferences: Redefining system menu\n");
206305b261ecSmrg    free(pref.sysMenu);
206405b261ecSmrg    pref.sysMenu = NULL;
206505b261ecSmrg  }
206605b261ecSmrg  pref.sysMenuItems = 0;
206705b261ecSmrg}
206805b261ecSmrg
206905b261ecSmrgstatic void
207005b261ecSmrgAddSysMenuLine (char *matchstr, char *menuname, int pos)
207105b261ecSmrg{
207205b261ecSmrg  if (pref.sysMenu==NULL)
207335c4bbdfSmrg    pref.sysMenu = malloc(sizeof(SYSMENUITEM));
207405b261ecSmrg  else
207535c4bbdfSmrg    pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
207605b261ecSmrg
207705b261ecSmrg  strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
207805b261ecSmrg  pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
207905b261ecSmrg
208005b261ecSmrg  strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
208105b261ecSmrg  pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
208205b261ecSmrg
208305b261ecSmrg  pref.sysMenu[pref.sysMenuItems].menuPos = pos;
208405b261ecSmrg
208505b261ecSmrg  pref.sysMenuItems++;
208605b261ecSmrg}
208705b261ecSmrg
208805b261ecSmrgstatic void
208905b261ecSmrgCloseSysMenu (void)
209005b261ecSmrg{
209105b261ecSmrg}
209205b261ecSmrg
2093