4 * Copyright (C) 2002 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
9 extern long string_start
;
10 extern long string_end
;
11 extern char *string_val
;
14 #define YY_INPUT(buf, result, max_size) \
15 if (pos >= string_start && pos <= string_end) { \
16 buf[0] = string_val[pos - string_start]; \
19 } else if ( yy_current_buffer->yy_is_interactive ) \
22 for ( n = 0; n < 1 && \
23 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
26 buf[n++] = (char) c; \
27 if ( c == EOF && ferror( yyin ) ) \
28 YY_FATAL_ERROR( "input in flex scanner failed" ); \
32 else if ( ((result = fread( buf, 1, 1, yyin )) == 0) \
34 YY_FATAL_ERROR( "input in flex scanner failed" );
38 # define input() (((pos >= string_start) && (pos < string_end)) ? \
39 yysptr = yysbuf, string_val[pos++ - string_start] : \
40 ((yytchar = yysptr > yysbuf ? U(*--yysptr) : \
41 getc(yyin)) == 10 ? (pos++, yylineno++, yytchar) : \
42 yytchar) == EOF ? (pos++, 0) : (pos++, yytchar))
47 # define lex_input() (((pos >= string_start) && (pos < string_end)) ? \
48 yysptr = yysbuf, string_val[pos++ - string_start] : \
49 ((yytchar = yysptr > yysbuf ? U(*--yysptr) : \
50 getc(yyin)) == 10 ? (pos++, yylineno++, yytchar) : \
51 yytchar) == EOF ? (pos++, 0) : (pos++, yytchar))
56 # define unput(c) { if (pos > 0) pos--; \
57 yytchar = (c); if (yytchar == '\n') yylineno--; \
58 *yysptr++ = yytchar; }