summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2008-10-26 16:11:56 +0000
committerRoger Leigh <rleigh@debian.org>2008-10-26 16:11:56 +0000
commit7e12d32a372b5661f80b68009730cf47a6bfd062 (patch)
tree821ddd7a41794bb6fec964ce81ba89a13cebb20a /src
parentdfae5860833782af557deb35e286d7e186fe3cf5 (diff)
Imported Upstream version 4.3.99+cvs20050715
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in1
-rw-r--r--src/cups/Makefile.in1
-rw-r--r--src/cups/cups-genppdupdate.in5
-rw-r--r--src/escputil/Makefile.in1
-rw-r--r--src/foomatic/Makefile.in1
-rw-r--r--src/ghost/Makefile.in1
-rw-r--r--src/gimp/Makefile.in1
-rw-r--r--src/gimp2/Makefile.in1
-rw-r--r--src/gutenprintui/Makefile.in1
-rw-r--r--src/gutenprintui/printrcl.c1325
-rw-r--r--src/gutenprintui/printrcy.c242
-rw-r--r--src/gutenprintui/printrcy.h4
-rw-r--r--src/gutenprintui2/Makefile.in1
-rw-r--r--src/gutenprintui2/printrcl.c1325
-rw-r--r--src/gutenprintui2/printrcy.c242
-rw-r--r--src/gutenprintui2/printrcy.h4
-rw-r--r--src/main/Makefile.in1
-rw-r--r--src/main/channel.c171
-rw-r--r--src/main/color-conversion.h3
-rw-r--r--src/main/color-conversions.c115
-rw-r--r--src/main/escp2-channels.c14
-rw-r--r--src/main/escp2-papers.c90
-rw-r--r--src/main/print-canon.c18
-rw-r--r--src/main/print-color.c67
-rw-r--r--src/main/print-escp2.c50
-rw-r--r--src/main/print-lexmark.c18
-rw-r--r--src/main/print-pcl.c18
-rw-r--r--src/testpattern/Makefile.in1
-rw-r--r--src/testpattern/testpatternl.c1322
-rw-r--r--src/testpattern/testpatterny.c252
-rw-r--r--src/testpattern/testpatterny.h4
31 files changed, 2391 insertions, 2909 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 44b9ba4..48de6f0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -261,7 +261,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/cups/Makefile.in b/src/cups/Makefile.in
index cba2fe5..bb55b9e 100644
--- a/src/cups/Makefile.in
+++ b/src/cups/Makefile.in
@@ -336,7 +336,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/cups/cups-genppdupdate.in b/src/cups/cups-genppdupdate.in
index c48723c..42f7cd9 100644
--- a/src/cups/cups-genppdupdate.in
+++ b/src/cups/cups-genppdupdate.in
@@ -1,5 +1,5 @@
#! @PERL@ -w
-# $Id: cups-genppdupdate.in,v 1.19 2005/04/30 11:48:26 rleigh Exp $
+# $Id: cups-genppdupdate.in,v 1.20 2005/07/04 23:07:11 rleigh Exp $
# Update CUPS PPDs for Gutenprint queues.
# Copyright (C) 2002-2003 Roger Leigh (rleigh@debian.org)
#
@@ -427,8 +427,7 @@ sub find_ppd ($$$$) {
# Check that it is a regular file, owned by root.root, not writable
# by other, and is readable by root. i.e. the file is secure.
my @sb = stat $fn or next;
- if (S_ISREG($sb[2]) && ($sb[4] == 0) && ($sb[5] == 0)) {
-# !(S_IWOTH & $sb[2]) && (S_IRUSR & $sb[2])) {
+ if (S_ISREG($sb[2]) && ($sb[4] == 0)) {
# Check that the file is a valid Gutenprint PPD file
# of the correct version.
my $file_version;
diff --git a/src/escputil/Makefile.in b/src/escputil/Makefile.in
index 7b1b77a..1e4adc4 100644
--- a/src/escputil/Makefile.in
+++ b/src/escputil/Makefile.in
@@ -277,7 +277,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/foomatic/Makefile.in b/src/foomatic/Makefile.in
index 761df60..a9abef7 100644
--- a/src/foomatic/Makefile.in
+++ b/src/foomatic/Makefile.in
@@ -295,7 +295,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/ghost/Makefile.in b/src/ghost/Makefile.in
index 566a4f6..345fd21 100644
--- a/src/ghost/Makefile.in
+++ b/src/ghost/Makefile.in
@@ -282,7 +282,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/gimp/Makefile.in b/src/gimp/Makefile.in
index 8282702..5cc1000 100644
--- a/src/gimp/Makefile.in
+++ b/src/gimp/Makefile.in
@@ -277,7 +277,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/gimp2/Makefile.in b/src/gimp2/Makefile.in
index 897d99e..daae3f6 100644
--- a/src/gimp2/Makefile.in
+++ b/src/gimp2/Makefile.in
@@ -277,7 +277,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/gutenprintui/Makefile.in b/src/gutenprintui/Makefile.in
index 88b87b1..a741fb8 100644
--- a/src/gutenprintui/Makefile.in
+++ b/src/gutenprintui/Makefile.in
@@ -296,7 +296,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/gutenprintui/printrcl.c b/src/gutenprintui/printrcl.c
index 341c76d..e1718e4 100644
--- a/src/gutenprintui/printrcl.c
+++ b/src/gutenprintui/printrcl.c
@@ -1,85 +1,32 @@
-
-#line 3 "printrcl.c"
-
-#define YY_INT_ALIGNED short int
-
/* A lexical scanner generated by flex */
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 31
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-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
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! FLEXINT_H */
#ifdef __cplusplus
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
@@ -87,17 +34,34 @@ typedef unsigned int flex_uint32_t;
#if __STDC__
+#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
/* Returned upon end-of-file. */
#define YY_NULL 0
@@ -112,71 +76,71 @@ typedef unsigned int flex_uint32_t;
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
-#define BEGIN (yy_start) = 1 + 2 *
+#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
-#define YY_START (((yy_start) - 1) / 2)
+#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin )
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
-#endif
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
extern int yyleng;
-
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
- #define YY_LESS_LINENO(n)
-
-/* Return all but the first "n" matched characters back to the input stream. */
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = (yy_hold_char); \
+ *yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, (yytext_ptr) )
+#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
typedef unsigned int yy_size_t;
-#endif
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
+
struct yy_buffer_state
{
FILE *yy_input_file;
@@ -213,16 +177,12 @@ struct yy_buffer_state
*/
int yy_at_bol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
-
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
@@ -236,33 +196,23 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
-
};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
- *
- * Returns the top of the stack, or NULL.
*/
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- : NULL)
+#define YY_CURRENT_BUFFER yy_current_buffer
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* 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;
/* Points to current character in buffer. */
@@ -275,93 +225,69 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
-
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+void yyrestart YY_PROTO(( FILE *input_file ));
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-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_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
- if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
- if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
}
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-#define yywrap(n) 1
-#define YY_SKIP_YYWRAP
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
-
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-
typedef int yy_state_type;
-
-extern int yylineno;
-
-int yylineno = 1;
-
extern char *yytext;
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
- (yytext_ptr) = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
- (yy_hold_char) = *yy_cp; \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
+ yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 40
#define YY_END_OF_BUFFER 41
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[335] =
+static yyconst short int yy_accept[335] =
{ 0,
0, 0, 41, 40, 37, 39, 40, 38, 40, 40,
31, 35, 35, 35, 35, 35, 35, 35, 35, 35,
@@ -402,7 +328,7 @@ static yyconst flex_int16_t yy_accept[335] =
0, 2, 18, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -434,7 +360,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[39] =
+static yyconst int yy_meta[39] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -442,7 +368,7 @@ static yyconst flex_int32_t yy_meta[39] =
3, 3, 3, 3, 3, 3, 3, 3
} ;
-static yyconst flex_int16_t yy_base[340] =
+static yyconst short int yy_base[340] =
{ 0,
0, 0, 374, 375, 371, 375, 368, 343, 364, 29,
32, 336, 341, 18, 26, 21, 32, 343, 0, 340,
@@ -483,7 +409,7 @@ static yyconst flex_int16_t yy_base[340] =
81, 375, 375, 375, 94, 97, 100, 89, 103
} ;
-static yyconst flex_int16_t yy_def[340] =
+static yyconst short int yy_def[340] =
{ 0,
334, 1, 334, 334, 334, 334, 335, 336, 337, 334,
334, 338, 338, 338, 338, 338, 338, 338, 338, 338,
@@ -524,7 +450,7 @@ static yyconst flex_int16_t yy_def[340] =
334, 334, 334, 0, 334, 334, 334, 334, 334
} ;
-static yyconst flex_int16_t yy_nxt[414] =
+static yyconst short int yy_nxt[414] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
11, 4, 4, 12, 13, 14, 15, 16, 17, 18,
@@ -574,7 +500,7 @@ static yyconst flex_int16_t yy_nxt[414] =
334, 334, 334
} ;
-static yyconst flex_int16_t yy_chk[414] =
+static yyconst short int yy_chk[414] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -627,9 +553,6 @@ static yyconst flex_int16_t yy_chk[414] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
@@ -639,6 +562,7 @@ int yy_flex_debug = 0;
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "printrcl.l"
+#define INITIAL 0
/* -*-Mode: C-*-
* "$Id: printrcl.l,v 1.1 2004/09/17 18:38:14 rleigh Exp $"
*
@@ -697,21 +621,7 @@ q_strdup(const char *s)
return g_strndup(s + 1, strlen(s) - 2);
}
-#line 701 "printrcl.c"
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
+#line 625 "printrcl.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -719,30 +629,65 @@ q_strdup(const char *s)
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int yywrap YY_PROTO(( void ));
#else
-extern int yywrap (void );
+extern int yywrap YY_PROTO(( void ));
#endif
#endif
- static void yyunput (int c,char *buf_ptr );
-
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput YY_PROTO(( void ));
#else
-static int input (void );
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
#endif
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
#endif
/* Amount of stuff to slurp up with each read. */
@@ -751,6 +696,7 @@ static int input (void );
#endif
/* Copy whatever the last rule matched to the standard output. */
+
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
@@ -763,10 +709,9 @@ static int input (void );
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ if ( yy_current_buffer->yy_is_interactive ) \
{ \
- int c = '*'; \
- size_t n; \
+ int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -776,22 +721,9 @@ static int input (void );
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else \
- { \
- errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(yyin); \
- } \
- }\
-\
-
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -812,18 +744,12 @@ static int input (void );
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
-/* end tables serialization structures and prototypes */
-
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -840,29 +766,27 @@ extern int yylex (void);
#define YY_RULE_SETUP \
YY_USER_ACTION
-/** The main scanner function which does all the work.
- */
YY_DECL
-{
+ {
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+
#line 73 "printrcl.l"
-#line 855 "printrcl.c"
+#line 779 "printrcl.c"
- if ( (yy_init) )
+ if ( yy_init )
{
- (yy_init) = 0;
+ yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! (yy_start) )
- (yy_start) = 1; /* first start state */
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
@@ -870,36 +794,34 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
- }
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
- yy_load_buffer_state( );
+ yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
- yy_cp = (yy_c_buf_p);
+ yy_cp = yy_c_buf_p;
/* Support of yytext. */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
- yy_current_state = (yy_start);
+ yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -916,22 +838,24 @@ yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
+
do_action: /* This label is used only to access EOF actions. */
+
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = (yy_hold_char);
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
@@ -1095,7 +1019,6 @@ YY_RULE_SETUP
yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
YY_BREAK
case 33:
-/* rule 33 can match eol */
YY_RULE_SETUP
#line 109 "printrcl.l"
yylval.sval = q_strdup(yytext); DBG(tSTRING); return tSTRING;
@@ -1111,7 +1034,6 @@ YY_RULE_SETUP
yylval.sval = g_strdup(yytext); DBG(tWORD); return tWORD;
YY_BREAK
case 36:
-/* rule 36 can match eol */
YY_RULE_SETUP
#line 112 "printrcl.l"
DBG(PRINTRC_HDR); return PRINTRC_HDR;
@@ -1127,7 +1049,6 @@ YY_RULE_SETUP
DBG(comment1); /* Skip comments */
YY_BREAK
case 39:
-/* rule 39 can match eol */
YY_RULE_SETUP
#line 115 "printrcl.l"
DBG(newline); mylineno++;
@@ -1137,33 +1058,33 @@ YY_RULE_SETUP
#line 116 "printrcl.l"
ECHO;
YY_BREAK
-#line 1141 "printrcl.c"
+#line 1062 "printrcl.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
+ * consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1173,13 +1094,13 @@ case YY_STATE_EOF(INITIAL):
* end-of-buffer state). Contrast this with the test
* in input().
*/
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
@@ -1192,30 +1113,30 @@ case YY_STATE_EOF(INITIAL):
yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
+ yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
- yy_cp = (yy_c_buf_p);
+ yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
- else switch ( yy_get_next_buffer( ) )
+ else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
- (yy_did_buffer_switch_on_eof) = 0;
+ yy_did_buffer_switch_on_eof = 0;
- if ( yywrap( ) )
+ if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -1226,7 +1147,7 @@ case YY_STATE_EOF(INITIAL):
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
@@ -1234,30 +1155,30 @@ case YY_STATE_EOF(INITIAL):
else
{
- if ( ! (yy_did_buffer_switch_on_eof) )
+ if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
@@ -1268,7 +1189,8 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of yylex */
+ } /* end of yylex */
+
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1277,20 +1199,21 @@ case YY_STATE_EOF(INITIAL):
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-static int yy_get_next_buffer (void)
-{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
@@ -1310,30 +1233,34 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
- size_t num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
- (int) ((yy_c_buf_p) - b->yy_ch_buf);
+ (int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
@@ -1346,7 +1273,8 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1356,35 +1284,35 @@ static int yy_get_next_buffer (void)
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
- (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
-
+#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ yy_current_buffer->yy_n_chars = yy_n_chars;
}
- if ( (yy_n_chars) == 0 )
+ if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1392,31 +1320,32 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- (yy_n_chars) += number_to_move;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
- (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
-}
+ }
+
/* yy_get_previous_state - get the state just before the EOB char was reached */
- static yy_state_type yy_get_previous_state (void)
-{
+static yy_state_type yy_get_previous_state()
+ {
register yy_state_type yy_current_state;
register char *yy_cp;
-
- yy_current_state = (yy_start);
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ yy_current_state = yy_start;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1428,23 +1357,30 @@ static int yy_get_next_buffer (void)
}
return yy_current_state;
-}
+ }
+
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
-{
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1456,73 +1392,80 @@ static int yy_get_next_buffer (void)
yy_is_jam = (yy_current_state == 334);
return yy_is_jam ? 0 : yy_current_state;
-}
+ }
- static void yyunput (int c, register char * yy_bp )
-{
- register char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < yy_current_buffer->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 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+ &yy_current_buffer->yy_ch_buf[number_to_move];
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-#ifndef YY_NO_INPUT
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
#ifdef __cplusplus
- static int yyinput (void)
+static int yyinput()
#else
- static int input (void)
+static int input()
#endif
-
-{
+ {
int c;
-
- *(yy_c_buf_p) = (yy_hold_char);
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
- *(yy_c_buf_p) = '\0';
+ *yy_c_buf_p = '\0';
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
- ++(yy_c_buf_p);
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
- switch ( yy_get_next_buffer( ) )
+ switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
@@ -1536,16 +1479,16 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
- /*FALLTHROUGH*/
+ /* fall through */
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( yywrap() )
return EOF;
- if ( ! (yy_did_buffer_switch_on_eof) )
+ if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
@@ -1555,92 +1498,90 @@ static int yy_get_next_buffer (void)
}
case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
+ yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
- c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
- (yy_hold_char) = *++(yy_c_buf_p);
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
return c;
-}
-#endif /* ifndef YY_NO_INPUT */
+ }
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- *
- * @note This function does not reset the start condition to @c INITIAL .
- */
- void yyrestart (FILE * input_file )
-{
-
- if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
-}
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- *
- */
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
-{
-
- /* TODO. We should be able to replace this entire function body
- * with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
- */
- yyensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
return;
- if ( YY_CURRENT_BUFFER )
+ if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
}
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
- (yy_did_buffer_switch_on_eof) = 1;
-}
+ yy_did_buffer_switch_on_eof = 1;
+ }
-static void yy_load_buffer_state (void)
-{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- (yy_hold_char) = *(yy_c_buf_p);
-}
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
- * @return the allocated buffer state.
- */
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
-{
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1649,75 +1590,80 @@ static void yy_load_buffer_state (void)
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
-}
+ }
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- *
- */
- void yy_delete_buffer (YY_BUFFER_STATE b )
-{
-
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
if ( ! b )
return;
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ yy_flex_free( (void *) b->yy_ch_buf );
- yyfree((void *) b );
-}
+ yy_flex_free( (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.
- */
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
-{
- int oerrno = errno;
-
- yy_flush_buffer(b );
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
- errno = oerrno;
-}
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
- */
- void yy_flush_buffer (YY_BUFFER_STATE b )
-{
- if ( ! b )
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
return;
b->yy_n_chars = 0;
@@ -1734,121 +1680,29 @@ extern int isatty (int );
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- * the current state. This function will allocate the stack
- * if necessary.
- * @param new_buffer The new state.
- *
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
- if (new_buffer == NULL)
- return;
-
- yyensure_buffer_stack();
-
- /* This block is copied from yy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- /* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
- (yy_buffer_stack_top)++;
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- * The next element becomes the new top.
- *
- */
-void yypop_buffer_state (void)
-{
- if (!YY_CURRENT_BUFFER)
- return;
-
- yy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
- --(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
- }
-}
-
-/* Allocates the stack if it does not exist.
- * Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
- int num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
- /* First allocation is just for 2 elements, since we don't know if this
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- );
-
- memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
- (yy_buffer_stack_max) = num_to_alloc;
- (yy_buffer_stack_top) = 0;
- return;
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
}
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
- /* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
-
- num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
- ((yy_buffer_stack),
- num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- /* zero only the new slots.*/
- memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- (yy_buffer_stack_max) = num_to_alloc;
- }
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
-{
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1862,42 +1716,47 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
-}
+ }
+#endif
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
- *
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- * yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
-{
-
- return yy_scan_bytes(yy_str,strlen(yy_str) );
-}
-/** 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.
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
-{
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
- buf = (char *) yyalloc(n );
+ buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -1906,7 +1765,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
@@ -1916,164 +1775,148 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
b->yy_is_our_buffer = 1;
return b;
-}
+ }
+#endif
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
-static void yy_fatal_error (yyconst char* msg )
-{
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
-}
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
-/* Redefine yyless() so it works in section 3 code. */
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
- } \
- while ( 0 )
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
-/* Accessor methods (get/set functions) to struct members. */
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
-/** Get the current line number.
- *
- */
-int yyget_lineno (void)
-{
-
- return yylineno;
-}
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
-/** Get the input stream.
- *
- */
-FILE *yyget_in (void)
-{
- return yyin;
-}
+ BEGIN(new_state);
+ }
+#endif
-/** Get the output stream.
- *
- */
-FILE *yyget_out (void)
-{
- return yyout;
-}
-/** Get the length of the current token.
- *
- */
-int yyget_leng (void)
-{
- return yyleng;
-}
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
-/** Get the current token.
- *
- */
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
-char *yyget_text (void)
-{
- return yytext;
-}
-/** Set the current line number.
- * @param line_number
- *
- */
-void yyset_lineno (int line_number )
-{
-
- yylineno = line_number;
-}
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- *
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE * in_str )
-{
- yyin = in_str ;
-}
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
-void yyset_out (FILE * out_str )
-{
- yyout = out_str ;
-}
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
-int yyget_debug (void)
-{
- return yy_flex_debug;
-}
-void yyset_debug (int bdebug )
-{
- yy_flex_debug = bdebug ;
-}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
-{
-
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
- }
+/* Redefine yyless() so it works in section 3 code. */
- /* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
- (yy_buffer_stack) = NULL;
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
- return 0;
-}
-/*
- * Internal utility routines.
- */
+/* Internal utility routines. */
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
register int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i )
s1[i] = s2[i];
-}
+ }
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
register int n;
- for ( n = 0; s[n]; ++n )
+ for ( n = 0; s[n]; ++n )
;
return n;
-}
+ }
#endif
-void *yyalloc (yy_size_t size )
-{
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
return (void *) malloc( size );
-}
+ }
-void *yyrealloc (void * ptr, yy_size_t size )
-{
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -2082,25 +1925,23 @@ void *yyrealloc (void * ptr, yy_size_t size )
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
-}
-
-void yyfree (void * ptr )
-{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
+ }
-#undef YY_NEW_FILE
-#undef YY_FLUSH_BUFFER
-#undef yy_set_bol
-#undef yy_new_buffer
-#undef yy_set_interactive
-#undef yytext_ptr
-#undef YY_DO_BEFORE_ACTION
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
-#ifdef YY_DECL_IS_OURS
-#undef YY_DECL_IS_OURS
-#undef YY_DECL
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
#endif
#line 116 "printrcl.l"
diff --git a/src/gutenprintui/printrcy.c b/src/gutenprintui/printrcy.c
index 95f3d4c..1609566 100644
--- a/src/gutenprintui/printrcy.c
+++ b/src/gutenprintui/printrcy.c
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875d. */
+/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -196,29 +196,22 @@ typedef int YYSTYPE;
/* Line 214 of yacc.c. */
-#line 200 "printrcy.c"
+#line 199 "printrcy.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
-# ifndef YYFREE
-# define YYFREE free
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# endif
-
/* The parser invokes alloca or malloc; define the necessary symbols. */
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# endif
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
# else
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
-# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# ifndef YYSTACK_USE_ALLOCA
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
# endif
# endif
# endif
@@ -231,20 +224,20 @@ typedef int YYSTYPE;
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
+# define YYSTACK_ALLOC malloc
+# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
- || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+ || (YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short int yyss;
+ short yyss;
YYSTYPE yyvs;
};
@@ -254,13 +247,13 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if defined (__GNUC__) && 1 < __GNUC__
+# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
@@ -296,7 +289,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
- typedef short int yysigned_char;
+ typedef short yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@@ -396,7 +389,7 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short int yyrline[] =
+static const unsigned short yyrline[] =
{
0, 100, 100, 111, 118, 128, 138, 148, 158, 164,
168, 172, 176, 180, 184, 188, 206, 210, 214, 217,
@@ -414,32 +407,32 @@ static const unsigned short int yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
- "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
- "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
- "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
- "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
- "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
- "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
- "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
- "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
- "Queue_Name", "Output_Filename", "Extra_Printer_Options",
- "Custom_Command", "Command_Type", "Scaling", "Orientation",
- "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
- "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
- "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
- "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter", "Parameters",
- "Standard_Value", "Standard_Values", "A_Printer", "Printers",
- "Current_Printer", "Show_All_Paper_Sizes", "Global", "Old_Globals",
- "New_Global_Setting", "Global_Setting", "Global_Settings",
- "Global_Subblock", "Global_Block", "Thing", 0
+ "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
+ "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
+ "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
+ "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
+ "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
+ "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
+ "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
+ "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
+ "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
+ "Queue_Name", "Output_Filename", "Extra_Printer_Options",
+ "Custom_Command", "Command_Type", "Scaling", "Orientation",
+ "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
+ "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
+ "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
+ "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter",
+ "Parameters", "Standard_Value", "Standard_Values", "A_Printer",
+ "Printers", "Current_Printer", "Show_All_Paper_Sizes", "Global",
+ "Old_Globals", "New_Global_Setting", "Global_Setting",
+ "Global_Settings", "Global_Subblock", "Global_Block", "Thing", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short int yytoknum[] =
+static const unsigned short yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -603,8 +596,7 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
+#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -638,11 +630,11 @@ while (0)
are run). */
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- ((Current).first_line = (Rhs)[1].first_line, \
- (Current).first_column = (Rhs)[1].first_column, \
- (Current).last_line = (Rhs)[N].last_line, \
- (Current).last_column = (Rhs)[N].last_column)
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ Current.first_line = Rhs[1].first_line; \
+ Current.first_column = Rhs[1].first_column; \
+ Current.last_line = Rhs[N].last_line; \
+ Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
@@ -686,17 +678,17 @@ do { \
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
+| TOP (cinluded). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (short int *bottom, short int *top)
+yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
- short int *bottom;
- short int *top;
+ short *bottom;
+ short *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@@ -726,9 +718,9 @@ yy_reduce_print (yyrule)
#endif
{
int yyi;
- unsigned int yylno = yyrline[yyrule];
+ unsigned int yylineno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylno);
+ yyrule - 1, yylineno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
@@ -765,7 +757,7 @@ int yydebug;
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
+#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
@@ -963,9 +955,9 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short int yyssa[YYINITDEPTH];
- short int *yyss = yyssa;
- register short int *yyssp;
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
@@ -1002,7 +994,6 @@ yyparse ()
yyssp = yyss;
yyvsp = yyvs;
-
goto yysetstate;
/*------------------------------------------------------------.
@@ -1028,7 +1019,7 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short int *yyss1 = yyss;
+ short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
@@ -1056,7 +1047,7 @@ yyparse ()
yystacksize = YYMAXDEPTH;
{
- short int *yyss1 = yyss;
+ short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
@@ -1463,8 +1454,8 @@ yyreduce:
}
-/* Line 1010 of yacc.c. */
-#line 1468 "printrcy.c"
+/* Line 991 of yacc.c. */
+#line 1458 "printrcy.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1505,33 +1496,18 @@ yyerrlab:
{
YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- const char* yyprefix;
char *yymsg;
- int yyx;
+ int yyx, yycount;
+ yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 0;
-
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
- yycount += 1;
- if (yycount == 5)
- {
- yysize = 0;
- break;
- }
- }
- yysize += (sizeof ("syntax error, unexpected ")
- + yystrlen (yytname[yytype]));
+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+ yysize += yystrlen ("syntax error, unexpected ") + 1;
+ yysize += yystrlen (yytname[yytype]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
@@ -1540,13 +1516,16 @@ yyerrlab:
if (yycount < 5)
{
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ yycount = 0;
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *));
+ yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
- yyp = yystpcpy (yyp, yyprefix);
+ const char *yyq = ! yycount ? ", expecting " : " or ";
+ yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
- yyprefix = " or ";
+ yycount++;
}
}
yyerror (yymsg);
@@ -1567,56 +1546,52 @@ yyerrlab:
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
- if (yychar <= YYEOF)
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
{
- /* If at end of input, pop the error token,
- then the rest of the stack, then return failure. */
- if (yychar == YYEOF)
- for (;;)
- {
- YYPOPSTACK;
- if (yyssp == yyss)
- YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[*yyssp], yyvsp);
- }
+ /* Pop the error token. */
+ YYPOPSTACK;
+ /* Pop the rest of the stack. */
+ while (yyss < yyssp)
+ {
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
+ YYABORT;
}
- else
- {
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
}
/* Else will try to reuse lookahead token after shifting the error
token. */
- goto yyerrlab1;
+ goto yyerrlab2;
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
+/*----------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action. |
+`----------------------------------------------------*/
+yyerrlab1:
-#ifdef __GNUC__
- /* Pacify GCC when the user code never invokes YYERROR and the label
- yyerrorlab therefore never appears in user code. */
- if (0)
- goto yyerrorlab;
+ /* Suppress GCC warning that yyerrlab1 is unused when no action
+ invokes YYERROR. */
+#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
+ && !defined __cplusplus
+ __attribute__ ((__unused__))
#endif
- yyvsp -= yylen;
- yyssp -= yylen;
- yystate = *yyssp;
- goto yyerrlab1;
+ goto yyerrlab2;
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
+
+/*---------------------------------------------------------------.
+| yyerrlab2 -- pop states until the error token can be shifted. |
+`---------------------------------------------------------------*/
+yyerrlab2:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1639,8 +1614,9 @@ yyerrlab1:
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
yydestruct (yystos[yystate], yyvsp);
- YYPOPSTACK;
- yystate = *yyssp;
+ yyvsp--;
+ yystate = *--yyssp;
+
YY_STACK_PRINT (yyss, yyssp);
}
diff --git a/src/gutenprintui/printrcy.h b/src/gutenprintui/printrcy.h
index 2273fb7..afa662b 100644
--- a/src/gutenprintui/printrcy.h
+++ b/src/gutenprintui/printrcy.h
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875d. */
+/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/gutenprintui2/Makefile.in b/src/gutenprintui2/Makefile.in
index 8c3e85c..3a43db9 100644
--- a/src/gutenprintui2/Makefile.in
+++ b/src/gutenprintui2/Makefile.in
@@ -298,7 +298,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/gutenprintui2/printrcl.c b/src/gutenprintui2/printrcl.c
index 6d6cd19..1c4d8e1 100644
--- a/src/gutenprintui2/printrcl.c
+++ b/src/gutenprintui2/printrcl.c
@@ -1,85 +1,32 @@
-
-#line 3 "printrcl.c"
-
-#define YY_INT_ALIGNED short int
-
/* A lexical scanner generated by flex */
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 31
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-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
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! FLEXINT_H */
#ifdef __cplusplus
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
@@ -87,17 +34,34 @@ typedef unsigned int flex_uint32_t;
#if __STDC__
+#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
/* Returned upon end-of-file. */
#define YY_NULL 0
@@ -112,71 +76,71 @@ typedef unsigned int flex_uint32_t;
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
-#define BEGIN (yy_start) = 1 + 2 *
+#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
-#define YY_START (((yy_start) - 1) / 2)
+#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin )
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
-#endif
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
extern int yyleng;
-
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
- #define YY_LESS_LINENO(n)
-
-/* Return all but the first "n" matched characters back to the input stream. */
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = (yy_hold_char); \
+ *yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, (yytext_ptr) )
+#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
typedef unsigned int yy_size_t;
-#endif
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
+
struct yy_buffer_state
{
FILE *yy_input_file;
@@ -213,16 +177,12 @@ struct yy_buffer_state
*/
int yy_at_bol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
-
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
@@ -236,33 +196,23 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
-
};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
- *
- * Returns the top of the stack, or NULL.
*/
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- : NULL)
+#define YY_CURRENT_BUFFER yy_current_buffer
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* 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;
/* Points to current character in buffer. */
@@ -275,93 +225,69 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
-
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+void yyrestart YY_PROTO(( FILE *input_file ));
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-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_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
- if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
- if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
}
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-#define yywrap(n) 1
-#define YY_SKIP_YYWRAP
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
-
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-
typedef int yy_state_type;
-
-extern int yylineno;
-
-int yylineno = 1;
-
extern char *yytext;
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
- (yytext_ptr) = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
- (yy_hold_char) = *yy_cp; \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
+ yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 40
#define YY_END_OF_BUFFER 41
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[335] =
+static yyconst short int yy_accept[335] =
{ 0,
0, 0, 41, 40, 37, 39, 40, 38, 40, 40,
31, 35, 35, 35, 35, 35, 35, 35, 35, 35,
@@ -402,7 +328,7 @@ static yyconst flex_int16_t yy_accept[335] =
0, 2, 18, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -434,7 +360,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[39] =
+static yyconst int yy_meta[39] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -442,7 +368,7 @@ static yyconst flex_int32_t yy_meta[39] =
3, 3, 3, 3, 3, 3, 3, 3
} ;
-static yyconst flex_int16_t yy_base[340] =
+static yyconst short int yy_base[340] =
{ 0,
0, 0, 374, 375, 371, 375, 368, 343, 364, 29,
32, 336, 341, 18, 26, 21, 32, 343, 0, 340,
@@ -483,7 +409,7 @@ static yyconst flex_int16_t yy_base[340] =
81, 375, 375, 375, 94, 97, 100, 89, 103
} ;
-static yyconst flex_int16_t yy_def[340] =
+static yyconst short int yy_def[340] =
{ 0,
334, 1, 334, 334, 334, 334, 335, 336, 337, 334,
334, 338, 338, 338, 338, 338, 338, 338, 338, 338,
@@ -524,7 +450,7 @@ static yyconst flex_int16_t yy_def[340] =
334, 334, 334, 0, 334, 334, 334, 334, 334
} ;
-static yyconst flex_int16_t yy_nxt[414] =
+static yyconst short int yy_nxt[414] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
11, 4, 4, 12, 13, 14, 15, 16, 17, 18,
@@ -574,7 +500,7 @@ static yyconst flex_int16_t yy_nxt[414] =
334, 334, 334
} ;
-static yyconst flex_int16_t yy_chk[414] =
+static yyconst short int yy_chk[414] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -627,9 +553,6 @@ static yyconst flex_int16_t yy_chk[414] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
@@ -639,6 +562,7 @@ int yy_flex_debug = 0;
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "printrcl.l"
+#define INITIAL 0
/* -*-Mode: C-*-
* "$Id: printrcl.l,v 1.1 2004/09/17 18:38:14 rleigh Exp $"
*
@@ -697,21 +621,7 @@ q_strdup(const char *s)
return g_strndup(s + 1, strlen(s) - 2);
}
-#line 701 "printrcl.c"
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
+#line 625 "printrcl.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -719,30 +629,65 @@ q_strdup(const char *s)
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int yywrap YY_PROTO(( void ));
#else
-extern int yywrap (void );
+extern int yywrap YY_PROTO(( void ));
#endif
#endif
- static void yyunput (int c,char *buf_ptr );
-
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput YY_PROTO(( void ));
#else
-static int input (void );
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
#endif
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
#endif
/* Amount of stuff to slurp up with each read. */
@@ -751,6 +696,7 @@ static int input (void );
#endif
/* Copy whatever the last rule matched to the standard output. */
+
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
@@ -763,10 +709,9 @@ static int input (void );
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ if ( yy_current_buffer->yy_is_interactive ) \
{ \
- int c = '*'; \
- size_t n; \
+ int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -776,22 +721,9 @@ static int input (void );
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else \
- { \
- errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(yyin); \
- } \
- }\
-\
-
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -812,18 +744,12 @@ static int input (void );
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
-/* end tables serialization structures and prototypes */
-
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -840,29 +766,27 @@ extern int yylex (void);
#define YY_RULE_SETUP \
YY_USER_ACTION
-/** The main scanner function which does all the work.
- */
YY_DECL
-{
+ {
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+
#line 73 "printrcl.l"
-#line 855 "printrcl.c"
+#line 779 "printrcl.c"
- if ( (yy_init) )
+ if ( yy_init )
{
- (yy_init) = 0;
+ yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! (yy_start) )
- (yy_start) = 1; /* first start state */
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
@@ -870,36 +794,34 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
- }
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
- yy_load_buffer_state( );
+ yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
- yy_cp = (yy_c_buf_p);
+ yy_cp = yy_c_buf_p;
/* Support of yytext. */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
- yy_current_state = (yy_start);
+ yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -916,22 +838,24 @@ yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
+
do_action: /* This label is used only to access EOF actions. */
+
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = (yy_hold_char);
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
@@ -1095,7 +1019,6 @@ YY_RULE_SETUP
yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
YY_BREAK
case 33:
-/* rule 33 can match eol */
YY_RULE_SETUP
#line 109 "printrcl.l"
yylval.sval = q_strdup(yytext); DBG(tSTRING); return tSTRING;
@@ -1111,7 +1034,6 @@ YY_RULE_SETUP
yylval.sval = g_strdup(yytext); DBG(tWORD); return tWORD;
YY_BREAK
case 36:
-/* rule 36 can match eol */
YY_RULE_SETUP
#line 112 "printrcl.l"
DBG(PRINTRC_HDR); return PRINTRC_HDR;
@@ -1127,7 +1049,6 @@ YY_RULE_SETUP
DBG(comment1); /* Skip comments */
YY_BREAK
case 39:
-/* rule 39 can match eol */
YY_RULE_SETUP
#line 115 "printrcl.l"
DBG(newline); mylineno++;
@@ -1137,33 +1058,33 @@ YY_RULE_SETUP
#line 116 "printrcl.l"
ECHO;
YY_BREAK
-#line 1141 "printrcl.c"
+#line 1062 "printrcl.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
+ * consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1173,13 +1094,13 @@ case YY_STATE_EOF(INITIAL):
* end-of-buffer state). Contrast this with the test
* in input().
*/
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
@@ -1192,30 +1113,30 @@ case YY_STATE_EOF(INITIAL):
yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
+ yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
- yy_cp = (yy_c_buf_p);
+ yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
- else switch ( yy_get_next_buffer( ) )
+ else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
- (yy_did_buffer_switch_on_eof) = 0;
+ yy_did_buffer_switch_on_eof = 0;
- if ( yywrap( ) )
+ if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -1226,7 +1147,7 @@ case YY_STATE_EOF(INITIAL):
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
@@ -1234,30 +1155,30 @@ case YY_STATE_EOF(INITIAL):
else
{
- if ( ! (yy_did_buffer_switch_on_eof) )
+ if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
@@ -1268,7 +1189,8 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of yylex */
+ } /* end of yylex */
+
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1277,20 +1199,21 @@ case YY_STATE_EOF(INITIAL):
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-static int yy_get_next_buffer (void)
-{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
@@ -1310,30 +1233,34 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
- size_t num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
- (int) ((yy_c_buf_p) - b->yy_ch_buf);
+ (int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
@@ -1346,7 +1273,8 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1356,35 +1284,35 @@ static int yy_get_next_buffer (void)
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
- (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
-
+#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ yy_current_buffer->yy_n_chars = yy_n_chars;
}
- if ( (yy_n_chars) == 0 )
+ if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1392,31 +1320,32 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- (yy_n_chars) += number_to_move;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
- (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
-}
+ }
+
/* yy_get_previous_state - get the state just before the EOB char was reached */
- static yy_state_type yy_get_previous_state (void)
-{
+static yy_state_type yy_get_previous_state()
+ {
register yy_state_type yy_current_state;
register char *yy_cp;
-
- yy_current_state = (yy_start);
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ yy_current_state = yy_start;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1428,23 +1357,30 @@ static int yy_get_next_buffer (void)
}
return yy_current_state;
-}
+ }
+
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
-{
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1456,73 +1392,80 @@ static int yy_get_next_buffer (void)
yy_is_jam = (yy_current_state == 334);
return yy_is_jam ? 0 : yy_current_state;
-}
+ }
- static void yyunput (int c, register char * yy_bp )
-{
- register char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < yy_current_buffer->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 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+ &yy_current_buffer->yy_ch_buf[number_to_move];
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-#ifndef YY_NO_INPUT
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
#ifdef __cplusplus
- static int yyinput (void)
+static int yyinput()
#else
- static int input (void)
+static int input()
#endif
-
-{
+ {
int c;
-
- *(yy_c_buf_p) = (yy_hold_char);
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
- *(yy_c_buf_p) = '\0';
+ *yy_c_buf_p = '\0';
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
- ++(yy_c_buf_p);
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
- switch ( yy_get_next_buffer( ) )
+ switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
@@ -1536,16 +1479,16 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
- /*FALLTHROUGH*/
+ /* fall through */
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( yywrap() )
return EOF;
- if ( ! (yy_did_buffer_switch_on_eof) )
+ if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
@@ -1555,92 +1498,90 @@ static int yy_get_next_buffer (void)
}
case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
+ yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
- c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
- (yy_hold_char) = *++(yy_c_buf_p);
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
return c;
-}
-#endif /* ifndef YY_NO_INPUT */
+ }
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- *
- * @note This function does not reset the start condition to @c INITIAL .
- */
- void yyrestart (FILE * input_file )
-{
-
- if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
-}
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- *
- */
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
-{
-
- /* TODO. We should be able to replace this entire function body
- * with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
- */
- yyensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
return;
- if ( YY_CURRENT_BUFFER )
+ if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
}
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
- (yy_did_buffer_switch_on_eof) = 1;
-}
+ yy_did_buffer_switch_on_eof = 1;
+ }
-static void yy_load_buffer_state (void)
-{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- (yy_hold_char) = *(yy_c_buf_p);
-}
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
- * @return the allocated buffer state.
- */
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
-{
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1649,75 +1590,80 @@ static void yy_load_buffer_state (void)
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
-}
+ }
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- *
- */
- void yy_delete_buffer (YY_BUFFER_STATE b )
-{
-
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
if ( ! b )
return;
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ yy_flex_free( (void *) b->yy_ch_buf );
- yyfree((void *) b );
-}
+ yy_flex_free( (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.
- */
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
-{
- int oerrno = errno;
-
- yy_flush_buffer(b );
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
-
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
- errno = oerrno;
-}
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
- */
- void yy_flush_buffer (YY_BUFFER_STATE b )
-{
- if ( ! b )
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
return;
b->yy_n_chars = 0;
@@ -1734,121 +1680,29 @@ extern int isatty (int );
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- * the current state. This function will allocate the stack
- * if necessary.
- * @param new_buffer The new state.
- *
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
- if (new_buffer == NULL)
- return;
-
- yyensure_buffer_stack();
-
- /* This block is copied from yy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- /* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
- (yy_buffer_stack_top)++;
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- * The next element becomes the new top.
- *
- */
-void yypop_buffer_state (void)
-{
- if (!YY_CURRENT_BUFFER)
- return;
-
- yy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
- --(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
- }
-}
-
-/* Allocates the stack if it does not exist.
- * Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
- int num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
- /* First allocation is just for 2 elements, since we don't know if this
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- );
-
- memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
- (yy_buffer_stack_max) = num_to_alloc;
- (yy_buffer_stack_top) = 0;
- return;
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
}
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
-
- /* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
-
- num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
- ((yy_buffer_stack),
- num_to_alloc * sizeof(struct yy_buffer_state*)
- );
- /* zero only the new slots.*/
- memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- (yy_buffer_stack_max) = num_to_alloc;
- }
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
-{
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1862,42 +1716,47 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
-}
+ }
+#endif
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
- *
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- * yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
-{
-
- return yy_scan_bytes(yy_str,strlen(yy_str) );
-}
-/** 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.
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
-{
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
- buf = (char *) yyalloc(n );
+ buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -1906,7 +1765,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
@@ -1916,164 +1775,148 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
b->yy_is_our_buffer = 1;
return b;
-}
+ }
+#endif
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
-static void yy_fatal_error (yyconst char* msg )
-{
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
-}
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
-/* Redefine yyless() so it works in section 3 code. */
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
- } \
- while ( 0 )
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
-/* Accessor methods (get/set functions) to struct members. */
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
-/** Get the current line number.
- *
- */
-int yyget_lineno (void)
-{
-
- return yylineno;
-}
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
-/** Get the input stream.
- *
- */
-FILE *yyget_in (void)
-{
- return yyin;
-}
+ BEGIN(new_state);
+ }
+#endif
-/** Get the output stream.
- *
- */
-FILE *yyget_out (void)
-{
- return yyout;
-}
-/** Get the length of the current token.
- *
- */
-int yyget_leng (void)
-{
- return yyleng;
-}
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
-/** Get the current token.
- *
- */
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
-char *yyget_text (void)
-{
- return yytext;
-}
-/** Set the current line number.
- * @param line_number
- *
- */
-void yyset_lineno (int line_number )
-{
-
- yylineno = line_number;
-}
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- *
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE * in_str )
-{
- yyin = in_str ;
-}
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
-void yyset_out (FILE * out_str )
-{
- yyout = out_str ;
-}
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
-int yyget_debug (void)
-{
- return yy_flex_debug;
-}
-void yyset_debug (int bdebug )
-{
- yy_flex_debug = bdebug ;
-}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
-{
-
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
- }
+/* Redefine yyless() so it works in section 3 code. */
- /* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
- (yy_buffer_stack) = NULL;
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
- return 0;
-}
-/*
- * Internal utility routines.
- */
+/* Internal utility routines. */
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
register int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i )
s1[i] = s2[i];
-}
+ }
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
register int n;
- for ( n = 0; s[n]; ++n )
+ for ( n = 0; s[n]; ++n )
;
return n;
-}
+ }
#endif
-void *yyalloc (yy_size_t size )
-{
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
return (void *) malloc( size );
-}
+ }
-void *yyrealloc (void * ptr, yy_size_t size )
-{
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -2082,25 +1925,23 @@ void *yyrealloc (void * ptr, yy_size_t size )
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
-}
-
-void yyfree (void * ptr )
-{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
+ }
-#undef YY_NEW_FILE
-#undef YY_FLUSH_BUFFER
-#undef yy_set_bol
-#undef yy_new_buffer
-#undef yy_set_interactive
-#undef yytext_ptr
-#undef YY_DO_BEFORE_ACTION
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
-#ifdef YY_DECL_IS_OURS
-#undef YY_DECL_IS_OURS
-#undef YY_DECL
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
#endif
#line 116 "printrcl.l"
diff --git a/src/gutenprintui2/printrcy.c b/src/gutenprintui2/printrcy.c
index 4495ae6..0c96062 100644
--- a/src/gutenprintui2/printrcy.c
+++ b/src/gutenprintui2/printrcy.c
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875d. */
+/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -196,29 +196,22 @@ typedef int YYSTYPE;
/* Line 214 of yacc.c. */
-#line 200 "printrcy.c"
+#line 199 "printrcy.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
-# ifndef YYFREE
-# define YYFREE free
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# endif
-
/* The parser invokes alloca or malloc; define the necessary symbols. */
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# endif
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
# else
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
-# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# ifndef YYSTACK_USE_ALLOCA
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
# endif
# endif
# endif
@@ -231,20 +224,20 @@ typedef int YYSTYPE;
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
+# define YYSTACK_ALLOC malloc
+# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
- || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+ || (YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short int yyss;
+ short yyss;
YYSTYPE yyvs;
};
@@ -254,13 +247,13 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if defined (__GNUC__) && 1 < __GNUC__
+# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
@@ -296,7 +289,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
- typedef short int yysigned_char;
+ typedef short yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@@ -396,7 +389,7 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short int yyrline[] =
+static const unsigned short yyrline[] =
{
0, 100, 100, 111, 118, 128, 138, 148, 158, 164,
168, 172, 176, 180, 184, 188, 206, 210, 214, 217,
@@ -414,32 +407,32 @@ static const unsigned short int yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
- "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
- "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
- "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
- "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
- "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
- "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
- "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
- "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
- "Queue_Name", "Output_Filename", "Extra_Printer_Options",
- "Custom_Command", "Command_Type", "Scaling", "Orientation",
- "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
- "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
- "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
- "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter", "Parameters",
- "Standard_Value", "Standard_Values", "A_Printer", "Printers",
- "Current_Printer", "Show_All_Paper_Sizes", "Global", "Old_Globals",
- "New_Global_Setting", "Global_Setting", "Global_Settings",
- "Global_Subblock", "Global_Block", "Thing", 0
+ "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
+ "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
+ "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
+ "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
+ "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
+ "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
+ "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
+ "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
+ "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
+ "Queue_Name", "Output_Filename", "Extra_Printer_Options",
+ "Custom_Command", "Command_Type", "Scaling", "Orientation",
+ "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
+ "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
+ "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
+ "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter",
+ "Parameters", "Standard_Value", "Standard_Values", "A_Printer",
+ "Printers", "Current_Printer", "Show_All_Paper_Sizes", "Global",
+ "Old_Globals", "New_Global_Setting", "Global_Setting",
+ "Global_Settings", "Global_Subblock", "Global_Block", "Thing", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short int yytoknum[] =
+static const unsigned short yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -603,8 +596,7 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
+#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -638,11 +630,11 @@ while (0)
are run). */
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- ((Current).first_line = (Rhs)[1].first_line, \
- (Current).first_column = (Rhs)[1].first_column, \
- (Current).last_line = (Rhs)[N].last_line, \
- (Current).last_column = (Rhs)[N].last_column)
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ Current.first_line = Rhs[1].first_line; \
+ Current.first_column = Rhs[1].first_column; \
+ Current.last_line = Rhs[N].last_line; \
+ Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
@@ -686,17 +678,17 @@ do { \
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
+| TOP (cinluded). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (short int *bottom, short int *top)
+yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
- short int *bottom;
- short int *top;
+ short *bottom;
+ short *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@@ -726,9 +718,9 @@ yy_reduce_print (yyrule)
#endif
{
int yyi;
- unsigned int yylno = yyrline[yyrule];
+ unsigned int yylineno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylno);
+ yyrule - 1, yylineno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
@@ -765,7 +757,7 @@ int yydebug;
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
+#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
@@ -963,9 +955,9 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short int yyssa[YYINITDEPTH];
- short int *yyss = yyssa;
- register short int *yyssp;
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
@@ -1002,7 +994,6 @@ yyparse ()
yyssp = yyss;
yyvsp = yyvs;
-
goto yysetstate;
/*------------------------------------------------------------.
@@ -1028,7 +1019,7 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short int *yyss1 = yyss;
+ short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
@@ -1056,7 +1047,7 @@ yyparse ()
yystacksize = YYMAXDEPTH;
{
- short int *yyss1 = yyss;
+ short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
@@ -1463,8 +1454,8 @@ yyreduce:
}
-/* Line 1010 of yacc.c. */
-#line 1468 "printrcy.c"
+/* Line 991 of yacc.c. */
+#line 1458 "printrcy.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1505,33 +1496,18 @@ yyerrlab:
{
YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- const char* yyprefix;
char *yymsg;
- int yyx;
+ int yyx, yycount;
+ yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 0;
-
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
- yycount += 1;
- if (yycount == 5)
- {
- yysize = 0;
- break;
- }
- }
- yysize += (sizeof ("syntax error, unexpected ")
- + yystrlen (yytname[yytype]));
+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+ yysize += yystrlen ("syntax error, unexpected ") + 1;
+ yysize += yystrlen (yytname[yytype]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
@@ -1540,13 +1516,16 @@ yyerrlab:
if (yycount < 5)
{
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ yycount = 0;
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *));
+ yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
- yyp = yystpcpy (yyp, yyprefix);
+ const char *yyq = ! yycount ? ", expecting " : " or ";
+ yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
- yyprefix = " or ";
+ yycount++;
}
}
yyerror (yymsg);
@@ -1567,56 +1546,52 @@ yyerrlab:
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
- if (yychar <= YYEOF)
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
{
- /* If at end of input, pop the error token,
- then the rest of the stack, then return failure. */
- if (yychar == YYEOF)
- for (;;)
- {
- YYPOPSTACK;
- if (yyssp == yyss)
- YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[*yyssp], yyvsp);
- }
+ /* Pop the error token. */
+ YYPOPSTACK;
+ /* Pop the rest of the stack. */
+ while (yyss < yyssp)
+ {
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
+ YYABORT;
}
- else
- {
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
}
/* Else will try to reuse lookahead token after shifting the error
token. */
- goto yyerrlab1;
+ goto yyerrlab2;
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
+/*----------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action. |
+`----------------------------------------------------*/
+yyerrlab1:
-#ifdef __GNUC__
- /* Pacify GCC when the user code never invokes YYERROR and the label
- yyerrorlab therefore never appears in user code. */
- if (0)
- goto yyerrorlab;
+ /* Suppress GCC warning that yyerrlab1 is unused when no action
+ invokes YYERROR. */
+#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
+ && !defined __cplusplus
+ __attribute__ ((__unused__))
#endif
- yyvsp -= yylen;
- yyssp -= yylen;
- yystate = *yyssp;
- goto yyerrlab1;
+ goto yyerrlab2;
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
+
+/*---------------------------------------------------------------.
+| yyerrlab2 -- pop states until the error token can be shifted. |
+`---------------------------------------------------------------*/
+yyerrlab2:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1639,8 +1614,9 @@ yyerrlab1:
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
yydestruct (yystos[yystate], yyvsp);
- YYPOPSTACK;
- yystate = *yyssp;
+ yyvsp--;
+ yystate = *--yyssp;
+
YY_STACK_PRINT (yyss, yyssp);
}
diff --git a/src/gutenprintui2/printrcy.h b/src/gutenprintui2/printrcy.h
index 2273fb7..afa662b 100644
--- a/src/gutenprintui2/printrcy.h
+++ b/src/gutenprintui2/printrcy.h
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875d. */
+/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/main/Makefile.in b/src/main/Makefile.in
index 4eeda81..1bd64de 100644
--- a/src/main/Makefile.in
+++ b/src/main/Makefile.in
@@ -368,7 +368,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/main/channel.c b/src/main/channel.c
index ca676bb..88d316d 100644
--- a/src/main/channel.c
+++ b/src/main/channel.c
@@ -1,5 +1,5 @@
/*
- * "$Id: channel.c,v 1.26 2005/06/14 02:49:09 rlk Exp $"
+ * "$Id: channel.c,v 1.29 2005/07/14 23:43:30 rlk Exp $"
*
* Dither routine entrypoints
*
@@ -67,15 +67,19 @@ typedef struct
unsigned channel_count;
unsigned total_channels;
unsigned input_channels;
+ unsigned gcr_channels;
+ unsigned aux_output_channels;
size_t width;
int initialized;
unsigned ink_limit;
unsigned max_density;
stpi_channel_t *c;
+ stp_curve_t *gcr_curve;
unsigned curve_count;
unsigned gloss_limit;
unsigned short *input_data;
unsigned short *multi_tmp;
+ unsigned short *gcr_data;
unsigned short *split_input;
unsigned short *output_data;
unsigned short *alloc_data_1;
@@ -116,8 +120,14 @@ stpi_channel_clear(void *vc)
STP_SAFE_FREE(cg->alloc_data_2);
STP_SAFE_FREE(cg->alloc_data_3);
STP_SAFE_FREE(cg->c);
+ if (cg->gcr_curve)
+ {
+ stp_curve_destroy(cg->gcr_curve);
+ cg->gcr_curve = NULL;
+ }
cg->channel_count = 0;
cg->curve_count = 0;
+ cg->aux_output_channels = 0;
cg->total_channels = 0;
cg->input_channels = 0;
cg->initialized = 0;
@@ -338,6 +348,31 @@ stp_channel_get_cutoff_adjustment(stp_vars_t *v, int color, int subchannel)
}
void
+stp_channel_set_gcr_curve(stp_vars_t *v, const stp_curve_t *curve)
+{
+ stpi_channel_group_t *cg =
+ ((stpi_channel_group_t *) stp_get_component_data(v, "Channel"));
+ if (!cg)
+ return;
+ stp_dprintf(STP_DBG_INK, v, "set_gcr_curve\n");
+ if (curve)
+ cg->gcr_curve = stp_curve_create_copy(curve);
+ else
+ cg->gcr_curve = NULL;
+}
+
+const stp_curve_t *
+stp_channel_get_gcr_curve(stp_vars_t *v)
+{
+ stpi_channel_group_t *cg =
+ ((stpi_channel_group_t *) stp_get_component_data(v, "Channel"));
+ if (!cg)
+ return NULL;
+ stp_dprintf(STP_DBG_INK, v, "set_gcr_curve\n");
+ return cg->gcr_curve;
+}
+
+void
stp_channel_set_curve(stp_vars_t *v, int color, const stp_curve_t *curve)
{
stpi_channel_t *ch;
@@ -380,6 +415,14 @@ input_has_special_channels(const stp_vars_t *v)
}
static int
+output_needs_gcr(const stp_vars_t *v)
+{
+ const stpi_channel_group_t *cg =
+ ((const stpi_channel_group_t *) stp_get_component_data(v, "Channel"));
+ return (cg->gcr_curve && cg->black_channel == 0);
+}
+
+static int
output_has_gloss(const stp_vars_t *v)
{
const stpi_channel_group_t *cg =
@@ -393,7 +436,7 @@ input_needs_splitting(const stp_vars_t *v)
const stpi_channel_group_t *cg =
((const stpi_channel_group_t *) stp_get_component_data(v, "Channel"));
#if 0
- return cg->total_channels != cg->input_channels;
+ return cg->total_channels != cg->aux_output_channels;
#else
int i;
if (!cg || cg->channel_count <= 0)
@@ -474,6 +517,8 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image,
double lower_val = base * (1.0 - where);
double lower_amount = lower_val / this_val;
double upper_amount = (val - lower_val) / next_val;
+ if (lower_amount > 65535.0)
+ lower_amount = 65535.0;
c->lut[val * sc + sc - k - 2] = upper_amount;
c->lut[val * sc + sc - k - 1] = lower_amount;
val++;
@@ -485,6 +530,8 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image,
val++;
}
}
+ if (cg->gloss_channel != i && c->subchannel_count > 0)
+ cg->aux_output_channels++;
cg->total_channels += c->subchannel_count;
for (j = 0; j < c->subchannel_count; j++)
cg->max_density += c->sc[j].s_density;
@@ -506,21 +553,29 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image,
cg->output_data = cg->alloc_data_1;
if (curve_count == 0)
{
+ cg->gcr_channels = cg->input_channels;
if (input_needs_splitting(v))
{
cg->alloc_data_2 =
stp_malloc(sizeof(unsigned short) * cg->input_channels * width);
cg->input_data = cg->alloc_data_2;
cg->split_input = cg->input_data;
+ cg->gcr_data = cg->split_input;
}
else if (cg->gloss_channel != -1)
{
cg->alloc_data_2 =
stp_malloc(sizeof(unsigned short) * cg->input_channels * width);
cg->input_data = cg->alloc_data_2;
+ cg->gcr_data = cg->output_data;
+ cg->gcr_channels = cg->total_channels;
}
else
- cg->input_data = cg->output_data;
+ {
+ cg->input_data = cg->output_data;
+ cg->gcr_data = cg->output_data;
+ }
+ cg->aux_output_channels = cg->gcr_channels;
}
else
{
@@ -530,19 +585,25 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image,
if (input_needs_splitting(v))
{
cg->alloc_data_3 =
- stp_malloc(sizeof(unsigned short) * cg->channel_count * width);
+ stp_malloc(sizeof(unsigned short) * cg->aux_output_channels * width);
cg->multi_tmp = cg->alloc_data_3;
cg->split_input = cg->multi_tmp;
+ cg->gcr_data = cg->split_input;
}
else
{
cg->multi_tmp = cg->alloc_data_1;
+ cg->gcr_data = cg->output_data;
+ cg->aux_output_channels = cg->total_channels;
}
+ cg->gcr_channels = cg->aux_output_channels;
}
stp_dprintf(STP_DBG_INK, v, "stp_channel_initialize:\n");
stp_dprintf(STP_DBG_INK, v, " channel_count %d\n", cg->channel_count);
stp_dprintf(STP_DBG_INK, v, " total_channels %d\n", cg->total_channels);
stp_dprintf(STP_DBG_INK, v, " input_channels %d\n", cg->input_channels);
+ stp_dprintf(STP_DBG_INK, v, " aux_channels %d\n", cg->aux_output_channels);
+ stp_dprintf(STP_DBG_INK, v, " gcr_channels %d\n", cg->gcr_channels);
stp_dprintf(STP_DBG_INK, v, " width %d\n", cg->width);
stp_dprintf(STP_DBG_INK, v, " ink_limit %d\n", cg->ink_limit);
stp_dprintf(STP_DBG_INK, v, " gloss_limit %d\n", cg->gloss_limit);
@@ -550,6 +611,7 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image,
stp_dprintf(STP_DBG_INK, v, " curve_count %d\n", cg->curve_count);
stp_dprintf(STP_DBG_INK, v, " black_channel %d\n", cg->black_channel);
stp_dprintf(STP_DBG_INK, v, " gloss_channel %d\n", cg->gloss_channel);
+ stp_dprintf(STP_DBG_INK, v, " gloss_physical %d\n", cg->gloss_physical_channel);
stp_dprintf(STP_DBG_INK, v, " input_data %p\n",
(void *) cg->input_data);
stp_dprintf(STP_DBG_INK, v, " multi_tmp %p\n",
@@ -558,12 +620,16 @@ stp_channel_initialize(stp_vars_t *v, stp_image_t *image,
(void *) cg->split_input);
stp_dprintf(STP_DBG_INK, v, " output_data %p\n",
(void *) cg->output_data);
+ stp_dprintf(STP_DBG_INK, v, " gcr_data %p\n",
+ (void *) cg->gcr_data);
stp_dprintf(STP_DBG_INK, v, " alloc_data_1 %p\n",
(void *) cg->alloc_data_1);
stp_dprintf(STP_DBG_INK, v, " alloc_data_2 %p\n",
(void *) cg->alloc_data_2);
stp_dprintf(STP_DBG_INK, v, " alloc_data_3 %p\n",
(void *) cg->alloc_data_3);
+ stp_dprintf(STP_DBG_INK, v, " gcr_curve %p\n",
+ (void *) cg->gcr_curve);
for (i = 0; i < cg->channel_count; i++)
{
stp_dprintf(STP_DBG_INK, v, " Channel %d:\n", i);
@@ -673,13 +739,29 @@ limit_ink(const stp_vars_t *v)
}
static inline int
-mem_eq(const unsigned short *i1, const unsigned short *i2, int count)
+short_eq(const unsigned short *i1, const unsigned short *i2, size_t count)
{
+#if 1
int i;
for (i = 0; i < count; i++)
if (i1[i] != i2[i])
return 0;
return 1;
+#else
+ return !memcmp(i1, i2, count * sizeof(unsigned short));
+#endif
+}
+
+static inline void
+short_copy(unsigned short *out, const unsigned short *in, size_t count)
+{
+#if 1
+ int i;
+ for (i = 0; i < count; i++)
+ out[i] = in[i];
+#else
+ (void) memcpy(out, in, count * sizeof(unsigned short));
+#endif
}
static void
@@ -746,19 +828,20 @@ generate_special_channels(const stp_vars_t *v)
const unsigned short *output_cache = NULL;
const unsigned short *input = cg->input_data;
unsigned short *output = cg->multi_tmp;
- int outbytes = cg->channel_count * sizeof(unsigned short);
+ int offset = (cg->black_channel >= 0 ? 0 : -1);
+ int outbytes = cg->aux_output_channels * sizeof(unsigned short);
for (i = 0; i < cg->width;
- input += cg->input_channels, output += cg->channel_count, i++)
+ input += cg->input_channels, output += cg->aux_output_channels, i++)
{
- if (input_cache && mem_eq(input_cache, input, cg->input_channels))
+ if (input_cache && short_eq(input_cache, input, cg->input_channels))
{
memcpy(output, output_cache, outbytes);
}
else
{
- int c = input[STP_ECOLOR_C];
- int m = input[STP_ECOLOR_M];
- int y = input[STP_ECOLOR_Y];
+ int c = input[STP_ECOLOR_C + offset];
+ int m = input[STP_ECOLOR_M + offset];
+ int y = input[STP_ECOLOR_Y + offset];
int min = FMIN(c, FMIN(m, y));
int max = FMAX(c, FMAX(m, y));
if (max > min) /* Otherwise it's gray, and we don't care */
@@ -775,24 +858,28 @@ generate_special_channels(const stp_vars_t *v)
m -= min;
y -= min;
max -= min;
- output[STP_ECOLOR_K] = input[STP_ECOLOR_K];
+ if (offset == 0)
+ output[STP_ECOLOR_K] = input[STP_ECOLOR_K];
hue = compute_hue(c, m, y, max);
- for (j = 1; j < cg->channel_count; j++)
+ for (j = 1; j < cg->aux_output_channels - offset; j++)
{
stpi_channel_t *ch = &(cg->c[j]);
- output[j] =
- max * interpolate_value(ch->hue_map,
- hue * ch->h_count / 6.0);
+ if (ch->hue_map)
+ output[j + offset] =
+ max * interpolate_value(ch->hue_map,
+ hue * ch->h_count / 6.0);
+ else
+ output[j + offset] = 0;
}
- output[STP_ECOLOR_C] += min;
- output[STP_ECOLOR_M] += min;
- output[STP_ECOLOR_Y] += min;
+ output[STP_ECOLOR_C + offset] += min;
+ output[STP_ECOLOR_M + offset] += min;
+ output[STP_ECOLOR_Y + offset] += min;
}
else
{
- for (j = 0; j < 4; j++)
+ for (j = 0; j < 4 + offset; j++)
output[j] = input[j];
- for (j = 4; j < cg->channel_count; j++)
+ for (j = 4 + offset; j < cg->aux_output_channels; j++)
output[j] = 0;
}
}
@@ -818,10 +905,10 @@ split_channels(const stp_vars_t *v, unsigned *zero_mask)
for (i = 0; i < cg->width; i++)
{
int zero_ptr = 0;
- if (input_cache && mem_eq(input_cache, input, cg->input_channels))
+ if (input_cache && short_eq(input_cache, input, cg->aux_output_channels))
{
memcpy(output, output_cache, outbytes);
- input += cg->input_channels;
+ input += cg->aux_output_channels;
output += cg->total_channels;
}
else
@@ -832,7 +919,7 @@ split_channels(const stp_vars_t *v, unsigned *zero_mask)
output_cache = output;
if (cg->black_channel >= 0)
black_value = input[cg->black_channel];
- for (j = 0; j < cg->channel_count; j++)
+ for (j = 0; j < cg->aux_output_channels; j++)
{
if (input[j] < virtual_black && j != cg->black_channel)
virtual_black = input[j];
@@ -985,6 +1072,40 @@ generate_gloss(const stp_vars_t *v, unsigned *zero_mask)
}
}
+static void
+do_gcr(const stp_vars_t *v)
+{
+ stpi_channel_group_t *cg =
+ ((stpi_channel_group_t *) stp_get_component_data(v, "Channel"));
+ const unsigned short *gcr_lookup;
+ unsigned short *output = cg->gcr_data;
+ size_t count;
+ double cb = stp_get_float_parameter(v, "CyanBalance");
+ double mb = stp_get_float_parameter(v, "MagentaBalance");
+ double yb = stp_get_float_parameter(v, "YellowBalance");
+ int i;
+
+ stp_curve_resample(cg->gcr_curve, 65536);
+ gcr_lookup = stp_curve_get_ushort_data(cg->gcr_curve, &count);
+ for (i = 0; i < cg->width; i++)
+ {
+ unsigned k = output[0];
+ if (k > 0)
+ {
+ int kk = gcr_lookup[k];
+ int ck;
+ if (kk > k)
+ kk = k;
+ ck = k - kk;
+ output[0] = kk;
+ output[1] += ck * cb;
+ output[2] += ck * mb;
+ output[3] += ck * yb;
+ }
+ output += cg->gcr_channels;
+ }
+}
+
void
stp_channel_convert(const stp_vars_t *v, unsigned *zero_mask)
{
@@ -992,6 +1113,8 @@ stp_channel_convert(const stp_vars_t *v, unsigned *zero_mask)
generate_special_channels(v);
else if (output_has_gloss(v) && !input_needs_splitting(v))
copy_channels(v);
+ if (output_needs_gcr(v))
+ do_gcr(v);
if (input_needs_splitting(v))
split_channels(v, zero_mask);
else
diff --git a/src/main/color-conversion.h b/src/main/color-conversion.h
index ed87811..28deb53 100644
--- a/src/main/color-conversion.h
+++ b/src/main/color-conversion.h
@@ -1,5 +1,5 @@
/*
- * "$Id: color-conversion.h,v 1.9 2005/06/30 01:34:58 rlk Exp $"
+ * "$Id: color-conversion.h,v 1.10 2005/07/04 00:23:54 rlk Exp $"
*
* Gutenprint color management module - traditional Gimp-Print algorithm.
*
@@ -163,7 +163,6 @@ typedef struct
stp_cached_curve_t hue_map;
stp_cached_curve_t lum_map;
stp_cached_curve_t sat_map;
- stp_cached_curve_t gcr_curve;
unsigned short *gray_tmp; /* Color -> Gray */
unsigned short *cmy_tmp; /* CMY -> CMYK */
unsigned char *in_data;
diff --git a/src/main/color-conversions.c b/src/main/color-conversions.c
index 2b354c6..1959613 100644
--- a/src/main/color-conversions.c
+++ b/src/main/color-conversions.c
@@ -1,5 +1,5 @@
/*
- * "$Id: color-conversions.c,v 1.18 2005/07/01 01:40:08 rlk Exp $"
+ * "$Id: color-conversions.c,v 1.20 2005/07/04 00:23:54 rlk Exp $"
*
* Gimp-Print color management module - traditional Gimp-Print algorithm.
*
@@ -366,107 +366,6 @@ short_copy(unsigned short *out, const unsigned short *in, size_t count)
}
static unsigned
-generic_cmy_to_kcmy(const stp_vars_t *vars, const unsigned short *in,
- unsigned short *out)
-{
- lut_t *lut = (lut_t *)(stp_get_component_data(vars, "Color"));
- int width = lut->image_width;
- int step = 65535 / (lut->steps - 1); /* 1 or 257 */
-
- const unsigned short *gcr_lookup;
- const unsigned short *black_lookup;
- int i;
- int i0 = -1;
- int i1 = -1;
- int i2 = -1;
- unsigned short o0 = 0;
- unsigned short o1 = 0;
- unsigned short o2 = 0;
- unsigned short o3 = 0;
- unsigned short nz0 = 0;
- unsigned short nz1 = 0;
- unsigned short nz2 = 0;
- unsigned short nz3 = 0;
-
- stp_curve_resample(stp_curve_cache_get_curve(&(lut->gcr_curve)), lut->steps);
- gcr_lookup = stp_curve_cache_get_ushort_data(&(lut->gcr_curve));
- stp_curve_resample(stp_curve_cache_get_curve
- (&(lut->channel_curves[CHANNEL_K])), lut->steps);
- black_lookup =
- stp_curve_cache_get_ushort_data(&(lut->channel_curves[CHANNEL_K]));
-
- for (i = 0; i < width; i++, out += 4, in += 3)
- {
- if (i0 == in[0] && i1 == in[1] && i2 == in[2])
- {
- out[0] = o0;
- out[1] = o1;
- out[2] = o2;
- out[3] = o3;
- }
- else
- {
- int k;
- i0 = in[0];
- i1 = in[1];
- i2 = in[2];
- k = FMIN(i0, FMIN(i1, i2));
- out[0] = 0;
- out[1] = i0;
- out[2] = i1;
- out[3] = i2;
- if (k > 0)
- {
- int where, resid;
- int kk;
- if (lut->steps == 65536)
- kk = gcr_lookup[k];
- else
- {
- where = k / step;
- resid = k % step;
- kk = gcr_lookup[where];
- if (resid > 0)
- kk += (gcr_lookup[where + 1] - gcr_lookup[where]) * resid /
- step;
- }
- if (kk > k)
- kk = k;
- if (kk > 0)
- {
- if (lut->steps == 65536)
- out[0] = black_lookup[kk];
- else
- {
- int k_out;
- where = kk / step;
- resid = kk % step;
- k_out = black_lookup[where];
- if (resid > 0)
- k_out +=
- (black_lookup[where + 1] - black_lookup[where]) *
- resid / step;
- out[0] = k_out;
- }
- out[1] -= kk;
- out[2] -= kk;
- out[3] -= kk;
- }
- }
- o0 = out[0];
- o1 = out[1];
- o2 = out[2];
- o3 = out[3];
- nz0 |= o0;
- nz1 |= o1;
- nz2 |= o2;
- nz3 |= o3;
- }
- }
- return (nz0 ? 0 : 1) + (nz1 ? 0 : 2) + (nz2 ? 0 : 4) + (nz3 ? 0 : 8);
-}
-
-static unsigned
raw_cmy_to_kcmy(const stp_vars_t *vars, const unsigned short *in,
unsigned short *out)
{
@@ -881,20 +780,20 @@ name##_##bits##_to_##name2(const stp_vars_t *vars, const unsigned char *in, \
return status; \
}
-COLOR_TO_KCMY_FUNC(gray, kcmy, color, generic, 8)
-COLOR_TO_KCMY_FUNC(gray, kcmy, color, generic, 16)
+COLOR_TO_KCMY_FUNC(gray, kcmy, color, raw, 8)
+COLOR_TO_KCMY_FUNC(gray, kcmy, color, raw, 16)
GENERIC_COLOR_FUNC(gray, kcmy)
COLOR_TO_KCMY_FUNC(gray, kcmy_raw, color_raw, raw, 8)
COLOR_TO_KCMY_FUNC(gray, kcmy_raw, color_raw, raw, 16)
GENERIC_COLOR_FUNC(gray, kcmy_raw)
-COLOR_TO_KCMY_FUNC(color, kcmy, color, generic, 8)
-COLOR_TO_KCMY_FUNC(color, kcmy, color, generic, 16)
+COLOR_TO_KCMY_FUNC(color, kcmy, color, raw, 8)
+COLOR_TO_KCMY_FUNC(color, kcmy, color, raw, 16)
GENERIC_COLOR_FUNC(color, kcmy)
-COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, generic, 8)
-COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, generic, 16)
+COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, raw, 8)
+COLOR_TO_KCMY_FUNC(color, kcmy_fast, color_fast, raw, 16)
GENERIC_COLOR_FUNC(color, kcmy_fast)
COLOR_TO_KCMY_FUNC(color, kcmy_raw, color_raw, raw, 8)
diff --git a/src/main/escp2-channels.c b/src/main/escp2-channels.c
index 7d9a839..2946e06 100644
--- a/src/main/escp2-channels.c
+++ b/src/main/escp2-channels.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-channels.c,v 1.54 2005/06/26 22:07:46 rlk Exp $"
+ * "$Id: escp2-channels.c,v 1.56 2005/07/03 22:13:36 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -165,7 +165,7 @@ static hue_curve_t r800_red_curve =
"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
/* C */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* B */
/* B */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* M */
- /* M */ "0.000 0.350 0.550 0.700 0.850 1.000 1.000 1.000 " /* R */
+ /* M */ "0.025 0.400 0.600 0.750 0.890 1.000 1.000 1.000 " /* R */
/* R */ "1.000 0.875 0.750 0.625 0.500 0.375 0.250 0.125 " /* Y */
/* Y */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* G */
/* G */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* C */
@@ -181,9 +181,9 @@ static hue_curve_t r800_blue_curve =
"<gutenprint>\n"
"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
- /* C */ "0.000 0.125 0.250 0.375 0.500 0.625 0.750 0.875 " /* B */
- /* B */ "1.000 1.000 1.000 1.000 0.900 0.800 0.500 0.200 " /* M */
- /* M */ "0.005 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* R */
+ /* C */ "0.000 0.250 0.475 0.700 0.810 0.875 0.940 1.000 " /* B */
+ /* B */ "1.000 0.975 0.930 0.875 0.810 0.740 0.650 0.400 " /* M */
+ /* M */ "0.040 0.002 0.000 0.000 0.000 0.000 0.000 0.000 " /* R */
/* R */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* Y */
/* Y */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* G */
/* G */ "0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 " /* C */
@@ -1725,8 +1725,8 @@ static const shade_set_t photo_gen2_shades = /* Stylus 870 and newer */
static const shade_set_t photo_gen3_shades = /* Stylus R300 and newer */
{
{ 1, { 1.0 }},
- { 2, { 1.0, 0.35 }},
- { 2, { 1.0, 0.35 }},
+ { 2, { 1.0, 0.3 }},
+ { 2, { 1.0, 0.3 }},
{ 1, { 1.0 }},
{ 1, { 1.0 }},
{ 1, { 1.0 }},
diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c
index ce892b4..90d59e7 100644
--- a/src/main/escp2-papers.c
+++ b/src/main/escp2-papers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-papers.c,v 1.75 2005/07/01 01:40:09 rlk Exp $"
+ * "$Id: escp2-papers.c,v 1.77 2005/07/03 22:13:36 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -156,8 +156,8 @@ static const char photo3_hue_adj[] =
"<gutenprint>\n"
"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
"<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n"
-/* C */ "0.00 0.00 0.00 -.02 -.04 -.08 -.12 -.16 " /* B */
-/* B */ "-.20 -.24 -.28 -.32 -.32 -.32 -.32 -.32 " /* M */
+/* C */ "0.00 -.01 -.03 -.06 -.10 -.15 -.20 -.25 " /* B */
+/* B */ "-.28 -.30 -.34 -.35 -.35 -.34 -.33 -.33 " /* M */
/* M */ "-.36 -.40 -.44 -.48 -.50 -.45 -.40 -.30 " /* R */
/* R */ "-.12 -.07 -.04 -.02 0.00 0.00 0.00 0.00 " /* Y */
/* Y */ "0.00 -.00 -.00 -.00 -.02 -.04 -.08 -.13 " /* G */
@@ -416,7 +416,7 @@ static const char r800_glossy_lum_adj[] =
"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
/* C */ "0.75 0.75 0.75 0.75 0.76 0.80 0.85 0.90 " /* B */
-/* B */ "0.90 0.88 0.82 0.78 0.78 0.82 0.85 0.92 " /* M */
+/* B */ "0.90 0.88 0.82 0.85 0.87 0.89 0.91 0.95 " /* M */
/* M */ "0.98 0.98 0.97 0.97 0.96 0.96 0.96 0.96 " /* R */
/* R */ "0.96 0.97 0.98 0.98 0.99 1.00 1.00 1.00 " /* Y */
/* Y */ "1.00 1.00 1.00 0.99 0.98 0.97 0.96 0.93 " /* G */
@@ -431,7 +431,7 @@ static const char r800_glossy_hue_adj[] =
"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
"<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n"
/* C */ "0.00 -.07 -.10 -.15 -.19 -.25 -.30 -.35 " /* B */
-/* B */ "-.38 -.38 -.30 -.20 -.10 -.00 0.02 0.02 " /* M */
+/* B */ "-.38 -.38 -.30 -.20 -.10 -.00 0.00 0.00 " /* M */
/* M */ "-.00 -.00 -.00 -.00 -.00 -.00 -.00 0.00 " /* R */
/* R */ "0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 " /* Y */
/* Y */ "0.00 -.00 -.00 -.00 -.00 -.00 -.00 -.00 " /* G */
@@ -590,43 +590,43 @@ DECLARE_PAPER_ADJUSTMENTS(photo2);
static const paper_adjustment_t photo3_adjustments[] =
{
- { "Plain", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0,
+ { "Plain", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "PlainFast", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0,
+ { "PlainFast", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Postcard", 0.83, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0,
+ { "Postcard", 0.83, .35, 0.5, .2, .9, 1, .59, .7, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "GlossyFilm", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1,
+ { "GlossyFilm", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Transparency", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1,
+ { "Transparency", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Envelope", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1.0,
+ { "Envelope", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "BackFilm", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1,
+ { "BackFilm", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Matte", 0.85, .75, 0.75, .3, .999, 1, .525, .816, .75, 1, 1,
+ { "Matte", 0.85, .35, 0.75, .3, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "MatteHeavy", 0.85, .75, .3, .2, .999, 1, .525, .816, .75, 1, 1,
+ { "MatteHeavy", 0.85, .35, .3, .3, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Inkjet", 0.85, .5, 0.75, .15, .9, 1, .525, .816, .75, 1, 1,
+ { "Inkjet", 0.85, .35, 0.75, .2, .9, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Coated", 1.2, .5, .75, .15, .999, 1, .525, .816, .75, 1, 1,
+ { "Coated", 1.2, .35, .5, .3, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Photo", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1,
+ { "Photo", 1.00, .35, 0.5, .3, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "GlossyPhoto", 1.0, .25, 0.5, .3, .999, 1, .6, .82, .66, 1, 0.85,
+ { "GlossyPhoto", 1.0, .25, 0.5, .3, .999, 1, .6, .83, .66, 1, 0.85,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Semigloss", 1.0, .25, 0.5, .3, .999, 1, .525, .816, .75, 1, 0.92,
+ { "Semigloss", 1.0, .25, 0.5, .3, .999, 1, .59, .7, .9, 1, 0.92,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Luster", 1.0, .25, 0.5, .3, .999, 1, .525, .816, .75, 1, 0.92,
+ { "Luster", 1.0, .25, 0.5, .3, .999, 1, .59, .7, .9, 1, 0.92,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "GlossyPaper", 1.00, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1,
+ { "GlossyPaper", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Ilford", .85, .5, 0.75, .2, .999, 1, .525, .816, .75, 1, 1,
+ { "Ilford", .85, .25, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "ColorLife", 1.00, .5, 0.75, .2, .9, 1, .525, .816, .75, 1, 1,
+ { "ColorLife", 1.00, .35, 0.75, .2, .9, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Other", 0.738, .5, 0.75, .1, .9, 1, .525, .816, .75, 1, 1,
+ { "Other", 0.738, .35, 0.5, .5, .9, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
};
@@ -772,47 +772,47 @@ DECLARE_PAPER_ADJUSTMENTS(ultrachrome_matte);
static const paper_adjustment_t r800_photo_adjustments[] =
{
- { "Plain", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Plain", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "PlainFast", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "PlainFast", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Postcard", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Postcard", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "GlossyFilm", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "GlossyFilm", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Transparency", 0.83, .75, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Transparency", 0.83, .75, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Envelope", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Envelope", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "BackFilm", 0.83, .75, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "BackFilm", 0.83, .75, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Glossy", 0.92, 0.4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Glossy", 0.92, 0.4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "GlossyHeavy", 0.92, 0.4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "GlossyHeavy", 0.92, 0.4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Inkjet", 0.72, .5, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Inkjet", 0.72, .5, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Coated", 0.83, .5, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Coated", 0.83, .5, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Photo", 1.0, .75, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Photo", 1.0, .75, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "GlossyPhoto", 0.72, 1, 1, .1, 0.5, .882, 1, .300, 1, 1, 0.92,
+ { "GlossyPhoto", 0.72, 1, 1, .02, 0.3, .882, 1, .300, 1, 1, 0.92,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Semigloss", 0.72, .8, 1, .1, 0.5, .882, 1, .300, 1, 1, 0.92,
+ { "Semigloss", 0.72, .8, 1, .02, 0.3, .882, 1, .300, 1, 1, 0.92,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Luster", 0.72, .8, 1, .1, .5, .882, 1, .300, 1, 1, 0.92,
+ { "Luster", 0.72, .8, 1, .02, .3, .882, 1, .300, 1, 1, 0.92,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "ArchivalGlossy", 0.92, .4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "ArchivalGlossy", 0.92, .4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "WaterColorRadiant", 0.92, .4, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "WaterColorRadiant", 0.92, .4, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "GlossyPaper", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "GlossyPaper", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Ilford", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Ilford", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "ColorLife", 0.83, 1.0, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "ColorLife", 0.83, 1.0, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
- { "Other", 0.72, .1, 1, .1, 0.5, .882, 1, .300, 1, 1, 1.0,
+ { "Other", 0.72, .1, 1, .02, 0.3, .882, 1, .300, 1, 1, 1.0,
r800_glossy_hue_adj, r800_glossy_lum_adj, r800_glossy_sat_adj },
};
diff --git a/src/main/print-canon.c b/src/main/print-canon.c
index a07699c..f5a5496 100644
--- a/src/main/print-canon.c
+++ b/src/main/print-canon.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-canon.c,v 1.155 2005/05/08 03:10:37 rlk Exp $"
+ * "$Id: print-canon.c,v 1.156 2005/07/03 22:13:36 rlk Exp $"
*
* Print plug-in CANON BJL driver for the GIMP.
*
@@ -1277,32 +1277,32 @@ static const float_param_t float_parameters[] =
{
{
{
- "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"),
- N_("Adjust the cyan balance"),
+ "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"),
+ N_("Adjust the cyan density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"),
- N_("Adjust the magenta balance"),
+ "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"),
+ N_("Adjust the magenta density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"),
- N_("Adjust the yellow balance"),
+ "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"),
+ N_("Adjust the yellow density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"),
- N_("Adjust the black balance"),
+ "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"),
+ N_("Adjust the black density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0
}, 0.0, 2.0, 1.0, 1
diff --git a/src/main/print-color.c b/src/main/print-color.c
index b381667..b6ebb71 100644
--- a/src/main/print-color.c
+++ b/src/main/print-color.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-color.c,v 1.129 2005/06/30 01:45:19 rlk Exp $"
+ * "$Id: print-color.c,v 1.131 2005/07/04 00:23:54 rlk Exp $"
*
* Gutenprint color management module - traditional Gutenprint algorithm.
*
@@ -282,7 +282,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the red gamma"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 1, 1, 0
- }, 0.0, 4.0, 1.0, CMASK_R, 1
+ }, 0.0, 1.0, 1.0, CMASK_R, 1
},
{
{
@@ -310,6 +310,30 @@ static const float_param_t float_parameters[] =
},
{
{
+ "CyanBalance", N_("Cyan Balance"), N_("GrayBalance"),
+ N_("Adjust the cyan gray balance"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 1, 1, 0
+ }, 0.0, 1.0, 1.0, CMASK_C, 1
+ },
+ {
+ {
+ "MagentaBalance", N_("Magenta Balance"), N_("GrayBalance"),
+ N_("Adjust the magenta gray balance"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 2, 1, 0
+ }, 0.0, 1.0, 1.0, CMASK_M, 1
+ },
+ {
+ {
+ "YellowBalance", N_("Yellow Balance"), N_("GrayBalance"),
+ N_("Adjust the yellow gray balance"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 3, 1, 0
+ }, 0.0, 1.0, 1.0, CMASK_Y, 1
+ },
+ {
+ {
"Saturation", N_("Saturation"), N_("Basic Image Adjustment"),
N_("Adjust the saturation (color balance) of the print\n"
"Use zero saturation to produce grayscale output "
@@ -701,7 +725,6 @@ copy_lut(void *vlut)
stp_curve_cache_copy(&(dest->hue_map), &(src->hue_map));
stp_curve_cache_copy(&(dest->lum_map), &(src->lum_map));
stp_curve_cache_copy(&(dest->sat_map), &(src->sat_map));
- stp_curve_cache_copy(&(dest->gcr_curve), &(src->gcr_curve));
/* Don't copy gray_tmp */
/* Don't copy cmy_tmp */
if (src->in_data)
@@ -723,7 +746,6 @@ free_lut(void *vlut)
stp_curve_free_curve_cache(&(lut->hue_map));
stp_curve_free_curve_cache(&(lut->lum_map));
stp_curve_free_curve_cache(&(lut->sat_map));
- stp_curve_free_curve_cache(&(lut->gcr_curve));
STP_SAFE_FREE(lut->gray_tmp);
STP_SAFE_FREE(lut->cmy_tmp);
STP_SAFE_FREE(lut->in_data);
@@ -799,29 +821,28 @@ static void
initialize_gcr_curve(const stp_vars_t *vars)
{
lut_t *lut = (lut_t *)(stp_get_component_data(vars, "Color"));
- if (!stp_curve_cache_get_curve(&(lut->gcr_curve)))
+ stp_curve_t *curve = NULL;
+ if (stp_check_curve_parameter(vars, "GCRCurve", STP_PARAMETER_DEFAULTED))
{
- if (stp_check_curve_parameter(vars, "GCRCurve", STP_PARAMETER_DEFAULTED))
+ double data;
+ size_t count;
+ int i;
+ curve = stp_curve_create_copy(stp_get_curve_parameter(vars, "GCRCurve"));
+ stp_curve_resample(curve, lut->steps);
+ count = stp_curve_count_points(curve);
+ stp_curve_set_bounds(curve, 0.0, 65535.0);
+ for (i = 0; i < count; i++)
{
- double data;
- size_t count;
- int i;
- stp_curve_t *curve =
- stp_curve_create_copy(stp_get_curve_parameter(vars, "GCRCurve"));
- stp_curve_resample(curve, lut->steps);
- count = stp_curve_count_points(curve);
- stp_curve_set_bounds(curve, 0.0, 65535.0);
- for (i = 0; i < count; i++)
- {
- stp_curve_get_point(curve, i, &data);
- data = 65535.0 * data * (double) i / (count - 1);
- stp_curve_set_point(curve, i, data);
- }
- stp_curve_cache_set_curve(&(lut->gcr_curve), curve);
+ stp_curve_get_point(curve, i, &data);
+ data = 65535.0 * data * (double) i / (count - 1);
+ stp_curve_set_point(curve, i, data);
}
- else
- stp_curve_cache_set_curve(&(lut->gcr_curve), compute_gcr_curve(vars));
}
+ else
+ curve = compute_gcr_curve(vars);
+ stp_channel_set_gcr_curve((stp_vars_t *)vars, curve);
+ if (curve)
+ stp_curve_destroy(curve);
}
/*
diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c
index 03f0cce..041bdf4 100644
--- a/src/main/print-escp2.c
+++ b/src/main/print-escp2.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.c,v 1.340 2005/06/30 00:12:14 rlk Exp $"
+ * "$Id: print-escp2.c,v 1.341 2005/07/03 22:13:37 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -409,48 +409,48 @@ static const float_param_t float_parameters[] =
{
{
{
- "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"),
- N_("Adjust the cyan balance"),
+ "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"),
+ N_("Adjust the cyan density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"),
- N_("Adjust the magenta balance"),
+ "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"),
+ N_("Adjust the magenta density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"),
- N_("Adjust the yellow balance"),
+ "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"),
+ N_("Adjust the yellow density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"),
- N_("Adjust the black balance"),
+ "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"),
+ N_("Adjust the black density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "RedDensity", N_("Red Balance"), N_("Output Level Adjustment"),
- N_("Adjust the red balance"),
+ "RedDensity", N_("Red Density"), N_("Output Level Adjustment"),
+ N_("Adjust the red density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 4, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "BlueDensity", N_("Blue Balance"), N_("Output Level Adjustment"),
- N_("Adjust the blue balance"),
+ "BlueDensity", N_("Blue Density"), N_("Output Level Adjustment"),
+ N_("Adjust the blue density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 5, 1, 0
}, 0.0, 2.0, 1.0, 1
@@ -1423,12 +1423,11 @@ escp2_parameters(const stp_vars_t *v, const char *name,
strcmp(name, "CDYAdjustment") == 0)
{
const input_slot_t *slot = get_input_slot(v);
+ description->bounds.dimension.lower = -15;
+ description->bounds.dimension.upper = 15;
+ description->deflt.dimension = 0;
if (printer_supports_print_to_cd(v) && (!slot || (slot && slot->is_cd)))
- {
- description->bounds.dimension.lower = -15;
- description->bounds.dimension.upper = 15;
- description->deflt.dimension = 0;
- }
+ description->is_active = 1;
else
description->is_active = 0;
}
@@ -2118,12 +2117,12 @@ adjust_print_quality(stp_vars_t *v, stp_image_t *image)
k_lower = pt->k_lower;
k_upper = pt->k_upper;
k_transition = pt->k_transition;
- stp_set_default_float_parameter(v, "CyanDensity", 1.0);
- stp_scale_float_parameter(v, "CyanDensity", pt->cyan);
- stp_set_default_float_parameter(v, "MagentaDensity", 1.0);
- stp_scale_float_parameter(v, "MagentaDensity", pt->magenta);
- stp_set_default_float_parameter(v, "YellowDensity", 1.0);
- stp_scale_float_parameter(v, "YellowDensity", pt->yellow);
+ if (!stp_check_float_parameter(v, "CyanBalance", STP_PARAMETER_ACTIVE))
+ stp_set_float_parameter(v, "CyanBalance", pt->cyan);
+ if (!stp_check_float_parameter(v, "MagentaBalance", STP_PARAMETER_ACTIVE))
+ stp_set_float_parameter(v, "MagentaBalance", pt->magenta);
+ if (!stp_check_float_parameter(v, "YellowBalance", STP_PARAMETER_ACTIVE))
+ stp_set_float_parameter(v, "YellowBalance", pt->yellow);
stp_set_default_float_parameter(v, "BlackDensity", 1.0);
stp_scale_float_parameter(v, "BlackDensity", pt->black);
stp_set_default_float_parameter(v, "Saturation", 1.0);
@@ -2132,7 +2131,6 @@ adjust_print_quality(stp_vars_t *v, stp_image_t *image)
stp_scale_float_parameter(v, "Gamma", pt->gamma);
}
-
if (!stp_check_float_parameter(v, "GCRLower", STP_PARAMETER_ACTIVE))
stp_set_default_float_parameter(v, "GCRLower", k_lower);
if (!stp_check_float_parameter(v, "GCRUpper", STP_PARAMETER_ACTIVE))
@@ -2285,10 +2283,12 @@ setup_inks(stp_vars_t *v)
{
stp_curve_t *curve_tmp =
stp_curve_create_copy(channel->hue_curve->curve_impl);
+#if 0
(void) stp_curve_rescale(curve_tmp,
sqrt(1.0 / stp_get_float_parameter(v, "Gamma")),
STP_CURVE_COMPOSE_EXPONENTIATE,
STP_CURVE_BOUNDS_RESCALE);
+#endif
stp_channel_set_curve(v, i, curve_tmp);
stp_curve_destroy(curve_tmp);
}
diff --git a/src/main/print-lexmark.c b/src/main/print-lexmark.c
index 64d4075..b57233c 100644
--- a/src/main/print-lexmark.c
+++ b/src/main/print-lexmark.c
@@ -1,6 +1,6 @@
/*
- * "$Id: print-lexmark.c,v 1.149 2005/05/08 03:10:38 rlk Exp $"
+ * "$Id: print-lexmark.c,v 1.150 2005/07/03 22:13:39 rlk Exp $"
*
* Print plug-in Lexmark driver for the GIMP.
*
@@ -322,32 +322,32 @@ static const float_param_t float_parameters[] =
{
{
{
- "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"),
- N_("Adjust the cyan balance"),
+ "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"),
+ N_("Adjust the cyan density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"),
- N_("Adjust the magenta balance"),
+ "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"),
+ N_("Adjust the magenta density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"),
- N_("Adjust the yellow balance"),
+ "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"),
+ N_("Adjust the yellow density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"),
- N_("Adjust the black balance"),
+ "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"),
+ N_("Adjust the black density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0
}, 0.0, 2.0, 1.0, 1
diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c
index 4f558b8..e02b2bd 100644
--- a/src/main/print-pcl.c
+++ b/src/main/print-pcl.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-pcl.c,v 1.138 2005/05/08 03:10:39 rlk Exp $"
+ * "$Id: print-pcl.c,v 1.139 2005/07/03 22:13:39 rlk Exp $"
*
* Print plug-in HP PCL driver for the GIMP.
*
@@ -1215,32 +1215,32 @@ static const float_param_t float_parameters[] =
{
{
{
- "CyanDensity", N_("Cyan Balance"), N_("Output Level Adjustment"),
- N_("Adjust the cyan balance"),
+ "CyanDensity", N_("Cyan Density"), N_("Output Level Adjustment"),
+ N_("Adjust the cyan density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 1, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "MagentaDensity", N_("Magenta Balance"), N_("Output Level Adjustment"),
- N_("Adjust the magenta balance"),
+ "MagentaDensity", N_("Magenta Density"), N_("Output Level Adjustment"),
+ N_("Adjust the magenta density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 2, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "YellowDensity", N_("Yellow Balance"), N_("Output Level Adjustment"),
- N_("Adjust the yellow balance"),
+ "YellowDensity", N_("Yellow Density"), N_("Output Level Adjustment"),
+ N_("Adjust the yellow density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 3, 1, 0
}, 0.0, 2.0, 1.0, 1
},
{
{
- "BlackDensity", N_("Black Balance"), N_("Output Level Adjustment"),
- N_("Adjust the black balance"),
+ "BlackDensity", N_("Black Density"), N_("Output Level Adjustment"),
+ N_("Adjust the black density"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 0, 1, 0, 1, 0
}, 0.0, 2.0, 1.0, 1
diff --git a/src/testpattern/Makefile.in b/src/testpattern/Makefile.in
index 856b313..0bb1ead 100644
--- a/src/testpattern/Makefile.in
+++ b/src/testpattern/Makefile.in
@@ -296,7 +296,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
diff --git a/src/testpattern/testpatternl.c b/src/testpattern/testpatternl.c
index 6ad6563..42b0696 100644
--- a/src/testpattern/testpatternl.c
+++ b/src/testpattern/testpatternl.c
@@ -1,85 +1,32 @@
-
-#line 3 "testpatternl.c"
-
-#define YY_INT_ALIGNED short int
-
/* A lexical scanner generated by flex */
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 31
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
-/* First, we deal with platform-specific or compiler-specific issues. */
-
-/* begin standard C headers. */
#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/* end standard C headers. */
-
-/* flex integer type definitions */
-
-#ifndef FLEXINT_H
-#define FLEXINT_H
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-#include <inttypes.h>
-typedef int8_t flex_int8_t;
-typedef uint8_t flex_uint8_t;
-typedef int16_t flex_int16_t;
-typedef uint16_t flex_uint16_t;
-typedef int32_t flex_int32_t;
-typedef uint32_t flex_uint32_t;
-#else
-typedef signed char flex_int8_t;
-typedef short int flex_int16_t;
-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
-#define INT8_MIN (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX (65535U)
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! FLEXINT_H */
#ifdef __cplusplus
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
@@ -87,17 +34,34 @@ typedef unsigned int flex_uint32_t;
#if __STDC__
+#define YY_USE_PROTOS
#define YY_USE_CONST
#endif /* __STDC__ */
#endif /* ! __cplusplus */
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
/* Returned upon end-of-file. */
#define YY_NULL 0
@@ -112,71 +76,71 @@ typedef unsigned int flex_uint32_t;
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
-#define BEGIN (yy_start) = 1 + 2 *
+#define BEGIN yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
-#define YY_START (((yy_start) - 1) / 2)
+#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart(yyin )
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
-#endif
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
extern int yyleng;
-
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
- #define YY_LESS_LINENO(n)
-
-/* Return all but the first "n" matched characters back to the input stream. */
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- *yy_cp = (yy_hold_char); \
+ *yy_cp = yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
- (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-#define unput(c) yyunput( c, (yytext_ptr) )
+#define unput(c) yyunput( c, yytext_ptr )
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
*/
-
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
typedef unsigned int yy_size_t;
-#endif
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
+
struct yy_buffer_state
{
FILE *yy_input_file;
@@ -213,16 +177,12 @@ struct yy_buffer_state
*/
int yy_at_bol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
int yy_fill_buffer;
int yy_buffer_status;
-
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to process
@@ -236,33 +196,23 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
-
};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-/* Stack of input buffers. */
-static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
-static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE yy_current_buffer = 0;
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
- *
- * Returns the top of the stack, or NULL.
*/
-#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
- ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
- : NULL)
+#define YY_CURRENT_BUFFER yy_current_buffer
-/* Same as previous macro, but useful when we know that the buffer stack is not
- * NULL or when we need an lvalue. For internal use only.
- */
-#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
/* 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;
/* Points to current character in buffer. */
@@ -275,93 +225,69 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart (FILE *input_file );
-void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
-void yy_delete_buffer (YY_BUFFER_STATE b );
-void yy_flush_buffer (YY_BUFFER_STATE b );
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void yypop_buffer_state (void );
-
-static void yyensure_buffer_stack (void );
-static void yy_load_buffer_state (void );
-static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+void yyrestart YY_PROTO(( FILE *input_file ));
-#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-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_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-void *yyalloc (yy_size_t );
-void *yyrealloc (void *,yy_size_t );
-void yyfree (void * );
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
- if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_set_bol(at_bol) \
{ \
- if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (); \
- YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer(yyin,YY_BUF_SIZE ); \
- } \
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
}
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-#define yywrap(n) 1
-#define YY_SKIP_YYWRAP
+#define yywrap() 1
+#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
-
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-
typedef int yy_state_type;
-
-extern int yylineno;
-
-int yylineno = 1;
-
extern char *yytext;
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
- (yytext_ptr) = yy_bp; \
- yyleng = (size_t) (yy_cp - yy_bp); \
- (yy_hold_char) = *yy_cp; \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
+ yy_c_buf_p = yy_cp;
#define YY_NUM_RULES 49
#define YY_END_OF_BUFFER 50
-/* This struct is not used in this scanner,
- but its presence is necessary. */
-struct yy_trans_info
- {
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[233] =
+static yyconst short int yy_accept[233] =
{ 0,
0, 0, 50, 49, 46, 48, 49, 47, 49, 49,
43, 32, 45, 45, 45, 45, 45, 45, 45, 45,
@@ -391,7 +317,7 @@ static yyconst flex_int16_t yy_accept[233] =
16, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst int yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -423,7 +349,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[38] =
+static yyconst int yy_meta[38] =
{ 0,
1, 1, 2, 3, 1, 1, 1, 4, 4, 4,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
@@ -431,7 +357,7 @@ static yyconst flex_int32_t yy_meta[38] =
4, 4, 4, 4, 4, 4, 4
} ;
-static yyconst flex_int16_t yy_base[237] =
+static yyconst short int yy_base[237] =
{ 0,
0, 0, 468, 469, 465, 469, 0, 0, 460, 455,
29, 469, 455, 31, 32, 33, 34, 35, 40, 47,
@@ -461,7 +387,7 @@ static yyconst flex_int16_t yy_base[237] =
343, 469, 412, 416, 420, 115
} ;
-static yyconst flex_int16_t yy_def[237] =
+static yyconst short int yy_def[237] =
{ 0,
232, 1, 232, 232, 232, 232, 233, 234, 235, 232,
236, 232, 236, 236, 236, 236, 236, 236, 236, 236,
@@ -491,7 +417,7 @@ static yyconst flex_int16_t yy_def[237] =
236, 0, 232, 232, 232, 232
} ;
-static yyconst flex_int16_t yy_nxt[507] =
+static yyconst short int yy_nxt[507] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
12, 13, 13, 14, 15, 16, 17, 13, 18, 19,
@@ -551,7 +477,7 @@ static yyconst flex_int16_t yy_nxt[507] =
232, 232, 232, 232, 232, 232
} ;
-static yyconst flex_int16_t yy_chk[507] =
+static yyconst short int yy_chk[507] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -614,9 +540,6 @@ static yyconst flex_int16_t yy_chk[507] =
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int yy_flex_debug;
-int yy_flex_debug = 0;
-
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
*/
@@ -626,6 +549,7 @@ int yy_flex_debug = 0;
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "testpatternl.l"
+#define INITIAL 0
/*
* "$Id: testpatternl.l,v 1.16 2004/04/14 02:21:21 rlk Exp $"
*
@@ -687,21 +611,7 @@ do \
while (0)
-#line 691 "testpatternl.c"
-
-#define INITIAL 0
-
-#ifndef YY_NO_UNISTD_H
-/* Special case for "unistd.h", since it is non-ANSI. We include it way
- * down here because we want the user's section 1 to have been scanned first.
- * The user has a chance to override it with an option.
- */
-#include <unistd.h>
-#endif
-
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
+#line 615 "testpatternl.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -709,30 +619,65 @@ do \
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap (void );
+extern "C" int yywrap YY_PROTO(( void ));
#else
-extern int yywrap (void );
+extern int yywrap YY_PROTO(( void ));
#endif
#endif
- static void yyunput (int c,char *buf_ptr );
-
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
#else
-static int input (void );
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
#endif
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
#endif
/* Amount of stuff to slurp up with each read. */
@@ -741,6 +686,7 @@ static int input (void );
#endif
/* Copy whatever the last rule matched to the standard output. */
+
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
@@ -753,10 +699,9 @@ static int input (void );
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ if ( yy_current_buffer->yy_is_interactive ) \
{ \
- int c = '*'; \
- size_t n; \
+ int c = '*', n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -766,22 +711,9 @@ static int input (void );
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else \
- { \
- errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(yyin); \
- } \
- }\
-\
-
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -802,18 +734,12 @@ static int input (void );
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif
-/* end tables serialization structures and prototypes */
-
/* Default declaration of generated scanner - a define so the user can
* easily add parameters.
*/
#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
-
-extern int yylex (void);
-
-#define YY_DECL int yylex (void)
-#endif /* !YY_DECL */
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -830,29 +756,27 @@ extern int yylex (void);
#define YY_RULE_SETUP \
YY_USER_ACTION
-/** The main scanner function which does all the work.
- */
YY_DECL
-{
+ {
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+
#line 73 "testpatternl.l"
-#line 845 "testpatternl.c"
+#line 769 "testpatternl.c"
- if ( (yy_init) )
+ if ( yy_init )
{
- (yy_init) = 0;
+ yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! (yy_start) )
- (yy_start) = 1; /* first start state */
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
if ( ! yyin )
yyin = stdin;
@@ -860,36 +784,34 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
- }
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
- yy_load_buffer_state( );
+ yy_load_buffer_state();
}
while ( 1 ) /* loops until end-of-file is reached */
{
- yy_cp = (yy_c_buf_p);
+ yy_cp = yy_c_buf_p;
/* Support of yytext. */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
/* yy_bp points to the position in yy_ch_buf of the start of
* the current run.
*/
yy_bp = yy_cp;
- yy_current_state = (yy_start);
+ yy_current_state = yy_start;
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -906,22 +828,24 @@ yy_find_action:
yy_act = yy_accept[yy_current_state];
if ( yy_act == 0 )
{ /* have to back up */
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
yy_act = yy_accept[yy_current_state];
}
YY_DO_BEFORE_ACTION;
+
do_action: /* This label is used only to access EOF actions. */
+
switch ( yy_act )
{ /* beginning of action switch */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = (yy_hold_char);
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
+ *yy_cp = yy_hold_char;
+ yy_cp = yy_last_accepting_cpos;
+ yy_current_state = yy_last_accepting_state;
goto yy_find_action;
case 1:
@@ -1145,7 +1069,6 @@ YY_RULE_SETUP
yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
YY_BREAK
case 45:
-/* rule 45 can match eol */
YY_RULE_SETUP
#line 121 "testpatternl.l"
yylval.sval = c_strstrip(yytext); DBG(tSTRING); return tSTRING;
@@ -1161,7 +1084,6 @@ YY_RULE_SETUP
DBG(comment); /* Skip comments */
YY_BREAK
case 48:
-/* rule 48 can match eol */
YY_RULE_SETUP
#line 124 "testpatternl.l"
DBG(newline); mylineno++;
@@ -1171,33 +1093,33 @@ YY_RULE_SETUP
#line 125 "testpatternl.l"
ECHO;
YY_BREAK
-#line 1175 "testpatternl.c"
+#line 1097 "testpatternl.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
case YY_END_OF_BUFFER:
{
/* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
/* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
YY_RESTORE_YY_MORE_OFFSET
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
* yylex(). If so, then we have to assure
- * consistency between YY_CURRENT_BUFFER and our
+ * consistency between yy_current_buffer and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1207,13 +1129,13 @@ case YY_STATE_EOF(INITIAL):
* end-of-buffer state). Contrast this with the test
* in input().
*/
- if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
{ /* This was really a NUL. */
yy_state_type yy_next_state;
- (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
/* Okay, we're now positioned to make the NUL
* transition. We couldn't have
@@ -1226,30 +1148,30 @@ case YY_STATE_EOF(INITIAL):
yy_next_state = yy_try_NUL_trans( yy_current_state );
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
if ( yy_next_state )
{
/* Consume the NUL. */
- yy_cp = ++(yy_c_buf_p);
+ yy_cp = ++yy_c_buf_p;
yy_current_state = yy_next_state;
goto yy_match;
}
else
{
- yy_cp = (yy_c_buf_p);
+ yy_cp = yy_c_buf_p;
goto yy_find_action;
}
}
- else switch ( yy_get_next_buffer( ) )
+ else switch ( yy_get_next_buffer() )
{
case EOB_ACT_END_OF_FILE:
{
- (yy_did_buffer_switch_on_eof) = 0;
+ yy_did_buffer_switch_on_eof = 0;
- if ( yywrap( ) )
+ if ( yywrap() )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -1260,7 +1182,7 @@ case YY_STATE_EOF(INITIAL):
* YY_NULL, it'll still work - another
* YY_NULL will get returned.
*/
- (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
yy_act = YY_STATE_EOF(YY_START);
goto do_action;
@@ -1268,30 +1190,30 @@ case YY_STATE_EOF(INITIAL):
else
{
- if ( ! (yy_did_buffer_switch_on_eof) )
+ if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
}
break;
}
case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) =
- (yytext_ptr) + yy_amount_of_matched_text;
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_match;
case EOB_ACT_LAST_MATCH:
- (yy_c_buf_p) =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
- yy_current_state = yy_get_previous_state( );
+ yy_current_state = yy_get_previous_state();
- yy_cp = (yy_c_buf_p);
- yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
goto yy_find_action;
}
break;
@@ -1302,7 +1224,8 @@ case YY_STATE_EOF(INITIAL):
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of yylex */
+ } /* end of yylex */
+
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1311,20 +1234,21 @@ case YY_STATE_EOF(INITIAL):
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
* EOB_ACT_END_OF_FILE - end of file
*/
-static int yy_get_next_buffer (void)
-{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
register int number_to_move, i;
int ret_val;
- if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
{ /* Don't try to fill the buffer, so this is an EOF. */
- if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
{
/* We matched a single character, the EOB, so
* treat this as a final EOF.
@@ -1344,30 +1268,34 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
/* don't do the read, it's not guaranteed to return an EOF,
* just force an EOF
*/
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
else
{
- size_t num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
/* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+ YY_BUFFER_STATE b = yy_current_buffer;
int yy_c_buf_p_offset =
- (int) ((yy_c_buf_p) - b->yy_ch_buf);
+ (int) (yy_c_buf_p - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
@@ -1380,7 +1308,8 @@ static int yy_get_next_buffer (void)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1390,35 +1319,35 @@ static int yy_get_next_buffer (void)
YY_FATAL_ERROR(
"fatal error - scanner input buffer overflow" );
- (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ num_to_read = yy_current_buffer->yy_buf_size -
number_to_move - 1;
-
+#endif
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ yy_current_buffer->yy_n_chars = yy_n_chars;
}
- if ( (yy_n_chars) == 0 )
+ if ( yy_n_chars == 0 )
{
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart(yyin );
+ yyrestart( yyin );
}
else
{
ret_val = EOB_ACT_LAST_MATCH;
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1426,31 +1355,32 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- (yy_n_chars) += number_to_move;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
- (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
return ret_val;
-}
+ }
+
/* yy_get_previous_state - get the state just before the EOB char was reached */
- static yy_state_type yy_get_previous_state (void)
-{
+static yy_state_type yy_get_previous_state()
+ {
register yy_state_type yy_current_state;
register char *yy_cp;
-
- yy_current_state = (yy_start);
- for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ yy_current_state = yy_start;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1462,23 +1392,30 @@ static int yy_get_next_buffer (void)
}
return yy_current_state;
-}
+ }
+
/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
*/
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
-{
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
register int yy_is_jam;
- register char *yy_cp = (yy_c_buf_p);
+ register char *yy_cp = yy_c_buf_p;
register YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
- (yy_last_accepting_state) = yy_current_state;
- (yy_last_accepting_cpos) = yy_cp;
+ yy_last_accepting_state = yy_current_state;
+ yy_last_accepting_cpos = yy_cp;
}
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
@@ -1490,73 +1427,80 @@ static int yy_get_next_buffer (void)
yy_is_jam = (yy_current_state == 232);
return yy_is_jam ? 0 : yy_current_state;
-}
+ }
- static void yyunput (int c, register char * yy_bp )
-{
- register char *yy_cp;
-
- yy_cp = (yy_c_buf_p);
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
- *yy_cp = (yy_hold_char);
+ *yy_cp = yy_hold_char;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < yy_current_buffer->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 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+ &yy_current_buffer->yy_ch_buf[number_to_move];
- while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ while ( source > yy_current_buffer->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
- if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
}
*--yy_cp = (char) c;
- (yytext_ptr) = yy_bp;
- (yy_hold_char) = *yy_cp;
- (yy_c_buf_p) = yy_cp;
-}
-#ifndef YY_NO_INPUT
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
#ifdef __cplusplus
- static int yyinput (void)
+static int yyinput()
#else
- static int input (void)
+static int input()
#endif
-
-{
+ {
int c;
-
- *(yy_c_buf_p) = (yy_hold_char);
- if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
- if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
/* This was really a NUL. */
- *(yy_c_buf_p) = '\0';
+ *yy_c_buf_p = '\0';
else
{ /* need more input */
- int offset = (yy_c_buf_p) - (yytext_ptr);
- ++(yy_c_buf_p);
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
- switch ( yy_get_next_buffer( ) )
+ switch ( yy_get_next_buffer() )
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
@@ -1570,16 +1514,16 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- yyrestart(yyin );
+ yyrestart( yyin );
- /*FALLTHROUGH*/
+ /* fall through */
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( ) )
+ if ( yywrap() )
return EOF;
- if ( ! (yy_did_buffer_switch_on_eof) )
+ if ( ! yy_did_buffer_switch_on_eof )
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
@@ -1589,92 +1533,90 @@ static int yy_get_next_buffer (void)
}
case EOB_ACT_CONTINUE_SCAN:
- (yy_c_buf_p) = (yytext_ptr) + offset;
+ yy_c_buf_p = yytext_ptr + offset;
break;
}
}
}
- c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve yytext */
- (yy_hold_char) = *++(yy_c_buf_p);
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
return c;
-}
-#endif /* ifndef YY_NO_INPUT */
+ }
-/** Immediately switch to a different input stream.
- * @param input_file A readable stream.
- *
- * @note This function does not reset the start condition to @c INITIAL .
- */
- void yyrestart (FILE * input_file )
-{
-
- if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer(yyin,YY_BUF_SIZE );
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
}
- yy_init_buffer(YY_CURRENT_BUFFER,input_file );
- yy_load_buffer_state( );
-}
-/** Switch to a different input buffer.
- * @param new_buffer The new input buffer.
- *
- */
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
-{
-
- /* TODO. We should be able to replace this entire function body
- * with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
- */
- yyensure_buffer_stack ();
- if ( YY_CURRENT_BUFFER == new_buffer )
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
return;
- if ( YY_CURRENT_BUFFER )
+ if ( yy_current_buffer )
{
/* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
}
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( );
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
/* We don't actually know whether we did this switch during
* EOF (yywrap()) processing, but the only time this flag
* is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
- (yy_did_buffer_switch_on_eof) = 1;
-}
+ yy_did_buffer_switch_on_eof = 1;
+ }
-static void yy_load_buffer_state (void)
-{
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
- (yy_hold_char) = *(yy_c_buf_p);
-}
-/** Allocate and initialize an input buffer state.
- * @param file A readable stream.
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
- * @return the allocated buffer state.
- */
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
-{
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1683,75 +1625,80 @@ static void yy_load_buffer_state (void)
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
-}
+ }
-/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
- *
- */
- void yy_delete_buffer (YY_BUFFER_STATE b )
-{
-
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
if ( ! b )
return;
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree((void *) b->yy_ch_buf );
+ yy_flex_free( (void *) b->yy_ch_buf );
- yyfree((void *) b );
-}
+ yy_flex_free( (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.
- */
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
-{
- int oerrno = errno;
-
- yy_flush_buffer(b );
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+#include<unistd.h>
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
- * In that case, we don't want to reset the lineno or column.
- */
- if (b != YY_CURRENT_BUFFER){
- b->yy_bs_lineno = 1;
- b->yy_bs_column = 0;
- }
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
- errno = oerrno;
-}
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
- */
- void yy_flush_buffer (YY_BUFFER_STATE b )
-{
- if ( ! b )
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
return;
b->yy_n_chars = 0;
@@ -1768,121 +1715,29 @@ extern int isatty (int );
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( );
-}
-
-/** Pushes the new state onto the stack. The new state becomes
- * the current state. This function will allocate the stack
- * if necessary.
- * @param new_buffer The new state.
- *
- */
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
-{
- if (new_buffer == NULL)
- return;
-
- yyensure_buffer_stack();
-
- /* This block is copied from yy_switch_to_buffer. */
- if ( YY_CURRENT_BUFFER )
- {
- /* Flush out information for old buffer. */
- *(yy_c_buf_p) = (yy_hold_char);
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
-
- /* Only push if top exists. Otherwise, replace top. */
- if (YY_CURRENT_BUFFER)
- (yy_buffer_stack_top)++;
- YY_CURRENT_BUFFER_LVALUE = new_buffer;
-
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
-}
-
-/** Removes and deletes the top of the stack, if present.
- * The next element becomes the new top.
- *
- */
-void yypop_buffer_state (void)
-{
- if (!YY_CURRENT_BUFFER)
- return;
-
- yy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- if ((yy_buffer_stack_top) > 0)
- --(yy_buffer_stack_top);
-
- if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( );
- (yy_did_buffer_switch_on_eof) = 1;
- }
-}
-
-/* Allocates the stack if it does not exist.
- * Guarantees space for at least one push.
- */
-static void yyensure_buffer_stack (void)
-{
- int num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
- /* First allocation is just for 2 elements, since we don't know if this
- * scanner will even need a stack. We use 2 instead of 1 to avoid an
- * immediate realloc on the next call.
- */
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- );
-
- memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
- (yy_buffer_stack_max) = num_to_alloc;
- (yy_buffer_stack_top) = 0;
- return;
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
}
- if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
- /* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
-
- num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
- ((yy_buffer_stack),
- num_to_alloc * sizeof(struct yy_buffer_state*)
- );
-
- /* zero only the new slots.*/
- memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
- (yy_buffer_stack_max) = num_to_alloc;
- }
-}
-
-/** Setup the input buffer state to scan directly from a user-specified character buffer.
- * @param base the character buffer
- * @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
-{
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
return 0;
- b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1896,42 +1751,47 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
-}
+ }
+#endif
-/** Setup the input buffer state to scan a string. The next call to yylex() will
- * scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
- *
- * @return the newly allocated buffer state object.
- * @note If you want to scan bytes that may contain NUL values, then use
- * yy_scan_bytes() instead.
- */
-YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
-{
-
- return yy_scan_bytes(yy_str,strlen(yy_str) );
-}
-/** 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.
- *
- * @return the newly allocated buffer state object.
- */
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
-{
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
- buf = (char *) yyalloc(n );
+ buf = (char *) yy_flex_alloc( n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -1940,7 +1800,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
@@ -1950,164 +1810,148 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
b->yy_is_our_buffer = 1;
return b;
-}
+ }
+#endif
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
-static void yy_fatal_error (yyconst char* msg )
-{
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
-}
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
-/* Redefine yyless() so it works in section 3 code. */
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
- YY_LESS_LINENO(yyless_macro_arg);\
- yytext[yyleng] = (yy_hold_char); \
- (yy_c_buf_p) = yytext + yyless_macro_arg; \
- (yy_hold_char) = *(yy_c_buf_p); \
- *(yy_c_buf_p) = '\0'; \
- yyleng = yyless_macro_arg; \
- } \
- while ( 0 )
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
-/* Accessor methods (get/set functions) to struct members. */
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
-/** Get the current line number.
- *
- */
-int yyget_lineno (void)
-{
-
- return yylineno;
-}
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
-/** Get the input stream.
- *
- */
-FILE *yyget_in (void)
-{
- return yyin;
-}
+ BEGIN(new_state);
+ }
+#endif
-/** Get the output stream.
- *
- */
-FILE *yyget_out (void)
-{
- return yyout;
-}
-/** Get the length of the current token.
- *
- */
-int yyget_leng (void)
-{
- return yyleng;
-}
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
-/** Get the current token.
- *
- */
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
-char *yyget_text (void)
-{
- return yytext;
-}
-/** Set the current line number.
- * @param line_number
- *
- */
-void yyset_lineno (int line_number )
-{
-
- yylineno = line_number;
-}
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
-/** Set the input stream. This does not discard the current
- * input buffer.
- * @param in_str A readable stream.
- *
- * @see yy_switch_to_buffer
- */
-void yyset_in (FILE * in_str )
-{
- yyin = in_str ;
-}
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
-void yyset_out (FILE * out_str )
-{
- yyout = out_str ;
-}
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
-int yyget_debug (void)
-{
- return yy_flex_debug;
-}
-void yyset_debug (int bdebug )
-{
- yy_flex_debug = bdebug ;
-}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (void)
-{
-
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
- yy_delete_buffer(YY_CURRENT_BUFFER );
- YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state();
- }
+/* Redefine yyless() so it works in section 3 code. */
- /* Destroy the stack itself. */
- yyfree((yy_buffer_stack) );
- (yy_buffer_stack) = NULL;
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
- return 0;
-}
-/*
- * Internal utility routines.
- */
+/* Internal utility routines. */
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
-{
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
register int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i )
s1[i] = s2[i];
-}
+ }
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
-{
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
register int n;
- for ( n = 0; s[n]; ++n )
+ for ( n = 0; s[n]; ++n )
;
return n;
-}
+ }
#endif
-void *yyalloc (yy_size_t size )
-{
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
return (void *) malloc( size );
-}
+ }
-void *yyrealloc (void * ptr, yy_size_t size )
-{
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -2116,25 +1960,23 @@ void *yyrealloc (void * ptr, yy_size_t size )
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
-}
-
-void yyfree (void * ptr )
-{
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
-}
-
-#define YYTABLES_NAME "yytables"
+ }
-#undef YY_NEW_FILE
-#undef YY_FLUSH_BUFFER
-#undef yy_set_bol
-#undef yy_new_buffer
-#undef yy_set_interactive
-#undef yytext_ptr
-#undef YY_DO_BEFORE_ACTION
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
-#ifdef YY_DECL_IS_OURS
-#undef YY_DECL_IS_OURS
-#undef YY_DECL
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
#endif
#line 125 "testpatternl.l"
diff --git a/src/testpattern/testpatterny.c b/src/testpattern/testpatterny.c
index 073282d..ede6285 100644
--- a/src/testpattern/testpatterny.c
+++ b/src/testpattern/testpatterny.c
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875d. */
+/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -241,29 +241,22 @@ typedef int YYSTYPE;
/* Line 214 of yacc.c. */
-#line 245 "testpatterny.c"
+#line 244 "testpatterny.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
-# ifndef YYFREE
-# define YYFREE free
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# endif
-
/* The parser invokes alloca or malloc; define the necessary symbols. */
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# endif
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
# else
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
-# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# ifndef YYSTACK_USE_ALLOCA
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
# endif
# endif
# endif
@@ -276,20 +269,20 @@ typedef int YYSTYPE;
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
+# define YYSTACK_ALLOC malloc
+# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
- || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+ || (YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short int yyss;
+ short yyss;
YYSTYPE yyvs;
};
@@ -299,13 +292,13 @@ union yyalloc
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if defined (__GNUC__) && 1 < __GNUC__
+# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
@@ -341,7 +334,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
- typedef short int yysigned_char;
+ typedef short yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@@ -404,7 +397,7 @@ static const unsigned char yytranslate[] =
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const unsigned short int yyprhs[] =
+static const unsigned short yyprhs[] =
{
0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
19, 22, 25, 28, 31, 34, 37, 41, 43, 45,
@@ -457,7 +450,7 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short int yyrline[] =
+static const unsigned short yyrline[] =
{
0, 139, 139, 139, 139, 139, 140, 140, 140, 140,
143, 155, 167, 179, 191, 203, 215, 227, 227, 227,
@@ -479,33 +472,33 @@ static const unsigned short int yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "tINT", "tDOUBLE", "tSTRING", "CYAN",
- "L_CYAN", "MAGENTA", "L_MAGENTA", "YELLOW", "D_YELLOW", "BLACK",
- "L_BLACK", "GAMMA", "LEVEL", "STEPS", "INK_LIMIT", "PRINTER",
- "PARAMETER", "PARAMETER_INT", "PARAMETER_FLOAT", "PARAMETER_CURVE",
- "DENSITY", "TOP", "LEFT", "HSIZE", "VSIZE", "BLACKLINE", "PATTERN",
- "XPATTERN", "EXTENDED", "IMAGE", "GRID", "SEMI", "CHANNEL", "CMYK",
- "KCMY", "RGB", "CMY", "GRAY", "WHITE", "RAW", "MODE", "PAGESIZE",
- "MESSAGE", "END", "$accept", "COLOR", "cmykspec", "kcmyspec", "rgbspec",
- "cmyspec", "grayspec", "whitespec", "extendedspec", "modespec",
- "inputspec", "level", "channel_level", "gamma", "channel_gamma",
- "global_gamma", "steps", "ink_limit", "printer", "page_size_name",
- "page_size_custom", "page_size", "parameter_string", "parameter_int",
- "parameter_float", "parameter", "density", "top", "left", "hsize",
- "vsize", "blackline", "color_block1", "color_blocks1a", "color_blocks1b",
- "color_blocks1", "color_block2a", "color_block2b", "color_block2",
- "color_blocks2a", "color_blocks2", "color_blocks", "patvars", "pattern",
- "xpattern", "grid", "image", "Message0", "Message1", "Message2",
- "Message3", "Message4", "A_Message", "message", "A_Rule", "Rule",
- "A_Pattern", "Pattern", "Patterns", "Image", "Rules", "Output", "EOF",
- "Thing", "@1", 0
+ "$end", "error", "$undefined", "tINT", "tDOUBLE", "tSTRING", "CYAN",
+ "L_CYAN", "MAGENTA", "L_MAGENTA", "YELLOW", "D_YELLOW", "BLACK",
+ "L_BLACK", "GAMMA", "LEVEL", "STEPS", "INK_LIMIT", "PRINTER",
+ "PARAMETER", "PARAMETER_INT", "PARAMETER_FLOAT", "PARAMETER_CURVE",
+ "DENSITY", "TOP", "LEFT", "HSIZE", "VSIZE", "BLACKLINE", "PATTERN",
+ "XPATTERN", "EXTENDED", "IMAGE", "GRID", "SEMI", "CHANNEL", "CMYK",
+ "KCMY", "RGB", "CMY", "GRAY", "WHITE", "RAW", "MODE", "PAGESIZE",
+ "MESSAGE", "END", "$accept", "COLOR", "cmykspec", "kcmyspec", "rgbspec",
+ "cmyspec", "grayspec", "whitespec", "extendedspec", "modespec",
+ "inputspec", "level", "channel_level", "gamma", "channel_gamma",
+ "global_gamma", "steps", "ink_limit", "printer", "page_size_name",
+ "page_size_custom", "page_size", "parameter_string", "parameter_int",
+ "parameter_float", "parameter", "density", "top", "left", "hsize",
+ "vsize", "blackline", "color_block1", "color_blocks1a",
+ "color_blocks1b", "color_blocks1", "color_block2a", "color_block2b",
+ "color_block2", "color_blocks2a", "color_blocks2", "color_blocks",
+ "patvars", "pattern", "xpattern", "grid", "image", "Message0",
+ "Message1", "Message2", "Message3", "Message4", "A_Message", "message",
+ "A_Rule", "Rule", "A_Pattern", "Pattern", "Patterns", "Image", "Rules",
+ "Output", "EOF", "Thing", "@1", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const unsigned short int yytoknum[] =
+static const unsigned short yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -574,7 +567,7 @@ static const unsigned char yydefact[] =
};
/* YYDEFGOTO[NTERM-NUM]. */
-static const short int yydefgoto[] =
+static const short yydefgoto[] =
{
-1, 137, 85, 86, 87, 88, 89, 90, 91, 92,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
@@ -588,7 +581,7 @@ static const short int yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -131
-static const short int yypact[] =
+static const short yypact[] =
{
-131, -14, 16, 56, 41, 25, 36, 38, 53, 66,
67, 69, 70, 77, 78, 79, 81, 39, 22, 80,
@@ -610,7 +603,7 @@ static const short int yypact[] =
};
/* YYPGOTO[NTERM-NUM]. */
-static const short int yypgoto[] =
+static const short yypgoto[] =
{
-131, 52, -131, -131, -131, -131, -131, -131, -131, -131,
-131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
@@ -708,8 +701,7 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
+#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -743,11 +735,11 @@ while (0)
are run). */
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- ((Current).first_line = (Rhs)[1].first_line, \
- (Current).first_column = (Rhs)[1].first_column, \
- (Current).last_line = (Rhs)[N].last_line, \
- (Current).last_column = (Rhs)[N].last_column)
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ Current.first_line = Rhs[1].first_line; \
+ Current.first_column = Rhs[1].first_column; \
+ Current.last_line = Rhs[N].last_line; \
+ Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
@@ -791,17 +783,17 @@ do { \
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
+| TOP (cinluded). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (short int *bottom, short int *top)
+yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
- short int *bottom;
- short int *top;
+ short *bottom;
+ short *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@@ -831,9 +823,9 @@ yy_reduce_print (yyrule)
#endif
{
int yyi;
- unsigned int yylno = yyrline[yyrule];
+ unsigned int yylineno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylno);
+ yyrule - 1, yylineno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
@@ -870,7 +862,7 @@ int yydebug;
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
+#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
@@ -1068,9 +1060,9 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short int yyssa[YYINITDEPTH];
- short int *yyss = yyssa;
- register short int *yyssp;
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+ register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
@@ -1107,7 +1099,6 @@ yyparse ()
yyssp = yyss;
yyvsp = yyvs;
-
goto yysetstate;
/*------------------------------------------------------------.
@@ -1133,7 +1124,7 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short int *yyss1 = yyss;
+ short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
@@ -1161,7 +1152,7 @@ yyparse ()
yystacksize = YYMAXDEPTH;
{
- short int *yyss1 = yyss;
+ short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
@@ -1755,8 +1746,8 @@ yyreduce:
}
-/* Line 1010 of yacc.c. */
-#line 1760 "testpatterny.c"
+/* Line 991 of yacc.c. */
+#line 1750 "testpatterny.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1797,33 +1788,18 @@ yyerrlab:
{
YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- const char* yyprefix;
char *yymsg;
- int yyx;
+ int yyx, yycount;
+ yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 0;
-
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
- yycount += 1;
- if (yycount == 5)
- {
- yysize = 0;
- break;
- }
- }
- yysize += (sizeof ("syntax error, unexpected ")
- + yystrlen (yytname[yytype]));
+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
+ yysize += yystrlen ("syntax error, unexpected ") + 1;
+ yysize += yystrlen (yytname[yytype]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
@@ -1832,13 +1808,16 @@ yyerrlab:
if (yycount < 5)
{
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ yycount = 0;
+ for (yyx = yyn < 0 ? -yyn : 0;
+ yyx < (int) (sizeof (yytname) / sizeof (char *));
+ yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
- yyp = yystpcpy (yyp, yyprefix);
+ const char *yyq = ! yycount ? ", expecting " : " or ";
+ yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
- yyprefix = " or ";
+ yycount++;
}
}
yyerror (yymsg);
@@ -1859,56 +1838,52 @@ yyerrlab:
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
- if (yychar <= YYEOF)
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
{
- /* If at end of input, pop the error token,
- then the rest of the stack, then return failure. */
- if (yychar == YYEOF)
- for (;;)
- {
- YYPOPSTACK;
- if (yyssp == yyss)
- YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[*yyssp], yyvsp);
- }
+ /* Pop the error token. */
+ YYPOPSTACK;
+ /* Pop the rest of the stack. */
+ while (yyss < yyssp)
+ {
+ YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
+ yydestruct (yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
+ YYABORT;
}
- else
- {
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
- }
+ YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
+ yydestruct (yytoken, &yylval);
+ yychar = YYEMPTY;
+
}
/* Else will try to reuse lookahead token after shifting the error
token. */
- goto yyerrlab1;
+ goto yyerrlab2;
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
+/*----------------------------------------------------.
+| yyerrlab1 -- error raised explicitly by an action. |
+`----------------------------------------------------*/
+yyerrlab1:
-#ifdef __GNUC__
- /* Pacify GCC when the user code never invokes YYERROR and the label
- yyerrorlab therefore never appears in user code. */
- if (0)
- goto yyerrorlab;
+ /* Suppress GCC warning that yyerrlab1 is unused when no action
+ invokes YYERROR. */
+#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
+ && !defined __cplusplus
+ __attribute__ ((__unused__))
#endif
- yyvsp -= yylen;
- yyssp -= yylen;
- yystate = *yyssp;
- goto yyerrlab1;
+ goto yyerrlab2;
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
+
+/*---------------------------------------------------------------.
+| yyerrlab2 -- pop states until the error token can be shifted. |
+`---------------------------------------------------------------*/
+yyerrlab2:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1931,8 +1906,9 @@ yyerrlab1:
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
yydestruct (yystos[yystate], yyvsp);
- YYPOPSTACK;
- yystate = *yyssp;
+ yyvsp--;
+ yystate = *--yyssp;
+
YY_STACK_PRINT (yyss, yyssp);
}
diff --git a/src/testpattern/testpatterny.h b/src/testpattern/testpatterny.h
index 989d144..2567b82 100644
--- a/src/testpattern/testpatterny.h
+++ b/src/testpattern/testpatterny.h
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875d. */
+/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by