pcsc-lite  1.8.20
configfile.c
1 
2 #line 3 "configfile.c"
3 
4 #define YY_INT_ALIGNED short int
5 
6 /* A lexical scanner generated by flex */
7 
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 6
11 #define YY_FLEX_SUBMINOR_VERSION 0
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15 
16 /* First, we deal with platform-specific or compiler-specific issues. */
17 
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23 
24 /* end standard C headers. */
25 
26 /* flex integer type definitions */
27 
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30 
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32 
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34 
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36  * if you want the limit (max/min) macros for int types.
37  */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41 
42 #include <inttypes.h>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56 
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX (4294967295U)
84 #endif
85 
86 #endif /* ! C99 */
87 
88 #endif /* ! FLEXINT_H */
89 
90 #ifdef __cplusplus
91 
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
94 
95 #else /* ! __cplusplus */
96 
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
99 
100 #define YY_USE_CONST
101 
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
104 
105 #ifdef YY_USE_CONST
106 #define yyconst const
107 #else
108 #define yyconst
109 #endif
110 
111 /* Returned upon end-of-file. */
112 #define YY_NULL 0
113 
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115  * integer for use as an array index. If the signed char is negative,
116  * we want to instead treat it as an 8-bit unsigned char, hence the
117  * double cast.
118  */
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120 
121 /* Enter a start condition. This macro really ought to take a parameter,
122  * but we do it the disgusting crufty way forced on us by the ()-less
123  * definition of BEGIN.
124  */
125 #define BEGIN (yy_start) = 1 + 2 *
126 
127 /* Translate the current start state into a value that can be later handed
128  * to BEGIN to return to the state. The YYSTATE alias is for lex
129  * compatibility.
130  */
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
133 
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136 
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin )
139 
140 #define YY_END_OF_BUFFER_CHAR 0
141 
142 /* Size of default input buffer. */
143 #ifndef YY_BUF_SIZE
144 #ifdef __ia64__
145 /* On IA-64, the buffer size is 16k, not 8k.
146  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
147  * Ditto for the __ia64__ case accordingly.
148  */
149 #define YY_BUF_SIZE 32768
150 #else
151 #define YY_BUF_SIZE 16384
152 #endif /* __ia64__ */
153 #endif
154 
155 /* The state buf must be large enough to hold one state per character in the main buffer.
156  */
157 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
158 
159 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
160 #define YY_TYPEDEF_YY_BUFFER_STATE
161 typedef struct yy_buffer_state *YY_BUFFER_STATE;
162 #endif
163 
164 #ifndef YY_TYPEDEF_YY_SIZE_T
165 #define YY_TYPEDEF_YY_SIZE_T
166 typedef size_t yy_size_t;
167 #endif
168 
169 extern yy_size_t yyleng;
170 
171 extern FILE *yyin, *yyout;
172 
173 #define EOB_ACT_CONTINUE_SCAN 0
174 #define EOB_ACT_END_OF_FILE 1
175 #define EOB_ACT_LAST_MATCH 2
176 
177  #define YY_LESS_LINENO(n)
178  #define YY_LINENO_REWIND_TO(ptr)
179 
180 /* Return all but the first "n" matched characters back to the input stream. */
181 #define yyless(n) \
182  do \
183  { \
184  /* Undo effects of setting up yytext. */ \
185  int yyless_macro_arg = (n); \
186  YY_LESS_LINENO(yyless_macro_arg);\
187  *yy_cp = (yy_hold_char); \
188  YY_RESTORE_YY_MORE_OFFSET \
189  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
190  YY_DO_BEFORE_ACTION; /* set up yytext again */ \
191  } \
192  while ( 0 )
193 
194 #define unput(c) yyunput( c, (yytext_ptr) )
195 
196 #ifndef YY_STRUCT_YY_BUFFER_STATE
197 #define YY_STRUCT_YY_BUFFER_STATE
199  {
200  FILE *yy_input_file;
201 
202  char *yy_ch_buf; /* input buffer */
203  char *yy_buf_pos; /* current position in input buffer */
204 
205  /* Size of input buffer in bytes, not including room for EOB
206  * characters.
207  */
208  yy_size_t yy_buf_size;
209 
210  /* Number of characters read into yy_ch_buf, not including EOB
211  * characters.
212  */
213  int yy_n_chars;
214 
215  /* Whether we "own" the buffer - i.e., we know we created it,
216  * and can realloc() it to grow it, and should free() it to
217  * delete it.
218  */
219  int yy_is_our_buffer;
220 
221  /* Whether this is an "interactive" input source; if so, and
222  * if we're using stdio for input, then we want to use getc()
223  * instead of fread(), to make sure we stop fetching input after
224  * each newline.
225  */
226  int yy_is_interactive;
227 
228  /* Whether we're considered to be at the beginning of a line.
229  * If so, '^' rules will be active on the next match, otherwise
230  * not.
231  */
232  int yy_at_bol;
233 
237  /* Whether to try to fill the input buffer when we reach the
238  * end of it.
239  */
240  int yy_fill_buffer;
241 
242  int yy_buffer_status;
243 
244 #define YY_BUFFER_NEW 0
245 #define YY_BUFFER_NORMAL 1
246  /* When an EOF's been seen but there's still some text to process
247  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
248  * shouldn't try reading from the input source any more. We might
249  * still have a bunch of tokens to match, though, because of
250  * possible backing-up.
251  *
252  * When we actually see the EOF, we change the status to "new"
253  * (via yyrestart()), so that the user can continue scanning by
254  * just pointing yyin at a new input file.
255  */
256 #define YY_BUFFER_EOF_PENDING 2
257 
258  };
259 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
260 
261 /* Stack of input buffers. */
262 static size_t yy_buffer_stack_top = 0;
263 static size_t yy_buffer_stack_max = 0;
264 static YY_BUFFER_STATE * yy_buffer_stack = 0;
266 /* We provide macros for accessing buffer states in case in the
267  * future we want to put the buffer states in a more general
268  * "scanner state".
269  *
270  * Returns the top of the stack, or NULL.
271  */
272 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
273  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
274  : NULL)
275 
276 /* Same as previous macro, but useful when we know that the buffer stack is not
277  * NULL or when we need an lvalue. For internal use only.
278  */
279 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
280 
281 /* yy_hold_char holds the character lost when yytext is formed. */
282 static char yy_hold_char;
283 static int yy_n_chars; /* number of characters read into yy_ch_buf */
284 yy_size_t yyleng;
285 
286 /* Points to current character in buffer. */
287 static char *yy_c_buf_p = (char *) 0;
288 static int yy_init = 0; /* whether we need to initialize */
289 static int yy_start = 0; /* start state number */
290 
291 /* Flag which is used to allow yywrap()'s to do buffer switches
292  * instead of setting up a fresh yyin. A bit of a hack ...
293  */
294 static int yy_did_buffer_switch_on_eof;
295 
296 void yyrestart (FILE *input_file );
297 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
298 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
299 void yy_delete_buffer (YY_BUFFER_STATE b );
300 void yy_flush_buffer (YY_BUFFER_STATE b );
301 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
302 void yypop_buffer_state (void );
303 
304 static void yyensure_buffer_stack (void );
305 static void yy_load_buffer_state (void );
306 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
307 
308 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
309 
310 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
311 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
312 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
313 
314 void *yyalloc (yy_size_t );
315 void *yyrealloc (void *,yy_size_t );
316 void yyfree (void * );
317 
318 #define yy_new_buffer yy_create_buffer
319 
320 #define yy_set_interactive(is_interactive) \
321  { \
322  if ( ! YY_CURRENT_BUFFER ){ \
323  yyensure_buffer_stack (); \
324  YY_CURRENT_BUFFER_LVALUE = \
325  yy_create_buffer(yyin,YY_BUF_SIZE ); \
326  } \
327  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
328  }
329 
330 #define yy_set_bol(at_bol) \
331  { \
332  if ( ! YY_CURRENT_BUFFER ){\
333  yyensure_buffer_stack (); \
334  YY_CURRENT_BUFFER_LVALUE = \
335  yy_create_buffer(yyin,YY_BUF_SIZE ); \
336  } \
337  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
338  }
339 
340 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
341 
342 /* Begin user sect3 */
343 
344 #define yywrap() (/*CONSTCOND*/1)
345 #define YY_SKIP_YYWRAP
346 
347 typedef unsigned char YY_CHAR;
348 
349 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
350 
351 typedef int yy_state_type;
352 
353 extern int yylineno;
354 
355 int yylineno = 1;
356 
357 extern char *yytext;
358 #ifdef yytext_ptr
359 #undef yytext_ptr
360 #endif
361 #define yytext_ptr yytext
362 
363 static yy_state_type yy_get_previous_state (void );
364 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
365 static int yy_get_next_buffer (void );
366 #if defined(__GNUC__) && __GNUC__ >= 3
367 __attribute__((__noreturn__))
368 #endif
369 static void yy_fatal_error (yyconst char msg[] );
370 
371 /* Done after the current pattern has been matched and before the
372  * corresponding action - sets up yytext.
373  */
374 #define YY_DO_BEFORE_ACTION \
375  (yytext_ptr) = yy_bp; \
376  yyleng = (size_t) (yy_cp - yy_bp); \
377  (yy_hold_char) = *yy_cp; \
378  *yy_cp = '\0'; \
379  (yy_c_buf_p) = yy_cp;
380 
381 #define YY_NUM_RULES 7
382 #define YY_END_OF_BUFFER 8
383 /* This struct is not used in this scanner,
384  but its presence is necessary. */
386  {
387  flex_int32_t yy_verify;
388  flex_int32_t yy_nxt;
389  };
390 static yyconst flex_int16_t yy_accept[17] =
391  { 0,
392  0, 0, 8, 6, 4, 2, 6, 1, 6, 5,
393  0, 3, 1, 0, 5, 0
394  } ;
395 
396 static yyconst YY_CHAR yy_ec[256] =
397  { 0,
398  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
399  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401  1, 2, 1, 4, 5, 1, 1, 1, 6, 1,
402  1, 1, 1, 1, 7, 7, 7, 8, 8, 8,
403  8, 8, 8, 8, 8, 8, 8, 7, 1, 1,
404  1, 1, 1, 7, 9, 9, 9, 9, 9, 9,
405  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
406  9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
407  1, 7, 1, 1, 7, 1, 10, 10, 10, 10,
408 
409  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
410  10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
411  10, 10, 1, 1, 1, 1, 1, 1, 1, 1,
412  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 
420  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425  1, 1, 1, 1, 1
426  } ;
427 
428 static yyconst YY_CHAR yy_meta[11] =
429  { 0,
430  1, 1, 2, 1, 1, 1, 1, 1, 1, 1
431  } ;
432 
433 static yyconst flex_uint16_t yy_base[20] =
434  { 0,
435  0, 0, 15, 31, 31, 31, 8, 0, 10, 10,
436  18, 31, 0, 20, 0, 31, 26, 13, 28
437  } ;
438 
439 static yyconst flex_int16_t yy_def[20] =
440  { 0,
441  16, 1, 16, 16, 16, 16, 17, 18, 19, 16,
442  17, 16, 18, 19, 10, 0, 16, 16, 16
443  } ;
444 
445 static yyconst flex_uint16_t yy_nxt[42] =
446  { 0,
447  4, 5, 6, 7, 8, 9, 10, 10, 10, 10,
448  12, 12, 12, 13, 16, 12, 15, 15, 15, 15,
449  12, 12, 12, 16, 16, 12, 11, 11, 14, 14,
450  3, 16, 16, 16, 16, 16, 16, 16, 16, 16,
451  16
452  } ;
453 
454 static yyconst flex_int16_t yy_chk[42] =
455  { 0,
456  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457  7, 7, 9, 18, 3, 9, 10, 10, 10, 10,
458  11, 11, 14, 0, 0, 14, 17, 17, 19, 19,
459  16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
460  16
461  } ;
462 
463 static yy_state_type yy_last_accepting_state;
464 static char *yy_last_accepting_cpos;
465 
466 extern int yy_flex_debug;
467 int yy_flex_debug = 0;
468 
469 /* The intent behind this definition is that it'll catch
470  * any uses of REJECT which flex missed.
471  */
472 #define REJECT reject_used_but_not_detected
473 #define yymore() yymore_used_but_not_detected
474 #define YY_MORE_ADJ 0
475 #define YY_RESTORE_YY_MORE_OFFSET
476 char *yytext;
477 #line 1 "configfile.l"
478 /*
479  * Reads lexical config files and updates database.
480  *
481  * MUSCLE SmartCard Development ( http://pcsclite.alioth.debian.org/pcsclite.html )
482  *
483  * Copyright (C) 1999-2002
484  * David Corcoran <corcoran@musclecard.com>
485  * Copyright (C) 2004
486  * Damien Sauveron <damien.sauveron@labri.fr>
487  * Copyright (C) 2004-2010
488  * Ludovic Rousseau <ludovic.rousseau@free.fr>
489  *
490 Redistribution and use in source and binary forms, with or without
491 modification, are permitted provided that the following conditions
492 are met:
493 
494 1. Redistributions of source code must retain the above copyright
495  notice, this list of conditions and the following disclaimer.
496 2. Redistributions in binary form must reproduce the above copyright
497  notice, this list of conditions and the following disclaimer in the
498  documentation and/or other materials provided with the distribution.
499 3. The name of the author may not be used to endorse or promote products
500  derived from this software without specific prior written permission.
501 
502 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
503 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
504 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
505 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
506 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
507 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
508 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
509 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
510 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
511 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
512  */
513 #line 38 "configfile.l"
514 #include <dirent.h>
515 #include <sys/stat.h>
516 
517 #include "wintypes.h"
518 #include "pcscd.h"
519 #include "readerfactory.h"
520 #include "configfile.h"
521 
522 int evaluatetoken(char *pcToken);
523 
524 static int iLinenumber;
525 static int iOldLinenumber;
526 static char *pcPrevious;
527 static char *pcCurrent;
528 static char *pcFriendlyname;
529 static char *pcDevicename;
530 static char *pcLibpath;
531 static char *pcChannelid;
532 static int badError;
533 static SerialReader *reader_list;
534 static int reader_list_size;
535 const char *ConfFile;
536 
537 void tok_error(char *pcToken_error);
538 
539 #define YY_NO_INPUT 1
540 #line 541 "configfile.c"
541 
542 #define INITIAL 0
543 
544 #ifndef YY_NO_UNISTD_H
545 /* Special case for "unistd.h", since it is non-ANSI. We include it way
546  * down here because we want the user's section 1 to have been scanned first.
547  * The user has a chance to override it with an option.
548  */
549 #include <unistd.h>
550 #endif
551 
552 #ifndef YY_EXTRA_TYPE
553 #define YY_EXTRA_TYPE void *
554 #endif
555 
556 static int yy_init_globals (void );
557 
558 /* Accessor methods to globals.
559  These are made visible to non-reentrant scanners for convenience. */
560 
561 int yylex_destroy (void );
562 
563 int yyget_debug (void );
564 
565 void yyset_debug (int debug_flag );
566 
567 YY_EXTRA_TYPE yyget_extra (void );
568 
569 void yyset_extra (YY_EXTRA_TYPE user_defined );
570 
571 FILE *yyget_in (void );
572 
573 void yyset_in (FILE * _in_str );
574 
575 FILE *yyget_out (void );
576 
577 void yyset_out (FILE * _out_str );
578 
579 yy_size_t yyget_leng (void );
580 
581 char *yyget_text (void );
582 
583 int yyget_lineno (void );
584 
585 void yyset_lineno (int _line_number );
586 
587 /* Macros after this point can all be overridden by user definitions in
588  * section 1.
589  */
590 
591 #ifndef YY_SKIP_YYWRAP
592 #ifdef __cplusplus
593 extern "C" int yywrap (void );
594 #else
595 extern int yywrap (void );
596 #endif
597 #endif
598 
599 #ifndef YY_NO_UNPUT
600 
601 #endif
602 
603 #ifndef yytext_ptr
604 static void yy_flex_strncpy (char *,yyconst char *,int );
605 #endif
606 
607 #ifdef YY_NEED_STRLEN
608 static int yy_flex_strlen (yyconst char * );
609 #endif
610 
611 #ifndef YY_NO_INPUT
612 
613 #ifdef __cplusplus
614 static int yyinput (void );
615 #else
616 static int input (void );
617 #endif
618 
619 #endif
620 
621 /* Amount of stuff to slurp up with each read. */
622 #ifndef YY_READ_BUF_SIZE
623 #ifdef __ia64__
624 /* On IA-64, the buffer size is 16k, not 8k */
625 #define YY_READ_BUF_SIZE 16384
626 #else
627 #define YY_READ_BUF_SIZE 8192
628 #endif /* __ia64__ */
629 #endif
630 
631 /* Copy whatever the last rule matched to the standard output. */
632 #ifndef ECHO
633 /* This used to be an fputs(), but since the string might contain NUL's,
634  * we now use fwrite().
635  */
636 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
637 #endif
638 
639 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
640  * is returned in "result".
641  */
642 #ifndef YY_INPUT
643 #define YY_INPUT(buf,result,max_size) \
644  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
645  { \
646  int c = '*'; \
647  size_t n; \
648  for ( n = 0; n < max_size && \
649  (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
650  buf[n] = (char) c; \
651  if ( c == '\n' ) \
652  buf[n++] = (char) c; \
653  if ( c == EOF && ferror( yyin ) ) \
654  YY_FATAL_ERROR( "input in flex scanner failed" ); \
655  result = n; \
656  } \
657  else \
658  { \
659  errno=0; \
660  while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
661  { \
662  if( errno != EINTR) \
663  { \
664  YY_FATAL_ERROR( "input in flex scanner failed" ); \
665  break; \
666  } \
667  errno=0; \
668  clearerr(yyin); \
669  } \
670  }\
671 \
672 
673 #endif
674 
675 /* No semi-colon after return; correct usage is to write "yyterminate();" -
676  * we don't want an extra ';' after the "return" because that will cause
677  * some compilers to complain about unreachable statements.
678  */
679 #ifndef yyterminate
680 #define yyterminate() return YY_NULL
681 #endif
682 
683 /* Number of entries by which start-condition stack grows. */
684 #ifndef YY_START_STACK_INCR
685 #define YY_START_STACK_INCR 25
686 #endif
687 
688 /* Report a fatal error. */
689 #ifndef YY_FATAL_ERROR
690 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
691 #endif
692 
693 /* end tables serialization structures and prototypes */
694 
695 /* Default declaration of generated scanner - a define so the user can
696  * easily add parameters.
697  */
698 #ifndef YY_DECL
699 #define YY_DECL_IS_OURS 1
700 
701 extern int yylex (void);
702 
703 #define YY_DECL int yylex (void)
704 #endif /* !YY_DECL */
705 
706 /* Code executed at the beginning of each rule, after yytext and yyleng
707  * have been set up.
708  */
709 #ifndef YY_USER_ACTION
710 #define YY_USER_ACTION
711 #endif
712 
713 /* Code executed at the end of each rule. */
714 #ifndef YY_BREAK
715 #define YY_BREAK /*LINTED*/break;
716 #endif
717 
718 #define YY_RULE_SETUP \
719  YY_USER_ACTION
720 
723 YY_DECL
724 {
725  yy_state_type yy_current_state;
726  char *yy_cp, *yy_bp;
727  int yy_act;
728 
729  if ( !(yy_init) )
730  {
731  (yy_init) = 1;
732 
733 #ifdef YY_USER_INIT
734  YY_USER_INIT;
735 #endif
736 
737  if ( ! (yy_start) )
738  (yy_start) = 1; /* first start state */
739 
740  if ( ! yyin )
741  yyin = stdin;
742 
743  if ( ! yyout )
744  yyout = stdout;
745 
746  if ( ! YY_CURRENT_BUFFER ) {
747  yyensure_buffer_stack ();
748  YY_CURRENT_BUFFER_LVALUE =
749  yy_create_buffer(yyin,YY_BUF_SIZE );
750  }
751 
752  yy_load_buffer_state( );
753  }
754 
755  {
756 #line 69 "configfile.l"
757 
758 
759 #line 760 "configfile.c"
760 
761  while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
762  {
763  yy_cp = (yy_c_buf_p);
764 
765  /* Support of yytext. */
766  *yy_cp = (yy_hold_char);
767 
768  /* yy_bp points to the position in yy_ch_buf of the start of
769  * the current run.
770  */
771  yy_bp = yy_cp;
772 
773  yy_current_state = (yy_start);
774 yy_match:
775  do
776  {
777  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
778  if ( yy_accept[yy_current_state] )
779  {
780  (yy_last_accepting_state) = yy_current_state;
781  (yy_last_accepting_cpos) = yy_cp;
782  }
783  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
784  {
785  yy_current_state = (int) yy_def[yy_current_state];
786  if ( yy_current_state >= 17 )
787  yy_c = yy_meta[(unsigned int) yy_c];
788  }
789  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
790  ++yy_cp;
791  }
792  while ( yy_base[yy_current_state] != 31 );
793 
794 yy_find_action:
795  yy_act = yy_accept[yy_current_state];
796  if ( yy_act == 0 )
797  { /* have to back up */
798  yy_cp = (yy_last_accepting_cpos);
799  yy_current_state = (yy_last_accepting_state);
800  yy_act = yy_accept[yy_current_state];
801  }
802 
803  YY_DO_BEFORE_ACTION;
804 
805 do_action: /* This label is used only to access EOF actions. */
806 
807  switch ( yy_act )
808  { /* beginning of action switch */
809  case 0: /* must back up */
810  /* undo the effects of YY_DO_BEFORE_ACTION */
811  *yy_cp = (yy_hold_char);
812  yy_cp = (yy_last_accepting_cpos);
813  yy_current_state = (yy_last_accepting_state);
814  goto yy_find_action;
815 
816 case 1:
817 YY_RULE_SETUP
818 #line 71 "configfile.l"
819 {}
820  YY_BREAK
821 case 2:
822 /* rule 2 can match eol */
823 YY_RULE_SETUP
824 #line 72 "configfile.l"
825 { iLinenumber++; }
826  YY_BREAK
827 case 3:
828 /* rule 3 can match eol */
829 YY_RULE_SETUP
830 #line 73 "configfile.l"
831 { (void)evaluatetoken(yytext); }
832  YY_BREAK
833 case 4:
834 YY_RULE_SETUP
835 #line 74 "configfile.l"
836 {}
837  YY_BREAK
838 case 5:
839 YY_RULE_SETUP
840 #line 75 "configfile.l"
841 { (void)evaluatetoken(yytext); }
842  YY_BREAK
843 case 6:
844 YY_RULE_SETUP
845 #line 76 "configfile.l"
846 { iOldLinenumber = iLinenumber; tok_error(yytext); }
847  YY_BREAK
848 case 7:
849 YY_RULE_SETUP
850 #line 77 "configfile.l"
851 ECHO;
852  YY_BREAK
853 #line 854 "configfile.c"
854 case YY_STATE_EOF(INITIAL):
855  yyterminate();
856 
857  case YY_END_OF_BUFFER:
858  {
859  /* Amount of text matched not including the EOB char. */
860  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
861 
862  /* Undo the effects of YY_DO_BEFORE_ACTION. */
863  *yy_cp = (yy_hold_char);
864  YY_RESTORE_YY_MORE_OFFSET
865 
866  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
867  {
868  /* We're scanning a new file or input source. It's
869  * possible that this happened because the user
870  * just pointed yyin at a new source and called
871  * yylex(). If so, then we have to assure
872  * consistency between YY_CURRENT_BUFFER and our
873  * globals. Here is the right place to do so, because
874  * this is the first action (other than possibly a
875  * back-up) that will match for the new input source.
876  */
877  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
878  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
879  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
880  }
881 
882  /* Note that here we test for yy_c_buf_p "<=" to the position
883  * of the first EOB in the buffer, since yy_c_buf_p will
884  * already have been incremented past the NUL character
885  * (since all states make transitions on EOB to the
886  * end-of-buffer state). Contrast this with the test
887  * in input().
888  */
889  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
890  { /* This was really a NUL. */
891  yy_state_type yy_next_state;
892 
893  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
894 
895  yy_current_state = yy_get_previous_state( );
896 
897  /* Okay, we're now positioned to make the NUL
898  * transition. We couldn't have
899  * yy_get_previous_state() go ahead and do it
900  * for us because it doesn't know how to deal
901  * with the possibility of jamming (and we don't
902  * want to build jamming into it because then it
903  * will run more slowly).
904  */
905 
906  yy_next_state = yy_try_NUL_trans( yy_current_state );
907 
908  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
909 
910  if ( yy_next_state )
911  {
912  /* Consume the NUL. */
913  yy_cp = ++(yy_c_buf_p);
914  yy_current_state = yy_next_state;
915  goto yy_match;
916  }
917 
918  else
919  {
920  yy_cp = (yy_c_buf_p);
921  goto yy_find_action;
922  }
923  }
924 
925  else switch ( yy_get_next_buffer( ) )
926  {
927  case EOB_ACT_END_OF_FILE:
928  {
929  (yy_did_buffer_switch_on_eof) = 0;
930 
931  if ( yywrap( ) )
932  {
933  /* Note: because we've taken care in
934  * yy_get_next_buffer() to have set up
935  * yytext, we can now set up
936  * yy_c_buf_p so that if some total
937  * hoser (like flex itself) wants to
938  * call the scanner after we return the
939  * YY_NULL, it'll still work - another
940  * YY_NULL will get returned.
941  */
942  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
943 
944  yy_act = YY_STATE_EOF(YY_START);
945  goto do_action;
946  }
947 
948  else
949  {
950  if ( ! (yy_did_buffer_switch_on_eof) )
951  YY_NEW_FILE;
952  }
953  break;
954  }
955 
956  case EOB_ACT_CONTINUE_SCAN:
957  (yy_c_buf_p) =
958  (yytext_ptr) + yy_amount_of_matched_text;
959 
960  yy_current_state = yy_get_previous_state( );
961 
962  yy_cp = (yy_c_buf_p);
963  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
964  goto yy_match;
965 
966  case EOB_ACT_LAST_MATCH:
967  (yy_c_buf_p) =
968  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
969 
970  yy_current_state = yy_get_previous_state( );
971 
972  yy_cp = (yy_c_buf_p);
973  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
974  goto yy_find_action;
975  }
976  break;
977  }
978 
979  default:
980  YY_FATAL_ERROR(
981  "fatal flex scanner internal error--no action found" );
982  } /* end of action switch */
983  } /* end of scanning one token */
984  } /* end of user's declarations */
985 } /* end of yylex */
986 
987 /* yy_get_next_buffer - try to read in a new buffer
988  *
989  * Returns a code representing an action:
990  * EOB_ACT_LAST_MATCH -
991  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
992  * EOB_ACT_END_OF_FILE - end of file
993  */
994 static int yy_get_next_buffer (void)
995 {
996  char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
997  char *source = (yytext_ptr);
998  yy_size_t number_to_move, i;
999  int ret_val;
1000 
1001  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1002  YY_FATAL_ERROR(
1003  "fatal flex scanner internal error--end of buffer missed" );
1004 
1005  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1006  { /* Don't try to fill the buffer, so this is an EOF. */
1007  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1008  {
1009  /* We matched a single character, the EOB, so
1010  * treat this as a final EOF.
1011  */
1012  return EOB_ACT_END_OF_FILE;
1013  }
1014 
1015  else
1016  {
1017  /* We matched some text prior to the EOB, first
1018  * process it.
1019  */
1020  return EOB_ACT_LAST_MATCH;
1021  }
1022  }
1023 
1024  /* Try to read more data. */
1025 
1026  /* First move last chars to start of buffer. */
1027  number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1028 
1029  for ( i = 0; i < number_to_move; ++i )
1030  *(dest++) = *(source++);
1031 
1032  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1033  /* don't do the read, it's not guaranteed to return an EOF,
1034  * just force an EOF
1035  */
1036  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1037 
1038  else
1039  {
1040  yy_size_t num_to_read =
1041  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1042 
1043  while ( num_to_read <= 0 )
1044  { /* Not enough room in the buffer - grow it. */
1045 
1046  /* just a shorter name for the current buffer */
1047  YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1048 
1049  int yy_c_buf_p_offset =
1050  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1051 
1052  if ( b->yy_is_our_buffer )
1053  {
1054  yy_size_t new_size = b->yy_buf_size * 2;
1055 
1056  if ( new_size <= 0 )
1057  b->yy_buf_size += b->yy_buf_size / 8;
1058  else
1059  b->yy_buf_size *= 2;
1060 
1061  b->yy_ch_buf = (char *)
1062  /* Include room in for 2 EOB chars. */
1063  yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1064  }
1065  else
1066  /* Can't grow it, we don't own it. */
1067  b->yy_ch_buf = 0;
1068 
1069  if ( ! b->yy_ch_buf )
1070  YY_FATAL_ERROR(
1071  "fatal error - scanner input buffer overflow" );
1072 
1073  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1074 
1075  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1076  number_to_move - 1;
1077 
1078  }
1079 
1080  if ( num_to_read > YY_READ_BUF_SIZE )
1081  num_to_read = YY_READ_BUF_SIZE;
1082 
1083  /* Read in more data. */
1084  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1085  (yy_n_chars), num_to_read );
1086 
1087  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1088  }
1089 
1090  if ( (yy_n_chars) == 0 )
1091  {
1092  if ( number_to_move == YY_MORE_ADJ )
1093  {
1094  ret_val = EOB_ACT_END_OF_FILE;
1095  yyrestart(yyin );
1096  }
1097 
1098  else
1099  {
1100  ret_val = EOB_ACT_LAST_MATCH;
1101  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1102  YY_BUFFER_EOF_PENDING;
1103  }
1104  }
1105 
1106  else
1107  ret_val = EOB_ACT_CONTINUE_SCAN;
1108 
1109  if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1110  /* Extend the array by 50%, plus the number we really need. */
1111  int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1112  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1113  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1114  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1115  }
1116 
1117  (yy_n_chars) += number_to_move;
1118  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1119  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1120 
1121  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1122 
1123  return ret_val;
1124 }
1125 
1126 /* yy_get_previous_state - get the state just before the EOB char was reached */
1127 
1128  static yy_state_type yy_get_previous_state (void)
1129 {
1130  yy_state_type yy_current_state;
1131  char *yy_cp;
1132 
1133  yy_current_state = (yy_start);
1134 
1135  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1136  {
1137  YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1138  if ( yy_accept[yy_current_state] )
1139  {
1140  (yy_last_accepting_state) = yy_current_state;
1141  (yy_last_accepting_cpos) = yy_cp;
1142  }
1143  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1144  {
1145  yy_current_state = (int) yy_def[yy_current_state];
1146  if ( yy_current_state >= 17 )
1147  yy_c = yy_meta[(unsigned int) yy_c];
1148  }
1149  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1150  }
1151 
1152  return yy_current_state;
1153 }
1154 
1155 /* yy_try_NUL_trans - try to make a transition on the NUL character
1156  *
1157  * synopsis
1158  * next_state = yy_try_NUL_trans( current_state );
1159  */
1160  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1161 {
1162  int yy_is_jam;
1163  char *yy_cp = (yy_c_buf_p);
1164 
1165  YY_CHAR yy_c = 1;
1166  if ( yy_accept[yy_current_state] )
1167  {
1168  (yy_last_accepting_state) = yy_current_state;
1169  (yy_last_accepting_cpos) = yy_cp;
1170  }
1171  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1172  {
1173  yy_current_state = (int) yy_def[yy_current_state];
1174  if ( yy_current_state >= 17 )
1175  yy_c = yy_meta[(unsigned int) yy_c];
1176  }
1177  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1178  yy_is_jam = (yy_current_state == 16);
1179 
1180  return yy_is_jam ? 0 : yy_current_state;
1181 }
1182 
1183 #ifndef YY_NO_UNPUT
1184 
1185 #endif
1186 
1187 #ifndef YY_NO_INPUT
1188 #ifdef __cplusplus
1189  static int yyinput (void)
1190 #else
1191  static int input (void)
1192 #endif
1193 
1194 {
1195  int c;
1196 
1197  *(yy_c_buf_p) = (yy_hold_char);
1198 
1199  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1200  {
1201  /* yy_c_buf_p now points to the character we want to return.
1202  * If this occurs *before* the EOB characters, then it's a
1203  * valid NUL; if not, then we've hit the end of the buffer.
1204  */
1205  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1206  /* This was really a NUL. */
1207  *(yy_c_buf_p) = '\0';
1208 
1209  else
1210  { /* need more input */
1211  yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1212  ++(yy_c_buf_p);
1213 
1214  switch ( yy_get_next_buffer( ) )
1215  {
1216  case EOB_ACT_LAST_MATCH:
1217  /* This happens because yy_g_n_b()
1218  * sees that we've accumulated a
1219  * token and flags that we need to
1220  * try matching the token before
1221  * proceeding. But for input(),
1222  * there's no matching to consider.
1223  * So convert the EOB_ACT_LAST_MATCH
1224  * to EOB_ACT_END_OF_FILE.
1225  */
1226 
1227  /* Reset buffer status. */
1228  yyrestart(yyin );
1229 
1230  /*FALLTHROUGH*/
1231 
1232  case EOB_ACT_END_OF_FILE:
1233  {
1234  if ( yywrap( ) )
1235  return EOF;
1236 
1237  if ( ! (yy_did_buffer_switch_on_eof) )
1238  YY_NEW_FILE;
1239 #ifdef __cplusplus
1240  return yyinput();
1241 #else
1242  return input();
1243 #endif
1244  }
1245 
1246  case EOB_ACT_CONTINUE_SCAN:
1247  (yy_c_buf_p) = (yytext_ptr) + offset;
1248  break;
1249  }
1250  }
1251  }
1252 
1253  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1254  *(yy_c_buf_p) = '\0'; /* preserve yytext */
1255  (yy_hold_char) = *++(yy_c_buf_p);
1256 
1257  return c;
1258 }
1259 #endif /* ifndef YY_NO_INPUT */
1260 
1266  void yyrestart (FILE * input_file )
1267 {
1268 
1269  if ( ! YY_CURRENT_BUFFER ){
1270  yyensure_buffer_stack ();
1271  YY_CURRENT_BUFFER_LVALUE =
1272  yy_create_buffer(yyin,YY_BUF_SIZE );
1273  }
1274 
1275  yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1276  yy_load_buffer_state( );
1277 }
1278 
1283  void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1284 {
1285 
1286  /* TODO. We should be able to replace this entire function body
1287  * with
1288  * yypop_buffer_state();
1289  * yypush_buffer_state(new_buffer);
1290  */
1291  yyensure_buffer_stack ();
1292  if ( YY_CURRENT_BUFFER == new_buffer )
1293  return;
1294 
1295  if ( YY_CURRENT_BUFFER )
1296  {
1297  /* Flush out information for old buffer. */
1298  *(yy_c_buf_p) = (yy_hold_char);
1299  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1300  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1301  }
1302 
1303  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1304  yy_load_buffer_state( );
1305 
1306  /* We don't actually know whether we did this switch during
1307  * EOF (yywrap()) processing, but the only time this flag
1308  * is looked at is after yywrap() is called, so it's safe
1309  * to go ahead and always set it.
1310  */
1311  (yy_did_buffer_switch_on_eof) = 1;
1312 }
1313 
1314 static void yy_load_buffer_state (void)
1315 {
1316  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1317  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1318  yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1319  (yy_hold_char) = *(yy_c_buf_p);
1320 }
1321 
1328  YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1329 {
1330  YY_BUFFER_STATE b;
1331 
1332  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1333  if ( ! b )
1334  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1335 
1336  b->yy_buf_size = (yy_size_t)size;
1337 
1338  /* yy_ch_buf has to be 2 characters longer than the size given because
1339  * we need to put in 2 end-of-buffer characters.
1340  */
1341  b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1342  if ( ! b->yy_ch_buf )
1343  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1344 
1345  b->yy_is_our_buffer = 1;
1346 
1347  yy_init_buffer(b,file );
1348 
1349  return b;
1350 }
1351 
1356  void yy_delete_buffer (YY_BUFFER_STATE b )
1357 {
1358 
1359  if ( ! b )
1360  return;
1361 
1362  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1363  YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1364 
1365  if ( b->yy_is_our_buffer )
1366  yyfree((void *) b->yy_ch_buf );
1367 
1368  yyfree((void *) b );
1369 }
1370 
1371 /* Initializes or reinitializes a buffer.
1372  * This function is sometimes called more than once on the same buffer,
1373  * such as during a yyrestart() or at EOF.
1374  */
1375  static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1376 
1377 {
1378  int oerrno = errno;
1379 
1380  yy_flush_buffer(b );
1381 
1382  b->yy_input_file = file;
1383  b->yy_fill_buffer = 1;
1384 
1385  /* If b is the current buffer, then yy_init_buffer was _probably_
1386  * called from yyrestart() or through yy_get_next_buffer.
1387  * In that case, we don't want to reset the lineno or column.
1388  */
1389  if (b != YY_CURRENT_BUFFER){
1390  b->yy_bs_lineno = 1;
1391  b->yy_bs_column = 0;
1392  }
1393 
1394  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1395 
1396  errno = oerrno;
1397 }
1398 
1403  void yy_flush_buffer (YY_BUFFER_STATE b )
1404 {
1405  if ( ! b )
1406  return;
1407 
1408  b->yy_n_chars = 0;
1409 
1410  /* We always need two end-of-buffer characters. The first causes
1411  * a transition to the end-of-buffer state. The second causes
1412  * a jam in that state.
1413  */
1414  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1415  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1416 
1417  b->yy_buf_pos = &b->yy_ch_buf[0];
1418 
1419  b->yy_at_bol = 1;
1420  b->yy_buffer_status = YY_BUFFER_NEW;
1421 
1422  if ( b == YY_CURRENT_BUFFER )
1423  yy_load_buffer_state( );
1424 }
1425 
1432 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1433 {
1434  if (new_buffer == NULL)
1435  return;
1436 
1437  yyensure_buffer_stack();
1438 
1439  /* This block is copied from yy_switch_to_buffer. */
1440  if ( YY_CURRENT_BUFFER )
1441  {
1442  /* Flush out information for old buffer. */
1443  *(yy_c_buf_p) = (yy_hold_char);
1444  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1445  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1446  }
1447 
1448  /* Only push if top exists. Otherwise, replace top. */
1449  if (YY_CURRENT_BUFFER)
1450  (yy_buffer_stack_top)++;
1451  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1452 
1453  /* copied from yy_switch_to_buffer. */
1454  yy_load_buffer_state( );
1455  (yy_did_buffer_switch_on_eof) = 1;
1456 }
1457 
1462 void yypop_buffer_state (void)
1463 {
1464  if (!YY_CURRENT_BUFFER)
1465  return;
1466 
1467  yy_delete_buffer(YY_CURRENT_BUFFER );
1468  YY_CURRENT_BUFFER_LVALUE = NULL;
1469  if ((yy_buffer_stack_top) > 0)
1470  --(yy_buffer_stack_top);
1471 
1472  if (YY_CURRENT_BUFFER) {
1473  yy_load_buffer_state( );
1474  (yy_did_buffer_switch_on_eof) = 1;
1475  }
1476 }
1477 
1478 /* Allocates the stack if it does not exist.
1479  * Guarantees space for at least one push.
1480  */
1481 static void yyensure_buffer_stack (void)
1482 {
1483  yy_size_t num_to_alloc;
1484 
1485  if (!(yy_buffer_stack)) {
1486 
1487  /* First allocation is just for 2 elements, since we don't know if this
1488  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1489  * immediate realloc on the next call.
1490  */
1491  num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
1492  (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1493  (num_to_alloc * sizeof(struct yy_buffer_state*)
1494  );
1495  if ( ! (yy_buffer_stack) )
1496  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1497 
1498  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1499 
1500  (yy_buffer_stack_max) = num_to_alloc;
1501  (yy_buffer_stack_top) = 0;
1502  return;
1503  }
1504 
1505  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1506 
1507  /* Increase the buffer to prepare for a possible push. */
1508  yy_size_t grow_size = 8 /* arbitrary grow size */;
1509 
1510  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1511  (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1512  ((yy_buffer_stack),
1513  num_to_alloc * sizeof(struct yy_buffer_state*)
1514  );
1515  if ( ! (yy_buffer_stack) )
1516  YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1517 
1518  /* zero only the new slots.*/
1519  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1520  (yy_buffer_stack_max) = num_to_alloc;
1521  }
1522 }
1523 
1530 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1531 {
1532  YY_BUFFER_STATE b;
1533 
1534  if ( size < 2 ||
1535  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1536  base[size-1] != YY_END_OF_BUFFER_CHAR )
1537  /* They forgot to leave room for the EOB's. */
1538  return 0;
1539 
1540  b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1541  if ( ! b )
1542  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1543 
1544  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1545  b->yy_buf_pos = b->yy_ch_buf = base;
1546  b->yy_is_our_buffer = 0;
1547  b->yy_input_file = 0;
1548  b->yy_n_chars = b->yy_buf_size;
1549  b->yy_is_interactive = 0;
1550  b->yy_at_bol = 1;
1551  b->yy_fill_buffer = 0;
1552  b->yy_buffer_status = YY_BUFFER_NEW;
1553 
1554  yy_switch_to_buffer(b );
1555 
1556  return b;
1557 }
1558 
1567 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1568 {
1569 
1570  return yy_scan_bytes(yystr,strlen(yystr) );
1571 }
1572 
1580 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
1581 {
1582  YY_BUFFER_STATE b;
1583  char *buf;
1584  yy_size_t n;
1585  yy_size_t i;
1586 
1587  /* Get memory for full buffer, including space for trailing EOB's. */
1588  n = _yybytes_len + 2;
1589  buf = (char *) yyalloc(n );
1590  if ( ! buf )
1591  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1592 
1593  for ( i = 0; i < _yybytes_len; ++i )
1594  buf[i] = yybytes[i];
1595 
1596  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1597 
1598  b = yy_scan_buffer(buf,n );
1599  if ( ! b )
1600  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1601 
1602  /* It's okay to grow etc. this buffer, and we should throw it
1603  * away when we're done.
1604  */
1605  b->yy_is_our_buffer = 1;
1606 
1607  return b;
1608 }
1609 
1610 #ifndef YY_EXIT_FAILURE
1611 #define YY_EXIT_FAILURE 2
1612 #endif
1613 
1614 static void yy_fatal_error (yyconst char* msg )
1615 {
1616  (void) fprintf( stderr, "%s\n", msg );
1617  exit( YY_EXIT_FAILURE );
1618 }
1619 
1620 /* Redefine yyless() so it works in section 3 code. */
1621 
1622 #undef yyless
1623 #define yyless(n) \
1624  do \
1625  { \
1626  /* Undo effects of setting up yytext. */ \
1627  int yyless_macro_arg = (n); \
1628  YY_LESS_LINENO(yyless_macro_arg);\
1629  yytext[yyleng] = (yy_hold_char); \
1630  (yy_c_buf_p) = yytext + yyless_macro_arg; \
1631  (yy_hold_char) = *(yy_c_buf_p); \
1632  *(yy_c_buf_p) = '\0'; \
1633  yyleng = yyless_macro_arg; \
1634  } \
1635  while ( 0 )
1636 
1637 /* Accessor methods (get/set functions) to struct members. */
1638 
1642 int yyget_lineno (void)
1643 {
1644 
1645  return yylineno;
1646 }
1647 
1651 FILE *yyget_in (void)
1652 {
1653  return yyin;
1654 }
1655 
1659 FILE *yyget_out (void)
1660 {
1661  return yyout;
1662 }
1663 
1667 yy_size_t yyget_leng (void)
1668 {
1669  return yyleng;
1670 }
1671 
1676 char *yyget_text (void)
1677 {
1678  return yytext;
1679 }
1680 
1685 void yyset_lineno (int _line_number )
1686 {
1687 
1688  yylineno = _line_number;
1689 }
1690 
1697 void yyset_in (FILE * _in_str )
1698 {
1699  yyin = _in_str ;
1700 }
1701 
1702 void yyset_out (FILE * _out_str )
1703 {
1704  yyout = _out_str ;
1705 }
1706 
1707 int yyget_debug (void)
1708 {
1709  return yy_flex_debug;
1710 }
1711 
1712 void yyset_debug (int _bdebug )
1713 {
1714  yy_flex_debug = _bdebug ;
1715 }
1716 
1717 static int yy_init_globals (void)
1718 {
1719  /* Initialization is the same as for the non-reentrant scanner.
1720  * This function is called from yylex_destroy(), so don't allocate here.
1721  */
1722 
1723  (yy_buffer_stack) = 0;
1724  (yy_buffer_stack_top) = 0;
1725  (yy_buffer_stack_max) = 0;
1726  (yy_c_buf_p) = (char *) 0;
1727  (yy_init) = 0;
1728  (yy_start) = 0;
1729 
1730 /* Defined in main.c */
1731 #ifdef YY_STDINIT
1732  yyin = stdin;
1733  yyout = stdout;
1734 #else
1735  yyin = (FILE *) 0;
1736  yyout = (FILE *) 0;
1737 #endif
1738 
1739  /* For future reference: Set errno on error, since we are called by
1740  * yylex_init()
1741  */
1742  return 0;
1743 }
1744 
1745 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1746 int yylex_destroy (void)
1747 {
1748 
1749  /* Pop the buffer stack, destroying each element. */
1750  while(YY_CURRENT_BUFFER){
1751  yy_delete_buffer(YY_CURRENT_BUFFER );
1752  YY_CURRENT_BUFFER_LVALUE = NULL;
1753  yypop_buffer_state();
1754  }
1755 
1756  /* Destroy the stack itself. */
1757  yyfree((yy_buffer_stack) );
1758  (yy_buffer_stack) = NULL;
1759 
1760  /* Reset the globals. This is important in a non-reentrant scanner so the next time
1761  * yylex() is called, initialization will occur. */
1762  yy_init_globals( );
1763 
1764  return 0;
1765 }
1766 
1767 /*
1768  * Internal utility routines.
1769  */
1770 
1771 #ifndef yytext_ptr
1772 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1773 {
1774 
1775  int i;
1776  for ( i = 0; i < n; ++i )
1777  s1[i] = s2[i];
1778 }
1779 #endif
1780 
1781 #ifdef YY_NEED_STRLEN
1782 static int yy_flex_strlen (yyconst char * s )
1783 {
1784  int n;
1785  for ( n = 0; s[n]; ++n )
1786  ;
1787 
1788  return n;
1789 }
1790 #endif
1791 
1792 void *yyalloc (yy_size_t size )
1793 {
1794  return (void *) malloc( size );
1795 }
1796 
1797 void *yyrealloc (void * ptr, yy_size_t size )
1798 {
1799 
1800  /* The cast to (char *) in the following accommodates both
1801  * implementations that use char* generic pointers, and those
1802  * that use void* generic pointers. It works with the latter
1803  * because both ANSI C and C++ allow castless assignment from
1804  * any pointer type to void*, and deal with argument conversions
1805  * as though doing an assignment.
1806  */
1807  return (void *) realloc( (char *) ptr, size );
1808 }
1809 
1810 void yyfree (void * ptr )
1811 {
1812  free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1813 }
1814 
1815 #define YYTABLES_NAME "yytables"
1816 
1817 #line 77 "configfile.l"
1818 
1819 
1820 
1821 #include <stdio.h>
1822 #include <string.h>
1823 #include <errno.h>
1824 
1825 #include "config.h"
1826 #include "misc.h"
1827 #include "pcsclite.h"
1828 #include "pcscd.h"
1829 #include "debuglog.h"
1830 #include "sys_generic.h"
1831 #include "readerfactory.h"
1832 
1833 int evaluatetoken(char *pcToken)
1834 {
1835  if (pcPrevious == NULL)
1836  { /* This is the key */
1837  pcPrevious = strdup(pcToken);
1838  iOldLinenumber = iLinenumber;
1839  }
1840  else
1841  {
1842  /* first and second tokens are not on the same line */
1843  if (iOldLinenumber != iLinenumber)
1844  {
1845  tok_error(pcPrevious);
1846  pcPrevious = strdup(pcToken);
1847  iOldLinenumber = iLinenumber;
1848  return 1;
1849  }
1850 
1851  pcCurrent = pcToken;
1852  if (strcmp(pcPrevious, "FRIENDLYNAME") == 0)
1853  {
1854  if (pcFriendlyname == NULL)
1855  {
1856  size_t n, p;
1857 
1858  pcFriendlyname = malloc(strlen(pcCurrent) + 1);
1859  for (n = 0, p = 0; n < strlen(pcCurrent); n++)
1860  {
1861  if (pcCurrent[n] != '"')
1862  { /* Strip off the quotes */
1863  pcFriendlyname[p++] = pcCurrent[n];
1864  }
1865  }
1866  pcFriendlyname[p++] = '\0';
1867  }
1868  else
1869  {
1870  tok_error(pcPrevious);
1871  return 1;
1872  }
1873  }
1874  else if (strcmp(pcPrevious, "DEVICENAME") == 0)
1875  {
1876  if (pcDevicename == NULL)
1877  {
1878  struct stat fStatBuf;
1879 
1880  pcDevicename = strdup(pcCurrent);
1881  if ((NULL == strchr(pcDevicename, ':'))
1882  && (stat(pcDevicename, &fStatBuf) != 0))
1883  {
1884  Log3(PCSC_LOG_CRITICAL, "Error with device %s: %s",
1885  pcDevicename, strerror(errno));
1886  Log1(PCSC_LOG_CRITICAL, "You should remove the DEVICENAME line if your driver does not use this field");
1887  badError = 1;
1888  }
1889  }
1890  else
1891  {
1892  tok_error(pcPrevious);
1893  return 1;
1894  }
1895  }
1896  else if (strcmp(pcPrevious, "LIBPATH") == 0)
1897  {
1898  if (pcLibpath == NULL)
1899  {
1900  struct stat fStatBuf;
1901 
1902  pcLibpath = strdup(pcCurrent);
1903  if (stat(pcLibpath, &fStatBuf) != 0)
1904  {
1905  Log3(PCSC_LOG_CRITICAL, "Error with library %s: %s",
1906  pcLibpath, strerror(errno));
1907  badError = 1;
1908  }
1909 
1910  if (strstr(pcLibpath, ".bundle") != NULL)
1911  {
1912  Log1(PCSC_LOG_ERROR, "WARNING *************************************");
1913  Log2(PCSC_LOG_ERROR, "WARNING: USB drivers SHOULD NOT be declared in reader.conf: %s", pcLibpath);
1914  Log1(PCSC_LOG_ERROR, "WARNING *************************************");
1915  }
1916  }
1917  else
1918  {
1919  tok_error(pcPrevious);
1920  return 1;
1921  }
1922  }
1923  else if (strcmp(pcPrevious, "CHANNELID") == 0)
1924  {
1925  if (pcChannelid == NULL)
1926  pcChannelid = strdup(pcCurrent);
1927  else
1928  {
1929  tok_error(pcPrevious);
1930  return 1;
1931  }
1932  }
1933  else
1934  {
1935  tok_error(pcPrevious);
1936  free(pcPrevious);
1937  pcPrevious = NULL;
1938  return 1;
1939  }
1940 
1941  free(pcPrevious);
1942  pcPrevious = NULL;
1943  }
1944 
1945  /* CHANNELID and DEVICENAME are both optional but not at the same time */
1946  if (pcFriendlyname && pcLibpath && badError != 1
1947  && (pcChannelid || pcDevicename))
1948  {
1949  int channelId;
1950  static char* defaultDeviceName = (char *)"";
1951 
1952  Log2(PCSC_LOG_DEBUG, "Add reader: %s", pcFriendlyname);
1953  if (0 == reader_list_size)
1954  {
1955  /* one real reader and one end marker */
1956  reader_list_size = 2;
1957  reader_list = malloc(reader_list_size * sizeof(SerialReader));
1958  }
1959  else
1960  {
1961  reader_list_size++;
1962  reader_list = realloc(reader_list, reader_list_size *
1963  sizeof(SerialReader));
1964  }
1965 
1966  /* end marker */
1967  reader_list[reader_list_size-1].pcFriendlyname = NULL;
1968 
1969  /* the DEVICENAME parameter is optional */
1970  if (NULL == pcDevicename)
1971  pcDevicename = defaultDeviceName;
1972 
1973  if (pcChannelid)
1974  channelId = strtoul(pcChannelid, NULL, 0);
1975  else
1976  channelId = 0;
1977  reader_list[reader_list_size-2].pcFriendlyname = strdup(pcFriendlyname);
1978  reader_list[reader_list_size-2].pcDevicename = strdup(pcDevicename);
1979  reader_list[reader_list_size-2].pcLibpath = strdup(pcLibpath),
1980  reader_list[reader_list_size-2].channelId = channelId;
1981 
1982  free(pcFriendlyname);
1983  pcFriendlyname = NULL;
1984 
1985  if (pcDevicename != defaultDeviceName)
1986  free(pcDevicename);
1987  pcDevicename = NULL;
1988 
1989  free(pcLibpath);
1990  pcLibpath = NULL;
1991 
1992  if (pcChannelid)
1993  free(pcChannelid);
1994  pcChannelid = NULL;
1995  }
1996 
1997  return 0;
1998 }
1999 
2000 void tok_error(char *token_error)
2001 {
2002  Log4(PCSC_LOG_ERROR, "tok_error: invalid value line %d in %s: %s",
2003  iOldLinenumber, ConfFile, token_error);
2004  badError = 1;
2005 }
2006 
2007 int DBGetReaderListDir(const char *readerconf_dir,
2008  SerialReader **caller_reader_list)
2009 {
2010  DIR *dir;
2011  int ret = 0;
2012 
2013  /* (re)start with an empty list */
2014  reader_list = NULL;
2015  reader_list_size = 0;
2016 
2017  dir = opendir(readerconf_dir);
2018  if (dir)
2019  {
2020  /* the configuration file is a directory */
2021  struct dirent *direntry;
2022 
2023  Log2(PCSC_LOG_DEBUG, "Parsing conf directory: %s", readerconf_dir);
2024 
2025  /* for each configuration file */
2026  while ((direntry = readdir(dir)) != NULL)
2027  {
2028  char filename[FILENAME_MAX];
2029  int r;
2030 
2031  snprintf(filename, sizeof(filename), "%s/%s",
2032  readerconf_dir, direntry->d_name);
2033 
2034  /* skip non regular files */
2035 #ifdef HAVE_STRUCT_DIRENT_D_TYPE
2036  if (direntry->d_type == DT_UNKNOWN)
2037 #endif
2038  {
2039  struct stat st;
2040 
2041  if (lstat(filename, &st) != 0)
2042  {
2043  Log2(PCSC_LOG_DEBUG, "Skipping non statable file: %s",
2044  direntry->d_name);
2045  continue;
2046  }
2047 
2048  if (!S_ISREG(st.st_mode))
2049  {
2050  Log2(PCSC_LOG_DEBUG, "Skipping non regular file: %s",
2051  direntry->d_name);
2052  continue;
2053  }
2054  }
2055 #ifdef HAVE_STRUCT_DIRENT_D_TYPE
2056  else
2057  if (direntry->d_type != DT_REG)
2058  {
2059  Log2(PCSC_LOG_DEBUG, "Skipping non regular file: %s",
2060  direntry->d_name);
2061  continue;
2062  }
2063 #endif
2064 
2065  /* skip files starting with . like ., .., .svn, etc */
2066  if ('.' == direntry->d_name[0])
2067  {
2068  Log2(PCSC_LOG_DEBUG, "Skipping hidden file: %s",
2069  direntry->d_name);
2070  continue;
2071  }
2072 
2073  /* each call to DBGetReaderList() will append to the list */
2074  r = DBGetReaderList(filename, caller_reader_list);
2075 
2076  /* set the global return value to the latest error */
2077  if (r)
2078  ret = r;
2079  }
2080 
2081  closedir(dir);
2082  }
2083  else
2084  /* the configuration file is really a file */
2085  ret = DBGetReaderList(readerconf_dir, caller_reader_list);
2086 
2087  return ret;
2088 }
2089 
2090 int DBGetReaderList(const char *readerconf, SerialReader **caller_reader_list)
2091 {
2092  FILE *configFile = NULL;
2093 
2094  *caller_reader_list = NULL; /* no list by default */
2095 
2096  /* used by tok_error() */
2097  ConfFile = readerconf;
2098 
2099  Log2(PCSC_LOG_DEBUG, "Parsing conf file: %s", ConfFile);
2100 
2101  configFile = fopen(readerconf, "r");
2102 
2103  if (configFile == NULL)
2104  return 1;
2105 
2106  yyin = configFile;
2107 
2108  /* (re)start with a clean state */
2109  iLinenumber = 1;
2110  iOldLinenumber = -1;
2111  pcFriendlyname = NULL;
2112  pcDevicename = NULL;
2113  pcLibpath = NULL;
2114  pcChannelid = NULL;
2115  pcPrevious = NULL;
2116  pcCurrent = NULL;
2117  badError = 0;
2118 
2119  do
2120  {
2121  (void)yylex();
2122  }
2123  while (!feof(configFile));
2124  yylex_destroy();
2125 
2126  (void)fclose(configFile);
2127 
2128  *caller_reader_list = reader_list;
2129 
2130  if (badError == 1)
2131  return -1;
2132  else
2133  return 0;
2134 } /* End of configfile.c */
2135 
2136 
static YY_BUFFER_STATE * yy_buffer_stack
Stack as an array.
Definition: tokenparser.c:283
int yy_bs_column
The column count.
Definition: configfile.c:235
This handles abstract system level calls.
char * pcLibpath
LIBPATH.
Definition: readerfactory.h:52
static size_t yy_buffer_stack_max
capacity of stack.
Definition: tokenparser.c:282
This keeps a list of defines for pcsc-lite.
This keeps a list of Windows(R) types.
This keeps a list of defines for pcsc-lite.
YY_DECL
The main scanner function which does all the work.
Definition: tokenparser.c:743
int channelId
CHANNELID.
Definition: readerfactory.h:53
This keeps track of a list of currently available reader structures.
static size_t yy_buffer_stack_top
index of top of stack.
Definition: tokenparser.c:281
char * pcDevicename
DEVICENAME.
Definition: readerfactory.h:51
char * pcFriendlyname
FRIENDLYNAME.
Definition: readerfactory.h:50
This handles debugging.
int yy_bs_lineno
The line count.
Definition: configfile.c:234