This commit was generated by cvs2svn to compensate for changes in r6453,
[chise/xemacs-chise.git.1] / netinstall / inilex.c
1 /* A lexical scanner generated by flex */
2
3 /* Scanner skeleton version:
4  * $Header: /usr/CVSroot/XEmacs/xemacs/netinstall/Attic/inilex.c,v 1.1.2.3 2000/12/27 09:35:04 andyp Exp $
5  */
6
7 #define FLEX_SCANNER
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
10
11 #include <stdio.h>
12
13
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
15 #ifdef c_plusplus
16 #ifndef __cplusplus
17 #define __cplusplus
18 #endif
19 #endif
20
21
22 #ifdef __cplusplus
23
24 #include <stdlib.h>
25 #include <unistd.h>
26
27 /* Use prototypes in function declarations. */
28 #define YY_USE_PROTOS
29
30 /* The "const" storage-class-modifier is valid. */
31 #define YY_USE_CONST
32
33 #else   /* ! __cplusplus */
34
35 #if __STDC__
36
37 #define YY_USE_PROTOS
38 #define YY_USE_CONST
39
40 #endif  /* __STDC__ */
41 #endif  /* ! __cplusplus */
42
43 #ifdef __TURBOC__
44  #pragma warn -rch
45  #pragma warn -use
46 #include <io.h>
47 #include <stdlib.h>
48 #define YY_USE_CONST
49 #define YY_USE_PROTOS
50 #endif
51
52 #ifdef YY_USE_CONST
53 #define yyconst const
54 #else
55 #define yyconst
56 #endif
57
58
59 #ifdef YY_USE_PROTOS
60 #define YY_PROTO(proto) proto
61 #else
62 #define YY_PROTO(proto) ()
63 #endif
64
65 /* Returned upon end-of-file. */
66 #define YY_NULL 0
67
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69  * integer for use as an array index.  If the signed char is negative,
70  * we want to instead treat it as an 8-bit unsigned char, hence the
71  * double cast.
72  */
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
74
75 /* Enter a start condition.  This macro really ought to take a parameter,
76  * but we do it the disgusting crufty way forced on us by the ()-less
77  * definition of BEGIN.
78  */
79 #define BEGIN yy_start = 1 + 2 *
80
81 /* Translate the current start state into a value that can be later handed
82  * to BEGIN to return to the state.  The YYSTATE alias is for lex
83  * compatibility.
84  */
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
87
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
90
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
93
94 #define YY_END_OF_BUFFER_CHAR 0
95
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
98
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
100
101 extern int yyleng;
102 extern FILE *yyin, *yyout;
103
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
107
108 /* The funky do-while in the following #define is used to turn the definition
109  * int a single C statement (which needs a semi-colon terminator).  This
110  * avoids problems with code like:
111  *
112  *      if ( condition_holds )
113  *              yyless( 5 );
114  *      else
115  *              do_something_else();
116  *
117  * Prior to using the do-while the compiler would get upset at the
118  * "else" because it interpreted the "if" statement as being all
119  * done when it reached the ';' after the yyless() call.
120  */
121
122 /* Return all but the first 'n' matched characters back to the input stream. */
123
124 #define yyless(n) \
125         do \
126                 { \
127                 /* Undo effects of setting up yytext. */ \
128                 *yy_cp = yy_hold_char; \
129                 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
130                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
131                 } \
132         while ( 0 )
133
134 #define unput(c) yyunput( c, yytext_ptr )
135
136 /* The following is because we cannot portably get our hands on size_t
137  * (without autoconf's help, which isn't available because we want
138  * flex-generated scanners to compile on their own).
139  */
140 typedef unsigned int yy_size_t;
141
142
143 struct yy_buffer_state
144         {
145         FILE *yy_input_file;
146
147         char *yy_ch_buf;                /* input buffer */
148         char *yy_buf_pos;               /* current position in input buffer */
149
150         /* Size of input buffer in bytes, not including room for EOB
151          * characters.
152          */
153         yy_size_t yy_buf_size;
154
155         /* Number of characters read into yy_ch_buf, not including EOB
156          * characters.
157          */
158         int yy_n_chars;
159
160         /* Whether we "own" the buffer - i.e., we know we created it,
161          * and can realloc() it to grow it, and should free() it to
162          * delete it.
163          */
164         int yy_is_our_buffer;
165
166         /* Whether this is an "interactive" input source; if so, and
167          * if we're using stdio for input, then we want to use getc()
168          * instead of fread(), to make sure we stop fetching input after
169          * each newline.
170          */
171         int yy_is_interactive;
172
173         /* Whether we're considered to be at the beginning of a line.
174          * If so, '^' rules will be active on the next match, otherwise
175          * not.
176          */
177         int yy_at_bol;
178
179         /* Whether to try to fill the input buffer when we reach the
180          * end of it.
181          */
182         int yy_fill_buffer;
183
184         int yy_buffer_status;
185 #define YY_BUFFER_NEW 0
186 #define YY_BUFFER_NORMAL 1
187         /* When an EOF's been seen but there's still some text to process
188          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
189          * shouldn't try reading from the input source any more.  We might
190          * still have a bunch of tokens to match, though, because of
191          * possible backing-up.
192          *
193          * When we actually see the EOF, we change the status to "new"
194          * (via yyrestart()), so that the user can continue scanning by
195          * just pointing yyin at a new input file.
196          */
197 #define YY_BUFFER_EOF_PENDING 2
198         };
199
200 static YY_BUFFER_STATE yy_current_buffer = 0;
201
202 /* We provide macros for accessing buffer states in case in the
203  * future we want to put the buffer states in a more general
204  * "scanner state".
205  */
206 #define YY_CURRENT_BUFFER yy_current_buffer
207
208
209 /* yy_hold_char holds the character lost when yytext is formed. */
210 static char yy_hold_char;
211
212 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
213
214
215 int yyleng;
216
217 /* Points to current character in buffer. */
218 static char *yy_c_buf_p = (char *) 0;
219 static int yy_init = 1;         /* whether we need to initialize */
220 static int yy_start = 0;        /* start state number */
221
222 /* Flag which is used to allow yywrap()'s to do buffer switches
223  * instead of setting up a fresh yyin.  A bit of a hack ...
224  */
225 static int yy_did_buffer_switch_on_eof;
226
227 void yyrestart YY_PROTO(( FILE *input_file ));
228
229 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
230 void yy_load_buffer_state YY_PROTO(( void ));
231 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
232 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
233 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
234 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
235 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
236
237 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
238 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
239 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
240
241 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
242 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
243 static void yy_flex_free YY_PROTO(( void * ));
244
245 #define yy_new_buffer yy_create_buffer
246
247 #define yy_set_interactive(is_interactive) \
248         { \
249         if ( ! yy_current_buffer ) \
250                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
251         yy_current_buffer->yy_is_interactive = is_interactive; \
252         }
253
254 #define yy_set_bol(at_bol) \
255         { \
256         if ( ! yy_current_buffer ) \
257                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
258         yy_current_buffer->yy_at_bol = at_bol; \
259         }
260
261 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
262
263
264 #define YY_USES_REJECT
265
266 #define yywrap() 1
267 #define YY_SKIP_YYWRAP
268 typedef unsigned char YY_CHAR;
269 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
270 typedef int yy_state_type;
271 extern int yylineno;
272 int yylineno = 1;
273 extern char *yytext;
274 #define yytext_ptr yytext
275
276 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
277 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
278 static int yy_get_next_buffer YY_PROTO(( void ));
279 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
280
281 /* Done after the current pattern has been matched and before the
282  * corresponding action - sets up yytext.
283  */
284 #define YY_DO_BEFORE_ACTION \
285         yytext_ptr = yy_bp; \
286         yyleng = (int) (yy_cp - yy_bp); \
287         yy_hold_char = *yy_cp; \
288         *yy_cp = '\0'; \
289         yy_c_buf_p = yy_cp;
290
291 #define YY_NUM_RULES 21
292 #define YY_END_OF_BUFFER 22
293 static yyconst short int yy_acclist[188] =
294     {   0,
295        22,   20,   21,   17,   20,   21,   19,   21,   20,   21,
296        20,   21,   16,   20,   21,   20,   21,   16,   20,   21,
297        16,   20,   21,   16,   20,   21,   16,   20,   21,   16,
298        20,   21,   16,   20,   21,   16,   20,   21,   16,   20,
299        21,   16,   20,   21,   16,   20,   21,   16,   20,   21,
300        17,    1,   18,   16,   16,   16,   16,   16,   16,   16,
301        16,   16,   10,   16,   16,   16,   16,   16,   16,   16,
302        15,   16,   16,   16,   16,   16,   16,   16,   16,   16,
303        16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
304        16,   16,   16,   16,   16,   16,   16,   16,   16,   13,
305
306        15,   16,   16,   16,   16,   16,    6,   16,   16,   16,
307        16,   16,   16,    6,   10,   16,   11,   15,   14,   15,
308        12,   15,   16,    9,    8,   16,   16,   16,   16,    9,
309        10,    8,   10,   16,   16,   16,   16,   16,   16,    7,
310        16,   16,   16,   16,    7,   10,   16,    5,   16,   16,
311         4,    5,   10,   16,   16,    4,   10,   16,   16,   16,
312        16,   16,   16,   16,   16,   16,   16,   16,   16,   16,
313        16,   16,   16,   16,   16,   16,   16,   16,    3,   16,
314         3,   10,   16,   16,    2,    2,   10
315     } ;
316
317 static yyconst short int yy_accept[167] =
318     {   0,
319         1,    1,    1,    2,    4,    7,    9,   11,   13,   16,
320        18,   21,   24,   27,   30,   33,   36,   39,   42,   45,
321        48,   51,   52,   52,   53,   53,   54,   55,   55,   55,
322        55,   55,   55,   56,   57,   58,   59,   60,   61,   62,
323        63,   64,   65,   66,   67,   68,   69,   70,   71,   72,
324        72,   72,   72,   72,   73,   74,   75,   76,   77,   78,
325        79,   80,   81,   82,   83,   84,   85,   86,   86,   86,
326        86,   86,   87,   88,   89,   90,   91,   92,   93,   94,
327        95,   96,   97,   98,   99,  100,  100,  102,  102,  102,
328       103,  104,  105,  106,  107,  108,  109,  110,  111,  112,
329
330       113,  114,  116,  117,  119,  121,  123,  124,  125,  126,
331       127,  128,  129,  130,  132,  134,  135,  136,  137,  138,
332       139,  140,  141,  142,  143,  144,  145,  147,  148,  149,
333       150,  151,  152,  154,  155,  156,  158,  159,  160,  161,
334       162,  163,  164,  165,  166,  167,  168,  169,  170,  171,
335       172,  173,  174,  175,  176,  177,  178,  179,  180,  181,
336       183,  184,  185,  186,  188,  188
337     } ;
338
339 static yyconst int yy_ec[256] =
340     {   0,
341         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
342         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
343         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
344         1,    2,    1,    4,    5,    1,    1,    1,    1,    1,
345         1,    1,    1,    1,    6,    7,    7,    7,    7,    7,
346         7,    7,    7,    7,    7,    7,    7,    8,    1,    1,
347         1,    1,    1,    1,    7,    7,    7,    7,    7,    7,
348         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
349         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
350         9,    1,   10,    1,    7,    1,   11,    7,   12,   13,
351
352        14,    7,    7,    7,   15,    7,    7,   16,   17,   18,
353        19,   20,    7,   21,   22,   23,   24,   25,    7,   26,
354        27,    7,    1,    1,    1,    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,
362
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
369     } ;
370
371 static yyconst int yy_meta[28] =
372     {   0,
373         1,    1,    1,    1,    1,    2,    2,    3,    1,    1,
374         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
375         2,    2,    2,    2,    2,    2,    2
376     } ;
377
378 static yyconst short int yy_base[171] =
379     {   0,
380         0,   27,  264,  265,  261,  265,  258,  258,    0,   43,
381       242,  246,   45,  231,  243,  248,   52,   48,   54,   57,
382        61,  253,  250,  265,  250,  265,    0,  242,   61,   62,
383        66,   64,  229,  236,  235,  225,  223,  226,  224,  236,
384       265,   69,   72,   75,   71,   73,   82,   74,  265,   82,
385        86,   90,   83,  220,  220,  219,  216,  218,  224,  215,
386        90,   93,   99,  100,   91,  102,  101,  101,  226,  104,
387       107,  224,  222,  221,  212,  219,  222,  214,  117,  119,
388       124,  118,  125,  220,  126,  217,  265,  216,  215,  208,
389       215,  214,  215,  206,  265,  200,  127,  210,  209,  112,
390
391       131,  265,  132,  265,  265,  265,  200,  265,  265,  119,
392       207,  196,  138,  265,  265,  139,  205,  140,  204,  196,
393       196,  265,  201,  200,  141,  145,  265,  199,  265,  189,
394       184,  265,  265,  144,  142,  265,  190,  181,  152,  147,
395       180,  186,  149,  157,  177,  180,  159,  160,  187,  179,
396       162,  166,  179,  178,  168,  175,  161,  265,  167,  265,
397       172,  170,  265,  265,  265,  187,  190,  175,  117,  192
398     } ;
399
400 static yyconst short int yy_def[171] =
401     {   0,
402       165,  165,  165,  165,  165,  165,  166,  167,  168,  169,
403       168,  168,  168,  168,  168,  170,  170,  170,  170,  170,
404       170,  165,  166,  165,  167,  165,  168,  169,  169,  169,
405       169,  169,  168,  168,  168,  168,  168,  168,  168,  170,
406       165,  170,  170,  170,  170,  170,  170,  170,  165,  169,
407       169,  169,  169,  168,  168,  168,  168,  168,  168,  168,
408       170,  170,  170,  170,  170,  170,  170,  169,  169,  169,
409       169,  168,  168,  168,  168,  168,  168,  168,  170,  170,
410       170,  170,  170,  170,  170,  169,  165,  169,  169,  168,
411       168,  168,  168,  168,  165,  168,  170,  170,  170,  170,
412
413       170,  165,  170,  165,  165,  165,  168,  165,  165,  168,
414       168,  168,  170,  165,  165,  170,  170,  170,  168,  168,
415       168,  165,  168,  170,  170,  170,  165,  170,  165,  168,
416       168,  165,  165,  170,  170,  165,  168,  168,  170,  170,
417       168,  168,  170,  170,  168,  168,  170,  170,  168,  168,
418       170,  170,  168,  168,  170,  170,  168,  165,  170,  165,
419       168,  170,  165,  165,    0,  165,  165,  165,  165,  165
420     } ;
421
422 static yyconst short int yy_nxt[293] =
423     {   0,
424         4,    5,    6,    7,    8,    9,    9,    4,   10,    4,
425         9,    9,    9,    9,   11,   12,    9,    9,    9,    9,
426         9,   13,   14,    9,   15,    9,    9,    4,    5,    6,
427         7,    8,   16,   16,    4,   10,    4,   16,   16,   16,
428        16,   17,   18,   16,   16,   16,   16,   16,   19,   20,
429        16,   21,   16,   16,   29,   41,   30,   35,   36,   41,
430        43,   41,   31,   37,   41,   32,   44,   45,   41,   42,
431        49,   49,   46,   49,   48,   49,   41,   53,   41,   41,
432        41,   41,   41,   47,   50,   62,   52,   51,   63,   41,
433        61,   49,   49,   64,   67,   49,   65,   41,   41,   49,
434
435        41,   66,   68,   70,   71,   69,   41,   41,   41,   41,
436        49,   83,   79,   49,   80,   84,   49,  116,   28,   41,
437        81,   86,   85,   82,   41,   41,   41,   97,   88,   89,
438        98,   41,   41,   41,   41,   99,  101,  100,   41,   41,
439       103,  120,  113,  121,  117,   41,   41,   41,   41,   41,
440       118,   41,   41,  124,   41,  134,   41,  128,  135,   41,
441       139,  125,  140,  126,   41,  143,   41,   41,  144,   41,
442       147,  148,  155,   41,   41,   41,   27,  164,  152,  163,
443       161,  151,  160,  156,  159,  158,  162,   23,   23,   23,
444        25,   25,   25,   40,   40,  157,  154,  153,  150,  149,
445
446       146,  145,  142,  141,  138,  137,  136,  133,  132,  131,
447       130,  129,  127,  123,  122,  119,  115,  114,  112,  111,
448       110,  109,  108,  107,  106,  105,  104,  102,   96,   95,
449        94,   93,   92,   91,   90,   87,   78,   77,   76,   75,
450        74,   73,   72,   41,   60,   59,   58,   57,   56,   55,
451        54,   49,   26,   24,   22,   41,   39,   38,   34,   33,
452        26,   24,   22,  165,    3,  165,  165,  165,  165,  165,
453       165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
454       165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
455       165,  165
456
457     } ;
458
459 static yyconst short int yy_chk[293] =
460     {   0,
461         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
462         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
463         1,    1,    1,    1,    1,    1,    1,    2,    2,    2,
464         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
465         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
466         2,    2,    2,    2,   10,   18,   10,   13,   13,   17,
467        18,   19,   10,   13,   20,   10,   19,   19,   21,   17,
468        29,   30,   19,   32,   21,   31,   42,   32,   45,   43,
469        46,   48,   44,   20,   29,   43,   31,   30,   44,   47,
470        42,   50,   53,   45,   48,   51,   46,   61,   65,   52,
471
472        62,   47,   50,   52,   53,   51,   63,   64,   67,   66,
473        68,   65,   61,   70,   62,   66,   71,  100,  169,  100,
474        63,   68,   67,   64,   79,   82,   80,   79,   70,   71,
475        80,   81,   83,   85,   97,   81,   83,   82,  101,  103,
476        85,  110,   97,  110,  101,  113,  116,  118,  125,  135,
477       103,  134,  126,  113,  140,  125,  143,  118,  126,  139,
478       134,  116,  135,  116,  144,  139,  147,  148,  140,  151,
479       143,  144,  151,  152,  159,  155,  168,  162,  148,  161,
480       157,  147,  156,  152,  155,  154,  159,  166,  166,  166,
481       167,  167,  167,  170,  170,  153,  150,  149,  146,  145,
482
483       142,  141,  138,  137,  131,  130,  128,  124,  123,  121,
484       120,  119,  117,  112,  111,  107,   99,   98,   96,   94,
485        93,   92,   91,   90,   89,   88,   86,   84,   78,   77,
486        76,   75,   74,   73,   72,   69,   60,   59,   58,   57,
487        56,   55,   54,   40,   39,   38,   37,   36,   35,   34,
488        33,   28,   25,   23,   22,   16,   15,   14,   12,   11,
489         8,    7,    5,    3,  165,  165,  165,  165,  165,  165,
490       165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
491       165,  165,  165,  165,  165,  165,  165,  165,  165,  165,
492       165,  165
493
494     } ;
495
496 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
497 static char *yy_full_match;
498 static int yy_lp;
499 #define REJECT \
500 { \
501 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
502 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
503 ++yy_lp; \
504 goto find_rule; \
505 }
506 #define yymore() yymore_used_but_not_detected
507 #define YY_MORE_ADJ 0
508 char *yytext;
509 #line 1 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
510 #define INITIAL 0
511 #line 2 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
512 /*
513  * Copyright (c) 2000, Red Hat, Inc.
514  *
515  *     This program is free software; you can redistribute it and/or modify
516  *     it under the terms of the GNU General Public License as published by
517  *     the Free Software Foundation; either version 2 of the License, or
518  *     (at your option) any later version.
519  *
520  *     A copy of the GNU General Public License can be found at
521  *     http://www.gnu.org/
522  *
523  * Written by DJ Delorie <dj@cygnus.com>
524  *
525  */
526
527 /* tokenize the setup.ini files.  We parse a string which we've
528    previously downloaded.  The program must call ini_init() to specify
529    that string. */
530
531 #include "win32.h"
532 #include <string.h>
533 #include <stdlib.h>
534
535 #include "ini.h"
536 #include "iniparse.h"
537
538 #define YY_INPUT(buf,result,max_size) { result = ini_getchar(buf, max_size); }
539
540 static int ini_getchar(char *buf, int max_size);
541 static void ignore_line ();
542
543 /*%option debug */
544 #define YY_NEVER_INTERACTIVE 1
545 #line 546 "lex.yy.c"
546
547 /* Macros after this point can all be overridden by user definitions in
548  * section 1.
549  */
550
551 #ifndef YY_SKIP_YYWRAP
552 #ifdef __cplusplus
553 extern "C" int yywrap YY_PROTO(( void ));
554 #else
555 extern int yywrap YY_PROTO(( void ));
556 #endif
557 #endif
558
559 #ifndef YY_NO_UNPUT
560 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
561 #endif
562
563 #ifndef yytext_ptr
564 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
565 #endif
566
567 #ifndef YY_NO_INPUT
568 #ifdef __cplusplus
569 static int yyinput YY_PROTO(( void ));
570 #else
571 static int input YY_PROTO(( void ));
572 #endif
573 #endif
574
575 #if YY_STACK_USED
576 static int yy_start_stack_ptr = 0;
577 static int yy_start_stack_depth = 0;
578 static int *yy_start_stack = 0;
579 #ifndef YY_NO_PUSH_STATE
580 static void yy_push_state YY_PROTO(( int new_state ));
581 #endif
582 #ifndef YY_NO_POP_STATE
583 static void yy_pop_state YY_PROTO(( void ));
584 #endif
585 #ifndef YY_NO_TOP_STATE
586 static int yy_top_state YY_PROTO(( void ));
587 #endif
588
589 #else
590 #define YY_NO_PUSH_STATE 1
591 #define YY_NO_POP_STATE 1
592 #define YY_NO_TOP_STATE 1
593 #endif
594
595 #ifdef YY_MALLOC_DECL
596 YY_MALLOC_DECL
597 #else
598 #if __STDC__
599 #ifndef __cplusplus
600 #include <stdlib.h>
601 #endif
602 #else
603 /* Just try to get by without declaring the routines.  This will fail
604  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
605  * or sizeof(void*) != sizeof(int).
606  */
607 #endif
608 #endif
609
610 /* Amount of stuff to slurp up with each read. */
611 #ifndef YY_READ_BUF_SIZE
612 #define YY_READ_BUF_SIZE 8192
613 #endif
614
615 /* Copy whatever the last rule matched to the standard output. */
616
617 #ifndef ECHO
618 /* This used to be an fputs(), but since the string might contain NUL's,
619  * we now use fwrite().
620  */
621 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
622 #endif
623
624 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
625  * is returned in "result".
626  */
627 #ifndef YY_INPUT
628 #define YY_INPUT(buf,result,max_size) \
629         if ( yy_current_buffer->yy_is_interactive ) \
630                 { \
631                 int c = '*', n; \
632                 for ( n = 0; n < max_size && \
633                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
634                         buf[n] = (char) c; \
635                 if ( c == '\n' ) \
636                         buf[n++] = (char) c; \
637                 if ( c == EOF && ferror( yyin ) ) \
638                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
639                 result = n; \
640                 } \
641         else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
642                   && ferror( yyin ) ) \
643                 YY_FATAL_ERROR( "input in flex scanner failed" );
644 #endif
645
646 /* No semi-colon after return; correct usage is to write "yyterminate();" -
647  * we don't want an extra ';' after the "return" because that will cause
648  * some compilers to complain about unreachable statements.
649  */
650 #ifndef yyterminate
651 #define yyterminate() return YY_NULL
652 #endif
653
654 /* Number of entries by which start-condition stack grows. */
655 #ifndef YY_START_STACK_INCR
656 #define YY_START_STACK_INCR 25
657 #endif
658
659 /* Report a fatal error. */
660 #ifndef YY_FATAL_ERROR
661 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
662 #endif
663
664 /* Default declaration of generated scanner - a define so the user can
665  * easily add parameters.
666  */
667 #ifndef YY_DECL
668 #define YY_DECL int yylex YY_PROTO(( void ))
669 #endif
670
671 /* Code executed at the beginning of each rule, after yytext and yyleng
672  * have been set up.
673  */
674 #ifndef YY_USER_ACTION
675 #define YY_USER_ACTION
676 #endif
677
678 /* Code executed at the end of each rule. */
679 #ifndef YY_BREAK
680 #define YY_BREAK break;
681 #endif
682
683 #define YY_RULE_SETUP \
684         if ( yyleng > 0 ) \
685                 yy_current_buffer->yy_at_bol = \
686                                 (yytext[yyleng - 1] == '\n'); \
687         YY_USER_ACTION
688
689 YY_DECL
690         {
691         register yy_state_type yy_current_state;
692         register char *yy_cp, *yy_bp;
693         register int yy_act;
694
695 #line 42 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
696
697
698 #line 699 "lex.yy.c"
699
700         if ( yy_init )
701                 {
702                 yy_init = 0;
703
704 #ifdef YY_USER_INIT
705                 YY_USER_INIT;
706 #endif
707
708                 if ( ! yy_start )
709                         yy_start = 1;   /* first start state */
710
711                 if ( ! yyin )
712                         yyin = stdin;
713
714                 if ( ! yyout )
715                         yyout = stdout;
716
717                 if ( ! yy_current_buffer )
718                         yy_current_buffer =
719                                 yy_create_buffer( yyin, YY_BUF_SIZE );
720
721                 yy_load_buffer_state();
722                 }
723
724         while ( 1 )             /* loops until end-of-file is reached */
725                 {
726                 yy_cp = yy_c_buf_p;
727
728                 /* Support of yytext. */
729                 *yy_cp = yy_hold_char;
730
731                 /* yy_bp points to the position in yy_ch_buf of the start of
732                  * the current run.
733                  */
734                 yy_bp = yy_cp;
735
736                 yy_current_state = yy_start;
737                 yy_current_state += YY_AT_BOL();
738                 yy_state_ptr = yy_state_buf;
739                 *yy_state_ptr++ = yy_current_state;
740 yy_match:
741                 do
742                         {
743                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
744                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
745                                 {
746                                 yy_current_state = (int) yy_def[yy_current_state];
747                                 if ( yy_current_state >= 166 )
748                                         yy_c = yy_meta[(unsigned int) yy_c];
749                                 }
750                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
751                         *yy_state_ptr++ = yy_current_state;
752                         ++yy_cp;
753                         }
754                 while ( yy_base[yy_current_state] != 265 );
755
756 yy_find_action:
757                 yy_current_state = *--yy_state_ptr;
758                 yy_lp = yy_accept[yy_current_state];
759 find_rule: /* we branch to this label when backing up */
760                 for ( ; ; ) /* until we find what rule we matched */
761                         {
762                         if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
763                                 {
764                                 yy_act = yy_acclist[yy_lp];
765                                         {
766                                         yy_full_match = yy_cp;
767                                         break;
768                                         }
769                                 }
770                         --yy_cp;
771                         yy_current_state = *--yy_state_ptr;
772                         yy_lp = yy_accept[yy_current_state];
773                         }
774
775                 YY_DO_BEFORE_ACTION;
776
777                 if ( yy_act != YY_END_OF_BUFFER )
778                         {
779                         int yyl;
780                         for ( yyl = 0; yyl < yyleng; ++yyl )
781                                 if ( yytext[yyl] == '\n' )
782                                         ++yylineno;
783                         }
784
785 do_action:      /* This label is used only to access EOF actions. */
786
787
788                 switch ( yy_act )
789         { /* beginning of action switch */
790 case 1:
791 YY_RULE_SETUP
792 #line 44 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
793 { yylval = strdup (yytext+1);
794                           yylval[strlen (yylval)-1] = 0;
795                           return STRING; }
796         YY_BREAK
797 case 2:
798 YY_RULE_SETUP
799 #line 48 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
800 return SETUP_TIMESTAMP;
801         YY_BREAK
802 case 3:
803 YY_RULE_SETUP
804 #line 49 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
805 return SETUP_VERSION;
806         YY_BREAK
807 case 4:
808 YY_RULE_SETUP
809 #line 50 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
810 return VERSION;
811         YY_BREAK
812 case 5:
813 YY_RULE_SETUP
814 #line 51 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
815 return INSTALL;
816         YY_BREAK
817 case 6:
818 YY_RULE_SETUP
819 #line 52 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
820 return TYPE;
821         YY_BREAK
822 case 7:
823 YY_RULE_SETUP
824 #line 53 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
825 return SOURCE;
826         YY_BREAK
827 case 8:
828 YY_RULE_SETUP
829 #line 54 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
830 return SDESC;
831         YY_BREAK
832 case 9:
833 YY_RULE_SETUP
834 #line 55 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
835 return LDESC;
836         YY_BREAK
837 case 10:
838 YY_RULE_SETUP
839 #line 57 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
840 ignore_line ();
841         YY_BREAK
842 case 11:
843 YY_RULE_SETUP
844 #line 59 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
845 return T_CURR;
846         YY_BREAK
847 case 12:
848 YY_RULE_SETUP
849 #line 60 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
850 return T_TEST;
851         YY_BREAK
852 case 13:
853 YY_RULE_SETUP
854 #line 61 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
855 return T_TEST;
856         YY_BREAK
857 case 14:
858 YY_RULE_SETUP
859 #line 62 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
860 return T_PREV;
861         YY_BREAK
862 case 15:
863 YY_RULE_SETUP
864 #line 63 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
865 return T_UNKNOWN;
866         YY_BREAK
867 case 16:
868 YY_RULE_SETUP
869 #line 65 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
870 { yylval = strdup (yytext);
871                           return STRING; }
872         YY_BREAK
873 case 17:
874 YY_RULE_SETUP
875 #line 68 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
876 /* do nothing */
877         YY_BREAK
878 case 18:
879 YY_RULE_SETUP
880 #line 70 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
881 /* ignore comments */
882         YY_BREAK
883 case 19:
884 YY_RULE_SETUP
885 #line 72 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
886 { return yytext[0]; }
887         YY_BREAK
888 case 20:
889 YY_RULE_SETUP
890 #line 73 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
891 { return yytext[0]; }
892         YY_BREAK
893 case 21:
894 YY_RULE_SETUP
895 #line 75 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
896 ECHO;
897         YY_BREAK
898 #line 899 "lex.yy.c"
899                         case YY_STATE_EOF(INITIAL):
900                                 yyterminate();
901
902         case YY_END_OF_BUFFER:
903                 {
904                 /* Amount of text matched not including the EOB char. */
905                 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
906
907                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
908                 *yy_cp = yy_hold_char;
909
910                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
911                         {
912                         /* We're scanning a new file or input source.  It's
913                          * possible that this happened because the user
914                          * just pointed yyin at a new source and called
915                          * yylex().  If so, then we have to assure
916                          * consistency between yy_current_buffer and our
917                          * globals.  Here is the right place to do so, because
918                          * this is the first action (other than possibly a
919                          * back-up) that will match for the new input source.
920                          */
921                         yy_n_chars = yy_current_buffer->yy_n_chars;
922                         yy_current_buffer->yy_input_file = yyin;
923                         yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
924                         }
925
926                 /* Note that here we test for yy_c_buf_p "<=" to the position
927                  * of the first EOB in the buffer, since yy_c_buf_p will
928                  * already have been incremented past the NUL character
929                  * (since all states make transitions on EOB to the
930                  * end-of-buffer state).  Contrast this with the test
931                  * in input().
932                  */
933                 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
934                         { /* This was really a NUL. */
935                         yy_state_type yy_next_state;
936
937                         yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
938
939                         yy_current_state = yy_get_previous_state();
940
941                         /* Okay, we're now positioned to make the NUL
942                          * transition.  We couldn't have
943                          * yy_get_previous_state() go ahead and do it
944                          * for us because it doesn't know how to deal
945                          * with the possibility of jamming (and we don't
946                          * want to build jamming into it because then it
947                          * will run more slowly).
948                          */
949
950                         yy_next_state = yy_try_NUL_trans( yy_current_state );
951
952                         yy_bp = yytext_ptr + YY_MORE_ADJ;
953
954                         if ( yy_next_state )
955                                 {
956                                 /* Consume the NUL. */
957                                 yy_cp = ++yy_c_buf_p;
958                                 yy_current_state = yy_next_state;
959                                 goto yy_match;
960                                 }
961
962                         else
963                                 {
964                                 yy_cp = yy_c_buf_p;
965                                 goto yy_find_action;
966                                 }
967                         }
968
969                 else switch ( yy_get_next_buffer() )
970                         {
971                         case EOB_ACT_END_OF_FILE:
972                                 {
973                                 yy_did_buffer_switch_on_eof = 0;
974
975                                 if ( yywrap() )
976                                         {
977                                         /* Note: because we've taken care in
978                                          * yy_get_next_buffer() to have set up
979                                          * yytext, we can now set up
980                                          * yy_c_buf_p so that if some total
981                                          * hoser (like flex itself) wants to
982                                          * call the scanner after we return the
983                                          * YY_NULL, it'll still work - another
984                                          * YY_NULL will get returned.
985                                          */
986                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
987
988                                         yy_act = YY_STATE_EOF(YY_START);
989                                         goto do_action;
990                                         }
991
992                                 else
993                                         {
994                                         if ( ! yy_did_buffer_switch_on_eof )
995                                                 YY_NEW_FILE;
996                                         }
997                                 break;
998                                 }
999
1000                         case EOB_ACT_CONTINUE_SCAN:
1001                                 yy_c_buf_p =
1002                                         yytext_ptr + yy_amount_of_matched_text;
1003
1004                                 yy_current_state = yy_get_previous_state();
1005
1006                                 yy_cp = yy_c_buf_p;
1007                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1008                                 goto yy_match;
1009
1010                         case EOB_ACT_LAST_MATCH:
1011                                 yy_c_buf_p =
1012                                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1013
1014                                 yy_current_state = yy_get_previous_state();
1015
1016                                 yy_cp = yy_c_buf_p;
1017                                 yy_bp = yytext_ptr + YY_MORE_ADJ;
1018                                 goto yy_find_action;
1019                         }
1020                 break;
1021                 }
1022
1023         default:
1024                 YY_FATAL_ERROR(
1025                         "fatal flex scanner internal error--no action found" );
1026         } /* end of action switch */
1027                 } /* end of scanning one token */
1028         } /* end of yylex */
1029
1030
1031 /* yy_get_next_buffer - try to read in a new buffer
1032  *
1033  * Returns a code representing an action:
1034  *      EOB_ACT_LAST_MATCH -
1035  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1036  *      EOB_ACT_END_OF_FILE - end of file
1037  */
1038
1039 static int yy_get_next_buffer()
1040         {
1041         register char *dest = yy_current_buffer->yy_ch_buf;
1042         register char *source = yytext_ptr;
1043         register int number_to_move, i;
1044         int ret_val;
1045
1046         if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1047                 YY_FATAL_ERROR(
1048                 "fatal flex scanner internal error--end of buffer missed" );
1049
1050         if ( yy_current_buffer->yy_fill_buffer == 0 )
1051                 { /* Don't try to fill the buffer, so this is an EOF. */
1052                 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1053                         {
1054                         /* We matched a singled characater, the EOB, so
1055                          * treat this as a final EOF.
1056                          */
1057                         return EOB_ACT_END_OF_FILE;
1058                         }
1059
1060                 else
1061                         {
1062                         /* We matched some text prior to the EOB, first
1063                          * process it.
1064                          */
1065                         return EOB_ACT_LAST_MATCH;
1066                         }
1067                 }
1068
1069         /* Try to read more data. */
1070
1071         /* First move last chars to start of buffer. */
1072         number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1073
1074         for ( i = 0; i < number_to_move; ++i )
1075                 *(dest++) = *(source++);
1076
1077         if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1078                 /* don't do the read, it's not guaranteed to return an EOF,
1079                  * just force an EOF
1080                  */
1081                 yy_n_chars = 0;
1082
1083         else
1084                 {
1085                 int num_to_read =
1086                         yy_current_buffer->yy_buf_size - number_to_move - 1;
1087
1088                 while ( num_to_read <= 0 )
1089                         { /* Not enough room in the buffer - grow it. */
1090 #ifdef YY_USES_REJECT
1091                         YY_FATAL_ERROR(
1092 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1093 #else
1094
1095                         /* just a shorter name for the current buffer */
1096                         YY_BUFFER_STATE b = yy_current_buffer;
1097
1098                         int yy_c_buf_p_offset =
1099                                 (int) (yy_c_buf_p - b->yy_ch_buf);
1100
1101                         if ( b->yy_is_our_buffer )
1102                                 {
1103                                 int new_size = b->yy_buf_size * 2;
1104
1105                                 if ( new_size <= 0 )
1106                                         b->yy_buf_size += b->yy_buf_size / 8;
1107                                 else
1108                                         b->yy_buf_size *= 2;
1109
1110                                 b->yy_ch_buf = (char *)
1111                                         /* Include room in for 2 EOB chars. */
1112                                         yy_flex_realloc( (void *) b->yy_ch_buf,
1113                                                          b->yy_buf_size + 2 );
1114                                 }
1115                         else
1116                                 /* Can't grow it, we don't own it. */
1117                                 b->yy_ch_buf = 0;
1118
1119                         if ( ! b->yy_ch_buf )
1120                                 YY_FATAL_ERROR(
1121                                 "fatal error - scanner input buffer overflow" );
1122
1123                         yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1124
1125                         num_to_read = yy_current_buffer->yy_buf_size -
1126                                                 number_to_move - 1;
1127 #endif
1128                         }
1129
1130                 if ( num_to_read > YY_READ_BUF_SIZE )
1131                         num_to_read = YY_READ_BUF_SIZE;
1132
1133                 /* Read in more data. */
1134                 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1135                         yy_n_chars, num_to_read );
1136                 }
1137
1138         if ( yy_n_chars == 0 )
1139                 {
1140                 if ( number_to_move == YY_MORE_ADJ )
1141                         {
1142                         ret_val = EOB_ACT_END_OF_FILE;
1143                         yyrestart( yyin );
1144                         }
1145
1146                 else
1147                         {
1148                         ret_val = EOB_ACT_LAST_MATCH;
1149                         yy_current_buffer->yy_buffer_status =
1150                                 YY_BUFFER_EOF_PENDING;
1151                         }
1152                 }
1153
1154         else
1155                 ret_val = EOB_ACT_CONTINUE_SCAN;
1156
1157         yy_n_chars += number_to_move;
1158         yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1159         yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1160
1161         yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1162
1163         return ret_val;
1164         }
1165
1166
1167 /* yy_get_previous_state - get the state just before the EOB char was reached */
1168
1169 static yy_state_type yy_get_previous_state()
1170         {
1171         register yy_state_type yy_current_state;
1172         register char *yy_cp;
1173
1174         yy_current_state = yy_start;
1175         yy_current_state += YY_AT_BOL();
1176         yy_state_ptr = yy_state_buf;
1177         *yy_state_ptr++ = yy_current_state;
1178
1179         for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1180                 {
1181                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1182                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1183                         {
1184                         yy_current_state = (int) yy_def[yy_current_state];
1185                         if ( yy_current_state >= 166 )
1186                                 yy_c = yy_meta[(unsigned int) yy_c];
1187                         }
1188                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1189                 *yy_state_ptr++ = yy_current_state;
1190                 }
1191
1192         return yy_current_state;
1193         }
1194
1195
1196 /* yy_try_NUL_trans - try to make a transition on the NUL character
1197  *
1198  * synopsis
1199  *      next_state = yy_try_NUL_trans( current_state );
1200  */
1201
1202 #ifdef YY_USE_PROTOS
1203 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1204 #else
1205 static yy_state_type yy_try_NUL_trans( yy_current_state )
1206 yy_state_type yy_current_state;
1207 #endif
1208         {
1209         register int yy_is_jam;
1210
1211         register YY_CHAR yy_c = 1;
1212         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1213                 {
1214                 yy_current_state = (int) yy_def[yy_current_state];
1215                 if ( yy_current_state >= 166 )
1216                         yy_c = yy_meta[(unsigned int) yy_c];
1217                 }
1218         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1219         *yy_state_ptr++ = yy_current_state;
1220         yy_is_jam = (yy_current_state == 165);
1221
1222         return yy_is_jam ? 0 : yy_current_state;
1223         }
1224
1225
1226 #ifndef YY_NO_UNPUT
1227 #ifdef YY_USE_PROTOS
1228 static void yyunput( int c, register char *yy_bp )
1229 #else
1230 static void yyunput( c, yy_bp )
1231 int c;
1232 register char *yy_bp;
1233 #endif
1234         {
1235         register char *yy_cp = yy_c_buf_p;
1236
1237         /* undo effects of setting up yytext */
1238         *yy_cp = yy_hold_char;
1239
1240         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1241                 { /* need to shift things up to make room */
1242                 /* +2 for EOB chars. */
1243                 register int number_to_move = yy_n_chars + 2;
1244                 register char *dest = &yy_current_buffer->yy_ch_buf[
1245                                         yy_current_buffer->yy_buf_size + 2];
1246                 register char *source =
1247                                 &yy_current_buffer->yy_ch_buf[number_to_move];
1248
1249                 while ( source > yy_current_buffer->yy_ch_buf )
1250                         *--dest = *--source;
1251
1252                 yy_cp += (int) (dest - source);
1253                 yy_bp += (int) (dest - source);
1254                 yy_n_chars = yy_current_buffer->yy_buf_size;
1255
1256                 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1257                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1258                 }
1259
1260         *--yy_cp = (char) c;
1261
1262         if ( c == '\n' )
1263                 --yylineno;
1264
1265         yytext_ptr = yy_bp;
1266         yy_hold_char = *yy_cp;
1267         yy_c_buf_p = yy_cp;
1268         }
1269 #endif  /* ifndef YY_NO_UNPUT */
1270
1271
1272 #ifdef __cplusplus
1273 static int yyinput()
1274 #else
1275 static int input()
1276 #endif
1277         {
1278         int c;
1279
1280         *yy_c_buf_p = yy_hold_char;
1281
1282         if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1283                 {
1284                 /* yy_c_buf_p now points to the character we want to return.
1285                  * If this occurs *before* the EOB characters, then it's a
1286                  * valid NUL; if not, then we've hit the end of the buffer.
1287                  */
1288                 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1289                         /* This was really a NUL. */
1290                         *yy_c_buf_p = '\0';
1291
1292                 else
1293                         { /* need more input */
1294                         yytext_ptr = yy_c_buf_p;
1295                         ++yy_c_buf_p;
1296
1297                         switch ( yy_get_next_buffer() )
1298                                 {
1299                                 case EOB_ACT_END_OF_FILE:
1300                                         {
1301                                         if ( yywrap() )
1302                                                 {
1303                                                 yy_c_buf_p =
1304                                                 yytext_ptr + YY_MORE_ADJ;
1305                                                 return EOF;
1306                                                 }
1307
1308                                         if ( ! yy_did_buffer_switch_on_eof )
1309                                                 YY_NEW_FILE;
1310 #ifdef __cplusplus
1311                                         return yyinput();
1312 #else
1313                                         return input();
1314 #endif
1315                                         }
1316
1317                                 case EOB_ACT_CONTINUE_SCAN:
1318                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1319                                         break;
1320
1321                                 case EOB_ACT_LAST_MATCH:
1322 #ifdef __cplusplus
1323                                         YY_FATAL_ERROR(
1324                                         "unexpected last match in yyinput()" );
1325 #else
1326                                         YY_FATAL_ERROR(
1327                                         "unexpected last match in input()" );
1328 #endif
1329                                 }
1330                         }
1331                 }
1332
1333         c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1334         *yy_c_buf_p = '\0';     /* preserve yytext */
1335         yy_hold_char = *++yy_c_buf_p;
1336
1337         yy_current_buffer->yy_at_bol = (c == '\n');
1338         if ( yy_current_buffer->yy_at_bol )
1339                 ++yylineno;
1340
1341         return c;
1342         }
1343
1344
1345 #ifdef YY_USE_PROTOS
1346 void yyrestart( FILE *input_file )
1347 #else
1348 void yyrestart( input_file )
1349 FILE *input_file;
1350 #endif
1351         {
1352         if ( ! yy_current_buffer )
1353                 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1354
1355         yy_init_buffer( yy_current_buffer, input_file );
1356         yy_load_buffer_state();
1357         }
1358
1359
1360 #ifdef YY_USE_PROTOS
1361 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1362 #else
1363 void yy_switch_to_buffer( new_buffer )
1364 YY_BUFFER_STATE new_buffer;
1365 #endif
1366         {
1367         if ( yy_current_buffer == new_buffer )
1368                 return;
1369
1370         if ( yy_current_buffer )
1371                 {
1372                 /* Flush out information for old buffer. */
1373                 *yy_c_buf_p = yy_hold_char;
1374                 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1375                 yy_current_buffer->yy_n_chars = yy_n_chars;
1376                 }
1377
1378         yy_current_buffer = new_buffer;
1379         yy_load_buffer_state();
1380
1381         /* We don't actually know whether we did this switch during
1382          * EOF (yywrap()) processing, but the only time this flag
1383          * is looked at is after yywrap() is called, so it's safe
1384          * to go ahead and always set it.
1385          */
1386         yy_did_buffer_switch_on_eof = 1;
1387         }
1388
1389
1390 #ifdef YY_USE_PROTOS
1391 void yy_load_buffer_state( void )
1392 #else
1393 void yy_load_buffer_state()
1394 #endif
1395         {
1396         yy_n_chars = yy_current_buffer->yy_n_chars;
1397         yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1398         yyin = yy_current_buffer->yy_input_file;
1399         yy_hold_char = *yy_c_buf_p;
1400         }
1401
1402
1403 #ifdef YY_USE_PROTOS
1404 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1405 #else
1406 YY_BUFFER_STATE yy_create_buffer( file, size )
1407 FILE *file;
1408 int size;
1409 #endif
1410         {
1411         YY_BUFFER_STATE b;
1412
1413         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1414         if ( ! b )
1415                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1416
1417         b->yy_buf_size = size;
1418
1419         /* yy_ch_buf has to be 2 characters longer than the size given because
1420          * we need to put in 2 end-of-buffer characters.
1421          */
1422         b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1423         if ( ! b->yy_ch_buf )
1424                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1425
1426         b->yy_is_our_buffer = 1;
1427
1428         yy_init_buffer( b, file );
1429
1430         return b;
1431         }
1432
1433
1434 #ifdef YY_USE_PROTOS
1435 void yy_delete_buffer( YY_BUFFER_STATE b )
1436 #else
1437 void yy_delete_buffer( b )
1438 YY_BUFFER_STATE b;
1439 #endif
1440         {
1441         if ( ! b )
1442                 return;
1443
1444         if ( b == yy_current_buffer )
1445                 yy_current_buffer = (YY_BUFFER_STATE) 0;
1446
1447         if ( b->yy_is_our_buffer )
1448                 yy_flex_free( (void *) b->yy_ch_buf );
1449
1450         yy_flex_free( (void *) b );
1451         }
1452
1453
1454 #ifndef YY_ALWAYS_INTERACTIVE
1455 #ifndef YY_NEVER_INTERACTIVE
1456 extern int isatty YY_PROTO(( int ));
1457 #endif
1458 #endif
1459
1460 #ifdef YY_USE_PROTOS
1461 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1462 #else
1463 void yy_init_buffer( b, file )
1464 YY_BUFFER_STATE b;
1465 FILE *file;
1466 #endif
1467
1468
1469         {
1470         yy_flush_buffer( b );
1471
1472         b->yy_input_file = file;
1473         b->yy_fill_buffer = 1;
1474
1475 #if YY_ALWAYS_INTERACTIVE
1476         b->yy_is_interactive = 1;
1477 #else
1478 #if YY_NEVER_INTERACTIVE
1479         b->yy_is_interactive = 0;
1480 #else
1481         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1482 #endif
1483 #endif
1484         }
1485
1486
1487 #ifdef YY_USE_PROTOS
1488 void yy_flush_buffer( YY_BUFFER_STATE b )
1489 #else
1490 void yy_flush_buffer( b )
1491 YY_BUFFER_STATE b;
1492 #endif
1493
1494         {
1495         b->yy_n_chars = 0;
1496
1497         /* We always need two end-of-buffer characters.  The first causes
1498          * a transition to the end-of-buffer state.  The second causes
1499          * a jam in that state.
1500          */
1501         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1502         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1503
1504         b->yy_buf_pos = &b->yy_ch_buf[0];
1505
1506         b->yy_at_bol = 1;
1507         b->yy_buffer_status = YY_BUFFER_NEW;
1508
1509         if ( b == yy_current_buffer )
1510                 yy_load_buffer_state();
1511         }
1512
1513
1514 #ifndef YY_NO_SCAN_BUFFER
1515 #ifdef YY_USE_PROTOS
1516 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1517 #else
1518 YY_BUFFER_STATE yy_scan_buffer( base, size )
1519 char *base;
1520 yy_size_t size;
1521 #endif
1522         {
1523         YY_BUFFER_STATE b;
1524
1525         if ( size < 2 ||
1526              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1527              base[size-1] != YY_END_OF_BUFFER_CHAR )
1528                 /* They forgot to leave room for the EOB's. */
1529                 return 0;
1530
1531         b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1532         if ( ! b )
1533                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1534
1535         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1536         b->yy_buf_pos = b->yy_ch_buf = base;
1537         b->yy_is_our_buffer = 0;
1538         b->yy_input_file = 0;
1539         b->yy_n_chars = b->yy_buf_size;
1540         b->yy_is_interactive = 0;
1541         b->yy_at_bol = 1;
1542         b->yy_fill_buffer = 0;
1543         b->yy_buffer_status = YY_BUFFER_NEW;
1544
1545         yy_switch_to_buffer( b );
1546
1547         return b;
1548         }
1549 #endif
1550
1551
1552 #ifndef YY_NO_SCAN_STRING
1553 #ifdef YY_USE_PROTOS
1554 YY_BUFFER_STATE yy_scan_string( yyconst char *str )
1555 #else
1556 YY_BUFFER_STATE yy_scan_string( str )
1557 yyconst char *str;
1558 #endif
1559         {
1560         int len;
1561         for ( len = 0; str[len]; ++len )
1562                 ;
1563
1564         return yy_scan_bytes( str, len );
1565         }
1566 #endif
1567
1568
1569 #ifndef YY_NO_SCAN_BYTES
1570 #ifdef YY_USE_PROTOS
1571 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1572 #else
1573 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1574 yyconst char *bytes;
1575 int len;
1576 #endif
1577         {
1578         YY_BUFFER_STATE b;
1579         char *buf;
1580         yy_size_t n;
1581         int i;
1582
1583         /* Get memory for full buffer, including space for trailing EOB's. */
1584         n = len + 2;
1585         buf = (char *) yy_flex_alloc( n );
1586         if ( ! buf )
1587                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1588
1589         for ( i = 0; i < len; ++i )
1590                 buf[i] = bytes[i];
1591
1592         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1593
1594         b = yy_scan_buffer( buf, n );
1595         if ( ! b )
1596                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1597
1598         /* It's okay to grow etc. this buffer, and we should throw it
1599          * away when we're done.
1600          */
1601         b->yy_is_our_buffer = 1;
1602
1603         return b;
1604         }
1605 #endif
1606
1607
1608 #ifndef YY_NO_PUSH_STATE
1609 #ifdef YY_USE_PROTOS
1610 static void yy_push_state( int new_state )
1611 #else
1612 static void yy_push_state( new_state )
1613 int new_state;
1614 #endif
1615         {
1616         if ( yy_start_stack_ptr >= yy_start_stack_depth )
1617                 {
1618                 yy_size_t new_size;
1619
1620                 yy_start_stack_depth += YY_START_STACK_INCR;
1621                 new_size = yy_start_stack_depth * sizeof( int );
1622
1623                 if ( ! yy_start_stack )
1624                         yy_start_stack = (int *) yy_flex_alloc( new_size );
1625
1626                 else
1627                         yy_start_stack = (int *) yy_flex_realloc(
1628                                         (void *) yy_start_stack, new_size );
1629
1630                 if ( ! yy_start_stack )
1631                         YY_FATAL_ERROR(
1632                         "out of memory expanding start-condition stack" );
1633                 }
1634
1635         yy_start_stack[yy_start_stack_ptr++] = YY_START;
1636
1637         BEGIN(new_state);
1638         }
1639 #endif
1640
1641
1642 #ifndef YY_NO_POP_STATE
1643 static void yy_pop_state()
1644         {
1645         if ( --yy_start_stack_ptr < 0 )
1646                 YY_FATAL_ERROR( "start-condition stack underflow" );
1647
1648         BEGIN(yy_start_stack[yy_start_stack_ptr]);
1649         }
1650 #endif
1651
1652
1653 #ifndef YY_NO_TOP_STATE
1654 static int yy_top_state()
1655         {
1656         return yy_start_stack[yy_start_stack_ptr - 1];
1657         }
1658 #endif
1659
1660 #ifndef YY_EXIT_FAILURE
1661 #define YY_EXIT_FAILURE 2
1662 #endif
1663
1664 #ifdef YY_USE_PROTOS
1665 static void yy_fatal_error( yyconst char msg[] )
1666 #else
1667 static void yy_fatal_error( msg )
1668 char msg[];
1669 #endif
1670         {
1671         (void) fprintf( stderr, "%s\n", msg );
1672         exit( YY_EXIT_FAILURE );
1673         }
1674
1675
1676
1677 /* Redefine yyless() so it works in section 3 code. */
1678
1679 #undef yyless
1680 #define yyless(n) \
1681         do \
1682                 { \
1683                 /* Undo effects of setting up yytext. */ \
1684                 yytext[yyleng] = yy_hold_char; \
1685                 yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
1686                 yy_hold_char = *yy_c_buf_p; \
1687                 *yy_c_buf_p = '\0'; \
1688                 yyleng = n; \
1689                 } \
1690         while ( 0 )
1691
1692
1693 /* Internal utility routines. */
1694
1695 #ifndef yytext_ptr
1696 #ifdef YY_USE_PROTOS
1697 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1698 #else
1699 static void yy_flex_strncpy( s1, s2, n )
1700 char *s1;
1701 yyconst char *s2;
1702 int n;
1703 #endif
1704         {
1705         register int i;
1706         for ( i = 0; i < n; ++i )
1707                 s1[i] = s2[i];
1708         }
1709 #endif
1710
1711
1712 #ifdef YY_USE_PROTOS
1713 static void *yy_flex_alloc( yy_size_t size )
1714 #else
1715 static void *yy_flex_alloc( size )
1716 yy_size_t size;
1717 #endif
1718         {
1719         return (void *) malloc( size );
1720         }
1721
1722 #ifdef YY_USE_PROTOS
1723 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1724 #else
1725 static void *yy_flex_realloc( ptr, size )
1726 void *ptr;
1727 yy_size_t size;
1728 #endif
1729         {
1730         /* The cast to (char *) in the following accommodates both
1731          * implementations that use char* generic pointers, and those
1732          * that use void* generic pointers.  It works with the latter
1733          * because both ANSI C and C++ allow castless assignment from
1734          * any pointer type to void*, and deal with argument conversions
1735          * as though doing an assignment.
1736          */
1737         return (void *) realloc( (char *) ptr, size );
1738         }
1739
1740 #ifdef YY_USE_PROTOS
1741 static void yy_flex_free( void *ptr )
1742 #else
1743 static void yy_flex_free( ptr )
1744 void *ptr;
1745 #endif
1746         {
1747         free( ptr );
1748         }
1749
1750 #if YY_MAIN
1751 int main()
1752         {
1753         yylex();
1754         return 0;
1755         }
1756 #endif
1757 #line 75 "/windows/build/xemacs/xemacs/netinstall/inilex.l"
1758
1759
1760 static char *input_string = 0;
1761 static char *end_input_string;
1762
1763 void
1764 ini_init(char *string)
1765 {
1766   input_string = string;
1767   end_input_string = input_string + strlen(input_string);
1768 }
1769
1770 static int
1771 ini_getchar(char *buf, int max_size)
1772 {
1773   if (input_string)
1774     {
1775       int avail = end_input_string - input_string;
1776       if (avail == 0)
1777         {
1778           input_string = end_input_string = 0;
1779           return 0;
1780         }
1781       if (avail > max_size)
1782         avail = max_size;
1783       memcpy(buf, input_string, avail);
1784       input_string += avail;
1785       return avail;
1786     }
1787   else
1788     return 0;
1789 }
1790
1791 static void
1792 ignore_line ()
1793 {
1794   char c;
1795   while (c = input ())
1796     {
1797       if (c == EOF)
1798         return;
1799       if (c == '\n')
1800         return;
1801     }
1802 }