Bug Summary

File:gram.c
Location:line 1150, column 5
Description:Value stored to 'yystate' is never read

Annotated Source Code

1#ifndef lint
2static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
3#endif
4
5#define YYBYACC1 1
6#define YYMAJOR1 1
7#define YYMINOR9 9
8#define YYPATCH20100610 20100610
9
10#define YYEMPTY(-1) (-1)
11#define yyclearin(yychar = (-1)) (yychar = YYEMPTY(-1))
12#define yyerrok(yyerrflag = 0) (yyerrflag = 0)
13#define YYRECOVERING()(yyerrflag != 0) (yyerrflag != 0)
14
15#define YYPREFIX"yy" "yy"
16
17#define YYPURE0 0
18
19#line 68 "gram.y"
20#include <stdio.h>
21#include <ctype.h>
22#include "twm.h"
23#include "menus.h"
24#include "list.h"
25#include "util.h"
26#include "screen.h"
27#include "parse.h"
28#include "add_window.h"
29#include "icons.h"
30#include <X11/Xos.h>
31#include <X11/Xmu/CharSet.h>
32
33static char *Action = "";
34static char *Name = "";
35static MenuRoot *root, *pull = NULL((void*)0);
36
37static MenuRoot *GetRoot ( char *name, char *fore, char *back );
38static void GotButton ( int butt, int func );
39static void GotKey ( char *key, int func );
40static void GotTitleButton ( char *bitmapname, int func, Boolint rightside );
41static Boolint CheckWarpScreenArg ( char *s );
42static Boolint CheckWarpRingArg ( char *s );
43static Boolint CheckColormapArg ( char *s );
44
45static char *ptr;
46static name_list **list;
47static int cont = 0;
48static int color;
49int mods = 0;
50unsigned int mods_used = (ShiftMask(1<<0) | ControlMask(1<<2) | Mod1Mask(1<<3));
51
52extern int yylineno;
53#line 103 "gram.y"
54typedef union
55{
56 int num;
57 char *ptr;
58} YYSTYPE;
59#line 59 "gram.c"
60/* compatibility with bison */
61#ifdef YYPARSE_PARAM
62/* compatibility with FreeBSD */
63# ifdef YYPARSE_PARAM_TYPE
64# define YYPARSE_DECL()yyparse(void) yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
65# else
66# define YYPARSE_DECL()yyparse(void) yyparse(void *YYPARSE_PARAM)
67# endif
68#else
69# define YYPARSE_DECL()yyparse(void) yyparse(void)
70#endif
71
72/* Parameters sent to lex. */
73#ifdef YYLEX_PARAM
74# define YYLEX_DECL()yylex(void) yylex(void *YYLEX_PARAM)
75# define YYLEXyylex() yylex(YYLEX_PARAM)
76#else
77# define YYLEX_DECL()yylex(void) yylex(void)
78# define YYLEXyylex() yylex()
79#endif
80
81extern int YYPARSE_DECL()yyparse(void);
82extern int YYLEX_DECL()yylex(void);
83
84#define LB257 257
85#define RB258 258
86#define LP259 259
87#define RP260 260
88#define MENUS261 261
89#define MENU262 262
90#define BUTTON263 263
91#define DEFAULT_FUNCTION264 264
92#define PLUS265 265
93#define MINUS266 266
94#define ALL267 267
95#define OR268 268
96#define CURSORS269 269
97#define PIXMAPS270 270
98#define ICONS271 271
99#define COLOR272 272
100#define SAVECOLOR273 273
101#define MONOCHROME274 274
102#define FUNCTION275 275
103#define ICONMGR_SHOW276 276
104#define ICONMGR277 277
105#define WINDOW_FUNCTION278 278
106#define ZOOM279 279
107#define ICONMGRS280 280
108#define ICONMGR_GEOMETRY281 281
109#define ICONMGR_NOSHOW282 282
110#define MAKE_TITLE283 283
111#define GRAYSCALE284 284
112#define ICONIFY_BY_UNMAPPING285 285
113#define DONT_ICONIFY_BY_UNMAPPING286 286
114#define NO_TITLE287 287
115#define AUTO_RAISE288 288
116#define NO_HILITE289 289
117#define ICON_REGION290 290
118#define META291 291
119#define SHIFT292 292
120#define LOCK293 293
121#define CONTROL294 294
122#define WINDOW295 295
123#define TITLE296 296
124#define ICON297 297
125#define ROOT298 298
126#define FRAME299 299
127#define COLON300 300
128#define EQUALS301 301
129#define SQUEEZE_TITLE302 302
130#define DONT_SQUEEZE_TITLE303 303
131#define START_ICONIFIED304 304
132#define NO_TITLE_HILITE305 305
133#define TITLE_HILITE306 306
134#define MOVE307 307
135#define RESIZE308 308
136#define WAIT309 309
137#define SELECT310 310
138#define KILL311 311
139#define LEFT_TITLEBUTTON312 312
140#define RIGHT_TITLEBUTTON313 313
141#define NUMBER314 314
142#define KEYWORD315 315
143#define NKEYWORD316 316
144#define CKEYWORD317 317
145#define CLKEYWORD318 318
146#define FKEYWORD319 319
147#define FSKEYWORD320 320
148#define SKEYWORD321 321
149#define DKEYWORD322 322
150#define JKEYWORD323 323
151#define WINDOW_RING324 324
152#define WARP_CURSOR325 325
153#define ERRORTOKEN326 326
154#define NO_STACKMODE327 327
155#define STRING328 328
156#define YYERRCODE256 256
157static const short yylhs[] = { -1,
158 0, 24, 24, 6, 6, 6, 6, 6, 6, 6,
159 6, 6, 6, 6, 6, 25, 6, 6, 6, 6,
160 6, 6, 6, 6, 26, 6, 27, 6, 6, 28,
161 6, 29, 6, 30, 6, 6, 31, 6, 6, 32,
162 6, 6, 33, 6, 6, 34, 6, 35, 6, 36,
163 6, 37, 6, 38, 6, 39, 6, 40, 6, 41,
164 6, 42, 6, 6, 43, 6, 6, 6, 44, 6,
165 6, 45, 6, 13, 14, 15, 22, 23, 46, 46,
166 49, 49, 49, 49, 49, 49, 47, 47, 50, 50,
167 50, 50, 50, 50, 50, 50, 50, 48, 48, 51,
168 51, 51, 51, 51, 51, 51, 51, 51, 51, 2,
169 52, 52, 53, 3, 54, 54, 55, 55, 55, 55,
170 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
171 55, 55, 55, 55, 55, 55, 55, 55, 4, 56,
172 56, 17, 57, 17, 17, 5, 58, 58, 59, 59,
173 7, 60, 60, 61, 16, 62, 16, 16, 64, 16,
174 63, 63, 8, 65, 65, 66, 66, 9, 67, 67,
175 68, 10, 69, 69, 70, 11, 71, 71, 72, 12,
176 73, 73, 74, 74, 18, 18, 21, 21, 21, 19,
177 1, 20,
178};
179static const short yylen[] = { 2,
180 1, 0, 2, 1, 1, 1, 1, 1, 6, 3,
181 2, 2, 1, 2, 2, 0, 3, 1, 4, 4,
182 2, 2, 2, 2, 0, 3, 0, 3, 1, 0,
183 3, 0, 3, 0, 3, 1, 0, 3, 1, 0,
184 3, 1, 0, 3, 1, 0, 3, 0, 3, 0,
185 3, 0, 9, 0, 4, 0, 4, 0, 3, 0,
186 3, 0, 3, 2, 0, 3, 2, 2, 0, 3,
187 1, 0, 3, 1, 2, 2, 6, 6, 0, 2,
188 1, 1, 1, 1, 2, 1, 0, 2, 1, 1,
189 1, 1, 1, 1, 1, 1, 1, 0, 2, 1,
190 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
191 0, 2, 2, 3, 0, 2, 3, 2, 3, 2,
192 3, 2, 3, 2, 3, 2, 3, 2, 3, 2,
193 3, 2, 3, 2, 3, 2, 3, 2, 3, 0,
194 2, 2, 0, 4, 2, 3, 0, 2, 1, 1,
195 3, 0, 2, 2, 1, 0, 5, 1, 0, 3,
196 0, 5, 3, 0, 2, 3, 4, 3, 0, 2,
197 1, 3, 0, 2, 2, 3, 0, 2, 1, 3,
198 0, 2, 2, 7, 1, 2, 1, 2, 2, 2,
199 1, 1,
200};
201static const short yydefred[] = { 2,
202 0, 0, 4, 0, 0, 0, 0, 0, 58, 60,
203 0, 65, 0, 32, 0, 0, 30, 0, 0, 46,
204 62, 0, 25, 0, 50, 0, 0, 0, 0, 48,
205 0, 0, 0, 74, 0, 0, 72, 0, 0, 191,
206 0, 3, 5, 6, 7, 8, 0, 0, 192, 190,
207 185, 0, 67, 115, 15, 111, 14, 0, 0, 147,
208 64, 0, 56, 0, 68, 12, 0, 0, 0, 0,
209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
210 0, 0, 0, 76, 75, 0, 0, 0, 79, 23,
211 79, 21, 22, 24, 0, 0, 186, 0, 0, 173,
212 59, 140, 61, 0, 66, 0, 169, 33, 164, 31,
213 10, 28, 47, 63, 17, 26, 44, 51, 38, 0,
214 161, 160, 49, 35, 0, 0, 73, 70, 41, 0,
215 0, 0, 181, 55, 114, 0, 0, 0, 0, 0,
216 0, 0, 0, 0, 0, 0, 116, 110, 0, 112,
217 0, 0, 146, 150, 149, 148, 177, 57, 0, 0,
218 0, 0, 19, 20, 86, 0, 82, 83, 84, 98,
219 80, 87, 0, 0, 0, 0, 0, 0, 0, 0,
220 0, 0, 0, 0, 0, 113, 172, 0, 174, 139,
221 0, 0, 141, 0, 168, 171, 170, 163, 0, 165,
222 0, 157, 0, 85, 0, 0, 0, 180, 0, 182,
223 133, 125, 123, 119, 121, 117, 127, 129, 131, 135,
224 137, 175, 145, 0, 176, 179, 178, 0, 9, 0,
225 107, 108, 105, 106, 100, 101, 102, 103, 104, 0,
226 109, 99, 96, 97, 94, 95, 89, 90, 91, 92,
227 93, 0, 88, 52, 0, 183, 0, 0, 166, 0,
228 0, 187, 0, 78, 77, 0, 0, 152, 144, 167,
229 188, 189, 162, 53, 0, 0, 0, 151, 0, 153,
230 0, 154, 184,
231};
232static const short yydgoto[] = { 1,
233 41, 57, 55, 103, 61, 42, 269, 110, 108, 101,
234 158, 134, 43, 44, 45, 46, 193, 53, 47, 50,
235 263, 94, 90, 2, 72, 73, 69, 67, 64, 81,
236 76, 88, 74, 70, 80, 75, 266, 96, 106, 58,
237 59, 71, 62, 87, 86, 130, 206, 205, 171, 253,
238 242, 99, 150, 98, 147, 152, 257, 104, 156, 276,
239 280, 78, 162, 79, 160, 200, 159, 197, 151, 189,
240 194, 227, 174, 210,
241};
242static const short yysindex[] = { 0,
243 0, -183, 0, -312, -294, -291, -231, -227, 0, 0,
244 -224, 0, -312, 0, -291, -294, 0, -312, 0, 0,
245 0, 0, 0, 0, 0, 0, -312, 0, 0, 0,
246 0, -312, -312, 0, -294, -312, 0, 0, 0, 0,
247 -267, 0, 0, 0, 0, 0, -297, -222, 0, 0,
248 0, -312, 0, 0, 0, 0, 0, -219, -218, 0,
249 0, -218, 0, -217, 0, 0, -215, -294, -217, -217,
250 -218, -217, -217, -217, -217, -217, -287, -214, -217, -217,
251 -217, -241, -240, 0, 0, -217, -217, -217, 0, 0,
252 0, 0, 0, 0, -312, -206, 0, 787, -243, 0,
253 0, 0, 0, -256, 0, -203, 0, 0, 0, 0,
254 0, 0, 0, 0, 0, 0, 0, 0, 0, -264,
255 0, 0, 0, 0, -291, -291, 0, 0, 0, -247,
256 -116, -233, 0, 0, 0, -312, -312, -312, -312, -312,
257 -312, -312, -312, -312, -312, -312, 0, 0, -312, 0,
258 -252, -249, 0, 0, 0, 0, 0, 0, -251, -250,
259 -294, -246, 0, 0, 0, -294, 0, 0, 0, 0,
260 0, 0, -312, -245, -312, -312, -312, -312, -312, -312,
261 -312, -312, -312, -312, -312, 0, 0, -312, 0, 0,
262 -312, -312, 0, -255, 0, 0, 0, 0, -312, 0,
263 -294, 0, -238, 0, 771, 1035, -189, 0, -207, 0,
264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
265 0, 0, 0, 0, 0, 0, 0, -303, 0, -248,
266 0, 0, 0, 0, 0, 0, 0, 0, 0, -291,
267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
268 0, -291, 0, 0, -312, 0, -163, -294, 0, -294,
269 -294, 0, -294, 0, 0, -206, -186, 0, 0, 0,
270 0, 0, 0, 0, -312, -244, -145, 0, -312, 0,
271 -291, 0, 0,
272};
273static const short yyrindex[] = { 0,
274 0, 116, 0, 0, 0, 0, 0, 0, 0, 0,
275 0, 0, 0, 0, 0, 658, 0, 0, 1, 0,
276 0, 74, 0, 147, 0, 220, 0, 293, 366, 0,
277 439, 0, 0, 0, 0, 0, 0, 512, 585, 0,
278 0, 0, 0, 0, 0, 0, 0, -231, 0, 0,
279 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
280 0, 0, 0, 0, 0, 0, 0, 731, 0, 0,
281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
282 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
283 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
286 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
287 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
288 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
290 0, 0, 0, 0, 0, -59, 0, 0, 0, 0,
291 0, 0, 0, 0, 814, 830, 854, 870, 894, 910,
292 934, 950, 974, 990, 1014, 0, 0, 0, 0, 0,
293 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
295 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
296 0, 0, 0, -209, 0, 0, 0, 0, 0, 0,
297 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
298 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
299 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
300 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
301 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
302 0, 0, 0,
303};
304static const short yygindex[] = { 0,
305 23, 0, 0, -52, 0, 0, 0, 0, 1267, 0,
306 0, -149, 0, 0, 0, 0, 0, -15, 0, -11,
307 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
308 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
309 0, 0, 0, 0, 0, 32, 0, 0, 0, 0,
310 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
311 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
312 0, 0, 0, 0,
313};
314#define YYTABLESIZE1355 1355
315static const short yytable[] = { 65,
316 29, 153, 225, 91, 66, 187, 195, 198, 190, 105,
317 49, 202, 208, 278, 148, 40, 260, 261, 114, 49,
318 165, 51, 52, 84, 40, 54, 48, 51, 52, 56,
319 40, 93, 60, 89, 120, 63, 95, 100, 102, 107,
320 68, 109, 121, 166, 167, 168, 169, 143, 142, 77,
321 133, 255, 170, 157, 82, 83, 111, 161, 85, 125,
322 126, 154, 149, 51, 52, 49, 173, 191, 192, 92,
323 254, 40, 3, 18, 97, 40, 40, 40, 4, 5,
324 6, 40, 40, 40, 230, 7, 8, 9, 10, 11,
325 12, 13, 14, 268, 15, 16, 17, 18, 19, 20,
326 21, 22, 23, 24, 25, 26, 27, 142, 142, 163,
327 164, 51, 52, 275, 281, 1, 274, 132, 28, 29,
328 30, 31, 131, 0, 0, 0, 155, 0, 32, 33,
329 0, 34, 35, 0, 0, 0, 0, 36, 0, 0,
330 37, 38, 0, 39, 40, 0, 45, 0, 0, 201,
331 0, 165, 0, 0, 204, 0, 0, 0, 175, 176,
332 177, 178, 179, 180, 181, 182, 183, 184, 185, 0,
333 0, 186, 0, 188, 166, 167, 168, 169, 226, 0,
334 0, 196, 199, 172, 203, 0, 0, 0, 0, 229,
335 0, 0, 0, 256, 0, 207, 209, 211, 212, 213,
336 214, 215, 216, 217, 218, 219, 220, 221, 81, 0,
337 222, 0, 0, 223, 224, 0, 259, 0, 262, 39,
338 0, 228, 0, 0, 264, 0, 0, 241, 0, 0,
339 0, 81, 81, 81, 81, 0, 265, 0, 0, 0,
340 81, 0, 0, 0, 0, 0, 270, 0, 271, 272,
341 258, 273, 0, 0, 0, 0, 29, 27, 0, 0,
342 0, 0, 29, 29, 29, 283, 0, 0, 0, 29,
343 29, 29, 29, 29, 29, 29, 29, 267, 29, 29,
344 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
345 29, 0, 155, 0, 0, 0, 0, 277, 279, 0,
346 0, 282, 29, 29, 29, 29, 0, 0, 0, 0,
347 0, 0, 29, 29, 0, 29, 29, 0, 0, 0,
348 0, 29, 0, 0, 29, 29, 0, 29, 29, 18,
349 16, 0, 0, 0, 0, 18, 18, 18, 0, 0,
350 0, 0, 18, 18, 18, 18, 18, 18, 18, 18,
351 0, 18, 18, 18, 18, 18, 18, 18, 18, 18,
352 18, 18, 18, 18, 0, 158, 0, 0, 0, 0,
353 0, 0, 0, 0, 0, 18, 18, 18, 18, 0,
354 0, 0, 0, 0, 0, 18, 18, 0, 18, 18,
355 0, 0, 0, 0, 18, 0, 0, 18, 18, 0,
356 18, 18, 45, 43, 0, 0, 0, 0, 45, 45,
357 45, 0, 0, 0, 0, 45, 45, 45, 45, 45,
358 45, 45, 45, 0, 45, 45, 45, 45, 45, 45,
359 45, 45, 45, 45, 45, 45, 45, 0, 36, 0,
360 0, 0, 0, 0, 0, 0, 0, 0, 45, 45,
361 45, 45, 0, 0, 0, 0, 0, 0, 45, 45,
362 0, 45, 45, 0, 0, 0, 0, 45, 0, 0,
363 45, 45, 0, 45, 45, 39, 37, 0, 0, 0,
364 0, 39, 39, 39, 0, 0, 0, 0, 39, 39,
365 39, 39, 39, 39, 39, 39, 0, 39, 39, 39,
366 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
367 0, 71, 0, 0, 0, 0, 0, 0, 0, 0,
368 0, 39, 39, 39, 39, 0, 0, 0, 0, 0,
369 0, 39, 39, 0, 39, 39, 0, 0, 0, 0,
370 39, 0, 0, 39, 39, 0, 39, 39, 155, 156,
371 0, 0, 0, 0, 155, 155, 155, 0, 0, 0,
372 0, 155, 155, 155, 155, 155, 155, 155, 155, 0,
373 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
374 155, 155, 155, 0, 42, 0, 0, 0, 0, 0,
375 0, 0, 0, 0, 155, 155, 155, 155, 0, 0,
376 0, 0, 0, 0, 155, 155, 0, 155, 155, 0,
377 0, 0, 0, 155, 0, 0, 155, 155, 0, 155,
378 155, 158, 159, 0, 0, 0, 0, 158, 158, 158,
379 0, 0, 0, 0, 158, 158, 158, 158, 158, 158,
380 158, 158, 0, 158, 158, 158, 158, 158, 158, 158,
381 158, 158, 158, 158, 158, 158, 0, 13, 0, 0,
382 0, 0, 0, 0, 0, 0, 0, 158, 158, 158,
383 158, 0, 0, 0, 0, 0, 0, 158, 158, 0,
384 158, 158, 0, 0, 0, 0, 158, 0, 0, 158,
385 158, 0, 158, 158, 36, 34, 0, 0, 0, 0,
386 36, 36, 36, 0, 0, 0, 0, 36, 36, 36,
387 36, 36, 36, 36, 36, 0, 36, 36, 36, 36,
388 36, 36, 36, 36, 36, 36, 36, 36, 36, 0,
389 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
390 36, 36, 36, 36, 0, 0, 0, 0, 0, 0,
391 36, 36, 0, 36, 36, 0, 0, 0, 0, 36,
392 0, 0, 36, 36, 0, 36, 36, 71, 69, 0,
393 0, 0, 0, 71, 71, 71, 0, 0, 0, 0,
394 71, 71, 71, 71, 71, 71, 71, 71, 0, 71,
395 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
396 71, 71, 0, 0, 0, 0, 0, 0, 0, 0,
397 0, 0, 0, 71, 71, 71, 71, 0, 0, 0,
398 0, 0, 0, 71, 71, 0, 71, 71, 0, 0,
399 0, 0, 71, 0, 0, 71, 71, 0, 71, 71,
400 42, 40, 0, 0, 0, 0, 42, 42, 42, 0,
401 0, 0, 0, 42, 42, 42, 42, 42, 42, 42,
402 42, 0, 42, 42, 42, 42, 42, 42, 42, 42,
403 42, 42, 42, 42, 42, 0, 0, 0, 0, 0,
404 0, 0, 0, 0, 0, 0, 42, 42, 42, 42,
405 0, 0, 0, 0, 0, 0, 42, 42, 0, 42,
406 42, 0, 0, 0, 0, 42, 0, 0, 42, 42,
407 0, 42, 42, 13, 0, 0, 0, 0, 0, 13,
408 13, 13, 0, 0, 0, 0, 13, 13, 13, 13,
409 13, 13, 13, 13, 0, 13, 13, 13, 13, 13,
410 13, 13, 13, 13, 13, 13, 13, 13, 0, 0,
411 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,
412 13, 13, 13, 0, 0, 0, 0, 0, 0, 13,
413 13, 0, 13, 13, 0, 0, 0, 0, 13, 0,
414 0, 13, 13, 0, 13, 13, 11, 0, 0, 0,
415 0, 0, 11, 11, 11, 0, 0, 0, 0, 11,
416 11, 11, 11, 11, 11, 11, 11, 0, 11, 11,
417 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
418 11, 0, 0, 0, 0, 0, 0, 0, 0, 0,
419 0, 0, 11, 11, 11, 11, 0, 231, 232, 0,
420 0, 0, 11, 11, 135, 11, 11, 233, 136, 137,
421 0, 11, 0, 0, 11, 11, 0, 11, 11, 0,
422 0, 234, 0, 138, 0, 235, 236, 237, 238, 239,
423 240, 134, 0, 0, 0, 134, 134, 0, 0, 0,
424 0, 0, 139, 140, 0, 141, 0, 126, 0, 0,
425 134, 126, 126, 142, 143, 144, 145, 146, 40, 0,
426 0, 0, 0, 0, 0, 0, 126, 0, 0, 134,
427 134, 124, 134, 0, 0, 124, 124, 0, 0, 0,
428 134, 134, 134, 134, 134, 126, 126, 120, 126, 0,
429 124, 120, 120, 0, 0, 0, 126, 126, 126, 126,
430 126, 0, 0, 0, 0, 0, 120, 0, 0, 124,
431 124, 122, 124, 0, 0, 122, 122, 0, 0, 0,
432 124, 124, 124, 124, 124, 120, 120, 118, 120, 0,
433 122, 118, 118, 0, 0, 0, 120, 120, 120, 120,
434 120, 0, 0, 0, 0, 0, 118, 0, 0, 122,
435 122, 128, 122, 0, 0, 128, 128, 0, 0, 0,
436 122, 122, 122, 122, 122, 118, 118, 130, 118, 0,
437 128, 130, 130, 0, 0, 0, 118, 118, 118, 118,
438 118, 0, 0, 0, 0, 0, 130, 0, 0, 128,
439 128, 132, 128, 0, 0, 132, 132, 0, 0, 0,
440 128, 128, 128, 128, 128, 130, 130, 136, 130, 0,
441 132, 136, 136, 0, 0, 0, 130, 130, 130, 130,
442 130, 0, 0, 0, 0, 0, 136, 0, 0, 132,
443 132, 138, 132, 0, 0, 138, 138, 0, 0, 0,
444 132, 132, 132, 132, 132, 136, 136, 0, 136, 0,
445 138, 0, 0, 0, 0, 0, 136, 136, 136, 136,
446 136, 243, 244, 0, 0, 0, 0, 0, 0, 138,
447 138, 245, 138, 0, 0, 0, 0, 0, 0, 0,
448 138, 138, 138, 138, 138, 246, 0, 0, 0, 247,
449 248, 249, 250, 251, 252, 112, 113, 0, 115, 116,
450 117, 118, 119, 0, 0, 122, 123, 124, 0, 0,
451 0, 0, 127, 128, 129,
452};
453static const short yycheck[] = { 15,
454 0, 258, 258, 301, 16, 258, 258, 258, 258, 62,
455 314, 258, 258, 258, 258, 328, 265, 266, 71, 314,
456 268, 319, 320, 35, 328, 257, 4, 319, 320, 257,
457 328, 47, 257, 301, 322, 13, 259, 257, 257, 257,
458 18, 257, 257, 291, 292, 293, 294, 257, 258, 27,
459 257, 259, 300, 257, 32, 33, 68, 322, 36, 301,
460 301, 318, 306, 319, 320, 314, 300, 317, 318, 47,
461 260, 328, 256, 0, 52, 328, 328, 328, 262, 263,
462 264, 328, 328, 328, 323, 269, 270, 271, 272, 273,
463 274, 275, 276, 257, 278, 279, 280, 281, 282, 283,
464 284, 285, 286, 287, 288, 289, 290, 317, 318, 125,
465 126, 319, 320, 300, 260, 0, 266, 95, 302, 303,
466 304, 305, 91, -1, -1, -1, 104, -1, 312, 313,
467 -1, 315, 316, -1, -1, -1, -1, 321, -1, -1,
468 324, 325, -1, 327, 328, -1, 0, -1, -1, 161,
469 -1, 268, -1, -1, 166, -1, -1, -1, 136, 137,
470 138, 139, 140, 141, 142, 143, 144, 145, 146, -1,
471 -1, 149, -1, 151, 291, 292, 293, 294, 194, -1,
472 -1, 159, 160, 300, 162, -1, -1, -1, -1, 201,
473 -1, -1, -1, 209, -1, 173, 174, 175, 176, 177,
474 178, 179, 180, 181, 182, 183, 184, 185, 268, -1,
475 188, -1, -1, 191, 192, -1, 228, -1, 230, 0,
476 -1, 199, -1, -1, 240, -1, -1, 205, -1, -1,
477 -1, 291, 292, 293, 294, -1, 252, -1, -1, -1,
478 300, -1, -1, -1, -1, -1, 258, -1, 260, 261,
479 228, 263, -1, -1, -1, -1, 256, 257, -1, -1,
480 -1, -1, 262, 263, 264, 281, -1, -1, -1, 269,
481 270, 271, 272, 273, 274, 275, 276, 255, 278, 279,
482 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
483 290, -1, 0, -1, -1, -1, -1, 275, 276, -1,
484 -1, 279, 302, 303, 304, 305, -1, -1, -1, -1,
485 -1, -1, 312, 313, -1, 315, 316, -1, -1, -1,
486 -1, 321, -1, -1, 324, 325, -1, 327, 328, 256,
487 257, -1, -1, -1, -1, 262, 263, 264, -1, -1,
488 -1, -1, 269, 270, 271, 272, 273, 274, 275, 276,
489 -1, 278, 279, 280, 281, 282, 283, 284, 285, 286,
490 287, 288, 289, 290, -1, 0, -1, -1, -1, -1,
491 -1, -1, -1, -1, -1, 302, 303, 304, 305, -1,
492 -1, -1, -1, -1, -1, 312, 313, -1, 315, 316,
493 -1, -1, -1, -1, 321, -1, -1, 324, 325, -1,
494 327, 328, 256, 257, -1, -1, -1, -1, 262, 263,
495 264, -1, -1, -1, -1, 269, 270, 271, 272, 273,
496 274, 275, 276, -1, 278, 279, 280, 281, 282, 283,
497 284, 285, 286, 287, 288, 289, 290, -1, 0, -1,
498 -1, -1, -1, -1, -1, -1, -1, -1, 302, 303,
499 304, 305, -1, -1, -1, -1, -1, -1, 312, 313,
500 -1, 315, 316, -1, -1, -1, -1, 321, -1, -1,
501 324, 325, -1, 327, 328, 256, 257, -1, -1, -1,
502 -1, 262, 263, 264, -1, -1, -1, -1, 269, 270,
503 271, 272, 273, 274, 275, 276, -1, 278, 279, 280,
504 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
505 -1, 0, -1, -1, -1, -1, -1, -1, -1, -1,
506 -1, 302, 303, 304, 305, -1, -1, -1, -1, -1,
507 -1, 312, 313, -1, 315, 316, -1, -1, -1, -1,
508 321, -1, -1, 324, 325, -1, 327, 328, 256, 257,
509 -1, -1, -1, -1, 262, 263, 264, -1, -1, -1,
510 -1, 269, 270, 271, 272, 273, 274, 275, 276, -1,
511 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
512 288, 289, 290, -1, 0, -1, -1, -1, -1, -1,
513 -1, -1, -1, -1, 302, 303, 304, 305, -1, -1,
514 -1, -1, -1, -1, 312, 313, -1, 315, 316, -1,
515 -1, -1, -1, 321, -1, -1, 324, 325, -1, 327,
516 328, 256, 257, -1, -1, -1, -1, 262, 263, 264,
517 -1, -1, -1, -1, 269, 270, 271, 272, 273, 274,
518 275, 276, -1, 278, 279, 280, 281, 282, 283, 284,
519 285, 286, 287, 288, 289, 290, -1, 0, -1, -1,
520 -1, -1, -1, -1, -1, -1, -1, 302, 303, 304,
521 305, -1, -1, -1, -1, -1, -1, 312, 313, -1,
522 315, 316, -1, -1, -1, -1, 321, -1, -1, 324,
523 325, -1, 327, 328, 256, 257, -1, -1, -1, -1,
524 262, 263, 264, -1, -1, -1, -1, 269, 270, 271,
525 272, 273, 274, 275, 276, -1, 278, 279, 280, 281,
526 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
527 0, -1, -1, -1, -1, -1, -1, -1, -1, -1,
528 302, 303, 304, 305, -1, -1, -1, -1, -1, -1,
529 312, 313, -1, 315, 316, -1, -1, -1, -1, 321,
530 -1, -1, 324, 325, -1, 327, 328, 256, 257, -1,
531 -1, -1, -1, 262, 263, 264, -1, -1, -1, -1,
532 269, 270, 271, 272, 273, 274, 275, 276, -1, 278,
533 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
534 289, 290, -1, -1, -1, -1, -1, -1, -1, -1,
535 -1, -1, -1, 302, 303, 304, 305, -1, -1, -1,
536 -1, -1, -1, 312, 313, -1, 315, 316, -1, -1,
537 -1, -1, 321, -1, -1, 324, 325, -1, 327, 328,
538 256, 257, -1, -1, -1, -1, 262, 263, 264, -1,
539 -1, -1, -1, 269, 270, 271, 272, 273, 274, 275,
540 276, -1, 278, 279, 280, 281, 282, 283, 284, 285,
541 286, 287, 288, 289, 290, -1, -1, -1, -1, -1,
542 -1, -1, -1, -1, -1, -1, 302, 303, 304, 305,
543 -1, -1, -1, -1, -1, -1, 312, 313, -1, 315,
544 316, -1, -1, -1, -1, 321, -1, -1, 324, 325,
545 -1, 327, 328, 256, -1, -1, -1, -1, -1, 262,
546 263, 264, -1, -1, -1, -1, 269, 270, 271, 272,
547 273, 274, 275, 276, -1, 278, 279, 280, 281, 282,
548 283, 284, 285, 286, 287, 288, 289, 290, -1, -1,
549 -1, -1, -1, -1, -1, -1, -1, -1, -1, 302,
550 303, 304, 305, -1, -1, -1, -1, -1, -1, 312,
551 313, -1, 315, 316, -1, -1, -1, -1, 321, -1,
552 -1, 324, 325, -1, 327, 328, 256, -1, -1, -1,
553 -1, -1, 262, 263, 264, -1, -1, -1, -1, 269,
554 270, 271, 272, 273, 274, 275, 276, -1, 278, 279,
555 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
556 290, -1, -1, -1, -1, -1, -1, -1, -1, -1,
557 -1, -1, 302, 303, 304, 305, -1, 267, 268, -1,
558 -1, -1, 312, 313, 258, 315, 316, 277, 262, 263,
559 -1, 321, -1, -1, 324, 325, -1, 327, 328, -1,
560 -1, 291, -1, 277, -1, 295, 296, 297, 298, 299,
561 300, 258, -1, -1, -1, 262, 263, -1, -1, -1,
562 -1, -1, 296, 297, -1, 299, -1, 258, -1, -1,
563 277, 262, 263, 307, 308, 309, 310, 311, 328, -1,
564 -1, -1, -1, -1, -1, -1, 277, -1, -1, 296,
565 297, 258, 299, -1, -1, 262, 263, -1, -1, -1,
566 307, 308, 309, 310, 311, 296, 297, 258, 299, -1,
567 277, 262, 263, -1, -1, -1, 307, 308, 309, 310,
568 311, -1, -1, -1, -1, -1, 277, -1, -1, 296,
569 297, 258, 299, -1, -1, 262, 263, -1, -1, -1,
570 307, 308, 309, 310, 311, 296, 297, 258, 299, -1,
571 277, 262, 263, -1, -1, -1, 307, 308, 309, 310,
572 311, -1, -1, -1, -1, -1, 277, -1, -1, 296,
573 297, 258, 299, -1, -1, 262, 263, -1, -1, -1,
574 307, 308, 309, 310, 311, 296, 297, 258, 299, -1,
575 277, 262, 263, -1, -1, -1, 307, 308, 309, 310,
576 311, -1, -1, -1, -1, -1, 277, -1, -1, 296,
577 297, 258, 299, -1, -1, 262, 263, -1, -1, -1,
578 307, 308, 309, 310, 311, 296, 297, 258, 299, -1,
579 277, 262, 263, -1, -1, -1, 307, 308, 309, 310,
580 311, -1, -1, -1, -1, -1, 277, -1, -1, 296,
581 297, 258, 299, -1, -1, 262, 263, -1, -1, -1,
582 307, 308, 309, 310, 311, 296, 297, -1, 299, -1,
583 277, -1, -1, -1, -1, -1, 307, 308, 309, 310,
584 311, 267, 268, -1, -1, -1, -1, -1, -1, 296,
585 297, 277, 299, -1, -1, -1, -1, -1, -1, -1,
586 307, 308, 309, 310, 311, 291, -1, -1, -1, 295,
587 296, 297, 298, 299, 300, 69, 70, -1, 72, 73,
588 74, 75, 76, -1, -1, 79, 80, 81, -1, -1,
589 -1, -1, 86, 87, 88,
590};
591#define YYFINAL1 1
592#ifndef YYDEBUG0
593#define YYDEBUG0 0
594#endif
595#define YYMAXTOKEN328 328
596#if YYDEBUG0
597static const char *yyname[] = {
598
599"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6010,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6030,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6050,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LB","RB","LP","RP","MENUS",
606"MENU","BUTTON","DEFAULT_FUNCTION","PLUS","MINUS","ALL","OR","CURSORS",
607"PIXMAPS","ICONS","COLOR","SAVECOLOR","MONOCHROME","FUNCTION","ICONMGR_SHOW",
608"ICONMGR","WINDOW_FUNCTION","ZOOM","ICONMGRS","ICONMGR_GEOMETRY",
609"ICONMGR_NOSHOW","MAKE_TITLE","GRAYSCALE","ICONIFY_BY_UNMAPPING",
610"DONT_ICONIFY_BY_UNMAPPING","NO_TITLE","AUTO_RAISE","NO_HILITE","ICON_REGION",
611"META","SHIFT","LOCK","CONTROL","WINDOW","TITLE","ICON","ROOT","FRAME","COLON",
612"EQUALS","SQUEEZE_TITLE","DONT_SQUEEZE_TITLE","START_ICONIFIED",
613"NO_TITLE_HILITE","TITLE_HILITE","MOVE","RESIZE","WAIT","SELECT","KILL",
614"LEFT_TITLEBUTTON","RIGHT_TITLEBUTTON","NUMBER","KEYWORD","NKEYWORD","CKEYWORD",
615"CLKEYWORD","FKEYWORD","FSKEYWORD","SKEYWORD","DKEYWORD","JKEYWORD",
616"WINDOW_RING","WARP_CURSOR","ERRORTOKEN","NO_STACKMODE","STRING",
617};
618static const char *yyrule[] = {
619"$accept : twmrc",
620"twmrc : stmts",
621"stmts :",
622"stmts : stmts stmt",
623"stmt : error",
624"stmt : noarg",
625"stmt : sarg",
626"stmt : narg",
627"stmt : squeeze",
628"stmt : ICON_REGION string DKEYWORD DKEYWORD number number",
629"stmt : ICONMGR_GEOMETRY string number",
630"stmt : ICONMGR_GEOMETRY string",
631"stmt : ZOOM number",
632"stmt : ZOOM",
633"stmt : PIXMAPS pixmap_list",
634"stmt : CURSORS cursor_list",
635"$$1 :",
636"stmt : ICONIFY_BY_UNMAPPING $$1 win_list",
637"stmt : ICONIFY_BY_UNMAPPING",
638"stmt : LEFT_TITLEBUTTON string EQUALS action",
639"stmt : RIGHT_TITLEBUTTON string EQUALS action",
640"stmt : button string",
641"stmt : button action",
642"stmt : string fullkey",
643"stmt : button full",
644"$$2 :",
645"stmt : DONT_ICONIFY_BY_UNMAPPING $$2 win_list",
646"$$3 :",
647"stmt : ICONMGR_NOSHOW $$3 win_list",
648"stmt : ICONMGR_NOSHOW",
649"$$4 :",
650"stmt : ICONMGRS $$4 iconm_list",
651"$$5 :",
652"stmt : ICONMGR_SHOW $$5 win_list",
653"$$6 :",
654"stmt : NO_TITLE_HILITE $$6 win_list",
655"stmt : NO_TITLE_HILITE",
656"$$7 :",
657"stmt : NO_HILITE $$7 win_list",
658"stmt : NO_HILITE",
659"$$8 :",
660"stmt : NO_STACKMODE $$8 win_list",
661"stmt : NO_STACKMODE",
662"$$9 :",
663"stmt : NO_TITLE $$9 win_list",
664"stmt : NO_TITLE",
665"$$10 :",
666"stmt : MAKE_TITLE $$10 win_list",
667"$$11 :",
668"stmt : START_ICONIFIED $$11 win_list",
669"$$12 :",
670"stmt : AUTO_RAISE $$12 win_list",
671"$$13 :",
672"stmt : MENU string LP string COLON string RP $$13 menu",
673"$$14 :",
674"stmt : MENU string $$14 menu",
675"$$15 :",
676"stmt : FUNCTION string $$15 function",
677"$$16 :",
678"stmt : ICONS $$16 icon_list",
679"$$17 :",
680"stmt : COLOR $$17 color_list",
681"$$18 :",
682"stmt : GRAYSCALE $$18 color_list",
683"stmt : SAVECOLOR save_color_list",
684"$$19 :",
685"stmt : MONOCHROME $$19 color_list",
686"stmt : DEFAULT_FUNCTION action",
687"stmt : WINDOW_FUNCTION action",
688"$$20 :",
689"stmt : WARP_CURSOR $$20 win_list",
690"stmt : WARP_CURSOR",
691"$$21 :",
692"stmt : WINDOW_RING $$21 win_list",
693"noarg : KEYWORD",
694"sarg : SKEYWORD string",
695"narg : NKEYWORD number",
696"full : EQUALS keys COLON contexts COLON action",
697"fullkey : EQUALS keys COLON contextkeys COLON action",
698"keys :",
699"keys : keys key",
700"key : META",
701"key : SHIFT",
702"key : LOCK",
703"key : CONTROL",
704"key : META number",
705"key : OR",
706"contexts :",
707"contexts : contexts context",
708"context : WINDOW",
709"context : TITLE",
710"context : ICON",
711"context : ROOT",
712"context : FRAME",
713"context : ICONMGR",
714"context : META",
715"context : ALL",
716"context : OR",
717"contextkeys :",
718"contextkeys : contextkeys contextkey",
719"contextkey : WINDOW",
720"contextkey : TITLE",
721"contextkey : ICON",
722"contextkey : ROOT",
723"contextkey : FRAME",
724"contextkey : ICONMGR",
725"contextkey : META",
726"contextkey : ALL",
727"contextkey : OR",
728"contextkey : string",
729"pixmap_list : LB pixmap_entries RB",
730"pixmap_entries :",
731"pixmap_entries : pixmap_entries pixmap_entry",
732"pixmap_entry : TITLE_HILITE string",
733"cursor_list : LB cursor_entries RB",
734"cursor_entries :",
735"cursor_entries : cursor_entries cursor_entry",
736"cursor_entry : FRAME string string",
737"cursor_entry : FRAME string",
738"cursor_entry : TITLE string string",
739"cursor_entry : TITLE string",
740"cursor_entry : ICON string string",
741"cursor_entry : ICON string",
742"cursor_entry : ICONMGR string string",
743"cursor_entry : ICONMGR string",
744"cursor_entry : BUTTON string string",
745"cursor_entry : BUTTON string",
746"cursor_entry : MOVE string string",
747"cursor_entry : MOVE string",
748"cursor_entry : RESIZE string string",
749"cursor_entry : RESIZE string",
750"cursor_entry : WAIT string string",
751"cursor_entry : WAIT string",
752"cursor_entry : MENU string string",
753"cursor_entry : MENU string",
754"cursor_entry : SELECT string string",
755"cursor_entry : SELECT string",
756"cursor_entry : KILL string string",
757"cursor_entry : KILL string",
758"color_list : LB color_entries RB",
759"color_entries :",
760"color_entries : color_entries color_entry",
761"color_entry : CLKEYWORD string",
762"$$22 :",
763"color_entry : CLKEYWORD string $$22 win_color_list",
764"color_entry : CKEYWORD string",
765"save_color_list : LB s_color_entries RB",
766"s_color_entries :",
767"s_color_entries : s_color_entries s_color_entry",
768"s_color_entry : string",
769"s_color_entry : CLKEYWORD",
770"win_color_list : LB win_color_entries RB",
771"win_color_entries :",
772"win_color_entries : win_color_entries win_color_entry",
773"win_color_entry : string string",
774"squeeze : SQUEEZE_TITLE",
775"$$23 :",
776"squeeze : SQUEEZE_TITLE $$23 LB win_sqz_entries RB",
777"squeeze : DONT_SQUEEZE_TITLE",
778"$$24 :",
779"squeeze : DONT_SQUEEZE_TITLE $$24 win_list",
780"win_sqz_entries :",
781"win_sqz_entries : win_sqz_entries string JKEYWORD signed_number number",
782"iconm_list : LB iconm_entries RB",
783"iconm_entries :",
784"iconm_entries : iconm_entries iconm_entry",
785"iconm_entry : string string number",
786"iconm_entry : string string string number",
787"win_list : LB win_entries RB",
788"win_entries :",
789"win_entries : win_entries win_entry",
790"win_entry : string",
791"icon_list : LB icon_entries RB",
792"icon_entries :",
793"icon_entries : icon_entries icon_entry",
794"icon_entry : string string",
795"function : LB function_entries RB",
796"function_entries :",
797"function_entries : function_entries function_entry",
798"function_entry : action",
799"menu : LB menu_entries RB",
800"menu_entries :",
801"menu_entries : menu_entries menu_entry",
802"menu_entry : string action",
803"menu_entry : string LP string COLON string RP action",
804"action : FKEYWORD",
805"action : FSKEYWORD string",
806"signed_number : number",
807"signed_number : PLUS number",
808"signed_number : MINUS number",
809"button : BUTTON number",
810"string : STRING",
811"number : NUMBER",
812
813};
814#endif
815/* define the initial stack-sizes */
816#ifdef YYSTACKSIZE500
817#undef YYMAXDEPTH500
818#define YYMAXDEPTH500 YYSTACKSIZE500
819#else
820#ifdef YYMAXDEPTH500
821#define YYSTACKSIZE500 YYMAXDEPTH500
822#else
823#define YYSTACKSIZE500 500
824#define YYMAXDEPTH500 500
825#endif
826#endif
827
828#define YYINITSTACKSIZE500 500
829
830int yydebug;
831int yynerrs;
832
833typedef struct {
834 unsigned stacksize;
835 short *s_base;
836 short *s_mark;
837 short *s_last;
838 YYSTYPE *l_base;
839 YYSTYPE *l_mark;
840} YYSTACKDATA;
841int yyerrflag;
842int yychar;
843YYSTYPE yyval;
844YYSTYPE yylval;
845
846/* variables for the parser stack */
847static YYSTACKDATA yystack;
848#line 662 "gram.y"
849void
850yyerror(char *s)
851{
852 twmrc_error_prefix();
853 fprintf (stderrstderr, "error in input file: %s\n", s ? s : "");
854 ParseError = 1;
855}
856
857void
858RemoveDQuote(char *str)
859{
860 register char *i, *o;
861 register int n;
862 register int count;
863
864 for (i=str+1, o=str; *i && *i != '\"'; o++)
865 {
866 if (*i == '\\')
867 {
868 switch (*++i)
869 {
870 case 'n':
871 *o = '\n';
872 i++;
873 break;
874 case 'b':
875 *o = '\b';
876 i++;
877 break;
878 case 'r':
879 *o = '\r';
880 i++;
881 break;
882 case 't':
883 *o = '\t';
884 i++;
885 break;
886 case 'f':
887 *o = '\f';
888 i++;
889 break;
890 case '0':
891 if (*++i == 'x')
892 goto hex;
893 else
894 --i;
895 case '1': case '2': case '3':
896 case '4': case '5': case '6': case '7':
897 n = 0;
898 count = 0;
899 while (*i >= '0' && *i <= '7' && count < 3)
900 {
901 n = (n<<3) + (*i++ - '0');
902 count++;
903 }
904 *o = n;
905 break;
906 hex:
907 case 'x':
908 n = 0;
909 count = 0;
910 while (i++, count++ < 2)
911 {
912 if (*i >= '0' && *i <= '9')
913 n = (n<<4) + (*i - '0');
914 else if (*i >= 'a' && *i <= 'f')
915 n = (n<<4) + (*i - 'a') + 10;
916 else if (*i >= 'A' && *i <= 'F')
917 n = (n<<4) + (*i - 'A') + 10;
918 else
919 break;
920 }
921 *o = n;
922 break;
923 case '\n':
924 i++; /* punt */
925 o--; /* to account for o++ at end of loop */
926 break;
927 case '\"':
928 case '\'':
929 case '\\':
930 default:
931 *o = *i++;
932 break;
933 }
934 }
935 else
936 *o = *i++;
937 }
938 *o = '\0';
939}
940
941static MenuRoot *GetRoot(char *name, char* fore, char *back)
942{
943 MenuRoot *tmp;
944
945 tmp = FindMenuRoot(name);
946 if (tmp == NULL((void*)0))
947 tmp = NewMenuRoot(name);
948
949 if (fore)
950 {
951 int save;
952
953 save = Scr->FirstTime;
954 Scr->FirstTime = TRUE1;
955 GetColor(COLOR272, &tmp->hi_fore, fore);
956 GetColor(COLOR272, &tmp->hi_back, back);
957 Scr->FirstTime = save;
958 }
959
960 return tmp;
961}
962
963static void GotButton(int butt, int func)
964{
965 int i;
966
967 for (i = 0; i < NUM_CONTEXTS8; i++)
968 {
969 if ((cont & (1 << i)) == 0)
970 continue;
971
972 Scr->Mouse[butt][i][mods].func = func;
973 if (func == F_MENU101)
974 {
975 pull->prev = NULL((void*)0);
976 Scr->Mouse[butt][i][mods].menu = pull;
977 }
978 else
979 {
980 root = GetRoot(TWM_ROOT"bLoB_GoOp", NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0)));
981 Scr->Mouse[butt][i][mods].item = AddToMenu(root,"x",Action,
982 NULL((void*)0), func, NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0)));
983 }
984 }
985 Action = "";
986 pull = NULL((void*)0);
987 cont = 0;
988 mods_used |= mods;
989 mods = 0;
990}
991
992static void GotKey(char *key, int func)
993{
994 int i;
995
996 for (i = 0; i < NUM_CONTEXTS8; i++)
997 {
998 if ((cont & (1 << i)) == 0)
999 continue;
1000 if (!AddFuncKey(key, i, mods, func, Name, Action))
1001 break;
1002 }
1003
1004 Action = "";
1005 pull = NULL((void*)0);
1006 cont = 0;
1007 mods_used |= mods;
1008 mods = 0;
1009}
1010
1011
1012static void GotTitleButton (char *bitmapname, int func, Boolint rightside)
1013{
1014 if (!CreateTitleButton (bitmapname, func, Action, pull, rightside, True1)) {
1015 twmrc_error_prefix();
1016 fprintf (stderrstderr,
1017 "unable to create %s titlebutton \"%s\"\n",
1018 rightside ? "right" : "left", bitmapname);
1019 }
1020 Action = "";
1021 pull = NULL((void*)0);
1022}
1023
1024static Boolint CheckWarpScreenArg (char *s)
1025{
1026 XmuCopyISOLatin1Lowered (s, s);
1027
1028 if (strcmp (s, WARPSCREEN_NEXT"next") == 0 ||
1029 strcmp (s, WARPSCREEN_PREV"prev") == 0 ||
1030 strcmp (s, WARPSCREEN_BACK"back") == 0)
1031 return True1;
1032
1033 for (; *s && isascii(*s)(((*s) & ~0x7f) == 0) && isdigit(*s)((*__ctype_b_loc ())[(int) ((*s))] & (unsigned short int)
_ISdigit)
; s++) ; /* SUPPRESS 530 */
1034 return (*s ? False0 : True1);
1035}
1036
1037
1038static Boolint CheckWarpRingArg (char *s)
1039{
1040 XmuCopyISOLatin1Lowered (s, s);
1041
1042 if (strcmp (s, WARPSCREEN_NEXT"next") == 0 ||
1043 strcmp (s, WARPSCREEN_PREV"prev") == 0)
1044 return True1;
1045
1046 return False0;
1047}
1048
1049
1050static Boolint CheckColormapArg (char *s)
1051{
1052 XmuCopyISOLatin1Lowered (s, s);
1053
1054 if (strcmp (s, COLORMAP_NEXT"next") == 0 ||
1055 strcmp (s, COLORMAP_PREV"prev") == 0 ||
1056 strcmp (s, COLORMAP_DEFAULT"default") == 0)
1057 return True1;
1058
1059 return False0;
1060}
1061
1062
1063void
1064twmrc_error_prefix ()
1065{
1066 fprintf (stderrstderr, "%s: line %d: ", ProgramName, yylineno);
1067}
1068#line 1068 "gram.c"
1069
1070#if YYDEBUG0
1071#include <stdio.h> /* needed for printf */
1072#endif
1073
1074#include <stdlib.h> /* needed for malloc, etc */
1075#include <string.h> /* needed for memset */
1076
1077/* allocate initial stack or double stack size, up to YYMAXDEPTH */
1078static int yygrowstack(YYSTACKDATA *data)
1079{
1080 int i;
1081 unsigned newsize;
1082 short *newss;
1083 YYSTYPE *newvs;
1084
1085 if ((newsize = data->stacksize) == 0)
1086 newsize = YYINITSTACKSIZE500;
1087 else if (newsize >= YYMAXDEPTH500)
1088 return -1;
1089 else if ((newsize *= 2) > YYMAXDEPTH500)
1090 newsize = YYMAXDEPTH500;
1091
1092 i = data->s_mark - data->s_base;
1093 newss = (data->s_base != 0)
1094 ? (short *)realloc(data->s_base, newsize * sizeof(*newss))
1095 : (short *)malloc(newsize * sizeof(*newss));
1096 if (newss == 0)
1097 return -1;
1098
1099 data->s_base = newss;
1100 data->s_mark = newss + i;
1101
1102 newvs = (data->l_base != 0)
1103 ? (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs))
1104 : (YYSTYPE *)malloc(newsize * sizeof(*newvs));
1105 if (newvs == 0)
1106 return -1;
1107
1108 data->l_base = newvs;
1109 data->l_mark = newvs + i;
1110
1111 data->stacksize = newsize;
1112 data->s_last = data->s_base + newsize - 1;
1113 return 0;
1114}
1115
1116#if YYPURE0 || defined(YY_NO_LEAKS)
1117static void yyfreestack(YYSTACKDATA *data)
1118{
1119 free(data->s_base);
1120 free(data->l_base);
1121 memset(data, 0, sizeof(*data));
1122}
1123#else
1124#define yyfreestack(data) /* nothing */
1125#endif
1126
1127#define YYABORTgoto yyabort goto yyabort
1128#define YYREJECTgoto yyabort goto yyabort
1129#define YYACCEPTgoto yyaccept goto yyaccept
1130#define YYERRORgoto yyerrlab goto yyerrlab
1131
1132int
1133YYPARSE_DECL()yyparse(void)
1134{
1135 int yym, yyn, yystate;
1136#if YYDEBUG0
1137 const char *yys;
1138
1139 if ((yys = getenv("YYDEBUG")) != 0)
1140 {
1141 yyn = *yys;
1142 if (yyn >= '0' && yyn <= '9')
1143 yydebug = yyn - '0';
1144 }
1145#endif
1146
1147 yynerrs = 0;
1148 yyerrflag = 0;
1149 yychar = YYEMPTY(-1);
1150 yystate = 0;
Value stored to 'yystate' is never read
1151
1152#if YYPURE0
1153 memset(&yystack, 0, sizeof(yystack));
1154#endif
1155
1156 if (yystack.s_base == NULL((void*)0) && yygrowstack(&yystack)) goto yyoverflow;
1157 yystack.s_mark = yystack.s_base;
1158 yystack.l_mark = yystack.l_base;
1159 yystate = 0;
1160 *yystack.s_mark = 0;
1161
1162yyloop:
1163 if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
1164 if (yychar < 0)
1165 {
1166 if ((yychar = YYLEXyylex()) < 0) yychar = 0;
1167#if YYDEBUG0
1168 if (yydebug)
1169 {
1170 yys = 0;
1171 if (yychar <= YYMAXTOKEN328) yys = yyname[yychar];
1172 if (!yys) yys = "illegal-symbol";
1173 printf("%sdebug: state %d, reading %d (%s)\n",
1174 YYPREFIX"yy", yystate, yychar, yys);
1175 }
1176#endif
1177 }
1178 if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
1179 yyn <= YYTABLESIZE1355 && yycheck[yyn] == yychar)
1180 {
1181#if YYDEBUG0
1182 if (yydebug)
1183 printf("%sdebug: state %d, shifting to state %d\n",
1184 YYPREFIX"yy", yystate, yytable[yyn]);
1185#endif
1186 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
1187 {
1188 goto yyoverflow;
1189 }
1190 yystate = yytable[yyn];
1191 *++yystack.s_mark = yytable[yyn];
1192 *++yystack.l_mark = yylval;
1193 yychar = YYEMPTY(-1);
1194 if (yyerrflag > 0) --yyerrflag;
1195 goto yyloop;
1196 }
1197 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
1198 yyn <= YYTABLESIZE1355 && yycheck[yyn] == yychar)
1199 {
1200 yyn = yytable[yyn];
1201 goto yyreduce;
1202 }
1203 if (yyerrflag) goto yyinrecovery;
1204
1205 yyerror("syntax error");
1206
1207 goto yyerrlab;
1208
1209yyerrlab:
1210 ++yynerrs;
1211
1212yyinrecovery:
1213 if (yyerrflag < 3)
1214 {
1215 yyerrflag = 3;
1216 for (;;)
1217 {
1218 if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE256) >= 0 &&
1219 yyn <= YYTABLESIZE1355 && yycheck[yyn] == YYERRCODE256)
1220 {
1221#if YYDEBUG0
1222 if (yydebug)
1223 printf("%sdebug: state %d, error recovery shifting\
1224 to state %d\n", YYPREFIX"yy", *yystack.s_mark, yytable[yyn]);
1225#endif
1226 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
1227 {
1228 goto yyoverflow;
1229 }
1230 yystate = yytable[yyn];
1231 *++yystack.s_mark = yytable[yyn];
1232 *++yystack.l_mark = yylval;
1233 goto yyloop;
1234 }
1235 else
1236 {
1237#if YYDEBUG0
1238 if (yydebug)
1239 printf("%sdebug: error recovery discarding state %d\n",
1240 YYPREFIX"yy", *yystack.s_mark);
1241#endif
1242 if (yystack.s_mark <= yystack.s_base) goto yyabort;
1243 --yystack.s_mark;
1244 --yystack.l_mark;
1245 }
1246 }
1247 }
1248 else
1249 {
1250 if (yychar == 0) goto yyabort;
1251#if YYDEBUG0
1252 if (yydebug)
1253 {
1254 yys = 0;
1255 if (yychar <= YYMAXTOKEN328) yys = yyname[yychar];
1256 if (!yys) yys = "illegal-symbol";
1257 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
1258 YYPREFIX"yy", yystate, yychar, yys);
1259 }
1260#endif
1261 yychar = YYEMPTY(-1);
1262 goto yyloop;
1263 }
1264
1265yyreduce:
1266#if YYDEBUG0
1267 if (yydebug)
1268 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
1269 YYPREFIX"yy", yystate, yyn, yyrule[yyn]);
1270#endif
1271 yym = yylen[yyn];
1272 if (yym)
1273 yyval = yystack.l_mark[1-yym];
1274 else
1275 memset(&yyval, 0, sizeof yyval);
1276 switch (yyn)
1277 {
1278case 9:
1279#line 146 "gram.y"
1280 { AddIconRegion(yystack.l_mark[-4].ptr, yystack.l_mark[-3].num, yystack.l_mark[-2].num, yystack.l_mark[-1].num, yystack.l_mark[0].num); }
1281break;
1282case 10:
1283#line 147 "gram.y"
1284 { if (Scr->FirstTime)
1285 {
1286 Scr->iconmgr.geometry=yystack.l_mark[-1].ptr;
1287 Scr->iconmgr.columns=yystack.l_mark[0].num;
1288 }
1289 }
1290break;
1291case 11:
1292#line 153 "gram.y"
1293 { if (Scr->FirstTime)
1294 Scr->iconmgr.geometry = yystack.l_mark[0].ptr;
1295 }
1296break;
1297case 12:
1298#line 156 "gram.y"
1299 { if (Scr->FirstTime)
1300 {
1301 Scr->DoZoom = TRUE1;
1302 Scr->ZoomCount = yystack.l_mark[0].num;
1303 }
1304 }
1305break;
1306case 13:
1307#line 162 "gram.y"
1308 { if (Scr->FirstTime)
1309 Scr->DoZoom = TRUE1; }
1310break;
1311case 14:
1312#line 164 "gram.y"
1313 {}
1314break;
1315case 15:
1316#line 165 "gram.y"
1317 {}
1318break;
1319case 16:
1320#line 166 "gram.y"
1321 { list = &Scr->IconifyByUn; }
1322break;
1323case 18:
1324#line 168 "gram.y"
1325 { if (Scr->FirstTime)
1326 Scr->IconifyByUnmapping = TRUE1; }
1327break;
1328case 19:
1329#line 170 "gram.y"
1330 {
1331 GotTitleButton (yystack.l_mark[-2].ptr, yystack.l_mark[0].num, False0);
1332 }
1333break;
1334case 20:
1335#line 173 "gram.y"
1336 {
1337 GotTitleButton (yystack.l_mark[-2].ptr, yystack.l_mark[0].num, True1);
1338 }
1339break;
1340case 21:
1341#line 176 "gram.y"
1342 { root = GetRoot(yystack.l_mark[0].ptr, NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0)));
1343 Scr->Mouse[yystack.l_mark[-1].num][C_ROOT3][0].func = F_MENU101;
1344 Scr->Mouse[yystack.l_mark[-1].num][C_ROOT3][0].menu = root;
1345 }
1346break;
1347case 22:
1348#line 180 "gram.y"
1349 { Scr->Mouse[yystack.l_mark[-1].num][C_ROOT3][0].func = yystack.l_mark[0].num;
1350 if (yystack.l_mark[0].num == F_MENU101)
1351 {
1352 pull->prev = NULL((void*)0);
1353 Scr->Mouse[yystack.l_mark[-1].num][C_ROOT3][0].menu = pull;
1354 }
1355 else
1356 {
1357 root = GetRoot(TWM_ROOT"bLoB_GoOp",NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0)));
1358 Scr->Mouse[yystack.l_mark[-1].num][C_ROOT3][0].item =
1359 AddToMenu(root,"x",Action,
1360 NULL((void*)0),yystack.l_mark[0].num,NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0)));
1361 }
1362 Action = "";
1363 pull = NULL((void*)0);
1364 }
1365break;
1366case 23:
1367#line 196 "gram.y"
1368 { GotKey(yystack.l_mark[-1].ptr, yystack.l_mark[0].num); }
1369break;
1370case 24:
1371#line 197 "gram.y"
1372 { GotButton(yystack.l_mark[-1].num, yystack.l_mark[0].num); }
1373break;
1374case 25:
1375#line 198 "gram.y"
1376 { list = &Scr->DontIconify; }
1377break;
1378case 27:
1379#line 200 "gram.y"
1380 { list = &Scr->IconMgrNoShow; }
1381break;
1382case 29:
1383#line 202 "gram.y"
1384 { Scr->IconManagerDontShow = TRUE1; }
1385break;
1386case 30:
1387#line 203 "gram.y"
1388 { list = &Scr->IconMgrs; }
1389break;
1390case 32:
1391#line 205 "gram.y"
1392 { list = &Scr->IconMgrShow; }
1393break;
1394case 34:
1395#line 207 "gram.y"
1396 { list = &Scr->NoTitleHighlight; }
1397break;
1398case 36:
1399#line 209 "gram.y"
1400 { if (Scr->FirstTime)
1401 Scr->TitleHighlight = FALSE0; }
1402break;
1403case 37:
1404#line 211 "gram.y"
1405 { list = &Scr->NoHighlight; }
1406break;
1407case 39:
1408#line 213 "gram.y"
1409 { if (Scr->FirstTime)
1410 Scr->Highlight = FALSE0; }
1411break;
1412case 40:
1413#line 215 "gram.y"
1414 { list = &Scr->NoStackModeL; }
1415break;
1416case 42:
1417#line 217 "gram.y"
1418 { if (Scr->FirstTime)
1419 Scr->StackMode = FALSE0; }
1420break;
1421case 43:
1422#line 219 "gram.y"
1423 { list = &Scr->NoTitle; }
1424break;
1425case 45:
1426#line 221 "gram.y"
1427 { if (Scr->FirstTime)
1428 Scr->NoTitlebar = TRUE1; }
1429break;
1430case 46:
1431#line 223 "gram.y"
1432 { list = &Scr->MakeTitle; }
1433break;
1434case 48:
1435#line 225 "gram.y"
1436 { list = &Scr->StartIconified; }
1437break;
1438case 50:
1439#line 227 "gram.y"
1440 { list = &Scr->AutoRaise; }
1441break;
1442case 52:
1443#line 229 "gram.y"
1444 {
1445 root = GetRoot(yystack.l_mark[-5].ptr, yystack.l_mark[-3].ptr, yystack.l_mark[-1].ptr); }
1446break;
1447case 53:
1448#line 231 "gram.y"
1449 { root->real_menu = TRUE1;}
1450break;
1451case 54:
1452#line 232 "gram.y"
1453 { root = GetRoot(yystack.l_mark[0].ptr, NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); }
1454break;
1455case 55:
1456#line 233 "gram.y"
1457 { root->real_menu = TRUE1; }
1458break;
1459case 56:
1460#line 234 "gram.y"
1461 { root = GetRoot(yystack.l_mark[0].ptr, NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); }
1462break;
1463case 58:
1464#line 236 "gram.y"
1465 { list = &Scr->IconNames; }
1466break;
1467case 60:
1468#line 238 "gram.y"
1469 { color = COLOR272; }
1470break;
1471case 62:
1472#line 240 "gram.y"
1473 { color = GRAYSCALE284; }
1474break;
1475case 65:
1476#line 244 "gram.y"
1477 { color = MONOCHROME274; }
1478break;
1479case 67:
1480#line 246 "gram.y"
1481 { Scr->DefaultFunction.func = yystack.l_mark[0].num;
1482 if (yystack.l_mark[0].num == F_MENU101)
1483 {
1484 pull->prev = NULL((void*)0);
1485 Scr->DefaultFunction.menu = pull;
1486 }
1487 else
1488 {
1489 root = GetRoot(TWM_ROOT"bLoB_GoOp",NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0)));
1490 Scr->DefaultFunction.item =
1491 AddToMenu(root,"x",Action,
1492 NULL((void*)0),yystack.l_mark[0].num, NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0)));
1493 }
1494 Action = "";
1495 pull = NULL((void*)0);
1496 }
1497break;
1498case 68:
1499#line 262 "gram.y"
1500 { Scr->WindowFunction.func = yystack.l_mark[0].num;
1501 root = GetRoot(TWM_ROOT"bLoB_GoOp",NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0)));
1502 Scr->WindowFunction.item =
1503 AddToMenu(root,"x",Action,
1504 NULL((void*)0),yystack.l_mark[0].num, NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0)));
1505 Action = "";
1506 pull = NULL((void*)0);
1507 }
1508break;
1509case 69:
1510#line 270 "gram.y"
1511 { list = &Scr->WarpCursorL; }
1512break;
1513case 71:
1514#line 272 "gram.y"
1515 { if (Scr->FirstTime)
1516 Scr->WarpCursor = TRUE1; }
1517break;
1518case 72:
1519#line 274 "gram.y"
1520 { list = &Scr->WindowRingL; }
1521break;
1522case 74:
1523#line 279 "gram.y"
1524 { if (!do_single_keyword (yystack.l_mark[0].num)) {
1525 twmrc_error_prefix();
1526 fprintf (stderrstderr,
1527 "unknown singleton keyword %d\n",
1528 yystack.l_mark[0].num);
1529 ParseError = 1;
1530 }
1531 }
1532break;
1533case 75:
1534#line 289 "gram.y"
1535 { if (!do_string_keyword (yystack.l_mark[-1].num, yystack.l_mark[0].ptr)) {
1536 twmrc_error_prefix();
1537 fprintf (stderrstderr,
1538 "unknown string keyword %d (value \"%s\")\n",
1539 yystack.l_mark[-1].num, yystack.l_mark[0].ptr);
1540 ParseError = 1;
1541 }
1542 }
1543break;
1544case 76:
1545#line 299 "gram.y"
1546 { if (!do_number_keyword (yystack.l_mark[-1].num, yystack.l_mark[0].num)) {
1547 twmrc_error_prefix();
1548 fprintf (stderrstderr,
1549 "unknown numeric keyword %d (value %d)\n",
1550 yystack.l_mark[-1].num, yystack.l_mark[0].num);
1551 ParseError = 1;
1552 }
1553 }
1554break;
1555case 77:
1556#line 311 "gram.y"
1557 { yyval.num = yystack.l_mark[0].num; }
1558break;
1559case 78:
1560#line 314 "gram.y"
1561 { yyval.num = yystack.l_mark[0].num; }
1562break;
1563case 81:
1564#line 321 "gram.y"
1565 { mods |= Mod1Mask(1<<3); }
1566break;
1567case 82:
1568#line 322 "gram.y"
1569 { mods |= ShiftMask(1<<0); }
1570break;
1571case 83:
1572#line 323 "gram.y"
1573 { mods |= LockMask(1<<1); }
1574break;
1575case 84:
1576#line 324 "gram.y"
1577 { mods |= ControlMask(1<<2); }
1578break;
1579case 85:
1580#line 325 "gram.y"
1581 { if (yystack.l_mark[0].num < 1 || yystack.l_mark[0].num > 5) {
1582 twmrc_error_prefix();
1583 fprintf (stderrstderr,
1584 "bad modifier number (%d), must be 1-5\n",
1585 yystack.l_mark[0].num);
1586 ParseError = 1;
1587 } else {
1588 mods |= (Mod1Mask(1<<3) << (yystack.l_mark[0].num - 1));
1589 }
1590 }
1591break;
1592case 86:
1593#line 335 "gram.y"
1594 { }
1595break;
1596case 89:
1597#line 342 "gram.y"
1598 { cont |= C_WINDOW_BIT(1 << 0); }
1599break;
1600case 90:
1601#line 343 "gram.y"
1602 { cont |= C_TITLE_BIT(1 << 1); }
1603break;
1604case 91:
1605#line 344 "gram.y"
1606 { cont |= C_ICON_BIT(1 << 2); }
1607break;
1608case 92:
1609#line 345 "gram.y"
1610 { cont |= C_ROOT_BIT(1 << 3); }
1611break;
1612case 93:
1613#line 346 "gram.y"
1614 { cont |= C_FRAME_BIT(1 << 4); }
1615break;
1616case 94:
1617#line 347 "gram.y"
1618 { cont |= C_ICONMGR_BIT(1 << 5); }
1619break;
1620case 95:
1621#line 348 "gram.y"
1622 { cont |= C_ICONMGR_BIT(1 << 5); }
1623break;
1624case 96:
1625#line 349 "gram.y"
1626 { cont |= C_ALL_BITS((1 << 0) | (1 << 1) | (1 << 2) | (1 <<
3) | (1 << 4) | (1 << 5))
; }
1627break;
1628case 97:
1629#line 350 "gram.y"
1630 { }
1631break;
1632case 100:
1633#line 357 "gram.y"
1634 { cont |= C_WINDOW_BIT(1 << 0); }
1635break;
1636case 101:
1637#line 358 "gram.y"
1638 { cont |= C_TITLE_BIT(1 << 1); }
1639break;
1640case 102:
1641#line 359 "gram.y"
1642 { cont |= C_ICON_BIT(1 << 2); }
1643break;
1644case 103:
1645#line 360 "gram.y"
1646 { cont |= C_ROOT_BIT(1 << 3); }
1647break;
1648case 104:
1649#line 361 "gram.y"
1650 { cont |= C_FRAME_BIT(1 << 4); }
1651break;
1652case 105:
1653#line 362 "gram.y"
1654 { cont |= C_ICONMGR_BIT(1 << 5); }
1655break;
1656case 106:
1657#line 363 "gram.y"
1658 { cont |= C_ICONMGR_BIT(1 << 5); }
1659break;
1660case 107:
1661#line 364 "gram.y"
1662 { cont |= C_ALL_BITS((1 << 0) | (1 << 1) | (1 << 2) | (1 <<
3) | (1 << 4) | (1 << 5))
; }
1663break;
1664case 108:
1665#line 365 "gram.y"
1666 { }
1667break;
1668case 109:
1669#line 366 "gram.y"
1670 { Name = yystack.l_mark[0].ptr; cont |= C_NAME_BIT(1 << 6); }
1671break;
1672case 113:
1673#line 377 "gram.y"
1674 { SetHighlightPixmap (yystack.l_mark[0].ptr); }
1675break;
1676case 117:
1677#line 388 "gram.y"
1678 {
1679 NewBitmapCursor(&Scr->FrameCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1680break;
1681case 118:
1682#line 390 "gram.y"
1683 {
1684 NewFontCursor(&Scr->FrameCursor, yystack.l_mark[0].ptr); }
1685break;
1686case 119:
1687#line 392 "gram.y"
1688 {
1689 NewBitmapCursor(&Scr->TitleCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1690break;
1691case 120:
1692#line 394 "gram.y"
1693 {
1694 NewFontCursor(&Scr->TitleCursor, yystack.l_mark[0].ptr); }
1695break;
1696case 121:
1697#line 396 "gram.y"
1698 {
1699 NewBitmapCursor(&Scr->IconCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1700break;
1701case 122:
1702#line 398 "gram.y"
1703 {
1704 NewFontCursor(&Scr->IconCursor, yystack.l_mark[0].ptr); }
1705break;
1706case 123:
1707#line 400 "gram.y"
1708 {
1709 NewBitmapCursor(&Scr->IconMgrCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1710break;
1711case 124:
1712#line 402 "gram.y"
1713 {
1714 NewFontCursor(&Scr->IconMgrCursor, yystack.l_mark[0].ptr); }
1715break;
1716case 125:
1717#line 404 "gram.y"
1718 {
1719 NewBitmapCursor(&Scr->ButtonCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1720break;
1721case 126:
1722#line 406 "gram.y"
1723 {
1724 NewFontCursor(&Scr->ButtonCursor, yystack.l_mark[0].ptr); }
1725break;
1726case 127:
1727#line 408 "gram.y"
1728 {
1729 NewBitmapCursor(&Scr->MoveCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1730break;
1731case 128:
1732#line 410 "gram.y"
1733 {
1734 NewFontCursor(&Scr->MoveCursor, yystack.l_mark[0].ptr); }
1735break;
1736case 129:
1737#line 412 "gram.y"
1738 {
1739 NewBitmapCursor(&Scr->ResizeCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1740break;
1741case 130:
1742#line 414 "gram.y"
1743 {
1744 NewFontCursor(&Scr->ResizeCursor, yystack.l_mark[0].ptr); }
1745break;
1746case 131:
1747#line 416 "gram.y"
1748 {
1749 NewBitmapCursor(&Scr->WaitCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1750break;
1751case 132:
1752#line 418 "gram.y"
1753 {
1754 NewFontCursor(&Scr->WaitCursor, yystack.l_mark[0].ptr); }
1755break;
1756case 133:
1757#line 420 "gram.y"
1758 {
1759 NewBitmapCursor(&Scr->MenuCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1760break;
1761case 134:
1762#line 422 "gram.y"
1763 {
1764 NewFontCursor(&Scr->MenuCursor, yystack.l_mark[0].ptr); }
1765break;
1766case 135:
1767#line 424 "gram.y"
1768 {
1769 NewBitmapCursor(&Scr->SelectCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1770break;
1771case 136:
1772#line 426 "gram.y"
1773 {
1774 NewFontCursor(&Scr->SelectCursor, yystack.l_mark[0].ptr); }
1775break;
1776case 137:
1777#line 428 "gram.y"
1778 {
1779 NewBitmapCursor(&Scr->DestroyCursor, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1780break;
1781case 138:
1782#line 430 "gram.y"
1783 {
1784 NewFontCursor(&Scr->DestroyCursor, yystack.l_mark[0].ptr); }
1785break;
1786case 142:
1787#line 442 "gram.y"
1788 { if (!do_colorlist_keyword (yystack.l_mark[-1].num, color,
1789 yystack.l_mark[0].ptr)) {
1790 twmrc_error_prefix();
1791 fprintf (stderrstderr,
1792 "unhandled list color keyword %d (string \"%s\")\n",
1793 yystack.l_mark[-1].num, yystack.l_mark[0].ptr);
1794 ParseError = 1;
1795 }
1796 }
1797break;
1798case 143:
1799#line 451 "gram.y"
1800 { list = do_colorlist_keyword(yystack.l_mark[-1].num,color,
1801 yystack.l_mark[0].ptr);
1802 if (!list) {
1803 twmrc_error_prefix();
1804 fprintf (stderrstderr,
1805 "unhandled color list keyword %d (string \"%s\")\n",
1806 yystack.l_mark[-1].num, yystack.l_mark[0].ptr);
1807 ParseError = 1;
1808 }
1809 }
1810break;
1811case 144:
1812#line 461 "gram.y"
1813 { /* No action */; }
1814break;
1815case 145:
1816#line 462 "gram.y"
1817 { if (!do_color_keyword (yystack.l_mark[-1].num, color,
1818 yystack.l_mark[0].ptr)) {
1819 twmrc_error_prefix();
1820 fprintf (stderrstderr,
1821 "unhandled color keyword %d (string \"%s\")\n",
1822 yystack.l_mark[-1].num, yystack.l_mark[0].ptr);
1823 ParseError = 1;
1824 }
1825 }
1826break;
1827case 149:
1828#line 480 "gram.y"
1829 { do_string_savecolor(color, yystack.l_mark[0].ptr); }
1830break;
1831case 150:
1832#line 481 "gram.y"
1833 { do_var_savecolor(yystack.l_mark[0].num); }
1834break;
1835case 154:
1836#line 491 "gram.y"
1837 { if (Scr->FirstTime &&
1838 color == Scr->Monochrome)
1839 AddToList(list, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1840break;
1841case 155:
1842#line 496 "gram.y"
1843 {
1844 if (HasShape) Scr->SqueezeTitle = TRUE1;
1845 }
1846break;
1847case 156:
1848#line 499 "gram.y"
1849 { list = &Scr->SqueezeTitleL;
1850 if (HasShape && Scr->SqueezeTitle == -1)
1851 Scr->SqueezeTitle = TRUE1;
1852 }
1853break;
1854case 158:
1855#line 504 "gram.y"
1856 { Scr->SqueezeTitle = FALSE0; }
1857break;
1858case 159:
1859#line 505 "gram.y"
1860 { list = &Scr->DontSqueezeTitleL; }
1861break;
1862case 162:
1863#line 510 "gram.y"
1864 {
1865 if (Scr->FirstTime) {
1866 do_squeeze_entry (list, yystack.l_mark[-3].ptr, yystack.l_mark[-2].num, yystack.l_mark[-1].num, yystack.l_mark[0].num);
1867 }
1868 }
1869break;
1870case 166:
1871#line 525 "gram.y"
1872 { if (Scr->FirstTime)
1873 AddToList(list, yystack.l_mark[-2].ptr, (char *)
1874 AllocateIconManager(yystack.l_mark[-2].ptr, NULLSTR((char *) ((void*)0)),
1875 yystack.l_mark[-1].ptr,yystack.l_mark[0].num));
1876 }
1877break;
1878case 167:
1879#line 531 "gram.y"
1880 { if (Scr->FirstTime)
1881 AddToList(list, yystack.l_mark[-3].ptr, (char *)
1882 AllocateIconManager(yystack.l_mark[-3].ptr,yystack.l_mark[-2].ptr,
1883 yystack.l_mark[-1].ptr, yystack.l_mark[0].num));
1884 }
1885break;
1886case 171:
1887#line 545 "gram.y"
1888 { if (Scr->FirstTime)
1889 AddToList(list, yystack.l_mark[0].ptr, 0);
1890 }
1891break;
1892case 175:
1893#line 557 "gram.y"
1894 { if (Scr->FirstTime) AddToList(list, yystack.l_mark[-1].ptr, yystack.l_mark[0].ptr); }
1895break;
1896case 179:
1897#line 567 "gram.y"
1898 { AddToMenu(root, "", Action, NULL((void*)0), yystack.l_mark[0].num,
1899 NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0)));
1900 Action = "";
1901 }
1902break;
1903case 183:
1904#line 580 "gram.y"
1905 { AddToMenu(root, yystack.l_mark[-1].ptr, Action, pull, yystack.l_mark[0].num,
1906 NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0)));
1907 Action = "";
1908 pull = NULL((void*)0);
1909 }
1910break;
1911case 184:
1912#line 585 "gram.y"
1913 {
1914 AddToMenu(root, yystack.l_mark[-6].ptr, Action, pull, yystack.l_mark[0].num,
1915 yystack.l_mark[-4].ptr, yystack.l_mark[-2].ptr);
1916 Action = "";
1917 pull = NULL((void*)0);
1918 }
1919break;
1920case 185:
1921#line 593 "gram.y"
1922 { yyval.num = yystack.l_mark[0].num; }
1923break;
1924case 186:
1925#line 594 "gram.y"
1926 {
1927 yyval.num = yystack.l_mark[-1].num;
1928 Action = yystack.l_mark[0].ptr;
1929 switch (yystack.l_mark[-1].num) {
1930 case F_MENU101:
1931 pull = GetRoot (yystack.l_mark[0].ptr, NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0)));
1932 pull->prev = root;
1933 break;
1934 case F_WARPRING104:
1935 if (!CheckWarpRingArg (Action)) {
1936 twmrc_error_prefix();
1937 fprintf (stderrstderr,
1938 "ignoring invalid f.warptoring argument \"%s\"\n",
1939 Action);
1940 yyval.num = F_NOP0;
1941 }
1942 case F_WARPTOSCREEN109:
1943 if (!CheckWarpScreenArg (Action)) {
1944 twmrc_error_prefix();
1945 fprintf (stderrstderr,
1946 "ignoring invalid f.warptoscreen argument \"%s\"\n",
1947 Action);
1948 yyval.num = F_NOP0;
1949 }
1950 break;
1951 case F_COLORMAP110:
1952 if (CheckColormapArg (Action)) {
1953 yyval.num = F_COLORMAP110;
1954 } else {
1955 twmrc_error_prefix();
1956 fprintf (stderrstderr,
1957 "ignoring invalid f.colormap argument \"%s\"\n",
1958 Action);
1959 yyval.num = F_NOP0;
1960 }
1961 break;
1962 } /* end switch */
1963 }
1964break;
1965case 187:
1966#line 635 "gram.y"
1967 { yyval.num = yystack.l_mark[0].num; }
1968break;
1969case 188:
1970#line 636 "gram.y"
1971 { yyval.num = yystack.l_mark[0].num; }
1972break;
1973case 189:
1974#line 637 "gram.y"
1975 { yyval.num = -(yystack.l_mark[0].num); }
1976break;
1977case 190:
1978#line 640 "gram.y"
1979 { yyval.num = yystack.l_mark[0].num;
1980 if (yystack.l_mark[0].num == 0)
1981 yyerror("bad button 0");
1982
1983 if (yystack.l_mark[0].num > MAX_BUTTONS16)
1984 {
1985 yyval.num = 0;
1986 yyerror("button number too large");
1987 }
1988 }
1989break;
1990case 191:
1991#line 652 "gram.y"
1992 { ptr = (char *)malloc(strlen(yystack.l_mark[0].ptr)+1);
1993 strcpy(ptr, yystack.l_mark[0].ptr);
1994 RemoveDQuote(ptr);
1995 yyval.ptr = ptr;
1996 }
1997break;
1998case 192:
1999#line 658 "gram.y"
2000 { yyval.num = yystack.l_mark[0].num; }
2001break;
2002#line 2002 "gram.c"
2003 }
2004 yystack.s_mark -= yym;
2005 yystate = *yystack.s_mark;
2006 yystack.l_mark -= yym;
2007 yym = yylhs[yyn];
2008 if (yystate == 0 && yym == 0)
2009 {
2010#if YYDEBUG0
2011 if (yydebug)
2012 printf("%sdebug: after reduction, shifting from state 0 to\
2013 state %d\n", YYPREFIX"yy", YYFINAL1);
2014#endif
2015 yystate = YYFINAL1;
2016 *++yystack.s_mark = YYFINAL1;
2017 *++yystack.l_mark = yyval;
2018 if (yychar < 0)
2019 {
2020 if ((yychar = YYLEXyylex()) < 0) yychar = 0;
2021#if YYDEBUG0
2022 if (yydebug)
2023 {
2024 yys = 0;
2025 if (yychar <= YYMAXTOKEN328) yys = yyname[yychar];
2026 if (!yys) yys = "illegal-symbol";
2027 printf("%sdebug: state %d, reading %d (%s)\n",
2028 YYPREFIX"yy", YYFINAL1, yychar, yys);
2029 }
2030#endif
2031 }
2032 if (yychar == 0) goto yyaccept;
2033 goto yyloop;
2034 }
2035 if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
2036 yyn <= YYTABLESIZE1355 && yycheck[yyn] == yystate)
2037 yystate = yytable[yyn];
2038 else
2039 yystate = yydgoto[yym];
2040#if YYDEBUG0
2041 if (yydebug)
2042 printf("%sdebug: after reduction, shifting from state %d \
2043to state %d\n", YYPREFIX"yy", *yystack.s_mark, yystate);
2044#endif
2045 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
2046 {
2047 goto yyoverflow;
2048 }
2049 *++yystack.s_mark = (short) yystate;
2050 *++yystack.l_mark = yyval;
2051 goto yyloop;
2052
2053yyoverflow:
2054 yyerror("yacc stack overflow");
2055
2056yyabort:
2057 yyfreestack(&yystack);
2058 return (1);
2059
2060yyaccept:
2061 yyfreestack(&yystack);
2062 return (0);
2063}