~ubuntu-branches/ubuntu/precise/a2ps/precise-updates

« back to all changes in this revision

Viewing changes to contrib/fixnt.c

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta (mhatta)
  • Date: 2008-01-03 23:38:51 UTC
  • mfrom: (1.1.4 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080103233851-izw2sup5iili3lhq
Tags: 1:4.14-1
* New upstream release.
* Bumped up Standards-Version to 3.7.3 (no physical changes).
* Sorted out copyright information.  Thanks to Patrick Schoenfeld
  - closes: #448454
* Now use autoload, not load, in emacsen-startup.  Thanks to Trent W. Buck 
  - closes: #446152
* Now a2ps try to use html2ps for parsing HTML - closes: #424161
  I'll try to support Iceweasel later.
* Now prefer emacs22 - closes: #434914, #283828
* Added a manpage for a2ps-lpr-wrapper.  Thanks to Michael Tautschnig 
  - closes: #425068
* debian/emacsen-install: do not load site files when byte-compiling, 
  and set symlinks to *.el files 
  - closes: #246296, #269409, #401684, #448144
* prerm, postinst: use emacsen-common stuff only when it is installed 
  and configured.
* rules: do not install emacsen snippets in {prerm,postinst}.
* Many thanks to Agustin Martin Domingo for these 3 hacks above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#line 3 "fixnt.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 5
 
11
#define YY_FLEX_SUBMINOR_VERSION 33
 
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 __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
#endif /* ! C99 */
 
57
 
 
58
/* Limits of integral types. */
 
59
#ifndef INT8_MIN
 
60
#define INT8_MIN               (-128)
 
61
#endif
 
62
#ifndef INT16_MIN
 
63
#define INT16_MIN              (-32767-1)
 
64
#endif
 
65
#ifndef INT32_MIN
 
66
#define INT32_MIN              (-2147483647-1)
 
67
#endif
 
68
#ifndef INT8_MAX
 
69
#define INT8_MAX               (127)
 
70
#endif
 
71
#ifndef INT16_MAX
 
72
#define INT16_MAX              (32767)
 
73
#endif
 
74
#ifndef INT32_MAX
 
75
#define INT32_MAX              (2147483647)
 
76
#endif
 
77
#ifndef UINT8_MAX
 
78
#define UINT8_MAX              (255U)
 
79
#endif
 
80
#ifndef UINT16_MAX
 
81
#define UINT16_MAX             (65535U)
 
82
#endif
 
83
#ifndef UINT32_MAX
 
84
#define UINT32_MAX             (4294967295U)
 
85
#endif
 
86
 
 
87
#endif /* ! FLEXINT_H */
 
88
 
 
89
#ifdef __cplusplus
 
90
 
 
91
/* The "const" storage-class-modifier is valid. */
 
92
#define YY_USE_CONST
 
93
 
 
94
#else   /* ! __cplusplus */
 
95
 
 
96
#if __STDC__
 
97
 
 
98
#define YY_USE_CONST
 
99
 
 
100
#endif  /* __STDC__ */
 
101
#endif  /* ! __cplusplus */
 
102
 
 
103
#ifdef YY_USE_CONST
 
104
#define yyconst const
 
105
#else
 
106
#define yyconst
 
107
#endif
 
108
 
 
109
/* Returned upon end-of-file. */
 
110
#define YY_NULL 0
 
111
 
 
112
/* Promotes a possibly negative, possibly signed char to an unsigned
 
113
 * integer for use as an array index.  If the signed char is negative,
 
114
 * we want to instead treat it as an 8-bit unsigned char, hence the
 
115
 * double cast.
 
116
 */
 
117
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
 
118
 
 
119
/* Enter a start condition.  This macro really ought to take a parameter,
 
120
 * but we do it the disgusting crufty way forced on us by the ()-less
 
121
 * definition of BEGIN.
 
122
 */
 
123
#define BEGIN (yy_start) = 1 + 2 *
 
124
 
 
125
/* Translate the current start state into a value that can be later handed
 
126
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 
127
 * compatibility.
 
128
 */
 
129
#define YY_START (((yy_start) - 1) / 2)
 
130
#define YYSTATE YY_START
 
131
 
 
132
/* Action number for EOF rule of a given start state. */
 
133
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 
134
 
 
135
/* Special action meaning "start processing a new file". */
 
136
#define YY_NEW_FILE yyrestart(yyin  )
 
137
 
 
138
#define YY_END_OF_BUFFER_CHAR 0
 
139
 
 
140
/* Size of default input buffer. */
 
141
#ifndef YY_BUF_SIZE
 
142
#define YY_BUF_SIZE 16384
 
143
#endif
 
144
 
 
145
/* The state buf must be large enough to hold one state per character in the main buffer.
 
146
 */
 
147
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
148
 
 
149
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
 
150
#define YY_TYPEDEF_YY_BUFFER_STATE
 
151
typedef struct yy_buffer_state *YY_BUFFER_STATE;
 
152
#endif
 
153
 
 
154
extern int yyleng;
 
155
 
 
156
extern FILE *yyin, *yyout;
 
157
 
 
158
#define EOB_ACT_CONTINUE_SCAN 0
 
159
#define EOB_ACT_END_OF_FILE 1
 
160
#define EOB_ACT_LAST_MATCH 2
 
161
 
 
162
    #define YY_LESS_LINENO(n)
 
163
    
 
164
/* Return all but the first "n" matched characters back to the input stream. */
 
165
#define yyless(n) \
 
166
        do \
 
167
                { \
 
168
                /* Undo effects of setting up yytext. */ \
 
169
        int yyless_macro_arg = (n); \
 
170
        YY_LESS_LINENO(yyless_macro_arg);\
 
171
                *yy_cp = (yy_hold_char); \
 
172
                YY_RESTORE_YY_MORE_OFFSET \
 
173
                (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
 
174
                YY_DO_BEFORE_ACTION; /* set up yytext again */ \
 
175
                } \
 
176
        while ( 0 )
 
177
 
 
178
#define unput(c) yyunput( c, (yytext_ptr)  )
 
179
 
 
180
/* The following is because we cannot portably get our hands on size_t
 
181
 * (without autoconf's help, which isn't available because we want
 
182
 * flex-generated scanners to compile on their own).
 
183
 */
 
184
 
 
185
#ifndef YY_TYPEDEF_YY_SIZE_T
 
186
#define YY_TYPEDEF_YY_SIZE_T
 
187
typedef unsigned int yy_size_t;
 
188
#endif
 
189
 
 
190
#ifndef YY_STRUCT_YY_BUFFER_STATE
 
191
#define YY_STRUCT_YY_BUFFER_STATE
 
192
struct yy_buffer_state
 
193
        {
 
194
        FILE *yy_input_file;
 
195
 
 
196
        char *yy_ch_buf;                /* input buffer */
 
197
        char *yy_buf_pos;               /* current position in input buffer */
 
198
 
 
199
        /* Size of input buffer in bytes, not including room for EOB
 
200
         * characters.
 
201
         */
 
202
        yy_size_t yy_buf_size;
 
203
 
 
204
        /* Number of characters read into yy_ch_buf, not including EOB
 
205
         * characters.
 
206
         */
 
207
        int yy_n_chars;
 
208
 
 
209
        /* Whether we "own" the buffer - i.e., we know we created it,
 
210
         * and can realloc() it to grow it, and should free() it to
 
211
         * delete it.
 
212
         */
 
213
        int yy_is_our_buffer;
 
214
 
 
215
        /* Whether this is an "interactive" input source; if so, and
 
216
         * if we're using stdio for input, then we want to use getc()
 
217
         * instead of fread(), to make sure we stop fetching input after
 
218
         * each newline.
 
219
         */
 
220
        int yy_is_interactive;
 
221
 
 
222
        /* Whether we're considered to be at the beginning of a line.
 
223
         * If so, '^' rules will be active on the next match, otherwise
 
224
         * not.
 
225
         */
 
226
        int yy_at_bol;
 
227
 
 
228
    int yy_bs_lineno; /**< The line count. */
 
229
    int yy_bs_column; /**< The column count. */
 
230
    
 
231
        /* Whether to try to fill the input buffer when we reach the
 
232
         * end of it.
 
233
         */
 
234
        int yy_fill_buffer;
 
235
 
 
236
        int yy_buffer_status;
 
237
 
 
238
#define YY_BUFFER_NEW 0
 
239
#define YY_BUFFER_NORMAL 1
 
240
        /* When an EOF's been seen but there's still some text to process
 
241
         * then we mark the buffer as YY_EOF_PENDING, to indicate that we
 
242
         * shouldn't try reading from the input source any more.  We might
 
243
         * still have a bunch of tokens to match, though, because of
 
244
         * possible backing-up.
 
245
         *
 
246
         * When we actually see the EOF, we change the status to "new"
 
247
         * (via yyrestart()), so that the user can continue scanning by
 
248
         * just pointing yyin at a new input file.
 
249
         */
 
250
#define YY_BUFFER_EOF_PENDING 2
 
251
 
 
252
        };
 
253
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
 
254
 
 
255
/* Stack of input buffers. */
 
256
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
 
257
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
 
258
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 
259
 
 
260
/* We provide macros for accessing buffer states in case in the
 
261
 * future we want to put the buffer states in a more general
 
262
 * "scanner state".
 
263
 *
 
264
 * Returns the top of the stack, or NULL.
 
265
 */
 
266
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
 
267
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
 
268
                          : NULL)
 
269
 
 
270
/* Same as previous macro, but useful when we know that the buffer stack is not
 
271
 * NULL or when we need an lvalue. For internal use only.
 
272
 */
 
273
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
 
274
 
 
275
/* yy_hold_char holds the character lost when yytext is formed. */
 
276
static char yy_hold_char;
 
277
static int yy_n_chars;          /* number of characters read into yy_ch_buf */
 
278
int yyleng;
 
279
 
 
280
/* Points to current character in buffer. */
 
281
static char *yy_c_buf_p = (char *) 0;
 
282
static int yy_init = 0;         /* whether we need to initialize */
 
283
static int yy_start = 0;        /* start state number */
 
284
 
 
285
/* Flag which is used to allow yywrap()'s to do buffer switches
 
286
 * instead of setting up a fresh yyin.  A bit of a hack ...
 
287
 */
 
288
static int yy_did_buffer_switch_on_eof;
 
289
 
 
290
void yyrestart (FILE *input_file  );
 
291
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
 
292
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
 
293
void yy_delete_buffer (YY_BUFFER_STATE b  );
 
294
void yy_flush_buffer (YY_BUFFER_STATE b  );
 
295
void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
 
296
void yypop_buffer_state (void );
 
297
 
 
298
static void yyensure_buffer_stack (void );
 
299
static void yy_load_buffer_state (void );
 
300
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
 
301
 
 
302
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
 
303
 
 
304
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
 
305
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
 
306
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
 
307
 
 
308
void *yyalloc (yy_size_t  );
 
309
void *yyrealloc (void *,yy_size_t  );
 
310
void yyfree (void *  );
 
311
 
 
312
#define yy_new_buffer yy_create_buffer
 
313
 
 
314
#define yy_set_interactive(is_interactive) \
 
315
        { \
 
316
        if ( ! YY_CURRENT_BUFFER ){ \
 
317
        yyensure_buffer_stack (); \
 
318
                YY_CURRENT_BUFFER_LVALUE =    \
 
319
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
 
320
        } \
 
321
        YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
 
322
        }
 
323
 
 
324
#define yy_set_bol(at_bol) \
 
325
        { \
 
326
        if ( ! YY_CURRENT_BUFFER ){\
 
327
        yyensure_buffer_stack (); \
 
328
                YY_CURRENT_BUFFER_LVALUE =    \
 
329
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
 
330
        } \
 
331
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
 
332
        }
 
333
 
 
334
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
335
 
 
336
/* Begin user sect3 */
 
337
 
 
338
typedef unsigned char YY_CHAR;
 
339
 
 
340
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
 
341
 
 
342
typedef int yy_state_type;
 
343
 
 
344
extern int yylineno;
 
345
 
 
346
int yylineno = 1;
 
347
 
 
348
extern char *yytext;
 
349
#define yytext_ptr yytext
 
350
 
 
351
static yy_state_type yy_get_previous_state (void );
 
352
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 
353
static int yy_get_next_buffer (void );
 
354
static void yy_fatal_error (yyconst char msg[]  );
 
355
 
 
356
/* Done after the current pattern has been matched and before the
 
357
 * corresponding action - sets up yytext.
 
358
 */
 
359
#define YY_DO_BEFORE_ACTION \
 
360
        (yytext_ptr) = yy_bp; \
 
361
        yyleng = (size_t) (yy_cp - yy_bp); \
 
362
        (yy_hold_char) = *yy_cp; \
 
363
        *yy_cp = '\0'; \
 
364
        (yy_c_buf_p) = yy_cp;
 
365
 
 
366
#define YY_NUM_RULES 25
 
367
#define YY_END_OF_BUFFER 26
 
368
/* This struct is not used in this scanner,
 
369
   but its presence is necessary. */
 
370
struct yy_trans_info
 
371
        {
 
372
        flex_int32_t yy_verify;
 
373
        flex_int32_t yy_nxt;
 
374
        };
 
375
static yyconst flex_int16_t yy_accept[477] =
 
376
    {   0,
 
377
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
378
        0,    0,   26,   25,   25,   25,    2,   25,   25,    6,
 
379
       25,   25,   24,   25,   25,   25,   25,   25,   25,   25,
 
380
       25,    9,   25,   25,   16,   25,    0,    0,    2,    0,
 
381
        0,    6,    0,    0,   24,    0,    0,    0,    0,    0,
 
382
        0,    0,    0,    0,    0,    9,    0,    0,   16,    0,
 
383
        0,    1,    0,    1,    0,    0,    0,    0,    0,    0,
 
384
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
385
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
386
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
387
 
 
388
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
389
        0,    0,    0,    0,    0,    0,    0,   23,    0,    0,
 
390
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
391
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
392
        0,    0,    0,    0,    0,    0,    0,    0,    5,    0,
 
393
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
394
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
395
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
396
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
397
        0,    0,    0,    0,    0,    0,    0,    0,    0,   13,
 
398
 
 
399
        0,    0,    6,    0,    0,    0,    0,    0,    0,    0,
 
400
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
401
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
402
        0,    0,    0,    0,    0,    0,   12,    0,    0,    0,
 
403
        0,    0,    0,    0,    0,   10,    0,    0,   12,    0,
 
404
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
405
        0,    0,    0,    0,    0,   15,    0,    0,    0,    0,
 
406
        0,    0,    0,    0,    0,    0,   24,    0,   22,    0,
 
407
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
408
        0,    0,    0,    0,    0,    0,    0,   11,    0,   17,
 
409
 
 
410
        0,    0,    0,    0,    8,    0,    0,    0,    3,    0,
 
411
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
412
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
413
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
414
        0,    0,    0,   14,    0,    0,    0,    0,    0,   14,
 
415
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
416
        0,    0,    0,    0,    0,    0,    0,    0,   20,    0,
 
417
        0,    0,    0,    0,    0,    4,    0,    0,    0,    0,
 
418
        0,    0,    0,    0,    0,    0,    0,    0,   19,    0,
 
419
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
420
 
 
421
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
422
        0,    0,    0,    0,    0,    0,    0,    0,    0,   21,
 
423
        0,    0,    0,    0,    0,    7,    0,    0,    0,    0,
 
424
        0,   24,    0,    0,    0,    0,    0,    0,    0,    0,
 
425
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
426
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
427
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 
428
        0,    0,    0,    0,   18,    0
 
429
    } ;
 
430
 
 
431
static yyconst flex_int32_t yy_ec[256] =
 
432
    {   0,
 
433
        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
 
434
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
435
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
436
        1,    3,    4,    1,    1,    1,    5,    1,    1,    1,
 
437
        1,    1,    1,    1,    1,    1,    6,    1,    7,    1,
 
438
        1,    1,    8,    1,    9,    1,   10,   11,    1,    1,
 
439
        1,    1,    1,   12,   13,   14,   15,   16,   17,   18,
 
440
       19,    1,    1,    1,    1,    1,    1,   20,   21,   22,
 
441
        1,   23,   24,   25,    1,   26,   27,    1,    1,    1,
 
442
        1,    1,    1,    1,   28,    1,   29,   30,   31,   32,
 
443
 
 
444
       33,   34,   35,    1,   36,    1,    1,   37,   38,   39,
 
445
       40,   41,    1,   42,   43,   44,   45,   46,    1,   47,
 
446
        1,   48,    1,    1,    1,    1,    1,    1,    1,    1,
 
447
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
448
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
449
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
450
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
451
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
452
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
453
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
454
 
 
455
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
456
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
457
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
458
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
459
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
460
        1,    1,    1,    1,    1
 
461
    } ;
 
462
 
 
463
static yyconst flex_int32_t yy_meta[49] =
 
464
    {   0,
 
465
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
466
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
467
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
468
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
 
469
        1,    1,    1,    1,    1,    1,    1,    1
 
470
    } ;
 
471
 
 
472
static yyconst flex_int16_t yy_base[516] =
 
473
    {   0,
 
474
        0,    0,  809,    0,    1,    2,    6,   27,    8,   11,
 
475
       12,   13,  813,  815,  808,  809,  815,   18,  808,  815,
 
476
       29,  807,  815,   33,   35,    7,   14,   21,   23,   48,
 
477
      806,  815,   19,  805,  815,   54,  804,  803,  815,  802,
 
478
      801,  815,   49,  800,  815,   53,   40,   25,   34,   41,
 
479
       59,   60,   62,   66,  799,  815,   67,  798,  815,   71,
 
480
      797,  815,  796,  815,   73,   74,   75,   76,   81,   77,
 
481
       82,   78,   84,   85,   91,   87,   88,   89,   92,   93,
 
482
       94,   98,  102,  103,  104,  105,  106,  108,  114,  116,
 
483
      121,  125,  134,  117,  122,  126,  128,  132,  137,  141,
 
484
 
 
485
      795,  142,  143,  146,  151,  152,  149,  158,  153,  154,
 
486
      159,  167,  160,  161,  164,  162,  794,  815,  166,  174,
 
487
      179,  171,  180,  169,  186,  184,  190,  189,  197,  200,
 
488
      201,  793,  204,  206,  205,  207,  209,  202,  212,  217,
 
489
      214,  215,  216,  218,  219,  220,  221,  792,  815,  228,
 
490
      229,  232,  237,  233,  238,  240,  242,  244,  245,  246,
 
491
      249,  251,  255,  257,  258,  259,  262,  265,  260,  266,
 
492
      268,  281,  282,  269,  270,  284,  272,  280,  288,  291,
 
493
      292,  791,  293,  790,  301,  295,  294,  300,  302,  304,
 
494
      306,  310,  312,  315,  317,  319,  320,  321,  789,  815,
 
495
 
 
496
      323,  788,  769,  325,  322,  324,  326,  327,  334,  335,
 
497
      339,  344,  340,  342,  343,  345,  347,  351,  763,  366,
 
498
      785,  355,  368,  371,  373,  369,  375,  376,  784,  384,
 
499
      783,  381,  386,  762,  385,  781,  815,  389,  388,  392,
 
500
      393,  387,  397,  403,  780,  815,  391,  779,  815,  400,
 
501
      778,  755,  420,  404,  396,  406,  405,  407,  408,  409,
 
502
      776,  775,  410,  411,  774,  815,  754,  413,  430,  412,
 
503
      440,  444,  445,  447,  414,  772,  751,  770,  766,  449,
 
504
      450,  739,  453,  454,  452,  767,  766,  457,  738,  761,
 
505
      763,  460,  720,  462,  463,  467,  761,  815,  760,  815,
 
506
 
 
507
      464,  726,  735,  757,  815,  465,  748,  468,  815,  469,
 
508
      470,  471,  473,  724,  714,  474,  747,  479,  476,  483,
 
509
      484,  730,  724,  485,  749,  487,  490,  493,  491,  725,
 
510
      714,  494,  501,  503,  747,  505,  506,  745,  710,  744,
 
511
      712,  514,  742,  815,  515,  520,  701,  709,  739,  815,
 
512
      705,  526,  524,  531,  706,  696,  701,  530,  535,  533,
 
513
      693,  733,  695,  542,  545,  517,  689,  730,  815,  729,
 
514
      544,  548,  549,  690,  727,  815,  558,  562,  686,  534,
 
515
      546,  694,  553,  563,  724,  568,  565,  723,  719,  569,
 
516
      570,  718,  571,  573,  697,  574,  575,  679,  577,  581,
 
517
 
 
518
      691,  578,  579,  683,  582,  584,  681,  585,  589,  684,
 
519
      591,  586,  674,  592,  593,  713,  580,  595,  712,  815,
 
520
      596,  598,  711,  600,  710,  815,  601,  603,  609,  709,
 
521
      708,  691,  668,  668,  662,  681,  678,  700,  660,  668,
 
522
      657,  655,  658,  655,  663,  693,  692,  671,  663,  656,
 
523
      657,  665,  662,  684,  644,  652,  641,  639,  642,  639,
 
524
      647,  677,  676,  672,  671,  650,  632,  644,  636,  634,
 
525
      637,  627,  666,  665,  815,  815,  665,  664,  663,  662,
 
526
      661,  660,  659,  658,  657,  656,  655,  654,  653,  652,
 
527
      651,  650,  649,  648,  646,  645,  644,  643,  642,  641,
 
528
 
 
529
      640,  637,  636,  633,  631,  630,  629,  628,  627,  624,
 
530
      619,  617,  611,  603,    0
 
531
    } ;
 
532
 
 
533
static yyconst flex_int16_t yy_def[516] =
 
534
    {   0,
 
535
      477,  477,  477,  478,  479,  479,  480,  480,  481,  481,
 
536
      482,  482,  476,  476,  476,  483,  476,  483,  484,  476,
 
537
      484,  485,  476,  485,  485,  485,  485,  485,  485,  485,
 
538
      486,  476,  486,  487,  476,  487,  488,  483,  476,  489,
 
539
      484,  476,  484,  485,  476,  485,  485,  485,  485,  485,
 
540
      485,  485,  485,  485,  486,  476,  486,  487,  476,  487,
 
541
      488,  476,  489,  476,  484,  484,  484,  485,  485,  485,
 
542
      485,  485,  485,  485,  485,  485,  485,  486,  487,  487,
 
543
      484,  484,  484,  485,  485,  485,  485,  485,  485,  485,
 
544
      485,  485,  485,  486,  487,  487,  484,  484,  484,  485,
 
545
 
 
546
      490,  485,  485,  485,  485,  485,  485,  485,  485,  486,
 
547
      487,  487,  484,  484,  484,  485,  490,  476,  485,  485,
 
548
      485,  485,  485,  485,  485,  485,  486,  487,  487,  487,
 
549
      484,  491,  484,  485,  485,  485,  485,  485,  485,  485,
 
550
      485,  485,  486,  487,  487,  487,  484,  491,  476,  492,
 
551
      485,  485,  485,  485,  485,  485,  485,  485,  485,  485,
 
552
      486,  487,  487,  487,  487,  484,  492,  492,  485,  485,
 
553
      485,  485,  485,  485,  485,  485,  485,  485,  486,  487,
 
554
      487,  493,  487,  494,  492,  485,  485,  485,  485,  485,
 
555
      485,  485,  485,  485,  485,  486,  487,  487,  493,  476,
 
556
 
 
557
      487,  494,  476,  492,  485,  485,  485,  485,  485,  485,
 
558
      485,  485,  485,  485,  486,  487,  487,  487,  476,  492,
 
559
      495,  485,  485,  485,  485,  485,  485,  485,  496,  486,
 
560
      497,  487,  487,  476,  492,  495,  476,  485,  485,  485,
 
561
      485,  485,  485,  485,  496,  476,  486,  497,  476,  487,
 
562
      498,  476,  492,  485,  485,  485,  485,  485,  485,  485,
 
563
      499,  500,  486,  487,  498,  476,  476,  492,  485,  485,
 
564
      485,  485,  485,  485,  485,  499,  476,  500,  476,  486,
 
565
      487,  476,  492,  485,  485,  501,  502,  485,  476,  476,
 
566
      503,  487,  476,  504,  485,  485,  501,  476,  502,  476,
 
567
 
 
568
      485,  476,  476,  503,  476,  487,  476,  504,  476,  504,
 
569
      485,  485,  485,  476,  476,  487,  476,  504,  485,  485,
 
570
      485,  476,  476,  487,  476,  504,  485,  485,  485,  476,
 
571
      476,  487,  476,  504,  505,  485,  485,  476,  476,  506,
 
572
      476,  504,  505,  476,  485,  485,  476,  476,  506,  476,
 
573
      476,  504,  485,  485,  476,  476,  476,  504,  485,  485,
 
574
      476,  507,  476,  504,  485,  485,  476,  507,  476,  508,
 
575
      504,  485,  485,  476,  508,  476,  485,  485,  476,  485,
 
576
      485,  476,  485,  485,  509,  485,  485,  509,  476,  485,
 
577
      485,  476,  485,  485,  476,  485,  485,  476,  485,  485,
 
578
 
 
579
      476,  485,  485,  476,  485,  485,  476,  485,  485,  476,
 
580
      485,  485,  476,  485,  485,  510,  485,  485,  510,  476,
 
581
      485,  485,  511,  485,  511,  476,  485,  485,  485,  512,
 
582
      512,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
583
      476,  476,  476,  476,  476,  513,  513,  476,  476,  476,
 
584
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
585
      476,  514,  514,  476,  476,  476,  476,  476,  476,  476,
 
586
      476,  476,  515,  515,  476,    0,  476,  476,  476,  476,
 
587
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
588
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
589
 
 
590
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
591
      476,  476,  476,  476,  476
 
592
    } ;
 
593
 
 
594
static yyconst flex_int16_t yy_nxt[864] =
 
595
    {   0,
 
596
      474,   17,   20,   20,   18,   21,   21,   23,   45,   32,
 
597
       24,   25,   32,   35,   35,   45,   36,   36,   26,   39,
 
598
       56,   40,   45,   27,   45,   28,   45,   29,   23,   30,
 
599
       42,   24,   25,   43,   45,   45,   45,   46,   50,   26,
 
600
       33,   45,   45,   33,   27,   52,   28,   47,   29,   45,
 
601
       42,   53,   48,   51,   45,   59,   49,   57,   60,   54,
 
602
       45,   45,   72,   45,   71,   65,   68,   45,   56,   69,
 
603
       66,   70,   59,   67,   42,   42,   42,   45,   45,   45,
 
604
       73,   75,   45,   45,   79,   45,   45,   80,   45,   45,
 
605
       56,   94,   45,   59,   59,   42,   76,   74,   78,   42,
 
606
 
 
607
       77,   85,   82,   42,   45,   45,   45,   45,   84,   45,
 
608
       83,   81,   88,   89,   91,   45,   86,   45,   56,   92,
 
609
       87,  101,   45,   59,   95,   97,   45,   59,   90,   42,
 
610
       93,   96,   98,   42,  102,   45,  109,  100,   42,  106,
 
611
      104,  107,   45,   45,   45,   99,  105,   45,  108,  103,
 
612
       45,  113,   45,   45,   45,   56,  111,  112,  110,   45,
 
613
       59,   42,   42,   45,  114,   42,  120,   45,   59,  121,
 
614
       45,  132,   45,  115,  119,   45,  116,  123,  122,  124,
 
615
       45,   45,  139,  125,  129,   45,  127,   45,  141,  130,
 
616
       59,   56,  131,  135,  128,  126,  133,  138,   59,  136,
 
617
 
 
618
      134,   59,   42,   45,  137,   42,   45,   45,   45,  154,
 
619
       45,  155,  140,   45,  150,   45,   45,   56,   45,   59,
 
620
       59,   59,   42,  151,  142,  143,  158,  144,  152,   42,
 
621
       45,  153,  146,   45,   45,  162,  145,  156,   45,   45,
 
622
      163,   45,  168,   45,  147,   45,   45,   45,  178,  160,
 
623
       56,  176,   59,  157,  161,  159,   59,  164,   59,   59,
 
624
       42,   45,  165,   42,  170,  166,   42,   45,  169,   45,
 
625
       45,   45,  171,   45,  175,  172,  168,  177,  174,  168,
 
626
      173,   45,   45,   45,  179,   45,  193,  181,  191,   56,
 
627
      180,  195,   59,   59,   59,   45,   45,  183,  186,  184,
 
628
 
 
629
      182,   45,   42,   45,  185,   45,  188,   45,  187,  189,
 
630
      190,   45,  192,   45,  194,  168,   45,  212,   45,  207,
 
631
       56,   59,   59,   45,   59,   45,   42,   45,   45,  197,
 
632
      210,  196,  221,  206,  198,   45,   45,  201,  205,  168,
 
633
       45,   45,  204,   45,   56,   45,   59,  208,   59,  209,
 
634
      223,  214,   59,  211,  215,  231,   45,  220,  213,  224,
 
635
      217,   48,  226,  216,  218,   49,  225,   42,  222,   45,
 
636
       45,  230,   45,  240,   45,  241,   45,   45,  227,  228,
 
637
      168,  233,   59,  229,  242,   56,   42,   59,   45,   45,
 
638
       45,  232,   56,   45,   45,  239,  238,   45,   45,  168,
 
639
 
 
640
      253,   59,  235,  255,   45,   45,   45,   45,   45,   45,
 
641
       45,   56,   59,   45,   42,   45,  243,  244,  251,  254,
 
642
      247,   42,  250,  256,  258,  283,  263,  168,  260,  261,
 
643
      264,   45,  257,  259,  168,  262,  269,  270,  271,  273,
 
644
      284,   45,  268,  281,  275,   45,   45,  285,   45,  272,
 
645
       56,   59,  274,   45,   42,   45,  295,  280,   45,  288,
 
646
      292,   59,  306,  309,   45,   45,   59,  168,   45,  309,
 
647
      309,   45,   45,  286,   45,   59,  310,   45,  287,  294,
 
648
      309,  291,  310,  310,   45,   45,   59,  286,  309,  301,
 
649
      287,   45,   45,  310,   45,   59,  311,  296,  316,  312,
 
650
 
 
651
      321,  310,  329,  333,  309,  313,   45,   45,  318,  319,
 
652
      328,  336,  320,  324,  327,  309,   45,  310,   45,  334,
 
653
      326,   45,  354,  332,  337,   45,  359,  309,  310,  352,
 
654
      341,  309,   45,  335,   45,   45,   45,  340,  345,  342,
 
655
      310,  365,  364,  309,  310,  309,   45,   45,  358,   45,
 
656
       45,  378,  346,  372,   45,  377,  310,  373,  310,   45,
 
657
      380,  353,  360,   45,   45,  383,   45,  381,  371,   45,
 
658
       45,   45,   45,  396,   45,   45,   45,  366,   45,   45,
 
659
       45,   45,   45,   45,  408,   45,   45,   45,  386,  384,
 
660
       45,  412,   45,   45,   45,  387,   45,   45,  390,   45,
 
661
 
 
662
      424,   45,   45,  463,   45,  399,  391,  394,  397,  403,
 
663
       45,  447,  393,  400,  411,  421,  409,  431,  405,  425,
 
664
      415,  402,  406,  414,  419,  418,  417,  388,  375,  368,
 
665
      349,  343,  427,  308,  423,  429,  304,  299,  422,  430,
 
666
      297,  278,  276,  265,  248,  245,  236,  428,  202,  199,
 
667
      167,  148,  117,   63,   61,   58,   55,   44,   41,   38,
 
668
       34,   31,   22,   19,   16,   14,  475,  475,  473,  472,
 
669
      471,  470,  469,  468,  467,  466,  465,  464,  464,  462,
 
670
      461,  460,  459,  458,  457,  456,  455,  454,  453,  452,
 
671
      451,  450,  449,  448,  448,  446,  445,  444,  443,  442,
 
672
 
 
673
      441,  440,  439,  438,  437,  436,  435,  434,  433,  432,
 
674
      432,  426,  426,  420,  420,  416,  413,  410,  407,  404,
 
675
      401,  398,  395,  392,  389,  389,  385,  382,  376,  379,
 
676
      376,  369,  374,  370,  369,  367,  363,  362,  361,  357,
 
677
      350,  356,  355,  344,  351,  350,  348,  347,  344,  339,
 
678
      338,  333,  331,  330,  325,  323,  322,  317,  305,  315,
 
679
      314,  300,  298,  307,  305,  303,  302,  300,  298,  293,
 
680
      290,  279,  289,  277,  282,  266,  279,  277,  267,  266,
 
681
      249,  246,  237,  252,  249,  246,  237,  234,  219,  203,
 
682
      200,  203,  200,  149,  149,  118,  118,   64,   62,   59,
 
683
 
 
684
       56,   45,   42,   64,   39,   62,   59,   56,   45,   42,
 
685
       39,   37,  476,   15,   13,  476,  476,  476,  476,  476,
 
686
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
687
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
688
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
689
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
690
      476,  476,  476
 
691
    } ;
 
692
 
 
693
static yyconst flex_int16_t yy_chk[864] =
 
694
    {   0,
 
695
      515,    4,    5,    6,    4,    5,    6,    7,   26,    9,
 
696
        7,    7,   10,   11,   12,   27,   11,   12,    7,   18,
 
697
       33,   18,   28,    7,   29,    7,   48,    7,    8,    8,
 
698
       21,    8,    8,   21,   24,   49,   25,   24,   26,    8,
 
699
        9,   47,   50,   10,    8,   28,    8,   25,    8,   30,
 
700
       43,   29,   25,   27,   46,   36,   25,   33,   36,   30,
 
701
       51,   52,   49,   53,   48,   43,   46,   54,   57,   46,
 
702
       43,   47,   60,   43,   65,   66,   67,   68,   70,   72,
 
703
       50,   52,   69,   71,   60,   73,   74,   60,   76,   77,
 
704
       78,   78,   75,   79,   80,   81,   53,   51,   57,   82,
 
705
 
 
706
       54,   69,   66,   83,   84,   85,   86,   87,   68,   88,
 
707
       67,   65,   72,   73,   75,   89,   70,   90,   94,   76,
 
708
       71,   85,   91,   95,   79,   81,   92,   96,   74,   97,
 
709
       77,   80,   82,   98,   86,   93,   93,   84,   99,   90,
 
710
       88,   91,  100,  102,  103,   83,   89,  104,   92,   87,
 
711
      107,   97,  105,  106,  109,  110,   95,   96,   94,  108,
 
712
      111,  113,  114,  116,   98,  115,  103,  119,  112,  104,
 
713
      124,  114,  122,   99,  102,  120,  100,  106,  105,  107,
 
714
      121,  123,  123,  108,  112,  126,  110,  125,  125,  112,
 
715
      128,  127,  113,  119,  111,  109,  115,  122,  129,  120,
 
716
 
 
717
      116,  130,  131,  138,  121,  133,  135,  134,  136,  136,
 
718
      137,  137,  124,  139,  133,  141,  142,  143,  140,  144,
 
719
      145,  146,  147,  134,  126,  127,  140,  128,  134,  150,
 
720
      151,  135,  130,  152,  154,  144,  129,  138,  153,  155,
 
721
      144,  156,  150,  157,  131,  158,  159,  160,  160,  142,
 
722
      161,  158,  162,  139,  143,  141,  163,  145,  164,  165,
 
723
      166,  169,  146,  167,  152,  147,  168,  170,  151,  171,
 
724
      174,  175,  153,  177,  157,  154,  167,  159,  156,  168,
 
725
      155,  178,  172,  173,  161,  176,  176,  163,  174,  179,
 
726
      162,  178,  180,  181,  183,  187,  186,  165,  169,  166,
 
727
 
 
728
      164,  188,  185,  189,  168,  190,  171,  191,  170,  172,
 
729
      173,  192,  175,  193,  177,  185,  194,  193,  195,  188,
 
730
      196,  197,  198,  205,  201,  206,  204,  207,  208,  180,
 
731
      191,  179,  205,  187,  181,  209,  210,  183,  186,  204,
 
732
      211,  213,  185,  214,  215,  212,  216,  189,  217,  190,
 
733
      207,  195,  218,  192,  196,  216,  222,  204,  194,  208,
 
734
      198,  212,  210,  197,  201,  212,  209,  220,  206,  223,
 
735
      226,  215,  224,  224,  225,  225,  227,  228,  211,  213,
 
736
      220,  218,  232,  214,  226,  230,  235,  233,  242,  239,
 
737
      238,  217,  247,  240,  241,  223,  222,  255,  243,  235,
 
738
 
 
739
      235,  250,  220,  239,  244,  254,  257,  256,  258,  259,
 
740
      260,  263,  264,  270,  268,  275,  227,  228,  233,  238,
 
741
      230,  253,  232,  240,  241,  268,  247,  268,  242,  243,
 
742
      250,  269,  240,  241,  253,  244,  254,  255,  256,  258,
 
743
      269,  271,  253,  264,  260,  272,  273,  270,  274,  257,
 
744
      280,  281,  259,  285,  283,  284,  284,  263,  288,  275,
 
745
      281,  292,  292,  294,  295,  301,  306,  283,  296,  308,
 
746
      310,  311,  312,  271,  313,  316,  294,  319,  273,  283,
 
747
      318,  280,  308,  310,  320,  321,  324,  272,  326,  288,
 
748
      274,  327,  329,  318,  328,  332,  295,  285,  306,  296,
 
749
 
 
750
      313,  326,  321,  333,  334,  301,  336,  337,  310,  311,
 
751
      320,  328,  312,  316,  319,  342,  345,  334,  366,  326,
 
752
      318,  346,  346,  324,  329,  353,  353,  352,  342,  342,
 
753
      333,  358,  354,  327,  360,  380,  359,  332,  336,  334,
 
754
      352,  359,  358,  364,  358,  371,  365,  381,  352,  372,
 
755
      373,  373,  337,  365,  383,  372,  364,  366,  371,  377,
 
756
      377,  345,  354,  378,  384,  380,  387,  378,  364,  386,
 
757
      390,  391,  393,  393,  394,  396,  397,  360,  399,  402,
 
758
      403,  417,  400,  405,  405,  406,  408,  412,  383,  381,
 
759
      409,  409,  411,  414,  415,  384,  418,  421,  386,  422,
 
760
 
 
761
      422,  424,  427,  514,  428,  396,  387,  391,  394,  400,
 
762
      429,  513,  390,  397,  408,  417,  406,  512,  402,  511,
 
763
      412,  399,  403,  411,  510,  415,  414,  509,  508,  507,
 
764
      506,  505,  424,  504,  421,  428,  503,  502,  418,  429,
 
765
      501,  500,  499,  498,  497,  496,  495,  427,  494,  493,
 
766
      492,  491,  490,  489,  488,  487,  486,  485,  484,  483,
 
767
      482,  481,  480,  479,  478,  477,  474,  473,  472,  471,
 
768
      470,  469,  468,  467,  466,  465,  464,  463,  462,  461,
 
769
      460,  459,  458,  457,  456,  455,  454,  453,  452,  451,
 
770
      450,  449,  448,  447,  446,  445,  444,  443,  442,  441,
 
771
 
 
772
      440,  439,  438,  437,  436,  435,  434,  433,  432,  431,
 
773
      430,  425,  423,  419,  416,  413,  410,  407,  404,  401,
 
774
      398,  395,  392,  389,  388,  385,  382,  379,  375,  374,
 
775
      370,  368,  367,  363,  362,  361,  357,  356,  355,  351,
 
776
      349,  348,  347,  343,  341,  340,  339,  338,  335,  331,
 
777
      330,  325,  323,  322,  317,  315,  314,  307,  304,  303,
 
778
      302,  299,  297,  293,  291,  290,  289,  287,  286,  282,
 
779
      279,  278,  277,  276,  267,  265,  262,  261,  252,  251,
 
780
      248,  245,  236,  234,  231,  229,  221,  219,  203,  202,
 
781
      199,  184,  182,  148,  132,  117,  101,   63,   61,   58,
 
782
 
 
783
       55,   44,   41,   40,   38,   37,   34,   31,   22,   19,
 
784
       16,   15,   13,    3,  476,  476,  476,  476,  476,  476,
 
785
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
786
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
787
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
788
      476,  476,  476,  476,  476,  476,  476,  476,  476,  476,
 
789
      476,  476,  476
 
790
    } ;
 
791
 
 
792
static yy_state_type yy_last_accepting_state;
 
793
static char *yy_last_accepting_cpos;
 
794
 
 
795
extern int yy_flex_debug;
 
796
int yy_flex_debug = 0;
 
797
 
 
798
/* The intent behind this definition is that it'll catch
 
799
 * any uses of REJECT which flex missed.
 
800
 */
 
801
#define REJECT reject_used_but_not_detected
 
802
#define yymore() yymore_used_but_not_detected
 
803
#define YY_MORE_ADJ 0
 
804
#define YY_RESTORE_YY_MORE_OFFSET
 
805
char *yytext;
 
806
#line 1 "fixnt.l"
 
807
#line 3 "fixnt.l"
 
808
  /* Time-stamp: "99/06/29 14:48:25 bauer" */
 
809
 
 
810
  /* Filter for Windows NT 4.0 postscript printer driver. Enables
 
811
   * the use of psnup from Angus Duggan's psutils package
 
812
   * ( http://www.dcs.ed.ac.uk/home/ajcd/psutils/ )
 
813
   * Copyright: GNU General Public License (GPL)
 
814
   * Authors:
 
815
   *         Holger Bauer 1998, 1999    bauer@itsm.uni-stuttgart.de
 
816
   *         Michael Rath 1998, 1999    rath@itsm.uni-stuttgart.de
 
817
   *         Akim Demaille      1999    demaille@inf.enst.fr
 
818
   * Version: 0.1c
 
819
   * Release Date: 1999/02/04
 
820
   *
 
821
   * Compilation:
 
822
   *
 
823
   * flex fixnt.l
 
824
   * cc -O -o fixnt lex.yy.c
 
825
   *
 
826
   * Usage:
 
827
   * csh-prompt> cat BAD_NT_Postscript_FILE.ps | fixnt | psnup -4 | gs -
 
828
   * or:
 
829
   * csh-prompt> cat BAD_NT_Postscript_FILE.ps | fixnt | psnup -4 >GOOD.ps
 
830
   *
 
831
   * Windows NT 3.5 users may be happy with:
 
832
   * csh-prompt> cat BAD_NT_Postscript_FILE.ps | \
 
833
   *             sed 's/NTPSOct94/NTPSOct95/g' | fixnt | psnup -4 >GOOD.ps
 
834
   *
 
835
   * TODO-List:
 
836
   * - check for NTPSOct94 (in the meantime use the sed command above)
 
837
   *
 
838
   *
 
839
   * BUG-Reports: to Authors (above) (please, no 20MB postscript files !!!!!!)
 
840
   * Patches (welcome) to code maintainer:   bauer@itsm.uni-stuttgart.de
 
841
   *
 
842
   */
 
843
 
 
844
 
 
845
#ifdef HAVE_CONFIG_H
 
846
# include "config.h"
 
847
# include <stdio.h>
 
848
# if defined STDC_HEADERS || defined _LIBC || defined HAVE_STDLIB_H
 
849
#  include <stdlib.h>
 
850
# endif
 
851
# if HAVE_SYS_TYPES_H
 
852
#  include <sys/types.h>
 
853
# endif
 
854
# if HAVE_UNISTD_H
 
855
#  include <unistd.h>
 
856
# endif
 
857
#else /* !HAVE_CONFIG_H */
 
858
# include <stdio.h>
 
859
# ifdef _WIN32
 
860
#  include <stdlib.h>
 
861
#  include <process.h>
 
862
#  include <wtypes.h>
 
863
#  include <winbase.h>
 
864
# else /* !_WIN32 */
 
865
#  include <unistd.h>
 
866
# endif
 
867
# include <sys/types.h>
 
868
char *getenv ();
 
869
#endif /* !HAVE_CONFIG_H */
 
870
 
 
871
/* Support of prototyping when possible */
 
872
#ifndef PARAMS
 
873
#  if PROTOTYPES
 
874
#    define PARAMS(protos) protos
 
875
#  else /* no PROTOTYPES */
 
876
#    define PARAMS(protos) ()
 
877
#  endif /* no PROTOTYPES */
 
878
#endif
 
879
 
 
880
/* Do not allow redefinition of malloc and realloc. */
 
881
#undef malloc
 
882
#undef realloc
 
883
 
 
884
#if defined (YYLMAX)
 
885
# undef YYLMAX
 
886
# define YYLMAX 1024
 
887
#endif
 
888
 
 
889
void reassemble PARAMS ((FILE*,FILE*,FILE*,char*,char*,char*));
 
890
static int first_time = 1;
 
891
FILE *font;
 
892
FILE *adobe;
 
893
FILE *body;
 
894
int ifpagesv   = 0;
 
895
int ifcorel    = 0;
 
896
int ifendsetup = 0;
 
897
int pid;
 
898
char  fontfname[255];
 
899
char adobefname[255];
 
900
char  bodyfname[255];
 
901
#ifdef _WIN32
 
902
char tmpdir[_MAX_PATH];
 
903
#else
 
904
const char *tmpdir;
 
905
#endif
 
906
 
 
907
#line 908 "fixnt.c"
 
908
 
 
909
#define INITIAL 0
 
910
#define DUMMY 1
 
911
#define NORMAL 2
 
912
#define BODY 3
 
913
#define ADOBE 4
 
914
#define FONT 5
 
915
 
 
916
#ifndef YY_NO_UNISTD_H
 
917
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 
918
 * down here because we want the user's section 1 to have been scanned first.
 
919
 * The user has a chance to override it with an option.
 
920
 */
 
921
#include <unistd.h>
 
922
#endif
 
923
 
 
924
#ifndef YY_EXTRA_TYPE
 
925
#define YY_EXTRA_TYPE void *
 
926
#endif
 
927
 
 
928
static int yy_init_globals (void );
 
929
 
 
930
/* Macros after this point can all be overridden by user definitions in
 
931
 * section 1.
 
932
 */
 
933
 
 
934
#ifndef YY_SKIP_YYWRAP
 
935
#ifdef __cplusplus
 
936
extern "C" int yywrap (void );
 
937
#else
 
938
extern int yywrap (void );
 
939
#endif
 
940
#endif
 
941
 
 
942
    static void yyunput (int c,char *buf_ptr  );
 
943
    
 
944
#ifndef yytext_ptr
 
945
static void yy_flex_strncpy (char *,yyconst char *,int );
 
946
#endif
 
947
 
 
948
#ifdef YY_NEED_STRLEN
 
949
static int yy_flex_strlen (yyconst char * );
 
950
#endif
 
951
 
 
952
#ifndef YY_NO_INPUT
 
953
 
 
954
#ifdef __cplusplus
 
955
static int yyinput (void );
 
956
#else
 
957
static int input (void );
 
958
#endif
 
959
 
 
960
#endif
 
961
 
 
962
/* Amount of stuff to slurp up with each read. */
 
963
#ifndef YY_READ_BUF_SIZE
 
964
#define YY_READ_BUF_SIZE 8192
 
965
#endif
 
966
 
 
967
/* Copy whatever the last rule matched to the standard output. */
 
968
#ifndef ECHO
 
969
/* This used to be an fputs(), but since the string might contain NUL's,
 
970
 * we now use fwrite().
 
971
 */
 
972
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
 
973
#endif
 
974
 
 
975
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 
976
 * is returned in "result".
 
977
 */
 
978
#ifndef YY_INPUT
 
979
#define YY_INPUT(buf,result,max_size) \
 
980
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 
981
                { \
 
982
                int c = '*'; \
 
983
                size_t n; \
 
984
                for ( n = 0; n < max_size && \
 
985
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
 
986
                        buf[n] = (char) c; \
 
987
                if ( c == '\n' ) \
 
988
                        buf[n++] = (char) c; \
 
989
                if ( c == EOF && ferror( yyin ) ) \
 
990
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
 
991
                result = n; \
 
992
                } \
 
993
        else \
 
994
                { \
 
995
                errno=0; \
 
996
                while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
 
997
                        { \
 
998
                        if( errno != EINTR) \
 
999
                                { \
 
1000
                                YY_FATAL_ERROR( "input in flex scanner failed" ); \
 
1001
                                break; \
 
1002
                                } \
 
1003
                        errno=0; \
 
1004
                        clearerr(yyin); \
 
1005
                        } \
 
1006
                }\
 
1007
\
 
1008
 
 
1009
#endif
 
1010
 
 
1011
/* No semi-colon after return; correct usage is to write "yyterminate();" -
 
1012
 * we don't want an extra ';' after the "return" because that will cause
 
1013
 * some compilers to complain about unreachable statements.
 
1014
 */
 
1015
#ifndef yyterminate
 
1016
#define yyterminate() return YY_NULL
 
1017
#endif
 
1018
 
 
1019
/* Number of entries by which start-condition stack grows. */
 
1020
#ifndef YY_START_STACK_INCR
 
1021
#define YY_START_STACK_INCR 25
 
1022
#endif
 
1023
 
 
1024
/* Report a fatal error. */
 
1025
#ifndef YY_FATAL_ERROR
 
1026
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
 
1027
#endif
 
1028
 
 
1029
/* end tables serialization structures and prototypes */
 
1030
 
 
1031
/* Default declaration of generated scanner - a define so the user can
 
1032
 * easily add parameters.
 
1033
 */
 
1034
#ifndef YY_DECL
 
1035
#define YY_DECL_IS_OURS 1
 
1036
 
 
1037
extern int yylex (void);
 
1038
 
 
1039
#define YY_DECL int yylex (void)
 
1040
#endif /* !YY_DECL */
 
1041
 
 
1042
/* Code executed at the beginning of each rule, after yytext and yyleng
 
1043
 * have been set up.
 
1044
 */
 
1045
#ifndef YY_USER_ACTION
 
1046
#define YY_USER_ACTION
 
1047
#endif
 
1048
 
 
1049
/* Code executed at the end of each rule. */
 
1050
#ifndef YY_BREAK
 
1051
#define YY_BREAK break;
 
1052
#endif
 
1053
 
 
1054
#define YY_RULE_SETUP \
 
1055
        if ( yyleng > 0 ) \
 
1056
                YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
 
1057
                                (yytext[yyleng - 1] == '\n'); \
 
1058
        YY_USER_ACTION
 
1059
 
 
1060
/** The main scanner function which does all the work.
 
1061
 */
 
1062
YY_DECL
 
1063
{
 
1064
        register yy_state_type yy_current_state;
 
1065
        register char *yy_cp, *yy_bp;
 
1066
        register int yy_act;
 
1067
    
 
1068
#line 105 "fixnt.l"
 
1069
 
 
1070
 
 
1071
 
 
1072
  if(first_time){
 
1073
    BEGIN DUMMY;
 
1074
    first_time = 0;
 
1075
  }
 
1076
 
 
1077
 
 
1078
#line 1079 "fixnt.c"
 
1079
 
 
1080
        if ( !(yy_init) )
 
1081
                {
 
1082
                (yy_init) = 1;
 
1083
 
 
1084
#ifdef YY_USER_INIT
 
1085
                YY_USER_INIT;
 
1086
#endif
 
1087
 
 
1088
                if ( ! (yy_start) )
 
1089
                        (yy_start) = 1; /* first start state */
 
1090
 
 
1091
                if ( ! yyin )
 
1092
                        yyin = stdin;
 
1093
 
 
1094
                if ( ! yyout )
 
1095
                        yyout = stdout;
 
1096
 
 
1097
                if ( ! YY_CURRENT_BUFFER ) {
 
1098
                        yyensure_buffer_stack ();
 
1099
                        YY_CURRENT_BUFFER_LVALUE =
 
1100
                                yy_create_buffer(yyin,YY_BUF_SIZE );
 
1101
                }
 
1102
 
 
1103
                yy_load_buffer_state( );
 
1104
                }
 
1105
 
 
1106
        while ( 1 )             /* loops until end-of-file is reached */
 
1107
                {
 
1108
                yy_cp = (yy_c_buf_p);
 
1109
 
 
1110
                /* Support of yytext. */
 
1111
                *yy_cp = (yy_hold_char);
 
1112
 
 
1113
                /* yy_bp points to the position in yy_ch_buf of the start of
 
1114
                 * the current run.
 
1115
                 */
 
1116
                yy_bp = yy_cp;
 
1117
 
 
1118
                yy_current_state = (yy_start);
 
1119
                yy_current_state += YY_AT_BOL();
 
1120
yy_match:
 
1121
                do
 
1122
                        {
 
1123
                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
 
1124
                        if ( yy_accept[yy_current_state] )
 
1125
                                {
 
1126
                                (yy_last_accepting_state) = yy_current_state;
 
1127
                                (yy_last_accepting_cpos) = yy_cp;
 
1128
                                }
 
1129
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 
1130
                                {
 
1131
                                yy_current_state = (int) yy_def[yy_current_state];
 
1132
                                if ( yy_current_state >= 477 )
 
1133
                                        yy_c = yy_meta[(unsigned int) yy_c];
 
1134
                                }
 
1135
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 
1136
                        ++yy_cp;
 
1137
                        }
 
1138
                while ( yy_base[yy_current_state] != 815 );
 
1139
 
 
1140
yy_find_action:
 
1141
                yy_act = yy_accept[yy_current_state];
 
1142
                if ( yy_act == 0 )
 
1143
                        { /* have to back up */
 
1144
                        yy_cp = (yy_last_accepting_cpos);
 
1145
                        yy_current_state = (yy_last_accepting_state);
 
1146
                        yy_act = yy_accept[yy_current_state];
 
1147
                        }
 
1148
 
 
1149
                YY_DO_BEFORE_ACTION;
 
1150
 
 
1151
do_action:      /* This label is used only to access EOF actions. */
 
1152
 
 
1153
                switch ( yy_act )
 
1154
        { /* beginning of action switch */
 
1155
                        case 0: /* must back up */
 
1156
                        /* undo the effects of YY_DO_BEFORE_ACTION */
 
1157
                        *yy_cp = (yy_hold_char);
 
1158
                        yy_cp = (yy_last_accepting_cpos);
 
1159
                        yy_current_state = (yy_last_accepting_state);
 
1160
                        goto yy_find_action;
 
1161
 
 
1162
case 1:
 
1163
/* rule 1 can match eol */
 
1164
YY_RULE_SETUP
 
1165
#line 114 "fixnt.l"
 
1166
{ /* regular Postscript starts here ... */
 
1167
      ECHO;
 
1168
      BEGIN NORMAL;
 
1169
}
 
1170
        YY_BREAK
 
1171
case 2:
 
1172
/* rule 2 can match eol */
 
1173
YY_RULE_SETUP
 
1174
#line 119 "fixnt.l"
 
1175
{ /* nothing to do */
 
1176
}
 
1177
        YY_BREAK
 
1178
case 3:
 
1179
/* rule 3 can match eol */
 
1180
YY_RULE_SETUP
 
1181
#line 122 "fixnt.l"
 
1182
{ /* Corel Draw modus recognized */
 
1183
  ifcorel = 1;
 
1184
  ECHO;
 
1185
}
 
1186
        YY_BREAK
 
1187
case 4:
 
1188
/* rule 4 can match eol */
 
1189
YY_RULE_SETUP
 
1190
#line 127 "fixnt.l"
 
1191
{ /* suppress EndSetup */
 
1192
  fprintf(yyout,"NTPSOct95 begin\n");
 
1193
  ifendsetup = 1;
 
1194
}
 
1195
        YY_BREAK
 
1196
case 5:
 
1197
/* rule 5 can match eol */
 
1198
YY_RULE_SETUP
 
1199
#line 132 "fixnt.l"
 
1200
{ /* read up to first page and just output everyting */
 
1201
  sprintf(bodyfname, "%s/fixnt_Body_%d", tmpdir, pid);
 
1202
  body = fopen(bodyfname,"w+");
 
1203
  fprintf(body,"%s",yytext);
 
1204
  BEGIN BODY;
 
1205
}
 
1206
        YY_BREAK
 
1207
case 6:
 
1208
/* rule 6 can match eol */
 
1209
YY_RULE_SETUP
 
1210
#line 139 "fixnt.l"
 
1211
{    /* o.k. */
 
1212
                 fprintf(yyout,"%s",yytext);
 
1213
}
 
1214
        YY_BREAK
 
1215
case 7:
 
1216
/* rule 7 can match eol */
 
1217
YY_RULE_SETUP
 
1218
#line 143 "fixnt.l"
 
1219
{ /* Adobe Stuff */
 
1220
  sprintf(adobefname, "%s/fixnt_Adobe_%d", tmpdir, pid);
 
1221
  adobe = fopen(adobefname,"w+");
 
1222
  fprintf(adobe,"%s",yytext);
 
1223
  BEGIN ADOBE;
 
1224
}
 
1225
        YY_BREAK
 
1226
case 8:
 
1227
/* rule 8 can match eol */
 
1228
YY_RULE_SETUP
 
1229
#line 150 "fixnt.l"
 
1230
{ /* End of Adobe definition stuff */
 
1231
  fprintf(adobe,"%s",yytext);
 
1232
  BEGIN BODY;
 
1233
}
 
1234
        YY_BREAK
 
1235
case 9:
 
1236
/* rule 9 can match eol */
 
1237
YY_RULE_SETUP
 
1238
#line 155 "fixnt.l"
 
1239
{ /* print just everything ... */
 
1240
  fprintf(adobe,"%s",yytext);
 
1241
}
 
1242
        YY_BREAK
 
1243
case 10:
 
1244
/* rule 10 can match eol */
 
1245
YY_RULE_SETUP
 
1246
#line 160 "fixnt.l"
 
1247
{ ;
 
1248
  /* remove showpage definition of CorelDraw defintions */
 
1249
  if( ifcorel == 1 ){
 
1250
    fprintf(body," @gs @gr\n"); /* Corel draw defines spg as showpage */
 
1251
  } else {
 
1252
    fprintf(body,"%s",yytext);  /* Somebody else defined spg, leave it in */
 
1253
  }
 
1254
}
 
1255
        YY_BREAK
 
1256
case 11:
 
1257
/* rule 11 can match eol */
 
1258
YY_RULE_SETUP
 
1259
#line 169 "fixnt.l"
 
1260
{ ;
 
1261
  /* font definitions from here on  */
 
1262
  sprintf(fontfname, "%s/fixnt_Font_%d", tmpdir, pid);
 
1263
  font = fopen(fontfname,"w+");
 
1264
  fprintf(font,"%s",yytext);
 
1265
  BEGIN FONT;
 
1266
}
 
1267
        YY_BREAK
 
1268
case 12:
 
1269
/* rule 12 can match eol */
 
1270
YY_RULE_SETUP
 
1271
#line 177 "fixnt.l"
 
1272
{ /* Font definitions go to FILE* font */
 
1273
  fprintf(font,"%s",yytext);
 
1274
  BEGIN FONT;
 
1275
}
 
1276
        YY_BREAK
 
1277
case 13:
 
1278
/* rule 13 can match eol */
 
1279
YY_RULE_SETUP
 
1280
#line 182 "fixnt.l"
 
1281
{ /* End of Font Definition */
 
1282
  fprintf(font,"%s",yytext);
 
1283
  BEGIN BODY;
 
1284
}
 
1285
        YY_BREAK
 
1286
case 14:
 
1287
/* rule 14 can match eol */
 
1288
YY_RULE_SETUP
 
1289
#line 187 "fixnt.l"
 
1290
{ ;
 
1291
/* NT 3.5 Postscript Files have different FontDefinitions */
 
1292
 fprintf(font,"%s",yytext);
 
1293
 BEGIN FONT;
 
1294
}
 
1295
        YY_BREAK
 
1296
case 15:
 
1297
/* rule 15 can match eol */
 
1298
YY_RULE_SETUP
 
1299
#line 193 "fixnt.l"
 
1300
{ ;
 
1301
/* NT 3.5 Postscript Files have different FontDefinitions */
 
1302
 fprintf(font,"%s",yytext);
 
1303
 BEGIN BODY;
 
1304
}
 
1305
        YY_BREAK
 
1306
case 16:
 
1307
/* rule 16 can match eol */
 
1308
YY_RULE_SETUP
 
1309
#line 199 "fixnt.l"
 
1310
{ /* goes all to FILE *font ... */
 
1311
  fprintf(font,"%s",yytext);
 
1312
}
 
1313
        YY_BREAK
 
1314
case 17:
 
1315
/* rule 17 can match eol */
 
1316
YY_RULE_SETUP
 
1317
#line 203 "fixnt.l"
 
1318
{ ;
 
1319
  ifpagesv = 1;
 
1320
}
 
1321
        YY_BREAK
 
1322
case 18:
 
1323
/* rule 18 can match eol */
 
1324
YY_RULE_SETUP
 
1325
#line 207 "fixnt.l"
 
1326
{
 
1327
  fprintf(body,"%%%%Trailer\nAdobe_WinNT_Driver_Gfx dup /terminate get exec\nPageSV restore\nFontSV restore\n");
 
1328
}
 
1329
        YY_BREAK
 
1330
case 19:
 
1331
/* rule 19 can match eol */
 
1332
YY_RULE_SETUP
 
1333
#line 211 "fixnt.l"
 
1334
{ ;
 
1335
  /* switch FontSV/PageSV */
 
1336
  fprintf(body,"PageSV restore\nFontSV restore\n");
 
1337
}
 
1338
        YY_BREAK
 
1339
case 20:
 
1340
/* rule 20 can match eol */
 
1341
YY_RULE_SETUP
 
1342
#line 216 "fixnt.l"
 
1343
{ ;
 
1344
/* put PageSV after Trailer */
 
1345
  fprintf(body,"%%%%Trailer\nPageSV restore\n");
 
1346
}
 
1347
        YY_BREAK
 
1348
case 21:
 
1349
/* rule 21 can match eol */
 
1350
YY_RULE_SETUP
 
1351
#line 222 "fixnt.l"
 
1352
{ ;
 
1353
/* put PageSV/FontSV after Trailer */
 
1354
  fprintf(body,"%%%%Trailer\nPageSV restore\nFontSV restore\n");
 
1355
}
 
1356
        YY_BREAK
 
1357
case 22:
 
1358
/* rule 22 can match eol */
 
1359
YY_RULE_SETUP
 
1360
#line 228 "fixnt.l"
 
1361
{ ;
 
1362
/* do not allow any PageSV's to appear within the actual body */
 
1363
}
 
1364
        YY_BREAK
 
1365
case 23:
 
1366
/* rule 23 can match eol */
 
1367
YY_RULE_SETUP
 
1368
#line 233 "fixnt.l"
 
1369
{ ;
 
1370
/* What to do at the end of the file (either recognized by %%EOF or
 
1371
   reg. end of file */
 
1372
 fprintf(body,"%s",yytext);
 
1373
 return 0;
 
1374
}
 
1375
        YY_BREAK
 
1376
case YY_STATE_EOF(BODY):
 
1377
#line 240 "fixnt.l"
 
1378
{ ;
 
1379
/* This section is obsolete, could be removed ..., assume there is no
 
1380
   string <<EOF>> in a Postscript file ... */
 
1381
 
 
1382
/* Only flex knows about the <<EOF>> symbol therefore put the
 
1383
   reassembling process into the main program. Plain lex does return 0
 
1384
   for regular end of file marks. */
 
1385
 return 0;
 
1386
}
 
1387
        YY_BREAK
 
1388
case 24:
 
1389
/* rule 24 can match eol */
 
1390
YY_RULE_SETUP
 
1391
#line 250 "fixnt.l"
 
1392
{ /* put pages in FILE *body */
 
1393
  fprintf(body,"%s",yytext);
 
1394
}
 
1395
        YY_BREAK
 
1396
case 25:
 
1397
YY_RULE_SETUP
 
1398
#line 254 "fixnt.l"
 
1399
ECHO;
 
1400
        YY_BREAK
 
1401
#line 1402 "fixnt.c"
 
1402
case YY_STATE_EOF(INITIAL):
 
1403
case YY_STATE_EOF(DUMMY):
 
1404
case YY_STATE_EOF(NORMAL):
 
1405
case YY_STATE_EOF(ADOBE):
 
1406
case YY_STATE_EOF(FONT):
 
1407
        yyterminate();
 
1408
 
 
1409
        case YY_END_OF_BUFFER:
 
1410
                {
 
1411
                /* Amount of text matched not including the EOB char. */
 
1412
                int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
 
1413
 
 
1414
                /* Undo the effects of YY_DO_BEFORE_ACTION. */
 
1415
                *yy_cp = (yy_hold_char);
 
1416
                YY_RESTORE_YY_MORE_OFFSET
 
1417
 
 
1418
                if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
 
1419
                        {
 
1420
                        /* We're scanning a new file or input source.  It's
 
1421
                         * possible that this happened because the user
 
1422
                         * just pointed yyin at a new source and called
 
1423
                         * yylex().  If so, then we have to assure
 
1424
                         * consistency between YY_CURRENT_BUFFER and our
 
1425
                         * globals.  Here is the right place to do so, because
 
1426
                         * this is the first action (other than possibly a
 
1427
                         * back-up) that will match for the new input source.
 
1428
                         */
 
1429
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 
1430
                        YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
 
1431
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
 
1432
                        }
 
1433
 
 
1434
                /* Note that here we test for yy_c_buf_p "<=" to the position
 
1435
                 * of the first EOB in the buffer, since yy_c_buf_p will
 
1436
                 * already have been incremented past the NUL character
 
1437
                 * (since all states make transitions on EOB to the
 
1438
                 * end-of-buffer state).  Contrast this with the test
 
1439
                 * in input().
 
1440
                 */
 
1441
                if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
 
1442
                        { /* This was really a NUL. */
 
1443
                        yy_state_type yy_next_state;
 
1444
 
 
1445
                        (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
 
1446
 
 
1447
                        yy_current_state = yy_get_previous_state(  );
 
1448
 
 
1449
                        /* Okay, we're now positioned to make the NUL
 
1450
                         * transition.  We couldn't have
 
1451
                         * yy_get_previous_state() go ahead and do it
 
1452
                         * for us because it doesn't know how to deal
 
1453
                         * with the possibility of jamming (and we don't
 
1454
                         * want to build jamming into it because then it
 
1455
                         * will run more slowly).
 
1456
                         */
 
1457
 
 
1458
                        yy_next_state = yy_try_NUL_trans( yy_current_state );
 
1459
 
 
1460
                        yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 
1461
 
 
1462
                        if ( yy_next_state )
 
1463
                                {
 
1464
                                /* Consume the NUL. */
 
1465
                                yy_cp = ++(yy_c_buf_p);
 
1466
                                yy_current_state = yy_next_state;
 
1467
                                goto yy_match;
 
1468
                                }
 
1469
 
 
1470
                        else
 
1471
                                {
 
1472
                                yy_cp = (yy_c_buf_p);
 
1473
                                goto yy_find_action;
 
1474
                                }
 
1475
                        }
 
1476
 
 
1477
                else switch ( yy_get_next_buffer(  ) )
 
1478
                        {
 
1479
                        case EOB_ACT_END_OF_FILE:
 
1480
                                {
 
1481
                                (yy_did_buffer_switch_on_eof) = 0;
 
1482
 
 
1483
                                if ( yywrap( ) )
 
1484
                                        {
 
1485
                                        /* Note: because we've taken care in
 
1486
                                         * yy_get_next_buffer() to have set up
 
1487
                                         * yytext, we can now set up
 
1488
                                         * yy_c_buf_p so that if some total
 
1489
                                         * hoser (like flex itself) wants to
 
1490
                                         * call the scanner after we return the
 
1491
                                         * YY_NULL, it'll still work - another
 
1492
                                         * YY_NULL will get returned.
 
1493
                                         */
 
1494
                                        (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
 
1495
 
 
1496
                                        yy_act = YY_STATE_EOF(YY_START);
 
1497
                                        goto do_action;
 
1498
                                        }
 
1499
 
 
1500
                                else
 
1501
                                        {
 
1502
                                        if ( ! (yy_did_buffer_switch_on_eof) )
 
1503
                                                YY_NEW_FILE;
 
1504
                                        }
 
1505
                                break;
 
1506
                                }
 
1507
 
 
1508
                        case EOB_ACT_CONTINUE_SCAN:
 
1509
                                (yy_c_buf_p) =
 
1510
                                        (yytext_ptr) + yy_amount_of_matched_text;
 
1511
 
 
1512
                                yy_current_state = yy_get_previous_state(  );
 
1513
 
 
1514
                                yy_cp = (yy_c_buf_p);
 
1515
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 
1516
                                goto yy_match;
 
1517
 
 
1518
                        case EOB_ACT_LAST_MATCH:
 
1519
                                (yy_c_buf_p) =
 
1520
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
 
1521
 
 
1522
                                yy_current_state = yy_get_previous_state(  );
 
1523
 
 
1524
                                yy_cp = (yy_c_buf_p);
 
1525
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 
1526
                                goto yy_find_action;
 
1527
                        }
 
1528
                break;
 
1529
                }
 
1530
 
 
1531
        default:
 
1532
                YY_FATAL_ERROR(
 
1533
                        "fatal flex scanner internal error--no action found" );
 
1534
        } /* end of action switch */
 
1535
                } /* end of scanning one token */
 
1536
} /* end of yylex */
 
1537
 
 
1538
/* yy_get_next_buffer - try to read in a new buffer
 
1539
 *
 
1540
 * Returns a code representing an action:
 
1541
 *      EOB_ACT_LAST_MATCH -
 
1542
 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 
1543
 *      EOB_ACT_END_OF_FILE - end of file
 
1544
 */
 
1545
static int yy_get_next_buffer (void)
 
1546
{
 
1547
        register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
 
1548
        register char *source = (yytext_ptr);
 
1549
        register int number_to_move, i;
 
1550
        int ret_val;
 
1551
 
 
1552
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
 
1553
                YY_FATAL_ERROR(
 
1554
                "fatal flex scanner internal error--end of buffer missed" );
 
1555
 
 
1556
        if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
 
1557
                { /* Don't try to fill the buffer, so this is an EOF. */
 
1558
                if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
 
1559
                        {
 
1560
                        /* We matched a single character, the EOB, so
 
1561
                         * treat this as a final EOF.
 
1562
                         */
 
1563
                        return EOB_ACT_END_OF_FILE;
 
1564
                        }
 
1565
 
 
1566
                else
 
1567
                        {
 
1568
                        /* We matched some text prior to the EOB, first
 
1569
                         * process it.
 
1570
                         */
 
1571
                        return EOB_ACT_LAST_MATCH;
 
1572
                        }
 
1573
                }
 
1574
 
 
1575
        /* Try to read more data. */
 
1576
 
 
1577
        /* First move last chars to start of buffer. */
 
1578
        number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 
1579
 
 
1580
        for ( i = 0; i < number_to_move; ++i )
 
1581
                *(dest++) = *(source++);
 
1582
 
 
1583
        if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
 
1584
                /* don't do the read, it's not guaranteed to return an EOF,
 
1585
                 * just force an EOF
 
1586
                 */
 
1587
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
 
1588
 
 
1589
        else
 
1590
                {
 
1591
                        int num_to_read =
 
1592
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
 
1593
 
 
1594
                while ( num_to_read <= 0 )
 
1595
                        { /* Not enough room in the buffer - grow it. */
 
1596
 
 
1597
                        /* just a shorter name for the current buffer */
 
1598
                        YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
 
1599
 
 
1600
                        int yy_c_buf_p_offset =
 
1601
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
 
1602
 
 
1603
                        if ( b->yy_is_our_buffer )
 
1604
                                {
 
1605
                                int new_size = b->yy_buf_size * 2;
 
1606
 
 
1607
                                if ( new_size <= 0 )
 
1608
                                        b->yy_buf_size += b->yy_buf_size / 8;
 
1609
                                else
 
1610
                                        b->yy_buf_size *= 2;
 
1611
 
 
1612
                                b->yy_ch_buf = (char *)
 
1613
                                        /* Include room in for 2 EOB chars. */
 
1614
                                        yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
 
1615
                                }
 
1616
                        else
 
1617
                                /* Can't grow it, we don't own it. */
 
1618
                                b->yy_ch_buf = 0;
 
1619
 
 
1620
                        if ( ! b->yy_ch_buf )
 
1621
                                YY_FATAL_ERROR(
 
1622
                                "fatal error - scanner input buffer overflow" );
 
1623
 
 
1624
                        (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
 
1625
 
 
1626
                        num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
 
1627
                                                number_to_move - 1;
 
1628
 
 
1629
                        }
 
1630
 
 
1631
                if ( num_to_read > YY_READ_BUF_SIZE )
 
1632
                        num_to_read = YY_READ_BUF_SIZE;
 
1633
 
 
1634
                /* Read in more data. */
 
1635
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
 
1636
                        (yy_n_chars), (size_t) num_to_read );
 
1637
 
 
1638
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 
1639
                }
 
1640
 
 
1641
        if ( (yy_n_chars) == 0 )
 
1642
                {
 
1643
                if ( number_to_move == YY_MORE_ADJ )
 
1644
                        {
 
1645
                        ret_val = EOB_ACT_END_OF_FILE;
 
1646
                        yyrestart(yyin  );
 
1647
                        }
 
1648
 
 
1649
                else
 
1650
                        {
 
1651
                        ret_val = EOB_ACT_LAST_MATCH;
 
1652
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
 
1653
                                YY_BUFFER_EOF_PENDING;
 
1654
                        }
 
1655
                }
 
1656
 
 
1657
        else
 
1658
                ret_val = EOB_ACT_CONTINUE_SCAN;
 
1659
 
 
1660
        (yy_n_chars) += number_to_move;
 
1661
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
 
1662
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
 
1663
 
 
1664
        (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
 
1665
 
 
1666
        return ret_val;
 
1667
}
 
1668
 
 
1669
/* yy_get_previous_state - get the state just before the EOB char was reached */
 
1670
 
 
1671
    static yy_state_type yy_get_previous_state (void)
 
1672
{
 
1673
        register yy_state_type yy_current_state;
 
1674
        register char *yy_cp;
 
1675
    
 
1676
        yy_current_state = (yy_start);
 
1677
        yy_current_state += YY_AT_BOL();
 
1678
 
 
1679
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
 
1680
                {
 
1681
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
 
1682
                if ( yy_accept[yy_current_state] )
 
1683
                        {
 
1684
                        (yy_last_accepting_state) = yy_current_state;
 
1685
                        (yy_last_accepting_cpos) = yy_cp;
 
1686
                        }
 
1687
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 
1688
                        {
 
1689
                        yy_current_state = (int) yy_def[yy_current_state];
 
1690
                        if ( yy_current_state >= 477 )
 
1691
                                yy_c = yy_meta[(unsigned int) yy_c];
 
1692
                        }
 
1693
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 
1694
                }
 
1695
 
 
1696
        return yy_current_state;
 
1697
}
 
1698
 
 
1699
/* yy_try_NUL_trans - try to make a transition on the NUL character
 
1700
 *
 
1701
 * synopsis
 
1702
 *      next_state = yy_try_NUL_trans( current_state );
 
1703
 */
 
1704
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 
1705
{
 
1706
        register int yy_is_jam;
 
1707
        register char *yy_cp = (yy_c_buf_p);
 
1708
 
 
1709
        register YY_CHAR yy_c = 1;
 
1710
        if ( yy_accept[yy_current_state] )
 
1711
                {
 
1712
                (yy_last_accepting_state) = yy_current_state;
 
1713
                (yy_last_accepting_cpos) = yy_cp;
 
1714
                }
 
1715
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 
1716
                {
 
1717
                yy_current_state = (int) yy_def[yy_current_state];
 
1718
                if ( yy_current_state >= 477 )
 
1719
                        yy_c = yy_meta[(unsigned int) yy_c];
 
1720
                }
 
1721
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 
1722
        yy_is_jam = (yy_current_state == 476);
 
1723
 
 
1724
        return yy_is_jam ? 0 : yy_current_state;
 
1725
}
 
1726
 
 
1727
    static void yyunput (int c, register char * yy_bp )
 
1728
{
 
1729
        register char *yy_cp;
 
1730
    
 
1731
    yy_cp = (yy_c_buf_p);
 
1732
 
 
1733
        /* undo effects of setting up yytext */
 
1734
        *yy_cp = (yy_hold_char);
 
1735
 
 
1736
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 
1737
                { /* need to shift things up to make room */
 
1738
                /* +2 for EOB chars. */
 
1739
                register int number_to_move = (yy_n_chars) + 2;
 
1740
                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 
1741
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
 
1742
                register char *source =
 
1743
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 
1744
 
 
1745
                while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 
1746
                        *--dest = *--source;
 
1747
 
 
1748
                yy_cp += (int) (dest - source);
 
1749
                yy_bp += (int) (dest - source);
 
1750
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
 
1751
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
 
1752
 
 
1753
                if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 
1754
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
 
1755
                }
 
1756
 
 
1757
        *--yy_cp = (char) c;
 
1758
 
 
1759
        (yytext_ptr) = yy_bp;
 
1760
        (yy_hold_char) = *yy_cp;
 
1761
        (yy_c_buf_p) = yy_cp;
 
1762
}
 
1763
 
 
1764
#ifndef YY_NO_INPUT
 
1765
#ifdef __cplusplus
 
1766
    static int yyinput (void)
 
1767
#else
 
1768
    static int input  (void)
 
1769
#endif
 
1770
 
 
1771
{
 
1772
        int c;
 
1773
    
 
1774
        *(yy_c_buf_p) = (yy_hold_char);
 
1775
 
 
1776
        if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
 
1777
                {
 
1778
                /* yy_c_buf_p now points to the character we want to return.
 
1779
                 * If this occurs *before* the EOB characters, then it's a
 
1780
                 * valid NUL; if not, then we've hit the end of the buffer.
 
1781
                 */
 
1782
                if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
 
1783
                        /* This was really a NUL. */
 
1784
                        *(yy_c_buf_p) = '\0';
 
1785
 
 
1786
                else
 
1787
                        { /* need more input */
 
1788
                        int offset = (yy_c_buf_p) - (yytext_ptr);
 
1789
                        ++(yy_c_buf_p);
 
1790
 
 
1791
                        switch ( yy_get_next_buffer(  ) )
 
1792
                                {
 
1793
                                case EOB_ACT_LAST_MATCH:
 
1794
                                        /* This happens because yy_g_n_b()
 
1795
                                         * sees that we've accumulated a
 
1796
                                         * token and flags that we need to
 
1797
                                         * try matching the token before
 
1798
                                         * proceeding.  But for input(),
 
1799
                                         * there's no matching to consider.
 
1800
                                         * So convert the EOB_ACT_LAST_MATCH
 
1801
                                         * to EOB_ACT_END_OF_FILE.
 
1802
                                         */
 
1803
 
 
1804
                                        /* Reset buffer status. */
 
1805
                                        yyrestart(yyin );
 
1806
 
 
1807
                                        /*FALLTHROUGH*/
 
1808
 
 
1809
                                case EOB_ACT_END_OF_FILE:
 
1810
                                        {
 
1811
                                        if ( yywrap( ) )
 
1812
                                                return EOF;
 
1813
 
 
1814
                                        if ( ! (yy_did_buffer_switch_on_eof) )
 
1815
                                                YY_NEW_FILE;
 
1816
#ifdef __cplusplus
 
1817
                                        return yyinput();
 
1818
#else
 
1819
                                        return input();
 
1820
#endif
 
1821
                                        }
 
1822
 
 
1823
                                case EOB_ACT_CONTINUE_SCAN:
 
1824
                                        (yy_c_buf_p) = (yytext_ptr) + offset;
 
1825
                                        break;
 
1826
                                }
 
1827
                        }
 
1828
                }
 
1829
 
 
1830
        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
 
1831
        *(yy_c_buf_p) = '\0';   /* preserve yytext */
 
1832
        (yy_hold_char) = *++(yy_c_buf_p);
 
1833
 
 
1834
        YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
 
1835
 
 
1836
        return c;
 
1837
}
 
1838
#endif  /* ifndef YY_NO_INPUT */
 
1839
 
 
1840
/** Immediately switch to a different input stream.
 
1841
 * @param input_file A readable stream.
 
1842
 * 
 
1843
 * @note This function does not reset the start condition to @c INITIAL .
 
1844
 */
 
1845
    void yyrestart  (FILE * input_file )
 
1846
{
 
1847
    
 
1848
        if ( ! YY_CURRENT_BUFFER ){
 
1849
        yyensure_buffer_stack ();
 
1850
                YY_CURRENT_BUFFER_LVALUE =
 
1851
            yy_create_buffer(yyin,YY_BUF_SIZE );
 
1852
        }
 
1853
 
 
1854
        yy_init_buffer(YY_CURRENT_BUFFER,input_file );
 
1855
        yy_load_buffer_state( );
 
1856
}
 
1857
 
 
1858
/** Switch to a different input buffer.
 
1859
 * @param new_buffer The new input buffer.
 
1860
 * 
 
1861
 */
 
1862
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 
1863
{
 
1864
    
 
1865
        /* TODO. We should be able to replace this entire function body
 
1866
         * with
 
1867
         *              yypop_buffer_state();
 
1868
         *              yypush_buffer_state(new_buffer);
 
1869
     */
 
1870
        yyensure_buffer_stack ();
 
1871
        if ( YY_CURRENT_BUFFER == new_buffer )
 
1872
                return;
 
1873
 
 
1874
        if ( YY_CURRENT_BUFFER )
 
1875
                {
 
1876
                /* Flush out information for old buffer. */
 
1877
                *(yy_c_buf_p) = (yy_hold_char);
 
1878
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 
1879
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 
1880
                }
 
1881
 
 
1882
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
1883
        yy_load_buffer_state( );
 
1884
 
 
1885
        /* We don't actually know whether we did this switch during
 
1886
         * EOF (yywrap()) processing, but the only time this flag
 
1887
         * is looked at is after yywrap() is called, so it's safe
 
1888
         * to go ahead and always set it.
 
1889
         */
 
1890
        (yy_did_buffer_switch_on_eof) = 1;
 
1891
}
 
1892
 
 
1893
static void yy_load_buffer_state  (void)
 
1894
{
 
1895
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 
1896
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
 
1897
        yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
 
1898
        (yy_hold_char) = *(yy_c_buf_p);
 
1899
}
 
1900
 
 
1901
/** Allocate and initialize an input buffer state.
 
1902
 * @param file A readable stream.
 
1903
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 
1904
 * 
 
1905
 * @return the allocated buffer state.
 
1906
 */
 
1907
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
 
1908
{
 
1909
        YY_BUFFER_STATE b;
 
1910
    
 
1911
        b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
 
1912
        if ( ! b )
 
1913
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
1914
 
 
1915
        b->yy_buf_size = size;
 
1916
 
 
1917
        /* yy_ch_buf has to be 2 characters longer than the size given because
 
1918
         * we need to put in 2 end-of-buffer characters.
 
1919
         */
 
1920
        b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
 
1921
        if ( ! b->yy_ch_buf )
 
1922
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
 
1923
 
 
1924
        b->yy_is_our_buffer = 1;
 
1925
 
 
1926
        yy_init_buffer(b,file );
 
1927
 
 
1928
        return b;
 
1929
}
 
1930
 
 
1931
/** Destroy the buffer.
 
1932
 * @param b a buffer created with yy_create_buffer()
 
1933
 * 
 
1934
 */
 
1935
    void yy_delete_buffer (YY_BUFFER_STATE  b )
 
1936
{
 
1937
    
 
1938
        if ( ! b )
 
1939
                return;
 
1940
 
 
1941
        if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
 
1942
                YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
 
1943
 
 
1944
        if ( b->yy_is_our_buffer )
 
1945
                yyfree((void *) b->yy_ch_buf  );
 
1946
 
 
1947
        yyfree((void *) b  );
 
1948
}
 
1949
 
 
1950
#ifndef __cplusplus
 
1951
extern int isatty (int );
 
1952
#endif /* __cplusplus */
 
1953
    
 
1954
/* Initializes or reinitializes a buffer.
 
1955
 * This function is sometimes called more than once on the same buffer,
 
1956
 * such as during a yyrestart() or at EOF.
 
1957
 */
 
1958
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
 
1959
 
 
1960
{
 
1961
        int oerrno = errno;
 
1962
    
 
1963
        yy_flush_buffer(b );
 
1964
 
 
1965
        b->yy_input_file = file;
 
1966
        b->yy_fill_buffer = 1;
 
1967
 
 
1968
    /* If b is the current buffer, then yy_init_buffer was _probably_
 
1969
     * called from yyrestart() or through yy_get_next_buffer.
 
1970
     * In that case, we don't want to reset the lineno or column.
 
1971
     */
 
1972
    if (b != YY_CURRENT_BUFFER){
 
1973
        b->yy_bs_lineno = 1;
 
1974
        b->yy_bs_column = 0;
 
1975
    }
 
1976
 
 
1977
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
 
1978
    
 
1979
        errno = oerrno;
 
1980
}
 
1981
 
 
1982
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 
1983
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 
1984
 * 
 
1985
 */
 
1986
    void yy_flush_buffer (YY_BUFFER_STATE  b )
 
1987
{
 
1988
        if ( ! b )
 
1989
                return;
 
1990
 
 
1991
        b->yy_n_chars = 0;
 
1992
 
 
1993
        /* We always need two end-of-buffer characters.  The first causes
 
1994
         * a transition to the end-of-buffer state.  The second causes
 
1995
         * a jam in that state.
 
1996
         */
 
1997
        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
 
1998
        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
 
1999
 
 
2000
        b->yy_buf_pos = &b->yy_ch_buf[0];
 
2001
 
 
2002
        b->yy_at_bol = 1;
 
2003
        b->yy_buffer_status = YY_BUFFER_NEW;
 
2004
 
 
2005
        if ( b == YY_CURRENT_BUFFER )
 
2006
                yy_load_buffer_state( );
 
2007
}
 
2008
 
 
2009
/** Pushes the new state onto the stack. The new state becomes
 
2010
 *  the current state. This function will allocate the stack
 
2011
 *  if necessary.
 
2012
 *  @param new_buffer The new state.
 
2013
 *  
 
2014
 */
 
2015
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
 
2016
{
 
2017
        if (new_buffer == NULL)
 
2018
                return;
 
2019
 
 
2020
        yyensure_buffer_stack();
 
2021
 
 
2022
        /* This block is copied from yy_switch_to_buffer. */
 
2023
        if ( YY_CURRENT_BUFFER )
 
2024
                {
 
2025
                /* Flush out information for old buffer. */
 
2026
                *(yy_c_buf_p) = (yy_hold_char);
 
2027
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
 
2028
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
 
2029
                }
 
2030
 
 
2031
        /* Only push if top exists. Otherwise, replace top. */
 
2032
        if (YY_CURRENT_BUFFER)
 
2033
                (yy_buffer_stack_top)++;
 
2034
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
 
2035
 
 
2036
        /* copied from yy_switch_to_buffer. */
 
2037
        yy_load_buffer_state( );
 
2038
        (yy_did_buffer_switch_on_eof) = 1;
 
2039
}
 
2040
 
 
2041
/** Removes and deletes the top of the stack, if present.
 
2042
 *  The next element becomes the new top.
 
2043
 *  
 
2044
 */
 
2045
void yypop_buffer_state (void)
 
2046
{
 
2047
        if (!YY_CURRENT_BUFFER)
 
2048
                return;
 
2049
 
 
2050
        yy_delete_buffer(YY_CURRENT_BUFFER );
 
2051
        YY_CURRENT_BUFFER_LVALUE = NULL;
 
2052
        if ((yy_buffer_stack_top) > 0)
 
2053
                --(yy_buffer_stack_top);
 
2054
 
 
2055
        if (YY_CURRENT_BUFFER) {
 
2056
                yy_load_buffer_state( );
 
2057
                (yy_did_buffer_switch_on_eof) = 1;
 
2058
        }
 
2059
}
 
2060
 
 
2061
/* Allocates the stack if it does not exist.
 
2062
 *  Guarantees space for at least one push.
 
2063
 */
 
2064
static void yyensure_buffer_stack (void)
 
2065
{
 
2066
        int num_to_alloc;
 
2067
    
 
2068
        if (!(yy_buffer_stack)) {
 
2069
 
 
2070
                /* First allocation is just for 2 elements, since we don't know if this
 
2071
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
 
2072
                 * immediate realloc on the next call.
 
2073
         */
 
2074
                num_to_alloc = 1;
 
2075
                (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
 
2076
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
 
2077
                                                                );
 
2078
                
 
2079
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
 
2080
                                
 
2081
                (yy_buffer_stack_max) = num_to_alloc;
 
2082
                (yy_buffer_stack_top) = 0;
 
2083
                return;
 
2084
        }
 
2085
 
 
2086
        if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
2087
 
 
2088
                /* Increase the buffer to prepare for a possible push. */
 
2089
                int grow_size = 8 /* arbitrary grow size */;
 
2090
 
 
2091
                num_to_alloc = (yy_buffer_stack_max) + grow_size;
 
2092
                (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
 
2093
                                                                ((yy_buffer_stack),
 
2094
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
 
2095
                                                                );
 
2096
 
 
2097
                /* zero only the new slots.*/
 
2098
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
 
2099
                (yy_buffer_stack_max) = num_to_alloc;
 
2100
        }
 
2101
}
 
2102
 
 
2103
/** Setup the input buffer state to scan directly from a user-specified character buffer.
 
2104
 * @param base the character buffer
 
2105
 * @param size the size in bytes of the character buffer
 
2106
 * 
 
2107
 * @return the newly allocated buffer state object. 
 
2108
 */
 
2109
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
 
2110
{
 
2111
        YY_BUFFER_STATE b;
 
2112
    
 
2113
        if ( size < 2 ||
 
2114
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
 
2115
             base[size-1] != YY_END_OF_BUFFER_CHAR )
 
2116
                /* They forgot to leave room for the EOB's. */
 
2117
                return 0;
 
2118
 
 
2119
        b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
 
2120
        if ( ! b )
 
2121
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
 
2122
 
 
2123
        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
 
2124
        b->yy_buf_pos = b->yy_ch_buf = base;
 
2125
        b->yy_is_our_buffer = 0;
 
2126
        b->yy_input_file = 0;
 
2127
        b->yy_n_chars = b->yy_buf_size;
 
2128
        b->yy_is_interactive = 0;
 
2129
        b->yy_at_bol = 1;
 
2130
        b->yy_fill_buffer = 0;
 
2131
        b->yy_buffer_status = YY_BUFFER_NEW;
 
2132
 
 
2133
        yy_switch_to_buffer(b  );
 
2134
 
 
2135
        return b;
 
2136
}
 
2137
 
 
2138
/** Setup the input buffer state to scan a string. The next call to yylex() will
 
2139
 * scan from a @e copy of @a str.
 
2140
 * @param yystr a NUL-terminated string to scan
 
2141
 * 
 
2142
 * @return the newly allocated buffer state object.
 
2143
 * @note If you want to scan bytes that may contain NUL values, then use
 
2144
 *       yy_scan_bytes() instead.
 
2145
 */
 
2146
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
 
2147
{
 
2148
    
 
2149
        return yy_scan_bytes(yystr,strlen(yystr) );
 
2150
}
 
2151
 
 
2152
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 
2153
 * scan from a @e copy of @a bytes.
 
2154
 * @param bytes the byte buffer to scan
 
2155
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 
2156
 * 
 
2157
 * @return the newly allocated buffer state object.
 
2158
 */
 
2159
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
 
2160
{
 
2161
        YY_BUFFER_STATE b;
 
2162
        char *buf;
 
2163
        yy_size_t n;
 
2164
        int i;
 
2165
    
 
2166
        /* Get memory for full buffer, including space for trailing EOB's. */
 
2167
        n = _yybytes_len + 2;
 
2168
        buf = (char *) yyalloc(n  );
 
2169
        if ( ! buf )
 
2170
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
 
2171
 
 
2172
        for ( i = 0; i < _yybytes_len; ++i )
 
2173
                buf[i] = yybytes[i];
 
2174
 
 
2175
        buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
 
2176
 
 
2177
        b = yy_scan_buffer(buf,n );
 
2178
        if ( ! b )
 
2179
                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
 
2180
 
 
2181
        /* It's okay to grow etc. this buffer, and we should throw it
 
2182
         * away when we're done.
 
2183
         */
 
2184
        b->yy_is_our_buffer = 1;
 
2185
 
 
2186
        return b;
 
2187
}
 
2188
 
 
2189
#ifndef YY_EXIT_FAILURE
 
2190
#define YY_EXIT_FAILURE 2
 
2191
#endif
 
2192
 
 
2193
static void yy_fatal_error (yyconst char* msg )
 
2194
{
 
2195
        (void) fprintf( stderr, "%s\n", msg );
 
2196
        exit( YY_EXIT_FAILURE );
 
2197
}
 
2198
 
 
2199
/* Redefine yyless() so it works in section 3 code. */
 
2200
 
 
2201
#undef yyless
 
2202
#define yyless(n) \
 
2203
        do \
 
2204
                { \
 
2205
                /* Undo effects of setting up yytext. */ \
 
2206
        int yyless_macro_arg = (n); \
 
2207
        YY_LESS_LINENO(yyless_macro_arg);\
 
2208
                yytext[yyleng] = (yy_hold_char); \
 
2209
                (yy_c_buf_p) = yytext + yyless_macro_arg; \
 
2210
                (yy_hold_char) = *(yy_c_buf_p); \
 
2211
                *(yy_c_buf_p) = '\0'; \
 
2212
                yyleng = yyless_macro_arg; \
 
2213
                } \
 
2214
        while ( 0 )
 
2215
 
 
2216
/* Accessor  methods (get/set functions) to struct members. */
 
2217
 
 
2218
/** Get the current line number.
 
2219
 * 
 
2220
 */
 
2221
int yyget_lineno  (void)
 
2222
{
 
2223
        
 
2224
    return yylineno;
 
2225
}
 
2226
 
 
2227
/** Get the input stream.
 
2228
 * 
 
2229
 */
 
2230
FILE *yyget_in  (void)
 
2231
{
 
2232
        return yyin;
 
2233
}
 
2234
 
 
2235
/** Get the output stream.
 
2236
 * 
 
2237
 */
 
2238
FILE *yyget_out  (void)
 
2239
{
 
2240
        return yyout;
 
2241
}
 
2242
 
 
2243
/** Get the length of the current token.
 
2244
 * 
 
2245
 */
 
2246
int yyget_leng  (void)
 
2247
{
 
2248
        return yyleng;
 
2249
}
 
2250
 
 
2251
/** Get the current token.
 
2252
 * 
 
2253
 */
 
2254
 
 
2255
char *yyget_text  (void)
 
2256
{
 
2257
        return yytext;
 
2258
}
 
2259
 
 
2260
/** Set the current line number.
 
2261
 * @param line_number
 
2262
 * 
 
2263
 */
 
2264
void yyset_lineno (int  line_number )
 
2265
{
 
2266
    
 
2267
    yylineno = line_number;
 
2268
}
 
2269
 
 
2270
/** Set the input stream. This does not discard the current
 
2271
 * input buffer.
 
2272
 * @param in_str A readable stream.
 
2273
 * 
 
2274
 * @see yy_switch_to_buffer
 
2275
 */
 
2276
void yyset_in (FILE *  in_str )
 
2277
{
 
2278
        yyin = in_str ;
 
2279
}
 
2280
 
 
2281
void yyset_out (FILE *  out_str )
 
2282
{
 
2283
        yyout = out_str ;
 
2284
}
 
2285
 
 
2286
int yyget_debug  (void)
 
2287
{
 
2288
        return yy_flex_debug;
 
2289
}
 
2290
 
 
2291
void yyset_debug (int  bdebug )
 
2292
{
 
2293
        yy_flex_debug = bdebug ;
 
2294
}
 
2295
 
 
2296
static int yy_init_globals (void)
 
2297
{
 
2298
        /* Initialization is the same as for the non-reentrant scanner.
 
2299
     * This function is called from yylex_destroy(), so don't allocate here.
 
2300
     */
 
2301
 
 
2302
    (yy_buffer_stack) = 0;
 
2303
    (yy_buffer_stack_top) = 0;
 
2304
    (yy_buffer_stack_max) = 0;
 
2305
    (yy_c_buf_p) = (char *) 0;
 
2306
    (yy_init) = 0;
 
2307
    (yy_start) = 0;
 
2308
 
 
2309
/* Defined in main.c */
 
2310
#ifdef YY_STDINIT
 
2311
    yyin = stdin;
 
2312
    yyout = stdout;
 
2313
#else
 
2314
    yyin = (FILE *) 0;
 
2315
    yyout = (FILE *) 0;
 
2316
#endif
 
2317
 
 
2318
    /* For future reference: Set errno on error, since we are called by
 
2319
     * yylex_init()
 
2320
     */
 
2321
    return 0;
 
2322
}
 
2323
 
 
2324
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
 
2325
int yylex_destroy  (void)
 
2326
{
 
2327
    
 
2328
    /* Pop the buffer stack, destroying each element. */
 
2329
        while(YY_CURRENT_BUFFER){
 
2330
                yy_delete_buffer(YY_CURRENT_BUFFER  );
 
2331
                YY_CURRENT_BUFFER_LVALUE = NULL;
 
2332
                yypop_buffer_state();
 
2333
        }
 
2334
 
 
2335
        /* Destroy the stack itself. */
 
2336
        yyfree((yy_buffer_stack) );
 
2337
        (yy_buffer_stack) = NULL;
 
2338
 
 
2339
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
 
2340
     * yylex() is called, initialization will occur. */
 
2341
    yy_init_globals( );
 
2342
 
 
2343
    return 0;
 
2344
}
 
2345
 
 
2346
/*
 
2347
 * Internal utility routines.
 
2348
 */
 
2349
 
 
2350
#ifndef yytext_ptr
 
2351
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 
2352
{
 
2353
        register int i;
 
2354
        for ( i = 0; i < n; ++i )
 
2355
                s1[i] = s2[i];
 
2356
}
 
2357
#endif
 
2358
 
 
2359
#ifdef YY_NEED_STRLEN
 
2360
static int yy_flex_strlen (yyconst char * s )
 
2361
{
 
2362
        register int n;
 
2363
        for ( n = 0; s[n]; ++n )
 
2364
                ;
 
2365
 
 
2366
        return n;
 
2367
}
 
2368
#endif
 
2369
 
 
2370
void *yyalloc (yy_size_t  size )
 
2371
{
 
2372
        return (void *) malloc( size );
 
2373
}
 
2374
 
 
2375
void *yyrealloc  (void * ptr, yy_size_t  size )
 
2376
{
 
2377
        /* The cast to (char *) in the following accommodates both
 
2378
         * implementations that use char* generic pointers, and those
 
2379
         * that use void* generic pointers.  It works with the latter
 
2380
         * because both ANSI C and C++ allow castless assignment from
 
2381
         * any pointer type to void*, and deal with argument conversions
 
2382
         * as though doing an assignment.
 
2383
         */
 
2384
        return (void *) realloc( (char *) ptr, size );
 
2385
}
 
2386
 
 
2387
void yyfree (void * ptr )
 
2388
{
 
2389
        free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
 
2390
}
 
2391
 
 
2392
#define YYTABLES_NAME "yytables"
 
2393
 
 
2394
#line 254 "fixnt.l"
 
2395
 
 
2396
 
 
2397
int
 
2398
yywrap ()
 
2399
{
 
2400
  return 1;
 
2401
}
 
2402
 
 
2403
int
 
2404
main ()
 
2405
{
 
2406
#ifdef _WIN32
 
2407
  GetTempPath(_MAX_PATH, tmpdir);
 
2408
#else
 
2409
  if (!(tmpdir = getenv("TMPDIR")))
 
2410
    tmpdir = "/tmp";
 
2411
#endif
 
2412
  pid = (int) getpid ();
 
2413
  yylex();
 
2414
  /* at the end always reassemble the file and clean up ... */
 
2415
  reassemble(adobe, font, body, adobefname, fontfname, bodyfname);
 
2416
 
 
2417
  return 0;
 
2418
}
 
2419
 
 
2420
void
 
2421
reassemble (adobe, font, body, adobefname, fontfname, bodyfname)
 
2422
  FILE* adobe;
 
2423
  FILE* font;
 
2424
  FILE* body;
 
2425
  char *adobefname;
 
2426
  char *fontfname;
 
2427
  char *bodyfname;
 
2428
{
 
2429
  int xx;
 
2430
 
 
2431
  /* put everything in right order ... */
 
2432
  if( adobe != NULL ){
 
2433
    rewind(adobe);
 
2434
    while( (xx = getc( adobe )) != EOF ){
 
2435
      putc(xx,yyout);
 
2436
    }
 
2437
    fclose(adobe);
 
2438
    remove(adobefname);
 
2439
  }
 
2440
 
 
2441
  if( font != NULL){
 
2442
    rewind(font);
 
2443
    while( (xx = getc( font )) != EOF ){
 
2444
      putc(xx,yyout);
 
2445
    }
 
2446
    fclose(font);
 
2447
    remove(fontfname);
 
2448
  }
 
2449
 
 
2450
  if( ifendsetup == 1){
 
2451
    fprintf(yyout,"%%%%EndSetup:\n");
 
2452
  }
 
2453
 
 
2454
  if( body != NULL){
 
2455
    rewind(body);
 
2456
    if(ifpagesv == 1)
 
2457
      fprintf(yyout,"NTPSOct95 /PageSV save put\n");
 
2458
    while( (xx = getc( body )) != EOF ){
 
2459
      putc(xx,yyout);
 
2460
    }
 
2461
    fclose(body);
 
2462
    remove(bodyfname);
 
2463
  }
 
2464
  return;
 
2465
}
 
2466
 
 
2467
/*
 
2468
  Local Variables:
 
2469
  Mode: C
 
2470
  End:
 
2471
*/
 
2472