1c82838c1Smrg/* A Bison parser, made by GNU Bison 3.8.2. */ 205b261ecSmrg 39ace9065Smrg/* Bison implementation for Yacc-like parsers in C 435c4bbdfSmrg 5dc61d50dSmrg Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 19c82838c1Smrg along with this program. If not, see <https://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 37dc61d50dSmrg/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, 38dc61d50dSmrg especially those whose name start with YY_ or yy_. They are 39dc61d50dSmrg private implementation details that can be changed or removed. */ 40dc61d50dSmrg 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 48dc61d50dSmrg/* Identify Bison output, and Bison version. */ 49c82838c1Smrg#define YYBISON 30802 5005b261ecSmrg 51dc61d50dSmrg/* Bison version string. */ 52c82838c1Smrg#define YYBISON_VERSION "3.8.2" 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 159dc61d50dSmrg#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 194dc61d50dSmrg/* Token kinds. */ 1954642e01fSmrg#ifndef YYTOKENTYPE 1964642e01fSmrg# define YYTOKENTYPE 19735c4bbdfSmrg enum yytokentype 19835c4bbdfSmrg { 199dc61d50dSmrg YYEMPTY = -2, 200dc61d50dSmrg YYEOF = 0, /* "end of file" */ 201dc61d50dSmrg YYerror = 256, /* error */ 202dc61d50dSmrg YYUNDEF = 257, /* "invalid token" */ 203dc61d50dSmrg NEWLINE = 258, /* NEWLINE */ 204dc61d50dSmrg MENU = 259, /* MENU */ 205dc61d50dSmrg LB = 260, /* LB */ 206dc61d50dSmrg RB = 261, /* RB */ 207dc61d50dSmrg ICONDIRECTORY = 262, /* ICONDIRECTORY */ 208dc61d50dSmrg DEFAULTICON = 263, /* DEFAULTICON */ 209dc61d50dSmrg ICONS = 264, /* ICONS */ 210dc61d50dSmrg STYLES = 265, /* STYLES */ 211dc61d50dSmrg TOPMOST = 266, /* TOPMOST */ 212dc61d50dSmrg MAXIMIZE = 267, /* MAXIMIZE */ 213dc61d50dSmrg MINIMIZE = 268, /* MINIMIZE */ 214dc61d50dSmrg BOTTOM = 269, /* BOTTOM */ 215dc61d50dSmrg NOTITLE = 270, /* NOTITLE */ 216dc61d50dSmrg OUTLINE = 271, /* OUTLINE */ 217dc61d50dSmrg NOFRAME = 272, /* NOFRAME */ 218dc61d50dSmrg DEFAULTSYSMENU = 273, /* DEFAULTSYSMENU */ 219dc61d50dSmrg SYSMENU = 274, /* SYSMENU */ 220dc61d50dSmrg ROOTMENU = 275, /* ROOTMENU */ 221dc61d50dSmrg SEPARATOR = 276, /* SEPARATOR */ 222dc61d50dSmrg ATSTART = 277, /* ATSTART */ 223dc61d50dSmrg ATEND = 278, /* ATEND */ 224dc61d50dSmrg EXEC = 279, /* EXEC */ 225dc61d50dSmrg ALWAYSONTOP = 280, /* ALWAYSONTOP */ 226dc61d50dSmrg DEBUGOUTPUT = 281, /* "DEBUG" */ 227dc61d50dSmrg RELOAD = 282, /* RELOAD */ 228dc61d50dSmrg TRAYICON = 283, /* TRAYICON */ 229dc61d50dSmrg FORCEEXIT = 284, /* FORCEEXIT */ 230dc61d50dSmrg SILENTEXIT = 285, /* SILENTEXIT */ 231dc61d50dSmrg STRING = 286 /* STRING */ 23235c4bbdfSmrg }; 233dc61d50dSmrg typedef enum yytokentype yytoken_kind_t; 2344642e01fSmrg#endif 235dc61d50dSmrg/* Token kinds. */ 236dc61d50dSmrg#define YYEMPTY -2 237dc61d50dSmrg#define YYEOF 0 238dc61d50dSmrg#define YYerror 256 239dc61d50dSmrg#define YYUNDEF 257 2404642e01fSmrg#define NEWLINE 258 2414642e01fSmrg#define MENU 259 2424642e01fSmrg#define LB 260 2434642e01fSmrg#define RB 261 2444642e01fSmrg#define ICONDIRECTORY 262 2454642e01fSmrg#define DEFAULTICON 263 2464642e01fSmrg#define ICONS 264 2476747b715Smrg#define STYLES 265 2486747b715Smrg#define TOPMOST 266 2496747b715Smrg#define MAXIMIZE 267 2506747b715Smrg#define MINIMIZE 268 2516747b715Smrg#define BOTTOM 269 2526747b715Smrg#define NOTITLE 270 2536747b715Smrg#define OUTLINE 271 2546747b715Smrg#define NOFRAME 272 2556747b715Smrg#define DEFAULTSYSMENU 273 2566747b715Smrg#define SYSMENU 274 2576747b715Smrg#define ROOTMENU 275 2586747b715Smrg#define SEPARATOR 276 2596747b715Smrg#define ATSTART 277 2606747b715Smrg#define ATEND 278 2616747b715Smrg#define EXEC 279 2626747b715Smrg#define ALWAYSONTOP 280 2636747b715Smrg#define DEBUGOUTPUT 281 2646747b715Smrg#define RELOAD 282 2656747b715Smrg#define TRAYICON 283 2666747b715Smrg#define FORCEEXIT 284 2676747b715Smrg#define SILENTEXIT 285 2686747b715Smrg#define STRING 286 2694642e01fSmrg 27035c4bbdfSmrg/* Value type. */ 27105b261ecSmrg#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 27235c4bbdfSmrgunion YYSTYPE 27335c4bbdfSmrg{ 2745a7dfde8Smrg#line 90 "winprefsyacc.y" 2754642e01fSmrg 27605b261ecSmrg char *sVal; 2776747b715Smrg unsigned long uVal; 27805b261ecSmrg int iVal; 2794642e01fSmrg 280dc61d50dSmrg#line 281 "winprefsyacc.c" 2814642e01fSmrg 2825a7dfde8Smrg}; 28335c4bbdfSmrgtypedef union YYSTYPE YYSTYPE; 2844642e01fSmrg# define YYSTYPE_IS_TRIVIAL 1 28505b261ecSmrg# define YYSTYPE_IS_DECLARED 1 28605b261ecSmrg#endif 28705b261ecSmrg 28805b261ecSmrg 28935c4bbdfSmrgextern YYSTYPE yylval; 29035c4bbdfSmrg 291c82838c1Smrg 29235c4bbdfSmrgint yyparse (void); 29305b261ecSmrg 294c82838c1Smrg 29535c4bbdfSmrg#endif /* !YY_YY_WINPREFSYACC_H_INCLUDED */ 296dc61d50dSmrg/* Symbol kind. */ 297dc61d50dSmrgenum yysymbol_kind_t 298dc61d50dSmrg{ 299dc61d50dSmrg YYSYMBOL_YYEMPTY = -2, 300dc61d50dSmrg YYSYMBOL_YYEOF = 0, /* "end of file" */ 301dc61d50dSmrg YYSYMBOL_YYerror = 1, /* error */ 302dc61d50dSmrg YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ 303dc61d50dSmrg YYSYMBOL_NEWLINE = 3, /* NEWLINE */ 304dc61d50dSmrg YYSYMBOL_MENU = 4, /* MENU */ 305dc61d50dSmrg YYSYMBOL_LB = 5, /* LB */ 306dc61d50dSmrg YYSYMBOL_RB = 6, /* RB */ 307dc61d50dSmrg YYSYMBOL_ICONDIRECTORY = 7, /* ICONDIRECTORY */ 308dc61d50dSmrg YYSYMBOL_DEFAULTICON = 8, /* DEFAULTICON */ 309dc61d50dSmrg YYSYMBOL_ICONS = 9, /* ICONS */ 310dc61d50dSmrg YYSYMBOL_STYLES = 10, /* STYLES */ 311dc61d50dSmrg YYSYMBOL_TOPMOST = 11, /* TOPMOST */ 312dc61d50dSmrg YYSYMBOL_MAXIMIZE = 12, /* MAXIMIZE */ 313dc61d50dSmrg YYSYMBOL_MINIMIZE = 13, /* MINIMIZE */ 314dc61d50dSmrg YYSYMBOL_BOTTOM = 14, /* BOTTOM */ 315dc61d50dSmrg YYSYMBOL_NOTITLE = 15, /* NOTITLE */ 316dc61d50dSmrg YYSYMBOL_OUTLINE = 16, /* OUTLINE */ 317dc61d50dSmrg YYSYMBOL_NOFRAME = 17, /* NOFRAME */ 318dc61d50dSmrg YYSYMBOL_DEFAULTSYSMENU = 18, /* DEFAULTSYSMENU */ 319dc61d50dSmrg YYSYMBOL_SYSMENU = 19, /* SYSMENU */ 320dc61d50dSmrg YYSYMBOL_ROOTMENU = 20, /* ROOTMENU */ 321dc61d50dSmrg YYSYMBOL_SEPARATOR = 21, /* SEPARATOR */ 322dc61d50dSmrg YYSYMBOL_ATSTART = 22, /* ATSTART */ 323dc61d50dSmrg YYSYMBOL_ATEND = 23, /* ATEND */ 324dc61d50dSmrg YYSYMBOL_EXEC = 24, /* EXEC */ 325dc61d50dSmrg YYSYMBOL_ALWAYSONTOP = 25, /* ALWAYSONTOP */ 326dc61d50dSmrg YYSYMBOL_DEBUGOUTPUT = 26, /* "DEBUG" */ 327dc61d50dSmrg YYSYMBOL_RELOAD = 27, /* RELOAD */ 328dc61d50dSmrg YYSYMBOL_TRAYICON = 28, /* TRAYICON */ 329dc61d50dSmrg YYSYMBOL_FORCEEXIT = 29, /* FORCEEXIT */ 330dc61d50dSmrg YYSYMBOL_SILENTEXIT = 30, /* SILENTEXIT */ 331dc61d50dSmrg YYSYMBOL_STRING = 31, /* STRING */ 332dc61d50dSmrg YYSYMBOL_YYACCEPT = 32, /* $accept */ 333dc61d50dSmrg YYSYMBOL_input = 33, /* input */ 334dc61d50dSmrg YYSYMBOL_line = 34, /* line */ 335dc61d50dSmrg YYSYMBOL_newline_or_nada = 35, /* newline_or_nada */ 336dc61d50dSmrg YYSYMBOL_command = 36, /* command */ 337dc61d50dSmrg YYSYMBOL_trayicon = 37, /* trayicon */ 338dc61d50dSmrg YYSYMBOL_rootmenu = 38, /* rootmenu */ 339dc61d50dSmrg YYSYMBOL_defaultsysmenu = 39, /* defaultsysmenu */ 340dc61d50dSmrg YYSYMBOL_defaulticon = 40, /* defaulticon */ 341dc61d50dSmrg YYSYMBOL_icondirectory = 41, /* icondirectory */ 342dc61d50dSmrg YYSYMBOL_menuline = 42, /* menuline */ 343dc61d50dSmrg YYSYMBOL_menulist = 43, /* menulist */ 344dc61d50dSmrg YYSYMBOL_menu = 44, /* menu */ 345dc61d50dSmrg YYSYMBOL_45_1 = 45, /* $@1 */ 346dc61d50dSmrg YYSYMBOL_iconline = 46, /* iconline */ 347dc61d50dSmrg YYSYMBOL_iconlist = 47, /* iconlist */ 348dc61d50dSmrg YYSYMBOL_icons = 48, /* icons */ 349dc61d50dSmrg YYSYMBOL_49_2 = 49, /* $@2 */ 350dc61d50dSmrg YYSYMBOL_group1 = 50, /* group1 */ 351dc61d50dSmrg YYSYMBOL_group2 = 51, /* group2 */ 352dc61d50dSmrg YYSYMBOL_stylecombo = 52, /* stylecombo */ 353dc61d50dSmrg YYSYMBOL_styleline = 53, /* styleline */ 354dc61d50dSmrg YYSYMBOL_stylelist = 54, /* stylelist */ 355dc61d50dSmrg YYSYMBOL_styles = 55, /* styles */ 356dc61d50dSmrg YYSYMBOL_56_3 = 56, /* $@3 */ 357dc61d50dSmrg YYSYMBOL_atspot = 57, /* atspot */ 358dc61d50dSmrg YYSYMBOL_sysmenuline = 58, /* sysmenuline */ 359dc61d50dSmrg YYSYMBOL_sysmenulist = 59, /* sysmenulist */ 360dc61d50dSmrg YYSYMBOL_sysmenu = 60, /* sysmenu */ 361dc61d50dSmrg YYSYMBOL_61_4 = 61, /* $@4 */ 362dc61d50dSmrg YYSYMBOL_forceexit = 62, /* forceexit */ 363dc61d50dSmrg YYSYMBOL_silentexit = 63, /* silentexit */ 364dc61d50dSmrg YYSYMBOL_debug = 64 /* debug */ 365dc61d50dSmrg}; 366dc61d50dSmrgtypedef enum yysymbol_kind_t yysymbol_kind_t; 367dc61d50dSmrg 36835c4bbdfSmrg 36905b261ecSmrg 37005b261ecSmrg 37105b261ecSmrg#ifdef short 37205b261ecSmrg# undef short 37305b261ecSmrg#endif 37405b261ecSmrg 3755a7dfde8Smrg/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure 3765a7dfde8Smrg <limits.h> and (if available) <stdint.h> are included 3775a7dfde8Smrg so that the code can choose integer types of a good width. */ 3785a7dfde8Smrg 3795a7dfde8Smrg#ifndef __PTRDIFF_MAX__ 3805a7dfde8Smrg# include <limits.h> /* INFRINGES ON USER NAME SPACE */ 3815a7dfde8Smrg# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ 3825a7dfde8Smrg# include <stdint.h> /* INFRINGES ON USER NAME SPACE */ 3835a7dfde8Smrg# define YY_STDINT_H 3845a7dfde8Smrg# endif 38505b261ecSmrg#endif 38605b261ecSmrg 3875a7dfde8Smrg/* Narrow types that promote to a signed type and that can represent a 3885a7dfde8Smrg signed or unsigned integer of at least N bits. In tables they can 3895a7dfde8Smrg save space and decrease cache pressure. Promoting to a signed type 3905a7dfde8Smrg helps avoid bugs in integer arithmetic. */ 3915a7dfde8Smrg 3925a7dfde8Smrg#ifdef __INT_LEAST8_MAX__ 3935a7dfde8Smrgtypedef __INT_LEAST8_TYPE__ yytype_int8; 3945a7dfde8Smrg#elif defined YY_STDINT_H 3955a7dfde8Smrgtypedef int_least8_t yytype_int8; 39605b261ecSmrg#else 39735c4bbdfSmrgtypedef signed char yytype_int8; 39805b261ecSmrg#endif 39905b261ecSmrg 4005a7dfde8Smrg#ifdef __INT_LEAST16_MAX__ 4015a7dfde8Smrgtypedef __INT_LEAST16_TYPE__ yytype_int16; 4025a7dfde8Smrg#elif defined YY_STDINT_H 4035a7dfde8Smrgtypedef int_least16_t yytype_int16; 40405b261ecSmrg#else 4055a7dfde8Smrgtypedef short yytype_int16; 40605b261ecSmrg#endif 40705b261ecSmrg 408dc61d50dSmrg/* Work around bug in HP-UX 11.23, which defines these macros 409dc61d50dSmrg incorrectly for preprocessor constants. This workaround can likely 410dc61d50dSmrg be removed in 2023, as HPE has promised support for HP-UX 11.23 411dc61d50dSmrg (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of 412dc61d50dSmrg <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */ 413dc61d50dSmrg#ifdef __hpux 414dc61d50dSmrg# undef UINT_LEAST8_MAX 415dc61d50dSmrg# undef UINT_LEAST16_MAX 416dc61d50dSmrg# define UINT_LEAST8_MAX 255 417dc61d50dSmrg# define UINT_LEAST16_MAX 65535 418dc61d50dSmrg#endif 419dc61d50dSmrg 4205a7dfde8Smrg#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ 4215a7dfde8Smrgtypedef __UINT_LEAST8_TYPE__ yytype_uint8; 4225a7dfde8Smrg#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ 4235a7dfde8Smrg && UINT_LEAST8_MAX <= INT_MAX) 4245a7dfde8Smrgtypedef uint_least8_t yytype_uint8; 4255a7dfde8Smrg#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX 4265a7dfde8Smrgtypedef unsigned char yytype_uint8; 42705b261ecSmrg#else 4285a7dfde8Smrgtypedef short yytype_uint8; 4295a7dfde8Smrg#endif 4305a7dfde8Smrg 4315a7dfde8Smrg#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ 4325a7dfde8Smrgtypedef __UINT_LEAST16_TYPE__ yytype_uint16; 4335a7dfde8Smrg#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ 4345a7dfde8Smrg && UINT_LEAST16_MAX <= INT_MAX) 4355a7dfde8Smrgtypedef uint_least16_t yytype_uint16; 4365a7dfde8Smrg#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX 4375a7dfde8Smrgtypedef unsigned short yytype_uint16; 4385a7dfde8Smrg#else 4395a7dfde8Smrgtypedef int yytype_uint16; 4405a7dfde8Smrg#endif 4415a7dfde8Smrg 4425a7dfde8Smrg#ifndef YYPTRDIFF_T 4435a7dfde8Smrg# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ 4445a7dfde8Smrg# define YYPTRDIFF_T __PTRDIFF_TYPE__ 4455a7dfde8Smrg# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ 4465a7dfde8Smrg# elif defined PTRDIFF_MAX 4475a7dfde8Smrg# ifndef ptrdiff_t 4485a7dfde8Smrg# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 4495a7dfde8Smrg# endif 4505a7dfde8Smrg# define YYPTRDIFF_T ptrdiff_t 4515a7dfde8Smrg# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX 4525a7dfde8Smrg# else 4535a7dfde8Smrg# define YYPTRDIFF_T long 4545a7dfde8Smrg# define YYPTRDIFF_MAXIMUM LONG_MAX 4555a7dfde8Smrg# endif 45605b261ecSmrg#endif 45705b261ecSmrg 45805b261ecSmrg#ifndef YYSIZE_T 45905b261ecSmrg# ifdef __SIZE_TYPE__ 46005b261ecSmrg# define YYSIZE_T __SIZE_TYPE__ 46105b261ecSmrg# elif defined size_t 46205b261ecSmrg# define YYSIZE_T size_t 4635a7dfde8Smrg# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ 46405b261ecSmrg# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 46505b261ecSmrg# define YYSIZE_T size_t 46605b261ecSmrg# else 46725da500fSmrg# define YYSIZE_T unsigned 46805b261ecSmrg# endif 46905b261ecSmrg#endif 47005b261ecSmrg 4715a7dfde8Smrg#define YYSIZE_MAXIMUM \ 4725a7dfde8Smrg YY_CAST (YYPTRDIFF_T, \ 4735a7dfde8Smrg (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ 4745a7dfde8Smrg ? YYPTRDIFF_MAXIMUM \ 4755a7dfde8Smrg : YY_CAST (YYSIZE_T, -1))) 4765a7dfde8Smrg 4775a7dfde8Smrg#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) 4785a7dfde8Smrg 479dc61d50dSmrg 4805a7dfde8Smrg/* Stored state numbers (used for stacks). */ 4815a7dfde8Smrgtypedef yytype_int8 yy_state_t; 4825a7dfde8Smrg 4835a7dfde8Smrg/* State numbers in computations. */ 4845a7dfde8Smrgtypedef int yy_state_fast_t; 48505b261ecSmrg 48605b261ecSmrg#ifndef YY_ 4876747b715Smrg# if defined YYENABLE_NLS && YYENABLE_NLS 48805b261ecSmrg# if ENABLE_NLS 48905b261ecSmrg# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 49035c4bbdfSmrg# define YY_(Msgid) dgettext ("bison-runtime", Msgid) 49105b261ecSmrg# endif 49205b261ecSmrg# endif 49305b261ecSmrg# ifndef YY_ 49435c4bbdfSmrg# define YY_(Msgid) Msgid 49535c4bbdfSmrg# endif 49635c4bbdfSmrg#endif 49735c4bbdfSmrg 498dc61d50dSmrg 49935c4bbdfSmrg#ifndef YY_ATTRIBUTE_PURE 5005a7dfde8Smrg# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) 5015a7dfde8Smrg# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) 5025a7dfde8Smrg# else 5035a7dfde8Smrg# define YY_ATTRIBUTE_PURE 5045a7dfde8Smrg# endif 50535c4bbdfSmrg#endif 50635c4bbdfSmrg 50735c4bbdfSmrg#ifndef YY_ATTRIBUTE_UNUSED 5085a7dfde8Smrg# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) 5095a7dfde8Smrg# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) 51035c4bbdfSmrg# else 5115a7dfde8Smrg# define YY_ATTRIBUTE_UNUSED 51205b261ecSmrg# endif 51305b261ecSmrg#endif 51405b261ecSmrg 51505b261ecSmrg/* Suppress unused-variable warnings by "using" E. */ 51605b261ecSmrg#if ! defined lint || defined __GNUC__ 517dc61d50dSmrg# define YY_USE(E) ((void) (E)) 51805b261ecSmrg#else 519dc61d50dSmrg# define YY_USE(E) /* empty */ 52005b261ecSmrg#endif 52105b261ecSmrg 52235c4bbdfSmrg/* Suppress an incorrect diagnostic about yylval being uninitialized. */ 523c82838c1Smrg#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ 524c82838c1Smrg# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 525c82838c1Smrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 526c82838c1Smrg _Pragma ("GCC diagnostic push") \ 527c82838c1Smrg _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") 528c82838c1Smrg# else 529c82838c1Smrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 5305a7dfde8Smrg _Pragma ("GCC diagnostic push") \ 5315a7dfde8Smrg _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ 53235c4bbdfSmrg _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 533c82838c1Smrg# endif 5345a7dfde8Smrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 53535c4bbdfSmrg _Pragma ("GCC diagnostic pop") 53605b261ecSmrg#else 53735c4bbdfSmrg# define YY_INITIAL_VALUE(Value) Value 53805b261ecSmrg#endif 53935c4bbdfSmrg#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 54035c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 54135c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END 54235c4bbdfSmrg#endif 54335c4bbdfSmrg#ifndef YY_INITIAL_VALUE 54435c4bbdfSmrg# define YY_INITIAL_VALUE(Value) /* Nothing. */ 54505b261ecSmrg#endif 54605b261ecSmrg 5475a7dfde8Smrg#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ 5485a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_BEGIN \ 5495a7dfde8Smrg _Pragma ("GCC diagnostic push") \ 5505a7dfde8Smrg _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") 5515a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_END \ 5525a7dfde8Smrg _Pragma ("GCC diagnostic pop") 5535a7dfde8Smrg#endif 5545a7dfde8Smrg#ifndef YY_IGNORE_USELESS_CAST_BEGIN 5555a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_BEGIN 5565a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_END 5575a7dfde8Smrg#endif 5585a7dfde8Smrg 55935c4bbdfSmrg 5605a7dfde8Smrg#define YY_ASSERT(E) ((void) (0 && (E))) 5615a7dfde8Smrg 562dc61d50dSmrg#if !defined yyoverflow 56305b261ecSmrg 56405b261ecSmrg/* The parser invokes alloca or malloc; define the necessary symbols. */ 56505b261ecSmrg 56605b261ecSmrg# ifdef YYSTACK_USE_ALLOCA 56705b261ecSmrg# if YYSTACK_USE_ALLOCA 56805b261ecSmrg# ifdef __GNUC__ 56905b261ecSmrg# define YYSTACK_ALLOC __builtin_alloca 57005b261ecSmrg# elif defined __BUILTIN_VA_ARG_INCR 57105b261ecSmrg# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 57205b261ecSmrg# elif defined _AIX 57305b261ecSmrg# define YYSTACK_ALLOC __alloca 57405b261ecSmrg# elif defined _MSC_VER 57505b261ecSmrg# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 57605b261ecSmrg# define alloca _alloca 57705b261ecSmrg# else 57805b261ecSmrg# define YYSTACK_ALLOC alloca 57935c4bbdfSmrg# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 58005b261ecSmrg# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 58135c4bbdfSmrg /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 5829ace9065Smrg# ifndef EXIT_SUCCESS 5839ace9065Smrg# define EXIT_SUCCESS 0 58405b261ecSmrg# endif 58505b261ecSmrg# endif 58605b261ecSmrg# endif 58705b261ecSmrg# endif 58805b261ecSmrg# endif 58905b261ecSmrg 59005b261ecSmrg# ifdef YYSTACK_ALLOC 59135c4bbdfSmrg /* Pacify GCC's 'empty if-body' warning. */ 59235c4bbdfSmrg# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 59305b261ecSmrg# ifndef YYSTACK_ALLOC_MAXIMUM 59405b261ecSmrg /* The OS might guarantee only one guard page at the bottom of the stack, 59505b261ecSmrg and a page size can be as small as 4096 bytes. So we cannot safely 59605b261ecSmrg invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 59705b261ecSmrg to allow for a few compiler-allocated temporary stack slots. */ 59805b261ecSmrg# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 59905b261ecSmrg# endif 60005b261ecSmrg# else 60105b261ecSmrg# define YYSTACK_ALLOC YYMALLOC 60205b261ecSmrg# define YYSTACK_FREE YYFREE 60305b261ecSmrg# ifndef YYSTACK_ALLOC_MAXIMUM 60405b261ecSmrg# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 60505b261ecSmrg# endif 6069ace9065Smrg# if (defined __cplusplus && ! defined EXIT_SUCCESS \ 60705b261ecSmrg && ! ((defined YYMALLOC || defined malloc) \ 60835c4bbdfSmrg && (defined YYFREE || defined free))) 60905b261ecSmrg# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 6109ace9065Smrg# ifndef EXIT_SUCCESS 6119ace9065Smrg# define EXIT_SUCCESS 0 61205b261ecSmrg# endif 61305b261ecSmrg# endif 61405b261ecSmrg# ifndef YYMALLOC 61505b261ecSmrg# define YYMALLOC malloc 61635c4bbdfSmrg# if ! defined malloc && ! defined EXIT_SUCCESS 61705b261ecSmrgvoid *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 61805b261ecSmrg# endif 61905b261ecSmrg# endif 62005b261ecSmrg# ifndef YYFREE 62105b261ecSmrg# define YYFREE free 62235c4bbdfSmrg# if ! defined free && ! defined EXIT_SUCCESS 62305b261ecSmrgvoid free (void *); /* INFRINGES ON USER NAME SPACE */ 62405b261ecSmrg# endif 62505b261ecSmrg# endif 62605b261ecSmrg# endif 627dc61d50dSmrg#endif /* !defined yyoverflow */ 62805b261ecSmrg 62905b261ecSmrg#if (! defined yyoverflow \ 63005b261ecSmrg && (! defined __cplusplus \ 63135c4bbdfSmrg || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 63205b261ecSmrg 63305b261ecSmrg/* A type that is properly aligned for any stack member. */ 63405b261ecSmrgunion yyalloc 63505b261ecSmrg{ 6365a7dfde8Smrg yy_state_t yyss_alloc; 6374642e01fSmrg YYSTYPE yyvs_alloc; 6384642e01fSmrg}; 63905b261ecSmrg 64005b261ecSmrg/* The size of the maximum gap between one aligned stack and the next. */ 6415a7dfde8Smrg# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) 64205b261ecSmrg 64305b261ecSmrg/* The size of an array large to enough to hold all stacks, each with 64405b261ecSmrg N elements. */ 64505b261ecSmrg# define YYSTACK_BYTES(N) \ 6465a7dfde8Smrg ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ 64705b261ecSmrg + YYSTACK_GAP_MAXIMUM) 64805b261ecSmrg 6499ace9065Smrg# define YYCOPY_NEEDED 1 65005b261ecSmrg 65105b261ecSmrg/* Relocate STACK from its old location to the new one. The 65205b261ecSmrg local variables YYSIZE and YYSTACKSIZE give the old and new number of 65305b261ecSmrg elements in the stack, and YYPTR gives the new location of the 65405b261ecSmrg stack. Advance YYPTR to a properly aligned location for the next 65505b261ecSmrg stack. */ 65635c4bbdfSmrg# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 65735c4bbdfSmrg do \ 65835c4bbdfSmrg { \ 6595a7dfde8Smrg YYPTRDIFF_T yynewbytes; \ 66035c4bbdfSmrg YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 66135c4bbdfSmrg Stack = &yyptr->Stack_alloc; \ 6625a7dfde8Smrg yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ 6635a7dfde8Smrg yyptr += yynewbytes / YYSIZEOF (*yyptr); \ 66435c4bbdfSmrg } \ 66535c4bbdfSmrg while (0) 66605b261ecSmrg 66705b261ecSmrg#endif 66805b261ecSmrg 6699ace9065Smrg#if defined YYCOPY_NEEDED && YYCOPY_NEEDED 67035c4bbdfSmrg/* Copy COUNT objects from SRC to DST. The source and destination do 6719ace9065Smrg not overlap. */ 6729ace9065Smrg# ifndef YYCOPY 6739ace9065Smrg# if defined __GNUC__ && 1 < __GNUC__ 67435c4bbdfSmrg# define YYCOPY(Dst, Src, Count) \ 6755a7dfde8Smrg __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) 6769ace9065Smrg# else 67735c4bbdfSmrg# define YYCOPY(Dst, Src, Count) \ 67835c4bbdfSmrg do \ 67935c4bbdfSmrg { \ 6805a7dfde8Smrg YYPTRDIFF_T yyi; \ 68135c4bbdfSmrg for (yyi = 0; yyi < (Count); yyi++) \ 68235c4bbdfSmrg (Dst)[yyi] = (Src)[yyi]; \ 68335c4bbdfSmrg } \ 68435c4bbdfSmrg while (0) 6859ace9065Smrg# endif 6869ace9065Smrg# endif 6879ace9065Smrg#endif /* !YYCOPY_NEEDED */ 6889ace9065Smrg 68905b261ecSmrg/* YYFINAL -- State number of the termination state. */ 69005b261ecSmrg#define YYFINAL 2 69105b261ecSmrg/* YYLAST -- Last index in YYTABLE. */ 6926747b715Smrg#define YYLAST 98 69305b261ecSmrg 69405b261ecSmrg/* YYNTOKENS -- Number of terminals. */ 6956747b715Smrg#define YYNTOKENS 32 69605b261ecSmrg/* YYNNTS -- Number of nonterminals. */ 6976747b715Smrg#define YYNNTS 33 69805b261ecSmrg/* YYNRULES -- Number of rules. */ 6996747b715Smrg#define YYNRULES 65 70035c4bbdfSmrg/* YYNSTATES -- Number of states. */ 7016747b715Smrg#define YYNSTATES 121 70205b261ecSmrg 703dc61d50dSmrg/* YYMAXUTOK -- Last valid token kind. */ 7046747b715Smrg#define YYMAXUTOK 286 70505b261ecSmrg 7065a7dfde8Smrg 7075a7dfde8Smrg/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM 7085a7dfde8Smrg as returned by yylex, with out-of-bounds checking. */ 709dc61d50dSmrg#define YYTRANSLATE(YYX) \ 710dc61d50dSmrg (0 <= (YYX) && (YYX) <= YYMAXUTOK \ 711dc61d50dSmrg ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ 712dc61d50dSmrg : YYSYMBOL_YYUNDEF) 71305b261ecSmrg 71435c4bbdfSmrg/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 7155a7dfde8Smrg as returned by yylex. */ 7165a7dfde8Smrgstatic const yytype_int8 yytranslate[] = 71705b261ecSmrg{ 71805b261ecSmrg 0, 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, 2, 2, 2, 2, 72305b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72405b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72505b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72605b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72705b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72805b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 72905b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73005b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73105b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73205b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73305b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73405b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73505b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73605b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73705b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73805b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73905b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 74005b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 74105b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 74205b261ecSmrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 74305b261ecSmrg 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 74405b261ecSmrg 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 7456747b715Smrg 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 7466747b715Smrg 25, 26, 27, 28, 29, 30, 31 74705b261ecSmrg}; 74805b261ecSmrg 74905b261ecSmrg#if YYDEBUG 750c82838c1Smrg/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 75105b261ecSmrgstatic const yytype_uint8 yyrline[] = 75205b261ecSmrg{ 75335c4bbdfSmrg 0, 133, 133, 134, 137, 138, 142, 143, 146, 147, 75435c4bbdfSmrg 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 75535c4bbdfSmrg 160, 163, 166, 169, 172, 175, 176, 177, 178, 179, 75635c4bbdfSmrg 182, 183, 186, 186, 189, 192, 193, 196, 196, 199, 75735c4bbdfSmrg 200, 201, 202, 205, 206, 207, 210, 211, 212, 213, 75835c4bbdfSmrg 216, 219, 220, 223, 223, 226, 227, 228, 231, 234, 75935c4bbdfSmrg 235, 238, 238, 241, 244, 247 76005b261ecSmrg}; 76105b261ecSmrg#endif 76205b261ecSmrg 763dc61d50dSmrg/** Accessing symbol of state STATE. */ 764dc61d50dSmrg#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) 765dc61d50dSmrg 766dc61d50dSmrg#if YYDEBUG || 0 767dc61d50dSmrg/* The user-facing name of the symbol whose (internal) number is 768dc61d50dSmrg YYSYMBOL. No bounds checking. */ 769dc61d50dSmrgstatic const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; 770dc61d50dSmrg 77105b261ecSmrg/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 77205b261ecSmrg First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 77305b261ecSmrgstatic const char *const yytname[] = 77405b261ecSmrg{ 775dc61d50dSmrg "\"end of file\"", "error", "\"invalid token\"", "NEWLINE", "MENU", 776dc61d50dSmrg "LB", "RB", "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", 777dc61d50dSmrg "MAXIMIZE", "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", 778dc61d50dSmrg "DEFAULTSYSMENU", "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", 779dc61d50dSmrg "EXEC", "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT", 7806747b715Smrg "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada", 7816747b715Smrg "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon", 7826747b715Smrg "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline", 7836747b715Smrg "iconlist", "icons", "$@2", "group1", "group2", "stylecombo", 7846747b715Smrg "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline", 78535c4bbdfSmrg "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", YY_NULLPTR 78605b261ecSmrg}; 787dc61d50dSmrg 788dc61d50dSmrgstatic const char * 789dc61d50dSmrgyysymbol_name (yysymbol_kind_t yysymbol) 790dc61d50dSmrg{ 791dc61d50dSmrg return yytname[yysymbol]; 792dc61d50dSmrg} 79305b261ecSmrg#endif 79405b261ecSmrg 7955a7dfde8Smrg#define YYPACT_NINF (-47) 79605b261ecSmrg 7975a7dfde8Smrg#define yypact_value_is_default(Yyn) \ 7985a7dfde8Smrg ((Yyn) == YYPACT_NINF) 79905b261ecSmrg 8005a7dfde8Smrg#define YYTABLE_NINF (-1) 80105b261ecSmrg 8025a7dfde8Smrg#define yytable_value_is_error(Yyn) \ 80335c4bbdfSmrg 0 80405b261ecSmrg 805c82838c1Smrg/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 806c82838c1Smrg STATE-NUM. */ 80705b261ecSmrgstatic const yytype_int8 yypact[] = 80805b261ecSmrg{ 8096747b715Smrg -47, 7, -47, -47, -1, 0, 1, 18, 29, 15, 8106747b715Smrg 42, 17, 19, 20, 46, 50, -47, -47, -47, -47, 8116747b715Smrg -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, 8126747b715Smrg 49, 53, 54, -47, -47, 6, 55, 56, 57, 58, 8136747b715Smrg -47, -47, -47, -47, -47, 61, 61, -47, -47, 62, 8146747b715Smrg -47, -47, -47, -47, 61, 61, 35, 38, -47, 61, 8156747b715Smrg -19, -47, 39, 35, 66, 27, 38, 67, 43, 72, 8166747b715Smrg -3, -19, 70, 74, -47, -47, -47, -47, -47, -47, 8176747b715Smrg -47, -47, -47, 3, -8, 75, -47, -47, 48, 43, 8186747b715Smrg 76, 61, 52, 59, 77, 78, -47, -47, 61, -47, 8196747b715Smrg -47, 61, 6, -47, -47, -47, 81, 82, 61, 61, 8206747b715Smrg -47, -47, 83, 61, 61, -47, -47, 61, -47, -47, 8216747b715Smrg -47 82205b261ecSmrg}; 82305b261ecSmrg 824c82838c1Smrg/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 825c82838c1Smrg Performed when YYTABLE does not specify something else to do. Zero 826c82838c1Smrg means the default is an error. */ 8275a7dfde8Smrgstatic const yytype_int8 yydefact[] = 82835c4bbdfSmrg{ 82935c4bbdfSmrg 2, 0, 1, 4, 0, 0, 0, 0, 0, 0, 83035c4bbdfSmrg 0, 0, 0, 0, 0, 0, 3, 5, 17, 14, 83135c4bbdfSmrg 15, 8, 9, 10, 11, 12, 13, 18, 19, 16, 83235c4bbdfSmrg 0, 0, 0, 37, 53, 55, 0, 0, 0, 0, 83335c4bbdfSmrg 63, 64, 32, 24, 23, 6, 6, 56, 57, 0, 83435c4bbdfSmrg 61, 21, 65, 20, 6, 6, 0, 0, 22, 6, 83535c4bbdfSmrg 0, 7, 0, 35, 0, 0, 51, 0, 0, 0, 83635c4bbdfSmrg 0, 30, 0, 0, 36, 38, 39, 40, 41, 42, 83735c4bbdfSmrg 43, 44, 45, 46, 47, 0, 52, 54, 0, 59, 83835c4bbdfSmrg 0, 6, 0, 0, 0, 0, 31, 33, 6, 48, 83935c4bbdfSmrg 49, 6, 55, 60, 62, 25, 0, 0, 6, 6, 84035c4bbdfSmrg 34, 50, 0, 6, 6, 26, 29, 6, 28, 27, 84135c4bbdfSmrg 58 84235c4bbdfSmrg}; 84335c4bbdfSmrg 844c82838c1Smrg/* YYPGOTO[NTERM-NUM]. */ 84505b261ecSmrgstatic const yytype_int8 yypgoto[] = 84605b261ecSmrg{ 8476747b715Smrg -47, -47, -47, -46, -47, -47, -47, -47, -47, -47, 8486747b715Smrg -47, 16, -47, -47, -47, 25, -47, -47, 5, 8, 8496747b715Smrg -47, -47, 26, -47, -47, -9, -47, 9, -47, -47, 8506747b715Smrg -47, -47, -47 85105b261ecSmrg}; 85205b261ecSmrg 853c82838c1Smrg/* YYDEFGOTO[NTERM-NUM]. */ 85435c4bbdfSmrgstatic const yytype_int8 yydefgoto[] = 85535c4bbdfSmrg{ 856dc61d50dSmrg 0, 1, 16, 56, 17, 18, 19, 20, 21, 22, 85735c4bbdfSmrg 71, 72, 23, 54, 63, 64, 24, 45, 83, 84, 85835c4bbdfSmrg 85, 66, 67, 25, 46, 49, 89, 90, 26, 59, 85935c4bbdfSmrg 27, 28, 29 86035c4bbdfSmrg}; 86135c4bbdfSmrg 862c82838c1Smrg/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 863c82838c1Smrg positive, shift that token. If negative, reduce the rule whose 864c82838c1Smrg number is the opposite. If YYTABLE_NINF, syntax error. */ 8655a7dfde8Smrgstatic const yytype_int8 yytable[] = 86605b261ecSmrg{ 8676747b715Smrg 57, 92, 69, 76, 77, 78, 79, 2, 60, 61, 8686747b715Smrg 3, 4, 70, 68, 5, 6, 7, 8, 80, 81, 8696747b715Smrg 82, 93, 94, 33, 95, 9, 10, 11, 47, 48, 8706747b715Smrg 30, 31, 32, 12, 34, 13, 14, 15, 76, 77, 8716747b715Smrg 78, 79, 80, 81, 82, 105, 35, 36, 37, 40, 8726747b715Smrg 38, 39, 110, 41, 42, 111, 43, 44, 50, 51, 8736747b715Smrg 52, 53, 115, 116, 55, 58, 62, 118, 119, 65, 8746747b715Smrg 73, 120, 75, 87, 88, 91, 97, 98, 101, 102, 8756747b715Smrg 108, 109, 104, 106, 113, 114, 117, 96, 74, 100, 8766747b715Smrg 107, 99, 86, 112, 0, 0, 0, 0, 103 87705b261ecSmrg}; 87805b261ecSmrg 8796747b715Smrgstatic const yytype_int8 yycheck[] = 88005b261ecSmrg{ 8816747b715Smrg 46, 4, 21, 11, 12, 13, 14, 0, 54, 55, 8826747b715Smrg 3, 4, 31, 59, 7, 8, 9, 10, 15, 16, 8836747b715Smrg 17, 24, 25, 5, 27, 18, 19, 20, 22, 23, 8846747b715Smrg 31, 31, 31, 26, 5, 28, 29, 30, 11, 12, 8856747b715Smrg 13, 14, 15, 16, 17, 91, 31, 5, 31, 3, 8866747b715Smrg 31, 31, 98, 3, 5, 101, 3, 3, 3, 3, 8876747b715Smrg 3, 3, 108, 109, 3, 3, 31, 113, 114, 31, 8886747b715Smrg 31, 117, 6, 6, 31, 3, 6, 3, 3, 31, 8896747b715Smrg 3, 3, 6, 31, 3, 3, 3, 71, 63, 84, 8906747b715Smrg 31, 83, 66, 102, -1, -1, -1, -1, 89 89105b261ecSmrg}; 89205b261ecSmrg 893c82838c1Smrg/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of 894c82838c1Smrg state STATE-NUM. */ 8955a7dfde8Smrgstatic const yytype_int8 yystos[] = 89605b261ecSmrg{ 8976747b715Smrg 0, 33, 0, 3, 4, 7, 8, 9, 10, 18, 8986747b715Smrg 19, 20, 26, 28, 29, 30, 34, 36, 37, 38, 8996747b715Smrg 39, 40, 41, 44, 48, 55, 60, 62, 63, 64, 9006747b715Smrg 31, 31, 31, 5, 5, 31, 5, 31, 31, 31, 9016747b715Smrg 3, 3, 5, 3, 3, 49, 56, 22, 23, 57, 9026747b715Smrg 3, 3, 3, 3, 45, 3, 35, 35, 3, 61, 9036747b715Smrg 35, 35, 31, 46, 47, 31, 53, 54, 35, 21, 9046747b715Smrg 31, 42, 43, 31, 47, 6, 11, 12, 13, 14, 9056747b715Smrg 15, 16, 17, 50, 51, 52, 54, 6, 31, 58, 9066747b715Smrg 59, 3, 4, 24, 25, 27, 43, 6, 3, 51, 9076747b715Smrg 50, 3, 31, 59, 6, 35, 31, 31, 3, 3, 9086747b715Smrg 35, 35, 57, 3, 3, 35, 35, 3, 35, 35, 9096747b715Smrg 35 91005b261ecSmrg}; 91105b261ecSmrg 912c82838c1Smrg/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ 9135a7dfde8Smrgstatic const yytype_int8 yyr1[] = 91435c4bbdfSmrg{ 91535c4bbdfSmrg 0, 32, 33, 33, 34, 34, 35, 35, 36, 36, 91635c4bbdfSmrg 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 91735c4bbdfSmrg 37, 38, 39, 40, 41, 42, 42, 42, 42, 42, 91835c4bbdfSmrg 43, 43, 45, 44, 46, 47, 47, 49, 48, 50, 91935c4bbdfSmrg 50, 50, 50, 51, 51, 51, 52, 52, 52, 52, 92035c4bbdfSmrg 53, 54, 54, 56, 55, 57, 57, 57, 58, 59, 92135c4bbdfSmrg 59, 61, 60, 62, 63, 64 92235c4bbdfSmrg}; 92305b261ecSmrg 924c82838c1Smrg/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ 9255a7dfde8Smrgstatic const yytype_int8 yyr2[] = 92635c4bbdfSmrg{ 92735c4bbdfSmrg 0, 2, 0, 2, 1, 1, 0, 2, 1, 1, 92835c4bbdfSmrg 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 92935c4bbdfSmrg 3, 3, 4, 3, 3, 3, 4, 5, 5, 4, 93035c4bbdfSmrg 1, 2, 0, 7, 4, 1, 2, 0, 6, 1, 93135c4bbdfSmrg 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 93235c4bbdfSmrg 4, 1, 2, 0, 6, 0, 1, 1, 5, 1, 93335c4bbdfSmrg 2, 0, 7, 2, 2, 3 93435c4bbdfSmrg}; 93505b261ecSmrg 93605b261ecSmrg 937dc61d50dSmrgenum { YYENOMEM = -2 }; 938dc61d50dSmrg 93935c4bbdfSmrg#define yyerrok (yyerrstatus = 0) 94035c4bbdfSmrg#define yyclearin (yychar = YYEMPTY) 94105b261ecSmrg 94235c4bbdfSmrg#define YYACCEPT goto yyacceptlab 94335c4bbdfSmrg#define YYABORT goto yyabortlab 94435c4bbdfSmrg#define YYERROR goto yyerrorlab 945c82838c1Smrg#define YYNOMEM goto yyexhaustedlab 94605b261ecSmrg 94705b261ecSmrg 94835c4bbdfSmrg#define YYRECOVERING() (!!yyerrstatus) 94935c4bbdfSmrg 9505a7dfde8Smrg#define YYBACKUP(Token, Value) \ 9515a7dfde8Smrg do \ 9525a7dfde8Smrg if (yychar == YYEMPTY) \ 9535a7dfde8Smrg { \ 9545a7dfde8Smrg yychar = (Token); \ 9555a7dfde8Smrg yylval = (Value); \ 9565a7dfde8Smrg YYPOPSTACK (yylen); \ 9575a7dfde8Smrg yystate = *yyssp; \ 9585a7dfde8Smrg goto yybackup; \ 9595a7dfde8Smrg } \ 9605a7dfde8Smrg else \ 9615a7dfde8Smrg { \ 9625a7dfde8Smrg yyerror (YY_("syntax error: cannot back up")); \ 9635a7dfde8Smrg YYERROR; \ 9645a7dfde8Smrg } \ 9655a7dfde8Smrg while (0) 9665a7dfde8Smrg 967dc61d50dSmrg/* Backward compatibility with an undocumented macro. 968dc61d50dSmrg Use YYerror or YYUNDEF. */ 969dc61d50dSmrg#define YYERRCODE YYUNDEF 97005b261ecSmrg 97105b261ecSmrg 97205b261ecSmrg/* Enable debugging if requested. */ 97305b261ecSmrg#if YYDEBUG 97405b261ecSmrg 97505b261ecSmrg# ifndef YYFPRINTF 97605b261ecSmrg# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 97705b261ecSmrg# define YYFPRINTF fprintf 97805b261ecSmrg# endif 97905b261ecSmrg 98035c4bbdfSmrg# define YYDPRINTF(Args) \ 98135c4bbdfSmrgdo { \ 98235c4bbdfSmrg if (yydebug) \ 98335c4bbdfSmrg YYFPRINTF Args; \ 98435c4bbdfSmrg} while (0) 98505b261ecSmrg 986c82838c1Smrg 98705b261ecSmrg 98805b261ecSmrg 989dc61d50dSmrg# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ 99035c4bbdfSmrgdo { \ 99135c4bbdfSmrg if (yydebug) \ 99235c4bbdfSmrg { \ 99335c4bbdfSmrg YYFPRINTF (stderr, "%s ", Title); \ 99435c4bbdfSmrg yy_symbol_print (stderr, \ 995dc61d50dSmrg Kind, Value); \ 99635c4bbdfSmrg YYFPRINTF (stderr, "\n"); \ 99735c4bbdfSmrg } \ 99835c4bbdfSmrg} while (0) 99935c4bbdfSmrg 100035c4bbdfSmrg 10015a7dfde8Smrg/*-----------------------------------. 10025a7dfde8Smrg| Print this symbol's value on YYO. | 10035a7dfde8Smrg`-----------------------------------*/ 100405b261ecSmrg 100505b261ecSmrgstatic void 1006dc61d50dSmrgyy_symbol_value_print (FILE *yyo, 1007dc61d50dSmrg yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) 100805b261ecSmrg{ 10095a7dfde8Smrg FILE *yyoutput = yyo; 1010dc61d50dSmrg YY_USE (yyoutput); 101105b261ecSmrg if (!yyvaluep) 101205b261ecSmrg return; 10135a7dfde8Smrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1014dc61d50dSmrg YY_USE (yykind); 10155a7dfde8Smrg YY_IGNORE_MAYBE_UNINITIALIZED_END 101605b261ecSmrg} 101705b261ecSmrg 101805b261ecSmrg 10195a7dfde8Smrg/*---------------------------. 10205a7dfde8Smrg| Print this symbol on YYO. | 10215a7dfde8Smrg`---------------------------*/ 102205b261ecSmrg 102305b261ecSmrgstatic void 1024dc61d50dSmrgyy_symbol_print (FILE *yyo, 1025dc61d50dSmrg yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) 102605b261ecSmrg{ 10275a7dfde8Smrg YYFPRINTF (yyo, "%s %s (", 1028dc61d50dSmrg yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); 102905b261ecSmrg 1030dc61d50dSmrg yy_symbol_value_print (yyo, yykind, yyvaluep); 10315a7dfde8Smrg YYFPRINTF (yyo, ")"); 103205b261ecSmrg} 103305b261ecSmrg 103405b261ecSmrg/*------------------------------------------------------------------. 103505b261ecSmrg| yy_stack_print -- Print the state stack from its BOTTOM up to its | 103605b261ecSmrg| TOP (included). | 103705b261ecSmrg`------------------------------------------------------------------*/ 103805b261ecSmrg 103905b261ecSmrgstatic void 10405a7dfde8Smrgyy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) 104105b261ecSmrg{ 104205b261ecSmrg YYFPRINTF (stderr, "Stack now"); 10434642e01fSmrg for (; yybottom <= yytop; yybottom++) 10444642e01fSmrg { 10454642e01fSmrg int yybot = *yybottom; 10464642e01fSmrg YYFPRINTF (stderr, " %d", yybot); 10474642e01fSmrg } 104805b261ecSmrg YYFPRINTF (stderr, "\n"); 104905b261ecSmrg} 105005b261ecSmrg 105135c4bbdfSmrg# define YY_STACK_PRINT(Bottom, Top) \ 105235c4bbdfSmrgdo { \ 105335c4bbdfSmrg if (yydebug) \ 105435c4bbdfSmrg yy_stack_print ((Bottom), (Top)); \ 105535c4bbdfSmrg} while (0) 105605b261ecSmrg 105705b261ecSmrg 105805b261ecSmrg/*------------------------------------------------. 105905b261ecSmrg| Report that the YYRULE is going to be reduced. | 106005b261ecSmrg`------------------------------------------------*/ 106105b261ecSmrg 106205b261ecSmrgstatic void 1063dc61d50dSmrgyy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, 1064dc61d50dSmrg int yyrule) 106505b261ecSmrg{ 10665a7dfde8Smrg int yylno = yyrline[yyrule]; 106705b261ecSmrg int yynrhs = yyr2[yyrule]; 106805b261ecSmrg int yyi; 10695a7dfde8Smrg YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", 107035c4bbdfSmrg yyrule - 1, yylno); 107105b261ecSmrg /* The symbols being reduced. */ 107205b261ecSmrg for (yyi = 0; yyi < yynrhs; yyi++) 107305b261ecSmrg { 10744642e01fSmrg YYFPRINTF (stderr, " $%d = ", yyi + 1); 107535c4bbdfSmrg yy_symbol_print (stderr, 1076dc61d50dSmrg YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), 1077dc61d50dSmrg &yyvsp[(yyi + 1) - (yynrhs)]); 10784642e01fSmrg YYFPRINTF (stderr, "\n"); 107905b261ecSmrg } 108005b261ecSmrg} 108105b261ecSmrg 108235c4bbdfSmrg# define YY_REDUCE_PRINT(Rule) \ 108335c4bbdfSmrgdo { \ 108435c4bbdfSmrg if (yydebug) \ 108535c4bbdfSmrg yy_reduce_print (yyssp, yyvsp, Rule); \ 108635c4bbdfSmrg} while (0) 108705b261ecSmrg 108805b261ecSmrg/* Nonzero means print parse trace. It is left uninitialized so that 108905b261ecSmrg multiple parsers can coexist. */ 109005b261ecSmrgint yydebug; 109105b261ecSmrg#else /* !YYDEBUG */ 1092dc61d50dSmrg# define YYDPRINTF(Args) ((void) 0) 1093dc61d50dSmrg# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) 109405b261ecSmrg# define YY_STACK_PRINT(Bottom, Top) 109505b261ecSmrg# define YY_REDUCE_PRINT(Rule) 109605b261ecSmrg#endif /* !YYDEBUG */ 109705b261ecSmrg 109805b261ecSmrg 109905b261ecSmrg/* YYINITDEPTH -- initial size of the parser's stacks. */ 110035c4bbdfSmrg#ifndef YYINITDEPTH 110105b261ecSmrg# define YYINITDEPTH 200 110205b261ecSmrg#endif 110305b261ecSmrg 110405b261ecSmrg/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 110505b261ecSmrg if the built-in stack extension method is used). 110605b261ecSmrg 110705b261ecSmrg Do not make this value too large; the results are undefined if 110805b261ecSmrg YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 110905b261ecSmrg evaluated with infinite-precision integer arithmetic. */ 111005b261ecSmrg 111105b261ecSmrg#ifndef YYMAXDEPTH 111205b261ecSmrg# define YYMAXDEPTH 10000 111305b261ecSmrg#endif 111405b261ecSmrg 111505b261ecSmrg 111605b261ecSmrg 111705b261ecSmrg 111805b261ecSmrg 111905b261ecSmrg 112005b261ecSmrg/*-----------------------------------------------. 112105b261ecSmrg| Release the memory associated to this symbol. | 112205b261ecSmrg`-----------------------------------------------*/ 112305b261ecSmrg 112405b261ecSmrgstatic void 1125dc61d50dSmrgyydestruct (const char *yymsg, 1126dc61d50dSmrg yysymbol_kind_t yykind, YYSTYPE *yyvaluep) 112705b261ecSmrg{ 1128dc61d50dSmrg YY_USE (yyvaluep); 112905b261ecSmrg if (!yymsg) 113005b261ecSmrg yymsg = "Deleting"; 1131dc61d50dSmrg YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); 113205b261ecSmrg 113335c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1134dc61d50dSmrg YY_USE (yykind); 113535c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_END 113605b261ecSmrg} 113705b261ecSmrg 11389ace9065Smrg 1139dc61d50dSmrg/* Lookahead token kind. */ 114005b261ecSmrgint yychar; 114105b261ecSmrg 11424642e01fSmrg/* The semantic value of the lookahead symbol. */ 114305b261ecSmrgYYSTYPE yylval; 114405b261ecSmrg/* Number of syntax errors so far. */ 114505b261ecSmrgint yynerrs; 114605b261ecSmrg 114705b261ecSmrg 1148dc61d50dSmrg 1149dc61d50dSmrg 11509ace9065Smrg/*----------. 11519ace9065Smrg| yyparse. | 11529ace9065Smrg`----------*/ 115305b261ecSmrg 115405b261ecSmrgint 115505b261ecSmrgyyparse (void) 115605b261ecSmrg{ 1157dc61d50dSmrg yy_state_fast_t yystate = 0; 11584642e01fSmrg /* Number of tokens to shift before error messages enabled. */ 1159dc61d50dSmrg int yyerrstatus = 0; 116005b261ecSmrg 1161dc61d50dSmrg /* Refer to the stacks through separate pointers, to allow yyoverflow 1162ed6184dfSmrg to reallocate them elsewhere. */ 116305b261ecSmrg 1164dc61d50dSmrg /* Their size. */ 1165dc61d50dSmrg YYPTRDIFF_T yystacksize = YYINITDEPTH; 1166dc61d50dSmrg 1167dc61d50dSmrg /* The state stack: array, bottom, top. */ 11685a7dfde8Smrg yy_state_t yyssa[YYINITDEPTH]; 1169dc61d50dSmrg yy_state_t *yyss = yyssa; 1170dc61d50dSmrg yy_state_t *yyssp = yyss; 117105b261ecSmrg 1172dc61d50dSmrg /* The semantic value stack: array, bottom, top. */ 11735a7dfde8Smrg YYSTYPE yyvsa[YYINITDEPTH]; 1174dc61d50dSmrg YYSTYPE *yyvs = yyvsa; 1175dc61d50dSmrg YYSTYPE *yyvsp = yyvs; 117605b261ecSmrg 11774642e01fSmrg int yyn; 1178dc61d50dSmrg /* The return value of yyparse. */ 11794642e01fSmrg int yyresult; 1180dc61d50dSmrg /* Lookahead symbol kind. */ 1181dc61d50dSmrg yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; 118205b261ecSmrg /* The variables used to return semantic value and location from the 118305b261ecSmrg action routines. */ 118405b261ecSmrg YYSTYPE yyval; 118505b261ecSmrg 1186dc61d50dSmrg 11874642e01fSmrg 11884642e01fSmrg#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 118905b261ecSmrg 119005b261ecSmrg /* The number of symbols on the RHS of the reduced rule. 119105b261ecSmrg Keep to zero when no symbol should be popped. */ 119205b261ecSmrg int yylen = 0; 119305b261ecSmrg 119405b261ecSmrg YYDPRINTF ((stderr, "Starting parse\n")); 119505b261ecSmrg 11964642e01fSmrg yychar = YYEMPTY; /* Cause a token to be read. */ 1197c82838c1Smrg 119805b261ecSmrg goto yysetstate; 119905b261ecSmrg 12005a7dfde8Smrg 120105b261ecSmrg/*------------------------------------------------------------. 12025a7dfde8Smrg| yynewstate -- push a new state, which is found in yystate. | 120305b261ecSmrg`------------------------------------------------------------*/ 12045a7dfde8Smrgyynewstate: 120505b261ecSmrg /* In all cases, when you get here, the value and location stacks 120605b261ecSmrg have just been pushed. So pushing a state here evens the stacks. */ 120705b261ecSmrg yyssp++; 120805b261ecSmrg 12095a7dfde8Smrg 12105a7dfde8Smrg/*--------------------------------------------------------------------. 12115a7dfde8Smrg| yysetstate -- set current state (the top of the stack) to yystate. | 12125a7dfde8Smrg`--------------------------------------------------------------------*/ 12135a7dfde8Smrgyysetstate: 12145a7dfde8Smrg YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 12155a7dfde8Smrg YY_ASSERT (0 <= yystate && yystate < YYNSTATES); 12165a7dfde8Smrg YY_IGNORE_USELESS_CAST_BEGIN 12175a7dfde8Smrg *yyssp = YY_CAST (yy_state_t, yystate); 12185a7dfde8Smrg YY_IGNORE_USELESS_CAST_END 1219dc61d50dSmrg YY_STACK_PRINT (yyss, yyssp); 122005b261ecSmrg 122105b261ecSmrg if (yyss + yystacksize - 1 <= yyssp) 12225a7dfde8Smrg#if !defined yyoverflow && !defined YYSTACK_RELOCATE 1223c82838c1Smrg YYNOMEM; 12245a7dfde8Smrg#else 122505b261ecSmrg { 122605b261ecSmrg /* Get the current used size of the three stacks, in elements. */ 12275a7dfde8Smrg YYPTRDIFF_T yysize = yyssp - yyss + 1; 122805b261ecSmrg 12295a7dfde8Smrg# if defined yyoverflow 123005b261ecSmrg { 123135c4bbdfSmrg /* Give user a chance to reallocate the stack. Use copies of 123235c4bbdfSmrg these so that the &'s don't force the real ones into 123335c4bbdfSmrg memory. */ 12345a7dfde8Smrg yy_state_t *yyss1 = yyss; 123535c4bbdfSmrg YYSTYPE *yyvs1 = yyvs; 123635c4bbdfSmrg 123735c4bbdfSmrg /* Each stack pointer address is followed by the size of the 123835c4bbdfSmrg data in use in that stack, in bytes. This used to be a 123935c4bbdfSmrg conditional around just the two extra args, but that might 124035c4bbdfSmrg be undefined if yyoverflow is a macro. */ 124135c4bbdfSmrg yyoverflow (YY_("memory exhausted"), 12425a7dfde8Smrg &yyss1, yysize * YYSIZEOF (*yyssp), 12435a7dfde8Smrg &yyvs1, yysize * YYSIZEOF (*yyvsp), 124435c4bbdfSmrg &yystacksize); 124535c4bbdfSmrg yyss = yyss1; 124635c4bbdfSmrg yyvs = yyvs1; 124705b261ecSmrg } 12485a7dfde8Smrg# else /* defined YYSTACK_RELOCATE */ 124905b261ecSmrg /* Extend the stack our own way. */ 125005b261ecSmrg if (YYMAXDEPTH <= yystacksize) 1251c82838c1Smrg YYNOMEM; 125205b261ecSmrg yystacksize *= 2; 125305b261ecSmrg if (YYMAXDEPTH < yystacksize) 125435c4bbdfSmrg yystacksize = YYMAXDEPTH; 125505b261ecSmrg 125605b261ecSmrg { 12575a7dfde8Smrg yy_state_t *yyss1 = yyss; 125835c4bbdfSmrg union yyalloc *yyptr = 12595a7dfde8Smrg YY_CAST (union yyalloc *, 12605a7dfde8Smrg YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); 126135c4bbdfSmrg if (! yyptr) 1262c82838c1Smrg YYNOMEM; 126335c4bbdfSmrg YYSTACK_RELOCATE (yyss_alloc, yyss); 126435c4bbdfSmrg YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1265dc61d50dSmrg# undef YYSTACK_RELOCATE 126635c4bbdfSmrg if (yyss1 != yyssa) 126735c4bbdfSmrg YYSTACK_FREE (yyss1); 126805b261ecSmrg } 126905b261ecSmrg# endif 127005b261ecSmrg 127105b261ecSmrg yyssp = yyss + yysize - 1; 127205b261ecSmrg yyvsp = yyvs + yysize - 1; 127305b261ecSmrg 12745a7dfde8Smrg YY_IGNORE_USELESS_CAST_BEGIN 12755a7dfde8Smrg YYDPRINTF ((stderr, "Stack size increased to %ld\n", 12765a7dfde8Smrg YY_CAST (long, yystacksize))); 12775a7dfde8Smrg YY_IGNORE_USELESS_CAST_END 127805b261ecSmrg 127905b261ecSmrg if (yyss + yystacksize - 1 <= yyssp) 128035c4bbdfSmrg YYABORT; 128105b261ecSmrg } 12825a7dfde8Smrg#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ 128305b261ecSmrg 1284c82838c1Smrg 12854642e01fSmrg if (yystate == YYFINAL) 12864642e01fSmrg YYACCEPT; 12874642e01fSmrg 128805b261ecSmrg goto yybackup; 128905b261ecSmrg 12905a7dfde8Smrg 129105b261ecSmrg/*-----------. 129205b261ecSmrg| yybackup. | 129305b261ecSmrg`-----------*/ 129405b261ecSmrgyybackup: 129505b261ecSmrg /* Do appropriate processing given the current state. Read a 12964642e01fSmrg lookahead token if we need one and don't already have one. */ 129705b261ecSmrg 12984642e01fSmrg /* First try to decide what to do without reference to lookahead token. */ 129905b261ecSmrg yyn = yypact[yystate]; 13009ace9065Smrg if (yypact_value_is_default (yyn)) 130105b261ecSmrg goto yydefault; 130205b261ecSmrg 13034642e01fSmrg /* Not known => get a lookahead token if don't already have one. */ 130405b261ecSmrg 1305dc61d50dSmrg /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ 130605b261ecSmrg if (yychar == YYEMPTY) 130705b261ecSmrg { 1308dc61d50dSmrg YYDPRINTF ((stderr, "Reading a token\n")); 130935c4bbdfSmrg yychar = yylex (); 131005b261ecSmrg } 131105b261ecSmrg 131205b261ecSmrg if (yychar <= YYEOF) 131305b261ecSmrg { 1314dc61d50dSmrg yychar = YYEOF; 1315dc61d50dSmrg yytoken = YYSYMBOL_YYEOF; 131605b261ecSmrg YYDPRINTF ((stderr, "Now at end of input.\n")); 131705b261ecSmrg } 1318dc61d50dSmrg else if (yychar == YYerror) 1319dc61d50dSmrg { 1320dc61d50dSmrg /* The scanner already issued an error message, process directly 1321dc61d50dSmrg to error recovery. But do not keep the error token as 1322dc61d50dSmrg lookahead, it is too special and may lead us to an endless 1323dc61d50dSmrg loop in error recovery. */ 1324dc61d50dSmrg yychar = YYUNDEF; 1325dc61d50dSmrg yytoken = YYSYMBOL_YYerror; 1326dc61d50dSmrg goto yyerrlab1; 1327dc61d50dSmrg } 132805b261ecSmrg else 132905b261ecSmrg { 133005b261ecSmrg yytoken = YYTRANSLATE (yychar); 133105b261ecSmrg YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 133205b261ecSmrg } 133305b261ecSmrg 133405b261ecSmrg /* If the proper action on seeing token YYTOKEN is to reduce or to 133505b261ecSmrg detect an error, take that action. */ 133605b261ecSmrg yyn += yytoken; 133705b261ecSmrg if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 133805b261ecSmrg goto yydefault; 133905b261ecSmrg yyn = yytable[yyn]; 134005b261ecSmrg if (yyn <= 0) 134105b261ecSmrg { 13429ace9065Smrg if (yytable_value_is_error (yyn)) 13439ace9065Smrg goto yyerrlab; 134405b261ecSmrg yyn = -yyn; 134505b261ecSmrg goto yyreduce; 134605b261ecSmrg } 134705b261ecSmrg 134805b261ecSmrg /* Count tokens shifted since error; after three, turn off error 134905b261ecSmrg status. */ 135005b261ecSmrg if (yyerrstatus) 135105b261ecSmrg yyerrstatus--; 135205b261ecSmrg 13534642e01fSmrg /* Shift the lookahead token. */ 135405b261ecSmrg YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 135505b261ecSmrg yystate = yyn; 135635c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 135705b261ecSmrg *++yyvsp = yylval; 135835c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_END 135905b261ecSmrg 13605a7dfde8Smrg /* Discard the shifted token. */ 13615a7dfde8Smrg yychar = YYEMPTY; 136205b261ecSmrg goto yynewstate; 136305b261ecSmrg 136405b261ecSmrg 136505b261ecSmrg/*-----------------------------------------------------------. 136605b261ecSmrg| yydefault -- do the default action for the current state. | 136705b261ecSmrg`-----------------------------------------------------------*/ 136805b261ecSmrgyydefault: 136905b261ecSmrg yyn = yydefact[yystate]; 137005b261ecSmrg if (yyn == 0) 137105b261ecSmrg goto yyerrlab; 137205b261ecSmrg goto yyreduce; 137305b261ecSmrg 137405b261ecSmrg 137505b261ecSmrg/*-----------------------------. 13765a7dfde8Smrg| yyreduce -- do a reduction. | 137705b261ecSmrg`-----------------------------*/ 137805b261ecSmrgyyreduce: 137905b261ecSmrg /* yyn is the number of a rule to reduce with. */ 138005b261ecSmrg yylen = yyr2[yyn]; 138105b261ecSmrg 138205b261ecSmrg /* If YYLEN is nonzero, implement the default value of the action: 138335c4bbdfSmrg '$$ = $1'. 138405b261ecSmrg 138505b261ecSmrg Otherwise, the following line sets YYVAL to garbage. 138605b261ecSmrg This behavior is undocumented and Bison 138705b261ecSmrg users should not rely upon it. Assigning to YYVAL 138805b261ecSmrg unconditionally makes the parser a bit smaller, and it avoids a 138905b261ecSmrg GCC warning that YYVAL may be used uninitialized. */ 139005b261ecSmrg yyval = yyvsp[1-yylen]; 139105b261ecSmrg 139205b261ecSmrg 139305b261ecSmrg YY_REDUCE_PRINT (yyn); 139405b261ecSmrg switch (yyn) 139505b261ecSmrg { 1396dc61d50dSmrg case 20: /* trayicon: TRAYICON STRING NEWLINE */ 13975a7dfde8Smrg#line 160 "winprefsyacc.y" 13985a7dfde8Smrg { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 1399c82838c1Smrg#line 1400 "winprefsyacc.c" 140005b261ecSmrg break; 140105b261ecSmrg 1402dc61d50dSmrg case 21: /* rootmenu: ROOTMENU STRING NEWLINE */ 14035a7dfde8Smrg#line 163 "winprefsyacc.y" 14045a7dfde8Smrg { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 1405c82838c1Smrg#line 1406 "winprefsyacc.c" 140605b261ecSmrg break; 140705b261ecSmrg 1408dc61d50dSmrg case 22: /* defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE */ 14095a7dfde8Smrg#line 166 "winprefsyacc.y" 14105a7dfde8Smrg { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); } 1411c82838c1Smrg#line 1412 "winprefsyacc.c" 141205b261ecSmrg break; 141305b261ecSmrg 1414dc61d50dSmrg case 23: /* defaulticon: DEFAULTICON STRING NEWLINE */ 14155a7dfde8Smrg#line 169 "winprefsyacc.y" 14165a7dfde8Smrg { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 1417c82838c1Smrg#line 1418 "winprefsyacc.c" 141805b261ecSmrg break; 141905b261ecSmrg 1420dc61d50dSmrg case 24: /* icondirectory: ICONDIRECTORY STRING NEWLINE */ 14215a7dfde8Smrg#line 172 "winprefsyacc.y" 14225a7dfde8Smrg { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 1423c82838c1Smrg#line 1424 "winprefsyacc.c" 142405b261ecSmrg break; 142505b261ecSmrg 1426dc61d50dSmrg case 25: /* menuline: SEPARATOR NEWLINE newline_or_nada */ 14275a7dfde8Smrg#line 175 "winprefsyacc.y" 14285a7dfde8Smrg { AddMenuLine("-", CMD_SEPARATOR, ""); } 1429c82838c1Smrg#line 1430 "winprefsyacc.c" 143005b261ecSmrg break; 143105b261ecSmrg 1432dc61d50dSmrg case 26: /* menuline: STRING ALWAYSONTOP NEWLINE newline_or_nada */ 14335a7dfde8Smrg#line 176 "winprefsyacc.y" 14345a7dfde8Smrg { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); } 1435c82838c1Smrg#line 1436 "winprefsyacc.c" 143605b261ecSmrg break; 143705b261ecSmrg 1438dc61d50dSmrg case 27: /* menuline: STRING EXEC STRING NEWLINE newline_or_nada */ 14395a7dfde8Smrg#line 177 "winprefsyacc.y" 14405a7dfde8Smrg { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } 1441c82838c1Smrg#line 1442 "winprefsyacc.c" 144205b261ecSmrg break; 144305b261ecSmrg 1444dc61d50dSmrg case 28: /* menuline: STRING MENU STRING NEWLINE newline_or_nada */ 14455a7dfde8Smrg#line 178 "winprefsyacc.y" 14465a7dfde8Smrg { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } 1447c82838c1Smrg#line 1448 "winprefsyacc.c" 144805b261ecSmrg break; 144905b261ecSmrg 1450dc61d50dSmrg case 29: /* menuline: STRING RELOAD NEWLINE newline_or_nada */ 14515a7dfde8Smrg#line 179 "winprefsyacc.y" 14525a7dfde8Smrg { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); } 1453c82838c1Smrg#line 1454 "winprefsyacc.c" 145405b261ecSmrg break; 145505b261ecSmrg 1456dc61d50dSmrg case 32: /* $@1: %empty */ 14575a7dfde8Smrg#line 186 "winprefsyacc.y" 14585a7dfde8Smrg { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 1459c82838c1Smrg#line 1460 "winprefsyacc.c" 146005b261ecSmrg break; 146105b261ecSmrg 1462dc61d50dSmrg case 33: /* menu: MENU STRING LB $@1 newline_or_nada menulist RB */ 14635a7dfde8Smrg#line 186 "winprefsyacc.y" 14645a7dfde8Smrg {CloseMenu();} 1465c82838c1Smrg#line 1466 "winprefsyacc.c" 146605b261ecSmrg break; 146705b261ecSmrg 1468dc61d50dSmrg case 34: /* iconline: STRING STRING NEWLINE newline_or_nada */ 14695a7dfde8Smrg#line 189 "winprefsyacc.y" 14705a7dfde8Smrg { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); } 1471c82838c1Smrg#line 1472 "winprefsyacc.c" 147205b261ecSmrg break; 147305b261ecSmrg 1474dc61d50dSmrg case 37: /* $@2: %empty */ 14755a7dfde8Smrg#line 196 "winprefsyacc.y" 14765a7dfde8Smrg {OpenIcons();} 1477c82838c1Smrg#line 1478 "winprefsyacc.c" 147805b261ecSmrg break; 147905b261ecSmrg 1480dc61d50dSmrg case 38: /* icons: ICONS LB $@2 newline_or_nada iconlist RB */ 14815a7dfde8Smrg#line 196 "winprefsyacc.y" 14825a7dfde8Smrg {CloseIcons();} 1483c82838c1Smrg#line 1484 "winprefsyacc.c" 148405b261ecSmrg break; 148505b261ecSmrg 1486dc61d50dSmrg case 39: /* group1: TOPMOST */ 14875a7dfde8Smrg#line 199 "winprefsyacc.y" 14885a7dfde8Smrg { (yyval.uVal)=STYLE_TOPMOST; } 1489c82838c1Smrg#line 1490 "winprefsyacc.c" 14906747b715Smrg break; 14916747b715Smrg 1492dc61d50dSmrg case 40: /* group1: MAXIMIZE */ 14935a7dfde8Smrg#line 200 "winprefsyacc.y" 14945a7dfde8Smrg { (yyval.uVal)=STYLE_MAXIMIZE; } 1495c82838c1Smrg#line 1496 "winprefsyacc.c" 14966747b715Smrg break; 14976747b715Smrg 1498dc61d50dSmrg case 41: /* group1: MINIMIZE */ 14995a7dfde8Smrg#line 201 "winprefsyacc.y" 15005a7dfde8Smrg { (yyval.uVal)=STYLE_MINIMIZE; } 1501c82838c1Smrg#line 1502 "winprefsyacc.c" 15026747b715Smrg break; 15036747b715Smrg 1504dc61d50dSmrg case 42: /* group1: BOTTOM */ 15055a7dfde8Smrg#line 202 "winprefsyacc.y" 15065a7dfde8Smrg { (yyval.uVal)=STYLE_BOTTOM; } 1507c82838c1Smrg#line 1508 "winprefsyacc.c" 15086747b715Smrg break; 15096747b715Smrg 1510dc61d50dSmrg case 43: /* group2: NOTITLE */ 15115a7dfde8Smrg#line 205 "winprefsyacc.y" 15125a7dfde8Smrg { (yyval.uVal)=STYLE_NOTITLE; } 1513c82838c1Smrg#line 1514 "winprefsyacc.c" 15146747b715Smrg break; 15156747b715Smrg 1516dc61d50dSmrg case 44: /* group2: OUTLINE */ 15175a7dfde8Smrg#line 206 "winprefsyacc.y" 15185a7dfde8Smrg { (yyval.uVal)=STYLE_OUTLINE; } 1519c82838c1Smrg#line 1520 "winprefsyacc.c" 15206747b715Smrg break; 15216747b715Smrg 1522dc61d50dSmrg case 45: /* group2: NOFRAME */ 15235a7dfde8Smrg#line 207 "winprefsyacc.y" 15245a7dfde8Smrg { (yyval.uVal)=STYLE_NOFRAME; } 1525c82838c1Smrg#line 1526 "winprefsyacc.c" 15266747b715Smrg break; 15276747b715Smrg 1528dc61d50dSmrg case 46: /* stylecombo: group1 */ 15295a7dfde8Smrg#line 210 "winprefsyacc.y" 15305a7dfde8Smrg { (yyval.uVal)=(yyvsp[0].uVal); } 1531c82838c1Smrg#line 1532 "winprefsyacc.c" 15326747b715Smrg break; 15336747b715Smrg 1534dc61d50dSmrg case 47: /* stylecombo: group2 */ 15355a7dfde8Smrg#line 211 "winprefsyacc.y" 15365a7dfde8Smrg { (yyval.uVal)=(yyvsp[0].uVal); } 1537c82838c1Smrg#line 1538 "winprefsyacc.c" 15386747b715Smrg break; 15396747b715Smrg 1540dc61d50dSmrg case 48: /* stylecombo: group1 group2 */ 15415a7dfde8Smrg#line 212 "winprefsyacc.y" 15425a7dfde8Smrg { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } 1543c82838c1Smrg#line 1544 "winprefsyacc.c" 15446747b715Smrg break; 15456747b715Smrg 1546dc61d50dSmrg case 49: /* stylecombo: group2 group1 */ 15475a7dfde8Smrg#line 213 "winprefsyacc.y" 15485a7dfde8Smrg { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } 1549c82838c1Smrg#line 1550 "winprefsyacc.c" 15506747b715Smrg break; 15516747b715Smrg 1552dc61d50dSmrg case 50: /* styleline: STRING stylecombo NEWLINE newline_or_nada */ 15535a7dfde8Smrg#line 216 "winprefsyacc.y" 15545a7dfde8Smrg { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); } 1555c82838c1Smrg#line 1556 "winprefsyacc.c" 15566747b715Smrg break; 15576747b715Smrg 1558dc61d50dSmrg case 53: /* $@3: %empty */ 15595a7dfde8Smrg#line 223 "winprefsyacc.y" 15605a7dfde8Smrg {OpenStyles();} 1561c82838c1Smrg#line 1562 "winprefsyacc.c" 15626747b715Smrg break; 15636747b715Smrg 1564dc61d50dSmrg case 54: /* styles: STYLES LB $@3 newline_or_nada stylelist RB */ 15655a7dfde8Smrg#line 223 "winprefsyacc.y" 15665a7dfde8Smrg {CloseStyles();} 1567c82838c1Smrg#line 1568 "winprefsyacc.c" 15686747b715Smrg break; 15696747b715Smrg 1570dc61d50dSmrg case 55: /* atspot: %empty */ 15715a7dfde8Smrg#line 226 "winprefsyacc.y" 15725a7dfde8Smrg { (yyval.iVal)=AT_END; } 1573c82838c1Smrg#line 1574 "winprefsyacc.c" 157405b261ecSmrg break; 157505b261ecSmrg 1576dc61d50dSmrg case 56: /* atspot: ATSTART */ 15775a7dfde8Smrg#line 227 "winprefsyacc.y" 15785a7dfde8Smrg { (yyval.iVal)=AT_START; } 1579c82838c1Smrg#line 1580 "winprefsyacc.c" 158005b261ecSmrg break; 158105b261ecSmrg 1582dc61d50dSmrg case 57: /* atspot: ATEND */ 15835a7dfde8Smrg#line 228 "winprefsyacc.y" 15845a7dfde8Smrg { (yyval.iVal)=AT_END; } 1585c82838c1Smrg#line 1586 "winprefsyacc.c" 158605b261ecSmrg break; 158705b261ecSmrg 1588dc61d50dSmrg case 58: /* sysmenuline: STRING STRING atspot NEWLINE newline_or_nada */ 15895a7dfde8Smrg#line 231 "winprefsyacc.y" 15905a7dfde8Smrg { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); } 1591c82838c1Smrg#line 1592 "winprefsyacc.c" 159205b261ecSmrg break; 159305b261ecSmrg 1594dc61d50dSmrg case 61: /* $@4: %empty */ 15955a7dfde8Smrg#line 238 "winprefsyacc.y" 15965a7dfde8Smrg {OpenSysMenu();} 1597c82838c1Smrg#line 1598 "winprefsyacc.c" 159805b261ecSmrg break; 159905b261ecSmrg 1600dc61d50dSmrg case 62: /* sysmenu: SYSMENU LB NEWLINE $@4 newline_or_nada sysmenulist RB */ 16015a7dfde8Smrg#line 238 "winprefsyacc.y" 16025a7dfde8Smrg {CloseSysMenu();} 1603c82838c1Smrg#line 1604 "winprefsyacc.c" 160405b261ecSmrg break; 160505b261ecSmrg 1606dc61d50dSmrg case 63: /* forceexit: FORCEEXIT NEWLINE */ 16075a7dfde8Smrg#line 241 "winprefsyacc.y" 16085a7dfde8Smrg { pref.fForceExit = TRUE; } 1609c82838c1Smrg#line 1610 "winprefsyacc.c" 16106747b715Smrg break; 16116747b715Smrg 1612dc61d50dSmrg case 64: /* silentexit: SILENTEXIT NEWLINE */ 16135a7dfde8Smrg#line 244 "winprefsyacc.y" 16145a7dfde8Smrg { pref.fSilentExit = TRUE; } 1615c82838c1Smrg#line 1616 "winprefsyacc.c" 161605b261ecSmrg break; 161705b261ecSmrg 1618dc61d50dSmrg case 65: /* debug: "DEBUG" STRING NEWLINE */ 16195a7dfde8Smrg#line 247 "winprefsyacc.y" 16205a7dfde8Smrg { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } 1621c82838c1Smrg#line 1622 "winprefsyacc.c" 162205b261ecSmrg break; 162305b261ecSmrg 162405b261ecSmrg 1625c82838c1Smrg#line 1626 "winprefsyacc.c" 16265a7dfde8Smrg 162705b261ecSmrg default: break; 162805b261ecSmrg } 16299ace9065Smrg /* User semantic actions sometimes alter yychar, and that requires 16309ace9065Smrg that yytoken be updated with the new translation. We take the 16319ace9065Smrg approach of translating immediately before every use of yytoken. 16329ace9065Smrg One alternative is translating here after every semantic action, 16339ace9065Smrg but that translation would be missed if the semantic action invokes 16349ace9065Smrg YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 16359ace9065Smrg if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 16369ace9065Smrg incorrect destructor might then be invoked immediately. In the 16379ace9065Smrg case of YYERROR or YYBACKUP, subsequent parser actions might lead 16389ace9065Smrg to an incorrect destructor call or verbose syntax error message 16399ace9065Smrg before the lookahead is translated. */ 1640dc61d50dSmrg YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); 164105b261ecSmrg 164205b261ecSmrg YYPOPSTACK (yylen); 164305b261ecSmrg yylen = 0; 164405b261ecSmrg 164505b261ecSmrg *++yyvsp = yyval; 164605b261ecSmrg 164735c4bbdfSmrg /* Now 'shift' the result of the reduction. Determine what state 164805b261ecSmrg that goes to, based on the state we popped back to and the rule 164905b261ecSmrg number reduced by. */ 16505a7dfde8Smrg { 16515a7dfde8Smrg const int yylhs = yyr1[yyn] - YYNTOKENS; 16525a7dfde8Smrg const int yyi = yypgoto[yylhs] + *yyssp; 16535a7dfde8Smrg yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp 16545a7dfde8Smrg ? yytable[yyi] 16555a7dfde8Smrg : yydefgoto[yylhs]); 16565a7dfde8Smrg } 165705b261ecSmrg 165805b261ecSmrg goto yynewstate; 165905b261ecSmrg 166005b261ecSmrg 166135c4bbdfSmrg/*--------------------------------------. 166235c4bbdfSmrg| yyerrlab -- here on detecting error. | 166335c4bbdfSmrg`--------------------------------------*/ 166405b261ecSmrgyyerrlab: 16659ace9065Smrg /* Make sure we have latest lookahead translation. See comments at 16669ace9065Smrg user semantic actions for why this is necessary. */ 1667dc61d50dSmrg yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); 166805b261ecSmrg /* If not already recovering from an error, report this error. */ 166905b261ecSmrg if (!yyerrstatus) 167005b261ecSmrg { 167105b261ecSmrg ++yynerrs; 167205b261ecSmrg yyerror (YY_("syntax error")); 167305b261ecSmrg } 167405b261ecSmrg 167505b261ecSmrg if (yyerrstatus == 3) 167605b261ecSmrg { 16774642e01fSmrg /* If just tried and failed to reuse lookahead token after an 167835c4bbdfSmrg error, discard it. */ 167905b261ecSmrg 168005b261ecSmrg if (yychar <= YYEOF) 168135c4bbdfSmrg { 168235c4bbdfSmrg /* Return failure if at end of input. */ 168335c4bbdfSmrg if (yychar == YYEOF) 168435c4bbdfSmrg YYABORT; 168535c4bbdfSmrg } 168605b261ecSmrg else 168735c4bbdfSmrg { 168835c4bbdfSmrg yydestruct ("Error: discarding", 168935c4bbdfSmrg yytoken, &yylval); 169035c4bbdfSmrg yychar = YYEMPTY; 169135c4bbdfSmrg } 169205b261ecSmrg } 169305b261ecSmrg 16944642e01fSmrg /* Else will try to reuse lookahead token after shifting the error 169505b261ecSmrg token. */ 169605b261ecSmrg goto yyerrlab1; 169705b261ecSmrg 169805b261ecSmrg 169905b261ecSmrg/*---------------------------------------------------. 170005b261ecSmrg| yyerrorlab -- error raised explicitly by YYERROR. | 170105b261ecSmrg`---------------------------------------------------*/ 170205b261ecSmrgyyerrorlab: 17035a7dfde8Smrg /* Pacify compilers when the user code never invokes YYERROR and the 17045a7dfde8Smrg label yyerrorlab therefore never appears in user code. */ 17055a7dfde8Smrg if (0) 17065a7dfde8Smrg YYERROR; 1707c82838c1Smrg ++yynerrs; 170805b261ecSmrg 170935c4bbdfSmrg /* Do not reclaim the symbols of the rule whose action triggered 171005b261ecSmrg this YYERROR. */ 171105b261ecSmrg YYPOPSTACK (yylen); 171205b261ecSmrg yylen = 0; 171305b261ecSmrg YY_STACK_PRINT (yyss, yyssp); 171405b261ecSmrg yystate = *yyssp; 171505b261ecSmrg goto yyerrlab1; 171605b261ecSmrg 171705b261ecSmrg 171805b261ecSmrg/*-------------------------------------------------------------. 171905b261ecSmrg| yyerrlab1 -- common code for both syntax error and YYERROR. | 172005b261ecSmrg`-------------------------------------------------------------*/ 172105b261ecSmrgyyerrlab1: 172235c4bbdfSmrg yyerrstatus = 3; /* Each real token shifted decrements this. */ 172305b261ecSmrg 1724dc61d50dSmrg /* Pop stack until we find a state that shifts the error token. */ 172505b261ecSmrg for (;;) 172605b261ecSmrg { 172705b261ecSmrg yyn = yypact[yystate]; 17289ace9065Smrg if (!yypact_value_is_default (yyn)) 172935c4bbdfSmrg { 1730dc61d50dSmrg yyn += YYSYMBOL_YYerror; 1731dc61d50dSmrg if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) 173235c4bbdfSmrg { 173335c4bbdfSmrg yyn = yytable[yyn]; 173435c4bbdfSmrg if (0 < yyn) 173535c4bbdfSmrg break; 173635c4bbdfSmrg } 173735c4bbdfSmrg } 173805b261ecSmrg 173905b261ecSmrg /* Pop the current state because it cannot handle the error token. */ 174005b261ecSmrg if (yyssp == yyss) 174135c4bbdfSmrg YYABORT; 174205b261ecSmrg 174305b261ecSmrg 174405b261ecSmrg yydestruct ("Error: popping", 1745dc61d50dSmrg YY_ACCESSING_SYMBOL (yystate), yyvsp); 174605b261ecSmrg YYPOPSTACK (1); 174705b261ecSmrg yystate = *yyssp; 174805b261ecSmrg YY_STACK_PRINT (yyss, yyssp); 174905b261ecSmrg } 175005b261ecSmrg 175135c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 175205b261ecSmrg *++yyvsp = yylval; 175335c4bbdfSmrg YY_IGNORE_MAYBE_UNINITIALIZED_END 175405b261ecSmrg 175505b261ecSmrg 175605b261ecSmrg /* Shift the error token. */ 1757dc61d50dSmrg YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); 175805b261ecSmrg 175905b261ecSmrg yystate = yyn; 176005b261ecSmrg goto yynewstate; 176105b261ecSmrg 176205b261ecSmrg 176305b261ecSmrg/*-------------------------------------. 176405b261ecSmrg| yyacceptlab -- YYACCEPT comes here. | 176505b261ecSmrg`-------------------------------------*/ 176605b261ecSmrgyyacceptlab: 176705b261ecSmrg yyresult = 0; 1768c82838c1Smrg goto yyreturnlab; 176905b261ecSmrg 17705a7dfde8Smrg 177105b261ecSmrg/*-----------------------------------. 177205b261ecSmrg| yyabortlab -- YYABORT comes here. | 177305b261ecSmrg`-----------------------------------*/ 177405b261ecSmrgyyabortlab: 177505b261ecSmrg yyresult = 1; 1776c82838c1Smrg goto yyreturnlab; 177705b261ecSmrg 17785a7dfde8Smrg 1779c82838c1Smrg/*-----------------------------------------------------------. 1780c82838c1Smrg| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | 1781c82838c1Smrg`-----------------------------------------------------------*/ 178205b261ecSmrgyyexhaustedlab: 178305b261ecSmrg yyerror (YY_("memory exhausted")); 178405b261ecSmrg yyresult = 2; 1785c82838c1Smrg goto yyreturnlab; 178605b261ecSmrg 17875a7dfde8Smrg 1788c82838c1Smrg/*----------------------------------------------------------. 1789c82838c1Smrg| yyreturnlab -- parsing is finished, clean up and return. | 1790c82838c1Smrg`----------------------------------------------------------*/ 1791c82838c1Smrgyyreturnlab: 17924642e01fSmrg if (yychar != YYEMPTY) 17939ace9065Smrg { 17949ace9065Smrg /* Make sure we have latest lookahead translation. See comments at 17959ace9065Smrg user semantic actions for why this is necessary. */ 17969ace9065Smrg yytoken = YYTRANSLATE (yychar); 17979ace9065Smrg yydestruct ("Cleanup: discarding lookahead", 17989ace9065Smrg yytoken, &yylval); 17999ace9065Smrg } 180035c4bbdfSmrg /* Do not reclaim the symbols of the rule whose action triggered 180105b261ecSmrg this YYABORT or YYACCEPT. */ 180205b261ecSmrg YYPOPSTACK (yylen); 180305b261ecSmrg YY_STACK_PRINT (yyss, yyssp); 180405b261ecSmrg while (yyssp != yyss) 180505b261ecSmrg { 180605b261ecSmrg yydestruct ("Cleanup: popping", 1807dc61d50dSmrg YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); 180805b261ecSmrg YYPOPSTACK (1); 180905b261ecSmrg } 181005b261ecSmrg#ifndef yyoverflow 181105b261ecSmrg if (yyss != yyssa) 181205b261ecSmrg YYSTACK_FREE (yyss); 181305b261ecSmrg#endif 1814dc61d50dSmrg 181535c4bbdfSmrg return yyresult; 181605b261ecSmrg} 1817dc61d50dSmrg 18185a7dfde8Smrg#line 251 "winprefsyacc.y" 181905b261ecSmrg 182005b261ecSmrg/* 182105b261ecSmrg * Errors in parsing abort and print log messages 182205b261ecSmrg */ 182305b261ecSmrgstatic int 182435c4bbdfSmrgyyerror (const char *s) 182505b261ecSmrg{ 182605b261ecSmrg ErrorF("LoadPreferences: %s line %d\n", s, yylineno); 182705b261ecSmrg return 1; 182805b261ecSmrg} 182905b261ecSmrg 183005b261ecSmrg/* Miscellaneous functions to store TOKENs into the structure */ 183105b261ecSmrgstatic void 183205b261ecSmrgSetIconDirectory (char *path) 183305b261ecSmrg{ 183405b261ecSmrg strncpy (pref.iconDirectory, path, PATH_MAX); 183505b261ecSmrg pref.iconDirectory[PATH_MAX] = 0; 183605b261ecSmrg} 183705b261ecSmrg 183805b261ecSmrgstatic void 183905b261ecSmrgSetDefaultIcon (char *fname) 184005b261ecSmrg{ 184105b261ecSmrg strncpy (pref.defaultIconName, fname, NAME_MAX); 184205b261ecSmrg pref.defaultIconName[NAME_MAX] = 0; 184305b261ecSmrg} 184405b261ecSmrg 184505b261ecSmrgstatic void 184605b261ecSmrgSetTrayIcon (char *fname) 184705b261ecSmrg{ 184805b261ecSmrg strncpy (pref.trayIconName, fname, NAME_MAX); 184905b261ecSmrg pref.trayIconName[NAME_MAX] = 0; 185005b261ecSmrg} 185105b261ecSmrg 185205b261ecSmrgstatic void 185335c4bbdfSmrgSetRootMenu (char *menuname) 185405b261ecSmrg{ 185535c4bbdfSmrg strncpy (pref.rootMenuName, menuname, MENU_MAX); 185605b261ecSmrg pref.rootMenuName[MENU_MAX] = 0; 185705b261ecSmrg} 185805b261ecSmrg 185905b261ecSmrgstatic void 186035c4bbdfSmrgSetDefaultSysMenu (char *menuname, int pos) 186105b261ecSmrg{ 186235c4bbdfSmrg strncpy (pref.defaultSysMenuName, menuname, MENU_MAX); 186305b261ecSmrg pref.defaultSysMenuName[MENU_MAX] = 0; 186405b261ecSmrg pref.defaultSysMenuPos = pos; 186505b261ecSmrg} 186605b261ecSmrg 186705b261ecSmrgstatic void 186805b261ecSmrgOpenMenu (char *menuname) 186905b261ecSmrg{ 187005b261ecSmrg if (menu.menuItem) free(menu.menuItem); 187105b261ecSmrg menu.menuItem = NULL; 187205b261ecSmrg strncpy(menu.menuName, menuname, MENU_MAX); 187305b261ecSmrg menu.menuName[MENU_MAX] = 0; 187405b261ecSmrg menu.menuItems = 0; 187505b261ecSmrg} 187605b261ecSmrg 187705b261ecSmrgstatic void 187835c4bbdfSmrgAddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param) 187905b261ecSmrg{ 188005b261ecSmrg if (menu.menuItem==NULL) 188135c4bbdfSmrg menu.menuItem = malloc(sizeof(MENUITEM)); 188205b261ecSmrg else 188335c4bbdfSmrg menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1)); 188405b261ecSmrg 188505b261ecSmrg strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX); 188605b261ecSmrg menu.menuItem[menu.menuItems].text[MENU_MAX] = 0; 188705b261ecSmrg 188805b261ecSmrg menu.menuItem[menu.menuItems].cmd = cmd; 188905b261ecSmrg 189005b261ecSmrg strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX); 189105b261ecSmrg menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0; 189205b261ecSmrg 189305b261ecSmrg menu.menuItem[menu.menuItems].commandID = 0; 189405b261ecSmrg 189505b261ecSmrg menu.menuItems++; 189605b261ecSmrg} 189705b261ecSmrg 189805b261ecSmrgstatic void 189905b261ecSmrgCloseMenu (void) 190005b261ecSmrg{ 190105b261ecSmrg if (menu.menuItem==NULL || menu.menuItems==0) 190205b261ecSmrg { 190305b261ecSmrg ErrorF("LoadPreferences: Empty menu detected\n"); 190405b261ecSmrg return; 190505b261ecSmrg } 190605b261ecSmrg 190705b261ecSmrg if (pref.menuItems) 190835c4bbdfSmrg pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED)); 190905b261ecSmrg else 191035c4bbdfSmrg pref.menu = malloc (sizeof(MENUPARSED)); 191105b261ecSmrg 191205b261ecSmrg memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED)); 191305b261ecSmrg pref.menuItems++; 191405b261ecSmrg 191505b261ecSmrg memset (&menu, 0, sizeof(MENUPARSED)); 191605b261ecSmrg} 191705b261ecSmrg 191805b261ecSmrgstatic void 191905b261ecSmrgOpenIcons (void) 192005b261ecSmrg{ 192105b261ecSmrg if (pref.icon != NULL) { 192205b261ecSmrg ErrorF("LoadPreferences: Redefining icon mappings\n"); 192305b261ecSmrg free(pref.icon); 192405b261ecSmrg pref.icon = NULL; 192505b261ecSmrg } 192605b261ecSmrg pref.iconItems = 0; 192705b261ecSmrg} 192805b261ecSmrg 192905b261ecSmrgstatic void 193005b261ecSmrgAddIconLine (char *matchstr, char *iconfile) 193105b261ecSmrg{ 193205b261ecSmrg if (pref.icon==NULL) 193335c4bbdfSmrg pref.icon = malloc(sizeof(ICONITEM)); 193405b261ecSmrg else 193535c4bbdfSmrg pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1)); 193605b261ecSmrg 193705b261ecSmrg strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX); 193805b261ecSmrg pref.icon[pref.iconItems].match[MENU_MAX] = 0; 193905b261ecSmrg 194005b261ecSmrg strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1); 194105b261ecSmrg pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0; 194205b261ecSmrg 194305b261ecSmrg pref.icon[pref.iconItems].hicon = 0; 194405b261ecSmrg 194505b261ecSmrg pref.iconItems++; 194605b261ecSmrg} 194705b261ecSmrg 194805b261ecSmrgstatic void 194905b261ecSmrgCloseIcons (void) 195005b261ecSmrg{ 195105b261ecSmrg} 195205b261ecSmrg 19536747b715Smrgstatic void 19546747b715SmrgOpenStyles (void) 19556747b715Smrg{ 19566747b715Smrg if (pref.style != NULL) { 19576747b715Smrg ErrorF("LoadPreferences: Redefining window style\n"); 19586747b715Smrg free(pref.style); 19596747b715Smrg pref.style = NULL; 19606747b715Smrg } 19616747b715Smrg pref.styleItems = 0; 19626747b715Smrg} 19636747b715Smrg 19646747b715Smrgstatic void 19656747b715SmrgAddStyleLine (char *matchstr, unsigned long style) 19666747b715Smrg{ 19676747b715Smrg if (pref.style==NULL) 196835c4bbdfSmrg pref.style = malloc(sizeof(STYLEITEM)); 19696747b715Smrg else 197035c4bbdfSmrg pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); 19716747b715Smrg 19726747b715Smrg strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX); 19736747b715Smrg pref.style[pref.styleItems].match[MENU_MAX] = 0; 19746747b715Smrg 19756747b715Smrg pref.style[pref.styleItems].type = style; 19766747b715Smrg 19776747b715Smrg pref.styleItems++; 19786747b715Smrg} 19796747b715Smrg 19806747b715Smrgstatic void 19816747b715SmrgCloseStyles (void) 19826747b715Smrg{ 19836747b715Smrg} 19846747b715Smrg 198505b261ecSmrgstatic void 198605b261ecSmrgOpenSysMenu (void) 198705b261ecSmrg{ 198805b261ecSmrg if (pref.sysMenu != NULL) { 198905b261ecSmrg ErrorF("LoadPreferences: Redefining system menu\n"); 199005b261ecSmrg free(pref.sysMenu); 199105b261ecSmrg pref.sysMenu = NULL; 199205b261ecSmrg } 199305b261ecSmrg pref.sysMenuItems = 0; 199405b261ecSmrg} 199505b261ecSmrg 199605b261ecSmrgstatic void 199705b261ecSmrgAddSysMenuLine (char *matchstr, char *menuname, int pos) 199805b261ecSmrg{ 199905b261ecSmrg if (pref.sysMenu==NULL) 200035c4bbdfSmrg pref.sysMenu = malloc(sizeof(SYSMENUITEM)); 200105b261ecSmrg else 200235c4bbdfSmrg pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1)); 200305b261ecSmrg 200405b261ecSmrg strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX); 200505b261ecSmrg pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0; 200605b261ecSmrg 200705b261ecSmrg strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX); 200805b261ecSmrg pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0; 200905b261ecSmrg 201005b261ecSmrg pref.sysMenu[pref.sysMenuItems].menuPos = pos; 201105b261ecSmrg 201205b261ecSmrg pref.sysMenuItems++; 201305b261ecSmrg} 201405b261ecSmrg 201505b261ecSmrgstatic void 201605b261ecSmrgCloseSysMenu (void) 201705b261ecSmrg{ 201805b261ecSmrg} 201905b261ecSmrg 2020