summaryrefslogtreecommitdiff
path: root/src/testpattern/testpatternl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testpattern/testpatternl.c')
-rw-r--r--src/testpattern/testpatternl.c180
1 files changed, 90 insertions, 90 deletions
diff --git a/src/testpattern/testpatternl.c b/src/testpattern/testpatternl.c
index e8ec86b..cee5dea 100644
--- a/src/testpattern/testpatternl.c
+++ b/src/testpattern/testpatternl.c
@@ -8,7 +8,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -53,7 +53,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -84,6 +83,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -152,7 +153,12 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-extern int yyleng;
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+extern yy_size_t yyleng;
extern FILE *yyin, *yyout;
@@ -178,11 +184,6 @@ extern FILE *yyin, *yyout;
#define unput(c) yyunput( c, (yytext_ptr) )
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
-
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -200,7 +201,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -270,8 +271,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-int yyleng;
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
+yy_size_t yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
@@ -299,7 +300,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
void *yyalloc (yy_size_t );
void *yyrealloc (void *,yy_size_t );
@@ -329,7 +330,7 @@ void yyfree (void * );
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define yywrap(n) 1
+#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@@ -751,7 +752,7 @@ int yy_flex_debug = 0;
char *yytext;
#line 1 "testpatternl.l"
/*
- * "$Id: testpatternl.l,v 1.27 2012/05/11 13:16:12 rlk Exp $"
+ * "$Id: testpatternl.l,v 1.28 2014/01/04 00:30:27 rlk Exp $"
*
* Test pattern generator for Gimp-Print
*
@@ -782,6 +783,9 @@ char *yytext;
#include <stdlib.h>
#include "testpattern.h"
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#define YY_NO_UNPUT
int mylineno = 1;
@@ -813,7 +817,7 @@ do \
while (0)
-#line 817 "testpatternl.c"
+#line 821 "testpatternl.c"
#define INITIAL 0
@@ -852,7 +856,7 @@ FILE *yyget_out (void );
void yyset_out (FILE * out_str );
-int yyget_leng (void );
+yy_size_t yyget_leng (void );
char *yyget_text (void );
@@ -902,7 +906,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -913,7 +917,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -995,10 +999,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 79 "testpatternl.l"
+#line 82 "testpatternl.l"
-#line 1002 "testpatternl.c"
+#line 1006 "testpatternl.c"
if ( !(yy_init) )
{
@@ -1083,267 +1087,267 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 81 "testpatternl.l"
+#line 84 "testpatternl.l"
DBG(GAMMA); return GAMMA;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 82 "testpatternl.l"
+#line 85 "testpatternl.l"
DBG(LEVEL); return LEVEL;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 83 "testpatternl.l"
+#line 86 "testpatternl.l"
DBG(STEPS); return STEPS;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 84 "testpatternl.l"
+#line 87 "testpatternl.l"
DBG(INK_LIMIT); return INK_LIMIT;
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 85 "testpatternl.l"
+#line 88 "testpatternl.l"
DBG(PRINTER); return PRINTER;
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 86 "testpatternl.l"
+#line 89 "testpatternl.l"
DBG(PARAMETER); return PARAMETER;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 87 "testpatternl.l"
+#line 90 "testpatternl.l"
DBG(PARAMETER_INT); return PARAMETER_INT;
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 88 "testpatternl.l"
+#line 91 "testpatternl.l"
DBG(PARAMETER_BOOL); return PARAMETER_BOOL;
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 89 "testpatternl.l"
+#line 92 "testpatternl.l"
DBG(PARAMETER); return PARAMETER;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 90 "testpatternl.l"
+#line 93 "testpatternl.l"
DBG(PARAMETER_FLOAT); return PARAMETER_FLOAT;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 91 "testpatternl.l"
+#line 94 "testpatternl.l"
DBG(PARAMETER_CURVE); return PARAMETER_CURVE;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 92 "testpatternl.l"
+#line 95 "testpatternl.l"
DBG(DENSITY); return DENSITY;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 93 "testpatternl.l"
+#line 96 "testpatternl.l"
DBG(TOP); return TOP;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 94 "testpatternl.l"
+#line 97 "testpatternl.l"
DBG(LEFT); return LEFT;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 95 "testpatternl.l"
+#line 98 "testpatternl.l"
DBG(SIZE_MODE); return SIZE_MODE;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 96 "testpatternl.l"
+#line 99 "testpatternl.l"
DBG(RELATIVE); return RELATIVE;
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 97 "testpatternl.l"
+#line 100 "testpatternl.l"
DBG(PT); return PT;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 98 "testpatternl.l"
+#line 101 "testpatternl.l"
DBG(IN); return IN;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 99 "testpatternl.l"
+#line 102 "testpatternl.l"
DBG(MM); return MM;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 100 "testpatternl.l"
+#line 103 "testpatternl.l"
DBG(HSIZE); return HSIZE;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 101 "testpatternl.l"
+#line 104 "testpatternl.l"
DBG(VSIZE); return VSIZE;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 102 "testpatternl.l"
+#line 105 "testpatternl.l"
DBG(BLACKLINE); return BLACKLINE;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 103 "testpatternl.l"
+#line 106 "testpatternl.l"
DBG(PATTERN); return PATTERN;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 104 "testpatternl.l"
+#line 107 "testpatternl.l"
DBG(XPATTERN); return XPATTERN;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 105 "testpatternl.l"
+#line 108 "testpatternl.l"
DBG(IMAGE); return IMAGE;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 106 "testpatternl.l"
+#line 109 "testpatternl.l"
DBG(EXTENDED); return EXTENDED;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 107 "testpatternl.l"
+#line 110 "testpatternl.l"
DBG(GRID); return GRID;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 108 "testpatternl.l"
+#line 111 "testpatternl.l"
DBG(CHANNEL); return CHANNEL;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 109 "testpatternl.l"
+#line 112 "testpatternl.l"
DBG(PAGESIZE); return PAGESIZE;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 110 "testpatternl.l"
+#line 113 "testpatternl.l"
DBG(SEMI); return SEMI;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 111 "testpatternl.l"
+#line 114 "testpatternl.l"
DBG(MODE); return MODE;
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 112 "testpatternl.l"
+#line 115 "testpatternl.l"
yylval.ival = CMYK;DBG(CMYK); return CMYK;
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 113 "testpatternl.l"
+#line 116 "testpatternl.l"
yylval.ival = CMYK;DBG(KCMY); return KCMY;
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 114 "testpatternl.l"
+#line 117 "testpatternl.l"
yylval.ival = RGB;DBG(RGB); return RGB;
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 115 "testpatternl.l"
+#line 118 "testpatternl.l"
yylval.ival = RGB;DBG(CMY); return CMY;
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 116 "testpatternl.l"
+#line 119 "testpatternl.l"
yylval.ival = GRAY;DBG(GRAY); return GRAY;
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 117 "testpatternl.l"
+#line 120 "testpatternl.l"
yylval.ival = GRAY;DBG(GRAY); return GRAY;
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 118 "testpatternl.l"
+#line 121 "testpatternl.l"
yylval.ival = WHITE;DBG(WHITE); return WHITE;
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 119 "testpatternl.l"
+#line 122 "testpatternl.l"
DBG(OUTPUT); return OUTPUT;
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 120 "testpatternl.l"
+#line 123 "testpatternl.l"
DBG(MESSAGE); return MESSAGE;
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 121 "testpatternl.l"
+#line 124 "testpatternl.l"
DBG(NOSCALE); return NOSCALE;
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 122 "testpatternl.l"
+#line 125 "testpatternl.l"
DBG(START_JOB); return START_JOB;
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 123 "testpatternl.l"
+#line 126 "testpatternl.l"
DBG(END_JOB); return END_JOB;
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 124 "testpatternl.l"
+#line 127 "testpatternl.l"
DBG(END); return END;
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 126 "testpatternl.l"
+#line 129 "testpatternl.l"
yylval.sval = yytext;DBG(COLOR); return COLOR;
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 127 "testpatternl.l"
+#line 130 "testpatternl.l"
yylval.ival = strtol(yytext, NULL, 0); yylval.dval = (double) yylval.ival; DBG(tINT); return tINT;
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 128 "testpatternl.l"
+#line 131 "testpatternl.l"
yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
YY_BREAK
case 48:
/* rule 48 can match eol */
YY_RULE_SETUP
-#line 129 "testpatternl.l"
+#line 132 "testpatternl.l"
yylval.sval = c_strstrip(yytext); DBG(tSTRING); return tSTRING;
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 130 "testpatternl.l"
+#line 133 "testpatternl.l"
DBG(whitespace); /* Skip blanks/tabs */
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 131 "testpatternl.l"
+#line 134 "testpatternl.l"
DBG(comment); /* Skip comments */
YY_BREAK
case 51:
/* rule 51 can match eol */
YY_RULE_SETUP
-#line 132 "testpatternl.l"
+#line 135 "testpatternl.l"
DBG(newline); mylineno++;
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 133 "testpatternl.l"
+#line 136 "testpatternl.l"
ECHO;
YY_BREAK
-#line 1347 "testpatternl.c"
+#line 1351 "testpatternl.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1529,21 +1533,21 @@ static int yy_get_next_buffer (void)
else
{
- int num_to_read =
+ yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- int new_size = b->yy_buf_size * 2;
+ yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1574,7 +1578,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), (size_t) num_to_read );
+ (yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -1669,7 +1673,7 @@ static int yy_get_next_buffer (void)
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 284);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
static void yyunput (int c, register char * yy_bp )
@@ -1684,7 +1688,7 @@ static int yy_get_next_buffer (void)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = (yy_n_chars) + 2;
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
@@ -1733,7 +1737,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1893,10 +1897,6 @@ static void yy_load_buffer_state (void)
yyfree((void *) b );
}
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a yyrestart() or at EOF.
@@ -2009,7 +2009,7 @@ void yypop_buffer_state (void)
*/
static void yyensure_buffer_stack (void)
{
- int num_to_alloc;
+ yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -2101,12 +2101,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -2193,7 +2193,7 @@ FILE *yyget_out (void)
/** Get the length of the current token.
*
*/
-int yyget_leng (void)
+yy_size_t yyget_leng (void)
{
return yyleng;
}
@@ -2341,4 +2341,4 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 133 "testpatternl.l"
+#line 136 "testpatternl.l"