winprefsyacc.c revision 5a7dfde8
15a7dfde8Smrg/* A Bison parser, made by GNU Bison 3.7.1. */ 205b261ecSmrg 39ace9065Smrg/* Bison implementation for Yacc-like parsers in C 435c4bbdfSmrg 55a7dfde8Smrg Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, 65a7dfde8Smrg Inc. 735c4bbdfSmrg 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. 1235c4bbdfSmrg 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. 1735c4bbdfSmrg 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. 3035c4bbdfSmrg 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 375a7dfde8Smrg/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, 385a7dfde8Smrg especially those whose name start with YY_ or yy_. They are 395a7dfde8Smrg private implementation details that can be changed or removed. */ 405a7dfde8Smrg 4105b261ecSmrg/* All symbols defined below should begin with yy or YY, to avoid 4205b261ecSmrg infringing on user name space. This should be done even for local 4305b261ecSmrg variables, as they might otherwise be expanded by user macros. 4405b261ecSmrg There are some unavoidable exceptions within include files to 4505b261ecSmrg define necessary library symbols; they are noted "INFRINGES ON 4605b261ecSmrg USER NAME SPACE" below. */ 4705b261ecSmrg 4805b261ecSmrg/* Identify Bison output. */ 4905b261ecSmrg#define YYBISON 1 5005b261ecSmrg 5105b261ecSmrg/* Bison version. */ 525a7dfde8Smrg#define YYBISON_VERSION "3.7.1" 5305b261ecSmrg 5405b261ecSmrg/* Skeleton name. */ 5505b261ecSmrg#define YYSKELETON_NAME "yacc.c" 5605b261ecSmrg 5705b261ecSmrg/* Pure parsers. */ 5805b261ecSmrg#define YYPURE 0 5905b261ecSmrg 604642e01fSmrg/* Push parsers. */ 614642e01fSmrg#define YYPUSH 0 6205b261ecSmrg 634642e01fSmrg/* Pull parsers. */ 644642e01fSmrg#define YYPULL 1 6505b261ecSmrg 6605b261ecSmrg 6705b261ecSmrg 6805b261ecSmrg 695a7dfde8Smrg/* First part of user prologue. */ 705a7dfde8Smrg#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> 11035c4bbdfSmrg#define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */ 11105b261ecSmrg#include <string.h> 11205b261ecSmrg#include "winprefs.h" 11305b261ecSmrg 11405b261ecSmrg/* The following give better error messages in bison at the cost of a few KB */ 11505b261ecSmrg#define YYERROR_VERBOSE 1 11605b261ecSmrg 1176747b715Smrg/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */ 1186747b715Smrg#define YYLTYPE_IS_TRIVIAL 1 1196747b715Smrg#define YYENABLE_NLS 0 1206747b715Smrg 12105b261ecSmrg/* The global pref settings */ 12205b261ecSmrgWINPREFS pref; 12305b261ecSmrg 12405b261ecSmrg/* The working menu */ 12505b261ecSmrgstatic MENUPARSED menu; 12605b261ecSmrg 12705b261ecSmrg/* Functions for parsing the tokens into out structure */ 12805b261ecSmrg/* Defined at the end section of this file */ 12905b261ecSmrg 13005b261ecSmrgstatic void SetIconDirectory (char *path); 13105b261ecSmrgstatic void SetDefaultIcon (char *fname); 13205b261ecSmrgstatic void SetRootMenu (char *menu); 13305b261ecSmrgstatic void SetDefaultSysMenu (char *menu, int pos); 13405b261ecSmrgstatic void SetTrayIcon (char *fname); 13505b261ecSmrg 13605b261ecSmrgstatic void OpenMenu(char *menuname); 13735c4bbdfSmrgstatic void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param); 13805b261ecSmrgstatic void CloseMenu(void); 13905b261ecSmrg 14005b261ecSmrgstatic void OpenIcons(void); 14105b261ecSmrgstatic void AddIconLine(char *matchstr, char *iconfile); 14205b261ecSmrgstatic void CloseIcons(void); 14305b261ecSmrg 1446747b715Smrgstatic void OpenStyles(void); 1456747b715Smrgstatic void AddStyleLine(char *matchstr, unsigned long style); 1466747b715Smrgstatic void CloseStyles(void); 1476747b715Smrg 14805b261ecSmrgstatic void OpenSysMenu(void); 14905b261ecSmrgstatic void AddSysMenuLine(char *matchstr, char *menuname, int pos); 15005b261ecSmrgstatic void CloseSysMenu(void); 15105b261ecSmrg 15235c4bbdfSmrgstatic int yyerror (const char *s); 15305b261ecSmrg 15405b261ecSmrgextern char *yytext; 15535c4bbdfSmrgextern int yylineno; 15605b261ecSmrgextern int yylex(void); 15705b261ecSmrg 15805b261ecSmrg 1595a7dfde8Smrg#line 160 "winprefsyacc.c" 16005b261ecSmrg 1615a7dfde8Smrg# ifndef YY_CAST 1625a7dfde8Smrg# ifdef __cplusplus 1635a7dfde8Smrg# define YY_CAST(Type, Val) static_cast<Type> (Val) 1645a7dfde8Smrg# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) 1655a7dfde8Smrg# else 1665a7dfde8Smrg# define YY_CAST(Type, Val) ((Type) (Val)) 1675a7dfde8Smrg# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) 1685a7dfde8Smrg# endif 1695a7dfde8Smrg# endif 17035c4bbdfSmrg# ifndef YY_NULLPTR 1715a7dfde8Smrg# if defined __cplusplus 1725a7dfde8Smrg# if 201103L <= __cplusplus 1735a7dfde8Smrg# define YY_NULLPTR nullptr 1745a7dfde8Smrg# else 1755a7dfde8Smrg# define YY_NULLPTR 0 1765a7dfde8Smrg# endif 17735c4bbdfSmrg# else 1785a7dfde8Smrg# define YY_NULLPTR ((void*)0) 17935c4bbdfSmrg# endif 18035c4bbdfSmrg# endif 18105b261ecSmrg 1825a7dfde8Smrg/* Use api.header.include to #include this header 1835a7dfde8Smrg instead of duplicating it here. */ 18435c4bbdfSmrg#ifndef YY_YY_WINPREFSYACC_H_INCLUDED 18535c4bbdfSmrg# define YY_YY_WINPREFSYACC_H_INCLUDED 18635c4bbdfSmrg/* Debug traces. */ 18735c4bbdfSmrg#ifndef YYDEBUG 18835c4bbdfSmrg# define YYDEBUG 0 18935c4bbdfSmrg#endif 19035c4bbdfSmrg#if YYDEBUG 19135c4bbdfSmrgextern int yydebug; 19205b261ecSmrg#endif 19305b261ecSmrg 1945a7dfde8Smrg/* Token kinds. */ 1954642e01fSmrg#ifndef YYTOKENTYPE 1964642e01fSmrg# define YYTOKENTYPE 19735c4bbdfSmrg enum yytokentype 19835c4bbdfSmrg { 1995a7dfde8Smrg YYEMPTY = -2, 2005a7dfde8Smrg YYEOF = 0, /* "end of file" */ 2015a7dfde8Smrg YYerror = 256, /* error */ 2025a7dfde8Smrg YYUNDEF = 257, /* "invalid token" */ 2035a7dfde8Smrg NEWLINE = 258, /* NEWLINE */ 2045a7dfde8Smrg MENU = 259, /* MENU */ 2055a7dfde8Smrg LB = 260, /* LB */ 2065a7dfde8Smrg RB = 261, /* RB */ 2075a7dfde8Smrg ICONDIRECTORY = 262, /* ICONDIRECTORY */ 2085a7dfde8Smrg DEFAULTICON = 263, /* DEFAULTICON */ 2095a7dfde8Smrg ICONS = 264, /* ICONS */ 2105a7dfde8Smrg STYLES = 265, /* STYLES */ 2115a7dfde8Smrg TOPMOST = 266, /* TOPMOST */ 2125a7dfde8Smrg MAXIMIZE = 267, /* MAXIMIZE */ 2135a7dfde8Smrg MINIMIZE = 268, /* MINIMIZE */ 2145a7dfde8Smrg BOTTOM = 269, /* BOTTOM */ 2155a7dfde8Smrg NOTITLE = 270, /* NOTITLE */ 2165a7dfde8Smrg OUTLINE = 271, /* OUTLINE */ 2175a7dfde8Smrg NOFRAME = 272, /* NOFRAME */ 2185a7dfde8Smrg DEFAULTSYSMENU = 273, /* DEFAULTSYSMENU */ 2195a7dfde8Smrg SYSMENU = 274, /* SYSMENU */ 2205a7dfde8Smrg ROOTMENU = 275, /* ROOTMENU */ 2215a7dfde8Smrg SEPARATOR = 276, /* SEPARATOR */ 2225a7dfde8Smrg ATSTART = 277, /* ATSTART */ 2235a7dfde8Smrg ATEND = 278, /* ATEND */ 2245a7dfde8Smrg EXEC = 279, /* EXEC */ 2255a7dfde8Smrg ALWAYSONTOP = 280, /* ALWAYSONTOP */ 2265a7dfde8Smrg DEBUGOUTPUT = 281, /* "DEBUG" */ 2275a7dfde8Smrg RELOAD = 282, /* RELOAD */ 2285a7dfde8Smrg TRAYICON = 283, /* TRAYICON */ 2295a7dfde8Smrg FORCEEXIT = 284, /* FORCEEXIT */ 2305a7dfde8Smrg SILENTEXIT = 285, /* SILENTEXIT */ 2315a7dfde8Smrg STRING = 286 /* STRING */ 23235c4bbdfSmrg }; 2335a7dfde8Smrg typedef enum yytokentype yytoken_kind_t; 2344642e01fSmrg#endif 2355a7dfde8Smrg/* Token kinds. */ 2365a7dfde8Smrg#define YYEOF 0 2375a7dfde8Smrg#define YYerror 256 2385a7dfde8Smrg#define YYUNDEF 257 2394642e01fSmrg#define NEWLINE 258 2404642e01fSmrg#define MENU 259 2414642e01fSmrg#define LB 260 2424642e01fSmrg#define RB 261 2434642e01fSmrg#define ICONDIRECTORY 262 2444642e01fSmrg#define DEFAULTICON 263 2454642e01fSmrg#define ICONS 264 2466747b715Smrg#define STYLES 265 2476747b715Smrg#define TOPMOST 266 2486747b715Smrg#define MAXIMIZE 267 2496747b715Smrg#define MINIMIZE 268 2506747b715Smrg#define BOTTOM 269 2516747b715Smrg#define NOTITLE 270 2526747b715Smrg#define OUTLINE 271 2536747b715Smrg#define NOFRAME 272 2546747b715Smrg#define DEFAULTSYSMENU 273 2556747b715Smrg#define SYSMENU 274 2566747b715Smrg#define ROOTMENU 275 2576747b715Smrg#define SEPARATOR 276 2586747b715Smrg#define ATSTART 277 2596747b715Smrg#define ATEND 278 2606747b715Smrg#define EXEC 279 2616747b715Smrg#define ALWAYSONTOP 280 2626747b715Smrg#define DEBUGOUTPUT 281 2636747b715Smrg#define RELOAD 282 2646747b715Smrg#define TRAYICON 283 2656747b715Smrg#define FORCEEXIT 284 2666747b715Smrg#define SILENTEXIT 285 2676747b715Smrg#define STRING 286 2684642e01fSmrg 26935c4bbdfSmrg/* Value type. */ 27005b261ecSmrg#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 27135c4bbdfSmrgunion YYSTYPE 27235c4bbdfSmrg{ 2735a7dfde8Smrg#line 90 "winprefsyacc.y" 2744642e01fSmrg 27505b261ecSmrg char *sVal; 2766747b715Smrg unsigned long uVal; 27705b261ecSmrg int iVal; 2784642e01fSmrg 2795a7dfde8Smrg#line 280 "winprefsyacc.c" 2804642e01fSmrg 2815a7dfde8Smrg}; 28235c4bbdfSmrgtypedef union YYSTYPE YYSTYPE; 2834642e01fSmrg# define YYSTYPE_IS_TRIVIAL 1 28405b261ecSmrg# define YYSTYPE_IS_DECLARED 1 28505b261ecSmrg#endif 28605b261ecSmrg 28705b261ecSmrg 28835c4bbdfSmrgextern YYSTYPE yylval; 28935c4bbdfSmrg 29035c4bbdfSmrgint yyparse (void); 29105b261ecSmrg 29235c4bbdfSmrg#endif /* !YY_YY_WINPREFSYACC_H_INCLUDED */ 2935a7dfde8Smrg/* Symbol kind. */ 2945a7dfde8Smrgenum yysymbol_kind_t 2955a7dfde8Smrg{ 2965a7dfde8Smrg YYSYMBOL_YYEMPTY = -2, 2975a7dfde8Smrg YYSYMBOL_YYEOF = 0, /* "end of file" */ 2985a7dfde8Smrg YYSYMBOL_YYerror = 1, /* error */ 2995a7dfde8Smrg YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ 3005a7dfde8Smrg YYSYMBOL_NEWLINE = 3, /* NEWLINE */ 3015a7dfde8Smrg YYSYMBOL_MENU = 4, /* MENU */ 3025a7dfde8Smrg YYSYMBOL_LB = 5, /* LB */ 3035a7dfde8Smrg YYSYMBOL_RB = 6, /* RB */ 3045a7dfde8Smrg YYSYMBOL_ICONDIRECTORY = 7, /* ICONDIRECTORY */ 3055a7dfde8Smrg YYSYMBOL_DEFAULTICON = 8, /* DEFAULTICON */ 3065a7dfde8Smrg YYSYMBOL_ICONS = 9, /* ICONS */ 3075a7dfde8Smrg YYSYMBOL_STYLES = 10, /* STYLES */ 3085a7dfde8Smrg YYSYMBOL_TOPMOST = 11, /* TOPMOST */ 3095a7dfde8Smrg YYSYMBOL_MAXIMIZE = 12, /* MAXIMIZE */ 3105a7dfde8Smrg YYSYMBOL_MINIMIZE = 13, /* MINIMIZE */ 3115a7dfde8Smrg YYSYMBOL_BOTTOM = 14, /* BOTTOM */ 3125a7dfde8Smrg YYSYMBOL_NOTITLE = 15, /* NOTITLE */ 3135a7dfde8Smrg YYSYMBOL_OUTLINE = 16, /* OUTLINE */ 3145a7dfde8Smrg YYSYMBOL_NOFRAME = 17, /* NOFRAME */ 3155a7dfde8Smrg YYSYMBOL_DEFAULTSYSMENU = 18, /* DEFAULTSYSMENU */ 3165a7dfde8Smrg YYSYMBOL_SYSMENU = 19, /* SYSMENU */ 3175a7dfde8Smrg YYSYMBOL_ROOTMENU = 20, /* ROOTMENU */ 3185a7dfde8Smrg YYSYMBOL_SEPARATOR = 21, /* SEPARATOR */ 3195a7dfde8Smrg YYSYMBOL_ATSTART = 22, /* ATSTART */ 3205a7dfde8Smrg YYSYMBOL_ATEND = 23, /* ATEND */ 3215a7dfde8Smrg YYSYMBOL_EXEC = 24, /* EXEC */ 3225a7dfde8Smrg YYSYMBOL_ALWAYSONTOP = 25, /* ALWAYSONTOP */ 3235a7dfde8Smrg YYSYMBOL_DEBUGOUTPUT = 26, /* "DEBUG" */ 3245a7dfde8Smrg YYSYMBOL_RELOAD = 27, /* RELOAD */ 3255a7dfde8Smrg YYSYMBOL_TRAYICON = 28, /* TRAYICON */ 3265a7dfde8Smrg YYSYMBOL_FORCEEXIT = 29, /* FORCEEXIT */ 3275a7dfde8Smrg YYSYMBOL_SILENTEXIT = 30, /* SILENTEXIT */ 3285a7dfde8Smrg YYSYMBOL_STRING = 31, /* STRING */ 3295a7dfde8Smrg YYSYMBOL_YYACCEPT = 32, /* $accept */ 3305a7dfde8Smrg YYSYMBOL_input = 33, /* input */ 3315a7dfde8Smrg YYSYMBOL_line = 34, /* line */ 3325a7dfde8Smrg YYSYMBOL_newline_or_nada = 35, /* newline_or_nada */ 3335a7dfde8Smrg YYSYMBOL_command = 36, /* command */ 3345a7dfde8Smrg YYSYMBOL_trayicon = 37, /* trayicon */ 3355a7dfde8Smrg YYSYMBOL_rootmenu = 38, /* rootmenu */ 3365a7dfde8Smrg YYSYMBOL_defaultsysmenu = 39, /* defaultsysmenu */ 3375a7dfde8Smrg YYSYMBOL_defaulticon = 40, /* defaulticon */ 3385a7dfde8Smrg YYSYMBOL_icondirectory = 41, /* icondirectory */ 3395a7dfde8Smrg YYSYMBOL_menuline = 42, /* menuline */ 3405a7dfde8Smrg YYSYMBOL_menulist = 43, /* menulist */ 3415a7dfde8Smrg YYSYMBOL_menu = 44, /* menu */ 3425a7dfde8Smrg YYSYMBOL_45_1 = 45, /* $@1 */ 3435a7dfde8Smrg YYSYMBOL_iconline = 46, /* iconline */ 3445a7dfde8Smrg YYSYMBOL_iconlist = 47, /* iconlist */ 3455a7dfde8Smrg YYSYMBOL_icons = 48, /* icons */ 3465a7dfde8Smrg YYSYMBOL_49_2 = 49, /* $@2 */ 3475a7dfde8Smrg YYSYMBOL_group1 = 50, /* group1 */ 3485a7dfde8Smrg YYSYMBOL_group2 = 51, /* group2 */ 3495a7dfde8Smrg YYSYMBOL_stylecombo = 52, /* stylecombo */ 3505a7dfde8Smrg YYSYMBOL_styleline = 53, /* styleline */ 3515a7dfde8Smrg YYSYMBOL_stylelist = 54, /* stylelist */ 3525a7dfde8Smrg YYSYMBOL_styles = 55, /* styles */ 3535a7dfde8Smrg YYSYMBOL_56_3 = 56, /* $@3 */ 3545a7dfde8Smrg YYSYMBOL_atspot = 57, /* atspot */ 3555a7dfde8Smrg YYSYMBOL_sysmenuline = 58, /* sysmenuline */ 3565a7dfde8Smrg YYSYMBOL_sysmenulist = 59, /* sysmenulist */ 3575a7dfde8Smrg YYSYMBOL_sysmenu = 60, /* sysmenu */ 3585a7dfde8Smrg YYSYMBOL_61_4 = 61, /* $@4 */ 3595a7dfde8Smrg YYSYMBOL_forceexit = 62, /* forceexit */ 3605a7dfde8Smrg YYSYMBOL_silentexit = 63, /* silentexit */ 3615a7dfde8Smrg YYSYMBOL_debug = 64 /* debug */ 3625a7dfde8Smrg}; 3635a7dfde8Smrgtypedef enum yysymbol_kind_t yysymbol_kind_t; 3645a7dfde8Smrg 36535c4bbdfSmrg 36605b261ecSmrg 36705b261ecSmrg 36805b261ecSmrg#ifdef short 36905b261ecSmrg# undef short 37005b261ecSmrg#endif 37105b261ecSmrg 3725a7dfde8Smrg/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure 3735a7dfde8Smrg <limits.h> and (if available) <stdint.h> are included 3745a7dfde8Smrg so that the code can choose integer types of a good width. */ 3755a7dfde8Smrg 3765a7dfde8Smrg#ifndef __PTRDIFF_MAX__ 3775a7dfde8Smrg# include <limits.h> /* INFRINGES ON USER NAME SPACE */ 3785a7dfde8Smrg# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ 3795a7dfde8Smrg# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ 3805a7dfde8Smrg# define YY_STDINT_H 3815a7dfde8Smrg# endif 38205b261ecSmrg#endif 38305b261ecSmrg 3845a7dfde8Smrg/* Narrow types that promote to a signed type and that can represent a 3855a7dfde8Smrg signed or unsigned integer of at least N bits. In tables they can 3865a7dfde8Smrg save space and decrease cache pressure. Promoting to a signed type 3875a7dfde8Smrg helps avoid bugs in integer arithmetic. */ 3885a7dfde8Smrg 3895a7dfde8Smrg#ifdef __INT_LEAST8_MAX__ 3905a7dfde8Smrgtypedef __INT_LEAST8_TYPE__ yytype_int8; 3915a7dfde8Smrg#elif defined YY_STDINT_H 3925a7dfde8Smrgtypedef int_least8_t yytype_int8; 39305b261ecSmrg#else 39435c4bbdfSmrgtypedef signed char yytype_int8; 39505b261ecSmrg#endif 39605b261ecSmrg 3975a7dfde8Smrg#ifdef __INT_LEAST16_MAX__ 3985a7dfde8Smrgtypedef __INT_LEAST16_TYPE__ yytype_int16; 3995a7dfde8Smrg#elif defined YY_STDINT_H 4005a7dfde8Smrgtypedef int_least16_t yytype_int16; 40105b261ecSmrg#else 4025a7dfde8Smrgtypedef short yytype_int16; 40305b261ecSmrg#endif 40405b261ecSmrg 4055a7dfde8Smrg#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ 4065a7dfde8Smrgtypedef __UINT_LEAST8_TYPE__ yytype_uint8; 4075a7dfde8Smrg#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ 4085a7dfde8Smrg && UINT_LEAST8_MAX <= INT_MAX) 4095a7dfde8Smrgtypedef uint_least8_t yytype_uint8; 4105a7dfde8Smrg#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX 4115a7dfde8Smrgtypedef unsigned char yytype_uint8; 41205b261ecSmrg#else 4135a7dfde8Smrgtypedef short yytype_uint8; 4145a7dfde8Smrg#endif 4155a7dfde8Smrg 4165a7dfde8Smrg#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ 4175a7dfde8Smrgtypedef __UINT_LEAST16_TYPE__ yytype_uint16; 4185a7dfde8Smrg#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ 4195a7dfde8Smrg && UINT_LEAST16_MAX <= INT_MAX) 4205a7dfde8Smrgtypedef uint_least16_t yytype_uint16; 4215a7dfde8Smrg#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX 4225a7dfde8Smrgtypedef unsigned short yytype_uint16; 4235a7dfde8Smrg#else 4245a7dfde8Smrgtypedef int yytype_uint16; 4255a7dfde8Smrg#endif 4265a7dfde8Smrg 4275a7dfde8Smrg#ifndef YYPTRDIFF_T 4285a7dfde8Smrg# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ 4295a7dfde8Smrg# define YYPTRDIFF_T __PTRDIFF_TYPE__ 4305a7dfde8Smrg# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ 4315a7dfde8Smrg# elif defined PTRDIFF_MAX 4325a7dfde8Smrg# ifndef ptrdiff_t 4335a7dfde8Smrg# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 4345a7dfde8Smrg# endif 4355a7dfde8Smrg# define YYPTRDIFF_T ptrdiff_t 4365a7dfde8Smrg# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX 4375a7dfde8Smrg# else 4385a7dfde8Smrg# define YYPTRDIFF_T long 4395a7dfde8Smrg# define YYPTRDIFF_MAXIMUM LONG_MAX 4405a7dfde8Smrg# endif 44105b261ecSmrg#endif 44205b261ecSmrg 44305b261ecSmrg#ifndef YYSIZE_T 44405b261ecSmrg# ifdef __SIZE_TYPE__ 44505b261ecSmrg# define YYSIZE_T __SIZE_TYPE__ 44605b261ecSmrg# elif defined size_t 44705b261ecSmrg# define YYSIZE_T size_t 4485a7dfde8Smrg# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ 44905b261ecSmrg# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 45005b261ecSmrg# define YYSIZE_T size_t 45105b261ecSmrg# else 45225da500fSmrg# define YYSIZE_T unsigned 45305b261ecSmrg# endif 45405b261ecSmrg#endif 45505b261ecSmrg 4565a7dfde8Smrg#define YYSIZE_MAXIMUM \ 4575a7dfde8Smrg YY_CAST (YYPTRDIFF_T, \ 4585a7dfde8Smrg (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ 4595a7dfde8Smrg ? YYPTRDIFF_MAXIMUM \ 4605a7dfde8Smrg : YY_CAST (YYSIZE_T, -1))) 4615a7dfde8Smrg 4625a7dfde8Smrg#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) 4635a7dfde8Smrg 4645a7dfde8Smrg 4655a7dfde8Smrg/* Stored state numbers (used for stacks). */ 4665a7dfde8Smrgtypedef yytype_int8 yy_state_t; 4675a7dfde8Smrg 4685a7dfde8Smrg/* State numbers in computations. */ 4695a7dfde8Smrgtypedef int yy_state_fast_t; 47005b261ecSmrg 47105b261ecSmrg#ifndef YY_ 4726747b715Smrg# if defined YYENABLE_NLS && YYENABLE_NLS 47305b261ecSmrg# if ENABLE_NLS 47405b261ecSmrg# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 47535c4bbdfSmrg# define YY_(Msgid) dgettext ("bison-runtime", Msgid) 47605b261ecSmrg# endif 47705b261ecSmrg# endif 47805b261ecSmrg# ifndef YY_ 47935c4bbdfSmrg# define YY_(Msgid) Msgid 48035c4bbdfSmrg# endif 48135c4bbdfSmrg#endif 48235c4bbdfSmrg 48335c4bbdfSmrg 48435c4bbdfSmrg#ifndef YY_ATTRIBUTE_PURE 4855a7dfde8Smrg# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) 4865a7dfde8Smrg# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) 4875a7dfde8Smrg# else 4885a7dfde8Smrg# define YY_ATTRIBUTE_PURE 4895a7dfde8Smrg# endif 49035c4bbdfSmrg#endif 49135c4bbdfSmrg 49235c4bbdfSmrg#ifndef YY_ATTRIBUTE_UNUSED 4935a7dfde8Smrg# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) 4945a7dfde8Smrg# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) 49535c4bbdfSmrg# else 4965a7dfde8Smrg# define YY_ATTRIBUTE_UNUSED 49705b261ecSmrg# endif 49805b261ecSmrg#endif 49905b261ecSmrg 50005b261ecSmrg/* Suppress unused-variable warnings by "using" E. */ 50105b261ecSmrg#if ! defined lint || defined __GNUC__ 50235c4bbdfSmrg# define YYUSE(E) ((void) (E)) 50305b261ecSmrg#else 50435c4bbdfSmrg# define YYUSE(E) /* empty */ 50505b261ecSmrg#endif 50605b261ecSmrg 50725da500fSmrg#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 50835c4bbdfSmrg/* Suppress an incorrect diagnostic about yylval being uninitialized. */ 5095a7dfde8Smrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 5105a7dfde8Smrg _Pragma ("GCC diagnostic push") \ 5115a7dfde8Smrg _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ 51235c4bbdfSmrg _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 5135a7dfde8Smrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 51435c4bbdfSmrg _Pragma ("GCC diagnostic pop") 51505b261ecSmrg#else 51635c4bbdfSmrg# define YY_INITIAL_VALUE(Value) Value 51705b261ecSmrg#endif 51835c4bbdfSmrg#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 51935c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 52035c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END 52135c4bbdfSmrg#endif 52235c4bbdfSmrg#ifndef YY_INITIAL_VALUE 52335c4bbdfSmrg# define YY_INITIAL_VALUE(Value) /* Nothing. */ 52405b261ecSmrg#endif 52505b261ecSmrg 5265a7dfde8Smrg#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ 5275a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_BEGIN \ 5285a7dfde8Smrg _Pragma ("GCC diagnostic push") \ 5295a7dfde8Smrg _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") 5305a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_END \ 5315a7dfde8Smrg _Pragma ("GCC diagnostic pop") 5325a7dfde8Smrg#endif 5335a7dfde8Smrg#ifndef YY_IGNORE_USELESS_CAST_BEGIN 5345a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_BEGIN 5355a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_END 5365a7dfde8Smrg#endif 5375a7dfde8Smrg 53835c4bbdfSmrg 5395a7dfde8Smrg#define YY_ASSERT(E) ((void) (0 && (E))) 5405a7dfde8Smrg 5415a7dfde8Smrg#if !defined yyoverflow 54205b261ecSmrg 54305b261ecSmrg/* The parser invokes alloca or malloc; define the necessary symbols. */ 54405b261ecSmrg 54505b261ecSmrg# ifdef YYSTACK_USE_ALLOCA 54605b261ecSmrg# if YYSTACK_USE_ALLOCA 54705b261ecSmrg# ifdef __GNUC__ 54805b261ecSmrg# define YYSTACK_ALLOC __builtin_alloca 54905b261ecSmrg# elif defined __BUILTIN_VA_ARG_INCR 55005b261ecSmrg# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 55105b261ecSmrg# elif defined _AIX 55205b261ecSmrg# define YYSTACK_ALLOC __alloca 55305b261ecSmrg# elif defined _MSC_VER 55405b261ecSmrg# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 55505b261ecSmrg# define alloca _alloca 55605b261ecSmrg# else 55705b261ecSmrg# define YYSTACK_ALLOC alloca 55835c4bbdfSmrg# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 55905b261ecSmrg# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 56035c4bbdfSmrg /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 5619ace9065Smrg# ifndef EXIT_SUCCESS 5629ace9065Smrg# define EXIT_SUCCESS 0 56305b261ecSmrg# endif 56405b261ecSmrg# endif 56505b261ecSmrg# endif 56605b261ecSmrg# endif 56705b261ecSmrg# endif 56805b261ecSmrg 56905b261ecSmrg# ifdef YYSTACK_ALLOC 57035c4bbdfSmrg /* Pacify GCC's 'empty if-body' warning. */ 57135c4bbdfSmrg# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 57205b261ecSmrg# ifndef YYSTACK_ALLOC_MAXIMUM 57305b261ecSmrg /* The OS might guarantee only one guard page at the bottom of the stack, 57405b261ecSmrg and a page size can be as small as 4096 bytes. So we cannot safely 57505b261ecSmrg invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 57605b261ecSmrg to allow for a few compiler-allocated temporary stack slots. */ 57705b261ecSmrg# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 57805b261ecSmrg# endif 57905b261ecSmrg# else 58005b261ecSmrg# define YYSTACK_ALLOC YYMALLOC 58105b261ecSmrg# define YYSTACK_FREE YYFREE 58205b261ecSmrg# ifndef YYSTACK_ALLOC_MAXIMUM 58305b261ecSmrg# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 58405b261ecSmrg# endif 5859ace9065Smrg# if (defined __cplusplus && ! defined EXIT_SUCCESS \ 58605b261ecSmrg && ! ((defined YYMALLOC || defined malloc) \ 58735c4bbdfSmrg && (defined YYFREE || defined free))) 58805b261ecSmrg# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 5899ace9065Smrg# ifndef EXIT_SUCCESS 5909ace9065Smrg# define EXIT_SUCCESS 0 59105b261ecSmrg# endif 59205b261ecSmrg# endif 59305b261ecSmrg# ifndef YYMALLOC 59405b261ecSmrg# define YYMALLOC malloc 59535c4bbdfSmrg# if ! defined malloc && ! defined EXIT_SUCCESS 59605b261ecSmrgvoid *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 59705b261ecSmrg# endif 59805b261ecSmrg# endif 59905b261ecSmrg# ifndef YYFREE 60005b261ecSmrg# define YYFREE free 60135c4bbdfSmrg# if ! defined free && ! defined EXIT_SUCCESS 60205b261ecSmrgvoid free (void *); /* INFRINGES ON USER NAME SPACE */ 60305b261ecSmrg# endif 60405b261ecSmrg# endif 60505b261ecSmrg# endif 6065a7dfde8Smrg#endif /* !defined yyoverflow */ 60705b261ecSmrg 60805b261ecSmrg#if (! defined yyoverflow \ 60905b261ecSmrg && (! defined __cplusplus \ 61035c4bbdfSmrg || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 61105b261ecSmrg 61205b261ecSmrg/* A type that is properly aligned for any stack member. */ 61305b261ecSmrgunion yyalloc 61405b261ecSmrg{ 6155a7dfde8Smrg yy_state_t yyss_alloc; 6164642e01fSmrg YYSTYPE yyvs_alloc; 6174642e01fSmrg}; 61805b261ecSmrg 61905b261ecSmrg/* The size of the maximum gap between one aligned stack and the next. */ 6205a7dfde8Smrg# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) 62105b261ecSmrg 62205b261ecSmrg/* The size of an array large to enough to hold all stacks, each with 62305b261ecSmrg N elements. */ 62405b261ecSmrg# define YYSTACK_BYTES(N) \ 6255a7dfde8Smrg ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ 62605b261ecSmrg + YYSTACK_GAP_MAXIMUM) 62705b261ecSmrg 6289ace9065Smrg# define YYCOPY_NEEDED 1 62905b261ecSmrg 63005b261ecSmrg/* Relocate STACK from its old location to the new one. The 63105b261ecSmrg local variables YYSIZE and YYSTACKSIZE give the old and new number of 63205b261ecSmrg elements in the stack, and YYPTR gives the new location of the 63305b261ecSmrg stack. Advance YYPTR to a properly aligned location for the next 63405b261ecSmrg stack. */ 63535c4bbdfSmrg# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 63635c4bbdfSmrg do \ 63735c4bbdfSmrg { \ 6385a7dfde8Smrg YYPTRDIFF_T yynewbytes; \ 63935c4bbdfSmrg YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 64035c4bbdfSmrg Stack = &yyptr->Stack_alloc; \ 6415a7dfde8Smrg yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ 6425a7dfde8Smrg yyptr += yynewbytes / YYSIZEOF (*yyptr); \ 64335c4bbdfSmrg } \ 64435c4bbdfSmrg while (0) 64505b261ecSmrg 64605b261ecSmrg#endif 64705b261ecSmrg 6489ace9065Smrg#if defined YYCOPY_NEEDED && YYCOPY_NEEDED 64935c4bbdfSmrg/* Copy COUNT objects from SRC to DST. The source and destination do 6509ace9065Smrg not overlap. */ 6519ace9065Smrg# ifndef YYCOPY 6529ace9065Smrg# if defined __GNUC__ && 1 < __GNUC__ 65335c4bbdfSmrg# define YYCOPY(Dst, Src, Count) \ 6545a7dfde8Smrg __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) 6559ace9065Smrg# else 65635c4bbdfSmrg# define YYCOPY(Dst, Src, Count) \ 65735c4bbdfSmrg do \ 65835c4bbdfSmrg { \ 6595a7dfde8Smrg YYPTRDIFF_T yyi; \ 66035c4bbdfSmrg for (yyi = 0; yyi < (Count); yyi++) \ 66135c4bbdfSmrg (Dst)[yyi] = (Src)[yyi]; \ 66235c4bbdfSmrg } \ 66335c4bbdfSmrg while (0) 6649ace9065Smrg# endif 6659ace9065Smrg# endif 6669ace9065Smrg#endif /* !YYCOPY_NEEDED */ 6679ace9065Smrg 66805b261ecSmrg/* YYFINAL -- State number of the termination state. */ 66905b261ecSmrg#define YYFINAL 2 67005b261ecSmrg/* YYLAST -- Last index in YYTABLE. */ 6716747b715Smrg#define YYLAST 98 67205b261ecSmrg 67305b261ecSmrg/* YYNTOKENS -- Number of terminals. */ 6746747b715Smrg#define YYNTOKENS 32 67505b261ecSmrg/* YYNNTS -- Number of nonterminals. */ 6766747b715Smrg#define YYNNTS 33 67705b261ecSmrg/* YYNRULES -- Number of rules. */ 6786747b715Smrg#define YYNRULES 65 67935c4bbdfSmrg/* YYNSTATES -- Number of states. */ 6806747b715Smrg#define YYNSTATES 121 68105b261ecSmrg 6825a7dfde8Smrg/* YYMAXUTOK -- Last valid token kind. */ 6836747b715Smrg#define YYMAXUTOK 286 68405b261ecSmrg 6855a7dfde8Smrg 6865a7dfde8Smrg/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM 6875a7dfde8Smrg as returned by yylex, with out-of-bounds checking. */ 6885a7dfde8Smrg#define YYTRANSLATE(YYX) \ 6895a7dfde8Smrg (0 <= (YYX) && (YYX) <= YYMAXUTOK \ 6905a7dfde8Smrg ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ 6915a7dfde8Smrg : YYSYMBOL_YYUNDEF) 69205b261ecSmrg 69335c4bbdfSmrg/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 6945a7dfde8Smrg as returned by yylex. */ 6955a7dfde8Smrgstatic const yytype_int8 yytranslate[] = 69605b261ecSmrg{ 69705b261ecSmrg 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 69805b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 69905b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70005b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70105b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70205b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70305b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70405b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70505b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70605b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70705b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70805b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 70905b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71005b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71105b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71205b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71305b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71405b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71505b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71605b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71705b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71805b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 71905b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72005b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72105b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72205b261ecSmrg 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 72305b261ecSmrg 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 7246747b715Smrg 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 7256747b715Smrg 25, 26, 27, 28, 29, 30, 31 72605b261ecSmrg}; 72705b261ecSmrg 72805b261ecSmrg#if YYDEBUG 72935c4bbdfSmrg /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 73005b261ecSmrgstatic const yytype_uint8 yyrline[] = 73105b261ecSmrg{ 73235c4bbdfSmrg 0, 133, 133, 134, 137, 138, 142, 143, 146, 147, 73335c4bbdfSmrg 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 73435c4bbdfSmrg 160, 163, 166, 169, 172, 175, 176, 177, 178, 179, 73535c4bbdfSmrg 182, 183, 186, 186, 189, 192, 193, 196, 196, 199, 73635c4bbdfSmrg 200, 201, 202, 205, 206, 207, 210, 211, 212, 213, 73735c4bbdfSmrg 216, 219, 220, 223, 223, 226, 227, 228, 231, 234, 73835c4bbdfSmrg 235, 238, 238, 241, 244, 247 73905b261ecSmrg}; 74005b261ecSmrg#endif 74105b261ecSmrg 7425a7dfde8Smrg/** Accessing symbol of state STATE. */ 7435a7dfde8Smrg#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) 7445a7dfde8Smrg 7455a7dfde8Smrg#if YYDEBUG || 0 7465a7dfde8Smrg/* The user-facing name of the symbol whose (internal) number is 7475a7dfde8Smrg YYSYMBOL. No bounds checking. */ 7485a7dfde8Smrgstatic const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; 7495a7dfde8Smrg 75005b261ecSmrg/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 75105b261ecSmrg First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 75205b261ecSmrgstatic const char *const yytname[] = 75305b261ecSmrg{ 7545a7dfde8Smrg "\"end of file\"", "error", "\"invalid token\"", "NEWLINE", "MENU", 7555a7dfde8Smrg "LB", "RB", "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", 7565a7dfde8Smrg "MAXIMIZE", "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", 7575a7dfde8Smrg "DEFAULTSYSMENU", "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", 7585a7dfde8Smrg "EXEC", "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT", 7596747b715Smrg "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada", 7606747b715Smrg "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon", 7616747b715Smrg "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline", 7626747b715Smrg "iconlist", "icons", "$@2", "group1", "group2", "stylecombo", 7636747b715Smrg "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline", 76435c4bbdfSmrg "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", YY_NULLPTR 76505b261ecSmrg}; 7665a7dfde8Smrg 7675a7dfde8Smrgstatic const char * 7685a7dfde8Smrgyysymbol_name (yysymbol_kind_t yysymbol) 7695a7dfde8Smrg{ 7705a7dfde8Smrg return yytname[yysymbol]; 7715a7dfde8Smrg} 77205b261ecSmrg#endif 77305b261ecSmrg 7745a7dfde8Smrg#ifdef YYPRINT 77535c4bbdfSmrg/* YYTOKNUM[NUM] -- (External) token number corresponding to the 77635c4bbdfSmrg (internal) symbol number NUM (which must be that of a token). */ 7775a7dfde8Smrgstatic const yytype_int16 yytoknum[] = 77805b261ecSmrg{ 77905b261ecSmrg 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 78005b261ecSmrg 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 7816747b715Smrg 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 7826747b715Smrg 285, 286 78305b261ecSmrg}; 7845a7dfde8Smrg#endif 78505b261ecSmrg 7865a7dfde8Smrg#define YYPACT_NINF (-47) 78705b261ecSmrg 7885a7dfde8Smrg#define yypact_value_is_default(Yyn) \ 7895a7dfde8Smrg ((Yyn) == YYPACT_NINF) 79005b261ecSmrg 7915a7dfde8Smrg#define YYTABLE_NINF (-1) 79205b261ecSmrg 7935a7dfde8Smrg#define yytable_value_is_error(Yyn) \ 79435c4bbdfSmrg 0 79505b261ecSmrg 79635c4bbdfSmrg /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 79735c4bbdfSmrg STATE-NUM. */ 79805b261ecSmrgstatic const yytype_int8 yypact[] = 79905b261ecSmrg{ 8006747b715Smrg -47, 7, -47, -47, -1, 0, 1, 18, 29, 15, 8016747b715Smrg 42, 17, 19, 20, 46, 50, -47, -47, -47, -47, 8026747b715Smrg -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, 8036747b715Smrg 49, 53, 54, -47, -47, 6, 55, 56, 57, 58, 8046747b715Smrg -47, -47, -47, -47, -47, 61, 61, -47, -47, 62, 8056747b715Smrg -47, -47, -47, -47, 61, 61, 35, 38, -47, 61, 8066747b715Smrg -19, -47, 39, 35, 66, 27, 38, 67, 43, 72, 8076747b715Smrg -3, -19, 70, 74, -47, -47, -47, -47, -47, -47, 8086747b715Smrg -47, -47, -47, 3, -8, 75, -47, -47, 48, 43, 8096747b715Smrg 76, 61, 52, 59, 77, 78, -47, -47, 61, -47, 8106747b715Smrg -47, 61, 6, -47, -47, -47, 81, 82, 61, 61, 8116747b715Smrg -47, -47, 83, 61, 61, -47, -47, 61, -47, -47, 8126747b715Smrg -47 81305b261ecSmrg}; 81405b261ecSmrg 81535c4bbdfSmrg /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 81635c4bbdfSmrg Performed when YYTABLE does not specify something else to do. Zero 81735c4bbdfSmrg means the default is an error. */ 8185a7dfde8Smrgstatic const yytype_int8 yydefact[] = 81935c4bbdfSmrg{ 82035c4bbdfSmrg 2, 0, 1, 4, 0, 0, 0, 0, 0, 0, 82135c4bbdfSmrg 0, 0, 0, 0, 0, 0, 3, 5, 17, 14, 82235c4bbdfSmrg 15, 8, 9, 10, 11, 12, 13, 18, 19, 16, 82335c4bbdfSmrg 0, 0, 0, 37, 53, 55, 0, 0, 0, 0, 82435c4bbdfSmrg 63, 64, 32, 24, 23, 6, 6, 56, 57, 0, 82535c4bbdfSmrg 61, 21, 65, 20, 6, 6, 0, 0, 22, 6, 82635c4bbdfSmrg 0, 7, 0, 35, 0, 0, 51, 0, 0, 0, 82735c4bbdfSmrg 0, 30, 0, 0, 36, 38, 39, 40, 41, 42, 82835c4bbdfSmrg 43, 44, 45, 46, 47, 0, 52, 54, 0, 59, 82935c4bbdfSmrg 0, 6, 0, 0, 0, 0, 31, 33, 6, 48, 83035c4bbdfSmrg 49, 6, 55, 60, 62, 25, 0, 0, 6, 6, 83135c4bbdfSmrg 34, 50, 0, 6, 6, 26, 29, 6, 28, 27, 83235c4bbdfSmrg 58 83335c4bbdfSmrg}; 83435c4bbdfSmrg 83535c4bbdfSmrg /* YYPGOTO[NTERM-NUM]. */ 83605b261ecSmrgstatic const yytype_int8 yypgoto[] = 83705b261ecSmrg{ 8386747b715Smrg -47, -47, -47, -46, -47, -47, -47, -47, -47, -47, 8396747b715Smrg -47, 16, -47, -47, -47, 25, -47, -47, 5, 8, 8406747b715Smrg -47, -47, 26, -47, -47, -9, -47, 9, -47, -47, 8416747b715Smrg -47, -47, -47 84205b261ecSmrg}; 84305b261ecSmrg 84435c4bbdfSmrg /* YYDEFGOTO[NTERM-NUM]. */ 84535c4bbdfSmrgstatic const yytype_int8 yydefgoto[] = 84635c4bbdfSmrg{ 84735c4bbdfSmrg -1, 1, 16, 56, 17, 18, 19, 20, 21, 22, 84835c4bbdfSmrg 71, 72, 23, 54, 63, 64, 24, 45, 83, 84, 84935c4bbdfSmrg 85, 66, 67, 25, 46, 49, 89, 90, 26, 59, 85035c4bbdfSmrg 27, 28, 29 85135c4bbdfSmrg}; 85235c4bbdfSmrg 85335c4bbdfSmrg /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 85435c4bbdfSmrg positive, shift that token. If negative, reduce the rule whose 85535c4bbdfSmrg number is the opposite. If YYTABLE_NINF, syntax error. */ 8565a7dfde8Smrgstatic const yytype_int8 yytable[] = 85705b261ecSmrg{ 8586747b715Smrg 57, 92, 69, 76, 77, 78, 79, 2, 60, 61, 8596747b715Smrg 3, 4, 70, 68, 5, 6, 7, 8, 80, 81, 8606747b715Smrg 82, 93, 94, 33, 95, 9, 10, 11, 47, 48, 8616747b715Smrg 30, 31, 32, 12, 34, 13, 14, 15, 76, 77, 8626747b715Smrg 78, 79, 80, 81, 82, 105, 35, 36, 37, 40, 8636747b715Smrg 38, 39, 110, 41, 42, 111, 43, 44, 50, 51, 8646747b715Smrg 52, 53, 115, 116, 55, 58, 62, 118, 119, 65, 8656747b715Smrg 73, 120, 75, 87, 88, 91, 97, 98, 101, 102, 8666747b715Smrg 108, 109, 104, 106, 113, 114, 117, 96, 74, 100, 8676747b715Smrg 107, 99, 86, 112, 0, 0, 0, 0, 103 86805b261ecSmrg}; 86905b261ecSmrg 8706747b715Smrgstatic const yytype_int8 yycheck[] = 87105b261ecSmrg{ 8726747b715Smrg 46, 4, 21, 11, 12, 13, 14, 0, 54, 55, 8736747b715Smrg 3, 4, 31, 59, 7, 8, 9, 10, 15, 16, 8746747b715Smrg 17, 24, 25, 5, 27, 18, 19, 20, 22, 23, 8756747b715Smrg 31, 31, 31, 26, 5, 28, 29, 30, 11, 12, 8766747b715Smrg 13, 14, 15, 16, 17, 91, 31, 5, 31, 3, 8776747b715Smrg 31, 31, 98, 3, 5, 101, 3, 3, 3, 3, 8786747b715Smrg 3, 3, 108, 109, 3, 3, 31, 113, 114, 31, 8796747b715Smrg 31, 117, 6, 6, 31, 3, 6, 3, 3, 31, 8806747b715Smrg 3, 3, 6, 31, 3, 3, 3, 71, 63, 84, 8816747b715Smrg 31, 83, 66, 102, -1, -1, -1, -1, 89 88205b261ecSmrg}; 88305b261ecSmrg 88435c4bbdfSmrg /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 88535c4bbdfSmrg symbol of state STATE-NUM. */ 8865a7dfde8Smrgstatic const yytype_int8 yystos[] = 88705b261ecSmrg{ 8886747b715Smrg 0, 33, 0, 3, 4, 7, 8, 9, 10, 18, 8896747b715Smrg 19, 20, 26, 28, 29, 30, 34, 36, 37, 38, 8906747b715Smrg 39, 40, 41, 44, 48, 55, 60, 62, 63, 64, 8916747b715Smrg 31, 31, 31, 5, 5, 31, 5, 31, 31, 31, 8926747b715Smrg 3, 3, 5, 3, 3, 49, 56, 22, 23, 57, 8936747b715Smrg 3, 3, 3, 3, 45, 3, 35, 35, 3, 61, 8946747b715Smrg 35, 35, 31, 46, 47, 31, 53, 54, 35, 21, 8956747b715Smrg 31, 42, 43, 31, 47, 6, 11, 12, 13, 14, 8966747b715Smrg 15, 16, 17, 50, 51, 52, 54, 6, 31, 58, 8976747b715Smrg 59, 3, 4, 24, 25, 27, 43, 6, 3, 51, 8986747b715Smrg 50, 3, 31, 59, 6, 35, 31, 31, 3, 3, 8996747b715Smrg 35, 35, 57, 3, 3, 35, 35, 3, 35, 35, 9006747b715Smrg 35 90105b261ecSmrg}; 90205b261ecSmrg 90335c4bbdfSmrg /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 9045a7dfde8Smrgstatic const yytype_int8 yyr1[] = 90535c4bbdfSmrg{ 90635c4bbdfSmrg 0, 32, 33, 33, 34, 34, 35, 35, 36, 36, 90735c4bbdfSmrg 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 90835c4bbdfSmrg 37, 38, 39, 40, 41, 42, 42, 42, 42, 42, 90935c4bbdfSmrg 43, 43, 45, 44, 46, 47, 47, 49, 48, 50, 91035c4bbdfSmrg 50, 50, 50, 51, 51, 51, 52, 52, 52, 52, 91135c4bbdfSmrg 53, 54, 54, 56, 55, 57, 57, 57, 58, 59, 91235c4bbdfSmrg 59, 61, 60, 62, 63, 64 91335c4bbdfSmrg}; 91405b261ecSmrg 91535c4bbdfSmrg /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 9165a7dfde8Smrgstatic const yytype_int8 yyr2[] = 91735c4bbdfSmrg{ 91835c4bbdfSmrg 0, 2, 0, 2, 1, 1, 0, 2, 1, 1, 91935c4bbdfSmrg 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 92035c4bbdfSmrg 3, 3, 4, 3, 3, 3, 4, 5, 5, 4, 92135c4bbdfSmrg 1, 2, 0, 7, 4, 1, 2, 0, 6, 1, 92235c4bbdfSmrg 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 92335c4bbdfSmrg 4, 1, 2, 0, 6, 0, 1, 1, 5, 1, 92435c4bbdfSmrg 2, 0, 7, 2, 2, 3 92535c4bbdfSmrg}; 92605b261ecSmrg 92705b261ecSmrg 9285a7dfde8Smrgenum { YYENOMEM = -2 }; 9295a7dfde8Smrg 93035c4bbdfSmrg#define yyerrok (yyerrstatus = 0) 93135c4bbdfSmrg#define yyclearin (yychar = YYEMPTY) 93205b261ecSmrg 93335c4bbdfSmrg#define YYACCEPT goto yyacceptlab 93435c4bbdfSmrg#define YYABORT goto yyabortlab 93535c4bbdfSmrg#define YYERROR goto yyerrorlab 93605b261ecSmrg 93705b261ecSmrg 93835c4bbdfSmrg#define YYRECOVERING() (!!yyerrstatus) 93935c4bbdfSmrg 9405a7dfde8Smrg#define YYBACKUP(Token, Value) \ 9415a7dfde8Smrg do \ 9425a7dfde8Smrg if (yychar == YYEMPTY) \ 9435a7dfde8Smrg { \ 9445a7dfde8Smrg yychar = (Token); \ 9455a7dfde8Smrg yylval = (Value); \ 9465a7dfde8Smrg YYPOPSTACK (yylen); \ 9475a7dfde8Smrg yystate = *yyssp; \ 9485a7dfde8Smrg goto yybackup; \ 9495a7dfde8Smrg } \ 9505a7dfde8Smrg else \ 9515a7dfde8Smrg { \ 9525a7dfde8Smrg yyerror (YY_("syntax error: cannot back up")); \ 9535a7dfde8Smrg YYERROR; \ 9545a7dfde8Smrg } \ 9555a7dfde8Smrg while (0) 9565a7dfde8Smrg 9575a7dfde8Smrg/* Backward compatibility with an undocumented macro. 9585a7dfde8Smrg Use YYerror or YYUNDEF. */ 9595a7dfde8Smrg#define YYERRCODE YYUNDEF 96005b261ecSmrg 96105b261ecSmrg 96205b261ecSmrg/* Enable debugging if requested. */ 96305b261ecSmrg#if YYDEBUG 96405b261ecSmrg 96505b261ecSmrg# ifndef YYFPRINTF 96605b261ecSmrg# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 96705b261ecSmrg# define YYFPRINTF fprintf 96805b261ecSmrg# endif 96905b261ecSmrg 97035c4bbdfSmrg# define YYDPRINTF(Args) \ 97135c4bbdfSmrgdo { \ 97235c4bbdfSmrg if (yydebug) \ 97335c4bbdfSmrg YYFPRINTF Args; \ 97435c4bbdfSmrg} while (0) 97505b261ecSmrg 97635c4bbdfSmrg/* This macro is provided for backward compatibility. */ 9775a7dfde8Smrg# ifndef YY_LOCATION_PRINT 9785a7dfde8Smrg# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 9795a7dfde8Smrg# endif 98005b261ecSmrg 98105b261ecSmrg 9825a7dfde8Smrg# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ 98335c4bbdfSmrgdo { \ 98435c4bbdfSmrg if (yydebug) \ 98535c4bbdfSmrg { \ 98635c4bbdfSmrg YYFPRINTF (stderr, "%s ", Title); \ 98735c4bbdfSmrg yy_symbol_print (stderr, \ 9885a7dfde8Smrg Kind, Value); \ 98935c4bbdfSmrg YYFPRINTF (stderr, "\n"); \ 99035c4bbdfSmrg } \ 99135c4bbdfSmrg} while (0) 99235c4bbdfSmrg 99335c4bbdfSmrg 9945a7dfde8Smrg/*-----------------------------------. 9955a7dfde8Smrg| Print this symbol's value on YYO. | 9965a7dfde8Smrg`-----------------------------------*/ 99705b261ecSmrg 99805b261ecSmrgstatic void 9995a7dfde8Smrgyy_symbol_value_print (FILE *yyo, 10005a7dfde8Smrg yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) 100105b261ecSmrg{ 10025a7dfde8Smrg FILE *yyoutput = yyo; 10035a7dfde8Smrg YYUSE (yyoutput); 100405b261ecSmrg if (!yyvaluep) 100505b261ecSmrg return; 100605b261ecSmrg# ifdef YYPRINT 10075a7dfde8Smrg if (yykind < YYNTOKENS) 10085a7dfde8Smrg YYPRINT (yyo, yytoknum[yykind], *yyvaluep); 100905b261ecSmrg# endif 10105a7dfde8Smrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 10115a7dfde8Smrg YYUSE (yykind); 10125a7dfde8Smrg YY_IGNORE_MAYBE_UNINITIALIZED_END 101305b261ecSmrg} 101405b261ecSmrg 101505b261ecSmrg 10165a7dfde8Smrg/*---------------------------. 10175a7dfde8Smrg| Print this symbol on YYO. | 10185a7dfde8Smrg`---------------------------*/ 101905b261ecSmrg 102005b261ecSmrgstatic void 10215a7dfde8Smrgyy_symbol_print (FILE *yyo, 10225a7dfde8Smrg yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) 102305b261ecSmrg{ 10245a7dfde8Smrg YYFPRINTF (yyo, "%s %s (", 10255a7dfde8Smrg yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); 102605b261ecSmrg 10275a7dfde8Smrg yy_symbol_value_print (yyo, yykind, yyvaluep); 10285a7dfde8Smrg YYFPRINTF (yyo, ")"); 102905b261ecSmrg} 103005b261ecSmrg 103105b261ecSmrg/*------------------------------------------------------------------. 103205b261ecSmrg| yy_stack_print -- Print the state stack from its BOTTOM up to its | 103305b261ecSmrg| TOP (included). | 103405b261ecSmrg`------------------------------------------------------------------*/ 103505b261ecSmrg 103605b261ecSmrgstatic void 10375a7dfde8Smrgyy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) 103805b261ecSmrg{ 103905b261ecSmrg YYFPRINTF (stderr, "Stack now"); 10404642e01fSmrg for (; yybottom <= yytop; yybottom++) 10414642e01fSmrg { 10424642e01fSmrg int yybot = *yybottom; 10434642e01fSmrg YYFPRINTF (stderr, " %d", yybot); 10444642e01fSmrg } 104505b261ecSmrg YYFPRINTF (stderr, "\n"); 104605b261ecSmrg} 104705b261ecSmrg 104835c4bbdfSmrg# define YY_STACK_PRINT(Bottom, Top) \ 104935c4bbdfSmrgdo { \ 105035c4bbdfSmrg if (yydebug) \ 105135c4bbdfSmrg yy_stack_print ((Bottom), (Top)); \ 105235c4bbdfSmrg} while (0) 105305b261ecSmrg 105405b261ecSmrg 105505b261ecSmrg/*------------------------------------------------. 105605b261ecSmrg| Report that the YYRULE is going to be reduced. | 105705b261ecSmrg`------------------------------------------------*/ 105805b261ecSmrg 105905b261ecSmrgstatic void 10605a7dfde8Smrgyy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, 10615a7dfde8Smrg int yyrule) 106205b261ecSmrg{ 10635a7dfde8Smrg int yylno = yyrline[yyrule]; 106405b261ecSmrg int yynrhs = yyr2[yyrule]; 106505b261ecSmrg int yyi; 10665a7dfde8Smrg YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", 106735c4bbdfSmrg yyrule - 1, yylno); 106805b261ecSmrg /* The symbols being reduced. */ 106905b261ecSmrg for (yyi = 0; yyi < yynrhs; yyi++) 107005b261ecSmrg { 10714642e01fSmrg YYFPRINTF (stderr, " $%d = ", yyi + 1); 107235c4bbdfSmrg yy_symbol_print (stderr, 10735a7dfde8Smrg YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), 10745a7dfde8Smrg &yyvsp[(yyi + 1) - (yynrhs)]); 10754642e01fSmrg YYFPRINTF (stderr, "\n"); 107605b261ecSmrg } 107705b261ecSmrg} 107805b261ecSmrg 107935c4bbdfSmrg# define YY_REDUCE_PRINT(Rule) \ 108035c4bbdfSmrgdo { \ 108135c4bbdfSmrg if (yydebug) \ 108235c4bbdfSmrg yy_reduce_print (yyssp, yyvsp, Rule); \ 108335c4bbdfSmrg} while (0) 108405b261ecSmrg 108505b261ecSmrg/* Nonzero means print parse trace. It is left uninitialized so that 108605b261ecSmrg multiple parsers can coexist. */ 108705b261ecSmrgint yydebug; 108805b261ecSmrg#else /* !YYDEBUG */ 10895a7dfde8Smrg# define YYDPRINTF(Args) ((void) 0) 10905a7dfde8Smrg# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) 109105b261ecSmrg# define YY_STACK_PRINT(Bottom, Top) 109205b261ecSmrg# define YY_REDUCE_PRINT(Rule) 109305b261ecSmrg#endif /* !YYDEBUG */ 109405b261ecSmrg 109505b261ecSmrg 109605b261ecSmrg/* YYINITDEPTH -- initial size of the parser's stacks. */ 109735c4bbdfSmrg#ifndef YYINITDEPTH 109805b261ecSmrg# define YYINITDEPTH 200 109905b261ecSmrg#endif 110005b261ecSmrg 110105b261ecSmrg/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 110205b261ecSmrg if the built-in stack extension method is used). 110305b261ecSmrg 110405b261ecSmrg Do not make this value too large; the results are undefined if 110505b261ecSmrg YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 110605b261ecSmrg evaluated with infinite-precision integer arithmetic. */ 110705b261ecSmrg 110805b261ecSmrg#ifndef YYMAXDEPTH 110905b261ecSmrg# define YYMAXDEPTH 10000 111005b261ecSmrg#endif 111105b261ecSmrg 111205b261ecSmrg 111305b261ecSmrg 111405b261ecSmrg 111505b261ecSmrg 111605b261ecSmrg 111705b261ecSmrg/*-----------------------------------------------. 111805b261ecSmrg| Release the memory associated to this symbol. | 111905b261ecSmrg`-----------------------------------------------*/ 112005b261ecSmrg 112105b261ecSmrgstatic void 11225a7dfde8Smrgyydestruct (const char *yymsg, 11235a7dfde8Smrg yysymbol_kind_t yykind, YYSTYPE *yyvaluep) 112405b261ecSmrg{ 112505b261ecSmrg YYUSE (yyvaluep); 112605b261ecSmrg if (!yymsg) 112705b261ecSmrg yymsg = "Deleting"; 11285a7dfde8Smrg YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); 112905b261ecSmrg 113035c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 11315a7dfde8Smrg YYUSE (yykind); 113235c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_END 113305b261ecSmrg} 113405b261ecSmrg 11359ace9065Smrg 11365a7dfde8Smrg/* Lookahead token kind. */ 113705b261ecSmrgint yychar; 113805b261ecSmrg 11394642e01fSmrg/* The semantic value of the lookahead symbol. */ 114005b261ecSmrgYYSTYPE yylval; 114105b261ecSmrg/* Number of syntax errors so far. */ 114205b261ecSmrgint yynerrs; 114305b261ecSmrg 114405b261ecSmrg 11455a7dfde8Smrg 11465a7dfde8Smrg 11479ace9065Smrg/*----------. 11489ace9065Smrg| yyparse. | 11499ace9065Smrg`----------*/ 115005b261ecSmrg 115105b261ecSmrgint 115205b261ecSmrgyyparse (void) 115305b261ecSmrg{ 11545a7dfde8Smrg yy_state_fast_t yystate = 0; 11554642e01fSmrg /* Number of tokens to shift before error messages enabled. */ 11565a7dfde8Smrg int yyerrstatus = 0; 115705b261ecSmrg 11585a7dfde8Smrg /* Refer to the stacks through separate pointers, to allow yyoverflow 11594642e01fSmrg to reallocate them elsewhere. */ 116005b261ecSmrg 11615a7dfde8Smrg /* Their size. */ 11625a7dfde8Smrg YYPTRDIFF_T yystacksize = YYINITDEPTH; 116305b261ecSmrg 11645a7dfde8Smrg /* The state stack: array, bottom, top. */ 11655a7dfde8Smrg yy_state_t yyssa[YYINITDEPTH]; 11665a7dfde8Smrg yy_state_t *yyss = yyssa; 11675a7dfde8Smrg yy_state_t *yyssp = yyss; 116805b261ecSmrg 11695a7dfde8Smrg /* The semantic value stack: array, bottom, top. */ 11705a7dfde8Smrg YYSTYPE yyvsa[YYINITDEPTH]; 11715a7dfde8Smrg YYSTYPE *yyvs = yyvsa; 11725a7dfde8Smrg YYSTYPE *yyvsp = yyvs; 117305b261ecSmrg 11744642e01fSmrg int yyn; 11755a7dfde8Smrg /* The return value of yyparse. */ 11764642e01fSmrg int yyresult; 11775a7dfde8Smrg /* Lookahead symbol kind. */ 11785a7dfde8Smrg yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; 117905b261ecSmrg /* The variables used to return semantic value and location from the 118005b261ecSmrg action routines. */ 118105b261ecSmrg YYSTYPE yyval; 118205b261ecSmrg 11835a7dfde8Smrg 11844642e01fSmrg 11854642e01fSmrg#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 118605b261ecSmrg 118705b261ecSmrg /* The number of symbols on the RHS of the reduced rule. 118805b261ecSmrg Keep to zero when no symbol should be popped. */ 118905b261ecSmrg int yylen = 0; 119005b261ecSmrg 119105b261ecSmrg YYDPRINTF ((stderr, "Starting parse\n")); 119205b261ecSmrg 11934642e01fSmrg yychar = YYEMPTY; /* Cause a token to be read. */ 119405b261ecSmrg goto yysetstate; 119505b261ecSmrg 11965a7dfde8Smrg 119705b261ecSmrg/*------------------------------------------------------------. 11985a7dfde8Smrg| yynewstate -- push a new state, which is found in yystate. | 119905b261ecSmrg`------------------------------------------------------------*/ 12005a7dfde8Smrgyynewstate: 120105b261ecSmrg /* In all cases, when you get here, the value and location stacks 120205b261ecSmrg have just been pushed. So pushing a state here evens the stacks. */ 120305b261ecSmrg yyssp++; 120405b261ecSmrg 12055a7dfde8Smrg 12065a7dfde8Smrg/*--------------------------------------------------------------------. 12075a7dfde8Smrg| yysetstate -- set current state (the top of the stack) to yystate. | 12085a7dfde8Smrg`--------------------------------------------------------------------*/ 12095a7dfde8Smrgyysetstate: 12105a7dfde8Smrg YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 12115a7dfde8Smrg YY_ASSERT (0 <= yystate && yystate < YYNSTATES); 12125a7dfde8Smrg YY_IGNORE_USELESS_CAST_BEGIN 12135a7dfde8Smrg *yyssp = YY_CAST (yy_state_t, yystate); 12145a7dfde8Smrg YY_IGNORE_USELESS_CAST_END 12155a7dfde8Smrg YY_STACK_PRINT (yyss, yyssp); 121605b261ecSmrg 121705b261ecSmrg if (yyss + yystacksize - 1 <= yyssp) 12185a7dfde8Smrg#if !defined yyoverflow && !defined YYSTACK_RELOCATE 12195a7dfde8Smrg goto yyexhaustedlab; 12205a7dfde8Smrg#else 122105b261ecSmrg { 122205b261ecSmrg /* Get the current used size of the three stacks, in elements. */ 12235a7dfde8Smrg YYPTRDIFF_T yysize = yyssp - yyss + 1; 122405b261ecSmrg 12255a7dfde8Smrg# if defined yyoverflow 122605b261ecSmrg { 122735c4bbdfSmrg /* Give user a chance to reallocate the stack. Use copies of 122835c4bbdfSmrg these so that the &'s don't force the real ones into 122935c4bbdfSmrg memory. */ 12305a7dfde8Smrg yy_state_t *yyss1 = yyss; 123135c4bbdfSmrg YYSTYPE *yyvs1 = yyvs; 123235c4bbdfSmrg 123335c4bbdfSmrg /* Each stack pointer address is followed by the size of the 123435c4bbdfSmrg data in use in that stack, in bytes. This used to be a 123535c4bbdfSmrg conditional around just the two extra args, but that might 123635c4bbdfSmrg be undefined if yyoverflow is a macro. */ 123735c4bbdfSmrg yyoverflow (YY_("memory exhausted"), 12385a7dfde8Smrg &yyss1, yysize * YYSIZEOF (*yyssp), 12395a7dfde8Smrg &yyvs1, yysize * YYSIZEOF (*yyvsp), 124035c4bbdfSmrg &yystacksize); 124135c4bbdfSmrg yyss = yyss1; 124235c4bbdfSmrg yyvs = yyvs1; 124305b261ecSmrg } 12445a7dfde8Smrg# else /* defined YYSTACK_RELOCATE */ 124505b261ecSmrg /* Extend the stack our own way. */ 124605b261ecSmrg if (YYMAXDEPTH <= yystacksize) 124735c4bbdfSmrg goto yyexhaustedlab; 124805b261ecSmrg yystacksize *= 2; 124905b261ecSmrg if (YYMAXDEPTH < yystacksize) 125035c4bbdfSmrg yystacksize = YYMAXDEPTH; 125105b261ecSmrg 125205b261ecSmrg { 12535a7dfde8Smrg yy_state_t *yyss1 = yyss; 125435c4bbdfSmrg union yyalloc *yyptr = 12555a7dfde8Smrg YY_CAST (union yyalloc *, 12565a7dfde8Smrg YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); 125735c4bbdfSmrg if (! yyptr) 125835c4bbdfSmrg goto yyexhaustedlab; 125935c4bbdfSmrg YYSTACK_RELOCATE (yyss_alloc, yyss); 126035c4bbdfSmrg YYSTACK_RELOCATE (yyvs_alloc, yyvs); 126105b261ecSmrg# undef YYSTACK_RELOCATE 126235c4bbdfSmrg if (yyss1 != yyssa) 126335c4bbdfSmrg YYSTACK_FREE (yyss1); 126405b261ecSmrg } 126505b261ecSmrg# endif 126605b261ecSmrg 126705b261ecSmrg yyssp = yyss + yysize - 1; 126805b261ecSmrg yyvsp = yyvs + yysize - 1; 126905b261ecSmrg 12705a7dfde8Smrg YY_IGNORE_USELESS_CAST_BEGIN 12715a7dfde8Smrg YYDPRINTF ((stderr, "Stack size increased to %ld\n", 12725a7dfde8Smrg YY_CAST (long, yystacksize))); 12735a7dfde8Smrg YY_IGNORE_USELESS_CAST_END 127405b261ecSmrg 127505b261ecSmrg if (yyss + yystacksize - 1 <= yyssp) 127635c4bbdfSmrg YYABORT; 127705b261ecSmrg } 12785a7dfde8Smrg#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ 127905b261ecSmrg 12804642e01fSmrg if (yystate == YYFINAL) 12814642e01fSmrg YYACCEPT; 12824642e01fSmrg 128305b261ecSmrg goto yybackup; 128405b261ecSmrg 12855a7dfde8Smrg 128605b261ecSmrg/*-----------. 128705b261ecSmrg| yybackup. | 128805b261ecSmrg`-----------*/ 128905b261ecSmrgyybackup: 129005b261ecSmrg /* Do appropriate processing given the current state. Read a 12914642e01fSmrg lookahead token if we need one and don't already have one. */ 129205b261ecSmrg 12934642e01fSmrg /* First try to decide what to do without reference to lookahead token. */ 129405b261ecSmrg yyn = yypact[yystate]; 12959ace9065Smrg if (yypact_value_is_default (yyn)) 129605b261ecSmrg goto yydefault; 129705b261ecSmrg 12984642e01fSmrg /* Not known => get a lookahead token if don't already have one. */ 129905b261ecSmrg 13005a7dfde8Smrg /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ 130105b261ecSmrg if (yychar == YYEMPTY) 130205b261ecSmrg { 13035a7dfde8Smrg YYDPRINTF ((stderr, "Reading a token\n")); 130435c4bbdfSmrg yychar = yylex (); 130505b261ecSmrg } 130605b261ecSmrg 130705b261ecSmrg if (yychar <= YYEOF) 130805b261ecSmrg { 13095a7dfde8Smrg yychar = YYEOF; 13105a7dfde8Smrg yytoken = YYSYMBOL_YYEOF; 131105b261ecSmrg YYDPRINTF ((stderr, "Now at end of input.\n")); 131205b261ecSmrg } 13135a7dfde8Smrg else if (yychar == YYerror) 13145a7dfde8Smrg { 13155a7dfde8Smrg /* The scanner already issued an error message, process directly 13165a7dfde8Smrg to error recovery. But do not keep the error token as 13175a7dfde8Smrg lookahead, it is too special and may lead us to an endless 13185a7dfde8Smrg loop in error recovery. */ 13195a7dfde8Smrg yychar = YYUNDEF; 13205a7dfde8Smrg yytoken = YYSYMBOL_YYerror; 13215a7dfde8Smrg goto yyerrlab1; 13225a7dfde8Smrg } 132305b261ecSmrg else 132405b261ecSmrg { 132505b261ecSmrg yytoken = YYTRANSLATE (yychar); 132605b261ecSmrg YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 132705b261ecSmrg } 132805b261ecSmrg 132905b261ecSmrg /* If the proper action on seeing token YYTOKEN is to reduce or to 133005b261ecSmrg detect an error, take that action. */ 133105b261ecSmrg yyn += yytoken; 133205b261ecSmrg if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 133305b261ecSmrg goto yydefault; 133405b261ecSmrg yyn = yytable[yyn]; 133505b261ecSmrg if (yyn <= 0) 133605b261ecSmrg { 13379ace9065Smrg if (yytable_value_is_error (yyn)) 13389ace9065Smrg goto yyerrlab; 133905b261ecSmrg yyn = -yyn; 134005b261ecSmrg goto yyreduce; 134105b261ecSmrg } 134205b261ecSmrg 134305b261ecSmrg /* Count tokens shifted since error; after three, turn off error 134405b261ecSmrg status. */ 134505b261ecSmrg if (yyerrstatus) 134605b261ecSmrg yyerrstatus--; 134705b261ecSmrg 13484642e01fSmrg /* Shift the lookahead token. */ 134905b261ecSmrg YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 135005b261ecSmrg yystate = yyn; 135135c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 135205b261ecSmrg *++yyvsp = yylval; 135335c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_END 135405b261ecSmrg 13555a7dfde8Smrg /* Discard the shifted token. */ 13565a7dfde8Smrg yychar = YYEMPTY; 135705b261ecSmrg goto yynewstate; 135805b261ecSmrg 135905b261ecSmrg 136005b261ecSmrg/*-----------------------------------------------------------. 136105b261ecSmrg| yydefault -- do the default action for the current state. | 136205b261ecSmrg`-----------------------------------------------------------*/ 136305b261ecSmrgyydefault: 136405b261ecSmrg yyn = yydefact[yystate]; 136505b261ecSmrg if (yyn == 0) 136605b261ecSmrg goto yyerrlab; 136705b261ecSmrg goto yyreduce; 136805b261ecSmrg 136905b261ecSmrg 137005b261ecSmrg/*-----------------------------. 13715a7dfde8Smrg| yyreduce -- do a reduction. | 137205b261ecSmrg`-----------------------------*/ 137305b261ecSmrgyyreduce: 137405b261ecSmrg /* yyn is the number of a rule to reduce with. */ 137505b261ecSmrg yylen = yyr2[yyn]; 137605b261ecSmrg 137705b261ecSmrg /* If YYLEN is nonzero, implement the default value of the action: 137835c4bbdfSmrg '$$ = $1'. 137905b261ecSmrg 138005b261ecSmrg Otherwise, the following line sets YYVAL to garbage. 138105b261ecSmrg This behavior is undocumented and Bison 138205b261ecSmrg users should not rely upon it. Assigning to YYVAL 138305b261ecSmrg unconditionally makes the parser a bit smaller, and it avoids a 138405b261ecSmrg GCC warning that YYVAL may be used uninitialized. */ 138505b261ecSmrg yyval = yyvsp[1-yylen]; 138605b261ecSmrg 138705b261ecSmrg 138805b261ecSmrg YY_REDUCE_PRINT (yyn); 138905b261ecSmrg switch (yyn) 139005b261ecSmrg { 13915a7dfde8Smrg case 20: /* trayicon: TRAYICON STRING NEWLINE */ 13925a7dfde8Smrg#line 160 "winprefsyacc.y" 13935a7dfde8Smrg { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 13945a7dfde8Smrg#line 1395 "winprefsyacc.c" 139505b261ecSmrg break; 139605b261ecSmrg 13975a7dfde8Smrg case 21: /* rootmenu: ROOTMENU STRING NEWLINE */ 13985a7dfde8Smrg#line 163 "winprefsyacc.y" 13995a7dfde8Smrg { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 14005a7dfde8Smrg#line 1401 "winprefsyacc.c" 140105b261ecSmrg break; 140205b261ecSmrg 14035a7dfde8Smrg case 22: /* defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE */ 14045a7dfde8Smrg#line 166 "winprefsyacc.y" 14055a7dfde8Smrg { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); } 14065a7dfde8Smrg#line 1407 "winprefsyacc.c" 140705b261ecSmrg break; 140805b261ecSmrg 14095a7dfde8Smrg case 23: /* defaulticon: DEFAULTICON STRING NEWLINE */ 14105a7dfde8Smrg#line 169 "winprefsyacc.y" 14115a7dfde8Smrg { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 14125a7dfde8Smrg#line 1413 "winprefsyacc.c" 141305b261ecSmrg break; 141405b261ecSmrg 14155a7dfde8Smrg case 24: /* icondirectory: ICONDIRECTORY STRING NEWLINE */ 14165a7dfde8Smrg#line 172 "winprefsyacc.y" 14175a7dfde8Smrg { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 14185a7dfde8Smrg#line 1419 "winprefsyacc.c" 141905b261ecSmrg break; 142005b261ecSmrg 14215a7dfde8Smrg case 25: /* menuline: SEPARATOR NEWLINE newline_or_nada */ 14225a7dfde8Smrg#line 175 "winprefsyacc.y" 14235a7dfde8Smrg { AddMenuLine("-", CMD_SEPARATOR, ""); } 14245a7dfde8Smrg#line 1425 "winprefsyacc.c" 142505b261ecSmrg break; 142605b261ecSmrg 14275a7dfde8Smrg case 26: /* menuline: STRING ALWAYSONTOP NEWLINE newline_or_nada */ 14285a7dfde8Smrg#line 176 "winprefsyacc.y" 14295a7dfde8Smrg { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); } 14305a7dfde8Smrg#line 1431 "winprefsyacc.c" 143105b261ecSmrg break; 143205b261ecSmrg 14335a7dfde8Smrg case 27: /* menuline: STRING EXEC STRING NEWLINE newline_or_nada */ 14345a7dfde8Smrg#line 177 "winprefsyacc.y" 14355a7dfde8Smrg { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } 14365a7dfde8Smrg#line 1437 "winprefsyacc.c" 143705b261ecSmrg break; 143805b261ecSmrg 14395a7dfde8Smrg case 28: /* menuline: STRING MENU STRING NEWLINE newline_or_nada */ 14405a7dfde8Smrg#line 178 "winprefsyacc.y" 14415a7dfde8Smrg { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } 14425a7dfde8Smrg#line 1443 "winprefsyacc.c" 144305b261ecSmrg break; 144405b261ecSmrg 14455a7dfde8Smrg case 29: /* menuline: STRING RELOAD NEWLINE newline_or_nada */ 14465a7dfde8Smrg#line 179 "winprefsyacc.y" 14475a7dfde8Smrg { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); } 14485a7dfde8Smrg#line 1449 "winprefsyacc.c" 144905b261ecSmrg break; 145005b261ecSmrg 14515a7dfde8Smrg case 32: /* $@1: %empty */ 14525a7dfde8Smrg#line 186 "winprefsyacc.y" 14535a7dfde8Smrg { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 14545a7dfde8Smrg#line 1455 "winprefsyacc.c" 145505b261ecSmrg break; 145605b261ecSmrg 14575a7dfde8Smrg case 33: /* menu: MENU STRING LB $@1 newline_or_nada menulist RB */ 14585a7dfde8Smrg#line 186 "winprefsyacc.y" 14595a7dfde8Smrg {CloseMenu();} 14605a7dfde8Smrg#line 1461 "winprefsyacc.c" 146105b261ecSmrg break; 146205b261ecSmrg 14635a7dfde8Smrg case 34: /* iconline: STRING STRING NEWLINE newline_or_nada */ 14645a7dfde8Smrg#line 189 "winprefsyacc.y" 14655a7dfde8Smrg { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); } 14665a7dfde8Smrg#line 1467 "winprefsyacc.c" 146705b261ecSmrg break; 146805b261ecSmrg 14695a7dfde8Smrg case 37: /* $@2: %empty */ 14705a7dfde8Smrg#line 196 "winprefsyacc.y" 14715a7dfde8Smrg {OpenIcons();} 14725a7dfde8Smrg#line 1473 "winprefsyacc.c" 147305b261ecSmrg break; 147405b261ecSmrg 14755a7dfde8Smrg case 38: /* icons: ICONS LB $@2 newline_or_nada iconlist RB */ 14765a7dfde8Smrg#line 196 "winprefsyacc.y" 14775a7dfde8Smrg {CloseIcons();} 14785a7dfde8Smrg#line 1479 "winprefsyacc.c" 147905b261ecSmrg break; 148005b261ecSmrg 14815a7dfde8Smrg case 39: /* group1: TOPMOST */ 14825a7dfde8Smrg#line 199 "winprefsyacc.y" 14835a7dfde8Smrg { (yyval.uVal)=STYLE_TOPMOST; } 14845a7dfde8Smrg#line 1485 "winprefsyacc.c" 14856747b715Smrg break; 14866747b715Smrg 14875a7dfde8Smrg case 40: /* group1: MAXIMIZE */ 14885a7dfde8Smrg#line 200 "winprefsyacc.y" 14895a7dfde8Smrg { (yyval.uVal)=STYLE_MAXIMIZE; } 14905a7dfde8Smrg#line 1491 "winprefsyacc.c" 14916747b715Smrg break; 14926747b715Smrg 14935a7dfde8Smrg case 41: /* group1: MINIMIZE */ 14945a7dfde8Smrg#line 201 "winprefsyacc.y" 14955a7dfde8Smrg { (yyval.uVal)=STYLE_MINIMIZE; } 14965a7dfde8Smrg#line 1497 "winprefsyacc.c" 14976747b715Smrg break; 14986747b715Smrg 14995a7dfde8Smrg case 42: /* group1: BOTTOM */ 15005a7dfde8Smrg#line 202 "winprefsyacc.y" 15015a7dfde8Smrg { (yyval.uVal)=STYLE_BOTTOM; } 15025a7dfde8Smrg#line 1503 "winprefsyacc.c" 15036747b715Smrg break; 15046747b715Smrg 15055a7dfde8Smrg case 43: /* group2: NOTITLE */ 15065a7dfde8Smrg#line 205 "winprefsyacc.y" 15075a7dfde8Smrg { (yyval.uVal)=STYLE_NOTITLE; } 15085a7dfde8Smrg#line 1509 "winprefsyacc.c" 15096747b715Smrg break; 15106747b715Smrg 15115a7dfde8Smrg case 44: /* group2: OUTLINE */ 15125a7dfde8Smrg#line 206 "winprefsyacc.y" 15135a7dfde8Smrg { (yyval.uVal)=STYLE_OUTLINE; } 15145a7dfde8Smrg#line 1515 "winprefsyacc.c" 15156747b715Smrg break; 15166747b715Smrg 15175a7dfde8Smrg case 45: /* group2: NOFRAME */ 15185a7dfde8Smrg#line 207 "winprefsyacc.y" 15195a7dfde8Smrg { (yyval.uVal)=STYLE_NOFRAME; } 15205a7dfde8Smrg#line 1521 "winprefsyacc.c" 15216747b715Smrg break; 15226747b715Smrg 15235a7dfde8Smrg case 46: /* stylecombo: group1 */ 15245a7dfde8Smrg#line 210 "winprefsyacc.y" 15255a7dfde8Smrg { (yyval.uVal)=(yyvsp[0].uVal); } 15265a7dfde8Smrg#line 1527 "winprefsyacc.c" 15276747b715Smrg break; 15286747b715Smrg 15295a7dfde8Smrg case 47: /* stylecombo: group2 */ 15305a7dfde8Smrg#line 211 "winprefsyacc.y" 15315a7dfde8Smrg { (yyval.uVal)=(yyvsp[0].uVal); } 15325a7dfde8Smrg#line 1533 "winprefsyacc.c" 15336747b715Smrg break; 15346747b715Smrg 15355a7dfde8Smrg case 48: /* stylecombo: group1 group2 */ 15365a7dfde8Smrg#line 212 "winprefsyacc.y" 15375a7dfde8Smrg { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } 15385a7dfde8Smrg#line 1539 "winprefsyacc.c" 15396747b715Smrg break; 15406747b715Smrg 15415a7dfde8Smrg case 49: /* stylecombo: group2 group1 */ 15425a7dfde8Smrg#line 213 "winprefsyacc.y" 15435a7dfde8Smrg { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } 15445a7dfde8Smrg#line 1545 "winprefsyacc.c" 15456747b715Smrg break; 15466747b715Smrg 15475a7dfde8Smrg case 50: /* styleline: STRING stylecombo NEWLINE newline_or_nada */ 15485a7dfde8Smrg#line 216 "winprefsyacc.y" 15495a7dfde8Smrg { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); } 15505a7dfde8Smrg#line 1551 "winprefsyacc.c" 15516747b715Smrg break; 15526747b715Smrg 15535a7dfde8Smrg case 53: /* $@3: %empty */ 15545a7dfde8Smrg#line 223 "winprefsyacc.y" 15555a7dfde8Smrg {OpenStyles();} 15565a7dfde8Smrg#line 1557 "winprefsyacc.c" 15576747b715Smrg break; 15586747b715Smrg 15595a7dfde8Smrg case 54: /* styles: STYLES LB $@3 newline_or_nada stylelist RB */ 15605a7dfde8Smrg#line 223 "winprefsyacc.y" 15615a7dfde8Smrg {CloseStyles();} 15625a7dfde8Smrg#line 1563 "winprefsyacc.c" 15636747b715Smrg break; 15646747b715Smrg 15655a7dfde8Smrg case 55: /* atspot: %empty */ 15665a7dfde8Smrg#line 226 "winprefsyacc.y" 15675a7dfde8Smrg { (yyval.iVal)=AT_END; } 15685a7dfde8Smrg#line 1569 "winprefsyacc.c" 156905b261ecSmrg break; 157005b261ecSmrg 15715a7dfde8Smrg case 56: /* atspot: ATSTART */ 15725a7dfde8Smrg#line 227 "winprefsyacc.y" 15735a7dfde8Smrg { (yyval.iVal)=AT_START; } 15745a7dfde8Smrg#line 1575 "winprefsyacc.c" 157505b261ecSmrg break; 157605b261ecSmrg 15775a7dfde8Smrg case 57: /* atspot: ATEND */ 15785a7dfde8Smrg#line 228 "winprefsyacc.y" 15795a7dfde8Smrg { (yyval.iVal)=AT_END; } 15805a7dfde8Smrg#line 1581 "winprefsyacc.c" 158105b261ecSmrg break; 158205b261ecSmrg 15835a7dfde8Smrg case 58: /* sysmenuline: STRING STRING atspot NEWLINE newline_or_nada */ 15845a7dfde8Smrg#line 231 "winprefsyacc.y" 15855a7dfde8Smrg { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); } 15865a7dfde8Smrg#line 1587 "winprefsyacc.c" 158705b261ecSmrg break; 158805b261ecSmrg 15895a7dfde8Smrg case 61: /* $@4: %empty */ 15905a7dfde8Smrg#line 238 "winprefsyacc.y" 15915a7dfde8Smrg {OpenSysMenu();} 15925a7dfde8Smrg#line 1593 "winprefsyacc.c" 159305b261ecSmrg break; 159405b261ecSmrg 15955a7dfde8Smrg case 62: /* sysmenu: SYSMENU LB NEWLINE $@4 newline_or_nada sysmenulist RB */ 15965a7dfde8Smrg#line 238 "winprefsyacc.y" 15975a7dfde8Smrg {CloseSysMenu();} 15985a7dfde8Smrg#line 1599 "winprefsyacc.c" 159905b261ecSmrg break; 160005b261ecSmrg 16015a7dfde8Smrg case 63: /* forceexit: FORCEEXIT NEWLINE */ 16025a7dfde8Smrg#line 241 "winprefsyacc.y" 16035a7dfde8Smrg { pref.fForceExit = TRUE; } 16045a7dfde8Smrg#line 1605 "winprefsyacc.c" 16056747b715Smrg break; 16066747b715Smrg 16075a7dfde8Smrg case 64: /* silentexit: SILENTEXIT NEWLINE */ 16085a7dfde8Smrg#line 244 "winprefsyacc.y" 16095a7dfde8Smrg { pref.fSilentExit = TRUE; } 16105a7dfde8Smrg#line 1611 "winprefsyacc.c" 161105b261ecSmrg break; 161205b261ecSmrg 16135a7dfde8Smrg case 65: /* debug: "DEBUG" STRING NEWLINE */ 16145a7dfde8Smrg#line 247 "winprefsyacc.y" 16155a7dfde8Smrg { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 16165a7dfde8Smrg#line 1617 "winprefsyacc.c" 161705b261ecSmrg break; 161805b261ecSmrg 161905b261ecSmrg 16205a7dfde8Smrg#line 1621 "winprefsyacc.c" 16215a7dfde8Smrg 162205b261ecSmrg default: break; 162305b261ecSmrg } 16249ace9065Smrg /* User semantic actions sometimes alter yychar, and that requires 16259ace9065Smrg that yytoken be updated with the new translation. We take the 16269ace9065Smrg approach of translating immediately before every use of yytoken. 16279ace9065Smrg One alternative is translating here after every semantic action, 16289ace9065Smrg but that translation would be missed if the semantic action invokes 16299ace9065Smrg YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 16309ace9065Smrg if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 16319ace9065Smrg incorrect destructor might then be invoked immediately. In the 16329ace9065Smrg case of YYERROR or YYBACKUP, subsequent parser actions might lead 16339ace9065Smrg to an incorrect destructor call or verbose syntax error message 16349ace9065Smrg before the lookahead is translated. */ 16355a7dfde8Smrg YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); 163605b261ecSmrg 163705b261ecSmrg YYPOPSTACK (yylen); 163805b261ecSmrg yylen = 0; 163905b261ecSmrg 164005b261ecSmrg *++yyvsp = yyval; 164105b261ecSmrg 164235c4bbdfSmrg /* Now 'shift' the result of the reduction. Determine what state 164305b261ecSmrg that goes to, based on the state we popped back to and the rule 164405b261ecSmrg number reduced by. */ 16455a7dfde8Smrg { 16465a7dfde8Smrg const int yylhs = yyr1[yyn] - YYNTOKENS; 16475a7dfde8Smrg const int yyi = yypgoto[yylhs] + *yyssp; 16485a7dfde8Smrg yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp 16495a7dfde8Smrg ? yytable[yyi] 16505a7dfde8Smrg : yydefgoto[yylhs]); 16515a7dfde8Smrg } 165205b261ecSmrg 165305b261ecSmrg goto yynewstate; 165405b261ecSmrg 165505b261ecSmrg 165635c4bbdfSmrg/*--------------------------------------. 165735c4bbdfSmrg| yyerrlab -- here on detecting error. | 165835c4bbdfSmrg`--------------------------------------*/ 165905b261ecSmrgyyerrlab: 16609ace9065Smrg /* Make sure we have latest lookahead translation. See comments at 16619ace9065Smrg user semantic actions for why this is necessary. */ 16625a7dfde8Smrg yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); 166305b261ecSmrg /* If not already recovering from an error, report this error. */ 166405b261ecSmrg if (!yyerrstatus) 166505b261ecSmrg { 166605b261ecSmrg ++yynerrs; 166705b261ecSmrg yyerror (YY_("syntax error")); 166805b261ecSmrg } 166905b261ecSmrg 167005b261ecSmrg if (yyerrstatus == 3) 167105b261ecSmrg { 16724642e01fSmrg /* If just tried and failed to reuse lookahead token after an 167335c4bbdfSmrg error, discard it. */ 167405b261ecSmrg 167505b261ecSmrg if (yychar <= YYEOF) 167635c4bbdfSmrg { 167735c4bbdfSmrg /* Return failure if at end of input. */ 167835c4bbdfSmrg if (yychar == YYEOF) 167935c4bbdfSmrg YYABORT; 168035c4bbdfSmrg } 168105b261ecSmrg else 168235c4bbdfSmrg { 168335c4bbdfSmrg yydestruct ("Error: discarding", 168435c4bbdfSmrg yytoken, &yylval); 168535c4bbdfSmrg yychar = YYEMPTY; 168635c4bbdfSmrg } 168705b261ecSmrg } 168805b261ecSmrg 16894642e01fSmrg /* Else will try to reuse lookahead token after shifting the error 169005b261ecSmrg token. */ 169105b261ecSmrg goto yyerrlab1; 169205b261ecSmrg 169305b261ecSmrg 169405b261ecSmrg/*---------------------------------------------------. 169505b261ecSmrg| yyerrorlab -- error raised explicitly by YYERROR. | 169605b261ecSmrg`---------------------------------------------------*/ 169705b261ecSmrgyyerrorlab: 16985a7dfde8Smrg /* Pacify compilers when the user code never invokes YYERROR and the 16995a7dfde8Smrg label yyerrorlab therefore never appears in user code. */ 17005a7dfde8Smrg if (0) 17015a7dfde8Smrg YYERROR; 170205b261ecSmrg 170335c4bbdfSmrg /* Do not reclaim the symbols of the rule whose action triggered 170405b261ecSmrg this YYERROR. */ 170505b261ecSmrg YYPOPSTACK (yylen); 170605b261ecSmrg yylen = 0; 170705b261ecSmrg YY_STACK_PRINT (yyss, yyssp); 170805b261ecSmrg yystate = *yyssp; 170905b261ecSmrg goto yyerrlab1; 171005b261ecSmrg 171105b261ecSmrg 171205b261ecSmrg/*-------------------------------------------------------------. 171305b261ecSmrg| yyerrlab1 -- common code for both syntax error and YYERROR. | 171405b261ecSmrg`-------------------------------------------------------------*/ 171505b261ecSmrgyyerrlab1: 171635c4bbdfSmrg yyerrstatus = 3; /* Each real token shifted decrements this. */ 171705b261ecSmrg 17185a7dfde8Smrg /* Pop stack until we find a state that shifts the error token. */ 171905b261ecSmrg for (;;) 172005b261ecSmrg { 172105b261ecSmrg yyn = yypact[yystate]; 17229ace9065Smrg if (!yypact_value_is_default (yyn)) 172335c4bbdfSmrg { 17245a7dfde8Smrg yyn += YYSYMBOL_YYerror; 17255a7dfde8Smrg if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) 172635c4bbdfSmrg { 172735c4bbdfSmrg yyn = yytable[yyn]; 172835c4bbdfSmrg if (0 < yyn) 172935c4bbdfSmrg break; 173035c4bbdfSmrg } 173135c4bbdfSmrg } 173205b261ecSmrg 173305b261ecSmrg /* Pop the current state because it cannot handle the error token. */ 173405b261ecSmrg if (yyssp == yyss) 173535c4bbdfSmrg YYABORT; 173605b261ecSmrg 173705b261ecSmrg 173805b261ecSmrg yydestruct ("Error: popping", 17395a7dfde8Smrg YY_ACCESSING_SYMBOL (yystate), yyvsp); 174005b261ecSmrg YYPOPSTACK (1); 174105b261ecSmrg yystate = *yyssp; 174205b261ecSmrg YY_STACK_PRINT (yyss, yyssp); 174305b261ecSmrg } 174405b261ecSmrg 174535c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 174605b261ecSmrg *++yyvsp = yylval; 174735c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_END 174805b261ecSmrg 174905b261ecSmrg 175005b261ecSmrg /* Shift the error token. */ 17515a7dfde8Smrg YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); 175205b261ecSmrg 175305b261ecSmrg yystate = yyn; 175405b261ecSmrg goto yynewstate; 175505b261ecSmrg 175605b261ecSmrg 175705b261ecSmrg/*-------------------------------------. 175805b261ecSmrg| yyacceptlab -- YYACCEPT comes here. | 175905b261ecSmrg`-------------------------------------*/ 176005b261ecSmrgyyacceptlab: 176105b261ecSmrg yyresult = 0; 176205b261ecSmrg goto yyreturn; 176305b261ecSmrg 17645a7dfde8Smrg 176505b261ecSmrg/*-----------------------------------. 176605b261ecSmrg| yyabortlab -- YYABORT comes here. | 176705b261ecSmrg`-----------------------------------*/ 176805b261ecSmrgyyabortlab: 176905b261ecSmrg yyresult = 1; 177005b261ecSmrg goto yyreturn; 177105b261ecSmrg 17725a7dfde8Smrg 17735a7dfde8Smrg#if !defined yyoverflow 177405b261ecSmrg/*-------------------------------------------------. 177505b261ecSmrg| yyexhaustedlab -- memory exhaustion comes here. | 177605b261ecSmrg`-------------------------------------------------*/ 177705b261ecSmrgyyexhaustedlab: 177805b261ecSmrg yyerror (YY_("memory exhausted")); 177905b261ecSmrg yyresult = 2; 17805a7dfde8Smrg goto yyreturn; 178105b261ecSmrg#endif 178205b261ecSmrg 17835a7dfde8Smrg 17845a7dfde8Smrg/*-------------------------------------------------------. 17855a7dfde8Smrg| yyreturn -- parsing is finished, clean up and return. | 17865a7dfde8Smrg`-------------------------------------------------------*/ 178705b261ecSmrgyyreturn: 17884642e01fSmrg if (yychar != YYEMPTY) 17899ace9065Smrg { 17909ace9065Smrg /* Make sure we have latest lookahead translation. See comments at 17919ace9065Smrg user semantic actions for why this is necessary. */ 17929ace9065Smrg yytoken = YYTRANSLATE (yychar); 17939ace9065Smrg yydestruct ("Cleanup: discarding lookahead", 17949ace9065Smrg yytoken, &yylval); 17959ace9065Smrg } 179635c4bbdfSmrg /* Do not reclaim the symbols of the rule whose action triggered 179705b261ecSmrg this YYABORT or YYACCEPT. */ 179805b261ecSmrg YYPOPSTACK (yylen); 179905b261ecSmrg YY_STACK_PRINT (yyss, yyssp); 180005b261ecSmrg while (yyssp != yyss) 180105b261ecSmrg { 180205b261ecSmrg yydestruct ("Cleanup: popping", 18035a7dfde8Smrg YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); 180405b261ecSmrg YYPOPSTACK (1); 180505b261ecSmrg } 180605b261ecSmrg#ifndef yyoverflow 180705b261ecSmrg if (yyss != yyssa) 180805b261ecSmrg YYSTACK_FREE (yyss); 180905b261ecSmrg#endif 18105a7dfde8Smrg 181135c4bbdfSmrg return yyresult; 181205b261ecSmrg} 18135a7dfde8Smrg 18145a7dfde8Smrg#line 251 "winprefsyacc.y" 181505b261ecSmrg 181605b261ecSmrg/* 181705b261ecSmrg * Errors in parsing abort and print log messages 181805b261ecSmrg */ 181905b261ecSmrgstatic int 182035c4bbdfSmrgyyerror (const char *s) 182105b261ecSmrg{ 182205b261ecSmrg ErrorF("LoadPreferences: %s line %d\n", s, yylineno); 182305b261ecSmrg return 1; 182405b261ecSmrg} 182505b261ecSmrg 182605b261ecSmrg/* Miscellaneous functions to store TOKENs into the structure */ 182705b261ecSmrgstatic void 182805b261ecSmrgSetIconDirectory (char *path) 182905b261ecSmrg{ 183005b261ecSmrg strncpy (pref.iconDirectory, path, PATH_MAX); 183105b261ecSmrg pref.iconDirectory[PATH_MAX] = 0; 183205b261ecSmrg} 183305b261ecSmrg 183405b261ecSmrgstatic void 183505b261ecSmrgSetDefaultIcon (char *fname) 183605b261ecSmrg{ 183705b261ecSmrg strncpy (pref.defaultIconName, fname, NAME_MAX); 183805b261ecSmrg pref.defaultIconName[NAME_MAX] = 0; 183905b261ecSmrg} 184005b261ecSmrg 184105b261ecSmrgstatic void 184205b261ecSmrgSetTrayIcon (char *fname) 184305b261ecSmrg{ 184405b261ecSmrg strncpy (pref.trayIconName, fname, NAME_MAX); 184505b261ecSmrg pref.trayIconName[NAME_MAX] = 0; 184605b261ecSmrg} 184705b261ecSmrg 184805b261ecSmrgstatic void 184935c4bbdfSmrgSetRootMenu (char *menuname) 185005b261ecSmrg{ 185135c4bbdfSmrg strncpy (pref.rootMenuName, menuname, MENU_MAX); 185205b261ecSmrg pref.rootMenuName[MENU_MAX] = 0; 185305b261ecSmrg} 185405b261ecSmrg 185505b261ecSmrgstatic void 185635c4bbdfSmrgSetDefaultSysMenu (char *menuname, int pos) 185705b261ecSmrg{ 185835c4bbdfSmrg strncpy (pref.defaultSysMenuName, menuname, MENU_MAX); 185905b261ecSmrg pref.defaultSysMenuName[MENU_MAX] = 0; 186005b261ecSmrg pref.defaultSysMenuPos = pos; 186105b261ecSmrg} 186205b261ecSmrg 186305b261ecSmrgstatic void 186405b261ecSmrgOpenMenu (char *menuname) 186505b261ecSmrg{ 186605b261ecSmrg if (menu.menuItem) free(menu.menuItem); 186705b261ecSmrg menu.menuItem = NULL; 186805b261ecSmrg strncpy(menu.menuName, menuname, MENU_MAX); 186905b261ecSmrg menu.menuName[MENU_MAX] = 0; 187005b261ecSmrg menu.menuItems = 0; 187105b261ecSmrg} 187205b261ecSmrg 187305b261ecSmrgstatic void 187435c4bbdfSmrgAddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param) 187505b261ecSmrg{ 187605b261ecSmrg if (menu.menuItem==NULL) 187735c4bbdfSmrg menu.menuItem = malloc(sizeof(MENUITEM)); 187805b261ecSmrg else 187935c4bbdfSmrg menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1)); 188005b261ecSmrg 188105b261ecSmrg strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX); 188205b261ecSmrg menu.menuItem[menu.menuItems].text[MENU_MAX] = 0; 188305b261ecSmrg 188405b261ecSmrg menu.menuItem[menu.menuItems].cmd = cmd; 188505b261ecSmrg 188605b261ecSmrg strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX); 188705b261ecSmrg menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0; 188805b261ecSmrg 188905b261ecSmrg menu.menuItem[menu.menuItems].commandID = 0; 189005b261ecSmrg 189105b261ecSmrg menu.menuItems++; 189205b261ecSmrg} 189305b261ecSmrg 189405b261ecSmrgstatic void 189505b261ecSmrgCloseMenu (void) 189605b261ecSmrg{ 189705b261ecSmrg if (menu.menuItem==NULL || menu.menuItems==0) 189805b261ecSmrg { 189905b261ecSmrg ErrorF("LoadPreferences: Empty menu detected\n"); 190005b261ecSmrg return; 190105b261ecSmrg } 190205b261ecSmrg 190305b261ecSmrg if (pref.menuItems) 190435c4bbdfSmrg pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED)); 190505b261ecSmrg else 190635c4bbdfSmrg pref.menu = malloc (sizeof(MENUPARSED)); 190705b261ecSmrg 190805b261ecSmrg memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED)); 190905b261ecSmrg pref.menuItems++; 191005b261ecSmrg 191105b261ecSmrg memset (&menu, 0, sizeof(MENUPARSED)); 191205b261ecSmrg} 191305b261ecSmrg 191405b261ecSmrgstatic void 191505b261ecSmrgOpenIcons (void) 191605b261ecSmrg{ 191705b261ecSmrg if (pref.icon != NULL) { 191805b261ecSmrg ErrorF("LoadPreferences: Redefining icon mappings\n"); 191905b261ecSmrg free(pref.icon); 192005b261ecSmrg pref.icon = NULL; 192105b261ecSmrg } 192205b261ecSmrg pref.iconItems = 0; 192305b261ecSmrg} 192405b261ecSmrg 192505b261ecSmrgstatic void 192605b261ecSmrgAddIconLine (char *matchstr, char *iconfile) 192705b261ecSmrg{ 192805b261ecSmrg if (pref.icon==NULL) 192935c4bbdfSmrg pref.icon = malloc(sizeof(ICONITEM)); 193005b261ecSmrg else 193135c4bbdfSmrg pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1)); 193205b261ecSmrg 193305b261ecSmrg strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX); 193405b261ecSmrg pref.icon[pref.iconItems].match[MENU_MAX] = 0; 193505b261ecSmrg 193605b261ecSmrg strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1); 193705b261ecSmrg pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0; 193805b261ecSmrg 193905b261ecSmrg pref.icon[pref.iconItems].hicon = 0; 194005b261ecSmrg 194105b261ecSmrg pref.iconItems++; 194205b261ecSmrg} 194305b261ecSmrg 194405b261ecSmrgstatic void 194505b261ecSmrgCloseIcons (void) 194605b261ecSmrg{ 194705b261ecSmrg} 194805b261ecSmrg 19496747b715Smrgstatic void 19506747b715SmrgOpenStyles (void) 19516747b715Smrg{ 19526747b715Smrg if (pref.style != NULL) { 19536747b715Smrg ErrorF("LoadPreferences: Redefining window style\n"); 19546747b715Smrg free(pref.style); 19556747b715Smrg pref.style = NULL; 19566747b715Smrg } 19576747b715Smrg pref.styleItems = 0; 19586747b715Smrg} 19596747b715Smrg 19606747b715Smrgstatic void 19616747b715SmrgAddStyleLine (char *matchstr, unsigned long style) 19626747b715Smrg{ 19636747b715Smrg if (pref.style==NULL) 196435c4bbdfSmrg pref.style = malloc(sizeof(STYLEITEM)); 19656747b715Smrg else 196635c4bbdfSmrg pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); 19676747b715Smrg 19686747b715Smrg strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX); 19696747b715Smrg pref.style[pref.styleItems].match[MENU_MAX] = 0; 19706747b715Smrg 19716747b715Smrg pref.style[pref.styleItems].type = style; 19726747b715Smrg 19736747b715Smrg pref.styleItems++; 19746747b715Smrg} 19756747b715Smrg 19766747b715Smrgstatic void 19776747b715SmrgCloseStyles (void) 19786747b715Smrg{ 19796747b715Smrg} 19806747b715Smrg 198105b261ecSmrgstatic void 198205b261ecSmrgOpenSysMenu (void) 198305b261ecSmrg{ 198405b261ecSmrg if (pref.sysMenu != NULL) { 198505b261ecSmrg ErrorF("LoadPreferences: Redefining system menu\n"); 198605b261ecSmrg free(pref.sysMenu); 198705b261ecSmrg pref.sysMenu = NULL; 198805b261ecSmrg } 198905b261ecSmrg pref.sysMenuItems = 0; 199005b261ecSmrg} 199105b261ecSmrg 199205b261ecSmrgstatic void 199305b261ecSmrgAddSysMenuLine (char *matchstr, char *menuname, int pos) 199405b261ecSmrg{ 199505b261ecSmrg if (pref.sysMenu==NULL) 199635c4bbdfSmrg pref.sysMenu = malloc(sizeof(SYSMENUITEM)); 199705b261ecSmrg else 199835c4bbdfSmrg pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1)); 199905b261ecSmrg 200005b261ecSmrg strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX); 200105b261ecSmrg pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0; 200205b261ecSmrg 200305b261ecSmrg strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX); 200405b261ecSmrg pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0; 200505b261ecSmrg 200605b261ecSmrg pref.sysMenu[pref.sysMenuItems].menuPos = pos; 200705b261ecSmrg 200805b261ecSmrg pref.sysMenuItems++; 200905b261ecSmrg} 201005b261ecSmrg 201105b261ecSmrgstatic void 201205b261ecSmrgCloseSysMenu (void) 201305b261ecSmrg{ 201405b261ecSmrg} 201505b261ecSmrg 2016