First import
[xorg_rtime.git] / xorg-server-1.4 / hw / xwin / winprefslex.c
blobf704858fe22bcfad14a72bb9f9717b55278197dd
1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
5 * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.8 2004/01/06 19:03:44 nectar Exp $
6 */
8 #if defined(__FreeBSD__)
9 #include <sys/cdefs.h>
10 #else
11 #define __unused
12 #endif
14 #define FLEX_SCANNER
15 #define YY_FLEX_MAJOR_VERSION 2
16 #define YY_FLEX_MINOR_VERSION 5
18 #include <stdio.h>
21 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
22 #ifdef c_plusplus
23 #ifndef __cplusplus
24 #define __cplusplus
25 #endif
26 #endif
29 #ifdef __cplusplus
31 #include <stdlib.h>
32 #include <unistd.h>
34 /* Use prototypes in function declarations. */
35 #define YY_USE_PROTOS
37 /* The "const" storage-class-modifier is valid. */
38 #define YY_USE_CONST
40 #else /* ! __cplusplus */
42 #if __STDC__
44 #define YY_USE_PROTOS
45 #define YY_USE_CONST
47 #endif /* __STDC__ */
48 #endif /* ! __cplusplus */
50 #ifdef __TURBOC__
51 #pragma warn -rch
52 #pragma warn -use
53 #include <io.h>
54 #include <stdlib.h>
55 #define YY_USE_CONST
56 #define YY_USE_PROTOS
57 #endif
59 #ifdef YY_USE_CONST
60 #define yyconst const
61 #else
62 #define yyconst
63 #endif
66 #ifdef YY_USE_PROTOS
67 #define YY_PROTO(proto) proto
68 #else
69 #define YY_PROTO(proto) ()
70 #endif
72 /* Returned upon end-of-file. */
73 #define YY_NULL 0
75 /* Promotes a possibly negative, possibly signed char to an unsigned
76 * integer for use as an array index. If the signed char is negative,
77 * we want to instead treat it as an 8-bit unsigned char, hence the
78 * double cast.
80 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
82 /* Enter a start condition. This macro really ought to take a parameter,
83 * but we do it the disgusting crufty way forced on us by the ()-less
84 * definition of BEGIN.
86 #define BEGIN yy_start = 1 + 2 *
88 /* Translate the current start state into a value that can be later handed
89 * to BEGIN to return to the state. The YYSTATE alias is for lex
90 * compatibility.
92 #define YY_START ((yy_start - 1) / 2)
93 #define YYSTATE YY_START
95 /* Action number for EOF rule of a given start state. */
96 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
98 /* Special action meaning "start processing a new file". */
99 #define YY_NEW_FILE yyrestart( yyin )
101 #define YY_END_OF_BUFFER_CHAR 0
103 /* Size of default input buffer. */
104 #define YY_BUF_SIZE 16384
106 typedef struct yy_buffer_state *YY_BUFFER_STATE;
108 extern int yyleng;
109 extern FILE *yyin, *yyout;
111 #define EOB_ACT_CONTINUE_SCAN 0
112 #define EOB_ACT_END_OF_FILE 1
113 #define EOB_ACT_LAST_MATCH 2
115 /* The funky do-while in the following #define is used to turn the definition
116 * int a single C statement (which needs a semi-colon terminator). This
117 * avoids problems with code like:
119 * if ( condition_holds )
120 * yyless( 5 );
121 * else
122 * do_something_else();
124 * Prior to using the do-while the compiler would get upset at the
125 * "else" because it interpreted the "if" statement as being all
126 * done when it reached the ';' after the yyless() call.
129 /* Return all but the first 'n' matched characters back to the input stream. */
131 #define yyless(n) \
132 do \
134 /* Undo effects of setting up yytext. */ \
135 *yy_cp = yy_hold_char; \
136 YY_RESTORE_YY_MORE_OFFSET \
137 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
138 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
140 while ( 0 )
142 #define unput(c) yyunput( c, yytext_ptr )
144 /* The following is because we cannot portably get our hands on size_t
145 * (without autoconf's help, which isn't available because we want
146 * flex-generated scanners to compile on their own).
148 typedef unsigned int yy_size_t;
151 struct yy_buffer_state
153 FILE *yy_input_file;
155 char *yy_ch_buf; /* input buffer */
156 char *yy_buf_pos; /* current position in input buffer */
158 /* Size of input buffer in bytes, not including room for EOB
159 * characters.
161 yy_size_t yy_buf_size;
163 /* Number of characters read into yy_ch_buf, not including EOB
164 * characters.
166 int yy_n_chars;
168 /* Whether we "own" the buffer - i.e., we know we created it,
169 * and can realloc() it to grow it, and should free() it to
170 * delete it.
172 int yy_is_our_buffer;
174 /* Whether this is an "interactive" input source; if so, and
175 * if we're using stdio for input, then we want to use getc()
176 * instead of fread(), to make sure we stop fetching input after
177 * each newline.
179 int yy_is_interactive;
181 /* Whether we're considered to be at the beginning of a line.
182 * If so, '^' rules will be active on the next match, otherwise
183 * not.
185 int yy_at_bol;
187 /* Whether to try to fill the input buffer when we reach the
188 * end of it.
190 int yy_fill_buffer;
192 int yy_buffer_status;
193 #define YY_BUFFER_NEW 0
194 #define YY_BUFFER_NORMAL 1
195 /* When an EOF's been seen but there's still some text to process
196 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
197 * shouldn't try reading from the input source any more. We might
198 * still have a bunch of tokens to match, though, because of
199 * possible backing-up.
201 * When we actually see the EOF, we change the status to "new"
202 * (via yyrestart()), so that the user can continue scanning by
203 * just pointing yyin at a new input file.
205 #define YY_BUFFER_EOF_PENDING 2
208 static YY_BUFFER_STATE yy_current_buffer = 0;
210 /* We provide macros for accessing buffer states in case in the
211 * future we want to put the buffer states in a more general
212 * "scanner state".
214 #define YY_CURRENT_BUFFER yy_current_buffer
217 /* yy_hold_char holds the character lost when yytext is formed. */
218 static char yy_hold_char;
220 static int yy_n_chars; /* number of characters read into yy_ch_buf */
223 int yyleng;
225 /* Points to current character in buffer. */
226 static char *yy_c_buf_p = (char *) 0;
227 static int yy_init = 1; /* whether we need to initialize */
228 static int yy_start = 0; /* start state number */
230 /* Flag which is used to allow yywrap()'s to do buffer switches
231 * instead of setting up a fresh yyin. A bit of a hack ...
233 static int yy_did_buffer_switch_on_eof;
235 void yyrestart YY_PROTO(( FILE *input_file ));
237 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
238 void yy_load_buffer_state YY_PROTO(( void ));
239 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
240 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
241 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
242 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
243 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
245 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
246 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
247 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
249 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
250 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused;
251 static void yy_flex_free YY_PROTO(( void * ));
253 #define yy_new_buffer yy_create_buffer
255 #define yy_set_interactive(is_interactive) \
257 if ( ! yy_current_buffer ) \
258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259 yy_current_buffer->yy_is_interactive = is_interactive; \
262 #define yy_set_bol(at_bol) \
264 if ( ! yy_current_buffer ) \
265 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
266 yy_current_buffer->yy_at_bol = at_bol; \
269 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
272 #define YY_USES_REJECT
273 typedef unsigned char YY_CHAR;
274 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
275 typedef int yy_state_type;
276 extern int yylineno;
277 int yylineno = 1;
278 extern char *yytext;
279 #define yytext_ptr yytext
281 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
282 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
283 static int yy_get_next_buffer YY_PROTO(( void ));
284 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
286 /* Done after the current pattern has been matched and before the
287 * corresponding action - sets up yytext.
289 #define YY_DO_BEFORE_ACTION \
290 yytext_ptr = yy_bp; \
291 yyleng = (int) (yy_cp - yy_bp); \
292 yy_hold_char = *yy_cp; \
293 *yy_cp = '\0'; \
294 yy_c_buf_p = yy_cp;
296 #define YY_NUM_RULES 25
297 #define YY_END_OF_BUFFER 26
298 static yyconst short int yy_acclist[165] =
299 { 0,
300 26, 24, 25, 4, 25, 3, 25, 24, 25, 24,
301 25, 24, 25, 24, 25, 24, 25, 24, 25, 24,
302 25, 24, 25, 24, 25, 24, 25, 24, 25, 21,
303 24, 25, 22, 24, 25, 24, 4, 24, 24, 1,
304 1, 24, 24, 24, 24, 24, 24, 24, 24, 24,
305 24, 24, 24, 24, 23, 24, 23, 24, 2, 2,
306 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
307 24, 24, 24, 24, 24, 24, 24, 24, 24, 15,
308 24, 24, 5, 24, 24, 24, 24, 24, 24, 24,
309 24, 14, 24, 24, 17, 24, 24, 24, 8, 24,
311 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
312 18, 24, 24, 24, 24, 24, 24, 24, 13, 24,
313 24, 24, 24, 24, 24, 11, 24, 24, 24, 24,
314 24, 24, 9, 24, 24, 24, 19, 24, 24, 24,
315 24, 24, 12, 24, 24, 24, 24, 24, 24, 20,
316 24, 16, 24, 7, 24, 24, 24, 24, 24, 24,
317 6, 24, 10, 24
320 static yyconst short int yy_accept[137] =
321 { 0,
322 1, 1, 1, 2, 4, 6, 8, 10, 12, 14,
323 16, 18, 20, 22, 24, 26, 28, 30, 33, 36,
324 37, 38, 39, 39, 40, 40, 41, 42, 43, 44,
325 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
326 55, 57, 58, 59, 59, 60, 61, 62, 63, 64,
327 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
328 75, 76, 77, 78, 79, 80, 82, 83, 85, 86,
329 87, 88, 89, 90, 91, 92, 94, 95, 97, 98,
330 99, 101, 102, 103, 104, 105, 106, 107, 108, 109,
331 110, 111, 113, 114, 115, 116, 117, 118, 119, 121,
333 122, 123, 124, 125, 126, 128, 129, 130, 131, 132,
334 133, 135, 136, 137, 139, 140, 141, 142, 143, 145,
335 146, 147, 148, 149, 150, 152, 154, 156, 157, 158,
336 159, 160, 161, 163, 165, 165
339 static yyconst int yy_ec[256] =
340 { 0,
341 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
342 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
343 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
344 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
345 1, 1, 1, 1, 1, 1, 7, 1, 1, 1,
346 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
347 1, 1, 1, 1, 8, 9, 10, 11, 12, 13,
348 14, 1, 15, 1, 1, 16, 17, 18, 19, 20,
349 1, 21, 22, 23, 24, 1, 25, 26, 27, 1,
350 1, 1, 1, 1, 1, 1, 8, 9, 10, 11,
352 12, 13, 14, 1, 15, 1, 1, 16, 17, 18,
353 19, 20, 1, 21, 22, 23, 24, 1, 25, 26,
354 27, 1, 28, 1, 29, 1, 1, 1, 1, 1,
355 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
356 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
358 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
359 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
364 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
365 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
367 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
368 1, 1, 1, 1, 1
371 static yyconst int yy_meta[30] =
372 { 0,
373 1, 2, 3, 3, 1, 1, 1, 1, 1, 1,
374 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1
378 static yyconst short int yy_base[143] =
379 { 0,
380 0, 0, 175, 0, 172, 176, 28, 32, 166, 15,
381 160, 145, 160, 157, 20, 25, 147, 0, 0, 0,
382 165, 39, 161, 43, 39, 176, 45, 51, 140, 38,
383 48, 152, 144, 144, 145, 141, 139, 142, 135, 148,
384 0, 176, 60, 55, 176, 62, 147, 136, 130, 128,
385 143, 140, 131, 124, 128, 123, 137, 132, 126, 115,
386 114, 129, 131, 124, 113, 0, 45, 0, 128, 118,
387 113, 115, 120, 116, 108, 0, 108, 0, 112, 112,
388 0, 115, 113, 116, 100, 104, 111, 101, 96, 95,
389 96, 0, 98, 92, 102, 89, 93, 93, 0, 53,
391 98, 85, 89, 81, 0, 88, 82, 94, 76, 92,
392 0, 80, 85, 0, 80, 79, 75, 73, 0, 72,
393 74, 75, 75, 55, 0, 0, 0, 61, 51, 53,
394 43, 45, 0, 0, 176, 50, 75, 77, 80, 82,
395 85, 88
398 static yyconst short int yy_def[143] =
399 { 0,
400 135, 1, 135, 136, 135, 135, 137, 138, 136, 136,
401 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
402 135, 137, 139, 138, 140, 135, 140, 141, 136, 136,
403 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
404 136, 135, 141, 142, 135, 142, 136, 136, 136, 136,
405 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
406 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
407 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
408 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
409 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
411 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
412 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
413 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
414 136, 136, 136, 136, 0, 135, 135, 135, 135, 135,
415 135, 135
418 static yyconst short int yy_nxt[206] =
419 { 0,
420 4, 5, 6, 6, 7, 8, 9, 10, 4, 4,
421 11, 12, 4, 4, 13, 4, 14, 4, 4, 4,
422 15, 16, 17, 4, 4, 4, 4, 18, 19, 23,
423 29, 35, 20, 25, 26, 27, 37, 30, 36, 38,
424 23, 26, 27, 41, 25, 26, 27, 26, 27, 48,
425 20, 39, 44, 45, 46, 80, 50, 45, 46, 49,
426 51, 44, 45, 46, 45, 46, 81, 108, 134, 133,
427 132, 131, 130, 129, 109, 22, 22, 24, 24, 24,
428 23, 23, 25, 25, 25, 43, 43, 43, 44, 44,
429 44, 128, 127, 126, 125, 124, 123, 122, 121, 120,
431 119, 118, 117, 116, 115, 114, 113, 112, 111, 110,
432 107, 106, 105, 104, 103, 102, 101, 100, 99, 98,
433 97, 96, 95, 94, 93, 92, 91, 90, 89, 88,
434 87, 86, 85, 84, 83, 82, 79, 78, 77, 76,
435 75, 74, 73, 72, 71, 70, 69, 68, 67, 66,
436 65, 64, 63, 62, 61, 60, 59, 58, 57, 56,
437 55, 54, 53, 52, 47, 42, 21, 40, 34, 33,
438 32, 31, 28, 21, 135, 3, 135, 135, 135, 135,
439 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
440 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
442 135, 135, 135, 135, 135
445 static yyconst short int yy_chk[206] =
446 { 0,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 7,
450 10, 15, 7, 8, 8, 8, 16, 10, 15, 16,
451 22, 25, 25, 22, 24, 24, 24, 27, 27, 30,
452 136, 16, 28, 28, 28, 67, 31, 44, 44, 30,
453 31, 43, 43, 43, 46, 46, 67, 100, 132, 131,
454 130, 129, 128, 124, 100, 137, 137, 138, 138, 138,
455 139, 139, 140, 140, 140, 141, 141, 141, 142, 142,
456 142, 123, 122, 121, 120, 118, 117, 116, 115, 113,
458 112, 110, 109, 108, 107, 106, 104, 103, 102, 101,
459 98, 97, 96, 95, 94, 93, 91, 90, 89, 88,
460 87, 86, 85, 84, 83, 82, 80, 79, 77, 75,
461 74, 73, 72, 71, 70, 69, 65, 64, 63, 62,
462 61, 60, 59, 58, 57, 56, 55, 54, 53, 52,
463 51, 50, 49, 48, 47, 40, 39, 38, 37, 36,
464 35, 34, 33, 32, 29, 23, 21, 17, 14, 13,
465 12, 11, 9, 5, 3, 135, 135, 135, 135, 135,
466 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
467 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
469 135, 135, 135, 135, 135
472 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
473 static char *yy_full_match;
474 static int yy_lp;
475 #define REJECT \
477 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
478 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
479 ++yy_lp; \
480 goto find_rule; \
482 #define yymore() yymore_used_but_not_detected
483 #define YY_MORE_ADJ 0
484 #define YY_RESTORE_YY_MORE_OFFSET
485 char *yytext;
486 #line 1 "winprefslex.l"
487 #define INITIAL 0
488 #line 2 "winprefslex.l"
490 * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
492 * Permission is hereby granted, free of charge, to any person obtaining
493 * a copy of this software and associated documentation files (the
494 * "Software"), to deal in the Software without restriction, including
495 * without limitation the rights to use, copy, modify, merge, publish,
496 * distribute, sublicense, and/or sell copies of the Software, and to
497 * permit persons to whom the Software is furnished to do so, subject to
498 * the following conditions:
500 * The above copyright notice and this permission notice shall be
501 * included in all copies or substantial portions of the Software.
503 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
504 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
505 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
506 * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
507 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
508 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
509 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
511 * Except as contained in this notice, the name of the XFree86 Project
512 * shall not be used in advertising or otherwise to promote the sale, use
513 * or other dealings in this Software without prior written authorization
514 * from the XFree86 Project.
516 * Authors: Earle F. Philhower, III
518 /* $XFree86: $ */
520 #include <stdio.h>
521 #include <stdlib.h>
522 #include <string.h>
523 #include "winprefsyacc.h"
525 extern YYSTYPE yylval;
526 extern char *yytext;
527 extern int yyparse(void);
529 extern void ErrorF (const char* /*f*/, ...);
531 int yylineno;
533 /* Copy the parsed string, must be free()d in yacc parser */
534 static char *makestr(char *str)
536 char *ptr;
537 ptr = (char*)malloc (strlen(str)+1);
538 if (!ptr)
540 ErrorF ("winMultiWindowLex:makestr() out of memory\n");
541 exit (-1);
543 strcpy(ptr, str);
544 return ptr;
547 #line 548 "winprefslex.c"
549 /* Macros after this point can all be overridden by user definitions in
550 * section 1.
553 #ifndef YY_SKIP_YYWRAP
554 #ifdef __cplusplus
555 extern "C" int yywrap YY_PROTO(( void ));
556 #else
557 extern int yywrap YY_PROTO(( void ));
558 #endif
559 #endif
561 #ifndef YY_NO_UNPUT
562 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
563 #endif
565 #ifndef yytext_ptr
566 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
567 #endif
569 #ifdef YY_NEED_STRLEN
570 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
571 #endif
573 #ifndef YY_NO_INPUT
574 #ifdef __cplusplus
575 static int yyinput YY_PROTO(( void ));
576 #else
577 static int input YY_PROTO(( void ));
578 #endif
579 #endif
581 #if YY_STACK_USED
582 static int yy_start_stack_ptr = 0;
583 static int yy_start_stack_depth = 0;
584 static int *yy_start_stack = 0;
585 #ifndef YY_NO_PUSH_STATE
586 static void yy_push_state YY_PROTO(( int new_state ));
587 #endif
588 #ifndef YY_NO_POP_STATE
589 static void yy_pop_state YY_PROTO(( void ));
590 #endif
591 #ifndef YY_NO_TOP_STATE
592 static int yy_top_state YY_PROTO(( void ));
593 #endif
595 #else
596 #define YY_NO_PUSH_STATE 1
597 #define YY_NO_POP_STATE 1
598 #define YY_NO_TOP_STATE 1
599 #endif
601 #ifdef YY_MALLOC_DECL
602 YY_MALLOC_DECL
603 #else
604 #if __STDC__
605 #ifndef __cplusplus
606 #include <stdlib.h>
607 #endif
608 #else
609 /* Just try to get by without declaring the routines. This will fail
610 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
611 * or sizeof(void*) != sizeof(int).
613 #endif
614 #endif
616 /* Amount of stuff to slurp up with each read. */
617 #ifndef YY_READ_BUF_SIZE
618 #define YY_READ_BUF_SIZE 8192
619 #endif
621 /* Copy whatever the last rule matched to the standard output. */
623 #ifndef ECHO
624 /* This used to be an fputs(), but since the string might contain NUL's,
625 * we now use fwrite().
627 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
628 #endif
630 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
631 * is returned in "result".
633 #ifndef YY_INPUT
634 #define YY_INPUT(buf,result,max_size) \
635 if ( yy_current_buffer->yy_is_interactive ) \
637 int c = '*', n; \
638 for ( n = 0; n < max_size && \
639 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
640 buf[n] = (char) c; \
641 if ( c == '\n' ) \
642 buf[n++] = (char) c; \
643 if ( c == EOF && ferror( yyin ) ) \
644 YY_FATAL_ERROR( "input in flex scanner failed" ); \
645 result = n; \
647 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
648 && ferror( yyin ) ) \
649 YY_FATAL_ERROR( "input in flex scanner failed" );
650 #endif
652 /* No semi-colon after return; correct usage is to write "yyterminate();" -
653 * we don't want an extra ';' after the "return" because that will cause
654 * some compilers to complain about unreachable statements.
656 #ifndef yyterminate
657 #define yyterminate() return YY_NULL
658 #endif
660 /* Number of entries by which start-condition stack grows. */
661 #ifndef YY_START_STACK_INCR
662 #define YY_START_STACK_INCR 25
663 #endif
665 /* Report a fatal error. */
666 #ifndef YY_FATAL_ERROR
667 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
668 #endif
670 /* Default declaration of generated scanner - a define so the user can
671 * easily add parameters.
673 #ifndef YY_DECL
674 #define YY_DECL int yylex YY_PROTO(( void ))
675 #endif
677 /* Code executed at the beginning of each rule, after yytext and yyleng
678 * have been set up.
680 #ifndef YY_USER_ACTION
681 #define YY_USER_ACTION
682 #endif
684 /* Code executed at the end of each rule. */
685 #ifndef YY_BREAK
686 #define YY_BREAK break;
687 #endif
689 #define YY_RULE_SETUP \
690 YY_USER_ACTION
692 YY_DECL
694 register yy_state_type yy_current_state;
695 register char *yy_cp, *yy_bp;
696 register int yy_act;
698 #line 64 "winprefslex.l"
700 #line 701 "winprefslex.c"
702 if ( yy_init )
704 yy_init = 0;
706 #ifdef YY_USER_INIT
707 YY_USER_INIT;
708 #endif
710 if ( ! yy_start )
711 yy_start = 1; /* first start state */
713 if ( ! yyin )
714 yyin = stdin;
716 if ( ! yyout )
717 yyout = stdout;
719 if ( ! yy_current_buffer )
720 yy_current_buffer =
721 yy_create_buffer( yyin, YY_BUF_SIZE );
723 yy_load_buffer_state();
726 while ( 1 ) /* loops until end-of-file is reached */
728 yy_cp = yy_c_buf_p;
730 /* Support of yytext. */
731 *yy_cp = yy_hold_char;
733 /* yy_bp points to the position in yy_ch_buf of the start of
734 * the current run.
736 yy_bp = yy_cp;
738 yy_current_state = yy_start;
739 yy_state_ptr = yy_state_buf;
740 *yy_state_ptr++ = yy_current_state;
741 yy_match:
744 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
745 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
747 yy_current_state = (int) yy_def[yy_current_state];
748 if ( yy_current_state >= 136 )
749 yy_c = yy_meta[(unsigned int) yy_c];
751 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
752 *yy_state_ptr++ = yy_current_state;
753 ++yy_cp;
755 while ( yy_base[yy_current_state] != 176 );
757 yy_find_action:
758 yy_current_state = *--yy_state_ptr;
759 yy_lp = yy_accept[yy_current_state];
760 goto find_rule; /* avoid `defined but not used' warning */
761 find_rule: /* we branch to this label when backing up */
762 for ( ; ; ) /* until we find what rule we matched */
764 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
766 yy_act = yy_acclist[yy_lp];
768 yy_full_match = yy_cp;
769 break;
772 --yy_cp;
773 yy_current_state = *--yy_state_ptr;
774 yy_lp = yy_accept[yy_current_state];
777 YY_DO_BEFORE_ACTION;
779 if ( yy_act != YY_END_OF_BUFFER )
781 int yyl;
782 for ( yyl = 0; yyl < yyleng; ++yyl )
783 if ( yytext[yyl] == '\n' )
784 ++yylineno;
787 do_action: /* This label is used only to access EOF actions. */
790 switch ( yy_act )
791 { /* beginning of action switch */
792 case 1:
793 YY_RULE_SETUP
794 #line 65 "winprefslex.l"
795 { /* comment */ return NEWLINE; }
796 YY_BREAK
797 case 2:
798 YY_RULE_SETUP
799 #line 66 "winprefslex.l"
800 { /* comment */ return NEWLINE; }
801 YY_BREAK
802 case 3:
803 YY_RULE_SETUP
804 #line 67 "winprefslex.l"
805 { return NEWLINE; }
806 YY_BREAK
807 case 4:
808 YY_RULE_SETUP
809 #line 68 "winprefslex.l"
810 { /* ignore whitespace */ }
811 YY_BREAK
812 case 5:
813 YY_RULE_SETUP
814 #line 69 "winprefslex.l"
815 { return MENU; }
816 YY_BREAK
817 case 6:
818 YY_RULE_SETUP
819 #line 70 "winprefslex.l"
820 { return ICONDIRECTORY; }
821 YY_BREAK
822 case 7:
823 YY_RULE_SETUP
824 #line 71 "winprefslex.l"
825 { return DEFAULTICON; }
826 YY_BREAK
827 case 8:
828 YY_RULE_SETUP
829 #line 72 "winprefslex.l"
830 { return ICONS; }
831 YY_BREAK
832 case 9:
833 YY_RULE_SETUP
834 #line 73 "winprefslex.l"
835 { return ROOTMENU; }
836 YY_BREAK
837 case 10:
838 YY_RULE_SETUP
839 #line 74 "winprefslex.l"
840 { return DEFAULTSYSMENU; }
841 YY_BREAK
842 case 11:
843 YY_RULE_SETUP
844 #line 75 "winprefslex.l"
845 { return SYSMENU; }
846 YY_BREAK
847 case 12:
848 YY_RULE_SETUP
849 #line 76 "winprefslex.l"
850 { return SEPARATOR; }
851 YY_BREAK
852 case 13:
853 YY_RULE_SETUP
854 #line 77 "winprefslex.l"
855 { return ATSTART; }
856 YY_BREAK
857 case 14:
858 YY_RULE_SETUP
859 #line 78 "winprefslex.l"
860 { return ATEND; }
861 YY_BREAK
862 case 15:
863 YY_RULE_SETUP
864 #line 79 "winprefslex.l"
865 { return EXEC; }
866 YY_BREAK
867 case 16:
868 YY_RULE_SETUP
869 #line 80 "winprefslex.l"
870 { return ALWAYSONTOP; }
871 YY_BREAK
872 case 17:
873 YY_RULE_SETUP
874 #line 81 "winprefslex.l"
875 { return DEBUG; }
876 YY_BREAK
877 case 18:
878 YY_RULE_SETUP
879 #line 82 "winprefslex.l"
880 { return RELOAD; }
881 YY_BREAK
882 case 19:
883 YY_RULE_SETUP
884 #line 83 "winprefslex.l"
885 { return TRAYICON; }
886 YY_BREAK
887 case 20:
888 YY_RULE_SETUP
889 #line 84 "winprefslex.l"
890 { return SILENTEXIT; }
891 YY_BREAK
892 case 21:
893 YY_RULE_SETUP
894 #line 85 "winprefslex.l"
895 { return LB; }
896 YY_BREAK
897 case 22:
898 YY_RULE_SETUP
899 #line 86 "winprefslex.l"
900 { return RB; }
901 YY_BREAK
902 case 23:
903 YY_RULE_SETUP
904 #line 87 "winprefslex.l"
905 { yylval.sVal = makestr(yytext+1); \
906 yylval.sVal[strlen(yylval.sVal)-1] = 0; \
907 return STRING; }
908 YY_BREAK
909 case 24:
910 YY_RULE_SETUP
911 #line 90 "winprefslex.l"
912 { yylval.sVal = makestr(yytext); \
913 return STRING; }
914 YY_BREAK
915 case 25:
916 YY_RULE_SETUP
917 #line 92 "winprefslex.l"
918 ECHO;
919 YY_BREAK
920 #line 921 "winprefslex.c"
921 case YY_STATE_EOF(INITIAL):
922 yyterminate();
924 case YY_END_OF_BUFFER:
926 /* Amount of text matched not including the EOB char. */
927 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
929 /* Undo the effects of YY_DO_BEFORE_ACTION. */
930 *yy_cp = yy_hold_char;
931 YY_RESTORE_YY_MORE_OFFSET
933 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
935 /* We're scanning a new file or input source. It's
936 * possible that this happened because the user
937 * just pointed yyin at a new source and called
938 * yylex(). If so, then we have to assure
939 * consistency between yy_current_buffer and our
940 * globals. Here is the right place to do so, because
941 * this is the first action (other than possibly a
942 * back-up) that will match for the new input source.
944 yy_n_chars = yy_current_buffer->yy_n_chars;
945 yy_current_buffer->yy_input_file = yyin;
946 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
949 /* Note that here we test for yy_c_buf_p "<=" to the position
950 * of the first EOB in the buffer, since yy_c_buf_p will
951 * already have been incremented past the NUL character
952 * (since all states make transitions on EOB to the
953 * end-of-buffer state). Contrast this with the test
954 * in input().
956 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
957 { /* This was really a NUL. */
958 yy_state_type yy_next_state;
960 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
962 yy_current_state = yy_get_previous_state();
964 /* Okay, we're now positioned to make the NUL
965 * transition. We couldn't have
966 * yy_get_previous_state() go ahead and do it
967 * for us because it doesn't know how to deal
968 * with the possibility of jamming (and we don't
969 * want to build jamming into it because then it
970 * will run more slowly).
973 yy_next_state = yy_try_NUL_trans( yy_current_state );
975 yy_bp = yytext_ptr + YY_MORE_ADJ;
977 if ( yy_next_state )
979 /* Consume the NUL. */
980 yy_cp = ++yy_c_buf_p;
981 yy_current_state = yy_next_state;
982 goto yy_match;
985 else
987 yy_cp = yy_c_buf_p;
988 goto yy_find_action;
992 else switch ( yy_get_next_buffer() )
994 case EOB_ACT_END_OF_FILE:
996 yy_did_buffer_switch_on_eof = 0;
998 if ( yywrap() )
1000 /* Note: because we've taken care in
1001 * yy_get_next_buffer() to have set up
1002 * yytext, we can now set up
1003 * yy_c_buf_p so that if some total
1004 * hoser (like flex itself) wants to
1005 * call the scanner after we return the
1006 * YY_NULL, it'll still work - another
1007 * YY_NULL will get returned.
1009 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1011 yy_act = YY_STATE_EOF(YY_START);
1012 goto do_action;
1015 else
1017 if ( ! yy_did_buffer_switch_on_eof )
1018 YY_NEW_FILE;
1020 break;
1023 case EOB_ACT_CONTINUE_SCAN:
1024 yy_c_buf_p =
1025 yytext_ptr + yy_amount_of_matched_text;
1027 yy_current_state = yy_get_previous_state();
1029 yy_cp = yy_c_buf_p;
1030 yy_bp = yytext_ptr + YY_MORE_ADJ;
1031 goto yy_match;
1033 case EOB_ACT_LAST_MATCH:
1034 yy_c_buf_p =
1035 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1037 yy_current_state = yy_get_previous_state();
1039 yy_cp = yy_c_buf_p;
1040 yy_bp = yytext_ptr + YY_MORE_ADJ;
1041 goto yy_find_action;
1043 break;
1046 default:
1047 YY_FATAL_ERROR(
1048 "fatal flex scanner internal error--no action found" );
1049 } /* end of action switch */
1050 } /* end of scanning one token */
1051 } /* end of yylex */
1054 /* yy_get_next_buffer - try to read in a new buffer
1056 * Returns a code representing an action:
1057 * EOB_ACT_LAST_MATCH -
1058 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1059 * EOB_ACT_END_OF_FILE - end of file
1062 static int yy_get_next_buffer()
1064 register char *dest = yy_current_buffer->yy_ch_buf;
1065 register char *source = yytext_ptr;
1066 register int number_to_move, i;
1067 int ret_val;
1069 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1070 YY_FATAL_ERROR(
1071 "fatal flex scanner internal error--end of buffer missed" );
1073 if ( yy_current_buffer->yy_fill_buffer == 0 )
1074 { /* Don't try to fill the buffer, so this is an EOF. */
1075 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1077 /* We matched a single character, the EOB, so
1078 * treat this as a final EOF.
1080 return EOB_ACT_END_OF_FILE;
1083 else
1085 /* We matched some text prior to the EOB, first
1086 * process it.
1088 return EOB_ACT_LAST_MATCH;
1092 /* Try to read more data. */
1094 /* First move last chars to start of buffer. */
1095 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1097 for ( i = 0; i < number_to_move; ++i )
1098 *(dest++) = *(source++);
1100 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1101 /* don't do the read, it's not guaranteed to return an EOF,
1102 * just force an EOF
1104 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1106 else
1108 int num_to_read =
1109 yy_current_buffer->yy_buf_size - number_to_move - 1;
1111 while ( num_to_read <= 0 )
1112 { /* Not enough room in the buffer - grow it. */
1113 #ifdef YY_USES_REJECT
1114 YY_FATAL_ERROR(
1115 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1116 #else
1118 /* just a shorter name for the current buffer */
1119 YY_BUFFER_STATE b = yy_current_buffer;
1121 int yy_c_buf_p_offset =
1122 (int) (yy_c_buf_p - b->yy_ch_buf);
1124 if ( b->yy_is_our_buffer )
1126 int new_size = b->yy_buf_size * 2;
1128 if ( new_size <= 0 )
1129 b->yy_buf_size += b->yy_buf_size / 8;
1130 else
1131 b->yy_buf_size *= 2;
1133 b->yy_ch_buf = (char *)
1134 /* Include room in for 2 EOB chars. */
1135 yy_flex_realloc( (void *) b->yy_ch_buf,
1136 b->yy_buf_size + 2 );
1138 else
1139 /* Can't grow it, we don't own it. */
1140 b->yy_ch_buf = 0;
1142 if ( ! b->yy_ch_buf )
1143 YY_FATAL_ERROR(
1144 "fatal error - scanner input buffer overflow" );
1146 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1148 num_to_read = yy_current_buffer->yy_buf_size -
1149 number_to_move - 1;
1150 #endif
1153 if ( num_to_read > YY_READ_BUF_SIZE )
1154 num_to_read = YY_READ_BUF_SIZE;
1156 /* Read in more data. */
1157 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1158 yy_n_chars, num_to_read );
1160 yy_current_buffer->yy_n_chars = yy_n_chars;
1163 if ( yy_n_chars == 0 )
1165 if ( number_to_move == YY_MORE_ADJ )
1167 ret_val = EOB_ACT_END_OF_FILE;
1168 yyrestart( yyin );
1171 else
1173 ret_val = EOB_ACT_LAST_MATCH;
1174 yy_current_buffer->yy_buffer_status =
1175 YY_BUFFER_EOF_PENDING;
1179 else
1180 ret_val = EOB_ACT_CONTINUE_SCAN;
1182 yy_n_chars += number_to_move;
1183 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1184 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1186 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1188 return ret_val;
1192 /* yy_get_previous_state - get the state just before the EOB char was reached */
1194 static yy_state_type yy_get_previous_state()
1196 register yy_state_type yy_current_state;
1197 register char *yy_cp;
1199 yy_current_state = yy_start;
1200 yy_state_ptr = yy_state_buf;
1201 *yy_state_ptr++ = yy_current_state;
1203 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1205 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1206 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1208 yy_current_state = (int) yy_def[yy_current_state];
1209 if ( yy_current_state >= 136 )
1210 yy_c = yy_meta[(unsigned int) yy_c];
1212 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1213 *yy_state_ptr++ = yy_current_state;
1216 return yy_current_state;
1220 /* yy_try_NUL_trans - try to make a transition on the NUL character
1222 * synopsis
1223 * next_state = yy_try_NUL_trans( current_state );
1226 #ifdef YY_USE_PROTOS
1227 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1228 #else
1229 static yy_state_type yy_try_NUL_trans( yy_current_state )
1230 yy_state_type yy_current_state;
1231 #endif
1233 register int yy_is_jam;
1235 register YY_CHAR yy_c = 1;
1236 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1238 yy_current_state = (int) yy_def[yy_current_state];
1239 if ( yy_current_state >= 136 )
1240 yy_c = yy_meta[(unsigned int) yy_c];
1242 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1243 yy_is_jam = (yy_current_state == 135);
1244 if ( ! yy_is_jam )
1245 *yy_state_ptr++ = yy_current_state;
1247 return yy_is_jam ? 0 : yy_current_state;
1251 #ifndef YY_NO_UNPUT
1252 #ifdef YY_USE_PROTOS
1253 static void yyunput( int c, register char *yy_bp )
1254 #else
1255 static void yyunput( c, yy_bp )
1256 int c;
1257 register char *yy_bp;
1258 #endif
1260 register char *yy_cp = yy_c_buf_p;
1262 /* undo effects of setting up yytext */
1263 *yy_cp = yy_hold_char;
1265 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1266 { /* need to shift things up to make room */
1267 /* +2 for EOB chars. */
1268 register int number_to_move = yy_n_chars + 2;
1269 register char *dest = &yy_current_buffer->yy_ch_buf[
1270 yy_current_buffer->yy_buf_size + 2];
1271 register char *source =
1272 &yy_current_buffer->yy_ch_buf[number_to_move];
1274 while ( source > yy_current_buffer->yy_ch_buf )
1275 *--dest = *--source;
1277 yy_cp += (int) (dest - source);
1278 yy_bp += (int) (dest - source);
1279 yy_current_buffer->yy_n_chars =
1280 yy_n_chars = yy_current_buffer->yy_buf_size;
1282 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1283 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1286 *--yy_cp = (char) c;
1288 if ( c == '\n' )
1289 --yylineno;
1291 yytext_ptr = yy_bp;
1292 yy_hold_char = *yy_cp;
1293 yy_c_buf_p = yy_cp;
1295 #endif /* ifndef YY_NO_UNPUT */
1298 #ifdef __cplusplus
1299 static int yyinput()
1300 #else
1301 static int input()
1302 #endif
1304 int c;
1306 *yy_c_buf_p = yy_hold_char;
1308 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1310 /* yy_c_buf_p now points to the character we want to return.
1311 * If this occurs *before* the EOB characters, then it's a
1312 * valid NUL; if not, then we've hit the end of the buffer.
1314 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1315 /* This was really a NUL. */
1316 *yy_c_buf_p = '\0';
1318 else
1319 { /* need more input */
1320 int offset = yy_c_buf_p - yytext_ptr;
1321 ++yy_c_buf_p;
1323 switch ( yy_get_next_buffer() )
1325 case EOB_ACT_LAST_MATCH:
1326 /* This happens because yy_g_n_b()
1327 * sees that we've accumulated a
1328 * token and flags that we need to
1329 * try matching the token before
1330 * proceeding. But for input(),
1331 * there's no matching to consider.
1332 * So convert the EOB_ACT_LAST_MATCH
1333 * to EOB_ACT_END_OF_FILE.
1336 /* Reset buffer status. */
1337 yyrestart( yyin );
1339 /* fall through */
1341 case EOB_ACT_END_OF_FILE:
1343 if ( yywrap() )
1344 return EOF;
1346 if ( ! yy_did_buffer_switch_on_eof )
1347 YY_NEW_FILE;
1348 #ifdef __cplusplus
1349 return yyinput();
1350 #else
1351 return input();
1352 #endif
1355 case EOB_ACT_CONTINUE_SCAN:
1356 yy_c_buf_p = yytext_ptr + offset;
1357 break;
1362 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1363 *yy_c_buf_p = '\0'; /* preserve yytext */
1364 yy_hold_char = *++yy_c_buf_p;
1366 if ( c == '\n' )
1367 ++yylineno;
1369 return c;
1373 #ifdef YY_USE_PROTOS
1374 void yyrestart( FILE *input_file )
1375 #else
1376 void yyrestart( input_file )
1377 FILE *input_file;
1378 #endif
1380 if ( ! yy_current_buffer )
1381 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1383 yy_init_buffer( yy_current_buffer, input_file );
1384 yy_load_buffer_state();
1388 #ifdef YY_USE_PROTOS
1389 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1390 #else
1391 void yy_switch_to_buffer( new_buffer )
1392 YY_BUFFER_STATE new_buffer;
1393 #endif
1395 if ( yy_current_buffer == new_buffer )
1396 return;
1398 if ( yy_current_buffer )
1400 /* Flush out information for old buffer. */
1401 *yy_c_buf_p = yy_hold_char;
1402 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1403 yy_current_buffer->yy_n_chars = yy_n_chars;
1406 yy_current_buffer = new_buffer;
1407 yy_load_buffer_state();
1409 /* We don't actually know whether we did this switch during
1410 * EOF (yywrap()) processing, but the only time this flag
1411 * is looked at is after yywrap() is called, so it's safe
1412 * to go ahead and always set it.
1414 yy_did_buffer_switch_on_eof = 1;
1418 #ifdef YY_USE_PROTOS
1419 void yy_load_buffer_state( void )
1420 #else
1421 void yy_load_buffer_state()
1422 #endif
1424 yy_n_chars = yy_current_buffer->yy_n_chars;
1425 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1426 yyin = yy_current_buffer->yy_input_file;
1427 yy_hold_char = *yy_c_buf_p;
1431 #ifdef YY_USE_PROTOS
1432 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1433 #else
1434 YY_BUFFER_STATE yy_create_buffer( file, size )
1435 FILE *file;
1436 int size;
1437 #endif
1439 YY_BUFFER_STATE b;
1441 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1442 if ( ! b )
1443 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1445 b->yy_buf_size = size;
1447 /* yy_ch_buf has to be 2 characters longer than the size given because
1448 * we need to put in 2 end-of-buffer characters.
1450 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1451 if ( ! b->yy_ch_buf )
1452 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1454 b->yy_is_our_buffer = 1;
1456 yy_init_buffer( b, file );
1458 return b;
1462 #ifdef YY_USE_PROTOS
1463 void yy_delete_buffer( YY_BUFFER_STATE b )
1464 #else
1465 void yy_delete_buffer( b )
1466 YY_BUFFER_STATE b;
1467 #endif
1469 if ( ! b )
1470 return;
1472 if ( b == yy_current_buffer )
1473 yy_current_buffer = (YY_BUFFER_STATE) 0;
1475 if ( b->yy_is_our_buffer )
1476 yy_flex_free( (void *) b->yy_ch_buf );
1478 yy_flex_free( (void *) b );
1482 #ifndef YY_ALWAYS_INTERACTIVE
1483 #ifndef YY_NEVER_INTERACTIVE
1484 extern int isatty YY_PROTO(( int ));
1485 #endif
1486 #endif
1488 #ifdef YY_USE_PROTOS
1489 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1490 #else
1491 void yy_init_buffer( b, file )
1492 YY_BUFFER_STATE b;
1493 FILE *file;
1494 #endif
1498 yy_flush_buffer( b );
1500 b->yy_input_file = file;
1501 b->yy_fill_buffer = 1;
1503 #if YY_ALWAYS_INTERACTIVE
1504 b->yy_is_interactive = 1;
1505 #else
1506 #if YY_NEVER_INTERACTIVE
1507 b->yy_is_interactive = 0;
1508 #else
1509 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1510 #endif
1511 #endif
1515 #ifdef YY_USE_PROTOS
1516 void yy_flush_buffer( YY_BUFFER_STATE b )
1517 #else
1518 void yy_flush_buffer( b )
1519 YY_BUFFER_STATE b;
1520 #endif
1523 if ( ! b )
1524 return;
1526 b->yy_n_chars = 0;
1528 /* We always need two end-of-buffer characters. The first causes
1529 * a transition to the end-of-buffer state. The second causes
1530 * a jam in that state.
1532 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1533 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1535 b->yy_buf_pos = &b->yy_ch_buf[0];
1537 b->yy_at_bol = 1;
1538 b->yy_buffer_status = YY_BUFFER_NEW;
1540 if ( b == yy_current_buffer )
1541 yy_load_buffer_state();
1545 #ifndef YY_NO_SCAN_BUFFER
1546 #ifdef YY_USE_PROTOS
1547 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1548 #else
1549 YY_BUFFER_STATE yy_scan_buffer( base, size )
1550 char *base;
1551 yy_size_t size;
1552 #endif
1554 YY_BUFFER_STATE b;
1556 if ( size < 2 ||
1557 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1558 base[size-1] != YY_END_OF_BUFFER_CHAR )
1559 /* They forgot to leave room for the EOB's. */
1560 return 0;
1562 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1563 if ( ! b )
1564 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1566 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1567 b->yy_buf_pos = b->yy_ch_buf = base;
1568 b->yy_is_our_buffer = 0;
1569 b->yy_input_file = 0;
1570 b->yy_n_chars = b->yy_buf_size;
1571 b->yy_is_interactive = 0;
1572 b->yy_at_bol = 1;
1573 b->yy_fill_buffer = 0;
1574 b->yy_buffer_status = YY_BUFFER_NEW;
1576 yy_switch_to_buffer( b );
1578 return b;
1580 #endif
1583 #ifndef YY_NO_SCAN_STRING
1584 #ifdef YY_USE_PROTOS
1585 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1586 #else
1587 YY_BUFFER_STATE yy_scan_string( yy_str )
1588 yyconst char *yy_str;
1589 #endif
1591 int len;
1592 for ( len = 0; yy_str[len]; ++len )
1595 return yy_scan_bytes( yy_str, len );
1597 #endif
1600 #ifndef YY_NO_SCAN_BYTES
1601 #ifdef YY_USE_PROTOS
1602 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1603 #else
1604 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1605 yyconst char *bytes;
1606 int len;
1607 #endif
1609 YY_BUFFER_STATE b;
1610 char *buf;
1611 yy_size_t n;
1612 int i;
1614 /* Get memory for full buffer, including space for trailing EOB's. */
1615 n = len + 2;
1616 buf = (char *) yy_flex_alloc( n );
1617 if ( ! buf )
1618 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1620 for ( i = 0; i < len; ++i )
1621 buf[i] = bytes[i];
1623 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1625 b = yy_scan_buffer( buf, n );
1626 if ( ! b )
1627 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1629 /* It's okay to grow etc. this buffer, and we should throw it
1630 * away when we're done.
1632 b->yy_is_our_buffer = 1;
1634 return b;
1636 #endif
1639 #ifndef YY_NO_PUSH_STATE
1640 #ifdef YY_USE_PROTOS
1641 static void yy_push_state( int new_state )
1642 #else
1643 static void yy_push_state( new_state )
1644 int new_state;
1645 #endif
1647 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1649 yy_size_t new_size;
1651 yy_start_stack_depth += YY_START_STACK_INCR;
1652 new_size = yy_start_stack_depth * sizeof( int );
1654 if ( ! yy_start_stack )
1655 yy_start_stack = (int *) yy_flex_alloc( new_size );
1657 else
1658 yy_start_stack = (int *) yy_flex_realloc(
1659 (void *) yy_start_stack, new_size );
1661 if ( ! yy_start_stack )
1662 YY_FATAL_ERROR(
1663 "out of memory expanding start-condition stack" );
1666 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1668 BEGIN(new_state);
1670 #endif
1673 #ifndef YY_NO_POP_STATE
1674 static void yy_pop_state()
1676 if ( --yy_start_stack_ptr < 0 )
1677 YY_FATAL_ERROR( "start-condition stack underflow" );
1679 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1681 #endif
1684 #ifndef YY_NO_TOP_STATE
1685 static int yy_top_state()
1687 return yy_start_stack[yy_start_stack_ptr - 1];
1689 #endif
1691 #ifndef YY_EXIT_FAILURE
1692 #define YY_EXIT_FAILURE 2
1693 #endif
1695 #ifdef YY_USE_PROTOS
1696 static void yy_fatal_error( yyconst char msg[] )
1697 #else
1698 static void yy_fatal_error( msg )
1699 char msg[];
1700 #endif
1702 (void) fprintf( stderr, "%s\n", msg );
1703 exit( YY_EXIT_FAILURE );
1708 /* Redefine yyless() so it works in section 3 code. */
1710 #undef yyless
1711 #define yyless(n) \
1712 do \
1714 /* Undo effects of setting up yytext. */ \
1715 yytext[yyleng] = yy_hold_char; \
1716 yy_c_buf_p = yytext + n; \
1717 yy_hold_char = *yy_c_buf_p; \
1718 *yy_c_buf_p = '\0'; \
1719 yyleng = n; \
1721 while ( 0 )
1724 /* Internal utility routines. */
1726 #ifndef yytext_ptr
1727 #ifdef YY_USE_PROTOS
1728 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1729 #else
1730 static void yy_flex_strncpy( s1, s2, n )
1731 char *s1;
1732 yyconst char *s2;
1733 int n;
1734 #endif
1736 register int i;
1737 for ( i = 0; i < n; ++i )
1738 s1[i] = s2[i];
1740 #endif
1742 #ifdef YY_NEED_STRLEN
1743 #ifdef YY_USE_PROTOS
1744 static int yy_flex_strlen( yyconst char *s )
1745 #else
1746 static int yy_flex_strlen( s )
1747 yyconst char *s;
1748 #endif
1750 register int n;
1751 for ( n = 0; s[n]; ++n )
1754 return n;
1756 #endif
1759 #ifdef YY_USE_PROTOS
1760 static void *yy_flex_alloc( yy_size_t size )
1761 #else
1762 static void *yy_flex_alloc( size )
1763 yy_size_t size;
1764 #endif
1766 return (void *) malloc( size );
1769 #ifdef YY_USE_PROTOS
1770 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1771 #else
1772 static void *yy_flex_realloc( ptr, size )
1773 void *ptr;
1774 yy_size_t size;
1775 #endif
1777 /* The cast to (char *) in the following accommodates both
1778 * implementations that use char* generic pointers, and those
1779 * that use void* generic pointers. It works with the latter
1780 * because both ANSI C and C++ allow castless assignment from
1781 * any pointer type to void*, and deal with argument conversions
1782 * as though doing an assignment.
1784 return (void *) realloc( (char *) ptr, size );
1787 #ifdef YY_USE_PROTOS
1788 static void yy_flex_free( void *ptr )
1789 #else
1790 static void yy_flex_free( ptr )
1791 void *ptr;
1792 #endif
1794 free( ptr );
1797 #if YY_MAIN
1798 int main()
1800 yylex();
1801 return 0;
1803 #endif
1804 #line 92 "winprefslex.l"
1808 * Run-of-the mill requirement for yacc
1811 yywrap ()
1813 return 1;
1817 * Run a file through the yacc parser
1819 void
1820 parse_file (FILE *file)
1822 if (!file)
1823 return;
1825 yylineno = 1;
1826 yyin = file;
1827 yyparse ();