winprefsyacc.c revision 6747b715
16747b715Smrg/* A Bison parser, made by GNU Bison 2.4.3.  */
205b261ecSmrg
34642e01fSmrg/* Skeleton implementation for Bison's Yacc-like parsers in C
44642e01fSmrg
56747b715Smrg      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
66747b715Smrg   2009, 2010 Free Software Foundation, Inc.
74642e01fSmrg
84642e01fSmrg   This program is free software: you can redistribute it and/or modify
905b261ecSmrg   it under the terms of the GNU General Public License as published by
104642e01fSmrg   the Free Software Foundation, either version 3 of the License, or
114642e01fSmrg   (at your option) any later version.
124642e01fSmrg
1305b261ecSmrg   This program is distributed in the hope that it will be useful,
1405b261ecSmrg   but WITHOUT ANY WARRANTY; without even the implied warranty of
1505b261ecSmrg   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1605b261ecSmrg   GNU General Public License for more details.
174642e01fSmrg
1805b261ecSmrg   You should have received a copy of the GNU General Public License
194642e01fSmrg   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
2005b261ecSmrg
2105b261ecSmrg/* As a special exception, you may create a larger work that contains
2205b261ecSmrg   part or all of the Bison parser skeleton and distribute that work
2305b261ecSmrg   under terms of your choice, so long as that work isn't itself a
2405b261ecSmrg   parser generator using the skeleton or a modified version thereof
2505b261ecSmrg   as a parser skeleton.  Alternatively, if you modify or redistribute
2605b261ecSmrg   the parser skeleton itself, you may (at your option) remove this
2705b261ecSmrg   special exception, which will cause the skeleton and the resulting
2805b261ecSmrg   Bison output files to be licensed under the GNU General Public
2905b261ecSmrg   License without this special exception.
304642e01fSmrg
3105b261ecSmrg   This special exception was added by the Free Software Foundation in
3205b261ecSmrg   version 2.2 of Bison.  */
3305b261ecSmrg
3405b261ecSmrg/* C LALR(1) parser skeleton written by Richard Stallman, by
3505b261ecSmrg   simplifying the original so-called "semantic" parser.  */
3605b261ecSmrg
3705b261ecSmrg/* All symbols defined below should begin with yy or YY, to avoid
3805b261ecSmrg   infringing on user name space.  This should be done even for local
3905b261ecSmrg   variables, as they might otherwise be expanded by user macros.
4005b261ecSmrg   There are some unavoidable exceptions within include files to
4105b261ecSmrg   define necessary library symbols; they are noted "INFRINGES ON
4205b261ecSmrg   USER NAME SPACE" below.  */
4305b261ecSmrg
4405b261ecSmrg/* Identify Bison output.  */
4505b261ecSmrg#define YYBISON 1
4605b261ecSmrg
4705b261ecSmrg/* Bison version.  */
486747b715Smrg#define YYBISON_VERSION "2.4.3"
4905b261ecSmrg
5005b261ecSmrg/* Skeleton name.  */
5105b261ecSmrg#define YYSKELETON_NAME "yacc.c"
5205b261ecSmrg
5305b261ecSmrg/* Pure parsers.  */
5405b261ecSmrg#define YYPURE 0
5505b261ecSmrg
564642e01fSmrg/* Push parsers.  */
574642e01fSmrg#define YYPUSH 0
5805b261ecSmrg
594642e01fSmrg/* Pull parsers.  */
604642e01fSmrg#define YYPULL 1
6105b261ecSmrg
624642e01fSmrg/* Using locations.  */
634642e01fSmrg#define YYLSP_NEEDED 0
6405b261ecSmrg
6505b261ecSmrg
6605b261ecSmrg
6705b261ecSmrg/* Copy the first part of user declarations.  */
684642e01fSmrg
694642e01fSmrg/* Line 189 of yacc.c  */
7005b261ecSmrg#line 1 "winprefsyacc.y"
7105b261ecSmrg
7205b261ecSmrg/*
7305b261ecSmrg * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
746747b715Smrg * Copyright (C) Colin Harrison 2005-2008
7505b261ecSmrg *
7605b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining
7705b261ecSmrg * a copy of this software and associated documentation files (the
7805b261ecSmrg * "Software"), to deal in the Software without restriction, including
7905b261ecSmrg * without limitation the rights to use, copy, modify, merge, publish,
8005b261ecSmrg * distribute, sublicense, and/or sell copies of the Software, and to
8105b261ecSmrg * permit persons to whom the Software is furnished to do so, subject to
8205b261ecSmrg * the following conditions:
8305b261ecSmrg *
8405b261ecSmrg * The above copyright notice and this permission notice shall be
8505b261ecSmrg * included in all copies or substantial portions of the Software.
8605b261ecSmrg *
8705b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
8805b261ecSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8905b261ecSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
9005b261ecSmrg * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
9105b261ecSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
9205b261ecSmrg * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
9305b261ecSmrg * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9405b261ecSmrg *
9505b261ecSmrg * Except as contained in this notice, the name of the XFree86 Project
9605b261ecSmrg * shall not be used in advertising or otherwise to promote the sale, use
9705b261ecSmrg * or other dealings in this Software without prior written authorization
9805b261ecSmrg * from the XFree86 Project.
9905b261ecSmrg *
10005b261ecSmrg * Authors:     Earle F. Philhower, III
1016747b715Smrg *              Colin Harrison
10205b261ecSmrg */
10305b261ecSmrg/* $XFree86: $ */
10405b261ecSmrg
10505b261ecSmrg#ifdef HAVE_XWIN_CONFIG_H
10605b261ecSmrg#include <xwin-config.h>
10705b261ecSmrg#endif
10805b261ecSmrg#include <stdio.h>
10905b261ecSmrg#include <stdlib.h>
11005b261ecSmrg#include <string.h>
11105b261ecSmrg#include "winprefs.h"
11205b261ecSmrg
11305b261ecSmrg/* The following give better error messages in bison at the cost of a few KB */
11405b261ecSmrg#define YYERROR_VERBOSE 1
11505b261ecSmrg
1166747b715Smrg/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
1176747b715Smrg#define YYLTYPE_IS_TRIVIAL 1
1186747b715Smrg#define YYENABLE_NLS 0
1196747b715Smrg
12005b261ecSmrg/* The global pref settings */
12105b261ecSmrgWINPREFS pref;
12205b261ecSmrg
12305b261ecSmrg/* The working menu */
12405b261ecSmrgstatic MENUPARSED menu;
12505b261ecSmrg
12605b261ecSmrg/* Functions for parsing the tokens into out structure */
12705b261ecSmrg/* Defined at the end section of this file */
12805b261ecSmrg
12905b261ecSmrgstatic void SetIconDirectory (char *path);
13005b261ecSmrgstatic void SetDefaultIcon (char *fname);
13105b261ecSmrgstatic void SetRootMenu (char *menu);
13205b261ecSmrgstatic void SetDefaultSysMenu (char *menu, int pos);
13305b261ecSmrgstatic void SetTrayIcon (char *fname);
13405b261ecSmrg
13505b261ecSmrgstatic void OpenMenu(char *menuname);
13605b261ecSmrgstatic void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
13705b261ecSmrgstatic void CloseMenu(void);
13805b261ecSmrg
13905b261ecSmrgstatic void OpenIcons(void);
14005b261ecSmrgstatic void AddIconLine(char *matchstr, char *iconfile);
14105b261ecSmrgstatic void CloseIcons(void);
14205b261ecSmrg
1436747b715Smrgstatic void OpenStyles(void);
1446747b715Smrgstatic void AddStyleLine(char *matchstr, unsigned long style);
1456747b715Smrgstatic void CloseStyles(void);
1466747b715Smrg
14705b261ecSmrgstatic void OpenSysMenu(void);
14805b261ecSmrgstatic void AddSysMenuLine(char *matchstr, char *menuname, int pos);
14905b261ecSmrgstatic void CloseSysMenu(void);
15005b261ecSmrg
15105b261ecSmrgstatic int yyerror (char *s);
15205b261ecSmrg
15305b261ecSmrgextern void ErrorF (const char* /*f*/, ...);
15405b261ecSmrgextern char *yytext;
15505b261ecSmrgextern int yylex(void);
15605b261ecSmrg
15705b261ecSmrg
15805b261ecSmrg
1594642e01fSmrg/* Line 189 of yacc.c  */
1606747b715Smrg#line 161 "winprefsyacc.c"
1614642e01fSmrg
16205b261ecSmrg/* Enabling traces.  */
16305b261ecSmrg#ifndef YYDEBUG
16405b261ecSmrg# define YYDEBUG 0
16505b261ecSmrg#endif
16605b261ecSmrg
16705b261ecSmrg/* Enabling verbose error messages.  */
16805b261ecSmrg#ifdef YYERROR_VERBOSE
16905b261ecSmrg# undef YYERROR_VERBOSE
17005b261ecSmrg# define YYERROR_VERBOSE 1
17105b261ecSmrg#else
17205b261ecSmrg# define YYERROR_VERBOSE 0
17305b261ecSmrg#endif
17405b261ecSmrg
17505b261ecSmrg/* Enabling the token table.  */
17605b261ecSmrg#ifndef YYTOKEN_TABLE
17705b261ecSmrg# define YYTOKEN_TABLE 0
17805b261ecSmrg#endif
17905b261ecSmrg
1804642e01fSmrg
1814642e01fSmrg/* Tokens.  */
1824642e01fSmrg#ifndef YYTOKENTYPE
1834642e01fSmrg# define YYTOKENTYPE
1844642e01fSmrg   /* Put the tokens into the symbol table, so that GDB and other debuggers
1854642e01fSmrg      know about them.  */
1864642e01fSmrg   enum yytokentype {
1874642e01fSmrg     NEWLINE = 258,
1884642e01fSmrg     MENU = 259,
1894642e01fSmrg     LB = 260,
1904642e01fSmrg     RB = 261,
1914642e01fSmrg     ICONDIRECTORY = 262,
1924642e01fSmrg     DEFAULTICON = 263,
1934642e01fSmrg     ICONS = 264,
1946747b715Smrg     STYLES = 265,
1956747b715Smrg     TOPMOST = 266,
1966747b715Smrg     MAXIMIZE = 267,
1976747b715Smrg     MINIMIZE = 268,
1986747b715Smrg     BOTTOM = 269,
1996747b715Smrg     NOTITLE = 270,
2006747b715Smrg     OUTLINE = 271,
2016747b715Smrg     NOFRAME = 272,
2026747b715Smrg     DEFAULTSYSMENU = 273,
2036747b715Smrg     SYSMENU = 274,
2046747b715Smrg     ROOTMENU = 275,
2056747b715Smrg     SEPARATOR = 276,
2066747b715Smrg     ATSTART = 277,
2076747b715Smrg     ATEND = 278,
2086747b715Smrg     EXEC = 279,
2096747b715Smrg     ALWAYSONTOP = 280,
2106747b715Smrg     DEBUGOUTPUT = 281,
2116747b715Smrg     RELOAD = 282,
2126747b715Smrg     TRAYICON = 283,
2136747b715Smrg     FORCEEXIT = 284,
2146747b715Smrg     SILENTEXIT = 285,
2156747b715Smrg     STRING = 286
2164642e01fSmrg   };
2174642e01fSmrg#endif
2184642e01fSmrg/* Tokens.  */
2194642e01fSmrg#define NEWLINE 258
2204642e01fSmrg#define MENU 259
2214642e01fSmrg#define LB 260
2224642e01fSmrg#define RB 261
2234642e01fSmrg#define ICONDIRECTORY 262
2244642e01fSmrg#define DEFAULTICON 263
2254642e01fSmrg#define ICONS 264
2266747b715Smrg#define STYLES 265
2276747b715Smrg#define TOPMOST 266
2286747b715Smrg#define MAXIMIZE 267
2296747b715Smrg#define MINIMIZE 268
2306747b715Smrg#define BOTTOM 269
2316747b715Smrg#define NOTITLE 270
2326747b715Smrg#define OUTLINE 271
2336747b715Smrg#define NOFRAME 272
2346747b715Smrg#define DEFAULTSYSMENU 273
2356747b715Smrg#define SYSMENU 274
2366747b715Smrg#define ROOTMENU 275
2376747b715Smrg#define SEPARATOR 276
2386747b715Smrg#define ATSTART 277
2396747b715Smrg#define ATEND 278
2406747b715Smrg#define EXEC 279
2416747b715Smrg#define ALWAYSONTOP 280
2426747b715Smrg#define DEBUGOUTPUT 281
2436747b715Smrg#define RELOAD 282
2446747b715Smrg#define TRAYICON 283
2456747b715Smrg#define FORCEEXIT 284
2466747b715Smrg#define SILENTEXIT 285
2476747b715Smrg#define STRING 286
2484642e01fSmrg
2494642e01fSmrg
2504642e01fSmrg
2514642e01fSmrg
25205b261ecSmrg#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
25305b261ecSmrgtypedef union YYSTYPE
25405b261ecSmrg{
2554642e01fSmrg
2564642e01fSmrg/* Line 214 of yacc.c  */
2576747b715Smrg#line 89 "winprefsyacc.y"
2584642e01fSmrg
25905b261ecSmrg  char *sVal;
2606747b715Smrg  unsigned long uVal;
26105b261ecSmrg  int iVal;
2624642e01fSmrg
2634642e01fSmrg
2644642e01fSmrg
2654642e01fSmrg/* Line 214 of yacc.c  */
2666747b715Smrg#line 267 "winprefsyacc.c"
2674642e01fSmrg} YYSTYPE;
2684642e01fSmrg# define YYSTYPE_IS_TRIVIAL 1
26905b261ecSmrg# define yystype YYSTYPE /* obsolescent; will be withdrawn */
27005b261ecSmrg# define YYSTYPE_IS_DECLARED 1
27105b261ecSmrg#endif
27205b261ecSmrg
27305b261ecSmrg
27405b261ecSmrg/* Copy the second part of user declarations.  */
27505b261ecSmrg
27605b261ecSmrg
2774642e01fSmrg/* Line 264 of yacc.c  */
2786747b715Smrg#line 279 "winprefsyacc.c"
27905b261ecSmrg
28005b261ecSmrg#ifdef short
28105b261ecSmrg# undef short
28205b261ecSmrg#endif
28305b261ecSmrg
28405b261ecSmrg#ifdef YYTYPE_UINT8
28505b261ecSmrgtypedef YYTYPE_UINT8 yytype_uint8;
28605b261ecSmrg#else
28705b261ecSmrgtypedef unsigned char yytype_uint8;
28805b261ecSmrg#endif
28905b261ecSmrg
29005b261ecSmrg#ifdef YYTYPE_INT8
29105b261ecSmrgtypedef YYTYPE_INT8 yytype_int8;
29205b261ecSmrg#elif (defined __STDC__ || defined __C99__FUNC__ \
29305b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
29405b261ecSmrgtypedef signed char yytype_int8;
29505b261ecSmrg#else
29605b261ecSmrgtypedef short int yytype_int8;
29705b261ecSmrg#endif
29805b261ecSmrg
29905b261ecSmrg#ifdef YYTYPE_UINT16
30005b261ecSmrgtypedef YYTYPE_UINT16 yytype_uint16;
30105b261ecSmrg#else
30205b261ecSmrgtypedef unsigned short int yytype_uint16;
30305b261ecSmrg#endif
30405b261ecSmrg
30505b261ecSmrg#ifdef YYTYPE_INT16
30605b261ecSmrgtypedef YYTYPE_INT16 yytype_int16;
30705b261ecSmrg#else
30805b261ecSmrgtypedef short int yytype_int16;
30905b261ecSmrg#endif
31005b261ecSmrg
31105b261ecSmrg#ifndef YYSIZE_T
31205b261ecSmrg# ifdef __SIZE_TYPE__
31305b261ecSmrg#  define YYSIZE_T __SIZE_TYPE__
31405b261ecSmrg# elif defined size_t
31505b261ecSmrg#  define YYSIZE_T size_t
31605b261ecSmrg# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
31705b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
31805b261ecSmrg#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
31905b261ecSmrg#  define YYSIZE_T size_t
32005b261ecSmrg# else
32105b261ecSmrg#  define YYSIZE_T unsigned int
32205b261ecSmrg# endif
32305b261ecSmrg#endif
32405b261ecSmrg
32505b261ecSmrg#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
32605b261ecSmrg
32705b261ecSmrg#ifndef YY_
3286747b715Smrg# if defined YYENABLE_NLS && YYENABLE_NLS
32905b261ecSmrg#  if ENABLE_NLS
33005b261ecSmrg#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
33105b261ecSmrg#   define YY_(msgid) dgettext ("bison-runtime", msgid)
33205b261ecSmrg#  endif
33305b261ecSmrg# endif
33405b261ecSmrg# ifndef YY_
33505b261ecSmrg#  define YY_(msgid) msgid
33605b261ecSmrg# endif
33705b261ecSmrg#endif
33805b261ecSmrg
33905b261ecSmrg/* Suppress unused-variable warnings by "using" E.  */
34005b261ecSmrg#if ! defined lint || defined __GNUC__
34105b261ecSmrg# define YYUSE(e) ((void) (e))
34205b261ecSmrg#else
34305b261ecSmrg# define YYUSE(e) /* empty */
34405b261ecSmrg#endif
34505b261ecSmrg
34605b261ecSmrg/* Identity function, used to suppress warnings about constant conditions.  */
34705b261ecSmrg#ifndef lint
34805b261ecSmrg# define YYID(n) (n)
34905b261ecSmrg#else
35005b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
35105b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
35205b261ecSmrgstatic int
3534642e01fSmrgYYID (int yyi)
35405b261ecSmrg#else
35505b261ecSmrgstatic int
3564642e01fSmrgYYID (yyi)
3574642e01fSmrg    int yyi;
35805b261ecSmrg#endif
35905b261ecSmrg{
3604642e01fSmrg  return yyi;
36105b261ecSmrg}
36205b261ecSmrg#endif
36305b261ecSmrg
36405b261ecSmrg#if ! defined yyoverflow || YYERROR_VERBOSE
36505b261ecSmrg
36605b261ecSmrg/* The parser invokes alloca or malloc; define the necessary symbols.  */
36705b261ecSmrg
36805b261ecSmrg# ifdef YYSTACK_USE_ALLOCA
36905b261ecSmrg#  if YYSTACK_USE_ALLOCA
37005b261ecSmrg#   ifdef __GNUC__
37105b261ecSmrg#    define YYSTACK_ALLOC __builtin_alloca
37205b261ecSmrg#   elif defined __BUILTIN_VA_ARG_INCR
37305b261ecSmrg#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
37405b261ecSmrg#   elif defined _AIX
37505b261ecSmrg#    define YYSTACK_ALLOC __alloca
37605b261ecSmrg#   elif defined _MSC_VER
37705b261ecSmrg#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
37805b261ecSmrg#    define alloca _alloca
37905b261ecSmrg#   else
38005b261ecSmrg#    define YYSTACK_ALLOC alloca
38105b261ecSmrg#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
38205b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
38305b261ecSmrg#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
38405b261ecSmrg#     ifndef _STDLIB_H
38505b261ecSmrg#      define _STDLIB_H 1
38605b261ecSmrg#     endif
38705b261ecSmrg#    endif
38805b261ecSmrg#   endif
38905b261ecSmrg#  endif
39005b261ecSmrg# endif
39105b261ecSmrg
39205b261ecSmrg# ifdef YYSTACK_ALLOC
39305b261ecSmrg   /* Pacify GCC's `empty if-body' warning.  */
39405b261ecSmrg#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
39505b261ecSmrg#  ifndef YYSTACK_ALLOC_MAXIMUM
39605b261ecSmrg    /* The OS might guarantee only one guard page at the bottom of the stack,
39705b261ecSmrg       and a page size can be as small as 4096 bytes.  So we cannot safely
39805b261ecSmrg       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
39905b261ecSmrg       to allow for a few compiler-allocated temporary stack slots.  */
40005b261ecSmrg#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
40105b261ecSmrg#  endif
40205b261ecSmrg# else
40305b261ecSmrg#  define YYSTACK_ALLOC YYMALLOC
40405b261ecSmrg#  define YYSTACK_FREE YYFREE
40505b261ecSmrg#  ifndef YYSTACK_ALLOC_MAXIMUM
40605b261ecSmrg#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
40705b261ecSmrg#  endif
40805b261ecSmrg#  if (defined __cplusplus && ! defined _STDLIB_H \
40905b261ecSmrg       && ! ((defined YYMALLOC || defined malloc) \
41005b261ecSmrg	     && (defined YYFREE || defined free)))
41105b261ecSmrg#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
41205b261ecSmrg#   ifndef _STDLIB_H
41305b261ecSmrg#    define _STDLIB_H 1
41405b261ecSmrg#   endif
41505b261ecSmrg#  endif
41605b261ecSmrg#  ifndef YYMALLOC
41705b261ecSmrg#   define YYMALLOC malloc
41805b261ecSmrg#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
41905b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
42005b261ecSmrgvoid *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
42105b261ecSmrg#   endif
42205b261ecSmrg#  endif
42305b261ecSmrg#  ifndef YYFREE
42405b261ecSmrg#   define YYFREE free
42505b261ecSmrg#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
42605b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
42705b261ecSmrgvoid free (void *); /* INFRINGES ON USER NAME SPACE */
42805b261ecSmrg#   endif
42905b261ecSmrg#  endif
43005b261ecSmrg# endif
43105b261ecSmrg#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
43205b261ecSmrg
43305b261ecSmrg
43405b261ecSmrg#if (! defined yyoverflow \
43505b261ecSmrg     && (! defined __cplusplus \
43605b261ecSmrg	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
43705b261ecSmrg
43805b261ecSmrg/* A type that is properly aligned for any stack member.  */
43905b261ecSmrgunion yyalloc
44005b261ecSmrg{
4414642e01fSmrg  yytype_int16 yyss_alloc;
4424642e01fSmrg  YYSTYPE yyvs_alloc;
4434642e01fSmrg};
44405b261ecSmrg
44505b261ecSmrg/* The size of the maximum gap between one aligned stack and the next.  */
44605b261ecSmrg# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
44705b261ecSmrg
44805b261ecSmrg/* The size of an array large to enough to hold all stacks, each with
44905b261ecSmrg   N elements.  */
45005b261ecSmrg# define YYSTACK_BYTES(N) \
45105b261ecSmrg     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
45205b261ecSmrg      + YYSTACK_GAP_MAXIMUM)
45305b261ecSmrg
45405b261ecSmrg/* Copy COUNT objects from FROM to TO.  The source and destination do
45505b261ecSmrg   not overlap.  */
45605b261ecSmrg# ifndef YYCOPY
45705b261ecSmrg#  if defined __GNUC__ && 1 < __GNUC__
45805b261ecSmrg#   define YYCOPY(To, From, Count) \
45905b261ecSmrg      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
46005b261ecSmrg#  else
46105b261ecSmrg#   define YYCOPY(To, From, Count)		\
46205b261ecSmrg      do					\
46305b261ecSmrg	{					\
46405b261ecSmrg	  YYSIZE_T yyi;				\
46505b261ecSmrg	  for (yyi = 0; yyi < (Count); yyi++)	\
46605b261ecSmrg	    (To)[yyi] = (From)[yyi];		\
46705b261ecSmrg	}					\
46805b261ecSmrg      while (YYID (0))
46905b261ecSmrg#  endif
47005b261ecSmrg# endif
47105b261ecSmrg
47205b261ecSmrg/* Relocate STACK from its old location to the new one.  The
47305b261ecSmrg   local variables YYSIZE and YYSTACKSIZE give the old and new number of
47405b261ecSmrg   elements in the stack, and YYPTR gives the new location of the
47505b261ecSmrg   stack.  Advance YYPTR to a properly aligned location for the next
47605b261ecSmrg   stack.  */
4774642e01fSmrg# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
47805b261ecSmrg    do									\
47905b261ecSmrg      {									\
48005b261ecSmrg	YYSIZE_T yynewbytes;						\
4814642e01fSmrg	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
4824642e01fSmrg	Stack = &yyptr->Stack_alloc;					\
48305b261ecSmrg	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
48405b261ecSmrg	yyptr += yynewbytes / sizeof (*yyptr);				\
48505b261ecSmrg      }									\
48605b261ecSmrg    while (YYID (0))
48705b261ecSmrg
48805b261ecSmrg#endif
48905b261ecSmrg
49005b261ecSmrg/* YYFINAL -- State number of the termination state.  */
49105b261ecSmrg#define YYFINAL  2
49205b261ecSmrg/* YYLAST -- Last index in YYTABLE.  */
4936747b715Smrg#define YYLAST   98
49405b261ecSmrg
49505b261ecSmrg/* YYNTOKENS -- Number of terminals.  */
4966747b715Smrg#define YYNTOKENS  32
49705b261ecSmrg/* YYNNTS -- Number of nonterminals.  */
4986747b715Smrg#define YYNNTS  33
49905b261ecSmrg/* YYNRULES -- Number of rules.  */
5006747b715Smrg#define YYNRULES  65
50105b261ecSmrg/* YYNRULES -- Number of states.  */
5026747b715Smrg#define YYNSTATES  121
50305b261ecSmrg
50405b261ecSmrg/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
50505b261ecSmrg#define YYUNDEFTOK  2
5066747b715Smrg#define YYMAXUTOK   286
50705b261ecSmrg
50805b261ecSmrg#define YYTRANSLATE(YYX)						\
50905b261ecSmrg  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
51005b261ecSmrg
51105b261ecSmrg/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
51205b261ecSmrgstatic const yytype_uint8 yytranslate[] =
51305b261ecSmrg{
51405b261ecSmrg       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
51505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
51605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
51705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
51805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
51905b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52005b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52105b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52205b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52305b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52405b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
52905b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53005b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53105b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53205b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53305b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53405b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
53905b261ecSmrg       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
54005b261ecSmrg       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
5416747b715Smrg      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
5426747b715Smrg      25,    26,    27,    28,    29,    30,    31
54305b261ecSmrg};
54405b261ecSmrg
54505b261ecSmrg#if YYDEBUG
54605b261ecSmrg/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
54705b261ecSmrg   YYRHS.  */
54805b261ecSmrgstatic const yytype_uint8 yyprhs[] =
54905b261ecSmrg{
55005b261ecSmrg       0,     0,     3,     4,     7,     9,    11,    12,    15,    17,
5516747b715Smrg      19,    21,    23,    25,    27,    29,    31,    33,    35,    37,
5526747b715Smrg      39,    43,    47,    52,    56,    60,    64,    69,    75,    81,
5536747b715Smrg      86,    88,    91,    92,   100,   105,   107,   110,   111,   118,
5546747b715Smrg     120,   122,   124,   126,   128,   130,   132,   134,   136,   139,
5556747b715Smrg     142,   147,   149,   152,   153,   160,   161,   163,   165,   171,
5566747b715Smrg     173,   176,   177,   185,   188,   191
55705b261ecSmrg};
55805b261ecSmrg
55905b261ecSmrg/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
56005b261ecSmrgstatic const yytype_int8 yyrhs[] =
56105b261ecSmrg{
5626747b715Smrg      33,     0,    -1,    -1,    33,    34,    -1,     3,    -1,    36,
5636747b715Smrg      -1,    -1,     3,    35,    -1,    40,    -1,    41,    -1,    44,
5646747b715Smrg      -1,    48,    -1,    55,    -1,    60,    -1,    38,    -1,    39,
5656747b715Smrg      -1,    64,    -1,    37,    -1,    62,    -1,    63,    -1,    28,
5666747b715Smrg      31,     3,    -1,    20,    31,     3,    -1,    18,    31,    57,
5676747b715Smrg       3,    -1,     8,    31,     3,    -1,     7,    31,     3,    -1,
5686747b715Smrg      21,     3,    35,    -1,    31,    25,     3,    35,    -1,    31,
5696747b715Smrg      24,    31,     3,    35,    -1,    31,     4,    31,     3,    35,
5706747b715Smrg      -1,    31,    27,     3,    35,    -1,    42,    -1,    42,    43,
5716747b715Smrg      -1,    -1,     4,    31,     5,    45,    35,    43,     6,    -1,
5726747b715Smrg      31,    31,     3,    35,    -1,    46,    -1,    46,    47,    -1,
5736747b715Smrg      -1,     9,     5,    49,    35,    47,     6,    -1,    11,    -1,
5746747b715Smrg      12,    -1,    13,    -1,    14,    -1,    15,    -1,    16,    -1,
5756747b715Smrg      17,    -1,    50,    -1,    51,    -1,    50,    51,    -1,    51,
5766747b715Smrg      50,    -1,    31,    52,     3,    35,    -1,    53,    -1,    53,
5776747b715Smrg      54,    -1,    -1,    10,     5,    56,    35,    54,     6,    -1,
5786747b715Smrg      -1,    22,    -1,    23,    -1,    31,    31,    57,     3,    35,
5796747b715Smrg      -1,    58,    -1,    58,    59,    -1,    -1,    19,     5,     3,
5806747b715Smrg      61,    35,    59,     6,    -1,    29,     3,    -1,    30,     3,
5816747b715Smrg      -1,    26,    31,     3,    -1
58205b261ecSmrg};
58305b261ecSmrg
58405b261ecSmrg/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
58505b261ecSmrgstatic const yytype_uint8 yyrline[] =
58605b261ecSmrg{
5876747b715Smrg       0,   132,   132,   133,   136,   137,   141,   142,   145,   146,
5886747b715Smrg     147,   148,   149,   150,   151,   152,   153,   154,   155,   156,
5896747b715Smrg     159,   162,   165,   168,   171,   174,   175,   176,   177,   178,
5906747b715Smrg     181,   182,   185,   185,   188,   191,   192,   195,   195,   198,
5916747b715Smrg     199,   200,   201,   204,   205,   206,   209,   210,   211,   212,
5926747b715Smrg     215,   218,   219,   222,   222,   225,   226,   227,   230,   233,
5936747b715Smrg     234,   237,   237,   240,   243,   246
59405b261ecSmrg};
59505b261ecSmrg#endif
59605b261ecSmrg
59705b261ecSmrg#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
59805b261ecSmrg/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
59905b261ecSmrg   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
60005b261ecSmrgstatic const char *const yytname[] =
60105b261ecSmrg{
60205b261ecSmrg  "$end", "error", "$undefined", "NEWLINE", "MENU", "LB", "RB",
6036747b715Smrg  "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", "MAXIMIZE",
6046747b715Smrg  "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", "DEFAULTSYSMENU",
6056747b715Smrg  "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", "EXEC",
6066747b715Smrg  "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT",
6076747b715Smrg  "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada",
6086747b715Smrg  "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon",
6096747b715Smrg  "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline",
6106747b715Smrg  "iconlist", "icons", "$@2", "group1", "group2", "stylecombo",
6116747b715Smrg  "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline",
6126747b715Smrg  "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", 0
61305b261ecSmrg};
61405b261ecSmrg#endif
61505b261ecSmrg
61605b261ecSmrg# ifdef YYPRINT
61705b261ecSmrg/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
61805b261ecSmrg   token YYLEX-NUM.  */
61905b261ecSmrgstatic const yytype_uint16 yytoknum[] =
62005b261ecSmrg{
62105b261ecSmrg       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
62205b261ecSmrg     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
6236747b715Smrg     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
6246747b715Smrg     285,   286
62505b261ecSmrg};
62605b261ecSmrg# endif
62705b261ecSmrg
62805b261ecSmrg/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
62905b261ecSmrgstatic const yytype_uint8 yyr1[] =
63005b261ecSmrg{
6316747b715Smrg       0,    32,    33,    33,    34,    34,    35,    35,    36,    36,
6326747b715Smrg      36,    36,    36,    36,    36,    36,    36,    36,    36,    36,
6336747b715Smrg      37,    38,    39,    40,    41,    42,    42,    42,    42,    42,
6346747b715Smrg      43,    43,    45,    44,    46,    47,    47,    49,    48,    50,
6356747b715Smrg      50,    50,    50,    51,    51,    51,    52,    52,    52,    52,
6366747b715Smrg      53,    54,    54,    56,    55,    57,    57,    57,    58,    59,
6376747b715Smrg      59,    61,    60,    62,    63,    64
63805b261ecSmrg};
63905b261ecSmrg
64005b261ecSmrg/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
64105b261ecSmrgstatic const yytype_uint8 yyr2[] =
64205b261ecSmrg{
64305b261ecSmrg       0,     2,     0,     2,     1,     1,     0,     2,     1,     1,
6446747b715Smrg       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
6456747b715Smrg       3,     3,     4,     3,     3,     3,     4,     5,     5,     4,
6466747b715Smrg       1,     2,     0,     7,     4,     1,     2,     0,     6,     1,
6476747b715Smrg       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
6486747b715Smrg       4,     1,     2,     0,     6,     0,     1,     1,     5,     1,
6496747b715Smrg       2,     0,     7,     2,     2,     3
65005b261ecSmrg};
65105b261ecSmrg
65205b261ecSmrg/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
65305b261ecSmrg   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
65405b261ecSmrg   means the default is an error.  */
65505b261ecSmrgstatic const yytype_uint8 yydefact[] =
65605b261ecSmrg{
65705b261ecSmrg       2,     0,     1,     4,     0,     0,     0,     0,     0,     0,
6586747b715Smrg       0,     0,     0,     0,     0,     0,     3,     5,    17,    14,
6596747b715Smrg      15,     8,     9,    10,    11,    12,    13,    18,    19,    16,
6606747b715Smrg       0,     0,     0,    37,    53,    55,     0,     0,     0,     0,
6616747b715Smrg      63,    64,    32,    24,    23,     6,     6,    56,    57,     0,
6626747b715Smrg      61,    21,    65,    20,     6,     6,     0,     0,    22,     6,
6636747b715Smrg       0,     7,     0,    35,     0,     0,    51,     0,     0,     0,
6646747b715Smrg       0,    30,     0,     0,    36,    38,    39,    40,    41,    42,
6656747b715Smrg      43,    44,    45,    46,    47,     0,    52,    54,     0,    59,
6666747b715Smrg       0,     6,     0,     0,     0,     0,    31,    33,     6,    48,
6676747b715Smrg      49,     6,    55,    60,    62,    25,     0,     0,     6,     6,
6686747b715Smrg      34,    50,     0,     6,     6,    26,    29,     6,    28,    27,
6696747b715Smrg      58
67005b261ecSmrg};
67105b261ecSmrg
67205b261ecSmrg/* YYDEFGOTO[NTERM-NUM].  */
67305b261ecSmrgstatic const yytype_int8 yydefgoto[] =
67405b261ecSmrg{
6756747b715Smrg      -1,     1,    16,    56,    17,    18,    19,    20,    21,    22,
6766747b715Smrg      71,    72,    23,    54,    63,    64,    24,    45,    83,    84,
6776747b715Smrg      85,    66,    67,    25,    46,    49,    89,    90,    26,    59,
6786747b715Smrg      27,    28,    29
67905b261ecSmrg};
68005b261ecSmrg
68105b261ecSmrg/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
68205b261ecSmrg   STATE-NUM.  */
6836747b715Smrg#define YYPACT_NINF -47
68405b261ecSmrgstatic const yytype_int8 yypact[] =
68505b261ecSmrg{
6866747b715Smrg     -47,     7,   -47,   -47,    -1,     0,     1,    18,    29,    15,
6876747b715Smrg      42,    17,    19,    20,    46,    50,   -47,   -47,   -47,   -47,
6886747b715Smrg     -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,
6896747b715Smrg      49,    53,    54,   -47,   -47,     6,    55,    56,    57,    58,
6906747b715Smrg     -47,   -47,   -47,   -47,   -47,    61,    61,   -47,   -47,    62,
6916747b715Smrg     -47,   -47,   -47,   -47,    61,    61,    35,    38,   -47,    61,
6926747b715Smrg     -19,   -47,    39,    35,    66,    27,    38,    67,    43,    72,
6936747b715Smrg      -3,   -19,    70,    74,   -47,   -47,   -47,   -47,   -47,   -47,
6946747b715Smrg     -47,   -47,   -47,     3,    -8,    75,   -47,   -47,    48,    43,
6956747b715Smrg      76,    61,    52,    59,    77,    78,   -47,   -47,    61,   -47,
6966747b715Smrg     -47,    61,     6,   -47,   -47,   -47,    81,    82,    61,    61,
6976747b715Smrg     -47,   -47,    83,    61,    61,   -47,   -47,    61,   -47,   -47,
6986747b715Smrg     -47
69905b261ecSmrg};
70005b261ecSmrg
70105b261ecSmrg/* YYPGOTO[NTERM-NUM].  */
70205b261ecSmrgstatic const yytype_int8 yypgoto[] =
70305b261ecSmrg{
7046747b715Smrg     -47,   -47,   -47,   -46,   -47,   -47,   -47,   -47,   -47,   -47,
7056747b715Smrg     -47,    16,   -47,   -47,   -47,    25,   -47,   -47,     5,     8,
7066747b715Smrg     -47,   -47,    26,   -47,   -47,    -9,   -47,     9,   -47,   -47,
7076747b715Smrg     -47,   -47,   -47
70805b261ecSmrg};
70905b261ecSmrg
71005b261ecSmrg/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
71105b261ecSmrg   positive, shift that token.  If negative, reduce the rule which
71205b261ecSmrg   number is the opposite.  If zero, do what YYDEFACT says.
71305b261ecSmrg   If YYTABLE_NINF, syntax error.  */
71405b261ecSmrg#define YYTABLE_NINF -1
71505b261ecSmrgstatic const yytype_uint8 yytable[] =
71605b261ecSmrg{
7176747b715Smrg      57,    92,    69,    76,    77,    78,    79,     2,    60,    61,
7186747b715Smrg       3,     4,    70,    68,     5,     6,     7,     8,    80,    81,
7196747b715Smrg      82,    93,    94,    33,    95,     9,    10,    11,    47,    48,
7206747b715Smrg      30,    31,    32,    12,    34,    13,    14,    15,    76,    77,
7216747b715Smrg      78,    79,    80,    81,    82,   105,    35,    36,    37,    40,
7226747b715Smrg      38,    39,   110,    41,    42,   111,    43,    44,    50,    51,
7236747b715Smrg      52,    53,   115,   116,    55,    58,    62,   118,   119,    65,
7246747b715Smrg      73,   120,    75,    87,    88,    91,    97,    98,   101,   102,
7256747b715Smrg     108,   109,   104,   106,   113,   114,   117,    96,    74,   100,
7266747b715Smrg     107,    99,    86,   112,     0,     0,     0,     0,   103
72705b261ecSmrg};
72805b261ecSmrg
7296747b715Smrgstatic const yytype_int8 yycheck[] =
73005b261ecSmrg{
7316747b715Smrg      46,     4,    21,    11,    12,    13,    14,     0,    54,    55,
7326747b715Smrg       3,     4,    31,    59,     7,     8,     9,    10,    15,    16,
7336747b715Smrg      17,    24,    25,     5,    27,    18,    19,    20,    22,    23,
7346747b715Smrg      31,    31,    31,    26,     5,    28,    29,    30,    11,    12,
7356747b715Smrg      13,    14,    15,    16,    17,    91,    31,     5,    31,     3,
7366747b715Smrg      31,    31,    98,     3,     5,   101,     3,     3,     3,     3,
7376747b715Smrg       3,     3,   108,   109,     3,     3,    31,   113,   114,    31,
7386747b715Smrg      31,   117,     6,     6,    31,     3,     6,     3,     3,    31,
7396747b715Smrg       3,     3,     6,    31,     3,     3,     3,    71,    63,    84,
7406747b715Smrg      31,    83,    66,   102,    -1,    -1,    -1,    -1,    89
74105b261ecSmrg};
74205b261ecSmrg
74305b261ecSmrg/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
74405b261ecSmrg   symbol of state STATE-NUM.  */
74505b261ecSmrgstatic const yytype_uint8 yystos[] =
74605b261ecSmrg{
7476747b715Smrg       0,    33,     0,     3,     4,     7,     8,     9,    10,    18,
7486747b715Smrg      19,    20,    26,    28,    29,    30,    34,    36,    37,    38,
7496747b715Smrg      39,    40,    41,    44,    48,    55,    60,    62,    63,    64,
7506747b715Smrg      31,    31,    31,     5,     5,    31,     5,    31,    31,    31,
7516747b715Smrg       3,     3,     5,     3,     3,    49,    56,    22,    23,    57,
7526747b715Smrg       3,     3,     3,     3,    45,     3,    35,    35,     3,    61,
7536747b715Smrg      35,    35,    31,    46,    47,    31,    53,    54,    35,    21,
7546747b715Smrg      31,    42,    43,    31,    47,     6,    11,    12,    13,    14,
7556747b715Smrg      15,    16,    17,    50,    51,    52,    54,     6,    31,    58,
7566747b715Smrg      59,     3,     4,    24,    25,    27,    43,     6,     3,    51,
7576747b715Smrg      50,     3,    31,    59,     6,    35,    31,    31,     3,     3,
7586747b715Smrg      35,    35,    57,     3,     3,    35,    35,     3,    35,    35,
7596747b715Smrg      35
76005b261ecSmrg};
76105b261ecSmrg
76205b261ecSmrg#define yyerrok		(yyerrstatus = 0)
76305b261ecSmrg#define yyclearin	(yychar = YYEMPTY)
76405b261ecSmrg#define YYEMPTY		(-2)
76505b261ecSmrg#define YYEOF		0
76605b261ecSmrg
76705b261ecSmrg#define YYACCEPT	goto yyacceptlab
76805b261ecSmrg#define YYABORT		goto yyabortlab
76905b261ecSmrg#define YYERROR		goto yyerrorlab
77005b261ecSmrg
77105b261ecSmrg
77205b261ecSmrg/* Like YYERROR except do call yyerror.  This remains here temporarily
77305b261ecSmrg   to ease the transition to the new meaning of YYERROR, for GCC.
7746747b715Smrg   Once GCC version 2 has supplanted version 1, this can go.  However,
7756747b715Smrg   YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
7766747b715Smrg   in Bison 2.4.2's NEWS entry, where a plan to phase it out is
7776747b715Smrg   discussed.  */
77805b261ecSmrg
77905b261ecSmrg#define YYFAIL		goto yyerrlab
7806747b715Smrg#if defined YYFAIL
7816747b715Smrg  /* This is here to suppress warnings from the GCC cpp's
7826747b715Smrg     -Wunused-macros.  Normally we don't worry about that warning, but
7836747b715Smrg     some users do, and we want to make it easy for users to remove
7846747b715Smrg     YYFAIL uses, which will produce warnings from Bison 2.5.  */
7856747b715Smrg#endif
78605b261ecSmrg
78705b261ecSmrg#define YYRECOVERING()  (!!yyerrstatus)
78805b261ecSmrg
78905b261ecSmrg#define YYBACKUP(Token, Value)					\
79005b261ecSmrgdo								\
79105b261ecSmrg  if (yychar == YYEMPTY && yylen == 1)				\
79205b261ecSmrg    {								\
79305b261ecSmrg      yychar = (Token);						\
79405b261ecSmrg      yylval = (Value);						\
79505b261ecSmrg      yytoken = YYTRANSLATE (yychar);				\
79605b261ecSmrg      YYPOPSTACK (1);						\
79705b261ecSmrg      goto yybackup;						\
79805b261ecSmrg    }								\
79905b261ecSmrg  else								\
80005b261ecSmrg    {								\
80105b261ecSmrg      yyerror (YY_("syntax error: cannot back up")); \
80205b261ecSmrg      YYERROR;							\
80305b261ecSmrg    }								\
80405b261ecSmrgwhile (YYID (0))
80505b261ecSmrg
80605b261ecSmrg
80705b261ecSmrg#define YYTERROR	1
80805b261ecSmrg#define YYERRCODE	256
80905b261ecSmrg
81005b261ecSmrg
81105b261ecSmrg/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
81205b261ecSmrg   If N is 0, then set CURRENT to the empty location which ends
81305b261ecSmrg   the previous symbol: RHS[0] (always defined).  */
81405b261ecSmrg
81505b261ecSmrg#define YYRHSLOC(Rhs, K) ((Rhs)[K])
81605b261ecSmrg#ifndef YYLLOC_DEFAULT
81705b261ecSmrg# define YYLLOC_DEFAULT(Current, Rhs, N)				\
81805b261ecSmrg    do									\
81905b261ecSmrg      if (YYID (N))                                                    \
82005b261ecSmrg	{								\
82105b261ecSmrg	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
82205b261ecSmrg	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
82305b261ecSmrg	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
82405b261ecSmrg	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
82505b261ecSmrg	}								\
82605b261ecSmrg      else								\
82705b261ecSmrg	{								\
82805b261ecSmrg	  (Current).first_line   = (Current).last_line   =		\
82905b261ecSmrg	    YYRHSLOC (Rhs, 0).last_line;				\
83005b261ecSmrg	  (Current).first_column = (Current).last_column =		\
83105b261ecSmrg	    YYRHSLOC (Rhs, 0).last_column;				\
83205b261ecSmrg	}								\
83305b261ecSmrg    while (YYID (0))
83405b261ecSmrg#endif
83505b261ecSmrg
83605b261ecSmrg
83705b261ecSmrg/* YY_LOCATION_PRINT -- Print the location on the stream.
83805b261ecSmrg   This macro was not mandated originally: define only if we know
83905b261ecSmrg   we won't break user code: when these are the locations we know.  */
84005b261ecSmrg
84105b261ecSmrg#ifndef YY_LOCATION_PRINT
8426747b715Smrg# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
84305b261ecSmrg#  define YY_LOCATION_PRINT(File, Loc)			\
84405b261ecSmrg     fprintf (File, "%d.%d-%d.%d",			\
84505b261ecSmrg	      (Loc).first_line, (Loc).first_column,	\
84605b261ecSmrg	      (Loc).last_line,  (Loc).last_column)
84705b261ecSmrg# else
84805b261ecSmrg#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
84905b261ecSmrg# endif
85005b261ecSmrg#endif
85105b261ecSmrg
85205b261ecSmrg
85305b261ecSmrg/* YYLEX -- calling `yylex' with the right arguments.  */
85405b261ecSmrg
85505b261ecSmrg#ifdef YYLEX_PARAM
85605b261ecSmrg# define YYLEX yylex (YYLEX_PARAM)
85705b261ecSmrg#else
85805b261ecSmrg# define YYLEX yylex ()
85905b261ecSmrg#endif
86005b261ecSmrg
86105b261ecSmrg/* Enable debugging if requested.  */
86205b261ecSmrg#if YYDEBUG
86305b261ecSmrg
86405b261ecSmrg# ifndef YYFPRINTF
86505b261ecSmrg#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
86605b261ecSmrg#  define YYFPRINTF fprintf
86705b261ecSmrg# endif
86805b261ecSmrg
86905b261ecSmrg# define YYDPRINTF(Args)			\
87005b261ecSmrgdo {						\
87105b261ecSmrg  if (yydebug)					\
87205b261ecSmrg    YYFPRINTF Args;				\
87305b261ecSmrg} while (YYID (0))
87405b261ecSmrg
87505b261ecSmrg# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
87605b261ecSmrgdo {									  \
87705b261ecSmrg  if (yydebug)								  \
87805b261ecSmrg    {									  \
87905b261ecSmrg      YYFPRINTF (stderr, "%s ", Title);					  \
88005b261ecSmrg      yy_symbol_print (stderr,						  \
88105b261ecSmrg		  Type, Value); \
88205b261ecSmrg      YYFPRINTF (stderr, "\n");						  \
88305b261ecSmrg    }									  \
88405b261ecSmrg} while (YYID (0))
88505b261ecSmrg
88605b261ecSmrg
88705b261ecSmrg/*--------------------------------.
88805b261ecSmrg| Print this symbol on YYOUTPUT.  |
88905b261ecSmrg`--------------------------------*/
89005b261ecSmrg
89105b261ecSmrg/*ARGSUSED*/
89205b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
89305b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
89405b261ecSmrgstatic void
89505b261ecSmrgyy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
89605b261ecSmrg#else
89705b261ecSmrgstatic void
89805b261ecSmrgyy_symbol_value_print (yyoutput, yytype, yyvaluep)
89905b261ecSmrg    FILE *yyoutput;
90005b261ecSmrg    int yytype;
90105b261ecSmrg    YYSTYPE const * const yyvaluep;
90205b261ecSmrg#endif
90305b261ecSmrg{
90405b261ecSmrg  if (!yyvaluep)
90505b261ecSmrg    return;
90605b261ecSmrg# ifdef YYPRINT
90705b261ecSmrg  if (yytype < YYNTOKENS)
90805b261ecSmrg    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
90905b261ecSmrg# else
91005b261ecSmrg  YYUSE (yyoutput);
91105b261ecSmrg# endif
91205b261ecSmrg  switch (yytype)
91305b261ecSmrg    {
91405b261ecSmrg      default:
91505b261ecSmrg	break;
91605b261ecSmrg    }
91705b261ecSmrg}
91805b261ecSmrg
91905b261ecSmrg
92005b261ecSmrg/*--------------------------------.
92105b261ecSmrg| Print this symbol on YYOUTPUT.  |
92205b261ecSmrg`--------------------------------*/
92305b261ecSmrg
92405b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
92505b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
92605b261ecSmrgstatic void
92705b261ecSmrgyy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
92805b261ecSmrg#else
92905b261ecSmrgstatic void
93005b261ecSmrgyy_symbol_print (yyoutput, yytype, yyvaluep)
93105b261ecSmrg    FILE *yyoutput;
93205b261ecSmrg    int yytype;
93305b261ecSmrg    YYSTYPE const * const yyvaluep;
93405b261ecSmrg#endif
93505b261ecSmrg{
93605b261ecSmrg  if (yytype < YYNTOKENS)
93705b261ecSmrg    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
93805b261ecSmrg  else
93905b261ecSmrg    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
94005b261ecSmrg
94105b261ecSmrg  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
94205b261ecSmrg  YYFPRINTF (yyoutput, ")");
94305b261ecSmrg}
94405b261ecSmrg
94505b261ecSmrg/*------------------------------------------------------------------.
94605b261ecSmrg| yy_stack_print -- Print the state stack from its BOTTOM up to its |
94705b261ecSmrg| TOP (included).                                                   |
94805b261ecSmrg`------------------------------------------------------------------*/
94905b261ecSmrg
95005b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
95105b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
95205b261ecSmrgstatic void
9534642e01fSmrgyy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
95405b261ecSmrg#else
95505b261ecSmrgstatic void
9564642e01fSmrgyy_stack_print (yybottom, yytop)
9574642e01fSmrg    yytype_int16 *yybottom;
9584642e01fSmrg    yytype_int16 *yytop;
95905b261ecSmrg#endif
96005b261ecSmrg{
96105b261ecSmrg  YYFPRINTF (stderr, "Stack now");
9624642e01fSmrg  for (; yybottom <= yytop; yybottom++)
9634642e01fSmrg    {
9644642e01fSmrg      int yybot = *yybottom;
9654642e01fSmrg      YYFPRINTF (stderr, " %d", yybot);
9664642e01fSmrg    }
96705b261ecSmrg  YYFPRINTF (stderr, "\n");
96805b261ecSmrg}
96905b261ecSmrg
97005b261ecSmrg# define YY_STACK_PRINT(Bottom, Top)				\
97105b261ecSmrgdo {								\
97205b261ecSmrg  if (yydebug)							\
97305b261ecSmrg    yy_stack_print ((Bottom), (Top));				\
97405b261ecSmrg} while (YYID (0))
97505b261ecSmrg
97605b261ecSmrg
97705b261ecSmrg/*------------------------------------------------.
97805b261ecSmrg| Report that the YYRULE is going to be reduced.  |
97905b261ecSmrg`------------------------------------------------*/
98005b261ecSmrg
98105b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
98205b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
98305b261ecSmrgstatic void
98405b261ecSmrgyy_reduce_print (YYSTYPE *yyvsp, int yyrule)
98505b261ecSmrg#else
98605b261ecSmrgstatic void
98705b261ecSmrgyy_reduce_print (yyvsp, yyrule)
98805b261ecSmrg    YYSTYPE *yyvsp;
98905b261ecSmrg    int yyrule;
99005b261ecSmrg#endif
99105b261ecSmrg{
99205b261ecSmrg  int yynrhs = yyr2[yyrule];
99305b261ecSmrg  int yyi;
99405b261ecSmrg  unsigned long int yylno = yyrline[yyrule];
99505b261ecSmrg  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
99605b261ecSmrg	     yyrule - 1, yylno);
99705b261ecSmrg  /* The symbols being reduced.  */
99805b261ecSmrg  for (yyi = 0; yyi < yynrhs; yyi++)
99905b261ecSmrg    {
10004642e01fSmrg      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
100105b261ecSmrg      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
100205b261ecSmrg		       &(yyvsp[(yyi + 1) - (yynrhs)])
100305b261ecSmrg		       		       );
10044642e01fSmrg      YYFPRINTF (stderr, "\n");
100505b261ecSmrg    }
100605b261ecSmrg}
100705b261ecSmrg
100805b261ecSmrg# define YY_REDUCE_PRINT(Rule)		\
100905b261ecSmrgdo {					\
101005b261ecSmrg  if (yydebug)				\
101105b261ecSmrg    yy_reduce_print (yyvsp, Rule); \
101205b261ecSmrg} while (YYID (0))
101305b261ecSmrg
101405b261ecSmrg/* Nonzero means print parse trace.  It is left uninitialized so that
101505b261ecSmrg   multiple parsers can coexist.  */
101605b261ecSmrgint yydebug;
101705b261ecSmrg#else /* !YYDEBUG */
101805b261ecSmrg# define YYDPRINTF(Args)
101905b261ecSmrg# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
102005b261ecSmrg# define YY_STACK_PRINT(Bottom, Top)
102105b261ecSmrg# define YY_REDUCE_PRINT(Rule)
102205b261ecSmrg#endif /* !YYDEBUG */
102305b261ecSmrg
102405b261ecSmrg
102505b261ecSmrg/* YYINITDEPTH -- initial size of the parser's stacks.  */
102605b261ecSmrg#ifndef	YYINITDEPTH
102705b261ecSmrg# define YYINITDEPTH 200
102805b261ecSmrg#endif
102905b261ecSmrg
103005b261ecSmrg/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
103105b261ecSmrg   if the built-in stack extension method is used).
103205b261ecSmrg
103305b261ecSmrg   Do not make this value too large; the results are undefined if
103405b261ecSmrg   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
103505b261ecSmrg   evaluated with infinite-precision integer arithmetic.  */
103605b261ecSmrg
103705b261ecSmrg#ifndef YYMAXDEPTH
103805b261ecSmrg# define YYMAXDEPTH 10000
103905b261ecSmrg#endif
104005b261ecSmrg
104105b261ecSmrg
104205b261ecSmrg
104305b261ecSmrg#if YYERROR_VERBOSE
104405b261ecSmrg
104505b261ecSmrg# ifndef yystrlen
104605b261ecSmrg#  if defined __GLIBC__ && defined _STRING_H
104705b261ecSmrg#   define yystrlen strlen
104805b261ecSmrg#  else
104905b261ecSmrg/* Return the length of YYSTR.  */
105005b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
105105b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
105205b261ecSmrgstatic YYSIZE_T
105305b261ecSmrgyystrlen (const char *yystr)
105405b261ecSmrg#else
105505b261ecSmrgstatic YYSIZE_T
105605b261ecSmrgyystrlen (yystr)
105705b261ecSmrg    const char *yystr;
105805b261ecSmrg#endif
105905b261ecSmrg{
106005b261ecSmrg  YYSIZE_T yylen;
106105b261ecSmrg  for (yylen = 0; yystr[yylen]; yylen++)
106205b261ecSmrg    continue;
106305b261ecSmrg  return yylen;
106405b261ecSmrg}
106505b261ecSmrg#  endif
106605b261ecSmrg# endif
106705b261ecSmrg
106805b261ecSmrg# ifndef yystpcpy
106905b261ecSmrg#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
107005b261ecSmrg#   define yystpcpy stpcpy
107105b261ecSmrg#  else
107205b261ecSmrg/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
107305b261ecSmrg   YYDEST.  */
107405b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
107505b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
107605b261ecSmrgstatic char *
107705b261ecSmrgyystpcpy (char *yydest, const char *yysrc)
107805b261ecSmrg#else
107905b261ecSmrgstatic char *
108005b261ecSmrgyystpcpy (yydest, yysrc)
108105b261ecSmrg    char *yydest;
108205b261ecSmrg    const char *yysrc;
108305b261ecSmrg#endif
108405b261ecSmrg{
108505b261ecSmrg  char *yyd = yydest;
108605b261ecSmrg  const char *yys = yysrc;
108705b261ecSmrg
108805b261ecSmrg  while ((*yyd++ = *yys++) != '\0')
108905b261ecSmrg    continue;
109005b261ecSmrg
109105b261ecSmrg  return yyd - 1;
109205b261ecSmrg}
109305b261ecSmrg#  endif
109405b261ecSmrg# endif
109505b261ecSmrg
109605b261ecSmrg# ifndef yytnamerr
109705b261ecSmrg/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
109805b261ecSmrg   quotes and backslashes, so that it's suitable for yyerror.  The
109905b261ecSmrg   heuristic is that double-quoting is unnecessary unless the string
110005b261ecSmrg   contains an apostrophe, a comma, or backslash (other than
110105b261ecSmrg   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
110205b261ecSmrg   null, do not copy; instead, return the length of what the result
110305b261ecSmrg   would have been.  */
110405b261ecSmrgstatic YYSIZE_T
110505b261ecSmrgyytnamerr (char *yyres, const char *yystr)
110605b261ecSmrg{
110705b261ecSmrg  if (*yystr == '"')
110805b261ecSmrg    {
110905b261ecSmrg      YYSIZE_T yyn = 0;
111005b261ecSmrg      char const *yyp = yystr;
111105b261ecSmrg
111205b261ecSmrg      for (;;)
111305b261ecSmrg	switch (*++yyp)
111405b261ecSmrg	  {
111505b261ecSmrg	  case '\'':
111605b261ecSmrg	  case ',':
111705b261ecSmrg	    goto do_not_strip_quotes;
111805b261ecSmrg
111905b261ecSmrg	  case '\\':
112005b261ecSmrg	    if (*++yyp != '\\')
112105b261ecSmrg	      goto do_not_strip_quotes;
112205b261ecSmrg	    /* Fall through.  */
112305b261ecSmrg	  default:
112405b261ecSmrg	    if (yyres)
112505b261ecSmrg	      yyres[yyn] = *yyp;
112605b261ecSmrg	    yyn++;
112705b261ecSmrg	    break;
112805b261ecSmrg
112905b261ecSmrg	  case '"':
113005b261ecSmrg	    if (yyres)
113105b261ecSmrg	      yyres[yyn] = '\0';
113205b261ecSmrg	    return yyn;
113305b261ecSmrg	  }
113405b261ecSmrg    do_not_strip_quotes: ;
113505b261ecSmrg    }
113605b261ecSmrg
113705b261ecSmrg  if (! yyres)
113805b261ecSmrg    return yystrlen (yystr);
113905b261ecSmrg
114005b261ecSmrg  return yystpcpy (yyres, yystr) - yyres;
114105b261ecSmrg}
114205b261ecSmrg# endif
114305b261ecSmrg
114405b261ecSmrg/* Copy into YYRESULT an error message about the unexpected token
114505b261ecSmrg   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
114605b261ecSmrg   including the terminating null byte.  If YYRESULT is null, do not
114705b261ecSmrg   copy anything; just return the number of bytes that would be
114805b261ecSmrg   copied.  As a special case, return 0 if an ordinary "syntax error"
114905b261ecSmrg   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
115005b261ecSmrg   size calculation.  */
115105b261ecSmrgstatic YYSIZE_T
115205b261ecSmrgyysyntax_error (char *yyresult, int yystate, int yychar)
115305b261ecSmrg{
115405b261ecSmrg  int yyn = yypact[yystate];
115505b261ecSmrg
115605b261ecSmrg  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
115705b261ecSmrg    return 0;
115805b261ecSmrg  else
115905b261ecSmrg    {
116005b261ecSmrg      int yytype = YYTRANSLATE (yychar);
116105b261ecSmrg      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
116205b261ecSmrg      YYSIZE_T yysize = yysize0;
116305b261ecSmrg      YYSIZE_T yysize1;
116405b261ecSmrg      int yysize_overflow = 0;
116505b261ecSmrg      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
116605b261ecSmrg      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
116705b261ecSmrg      int yyx;
116805b261ecSmrg
116905b261ecSmrg# if 0
117005b261ecSmrg      /* This is so xgettext sees the translatable formats that are
117105b261ecSmrg	 constructed on the fly.  */
117205b261ecSmrg      YY_("syntax error, unexpected %s");
117305b261ecSmrg      YY_("syntax error, unexpected %s, expecting %s");
117405b261ecSmrg      YY_("syntax error, unexpected %s, expecting %s or %s");
117505b261ecSmrg      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
117605b261ecSmrg      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
117705b261ecSmrg# endif
117805b261ecSmrg      char *yyfmt;
117905b261ecSmrg      char const *yyf;
118005b261ecSmrg      static char const yyunexpected[] = "syntax error, unexpected %s";
118105b261ecSmrg      static char const yyexpecting[] = ", expecting %s";
118205b261ecSmrg      static char const yyor[] = " or %s";
118305b261ecSmrg      char yyformat[sizeof yyunexpected
118405b261ecSmrg		    + sizeof yyexpecting - 1
118505b261ecSmrg		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
118605b261ecSmrg		       * (sizeof yyor - 1))];
118705b261ecSmrg      char const *yyprefix = yyexpecting;
118805b261ecSmrg
118905b261ecSmrg      /* Start YYX at -YYN if negative to avoid negative indexes in
119005b261ecSmrg	 YYCHECK.  */
119105b261ecSmrg      int yyxbegin = yyn < 0 ? -yyn : 0;
119205b261ecSmrg
119305b261ecSmrg      /* Stay within bounds of both yycheck and yytname.  */
119405b261ecSmrg      int yychecklim = YYLAST - yyn + 1;
119505b261ecSmrg      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
119605b261ecSmrg      int yycount = 1;
119705b261ecSmrg
119805b261ecSmrg      yyarg[0] = yytname[yytype];
119905b261ecSmrg      yyfmt = yystpcpy (yyformat, yyunexpected);
120005b261ecSmrg
120105b261ecSmrg      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
120205b261ecSmrg	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
120305b261ecSmrg	  {
120405b261ecSmrg	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
120505b261ecSmrg	      {
120605b261ecSmrg		yycount = 1;
120705b261ecSmrg		yysize = yysize0;
120805b261ecSmrg		yyformat[sizeof yyunexpected - 1] = '\0';
120905b261ecSmrg		break;
121005b261ecSmrg	      }
121105b261ecSmrg	    yyarg[yycount++] = yytname[yyx];
121205b261ecSmrg	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
121305b261ecSmrg	    yysize_overflow |= (yysize1 < yysize);
121405b261ecSmrg	    yysize = yysize1;
121505b261ecSmrg	    yyfmt = yystpcpy (yyfmt, yyprefix);
121605b261ecSmrg	    yyprefix = yyor;
121705b261ecSmrg	  }
121805b261ecSmrg
121905b261ecSmrg      yyf = YY_(yyformat);
122005b261ecSmrg      yysize1 = yysize + yystrlen (yyf);
122105b261ecSmrg      yysize_overflow |= (yysize1 < yysize);
122205b261ecSmrg      yysize = yysize1;
122305b261ecSmrg
122405b261ecSmrg      if (yysize_overflow)
122505b261ecSmrg	return YYSIZE_MAXIMUM;
122605b261ecSmrg
122705b261ecSmrg      if (yyresult)
122805b261ecSmrg	{
122905b261ecSmrg	  /* Avoid sprintf, as that infringes on the user's name space.
123005b261ecSmrg	     Don't have undefined behavior even if the translation
123105b261ecSmrg	     produced a string with the wrong number of "%s"s.  */
123205b261ecSmrg	  char *yyp = yyresult;
123305b261ecSmrg	  int yyi = 0;
123405b261ecSmrg	  while ((*yyp = *yyf) != '\0')
123505b261ecSmrg	    {
123605b261ecSmrg	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
123705b261ecSmrg		{
123805b261ecSmrg		  yyp += yytnamerr (yyp, yyarg[yyi++]);
123905b261ecSmrg		  yyf += 2;
124005b261ecSmrg		}
124105b261ecSmrg	      else
124205b261ecSmrg		{
124305b261ecSmrg		  yyp++;
124405b261ecSmrg		  yyf++;
124505b261ecSmrg		}
124605b261ecSmrg	    }
124705b261ecSmrg	}
124805b261ecSmrg      return yysize;
124905b261ecSmrg    }
125005b261ecSmrg}
125105b261ecSmrg#endif /* YYERROR_VERBOSE */
125205b261ecSmrg
125305b261ecSmrg
125405b261ecSmrg/*-----------------------------------------------.
125505b261ecSmrg| Release the memory associated to this symbol.  |
125605b261ecSmrg`-----------------------------------------------*/
125705b261ecSmrg
125805b261ecSmrg/*ARGSUSED*/
125905b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
126005b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
126105b261ecSmrgstatic void
126205b261ecSmrgyydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
126305b261ecSmrg#else
126405b261ecSmrgstatic void
126505b261ecSmrgyydestruct (yymsg, yytype, yyvaluep)
126605b261ecSmrg    const char *yymsg;
126705b261ecSmrg    int yytype;
126805b261ecSmrg    YYSTYPE *yyvaluep;
126905b261ecSmrg#endif
127005b261ecSmrg{
127105b261ecSmrg  YYUSE (yyvaluep);
127205b261ecSmrg
127305b261ecSmrg  if (!yymsg)
127405b261ecSmrg    yymsg = "Deleting";
127505b261ecSmrg  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
127605b261ecSmrg
127705b261ecSmrg  switch (yytype)
127805b261ecSmrg    {
127905b261ecSmrg
128005b261ecSmrg      default:
128105b261ecSmrg	break;
128205b261ecSmrg    }
128305b261ecSmrg}
128405b261ecSmrg
128505b261ecSmrg/* Prevent warnings from -Wmissing-prototypes.  */
128605b261ecSmrg#ifdef YYPARSE_PARAM
128705b261ecSmrg#if defined __STDC__ || defined __cplusplus
128805b261ecSmrgint yyparse (void *YYPARSE_PARAM);
128905b261ecSmrg#else
129005b261ecSmrgint yyparse ();
129105b261ecSmrg#endif
129205b261ecSmrg#else /* ! YYPARSE_PARAM */
129305b261ecSmrg#if defined __STDC__ || defined __cplusplus
129405b261ecSmrgint yyparse (void);
129505b261ecSmrg#else
129605b261ecSmrgint yyparse ();
129705b261ecSmrg#endif
129805b261ecSmrg#endif /* ! YYPARSE_PARAM */
129905b261ecSmrg
130005b261ecSmrg
13014642e01fSmrg/* The lookahead symbol.  */
130205b261ecSmrgint yychar;
130305b261ecSmrg
13044642e01fSmrg/* The semantic value of the lookahead symbol.  */
130505b261ecSmrgYYSTYPE yylval;
130605b261ecSmrg
130705b261ecSmrg/* Number of syntax errors so far.  */
130805b261ecSmrgint yynerrs;
130905b261ecSmrg
131005b261ecSmrg
131105b261ecSmrg
13124642e01fSmrg/*-------------------------.
13134642e01fSmrg| yyparse or yypush_parse.  |
13144642e01fSmrg`-------------------------*/
131505b261ecSmrg
131605b261ecSmrg#ifdef YYPARSE_PARAM
131705b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
131805b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
131905b261ecSmrgint
132005b261ecSmrgyyparse (void *YYPARSE_PARAM)
132105b261ecSmrg#else
132205b261ecSmrgint
132305b261ecSmrgyyparse (YYPARSE_PARAM)
132405b261ecSmrg    void *YYPARSE_PARAM;
132505b261ecSmrg#endif
132605b261ecSmrg#else /* ! YYPARSE_PARAM */
132705b261ecSmrg#if (defined __STDC__ || defined __C99__FUNC__ \
132805b261ecSmrg     || defined __cplusplus || defined _MSC_VER)
132905b261ecSmrgint
133005b261ecSmrgyyparse (void)
133105b261ecSmrg#else
133205b261ecSmrgint
133305b261ecSmrgyyparse ()
133405b261ecSmrg
133505b261ecSmrg#endif
133605b261ecSmrg#endif
133705b261ecSmrg{
133805b261ecSmrg
133905b261ecSmrg
13404642e01fSmrg    int yystate;
13414642e01fSmrg    /* Number of tokens to shift before error messages enabled.  */
13424642e01fSmrg    int yyerrstatus;
134305b261ecSmrg
13444642e01fSmrg    /* The stacks and their tools:
13454642e01fSmrg       `yyss': related to states.
13464642e01fSmrg       `yyvs': related to semantic values.
134705b261ecSmrg
13484642e01fSmrg       Refer to the stacks thru separate pointers, to allow yyoverflow
13494642e01fSmrg       to reallocate them elsewhere.  */
135005b261ecSmrg
13514642e01fSmrg    /* The state stack.  */
13524642e01fSmrg    yytype_int16 yyssa[YYINITDEPTH];
13534642e01fSmrg    yytype_int16 *yyss;
13544642e01fSmrg    yytype_int16 *yyssp;
135505b261ecSmrg
13564642e01fSmrg    /* The semantic value stack.  */
13574642e01fSmrg    YYSTYPE yyvsa[YYINITDEPTH];
13584642e01fSmrg    YYSTYPE *yyvs;
13594642e01fSmrg    YYSTYPE *yyvsp;
136005b261ecSmrg
13614642e01fSmrg    YYSIZE_T yystacksize;
136205b261ecSmrg
13634642e01fSmrg  int yyn;
13644642e01fSmrg  int yyresult;
13654642e01fSmrg  /* Lookahead token as an internal (translated) token number.  */
13664642e01fSmrg  int yytoken;
136705b261ecSmrg  /* The variables used to return semantic value and location from the
136805b261ecSmrg     action routines.  */
136905b261ecSmrg  YYSTYPE yyval;
137005b261ecSmrg
13714642e01fSmrg#if YYERROR_VERBOSE
13724642e01fSmrg  /* Buffer for error messages, and its allocated size.  */
13734642e01fSmrg  char yymsgbuf[128];
13744642e01fSmrg  char *yymsg = yymsgbuf;
13754642e01fSmrg  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
13764642e01fSmrg#endif
13774642e01fSmrg
13784642e01fSmrg#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
137905b261ecSmrg
138005b261ecSmrg  /* The number of symbols on the RHS of the reduced rule.
138105b261ecSmrg     Keep to zero when no symbol should be popped.  */
138205b261ecSmrg  int yylen = 0;
138305b261ecSmrg
13844642e01fSmrg  yytoken = 0;
13854642e01fSmrg  yyss = yyssa;
13864642e01fSmrg  yyvs = yyvsa;
13874642e01fSmrg  yystacksize = YYINITDEPTH;
13884642e01fSmrg
138905b261ecSmrg  YYDPRINTF ((stderr, "Starting parse\n"));
139005b261ecSmrg
139105b261ecSmrg  yystate = 0;
139205b261ecSmrg  yyerrstatus = 0;
139305b261ecSmrg  yynerrs = 0;
13944642e01fSmrg  yychar = YYEMPTY; /* Cause a token to be read.  */
139505b261ecSmrg
139605b261ecSmrg  /* Initialize stack pointers.
139705b261ecSmrg     Waste one element of value and location stack
139805b261ecSmrg     so that they stay on the same level as the state stack.
139905b261ecSmrg     The wasted elements are never initialized.  */
140005b261ecSmrg  yyssp = yyss;
140105b261ecSmrg  yyvsp = yyvs;
140205b261ecSmrg
140305b261ecSmrg  goto yysetstate;
140405b261ecSmrg
140505b261ecSmrg/*------------------------------------------------------------.
140605b261ecSmrg| yynewstate -- Push a new state, which is found in yystate.  |
140705b261ecSmrg`------------------------------------------------------------*/
140805b261ecSmrg yynewstate:
140905b261ecSmrg  /* In all cases, when you get here, the value and location stacks
141005b261ecSmrg     have just been pushed.  So pushing a state here evens the stacks.  */
141105b261ecSmrg  yyssp++;
141205b261ecSmrg
141305b261ecSmrg yysetstate:
141405b261ecSmrg  *yyssp = yystate;
141505b261ecSmrg
141605b261ecSmrg  if (yyss + yystacksize - 1 <= yyssp)
141705b261ecSmrg    {
141805b261ecSmrg      /* Get the current used size of the three stacks, in elements.  */
141905b261ecSmrg      YYSIZE_T yysize = yyssp - yyss + 1;
142005b261ecSmrg
142105b261ecSmrg#ifdef yyoverflow
142205b261ecSmrg      {
142305b261ecSmrg	/* Give user a chance to reallocate the stack.  Use copies of
142405b261ecSmrg	   these so that the &'s don't force the real ones into
142505b261ecSmrg	   memory.  */
142605b261ecSmrg	YYSTYPE *yyvs1 = yyvs;
142705b261ecSmrg	yytype_int16 *yyss1 = yyss;
142805b261ecSmrg
142905b261ecSmrg	/* Each stack pointer address is followed by the size of the
143005b261ecSmrg	   data in use in that stack, in bytes.  This used to be a
143105b261ecSmrg	   conditional around just the two extra args, but that might
143205b261ecSmrg	   be undefined if yyoverflow is a macro.  */
143305b261ecSmrg	yyoverflow (YY_("memory exhausted"),
143405b261ecSmrg		    &yyss1, yysize * sizeof (*yyssp),
143505b261ecSmrg		    &yyvs1, yysize * sizeof (*yyvsp),
143605b261ecSmrg		    &yystacksize);
143705b261ecSmrg
143805b261ecSmrg	yyss = yyss1;
143905b261ecSmrg	yyvs = yyvs1;
144005b261ecSmrg      }
144105b261ecSmrg#else /* no yyoverflow */
144205b261ecSmrg# ifndef YYSTACK_RELOCATE
144305b261ecSmrg      goto yyexhaustedlab;
144405b261ecSmrg# else
144505b261ecSmrg      /* Extend the stack our own way.  */
144605b261ecSmrg      if (YYMAXDEPTH <= yystacksize)
144705b261ecSmrg	goto yyexhaustedlab;
144805b261ecSmrg      yystacksize *= 2;
144905b261ecSmrg      if (YYMAXDEPTH < yystacksize)
145005b261ecSmrg	yystacksize = YYMAXDEPTH;
145105b261ecSmrg
145205b261ecSmrg      {
145305b261ecSmrg	yytype_int16 *yyss1 = yyss;
145405b261ecSmrg	union yyalloc *yyptr =
145505b261ecSmrg	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
145605b261ecSmrg	if (! yyptr)
145705b261ecSmrg	  goto yyexhaustedlab;
14584642e01fSmrg	YYSTACK_RELOCATE (yyss_alloc, yyss);
14594642e01fSmrg	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
146005b261ecSmrg#  undef YYSTACK_RELOCATE
146105b261ecSmrg	if (yyss1 != yyssa)
146205b261ecSmrg	  YYSTACK_FREE (yyss1);
146305b261ecSmrg      }
146405b261ecSmrg# endif
146505b261ecSmrg#endif /* no yyoverflow */
146605b261ecSmrg
146705b261ecSmrg      yyssp = yyss + yysize - 1;
146805b261ecSmrg      yyvsp = yyvs + yysize - 1;
146905b261ecSmrg
147005b261ecSmrg      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
147105b261ecSmrg		  (unsigned long int) yystacksize));
147205b261ecSmrg
147305b261ecSmrg      if (yyss + yystacksize - 1 <= yyssp)
147405b261ecSmrg	YYABORT;
147505b261ecSmrg    }
147605b261ecSmrg
147705b261ecSmrg  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
147805b261ecSmrg
14794642e01fSmrg  if (yystate == YYFINAL)
14804642e01fSmrg    YYACCEPT;
14814642e01fSmrg
148205b261ecSmrg  goto yybackup;
148305b261ecSmrg
148405b261ecSmrg/*-----------.
148505b261ecSmrg| yybackup.  |
148605b261ecSmrg`-----------*/
148705b261ecSmrgyybackup:
148805b261ecSmrg
148905b261ecSmrg  /* Do appropriate processing given the current state.  Read a
14904642e01fSmrg     lookahead token if we need one and don't already have one.  */
149105b261ecSmrg
14924642e01fSmrg  /* First try to decide what to do without reference to lookahead token.  */
149305b261ecSmrg  yyn = yypact[yystate];
149405b261ecSmrg  if (yyn == YYPACT_NINF)
149505b261ecSmrg    goto yydefault;
149605b261ecSmrg
14974642e01fSmrg  /* Not known => get a lookahead token if don't already have one.  */
149805b261ecSmrg
14994642e01fSmrg  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
150005b261ecSmrg  if (yychar == YYEMPTY)
150105b261ecSmrg    {
150205b261ecSmrg      YYDPRINTF ((stderr, "Reading a token: "));
150305b261ecSmrg      yychar = YYLEX;
150405b261ecSmrg    }
150505b261ecSmrg
150605b261ecSmrg  if (yychar <= YYEOF)
150705b261ecSmrg    {
150805b261ecSmrg      yychar = yytoken = YYEOF;
150905b261ecSmrg      YYDPRINTF ((stderr, "Now at end of input.\n"));
151005b261ecSmrg    }
151105b261ecSmrg  else
151205b261ecSmrg    {
151305b261ecSmrg      yytoken = YYTRANSLATE (yychar);
151405b261ecSmrg      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
151505b261ecSmrg    }
151605b261ecSmrg
151705b261ecSmrg  /* If the proper action on seeing token YYTOKEN is to reduce or to
151805b261ecSmrg     detect an error, take that action.  */
151905b261ecSmrg  yyn += yytoken;
152005b261ecSmrg  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
152105b261ecSmrg    goto yydefault;
152205b261ecSmrg  yyn = yytable[yyn];
152305b261ecSmrg  if (yyn <= 0)
152405b261ecSmrg    {
152505b261ecSmrg      if (yyn == 0 || yyn == YYTABLE_NINF)
152605b261ecSmrg	goto yyerrlab;
152705b261ecSmrg      yyn = -yyn;
152805b261ecSmrg      goto yyreduce;
152905b261ecSmrg    }
153005b261ecSmrg
153105b261ecSmrg  /* Count tokens shifted since error; after three, turn off error
153205b261ecSmrg     status.  */
153305b261ecSmrg  if (yyerrstatus)
153405b261ecSmrg    yyerrstatus--;
153505b261ecSmrg
15364642e01fSmrg  /* Shift the lookahead token.  */
153705b261ecSmrg  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
153805b261ecSmrg
15394642e01fSmrg  /* Discard the shifted token.  */
15404642e01fSmrg  yychar = YYEMPTY;
154105b261ecSmrg
154205b261ecSmrg  yystate = yyn;
154305b261ecSmrg  *++yyvsp = yylval;
154405b261ecSmrg
154505b261ecSmrg  goto yynewstate;
154605b261ecSmrg
154705b261ecSmrg
154805b261ecSmrg/*-----------------------------------------------------------.
154905b261ecSmrg| yydefault -- do the default action for the current state.  |
155005b261ecSmrg`-----------------------------------------------------------*/
155105b261ecSmrgyydefault:
155205b261ecSmrg  yyn = yydefact[yystate];
155305b261ecSmrg  if (yyn == 0)
155405b261ecSmrg    goto yyerrlab;
155505b261ecSmrg  goto yyreduce;
155605b261ecSmrg
155705b261ecSmrg
155805b261ecSmrg/*-----------------------------.
155905b261ecSmrg| yyreduce -- Do a reduction.  |
156005b261ecSmrg`-----------------------------*/
156105b261ecSmrgyyreduce:
156205b261ecSmrg  /* yyn is the number of a rule to reduce with.  */
156305b261ecSmrg  yylen = yyr2[yyn];
156405b261ecSmrg
156505b261ecSmrg  /* If YYLEN is nonzero, implement the default value of the action:
156605b261ecSmrg     `$$ = $1'.
156705b261ecSmrg
156805b261ecSmrg     Otherwise, the following line sets YYVAL to garbage.
156905b261ecSmrg     This behavior is undocumented and Bison
157005b261ecSmrg     users should not rely upon it.  Assigning to YYVAL
157105b261ecSmrg     unconditionally makes the parser a bit smaller, and it avoids a
157205b261ecSmrg     GCC warning that YYVAL may be used uninitialized.  */
157305b261ecSmrg  yyval = yyvsp[1-yylen];
157405b261ecSmrg
157505b261ecSmrg
157605b261ecSmrg  YY_REDUCE_PRINT (yyn);
157705b261ecSmrg  switch (yyn)
157805b261ecSmrg    {
15796747b715Smrg        case 20:
15804642e01fSmrg
15816747b715Smrg/* Line 1464 of yacc.c  */
15826747b715Smrg#line 159 "winprefsyacc.y"
158305b261ecSmrg    { SetTrayIcon((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
158405b261ecSmrg    break;
158505b261ecSmrg
15866747b715Smrg  case 21:
15874642e01fSmrg
15886747b715Smrg/* Line 1464 of yacc.c  */
15896747b715Smrg#line 162 "winprefsyacc.y"
159005b261ecSmrg    { SetRootMenu((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
159105b261ecSmrg    break;
159205b261ecSmrg
15936747b715Smrg  case 22:
15944642e01fSmrg
15956747b715Smrg/* Line 1464 of yacc.c  */
15966747b715Smrg#line 165 "winprefsyacc.y"
159705b261ecSmrg    { SetDefaultSysMenu((yyvsp[(2) - (4)].sVal), (yyvsp[(3) - (4)].iVal)); free((yyvsp[(2) - (4)].sVal)); }
159805b261ecSmrg    break;
159905b261ecSmrg
16006747b715Smrg  case 23:
16014642e01fSmrg
16026747b715Smrg/* Line 1464 of yacc.c  */
16036747b715Smrg#line 168 "winprefsyacc.y"
160405b261ecSmrg    { SetDefaultIcon((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
160505b261ecSmrg    break;
160605b261ecSmrg
16076747b715Smrg  case 24:
16084642e01fSmrg
16096747b715Smrg/* Line 1464 of yacc.c  */
16106747b715Smrg#line 171 "winprefsyacc.y"
161105b261ecSmrg    { SetIconDirectory((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
161205b261ecSmrg    break;
161305b261ecSmrg
16146747b715Smrg  case 25:
16154642e01fSmrg
16166747b715Smrg/* Line 1464 of yacc.c  */
16176747b715Smrg#line 174 "winprefsyacc.y"
161805b261ecSmrg    { AddMenuLine("-", CMD_SEPARATOR, ""); }
161905b261ecSmrg    break;
162005b261ecSmrg
16216747b715Smrg  case 26:
16224642e01fSmrg
16236747b715Smrg/* Line 1464 of yacc.c  */
16246747b715Smrg#line 175 "winprefsyacc.y"
162505b261ecSmrg    { AddMenuLine((yyvsp[(1) - (4)].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[(1) - (4)].sVal)); }
162605b261ecSmrg    break;
162705b261ecSmrg
16286747b715Smrg  case 27:
16294642e01fSmrg
16306747b715Smrg/* Line 1464 of yacc.c  */
16316747b715Smrg#line 176 "winprefsyacc.y"
163205b261ecSmrg    { AddMenuLine((yyvsp[(1) - (5)].sVal), CMD_EXEC, (yyvsp[(3) - (5)].sVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(3) - (5)].sVal)); }
163305b261ecSmrg    break;
163405b261ecSmrg
16356747b715Smrg  case 28:
16364642e01fSmrg
16376747b715Smrg/* Line 1464 of yacc.c  */
16386747b715Smrg#line 177 "winprefsyacc.y"
163905b261ecSmrg    { AddMenuLine((yyvsp[(1) - (5)].sVal), CMD_MENU, (yyvsp[(3) - (5)].sVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(3) - (5)].sVal)); }
164005b261ecSmrg    break;
164105b261ecSmrg
16426747b715Smrg  case 29:
16434642e01fSmrg
16446747b715Smrg/* Line 1464 of yacc.c  */
16456747b715Smrg#line 178 "winprefsyacc.y"
164605b261ecSmrg    { AddMenuLine((yyvsp[(1) - (4)].sVal), CMD_RELOAD, ""); free((yyvsp[(1) - (4)].sVal)); }
164705b261ecSmrg    break;
164805b261ecSmrg
16496747b715Smrg  case 32:
16504642e01fSmrg
16516747b715Smrg/* Line 1464 of yacc.c  */
16526747b715Smrg#line 185 "winprefsyacc.y"
165305b261ecSmrg    { OpenMenu((yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
165405b261ecSmrg    break;
165505b261ecSmrg
16566747b715Smrg  case 33:
16574642e01fSmrg
16586747b715Smrg/* Line 1464 of yacc.c  */
16596747b715Smrg#line 185 "winprefsyacc.y"
166005b261ecSmrg    {CloseMenu();}
166105b261ecSmrg    break;
166205b261ecSmrg
16636747b715Smrg  case 34:
16644642e01fSmrg
16656747b715Smrg/* Line 1464 of yacc.c  */
16666747b715Smrg#line 188 "winprefsyacc.y"
166705b261ecSmrg    { AddIconLine((yyvsp[(1) - (4)].sVal), (yyvsp[(2) - (4)].sVal)); free((yyvsp[(1) - (4)].sVal)); free((yyvsp[(2) - (4)].sVal)); }
166805b261ecSmrg    break;
166905b261ecSmrg
16706747b715Smrg  case 37:
16714642e01fSmrg
16726747b715Smrg/* Line 1464 of yacc.c  */
16736747b715Smrg#line 195 "winprefsyacc.y"
167405b261ecSmrg    {OpenIcons();}
167505b261ecSmrg    break;
167605b261ecSmrg
16776747b715Smrg  case 38:
16784642e01fSmrg
16796747b715Smrg/* Line 1464 of yacc.c  */
16806747b715Smrg#line 195 "winprefsyacc.y"
168105b261ecSmrg    {CloseIcons();}
168205b261ecSmrg    break;
168305b261ecSmrg
16846747b715Smrg  case 39:
16856747b715Smrg
16866747b715Smrg/* Line 1464 of yacc.c  */
16876747b715Smrg#line 198 "winprefsyacc.y"
16886747b715Smrg    { (yyval.uVal)=STYLE_TOPMOST; }
16896747b715Smrg    break;
16906747b715Smrg
16916747b715Smrg  case 40:
16926747b715Smrg
16936747b715Smrg/* Line 1464 of yacc.c  */
16946747b715Smrg#line 199 "winprefsyacc.y"
16956747b715Smrg    { (yyval.uVal)=STYLE_MAXIMIZE; }
16966747b715Smrg    break;
16976747b715Smrg
16986747b715Smrg  case 41:
16996747b715Smrg
17006747b715Smrg/* Line 1464 of yacc.c  */
17016747b715Smrg#line 200 "winprefsyacc.y"
17026747b715Smrg    { (yyval.uVal)=STYLE_MINIMIZE; }
17036747b715Smrg    break;
17046747b715Smrg
17056747b715Smrg  case 42:
17066747b715Smrg
17076747b715Smrg/* Line 1464 of yacc.c  */
17086747b715Smrg#line 201 "winprefsyacc.y"
17096747b715Smrg    { (yyval.uVal)=STYLE_BOTTOM; }
17106747b715Smrg    break;
17116747b715Smrg
17126747b715Smrg  case 43:
17136747b715Smrg
17146747b715Smrg/* Line 1464 of yacc.c  */
17156747b715Smrg#line 204 "winprefsyacc.y"
17166747b715Smrg    { (yyval.uVal)=STYLE_NOTITLE; }
17176747b715Smrg    break;
17186747b715Smrg
17196747b715Smrg  case 44:
17206747b715Smrg
17216747b715Smrg/* Line 1464 of yacc.c  */
17226747b715Smrg#line 205 "winprefsyacc.y"
17236747b715Smrg    { (yyval.uVal)=STYLE_OUTLINE; }
17246747b715Smrg    break;
17256747b715Smrg
17266747b715Smrg  case 45:
17276747b715Smrg
17286747b715Smrg/* Line 1464 of yacc.c  */
17296747b715Smrg#line 206 "winprefsyacc.y"
17306747b715Smrg    { (yyval.uVal)=STYLE_NOFRAME; }
17316747b715Smrg    break;
17326747b715Smrg
17336747b715Smrg  case 46:
17346747b715Smrg
17356747b715Smrg/* Line 1464 of yacc.c  */
17366747b715Smrg#line 209 "winprefsyacc.y"
17376747b715Smrg    { (yyval.uVal)=(yyvsp[(1) - (1)].uVal); }
17386747b715Smrg    break;
17396747b715Smrg
17406747b715Smrg  case 47:
17416747b715Smrg
17426747b715Smrg/* Line 1464 of yacc.c  */
17436747b715Smrg#line 210 "winprefsyacc.y"
17446747b715Smrg    { (yyval.uVal)=(yyvsp[(1) - (1)].uVal); }
17456747b715Smrg    break;
17466747b715Smrg
17476747b715Smrg  case 48:
17486747b715Smrg
17496747b715Smrg/* Line 1464 of yacc.c  */
17506747b715Smrg#line 211 "winprefsyacc.y"
17516747b715Smrg    { (yyval.uVal)=(yyvsp[(1) - (2)].uVal)|(yyvsp[(2) - (2)].uVal); }
17526747b715Smrg    break;
17536747b715Smrg
17546747b715Smrg  case 49:
17556747b715Smrg
17566747b715Smrg/* Line 1464 of yacc.c  */
17576747b715Smrg#line 212 "winprefsyacc.y"
17586747b715Smrg    { (yyval.uVal)=(yyvsp[(1) - (2)].uVal)|(yyvsp[(2) - (2)].uVal); }
17596747b715Smrg    break;
17606747b715Smrg
17616747b715Smrg  case 50:
17624642e01fSmrg
17636747b715Smrg/* Line 1464 of yacc.c  */
17646747b715Smrg#line 215 "winprefsyacc.y"
17656747b715Smrg    { AddStyleLine((yyvsp[(1) - (4)].sVal), (yyvsp[(2) - (4)].uVal)); free((yyvsp[(1) - (4)].sVal)); }
17666747b715Smrg    break;
17676747b715Smrg
17686747b715Smrg  case 53:
17696747b715Smrg
17706747b715Smrg/* Line 1464 of yacc.c  */
17716747b715Smrg#line 222 "winprefsyacc.y"
17726747b715Smrg    {OpenStyles();}
17736747b715Smrg    break;
17746747b715Smrg
17756747b715Smrg  case 54:
17766747b715Smrg
17776747b715Smrg/* Line 1464 of yacc.c  */
17786747b715Smrg#line 222 "winprefsyacc.y"
17796747b715Smrg    {CloseStyles();}
17806747b715Smrg    break;
17816747b715Smrg
17826747b715Smrg  case 55:
17836747b715Smrg
17846747b715Smrg/* Line 1464 of yacc.c  */
17856747b715Smrg#line 225 "winprefsyacc.y"
178605b261ecSmrg    { (yyval.iVal)=AT_END; }
178705b261ecSmrg    break;
178805b261ecSmrg
17896747b715Smrg  case 56:
17904642e01fSmrg
17916747b715Smrg/* Line 1464 of yacc.c  */
17926747b715Smrg#line 226 "winprefsyacc.y"
179305b261ecSmrg    { (yyval.iVal)=AT_START; }
179405b261ecSmrg    break;
179505b261ecSmrg
17966747b715Smrg  case 57:
17974642e01fSmrg
17986747b715Smrg/* Line 1464 of yacc.c  */
17996747b715Smrg#line 227 "winprefsyacc.y"
180005b261ecSmrg    { (yyval.iVal)=AT_END; }
180105b261ecSmrg    break;
180205b261ecSmrg
18036747b715Smrg  case 58:
18044642e01fSmrg
18056747b715Smrg/* Line 1464 of yacc.c  */
18066747b715Smrg#line 230 "winprefsyacc.y"
180705b261ecSmrg    { AddSysMenuLine((yyvsp[(1) - (5)].sVal), (yyvsp[(2) - (5)].sVal), (yyvsp[(3) - (5)].iVal)); free((yyvsp[(1) - (5)].sVal)); free((yyvsp[(2) - (5)].sVal)); }
180805b261ecSmrg    break;
180905b261ecSmrg
18106747b715Smrg  case 61:
18114642e01fSmrg
18126747b715Smrg/* Line 1464 of yacc.c  */
18136747b715Smrg#line 237 "winprefsyacc.y"
181405b261ecSmrg    {OpenSysMenu();}
181505b261ecSmrg    break;
181605b261ecSmrg
18176747b715Smrg  case 62:
18184642e01fSmrg
18196747b715Smrg/* Line 1464 of yacc.c  */
18206747b715Smrg#line 237 "winprefsyacc.y"
182105b261ecSmrg    {CloseSysMenu();}
182205b261ecSmrg    break;
182305b261ecSmrg
18246747b715Smrg  case 63:
18256747b715Smrg
18266747b715Smrg/* Line 1464 of yacc.c  */
18276747b715Smrg#line 240 "winprefsyacc.y"
18286747b715Smrg    { pref.fForceExit = TRUE; }
18296747b715Smrg    break;
18306747b715Smrg
18316747b715Smrg  case 64:
18324642e01fSmrg
18336747b715Smrg/* Line 1464 of yacc.c  */
18346747b715Smrg#line 243 "winprefsyacc.y"
183505b261ecSmrg    { pref.fSilentExit = TRUE; }
183605b261ecSmrg    break;
183705b261ecSmrg
18386747b715Smrg  case 65:
18394642e01fSmrg
18406747b715Smrg/* Line 1464 of yacc.c  */
18416747b715Smrg#line 246 "winprefsyacc.y"
184205b261ecSmrg    { ErrorF("LoadPreferences: %s\n", (yyvsp[(2) - (3)].sVal)); free((yyvsp[(2) - (3)].sVal)); }
184305b261ecSmrg    break;
184405b261ecSmrg
184505b261ecSmrg
18464642e01fSmrg
18476747b715Smrg/* Line 1464 of yacc.c  */
18486747b715Smrg#line 1849 "winprefsyacc.c"
184905b261ecSmrg      default: break;
185005b261ecSmrg    }
185105b261ecSmrg  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
185205b261ecSmrg
185305b261ecSmrg  YYPOPSTACK (yylen);
185405b261ecSmrg  yylen = 0;
185505b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
185605b261ecSmrg
185705b261ecSmrg  *++yyvsp = yyval;
185805b261ecSmrg
185905b261ecSmrg  /* Now `shift' the result of the reduction.  Determine what state
186005b261ecSmrg     that goes to, based on the state we popped back to and the rule
186105b261ecSmrg     number reduced by.  */
186205b261ecSmrg
186305b261ecSmrg  yyn = yyr1[yyn];
186405b261ecSmrg
186505b261ecSmrg  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
186605b261ecSmrg  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
186705b261ecSmrg    yystate = yytable[yystate];
186805b261ecSmrg  else
186905b261ecSmrg    yystate = yydefgoto[yyn - YYNTOKENS];
187005b261ecSmrg
187105b261ecSmrg  goto yynewstate;
187205b261ecSmrg
187305b261ecSmrg
187405b261ecSmrg/*------------------------------------.
187505b261ecSmrg| yyerrlab -- here on detecting error |
187605b261ecSmrg`------------------------------------*/
187705b261ecSmrgyyerrlab:
187805b261ecSmrg  /* If not already recovering from an error, report this error.  */
187905b261ecSmrg  if (!yyerrstatus)
188005b261ecSmrg    {
188105b261ecSmrg      ++yynerrs;
188205b261ecSmrg#if ! YYERROR_VERBOSE
188305b261ecSmrg      yyerror (YY_("syntax error"));
188405b261ecSmrg#else
188505b261ecSmrg      {
188605b261ecSmrg	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
188705b261ecSmrg	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
188805b261ecSmrg	  {
188905b261ecSmrg	    YYSIZE_T yyalloc = 2 * yysize;
189005b261ecSmrg	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
189105b261ecSmrg	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
189205b261ecSmrg	    if (yymsg != yymsgbuf)
189305b261ecSmrg	      YYSTACK_FREE (yymsg);
189405b261ecSmrg	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
189505b261ecSmrg	    if (yymsg)
189605b261ecSmrg	      yymsg_alloc = yyalloc;
189705b261ecSmrg	    else
189805b261ecSmrg	      {
189905b261ecSmrg		yymsg = yymsgbuf;
190005b261ecSmrg		yymsg_alloc = sizeof yymsgbuf;
190105b261ecSmrg	      }
190205b261ecSmrg	  }
190305b261ecSmrg
190405b261ecSmrg	if (0 < yysize && yysize <= yymsg_alloc)
190505b261ecSmrg	  {
190605b261ecSmrg	    (void) yysyntax_error (yymsg, yystate, yychar);
190705b261ecSmrg	    yyerror (yymsg);
190805b261ecSmrg	  }
190905b261ecSmrg	else
191005b261ecSmrg	  {
191105b261ecSmrg	    yyerror (YY_("syntax error"));
191205b261ecSmrg	    if (yysize != 0)
191305b261ecSmrg	      goto yyexhaustedlab;
191405b261ecSmrg	  }
191505b261ecSmrg      }
191605b261ecSmrg#endif
191705b261ecSmrg    }
191805b261ecSmrg
191905b261ecSmrg
192005b261ecSmrg
192105b261ecSmrg  if (yyerrstatus == 3)
192205b261ecSmrg    {
19234642e01fSmrg      /* If just tried and failed to reuse lookahead token after an
192405b261ecSmrg	 error, discard it.  */
192505b261ecSmrg
192605b261ecSmrg      if (yychar <= YYEOF)
192705b261ecSmrg	{
192805b261ecSmrg	  /* Return failure if at end of input.  */
192905b261ecSmrg	  if (yychar == YYEOF)
193005b261ecSmrg	    YYABORT;
193105b261ecSmrg	}
193205b261ecSmrg      else
193305b261ecSmrg	{
193405b261ecSmrg	  yydestruct ("Error: discarding",
193505b261ecSmrg		      yytoken, &yylval);
193605b261ecSmrg	  yychar = YYEMPTY;
193705b261ecSmrg	}
193805b261ecSmrg    }
193905b261ecSmrg
19404642e01fSmrg  /* Else will try to reuse lookahead token after shifting the error
194105b261ecSmrg     token.  */
194205b261ecSmrg  goto yyerrlab1;
194305b261ecSmrg
194405b261ecSmrg
194505b261ecSmrg/*---------------------------------------------------.
194605b261ecSmrg| yyerrorlab -- error raised explicitly by YYERROR.  |
194705b261ecSmrg`---------------------------------------------------*/
194805b261ecSmrgyyerrorlab:
194905b261ecSmrg
195005b261ecSmrg  /* Pacify compilers like GCC when the user code never invokes
195105b261ecSmrg     YYERROR and the label yyerrorlab therefore never appears in user
195205b261ecSmrg     code.  */
195305b261ecSmrg  if (/*CONSTCOND*/ 0)
195405b261ecSmrg     goto yyerrorlab;
195505b261ecSmrg
195605b261ecSmrg  /* Do not reclaim the symbols of the rule which action triggered
195705b261ecSmrg     this YYERROR.  */
195805b261ecSmrg  YYPOPSTACK (yylen);
195905b261ecSmrg  yylen = 0;
196005b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
196105b261ecSmrg  yystate = *yyssp;
196205b261ecSmrg  goto yyerrlab1;
196305b261ecSmrg
196405b261ecSmrg
196505b261ecSmrg/*-------------------------------------------------------------.
196605b261ecSmrg| yyerrlab1 -- common code for both syntax error and YYERROR.  |
196705b261ecSmrg`-------------------------------------------------------------*/
196805b261ecSmrgyyerrlab1:
196905b261ecSmrg  yyerrstatus = 3;	/* Each real token shifted decrements this.  */
197005b261ecSmrg
197105b261ecSmrg  for (;;)
197205b261ecSmrg    {
197305b261ecSmrg      yyn = yypact[yystate];
197405b261ecSmrg      if (yyn != YYPACT_NINF)
197505b261ecSmrg	{
197605b261ecSmrg	  yyn += YYTERROR;
197705b261ecSmrg	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
197805b261ecSmrg	    {
197905b261ecSmrg	      yyn = yytable[yyn];
198005b261ecSmrg	      if (0 < yyn)
198105b261ecSmrg		break;
198205b261ecSmrg	    }
198305b261ecSmrg	}
198405b261ecSmrg
198505b261ecSmrg      /* Pop the current state because it cannot handle the error token.  */
198605b261ecSmrg      if (yyssp == yyss)
198705b261ecSmrg	YYABORT;
198805b261ecSmrg
198905b261ecSmrg
199005b261ecSmrg      yydestruct ("Error: popping",
199105b261ecSmrg		  yystos[yystate], yyvsp);
199205b261ecSmrg      YYPOPSTACK (1);
199305b261ecSmrg      yystate = *yyssp;
199405b261ecSmrg      YY_STACK_PRINT (yyss, yyssp);
199505b261ecSmrg    }
199605b261ecSmrg
199705b261ecSmrg  *++yyvsp = yylval;
199805b261ecSmrg
199905b261ecSmrg
200005b261ecSmrg  /* Shift the error token.  */
200105b261ecSmrg  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
200205b261ecSmrg
200305b261ecSmrg  yystate = yyn;
200405b261ecSmrg  goto yynewstate;
200505b261ecSmrg
200605b261ecSmrg
200705b261ecSmrg/*-------------------------------------.
200805b261ecSmrg| yyacceptlab -- YYACCEPT comes here.  |
200905b261ecSmrg`-------------------------------------*/
201005b261ecSmrgyyacceptlab:
201105b261ecSmrg  yyresult = 0;
201205b261ecSmrg  goto yyreturn;
201305b261ecSmrg
201405b261ecSmrg/*-----------------------------------.
201505b261ecSmrg| yyabortlab -- YYABORT comes here.  |
201605b261ecSmrg`-----------------------------------*/
201705b261ecSmrgyyabortlab:
201805b261ecSmrg  yyresult = 1;
201905b261ecSmrg  goto yyreturn;
202005b261ecSmrg
20214642e01fSmrg#if !defined(yyoverflow) || YYERROR_VERBOSE
202205b261ecSmrg/*-------------------------------------------------.
202305b261ecSmrg| yyexhaustedlab -- memory exhaustion comes here.  |
202405b261ecSmrg`-------------------------------------------------*/
202505b261ecSmrgyyexhaustedlab:
202605b261ecSmrg  yyerror (YY_("memory exhausted"));
202705b261ecSmrg  yyresult = 2;
202805b261ecSmrg  /* Fall through.  */
202905b261ecSmrg#endif
203005b261ecSmrg
203105b261ecSmrgyyreturn:
20324642e01fSmrg  if (yychar != YYEMPTY)
203305b261ecSmrg     yydestruct ("Cleanup: discarding lookahead",
203405b261ecSmrg		 yytoken, &yylval);
203505b261ecSmrg  /* Do not reclaim the symbols of the rule which action triggered
203605b261ecSmrg     this YYABORT or YYACCEPT.  */
203705b261ecSmrg  YYPOPSTACK (yylen);
203805b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
203905b261ecSmrg  while (yyssp != yyss)
204005b261ecSmrg    {
204105b261ecSmrg      yydestruct ("Cleanup: popping",
204205b261ecSmrg		  yystos[*yyssp], yyvsp);
204305b261ecSmrg      YYPOPSTACK (1);
204405b261ecSmrg    }
204505b261ecSmrg#ifndef yyoverflow
204605b261ecSmrg  if (yyss != yyssa)
204705b261ecSmrg    YYSTACK_FREE (yyss);
204805b261ecSmrg#endif
204905b261ecSmrg#if YYERROR_VERBOSE
205005b261ecSmrg  if (yymsg != yymsgbuf)
205105b261ecSmrg    YYSTACK_FREE (yymsg);
205205b261ecSmrg#endif
205305b261ecSmrg  /* Make sure YYID is used.  */
205405b261ecSmrg  return YYID (yyresult);
205505b261ecSmrg}
205605b261ecSmrg
205705b261ecSmrg
20584642e01fSmrg
20596747b715Smrg/* Line 1684 of yacc.c  */
20606747b715Smrg#line 250 "winprefsyacc.y"
206105b261ecSmrg
206205b261ecSmrg/*
206305b261ecSmrg * Errors in parsing abort and print log messages
206405b261ecSmrg */
206505b261ecSmrgstatic int
206605b261ecSmrgyyerror (char *s)
206705b261ecSmrg{
206805b261ecSmrg  extern int yylineno; /* Handled by flex internally */
206905b261ecSmrg
207005b261ecSmrg  ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
207105b261ecSmrg  return 1;
207205b261ecSmrg}
207305b261ecSmrg
207405b261ecSmrg/* Miscellaneous functions to store TOKENs into the structure */
207505b261ecSmrgstatic void
207605b261ecSmrgSetIconDirectory (char *path)
207705b261ecSmrg{
207805b261ecSmrg  strncpy (pref.iconDirectory, path, PATH_MAX);
207905b261ecSmrg  pref.iconDirectory[PATH_MAX] = 0;
208005b261ecSmrg}
208105b261ecSmrg
208205b261ecSmrgstatic void
208305b261ecSmrgSetDefaultIcon (char *fname)
208405b261ecSmrg{
208505b261ecSmrg  strncpy (pref.defaultIconName, fname, NAME_MAX);
208605b261ecSmrg  pref.defaultIconName[NAME_MAX] = 0;
208705b261ecSmrg}
208805b261ecSmrg
208905b261ecSmrgstatic void
209005b261ecSmrgSetTrayIcon (char *fname)
209105b261ecSmrg{
209205b261ecSmrg  strncpy (pref.trayIconName, fname, NAME_MAX);
209305b261ecSmrg  pref.trayIconName[NAME_MAX] = 0;
209405b261ecSmrg}
209505b261ecSmrg
209605b261ecSmrgstatic void
209705b261ecSmrgSetRootMenu (char *menu)
209805b261ecSmrg{
209905b261ecSmrg  strncpy (pref.rootMenuName, menu, MENU_MAX);
210005b261ecSmrg  pref.rootMenuName[MENU_MAX] = 0;
210105b261ecSmrg}
210205b261ecSmrg
210305b261ecSmrgstatic void
210405b261ecSmrgSetDefaultSysMenu (char *menu, int pos)
210505b261ecSmrg{
210605b261ecSmrg  strncpy (pref.defaultSysMenuName, menu, MENU_MAX);
210705b261ecSmrg  pref.defaultSysMenuName[MENU_MAX] = 0;
210805b261ecSmrg  pref.defaultSysMenuPos = pos;
210905b261ecSmrg}
211005b261ecSmrg
211105b261ecSmrgstatic void
211205b261ecSmrgOpenMenu (char *menuname)
211305b261ecSmrg{
211405b261ecSmrg  if (menu.menuItem) free(menu.menuItem);
211505b261ecSmrg  menu.menuItem = NULL;
211605b261ecSmrg  strncpy(menu.menuName, menuname, MENU_MAX);
211705b261ecSmrg  menu.menuName[MENU_MAX] = 0;
211805b261ecSmrg  menu.menuItems = 0;
211905b261ecSmrg}
212005b261ecSmrg
212105b261ecSmrgstatic void
212205b261ecSmrgAddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
212305b261ecSmrg{
212405b261ecSmrg  if (menu.menuItem==NULL)
212505b261ecSmrg    menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM));
212605b261ecSmrg  else
212705b261ecSmrg    menu.menuItem = (MENUITEM*)
212805b261ecSmrg      realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
212905b261ecSmrg
213005b261ecSmrg  strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
213105b261ecSmrg  menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
213205b261ecSmrg
213305b261ecSmrg  menu.menuItem[menu.menuItems].cmd = cmd;
213405b261ecSmrg
213505b261ecSmrg  strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
213605b261ecSmrg  menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
213705b261ecSmrg
213805b261ecSmrg  menu.menuItem[menu.menuItems].commandID = 0;
213905b261ecSmrg
214005b261ecSmrg  menu.menuItems++;
214105b261ecSmrg}
214205b261ecSmrg
214305b261ecSmrgstatic void
214405b261ecSmrgCloseMenu (void)
214505b261ecSmrg{
214605b261ecSmrg  if (menu.menuItem==NULL || menu.menuItems==0)
214705b261ecSmrg    {
214805b261ecSmrg      ErrorF("LoadPreferences: Empty menu detected\n");
214905b261ecSmrg      return;
215005b261ecSmrg    }
215105b261ecSmrg
215205b261ecSmrg  if (pref.menuItems)
215305b261ecSmrg    pref.menu = (MENUPARSED*)
215405b261ecSmrg      realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
215505b261ecSmrg  else
215605b261ecSmrg    pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED));
215705b261ecSmrg
215805b261ecSmrg  memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
215905b261ecSmrg  pref.menuItems++;
216005b261ecSmrg
216105b261ecSmrg  memset (&menu, 0, sizeof(MENUPARSED));
216205b261ecSmrg}
216305b261ecSmrg
216405b261ecSmrgstatic void
216505b261ecSmrgOpenIcons (void)
216605b261ecSmrg{
216705b261ecSmrg  if (pref.icon != NULL) {
216805b261ecSmrg    ErrorF("LoadPreferences: Redefining icon mappings\n");
216905b261ecSmrg    free(pref.icon);
217005b261ecSmrg    pref.icon = NULL;
217105b261ecSmrg  }
217205b261ecSmrg  pref.iconItems = 0;
217305b261ecSmrg}
217405b261ecSmrg
217505b261ecSmrgstatic void
217605b261ecSmrgAddIconLine (char *matchstr, char *iconfile)
217705b261ecSmrg{
217805b261ecSmrg  if (pref.icon==NULL)
217905b261ecSmrg    pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM));
218005b261ecSmrg  else
218105b261ecSmrg    pref.icon = (ICONITEM*)
218205b261ecSmrg      realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
218305b261ecSmrg
218405b261ecSmrg  strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
218505b261ecSmrg  pref.icon[pref.iconItems].match[MENU_MAX] = 0;
218605b261ecSmrg
218705b261ecSmrg  strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
218805b261ecSmrg  pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
218905b261ecSmrg
219005b261ecSmrg  pref.icon[pref.iconItems].hicon = 0;
219105b261ecSmrg
219205b261ecSmrg  pref.iconItems++;
219305b261ecSmrg}
219405b261ecSmrg
219505b261ecSmrgstatic void
219605b261ecSmrgCloseIcons (void)
219705b261ecSmrg{
219805b261ecSmrg}
219905b261ecSmrg
22006747b715Smrgstatic void
22016747b715SmrgOpenStyles (void)
22026747b715Smrg{
22036747b715Smrg  if (pref.style != NULL) {
22046747b715Smrg    ErrorF("LoadPreferences: Redefining window style\n");
22056747b715Smrg    free(pref.style);
22066747b715Smrg    pref.style = NULL;
22076747b715Smrg  }
22086747b715Smrg  pref.styleItems = 0;
22096747b715Smrg}
22106747b715Smrg
22116747b715Smrgstatic void
22126747b715SmrgAddStyleLine (char *matchstr, unsigned long style)
22136747b715Smrg{
22146747b715Smrg  if (pref.style==NULL)
22156747b715Smrg    pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM));
22166747b715Smrg  else
22176747b715Smrg    pref.style = (STYLEITEM*)
22186747b715Smrg      realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
22196747b715Smrg
22206747b715Smrg  strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
22216747b715Smrg  pref.style[pref.styleItems].match[MENU_MAX] = 0;
22226747b715Smrg
22236747b715Smrg  pref.style[pref.styleItems].type = style;
22246747b715Smrg
22256747b715Smrg  pref.styleItems++;
22266747b715Smrg}
22276747b715Smrg
22286747b715Smrgstatic void
22296747b715SmrgCloseStyles (void)
22306747b715Smrg{
22316747b715Smrg}
22326747b715Smrg
223305b261ecSmrgstatic void
223405b261ecSmrgOpenSysMenu (void)
223505b261ecSmrg{
223605b261ecSmrg  if (pref.sysMenu != NULL) {
223705b261ecSmrg    ErrorF("LoadPreferences: Redefining system menu\n");
223805b261ecSmrg    free(pref.sysMenu);
223905b261ecSmrg    pref.sysMenu = NULL;
224005b261ecSmrg  }
224105b261ecSmrg  pref.sysMenuItems = 0;
224205b261ecSmrg}
224305b261ecSmrg
224405b261ecSmrgstatic void
224505b261ecSmrgAddSysMenuLine (char *matchstr, char *menuname, int pos)
224605b261ecSmrg{
224705b261ecSmrg  if (pref.sysMenu==NULL)
224805b261ecSmrg    pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM));
224905b261ecSmrg  else
225005b261ecSmrg    pref.sysMenu = (SYSMENUITEM*)
225105b261ecSmrg      realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
225205b261ecSmrg
225305b261ecSmrg  strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
225405b261ecSmrg  pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
225505b261ecSmrg
225605b261ecSmrg  strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
225705b261ecSmrg  pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
225805b261ecSmrg
225905b261ecSmrg  pref.sysMenu[pref.sysMenuItems].menuPos = pos;
226005b261ecSmrg
226105b261ecSmrg  pref.sysMenuItems++;
226205b261ecSmrg}
226305b261ecSmrg
226405b261ecSmrgstatic void
226505b261ecSmrgCloseSysMenu (void)
226605b261ecSmrg{
226705b261ecSmrg}
226805b261ecSmrg
226905b261ecSmrg
2270