summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2008-10-26 16:13:15 +0000
committerRoger Leigh <rleigh@debian.org>2008-10-26 16:13:15 +0000
commit162bb22c0a612c065ea77a88136fcf8ded9159a9 (patch)
tree5dd9b87d64c613ad2fc3998e80aa9fbf1400f537 /src
parente74aac350fb79d8cc3ed6a97451b30443ad9dac9 (diff)
Imported Upstream version 4.3.99+cvs20051122.dfsg.1
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
-rw-r--r--src/Makefile.in22
-rw-r--r--src/cups/Makefile.am10
-rw-r--r--src/cups/Makefile.in58
-rw-r--r--src/cups/genppd.c10
-rw-r--r--src/escputil/Makefile.am4
-rw-r--r--src/escputil/Makefile.in49
-rw-r--r--src/escputil/escputil.c133
-rw-r--r--src/foomatic/Makefile.am8
-rw-r--r--src/foomatic/Makefile.in54
-rw-r--r--src/foomatic/foomatic-printermap34
-rw-r--r--src/ghost/Makefile.am6
-rw-r--r--src/ghost/Makefile.in48
-rw-r--r--src/ghost/ijsgutenprint.c6
-rw-r--r--src/gimp/Makefile.am6
-rw-r--r--src/gimp/Makefile.in49
-rw-r--r--src/gimp2/Makefile.am6
-rw-r--r--src/gimp2/Makefile.in49
-rw-r--r--src/gutenprintui/Makefile.am6
-rw-r--r--src/gutenprintui/Makefile.in89
-rw-r--r--src/gutenprintui/gutenprintui-internal.h3
-rw-r--r--src/gutenprintui/panel.c219
-rw-r--r--src/gutenprintui/printrcl.c1326
-rw-r--r--src/gutenprintui/printrcy.c770
-rw-r--r--src/gutenprintui/printrcy.h9
-rw-r--r--src/gutenprintui2/Makefile.am6
-rw-r--r--src/gutenprintui2/Makefile.in110
-rw-r--r--src/gutenprintui2/gutenprintui-internal.h3
-rw-r--r--src/gutenprintui2/panel.c284
-rw-r--r--src/gutenprintui2/plist.c34
-rw-r--r--src/gutenprintui2/printrcl.c1326
-rw-r--r--src/gutenprintui2/printrcy.c770
-rw-r--r--src/gutenprintui2/printrcy.h9
-rw-r--r--src/main/Makefile.am6
-rw-r--r--src/main/Makefile.in94
-rw-r--r--src/main/color-conversion.h3
-rw-r--r--src/main/curve-cache.c4
-rw-r--r--src/main/escp2-channels.c307
-rw-r--r--src/main/escp2-inks.c29
-rw-r--r--src/main/escp2-papers.c279
-rw-r--r--src/main/escp2-resolutions.c12
-rw-r--r--src/main/path.c4
-rw-r--r--src/main/print-canon.c595
-rw-r--r--src/main/print-color.c145
-rw-r--r--src/main/print-dither-matrices.c24
-rw-r--r--src/main/print-escp2-data.c60
-rw-r--r--src/main/print-escp2.c53
-rw-r--r--src/main/print-escp2.h11
-rw-r--r--src/main/print-olympus.c120
-rw-r--r--src/main/print-pcl.c4
-rw-r--r--src/main/print-ps.c23
-rw-r--r--src/main/print-raw.c3
-rw-r--r--src/main/print-vars.c68
-rw-r--r--src/main/printers.xml159
-rw-r--r--src/testpattern/Makefile.am6
-rw-r--r--src/testpattern/Makefile.in51
-rw-r--r--src/testpattern/testpatternl.c1323
-rw-r--r--src/testpattern/testpatterny.c846
-rw-r--r--src/testpattern/testpatterny.h9
59 files changed, 6067 insertions, 3693 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 4a312ad..0f471da 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.18 2004/09/17 18:38:09 rleigh Exp $
+## $Id: Makefile.am,v 1.19 2005/11/21 11:16:22 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
SUBDIRS = \
diff --git a/src/Makefile.in b/src/Makefile.in
index 48de6f0..63a4960 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -53,6 +53,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+depcomp =
+am__depfiles_maybe =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -67,8 +69,6 @@ DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -106,7 +106,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -119,14 +118,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -261,13 +258,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -313,8 +305,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
SUBDIRS = \
main \
@@ -341,9 +331,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
diff --git a/src/cups/Makefile.am b/src/cups/Makefile.am
index 1448f15..f4ffc06 100644
--- a/src/cups/Makefile.am
+++ b/src/cups/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.81 2005/02/03 22:00:30 rleigh Exp $
+## $Id: Makefile.am,v 1.83 2005/11/22 14:43:05 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
@@ -119,11 +115,11 @@ endif
install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
- $(mkinstalldirs) $(DESTDIR)$(cups_modeldir); \
+ $(mkdir_p) $(DESTDIR)$(cups_modeldir); \
cd ppd ; \
for language in * ; do \
cd ..; \
- $(mkinstalldirs) $(DESTDIR)$(cups_modeldir)/$$language; \
+ $(mkdir_p) $(DESTDIR)$(cups_modeldir)/$$language; \
cd ppd/$$language; \
for ppdfile in * ; do \
(cd ../..; $(INSTALL_DATA) ppd/$$language/$$ppdfile $(DESTDIR)$(cups_modeldir)/$$language) ; \
diff --git a/src/cups/Makefile.in b/src/cups/Makefile.in
index bb55b9e..f506b11 100644
--- a/src/cups/Makefile.in
+++ b/src/cups/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -18,8 +18,6 @@
-SOURCES = $(canon_SOURCES) commandtocanon.c $(commandtoepson_SOURCES) $(cups_calibrate_SOURCES) $(cups_genppd_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES) $(epson_SOURCES) $(rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -106,8 +104,8 @@ rastertogutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_DEPENDE
sbinSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(sbin_SCRIPTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -142,8 +140,6 @@ pkgdatadir = $(cups_conf_datadir)
pkglibdir = $(cups_conf_serverbin)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -181,7 +177,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -194,14 +189,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -336,13 +329,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @cups_bindir@
@@ -388,8 +376,6 @@ sbindir = @cups_sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
empty =
pkgsysconfdir = $(cups_conf_serverroot)
@@ -446,9 +432,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/cups/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/cups/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/cups/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/cups/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -629,34 +615,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commandtocanon.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commandtoepson.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cups-calibrate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/epson.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genppd.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rastertoprinter.Po@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -822,7 +788,6 @@ clean-am: clean-binPROGRAMS clean-cupsexec_backendPROGRAMS \
clean-local clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -853,7 +818,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -924,11 +888,11 @@ cups-genppdupdate.@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@: $(top_b
install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
if test -n "$(INSTALL_DATA_LOCAL_DEPS)" ; then \
- $(mkinstalldirs) $(DESTDIR)$(cups_modeldir); \
+ $(mkdir_p) $(DESTDIR)$(cups_modeldir); \
cd ppd ; \
for language in * ; do \
cd ..; \
- $(mkinstalldirs) $(DESTDIR)$(cups_modeldir)/$$language; \
+ $(mkdir_p) $(DESTDIR)$(cups_modeldir)/$$language; \
cd ppd/$$language; \
for ppdfile in * ; do \
(cd ../..; $(INSTALL_DATA) ppd/$$language/$$ppdfile $(DESTDIR)$(cups_modeldir)/$$language) ; \
diff --git a/src/cups/genppd.c b/src/cups/genppd.c
index f7f6e62..c39d768 100644
--- a/src/cups/genppd.c
+++ b/src/cups/genppd.c
@@ -1,5 +1,5 @@
/*
- * "$Id: genppd.c,v 1.107 2005/04/23 00:26:07 rlk Exp $"
+ * "$Id: genppd.c,v 1.109 2005/10/18 02:08:16 rlk Exp $"
*
* PPD file generation program for the CUPS drivers.
*
@@ -30,8 +30,6 @@
* Contents:
*
* main() - Process files on the command-line...
- * initialize_stp_options() - Initialize the min/max values for
- * each STP numeric option.
* usage() - Show program usage.
* help() - Show detailed program usage.
* getlangs() - Get available translations.
@@ -510,7 +508,7 @@ dirent_sort(const void *a,
char **
getlangs(void)
{
- struct dirent** langdirs;
+ struct dirent** langdirs = NULL;
int n;
char **langs;
@@ -1440,7 +1438,7 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
}
if (!desc.is_mandatory)
gzprintf(fp, "*Stp%s None/None: \"\"\n",
- desc.name, desc.deflt.dbl);
+ desc.name);
else if (! printed_default_value)
gzprintf(fp, "*Stp%s None/%.3f: \"\"\n",
desc.name, desc.deflt.dbl);
@@ -1709,5 +1707,5 @@ write_ppd(const stp_printer_t *p, /* I - Printer driver */
/*
- * End of "$Id: genppd.c,v 1.107 2005/04/23 00:26:07 rlk Exp $".
+ * End of "$Id: genppd.c,v 1.109 2005/10/18 02:08:16 rlk Exp $".
*/
diff --git a/src/escputil/Makefile.am b/src/escputil/Makefile.am
index e46d38b..4bba6e2 100644
--- a/src/escputil/Makefile.am
+++ b/src/escputil/Makefile.am
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/escputil/Makefile.in b/src/escputil/Makefile.in
index 1e4adc4..91cb23a 100644
--- a/src/escputil/Makefile.in
+++ b/src/escputil/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,8 +16,6 @@
# Variables
-SOURCES = $(escputil_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -66,8 +64,8 @@ am__DEPENDENCIES_1 = $(top_builddir)/src/main/libgutenprint.la
am__DEPENDENCIES_2 =
escputil_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -83,8 +81,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -122,7 +118,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -135,14 +130,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -277,13 +270,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -329,8 +317,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
escputil_SOURCES = d4lib.c escputil.c d4lib.h
escputil_LDADD = $(GUTENPRINT_LIBS) $(LIBREADLINE_DEPS)
@@ -348,9 +334,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/escputil/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/escputil/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/escputil/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/escputil/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -406,29 +392,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/d4lib.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escputil.Po@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -553,7 +524,6 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -579,7 +549,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/escputil/escputil.c b/src/escputil/escputil.c
index 669cd88..3be1bf3 100644
--- a/src/escputil/escputil.c
+++ b/src/escputil/escputil.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escputil.c,v 1.75 2005/08/13 20:24:55 rlk Exp $"
+ * "$Id: escputil.c,v 1.76 2005/10/01 18:47:29 rlk Exp $"
*
* Printer maintenance utility for EPSON Stylus (R) printers
*
@@ -858,20 +858,22 @@ get_printer(int quiet, int fail_if_not_found)
static const char *colors_new[] =
{
- N_("Black"),
- N_("Matte Black"),
- N_("Photo Black"),
- N_("Cyan"),
- N_("Magenta"),
- N_("Yellow"),
- N_("Light Cyan"),
- N_("Light Magenta"),
- N_("Dark Yellow"),
- N_("Light Black"),
- N_("unknown"),
- N_("Red"),
- N_("Blue"),
- N_("Gloss Optimizer"),
+ N_("Black"), /* 0 */
+ N_("Photo Black"), /* 1 */
+ N_("Unknown"), /* 2 */
+ N_("Cyan"), /* 3 */
+ N_("Magenta"), /* 4 */
+ N_("Yellow"), /* 5 */
+ N_("Light Cyan"), /* 6 */
+ N_("Light Magenta"), /* 7 */
+ N_("Unknown"), /* 8 */
+ N_("Unknown"), /* 9 */
+ N_("Light Black"), /* a */
+ N_("Matte Black"), /* b */
+ N_("Red"), /* c */
+ N_("Blue"), /* d */
+ N_("Gloss Optimizer"), /* e */
+ N_("Light Light Black"), /* f */
};
static int color_count = sizeof(colors_new) / sizeof(const char *);
@@ -969,34 +971,15 @@ do_status_command_internal(status_cmd_t cmd)
while (buf[i] != 0x0f && i < status)
i += buf[i + 1] + 2;
ind = buf + i;
- i = 4;
+ i = 3;
col_number = 0;
- printf("%20s %s\n", _("Ink color"), _("Percent remaining"));
- while (i < ind[1] + 3)
+ printf("%18s %20s\n", _("Ink color"), _("Percent remaining"));
+ while (i < ind[1])
{
- if (ind[i] == 0)
- {
- /* black */
- switch (col_number)
- {
- case 0:
- printf("%20s %3d\n", _(colors_new[0]), ind[i + 1]);
- break;
- case 3:
- printf("%20s %3d\n", _(colors_new[1]), ind[i + 1]);
- break;
- case 4:
- printf("%20s %3d\n", _(colors_new[2]), ind[i + 1]);
- break;
- }
- }
+ if (ind[i] < color_count)
+ printf("%18s %20d\n", _(colors_new[(int) ind[i]]), ind[i + 2]);
else
- {
- if (ind[i] + 2 < color_count)
- printf("%20s %3d\n", _(colors_new[ind[i] + 2]), ind[i + 1]);
- else
- printf("%18s%2x %3d\n", _("Unknown"), ind[i] + 2, ind[i + 1]);
- }
+ printf("%18s %20d\n", _("Unknown"), ind[i + 2]);
col_number++;
i+=3;
}
@@ -1085,7 +1068,7 @@ do_status_command_internal(status_cmd_t cmd)
{
ind += 3;
- printf("%20s %s\n", _("Ink color"), _("Percent remaining"));
+ printf("%18s %20s\n", _("Ink color"), _("Percent remaining"));
for (i = 0; i < stp_string_list_count(desc.bounds.str); i++)
{
int val, j;
@@ -1103,7 +1086,7 @@ do_status_command_internal(status_cmd_t cmd)
exit(1);
}
val = (ind[0] << 4) + ind[1];
- printf("%20s %3d\n",_(stp_string_list_param(desc.bounds.str, i)->text),
+ printf("%18s %20d\n",_(stp_string_list_param(desc.bounds.str, i)->text),
val);
ind += 2;
}
@@ -1134,7 +1117,8 @@ do_extended_ink_info(int extended_output)
int credit;
int retry = 4;
char buf[1024];
- unsigned val, id, year, month, ik1, ik2;
+ unsigned val, id, id2, year, year2, month, month2;
+ unsigned iv[6];
char *ind;
int i;
@@ -1192,17 +1176,68 @@ do_extended_ink_info(int extended_output)
exit(1);
}
ind = strchr(buf, 'I');
- if (sscanf(ind,
- "II:01;IQT:%x;TSH:NAVL;PDY:%x;PDM:%x;IC1:%x;IC2:000A;IK1:%x;IK2:%x;TOV:18;TVU:06;LOG:INKbyEPSON;",
- &val, &year, &month, &id, &ik1, &ik2 ) == 6)
+ if (sscanf(ind,
+ "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;IQT:%x,%x,%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:EPSON;",
+ &iv[0], &year, &month, &id,
+ &iv[1], &iv[2], &iv[3], &iv[4], &iv[5],
+ &year2, &month2, &id2) == 12 ||
+ sscanf(ind,
+ "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;IQT:%x,%x,%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;",
+ &iv[0], &year, &month, &id,
+ &iv[1], &iv[2], &iv[3], &iv[4], &iv[5],
+ &year2, &month2, &id2) == 12)
+ {
+ int j;
+ printf("%18s %20s %12s %7s\n",
+ _("Ink color"), _("Percent remaining"), _("Part number"),
+ _("Date"));
+ printf("%18s %20d T0%03d %2d%02d-%02d\n",
+ _(stp_string_list_param(desc.bounds.str, 0)->text),
+ iv[0], id, (year > 80 ? 19 : 20), year, month);
+ for (j = 1; j < 6; j++)
+ printf("%18s %20d T0%03d %2d%02d-%02d\n",
+ _(stp_string_list_param(desc.bounds.str, j)->text),
+ iv[j], id2, (year2 > 80 ? 19 : 20), year2, month2);
+ break;
+ }
+ else if (sscanf(ind,
+ "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;IQT:%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:EPSON;",
+ &iv[0], &year, &month, &id,
+ &iv[1], &iv[2], &iv[3],
+ &year2, &month2, &id2) == 10 ||
+ sscanf(ind,
+ "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;IQT:%x,%x,%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*xIK1:%*x;IK2;%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;",
+ &iv[0], &year, &month, &id,
+ &iv[1], &iv[2], &iv[3],
+ &year2, &month2, &id2) == 10)
+ {
+ int j;
+ printf("%18s %20s %12s %7s\n",
+ _("Ink color"), _("Percent remaining"), _("Part number"),
+ _("Date"));
+ printf("%18s %20d T0%03d %2d%02d-%02d\n",
+ _(stp_string_list_param(desc.bounds.str, 0)->text),
+ iv[0], id, (year > 80 ? 19 : 20), year, month);
+ for (j = 1; j < 4; j++)
+ printf("%18s %20d T0%03d %2d%02d-%02d\n",
+ _(stp_string_list_param(desc.bounds.str, j)->text),
+ iv[j], id2, (year2 > 80 ? 19 : 20), year2, month2);
+ break;
+ }
+ else if (sscanf(ind,
+ "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:EPSON;",
+ &val, &year, &month, &id ) == 4 ||
+ sscanf(ind,
+ "II:01;IQT:%x;TSH:%*4s;PDY:%x;PDM:%x;IC1:%x;IC2:%*x;IK1:%*x;IK2:%*x;TOV:%*x;TVU:%*x;LOG:INKbyEPSON;",
+ &val, &year, &month, &id ) == 4)
{
if (i == 0)
- printf("%15s %20s %12s %7s\n",
+ printf("%18s %20s %12s %7s\n",
_("Ink color"), _("Percent remaining"), _("Part number"),
_("Date"));
- printf("%15s %20d T0%03d 20%02d-%02d\n",
+ printf("%18s %20d T0%03d %2d%02d-%02d\n",
_(stp_string_list_param(desc.bounds.str, i)->text),
- val, id, year, month);
+ val, id, (year > 80 ? 19 : 20), year, month);
}
}
else /* could not write */
diff --git a/src/foomatic/Makefile.am b/src/foomatic/Makefile.am
index 294104a..316dcbe 100644
--- a/src/foomatic/Makefile.am
+++ b/src/foomatic/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.45 2005/04/12 00:45:09 rlk Exp $
+## $Id: Makefile.am,v 1.47 2005/11/22 14:43:05 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
@@ -82,7 +78,7 @@ install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
install-kit:
if test -n "$(DESTDIR)" ; then \
- $(mkinstalldirs) $(DESTDIR)`$(FOOMATIC_KITLOAD) -l` ; \
+ $(mkdir_p) $(DESTDIR)`$(FOOMATIC_KITLOAD) -l` ; \
$(FOOMATIC_KITLOAD) -f -d $(DESTDIR) -k $(FOOMATIC_DB) ; \
else \
$(FOOMATIC_KITLOAD) -f -k $(FOOMATIC_DB) ; \
diff --git a/src/foomatic/Makefile.in b/src/foomatic/Makefile.in
index a9abef7..2cbf359 100644
--- a/src/foomatic/Makefile.in
+++ b/src/foomatic/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,8 +16,6 @@
# Variables
-SOURCES = $(gutenprint_version_SOURCES) $(paper_sizes_SOURCES) $(printer_margins_SOURCES) $(printer_options_SOURCES) $(printers_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -80,8 +78,8 @@ am_printers_OBJECTS = printers.$(OBJEXT)
printers_OBJECTS = $(am_printers_OBJECTS)
printers_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -101,8 +99,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -140,7 +136,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -153,14 +148,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -295,13 +288,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -347,8 +335,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
DISTDIRS = foomatic-templates-ijs
LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS)
@@ -383,9 +369,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/foomatic/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/foomatic/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/foomatic/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/foomatic/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -436,32 +422,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gutenprint-version.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paper_sizes.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer_margins.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer_options.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printers.Po@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -588,7 +556,6 @@ clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -614,7 +581,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -675,7 +641,7 @@ install-data-local: $(INSTALL_DATA_LOCAL_DEPS)
install-kit:
if test -n "$(DESTDIR)" ; then \
- $(mkinstalldirs) $(DESTDIR)`$(FOOMATIC_KITLOAD) -l` ; \
+ $(mkdir_p) $(DESTDIR)`$(FOOMATIC_KITLOAD) -l` ; \
$(FOOMATIC_KITLOAD) -f -d $(DESTDIR) -k $(FOOMATIC_DB) ; \
else \
$(FOOMATIC_KITLOAD) -f -k $(FOOMATIC_DB) ; \
diff --git a/src/foomatic/foomatic-printermap b/src/foomatic/foomatic-printermap
index e80bf16..a7d7ee7 100644
--- a/src/foomatic/foomatic-printermap
+++ b/src/foomatic/foomatic-printermap
@@ -64,7 +64,9 @@
#gptofoo canon-cp220 printer/Canon-CP-330
#gptofoo canon-cp220 printer/Canon-SELPHY-CP-400
#gptofoo canon-cp220 printer/Canon-SELPHY-CP-500
+#gptofoo canon-cp220 printer/Canon-SELPHY-CP-510
#gptofoo canon-cp220 printer/Canon-SELPHY-CP-600
+#gptofoo canon-cp220 printer/Canon-SELPHY-CP-710
#gptofoo pcl-4 printer/Canon-GP_335
#gptofoo pcl-3 printer/Canon-LBP-4sx
#gptofoo pcl-4l printer/Canon-LBP-430
@@ -72,6 +74,7 @@
#gptofoo pcl-6 printer/Canon-LBP-1260
#gptofoo pcl-6 printer/Canon-LBP-1760
#gptofoo bjc-4300 printer/Canon-S100
+#gptofoo bjc-s200 printer/Canon-S200
#gptofoo bjc-s800 printer/Canon-S300
#gptofoo bjc-s400 printer/Canon-S400
#gptofoo bjc-s450 printer/Canon-S450
@@ -104,20 +107,27 @@
#gptofoo pcl-4 printer/Epson-EPL-6100
#gptofoo pcl-4 printer/Epson-EPL-6100PS
#gptofoo pcl-2 printer/Epson-EPL-7100
+#gptofoo escp2-c20 printer/Epson-Stylus_C20
#gptofoo escp2-c20sx printer/Epson-Stylus_C20SX
#gptofoo escp2-c20ux printer/Epson-Stylus_C20UX
+#gptofoo escp2-c40 printer/Epson-Stylus_C40
#gptofoo escp2-c40sx printer/Epson-Stylus_C40SX
#gptofoo escp2-c40ux printer/Epson-Stylus_C40UX
+#gptofoo escp2-c41 printer/Epson-Stylus_C41
#gptofoo escp2-c41sx printer/Epson-Stylus_C41SX
#gptofoo escp2-c41ux printer/Epson-Stylus_C41UX
+#gptofoo escp2-c42 printer/Epson-Stylus_C42
#gptofoo escp2-c42sx printer/Epson-Stylus_C42SX
#gptofoo escp2-c42ux printer/Epson-Stylus_C42UX
+#gptofoo escp2-c43 printer/Epson-Stylus_C43
#gptofoo escp2-c43sx printer/Epson-Stylus_C43SX
#gptofoo escp2-c43ux printer/Epson-Stylus_C43UX
+#gptofoo escp2-c44 printer/Epson-Stylus_C44
#gptofoo escp2-c44sx printer/Epson-Stylus_C44SX
#gptofoo escp2-c44ux printer/Epson-Stylus_C44UX
#gptofoo escp2-c45 printer/Epson-Stylus_C45
#gptofoo escp2-c46 printer/Epson-Stylus_C46
+#gptofoo escp2-c48 printer/Epson-Stylus_C48
#gptofoo escp2-c50 printer/Epson-Stylus_C50
#gptofoo escp2-c60 printer/Epson-Stylus_C60
#gptofoo escp2-c61 printer/Epson-Stylus_C61
@@ -126,6 +136,7 @@
#gptofoo escp2-c64 printer/Epson-Stylus_C64
#gptofoo escp2-c65 printer/Epson-Stylus_C65
#gptofoo escp2-c66 printer/Epson-Stylus_C66
+#gptofoo escp2-c68 printer/Epson-Stylus_C68
#gptofoo escp2-c70 printer/Epson-Stylus_C70
#gptofoo escp2-c80 printer/Epson-Stylus_C80
#gptofoo escp2-c82 printer/Epson-Stylus_C82
@@ -133,6 +144,7 @@
#gptofoo escp2-c84 printer/Epson-Stylus_C84
#gptofoo escp2-c85 printer/Epson-Stylus_C85
#gptofoo escp2-c86 printer/Epson-Stylus_C86
+#gptofoo escp2-c88 printer/Epson-Stylus_C88
#gptofoo escp2 printer/Epson-Stylus_Color
#gptofoo escp2 printer/Epson-Stylus_Color_I
#gptofoo escp2 printer/Epson-Stylus_Color_II
@@ -196,8 +208,11 @@
#gptofoo escp2-ex3 printer/Epson-Stylus_Photo_EX3
#gptofoo escp2-r200 printer/Epson-Stylus_Photo_R200
#gptofoo escp2-r210 printer/Epson-Stylus_Photo_R210
+#gptofoo escp2-r220 printer/Epson-Stylus_Photo_R220
#gptofoo escp2-r300 printer/Epson-Stylus_Photo_R300
#gptofoo escp2-r310 printer/Epson-Stylus_Photo_R310
+#gptofoo escp2-r320 printer/Epson-Stylus_Photo_R320
+#gptofoo escp2-r340 printer/Epson-Stylus_Photo_R340
#gptofoo escp2-rx400 printer/Epson-Stylus_Photo_RX400
#gptofoo escp2-rx420 printer/Epson-Stylus_Photo_RX420
#gptofoo escp2-rx425 printer/Epson-Stylus_Photo_RX425
@@ -207,8 +222,10 @@
#gptofoo escp2-rx600 printer/Epson-Stylus_Photo_RX600
#gptofoo escp2-rx620 printer/Epson-Stylus_Photo_RX620
#gptofoo escp2-rx630 printer/Epson-Stylus_Photo_RX630
+#gptofoo escp2-rx700 printer/Epson-Stylus_Photo_RX700
#gptofoo escp2-r800 printer/Epson-Stylus_Photo_R800
#gptofoo escp2-r1800 printer/Epson-Stylus_Photo_R1800
+#gptofoo escp2-r2400 printer/Epson-Stylus_Photo_R2400
#gptofoo escp2-5000 printer/Epson-Stylus_Pro_5000
#gptofoo escp2-5500 printer/Epson-Stylus_Pro_5500
#gptofoo escp2-7000 printer/Epson-Stylus_Pro_7000
@@ -226,17 +243,32 @@
#gptofoo escp2-cx3500 printer/Epson-Stylus_CX3500
#gptofoo escp2-cx3600 printer/Epson-Stylus_CX3600
#gptofoo escp2-cx3650 printer/Epson-Stylus_CX3650
+#gptofoo escp2-cx3700 printer/Epson-Stylus_CX3700
+#gptofoo escp2-cx3800 printer/Epson-Stylus_CX3800
+#gptofoo escp2-cx3810 printer/Epson-Stylus_CX3810
+#gptofoo escp2-cx4200 printer/Epson-Stylus_CX4200
#gptofoo escp2-cx4600 printer/Epson-Stylus_CX4600
+#gptofoo escp2-cx4700 printer/Epson-Stylus_CX4700
+#gptofoo escp2-cx4800 printer/Epson-Stylus_CX4800
#gptofoo escp2-cx5100 printer/Epson-Stylus_CX5100
#gptofoo escp2-cx5200 printer/Epson-Stylus_CX5200
#gptofoo escp2-cx5300 printer/Epson-Stylus_CX5300
#gptofoo escp2-cx5400 printer/Epson-Stylus_CX5400
+#gptofoo escp2-cx5800 printer/Epson-Stylus_CX5800
#gptofoo escp2-cx6300 printer/Epson-Stylus_CX6300
#gptofoo escp2-cx6400 printer/Epson-Stylus_CX6400
#gptofoo escp2-cx6500 printer/Epson-Stylus_CX6500
#gptofoo escp2-cx6600 printer/Epson-Stylus_CX6600
+#gptofoo escp2-cx7700 printer/Epson-Stylus_CX7700
+#gptofoo escp2-cx7800 printer/Epson-Stylus_CX7800
#gptofoo escp2-cx8300 printer/Epson-Stylus_CX8300
#gptofoo escp2-cx8400 printer/Epson-Stylus_CX8400
+#gptofoo escp2-d68 printer/Epson-Stylus_D68
+#gptofoo escp2-d88 printer/Epson-Stylus_D88
+#gptofoo escp2-dx3800 printer/Epson-Stylus_DX3800
+#gptofoo escp2-dx3850 printer/Epson-Stylus_DX3850
+#gptofoo escp2-dx4200 printer/Epson-Stylus_DX4200
+#gptofoo escp2-dx4800 printer/Epson-Stylus_DX4800
#gptofoo escp2-cl700 printer/Epson-CL_700
#gptofoo escp2-cl750 printer/Epson-CL_750
#gptofoo escp2-cl760 printer/Epson-CL_760
@@ -638,6 +670,7 @@
#gptofoo pcl-2 printer/Olivetti-JP350S
#gptofoo pcl-2 printer/Olivetti-PG_306
#gptofoo olympus-p10 printer/Olympus-P-10
+#gptofoo olympus-p10 printer/Olympus-P-11
#gptofoo olympus-p200 printer/Olympus-P-200
#gptofoo olympus-p300 printer/Olympus-P-300E
#gptofoo olympus-p300 printer/Olympus-P-300U
@@ -669,6 +702,7 @@
#gptofoo pcl-6 printer/Sharp-AR-161
#gptofoo pcl-601 printer/Sony-IJP-V100
#gptofoo sony-updp10 printer/Sony-UP-DP10
+#gptofoo sony-updr150 printer/Sony-UP-DR150
#gptofoo pcl-2 printer/Star-LS-04
#gptofoo pcl-2 printer/Star-LaserPrinter_8
#gptofoo pcl-3 printer/Tally-MT908
diff --git a/src/ghost/Makefile.am b/src/ghost/Makefile.am
index 2425fb5..b4c0ef5 100644
--- a/src/ghost/Makefile.am
+++ b/src/ghost/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.37 2005/04/18 11:20:01 rlk Exp $
+## $Id: Makefile.am,v 1.38 2005/11/21 11:16:23 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/ghost/Makefile.in b/src/ghost/Makefile.in
index 345fd21..6479033 100644
--- a/src/ghost/Makefile.in
+++ b/src/ghost/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,8 +16,6 @@
# Variables
-SOURCES = $(ijsgutenprint_@GUTENPRINT_MAJOR_VERSION@_@GUTENPRINT_MINOR_VERSION@_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -71,8 +69,8 @@ am__DEPENDENCIES_2 =
@BUILD_GHOSTSCRIPT_TRUE@ $(am__DEPENDENCIES_1) \
@BUILD_GHOSTSCRIPT_TRUE@ $(am__DEPENDENCIES_2)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -88,8 +86,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -127,7 +123,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -140,14 +135,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -282,13 +275,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -334,8 +322,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
MAINTAINERCLEANFILES = Makefile.in
LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) @IJS_CFLAGS@
@@ -355,9 +341,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ghost/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/ghost/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/ghost/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/ghost/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -413,28 +399,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ijsgutenprint.Po@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -559,7 +531,6 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -585,7 +556,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/ghost/ijsgutenprint.c b/src/ghost/ijsgutenprint.c
index 06efa2a..0a11d25 100644
--- a/src/ghost/ijsgutenprint.c
+++ b/src/ghost/ijsgutenprint.c
@@ -1,5 +1,5 @@
/*
- * $Id: ijsgutenprint.c,v 1.10 2005/08/10 11:29:46 rlk Exp $
+ * $Id: ijsgutenprint.c,v 1.11 2005/10/18 02:08:16 rlk Exp $
*
* IJS server for Gutenprint.
*
@@ -90,7 +90,7 @@ static const char DeviceCMYK[] = "DeviceCMYK";
static const char *version_id;
static int version_is_ok = 1;
-static const char version_mismatch[] = N_("\
+static const char *version_mismatch = N_("\
ijsgutenprint: the version of Gutenprint software installed (%s)\n\
does not match the PPD file (%s). If you have upgraded your version\n\
of Gutenprint recently, you must reinstall all printer queues.\n\
@@ -577,7 +577,7 @@ gutenprint_set_cb (void *set_cb_data, IjsServerCtx *ctx, IjsJobId jobid,
int code = 0;
char vbuf[256];
int i;
- double z;
+ double z = 0;
IMAGE *img = (IMAGE *)set_cb_data;
STP_DEBUG(print_debug_setcb(key, value, value_size));
if (value_size > sizeof(vbuf)-1)
diff --git a/src/gimp/Makefile.am b/src/gimp/Makefile.am
index 6541d80..3d0e8c0 100644
--- a/src/gimp/Makefile.am
+++ b/src/gimp/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.35 2004/09/17 18:38:13 rleigh Exp $
+## $Id: Makefile.am,v 1.36 2005/11/21 11:16:23 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/gimp/Makefile.in b/src/gimp/Makefile.in
index 5cc1000..95fccd5 100644
--- a/src/gimp/Makefile.in
+++ b/src/gimp/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,8 +16,6 @@
# Variables
-SOURCES = $(print_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -66,8 +64,8 @@ am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = \
$(top_builddir)/src/gutenprintui/libgutenprintui.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -83,8 +81,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -122,7 +118,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -135,14 +130,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -277,13 +270,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -329,8 +317,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) $(GIMP_CFLAGS)
print_SOURCES = \
@@ -355,9 +341,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gimp/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gimp/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/gimp/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/gimp/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -413,29 +399,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-image-gimp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Po@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -561,7 +532,6 @@ clean-am: clean-generic clean-gimp_plug_inPROGRAMS clean-libtool \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -587,7 +557,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gimp2/Makefile.am b/src/gimp2/Makefile.am
index 49f45fa..d470181 100644
--- a/src/gimp2/Makefile.am
+++ b/src/gimp2/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.5 2004/12/29 19:09:55 rlk Exp $
+## $Id: Makefile.am,v 1.6 2005/11/21 11:16:23 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/gimp2/Makefile.in b/src/gimp2/Makefile.in
index daae3f6..fbcb0fb 100644
--- a/src/gimp2/Makefile.in
+++ b/src/gimp2/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,8 +16,6 @@
# Variables
-SOURCES = $(print_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -66,8 +64,8 @@ am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = \
$(top_builddir)/src/gutenprintui2/libgutenprintui2.la
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -83,8 +81,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -122,7 +118,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -135,14 +130,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -277,13 +270,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -329,8 +317,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
LOCAL_CPPFLAGS = $(GUTENPRINT_CFLAGS) $(GIMP2_CFLAGS)
print_SOURCES = \
@@ -355,9 +341,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gimp2/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gimp2/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/gimp2/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/gimp2/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -413,29 +399,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-image-gimp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print.Po@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -561,7 +532,6 @@ clean-am: clean-generic clean-gimp2_plug_inPROGRAMS clean-libtool \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -587,7 +557,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gutenprintui/Makefile.am b/src/gutenprintui/Makefile.am
index 8e4a642..215dc96 100644
--- a/src/gutenprintui/Makefile.am
+++ b/src/gutenprintui/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.4 2005/06/26 10:56:51 rleigh Exp $
+## $Id: Makefile.am,v 1.5 2005/11/21 11:16:23 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/gutenprintui/Makefile.in b/src/gutenprintui/Makefile.in
index a741fb8..f9cd11b 100644
--- a/src/gutenprintui/Makefile.in
+++ b/src/gutenprintui/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -17,8 +17,6 @@
# Variables
-SOURCES = $(libgutenprintui_la_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -78,8 +76,8 @@ libgutenprintui_la_OBJECTS = $(am_libgutenprintui_la_OBJECTS)
@BUILD_LIBGUTENPRINTUI_TRUE@am_libgutenprintui_la_rpath = -rpath \
@BUILD_LIBGUTENPRINTUI_TRUE@ $(libdir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -102,8 +100,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -141,7 +137,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -154,14 +149,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -296,13 +289,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -348,8 +336,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
m4datadir = $(datadir)/aclocal
pkgconfigdatadir = $(libdir)/pkgconfig
@@ -391,9 +377,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gutenprintui/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/gutenprintui/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -454,75 +440,32 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-panel.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-plist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-printrcl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-printrcy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui_la-ui-utils.Plo@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
libgutenprintui_la-printrcy.lo: printrcy.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-printrcy.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-printrcy.Tpo" -c -o libgutenprintui_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-printrcy.Tpo" "$(DEPDIR)/libgutenprintui_la-printrcy.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-printrcy.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcy.c' object='libgutenprintui_la-printrcy.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
libgutenprintui_la-printrcl.lo: printrcl.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-printrcl.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-printrcl.Tpo" -c -o libgutenprintui_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-printrcl.Tpo" "$(DEPDIR)/libgutenprintui_la-printrcl.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-printrcl.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcl.c' object='libgutenprintui_la-printrcl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
libgutenprintui_la-plist.lo: plist.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-plist.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-plist.Tpo" -c -o libgutenprintui_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-plist.Tpo" "$(DEPDIR)/libgutenprintui_la-plist.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-plist.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='plist.c' object='libgutenprintui_la-plist.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
libgutenprintui_la-panel.lo: panel.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-panel.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-panel.Tpo" -c -o libgutenprintui_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-panel.Tpo" "$(DEPDIR)/libgutenprintui_la-panel.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-panel.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='panel.c' object='libgutenprintui_la-panel.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
libgutenprintui_la-ui-utils.lo: ui-utils.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-ui-utils.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-ui-utils.Tpo" -c -o libgutenprintui_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-ui-utils.Tpo" "$(DEPDIR)/libgutenprintui_la-ui-utils.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-ui-utils.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ui-utils.c' object='libgutenprintui_la-ui-utils.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
libgutenprintui_la-print-image-thumbnail.lo: print-image-thumbnail.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -MT libgutenprintui_la-print-image-thumbnail.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Tpo" -c -o libgutenprintui_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Tpo" "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Plo"; else rm -f "$(DEPDIR)/libgutenprintui_la-print-image-thumbnail.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='print-image-thumbnail.c' object='libgutenprintui_la-print-image-thumbnail.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
.l.c:
$(LEXCOMPILE) $<
@@ -694,7 +637,6 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -720,7 +662,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gutenprintui/gutenprintui-internal.h b/src/gutenprintui/gutenprintui-internal.h
index bc4d487..3eb98d8 100644
--- a/src/gutenprintui/gutenprintui-internal.h
+++ b/src/gutenprintui/gutenprintui-internal.h
@@ -1,5 +1,5 @@
/*
- * "$Id: gutenprintui-internal.h,v 1.1 2004/09/17 18:38:13 rleigh Exp $"
+ * "$Id: gutenprintui-internal.h,v 1.2 2005/09/17 21:54:33 rlk Exp $"
*
* Print plug-in for the GIMP.
*
@@ -109,6 +109,7 @@ typedef struct
typedef struct
{
unsigned char *base_addr;
+ const char *output_type;
int bpp;
off_t offset;
off_t limit;
diff --git a/src/gutenprintui/panel.c b/src/gutenprintui/panel.c
index ffc46ef..e6ba4db 100644
--- a/src/gutenprintui/panel.c
+++ b/src/gutenprintui/panel.c
@@ -1,5 +1,5 @@
/*
- * "$Id: panel.c,v 1.4 2005/08/14 16:08:29 rleigh Exp $"
+ * "$Id: panel.c,v 1.5 2005/09/17 21:54:33 rlk Exp $"
*
* Main window code for Print plug-in for the GIMP.
*
@@ -70,6 +70,9 @@ static GtkWidget *cyan_button;
static GtkWidget *magenta_button;
static GtkWidget *yellow_button;
static GtkWidget *black_button;
+static GtkWidget *red_button;
+static GtkWidget *green_button;
+static GtkWidget *blue_button;
static GtkWidget *print_dialog; /* Print dialog window */
@@ -142,6 +145,7 @@ static gboolean need_exposure = FALSE;
static gboolean suppress_scaling_adjustment = FALSE;
static gboolean suppress_scaling_callback = FALSE;
static gboolean thumbnail_update_pending = FALSE;
+static gboolean thumbnail_needs_rebuild = FALSE;
/*
* These are semaphores, not true booleans.
*/
@@ -253,7 +257,7 @@ static void redraw_color_swatch (void);
static void color_update (GtkAdjustment *adjustment);
static void dimension_update (GtkAdjustment *adjustment);
static void set_controls_active (GtkObject *checkbutton, gpointer optno);
-static void update_adjusted_thumbnail (void);
+static void update_adjusted_thumbnail (gboolean regenerate_image);
static void set_media_size(const gchar *new_media_size);
static const stp_printer_t *tmp_printer = NULL;
@@ -384,7 +388,7 @@ open_curve_editor(GtkObject *button, gpointer xopt)
stp_curve_destroy(opt->info.curve.current);
opt->info.curve.current = nseed;
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(FALSE);
}
/* gtk_window_activate_focus(GTK_WINDOW(opt->info.curve.dialog)); */
return 1;
@@ -400,7 +404,7 @@ set_default_curve_callback(GtkObject *button, gpointer xopt)
set_gtk_curve_values(gcurve, seed);
set_stp_curve_values(gcurve, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -416,7 +420,7 @@ set_previous_curve_callback(GtkObject *button, gpointer xopt)
set_gtk_curve_values(gcurve, seed);
set_stp_curve_values(gcurve, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -434,7 +438,7 @@ set_curve_callback(GtkObject *button, gpointer xopt)
stp_curve_destroy(opt->info.curve.current);
opt->info.curve.current = NULL;
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -447,7 +451,7 @@ curve_draw_callback(GtkWidget *widget, GdkEvent *event, gpointer xopt)
case GDK_BUTTON_RELEASE:
set_stp_curve_values(widget, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
break;
default:
break;
@@ -461,7 +465,7 @@ curve_type_changed(GtkWidget *widget, gpointer xopt)
option_t *opt = (option_t *)xopt;
set_stp_curve_values(widget, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -479,7 +483,7 @@ cancel_curve_callback(GtkObject *button, gpointer xopt)
gtk_widget_set_sensitive(GTK_WIDGET(opt->checkbox), TRUE);
opt->info.curve.is_visible = FALSE;
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
return 1;
}
@@ -566,8 +570,7 @@ checkbox_callback(GtkObject *button, gpointer xopt)
opt->info.bool.current);
invalidate_frame();
invalidate_preview_thumbnail();
- if (opt->fast_desc->p_class == STP_PARAMETER_CLASS_OUTPUT)
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
preview_update();
return 1;
}
@@ -1147,7 +1150,7 @@ static void
color_button_callback(GtkWidget *widget, gpointer data)
{
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
static void
@@ -2135,6 +2138,27 @@ create_color_adjust_window (void)
gtk_signal_connect (GTK_OBJECT (black_button), "toggled",
GTK_SIGNAL_FUNC (color_button_callback), NULL);
+ red_button = gtk_toggle_button_new_with_label(_("Red"));
+ gtk_box_pack_start(GTK_BOX(output_color_vbox), red_button, TRUE, TRUE, 0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(red_button), TRUE);
+ gtk_widget_show(GTK_WIDGET(red_button));
+ gtk_signal_connect (GTK_OBJECT (red_button), "toggled",
+ GTK_SIGNAL_FUNC (color_button_callback), NULL);
+
+ green_button = gtk_toggle_button_new_with_label(_("Green"));
+ gtk_box_pack_start(GTK_BOX(output_color_vbox), green_button, TRUE, TRUE,0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(green_button), TRUE);
+ gtk_widget_show(GTK_WIDGET(green_button));
+ gtk_signal_connect (GTK_OBJECT (green_button), "toggled",
+ GTK_SIGNAL_FUNC (color_button_callback), NULL);
+
+ blue_button = gtk_toggle_button_new_with_label(_("Blue"));
+ gtk_box_pack_start(GTK_BOX(output_color_vbox), blue_button, TRUE, TRUE, 0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(blue_button), TRUE);
+ gtk_widget_show(GTK_WIDGET(blue_button));
+ gtk_signal_connect (GTK_OBJECT (blue_button), "toggled",
+ GTK_SIGNAL_FUNC (color_button_callback), NULL);
+
color_adjustment_table = gtk_table_new(1, 1, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (color_adjustment_table), 2);
gtk_table_set_row_spacings (GTK_TABLE (color_adjustment_table), 0);
@@ -2330,7 +2354,7 @@ create_main_window (void)
do_update_thumbnail = 1;
build_printer_combo ();
plist_callback (NULL, (gpointer) stpui_plist_current);
- update_adjusted_thumbnail ();
+ update_adjusted_thumbnail (TRUE);
gtk_widget_show (print_dialog);
}
@@ -2650,7 +2674,7 @@ set_orientation(int orientation)
preview_thumbnail_w = thumbnail_h;
break;
}
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(FALSE);
}
static void
@@ -2848,7 +2872,7 @@ do_color_updates (void)
}
}
}
- update_adjusted_thumbnail ();
+ update_adjusted_thumbnail (TRUE);
}
static void
@@ -3101,7 +3125,7 @@ plist_callback (GtkWidget *widget,
setup_update ();
do_all_updates();
suppress_preview_update--;
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
preview_update ();
}
@@ -3299,7 +3323,7 @@ combo_callback(GtkWidget *widget, gpointer data)
set_media_size(new_value);
g_idle_add(refresh_all_options, NULL);
if (option->fast_desc->p_class == STP_PARAMETER_CLASS_OUTPUT)
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
preview_update();
}
}
@@ -3338,7 +3362,7 @@ output_type_callback (GtkWidget *widget,
gtk_widget_show(output_color_vbox);
stp_set_string_parameter(pv->v, "PrintingMode", (const char *) data);
invalidate_preview_thumbnail ();
- update_adjusted_thumbnail ();
+ update_adjusted_thumbnail (TRUE);
set_options_active(NULL);
preview_update ();
do_all_updates();
@@ -3850,18 +3874,77 @@ fill_buffer_writefunc(void *priv, const char *buffer, size_t bytes)
{
int mask = 0;
int i;
- int pixels = bytes / 4;
+
priv_t *p = (priv_t *) priv;
unsigned char *where = p->base_addr + p->offset;
const unsigned char *xbuffer = (const unsigned char *)buffer;
- if (p->bpp == 1)
+ if (strcmp(p->output_type, "Whitescale") == 0)
+ {
+ memcpy(where, xbuffer, bytes);
+ p->offset += bytes;
+ }
+ else if (strcmp(p->output_type, "Grayscale") == 0)
{
- memcpy(where, buffer, bytes);
+ for (i = 0; i < bytes; i++)
+ where[i] = ~xbuffer[i];
p->offset += bytes;
}
+ else if (strcmp(p->output_type, "RGB") == 0)
+ {
+ int pixels = bytes / 3;
+ if (bytes + p->offset > p->limit)
+ bytes = p->limit - p->offset;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(red_button)))
+ mask |= 1;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(green_button)))
+ mask |= 2;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(blue_button)))
+ mask |= 4;
+
+ memset(where, 0, pixels * 3);
+ for (i = 0; i < pixels; i++)
+ {
+ if (mask & 1)
+ where[0] = xbuffer[0];
+ if (mask & 2)
+ where[1] = xbuffer[1];
+ if (mask & 4)
+ where[2] = xbuffer[2];
+ where += 3;
+ xbuffer += 3;
+ }
+ p->offset += pixels * 3;
+ }
+ else if (strcmp(p->output_type, "CMY") == 0)
+ {
+ int pixels = bytes / 3;
+ if (bytes + p->offset > p->limit)
+ bytes = p->limit - p->offset;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cyan_button)))
+ mask |= 1;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(magenta_button)))
+ mask |= 2;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(yellow_button)))
+ mask |= 4;
+
+ memset(where, 0xff, pixels * 3);
+ for (i = 0; i < pixels; i++)
+ {
+ if (mask & 1)
+ where[0] = -xbuffer[0];
+ if (mask & 2)
+ where[1] = -xbuffer[1];
+ if (mask & 4)
+ where[2] = -xbuffer[2];
+ where += 3;
+ xbuffer += 3;
+ }
+ p->offset += pixels * 3;
+ }
else
{
+ int pixels = bytes / 4;
if (bytes + p->offset > p->limit)
bytes = p->limit - p->offset;
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cyan_button)))
@@ -4038,7 +4121,7 @@ compute_thumbnail(const stp_vars_t *v)
stp_image_t *im = stpui_image_thumbnail_new(thumbnail_data, thumbnail_w,
thumbnail_h, thumbnail_bpp);
stp_vars_t *nv = stp_vars_create_copy(v);
- stp_set_driver(nv, "raw-data-8");
+ const char *output_type = stp_describe_output(nv);
stp_set_top(nv, 0);
stp_set_left(nv, 0);
stp_set_width(nv, thumbnail_w);
@@ -4047,18 +4130,65 @@ compute_thumbnail(const stp_vars_t *v)
stp_set_outdata(nv, &priv);
stp_set_errfunc(nv, stpui_get_errfunc());
stp_set_errdata(nv, stpui_get_errdata());
- if (!print_mode_is_color(nv))
+ if (strcmp(output_type, "Whitescale") == 0)
{
+ gtk_widget_hide(output_color_vbox);
priv.bpp = 1;
+ priv.output_type = "Whitescale";
stp_set_string_parameter(nv, "InkType", "RGBGray");
}
+ else if (strcmp(output_type, "Grayscale") == 0)
+ {
+ gtk_widget_hide(output_color_vbox);
+ priv.bpp = 1;
+ priv.output_type = "Grayscale";
+ stp_set_string_parameter(nv, "InkType", "CMYGray");
+ }
+ else if (strcmp(output_type, "CMY") == 0)
+ {
+ gtk_widget_hide(black_button);
+ gtk_widget_hide(red_button);
+ gtk_widget_hide(green_button);
+ gtk_widget_hide(blue_button);
+ gtk_widget_show(cyan_button);
+ gtk_widget_show(magenta_button);
+ gtk_widget_show(yellow_button);
+ gtk_widget_show(output_color_vbox);
+ priv.bpp = 3;
+ priv.output_type = "CMY";
+ stp_set_string_parameter(nv, "InkType", "CMY");
+ }
+ else if (strcmp(output_type, "RGB") == 0)
+ {
+ gtk_widget_hide(cyan_button);
+ gtk_widget_hide(magenta_button);
+ gtk_widget_hide(yellow_button);
+ gtk_widget_hide(black_button);
+ gtk_widget_show(red_button);
+ gtk_widget_show(green_button);
+ gtk_widget_show(blue_button);
+ gtk_widget_show(output_color_vbox);
+ priv.bpp = 3;
+ priv.output_type = "RGB";
+ stp_set_string_parameter(nv, "InkType", "RGB");
+ }
else
{
+ gtk_widget_hide(red_button);
+ gtk_widget_hide(green_button);
+ gtk_widget_hide(blue_button);
+ gtk_widget_show(cyan_button);
+ gtk_widget_show(magenta_button);
+ gtk_widget_show(yellow_button);
+ gtk_widget_show(black_button);
+ gtk_widget_show(output_color_vbox);
priv.bpp = 4;
+ priv.output_type = "CMYK";
stp_set_string_parameter(nv, "InkType", "CMYK");
}
stp_set_page_height(nv, thumbnail_h);
stp_set_page_width(nv, thumbnail_w);
+ stp_set_driver(nv, "raw-data-8");
stp_set_float_parameter(nv, "Density", 1.0);
stp_set_float_parameter(nv, "InkLimit", 0);
stp_set_string_parameter(nv, "InputImageType", "RGB");
@@ -4073,6 +4203,7 @@ compute_thumbnail(const stp_vars_t *v)
fprintf(stderr, "Could not print thumbnail!\n");
}
stp_vars_destroy(nv);
+ thumbnail_needs_rebuild = FALSE;
return answer;
}
@@ -4117,21 +4248,6 @@ set_thumbnail_orientation(void)
}
static void
-update_adjusted_thumbnail (void)
-{
- if (thumbnail_data && adjusted_thumbnail_data && do_update_thumbnail &&
- suppress_preview_update == 0)
- {
- if (compute_thumbnail(pv->v))
- {
- set_thumbnail_orientation();
- redraw_color_swatch ();
- preview_update ();
- }
- }
-}
-
-static void
draw_arrow (GdkWindow *w,
GdkGC *gc,
gint paper_left,
@@ -4414,13 +4530,30 @@ do_preview_thumbnail (void)
static gboolean
idle_preview_thumbnail(gpointer data)
{
- set_orientation(pv->orientation);
- do_preview_thumbnail();
+ if (thumbnail_data && adjusted_thumbnail_data && do_update_thumbnail)
+ {
+ thumbnail_update_pending = TRUE;
+ set_orientation(pv->orientation);
+ if (thumbnail_needs_rebuild && compute_thumbnail(pv->v))
+ {
+ set_thumbnail_orientation();
+ redraw_color_swatch ();
+ }
+ do_preview_thumbnail();
+ }
thumbnail_update_pending = FALSE;
return FALSE;
}
static void
+update_adjusted_thumbnail (gboolean regenerate_image)
+{
+ if (regenerate_image)
+ thumbnail_needs_rebuild = TRUE;
+ preview_update ();
+}
+
+static void
preview_expose (void)
{
need_exposure = TRUE;
@@ -4693,7 +4826,7 @@ color_update (GtkAdjustment *adjustment)
{
stp_set_float_parameter(pv->v, opt->fast_desc->name,
adjustment->value);
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
}
}
@@ -4718,7 +4851,7 @@ dimension_update (GtkAdjustment *adjustment)
{
stp_set_dimension_parameter(pv->v, opt->fast_desc->name,
adjustment->value * unit_scaler);
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(FALSE);
}
}
}
@@ -4838,7 +4971,7 @@ set_controls_active (GtkObject *checkbutton, gpointer xopt)
}
}
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
static void
diff --git a/src/gutenprintui/printrcl.c b/src/gutenprintui/printrcl.c
index e1718e4..ee98f73 100644
--- a/src/gutenprintui/printrcl.c
+++ b/src/gutenprintui/printrcl.c
@@ -1,32 +1,85 @@
-/* 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 $
- */
+#line 3 "printrcl.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
#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. */
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
+/* 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)
+#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
@@ -34,34 +87,17 @@
#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
@@ -76,71 +112,71 @@
* 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
-/* 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 YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - 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).
*/
-typedef unsigned int yy_size_t;
+#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;
@@ -177,12 +213,16 @@ 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
@@ -196,23 +236,33 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
+
};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-static YY_BUFFER_STATE yy_current_buffer = 0;
+/* 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. */
/* 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_current_buffer
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* 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. */
@@ -225,69 +275,93 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart YY_PROTO(( FILE *input_file ));
+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 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 )
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-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 ));
+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 );
-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 * ));
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
#define yy_new_buffer yy_create_buffer
#define yy_set_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; \
+ 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; \
}
#define yy_set_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; \
+ 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; \
}
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define yywrap() 1
+#define yywrap(n) 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 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[] ));
+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[] );
/* 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 = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (size_t) (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
-static yyconst short int yy_accept[335] =
+/* 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] =
{ 0,
0, 0, 41, 40, 37, 39, 40, 38, 40, 40,
31, 35, 35, 35, 35, 35, 35, 35, 35, 35,
@@ -328,7 +402,7 @@ static yyconst short int yy_accept[335] =
0, 2, 18, 0
} ;
-static yyconst int yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -360,7 +434,7 @@ static yyconst int yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst int yy_meta[39] =
+static yyconst flex_int32_t yy_meta[39] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -368,7 +442,7 @@ static yyconst int yy_meta[39] =
3, 3, 3, 3, 3, 3, 3, 3
} ;
-static yyconst short int yy_base[340] =
+static yyconst flex_int16_t yy_base[340] =
{ 0,
0, 0, 374, 375, 371, 375, 368, 343, 364, 29,
32, 336, 341, 18, 26, 21, 32, 343, 0, 340,
@@ -409,7 +483,7 @@ static yyconst short int yy_base[340] =
81, 375, 375, 375, 94, 97, 100, 89, 103
} ;
-static yyconst short int yy_def[340] =
+static yyconst flex_int16_t yy_def[340] =
{ 0,
334, 1, 334, 334, 334, 334, 335, 336, 337, 334,
334, 338, 338, 338, 338, 338, 338, 338, 338, 338,
@@ -450,7 +524,7 @@ static yyconst short int yy_def[340] =
334, 334, 334, 0, 334, 334, 334, 334, 334
} ;
-static yyconst short int yy_nxt[414] =
+static yyconst flex_int16_t yy_nxt[414] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
11, 4, 4, 12, 13, 14, 15, 16, 17, 18,
@@ -500,7 +574,7 @@ static yyconst short int yy_nxt[414] =
334, 334, 334
} ;
-static yyconst short int yy_chk[414] =
+static yyconst flex_int16_t yy_chk[414] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -553,6 +627,9 @@ static yyconst short int 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.
*/
@@ -562,7 +639,6 @@ static char *yy_last_accepting_cpos;
#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 $"
*
@@ -621,7 +697,21 @@ q_strdup(const char *s)
return g_strndup(s + 1, strlen(s) - 2);
}
-#line 625 "printrcl.c"
+#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
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -629,65 +719,30 @@ q_strdup(const char *s)
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int yywrap (void );
#else
-extern int yywrap YY_PROTO(( void ));
+extern int yywrap (void );
#endif
#endif
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
+ static void yyunput (int c,char *buf_ptr );
+
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
+
#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
+static int yyinput (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 ));
+static int input (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. */
@@ -696,7 +751,6 @@ YY_MALLOC_DECL
#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().
@@ -709,9 +763,10 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
- int c = '*', n; \
+ int c = '*'; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -721,9 +776,22 @@ YY_MALLOC_DECL
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
+ 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); \
+ } \
+ }\
+\
+
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -744,12 +812,18 @@ YY_MALLOC_DECL
#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 int yylex YY_PROTO(( void ))
-#endif
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -766,27 +840,29 @@ YY_MALLOC_DECL
#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 779 "printrcl.c"
+#line 855 "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;
@@ -794,34 +870,36 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ 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 )
{
@@ -838,24 +916,22 @@ 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:
@@ -1019,6 +1095,7 @@ 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;
@@ -1034,6 +1111,7 @@ 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;
@@ -1049,6 +1127,7 @@ 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++;
@@ -1058,33 +1137,33 @@ YY_RULE_SETUP
#line 116 "printrcl.l"
ECHO;
YY_BREAK
-#line 1062 "printrcl.c"
+#line 1141 "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->yy_buffer_status == YY_BUFFER_NEW )
+ if ( YY_CURRENT_BUFFER_LVALUE->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->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ (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;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1094,13 +1173,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->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->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
@@ -1113,30 +1192,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
@@ -1147,7 +1226,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;
@@ -1155,30 +1234,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->yy_ch_buf[yy_n_chars];
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->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;
@@ -1189,8 +1268,7 @@ 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
*
@@ -1199,21 +1277,20 @@ 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()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
+static int yy_get_next_buffer (void)
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->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->yy_ch_buf[yy_n_chars + 1] )
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( yy_current_buffer->yy_fill_buffer == 0 )
+ if ( YY_CURRENT_BUFFER_LVALUE->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.
@@ -1233,34 +1310,30 @@ static int yy_get_next_buffer()
/* 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->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( YY_CURRENT_BUFFER_LVALUE->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->yy_n_chars = yy_n_chars = 0;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ size_t num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
-#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 )
{
@@ -1273,8 +1346,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1284,35 +1356,35 @@ static int yy_get_next_buffer()
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->yy_buf_size -
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->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->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->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->yy_buffer_status =
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1320,32 +1392,31 @@ static int yy_get_next_buffer()
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- 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;
+ (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;
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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()
- {
+ static yy_state_type yy_get_previous_state (void)
+{
register yy_state_type yy_current_state;
register char *yy_cp;
+
+ yy_current_state = (yy_start);
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ 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 )
{
@@ -1357,30 +1428,23 @@ static yy_state_type yy_get_previous_state()
}
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 );
*/
-
-#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
- {
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
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 )
{
@@ -1392,80 +1456,73 @@ yy_state_type yy_current_state;
yy_is_jam = (yy_current_state == 334);
return yy_is_jam ? 0 : yy_current_state;
- }
-
+}
-#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;
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ 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->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
+ 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 char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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;
+}
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
+#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput()
+ static int yyinput (void)
#else
-static int input()
+ static int input (void)
#endif
- {
- int c;
- *yy_c_buf_p = yy_hold_char;
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_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->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->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()
@@ -1479,16 +1536,16 @@ static int input()
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ yyrestart(yyin );
- /* fall through */
+ /*FALLTHROUGH*/
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();
@@ -1498,90 +1555,92 @@ static int input()
}
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;
- }
-
-
-#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 );
+}
+#endif /* ifndef YY_NO_INPUT */
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
+/** 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 );
}
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
+}
-#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 )
+/** 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 )
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->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ *(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_current_buffer = new_buffer;
- yy_load_buffer_state();
+ YY_CURRENT_BUFFER_LVALUE = 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;
- }
-
-
-#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;
- }
+ (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);
+}
-#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
- {
+/** 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 )
+{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1590,80 +1649,75 @@ int size;
/* 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 *) yy_flex_alloc( b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc(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;
- }
-
+}
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
if ( ! b )
return;
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
+ yyfree((void *) b->yy_ch_buf );
+ yyfree((void *) 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
-
+#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 )
- {
- yy_flush_buffer( b );
+{
+ int oerrno = errno;
+
+ yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#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
- }
-
-
-#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 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 ( ! b )
+/** 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 )
return;
b->yy_n_chars = 0;
@@ -1680,29 +1734,121 @@ YY_BUFFER_STATE b;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
+ 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;
+ }
-#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 ((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 )
+{
+ 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) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1716,47 +1862,43 @@ 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
-
-
-#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
+}
+/** 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
+ * @param yy_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) );
+}
-#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
- {
+/** 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 )
+{
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 *) yy_flex_alloc( n );
+ buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -1765,7 +1907,7 @@ 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()" );
@@ -1775,148 +1917,164 @@ int len;
b->yy_is_our_buffer = 1;
return b;
- }
-#endif
-
+}
-#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;
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+/* Redefine yyless() so it works in section 3 code. */
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, 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 )
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+/* Accessor methods (get/set functions) to struct members. */
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
- BEGIN(new_state);
- }
-#endif
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
-#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 length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
+/** Get the current token.
+ *
+ */
+char *yyget_text (void)
+{
+ return yytext;
+}
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void yyset_lineno (int line_number )
+{
+
+ yylineno = line_number;
+}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#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 ;
+}
-#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 );
- }
+void yyset_out (FILE * out_str )
+{
+ yyout = out_str ;
+}
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+void yyset_debug (int bdebug )
+{
+ yy_flex_debug = bdebug ;
+}
-/* Redefine yyless() so it works in section 3 code. */
+/* 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();
+ }
-#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 )
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+ return 0;
+}
-/* Internal utility routines. */
+/*
+ * Internal utility routines.
+ */
#ifndef yytext_ptr
-#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
- {
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
register int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i )
s1[i] = s2[i];
- }
+}
#endif
#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
+static int yy_flex_strlen (yyconst char * s )
+{
register int n;
- for ( n = 0; s[n]; ++n )
+ for ( n = 0; s[n]; ++n )
;
return n;
- }
+}
#endif
-
-#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
- {
+void *yyalloc (yy_size_t size )
+{
return (void *) malloc( 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
- {
+void *yyrealloc (void * ptr, yy_size_t size )
+{
/* 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
@@ -1925,23 +2083,25 @@ yy_size_t size;
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
+#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_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
#endif
#line 116 "printrcl.l"
diff --git a/src/gutenprintui/printrcy.c b/src/gutenprintui/printrcy.c
index 1609566..a0a27da 100644
--- a/src/gutenprintui/printrcy.c
+++ b/src/gutenprintui/printrcy.c
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -36,6 +36,9 @@
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -93,6 +96,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
@@ -183,6 +187,11 @@ static stpui_plist_t *current_printer = NULL;
# define YYERROR_VERBOSE 0
#endif
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -195,22 +204,48 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 214 of yacc.c. */
-#line 199 "printrcy.c"
+/* Line 219 of yacc.c. */
+#line 209 "printrcy.c"
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
# endif
# endif
# endif
@@ -219,25 +254,51 @@ typedef int YYSTYPE;
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+# endif
# else
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
- || (YYSTYPE_IS_TRIVIAL)))
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
+ short int yyss;
YYSTYPE yyvs;
};
@@ -247,20 +308,20 @@ 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) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if 1 < __GNUC__
+# if defined (__GNUC__) && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
@@ -289,7 +350,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
- typedef short yysigned_char;
+ typedef short int yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@@ -310,7 +371,7 @@ union yyalloc
#define YYUNDEFTOK 2
#define YYMAXUTOK 295
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -389,7 +450,7 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const unsigned short int yyrline[] =
{
0, 100, 100, 111, 118, 128, 138, 148, 158, 164,
168, 172, 176, 180, 184, 188, 206, 210, 214, 217,
@@ -402,37 +463,37 @@ static const unsigned short yyrline[] =
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
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 yytoknum[] =
+static const unsigned short int yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -573,22 +634,6 @@ static const unsigned char yystos[] =
4, 3, 6, 7
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -596,7 +641,8 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#define YYERROR goto yyerrorlab
+
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -617,26 +663,59 @@ do \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up");\
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run). */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#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) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
+
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -659,36 +738,30 @@ do { \
YYFPRINTF Args; \
} while (0)
-# define YYDSYMPRINT(Args) \
-do { \
- if (yydebug) \
- yysymprint Args; \
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location) \
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Token, Value); \
+ yysymprint (stderr, \
+ Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded). |
+| TOP (included). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (short *bottom, short *top)
+yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
- short *bottom;
- short *top;
+ short int *bottom;
+ short int *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@@ -718,13 +791,13 @@ yy_reduce_print (yyrule)
#endif
{
int yyi;
- unsigned int yylineno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
+ yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
}
# define YY_REDUCE_PRINT(Rule) \
@@ -738,8 +811,7 @@ do { \
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -754,13 +826,9 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
@@ -782,7 +850,7 @@ yystrlen (yystr)
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
@@ -807,8 +875,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -818,7 +886,55 @@ yystpcpy (yydest, yysrc)
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
@@ -842,15 +958,15 @@ yysymprint (yyoutput, yytype, yyvaluep)
(void) yyvaluep;
if (yytype < YYNTOKENS)
- {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- }
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
switch (yytype)
{
default:
@@ -866,10 +982,11 @@ yysymprint (yyoutput, yytype, yyvaluep)
#if defined (__STDC__) || defined (__cplusplus)
static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
-yydestruct (yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
@@ -877,6 +994,10 @@ yydestruct (yytype, yyvaluep)
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
switch (yytype)
{
@@ -904,10 +1025,10 @@ int yyparse ();
-/* The lookahead symbol. */
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
@@ -933,17 +1054,17 @@ yyparse (void)
#else
int
yyparse ()
-
+ ;
#endif
#endif
{
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
+ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
/* Three stacks and their tools:
@@ -955,14 +1076,14 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
@@ -1019,14 +1140,14 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1037,21 +1158,21 @@ yyparse ()
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1083,18 +1204,18 @@ yyparse ()
yybackup:
/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
+/* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1109,7 +1230,7 @@ yybackup:
else
{
yytoken = YYTRANSLATE (yychar);
- YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1129,8 +1250,8 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
@@ -1182,27 +1303,27 @@ yyreduce:
case 2:
#line 101 "printrcy.y"
{
- current_printer = stpui_plist_create(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ current_printer = stpui_plist_create((yyvsp[-1].sval), (yyvsp[0].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 3:
#line 112 "printrcy.y"
{
- if (yyvsp[0].sval)
- g_free(yyvsp[0].sval);
+ if ((yyvsp[0].sval))
+ g_free((yyvsp[0].sval));
}
break;
case 4:
#line 119 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_queue_name(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_queue_name(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1210,10 +1331,10 @@ yyreduce:
case 5:
#line 129 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_output_filename(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_output_filename(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1221,10 +1342,10 @@ yyreduce:
case 6:
#line 139 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_extra_printer_options(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_extra_printer_options(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1232,10 +1353,10 @@ yyreduce:
case 7:
#line 149 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_custom_command(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_custom_command(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1243,44 +1364,44 @@ yyreduce:
case 8:
#line 159 "printrcy.y"
{
- stpui_plist_set_command_type(current_printer, yyvsp[0].ival);
+ stpui_plist_set_command_type(current_printer, (yyvsp[0].ival));
}
break;
case 9:
#line 165 "printrcy.y"
- { current_printer->scaling = yyvsp[0].dval; }
+ { current_printer->scaling = (yyvsp[0].dval); }
break;
case 10:
#line 169 "printrcy.y"
- { current_printer->orientation = yyvsp[0].ival; }
+ { current_printer->orientation = (yyvsp[0].ival); }
break;
case 11:
#line 173 "printrcy.y"
- { current_printer->auto_size_roll_feed_paper = yyvsp[0].ival; }
+ { current_printer->auto_size_roll_feed_paper = (yyvsp[0].ival); }
break;
case 12:
#line 177 "printrcy.y"
- { current_printer->unit = yyvsp[0].ival; }
+ { current_printer->unit = (yyvsp[0].ival); }
break;
case 13:
#line 181 "printrcy.y"
- { stp_set_left(current_printer->v, yyvsp[0].ival); }
+ { stp_set_left(current_printer->v, (yyvsp[0].ival)); }
break;
case 14:
#line 185 "printrcy.y"
- { stp_set_top(current_printer->v, yyvsp[0].ival); }
+ { stp_set_top(current_printer->v, (yyvsp[0].ival)); }
break;
case 15:
#line 189 "printrcy.y"
{
- switch (yyvsp[0].ival)
+ switch ((yyvsp[0].ival))
{
case 0:
stp_set_string_parameter
@@ -1298,164 +1419,165 @@ yyreduce:
case 16:
#line 207 "printrcy.y"
- { stp_set_page_width(current_printer->v, yyvsp[0].ival); }
+ { stp_set_page_width(current_printer->v, (yyvsp[0].ival)); }
break;
case 17:
#line 211 "printrcy.y"
- { stp_set_page_height(current_printer->v, yyvsp[0].ival); }
+ { stp_set_page_height(current_printer->v, (yyvsp[0].ival)); }
break;
case 19:
#line 218 "printrcy.y"
{
- stp_set_int_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_int_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].ival));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
}
break;
case 20:
#line 232 "printrcy.y"
{
- stp_set_string_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_string_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].sval));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 21:
#line 247 "printrcy.y"
{
- stp_set_file_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_file_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].sval));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 22:
#line 262 "printrcy.y"
{
- stp_set_float_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].dval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_float_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].dval));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
}
break;
case 23:
#line 276 "printrcy.y"
{
- stp_set_dimension_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_dimension_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].ival));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
}
break;
case 24:
#line 290 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "False") == 0)
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 0);
+ if (strcmp((yyvsp[0].sval), "False") == 0)
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[-3].sval), 0);
else
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 1);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[-3].sval), 1);
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 25:
#line 308 "printrcy.y"
{
- stp_curve_t *curve = stp_curve_create_from_string(yyvsp[0].sval);
+ stp_curve_t *curve = stp_curve_create_from_string((yyvsp[0].sval));
if (curve)
{
- stp_set_curve_parameter(current_printer->v, yyvsp[-3].sval, curve);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_curve_parameter(current_printer->v, (yyvsp[-3].sval), curve);
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
stp_curve_destroy(curve);
}
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 56:
#line 353 "printrcy.y"
- { stpui_printrc_current_printer = yyvsp[0].sval; }
+ { stpui_printrc_current_printer = (yyvsp[0].sval); }
break;
case 57:
#line 357 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "True") == 0)
+ if (strcmp((yyvsp[0].sval), "True") == 0)
stpui_show_all_paper_sizes = 1;
else
stpui_show_all_paper_sizes = 0;
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[0].sval));
}
break;
case 61:
#line 373 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_set_global_parameter(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_set_global_parameter((yyvsp[-1].sval), (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-1].sval));
}
break;
+ default: break;
}
-/* Line 991 of yacc.c. */
-#line 1458 "printrcy.c"
+/* Line 1126 of yacc.c. */
+#line 1581 "printrcy.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1494,104 +1616,153 @@ yyerrlab:
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- char *yymsg;
- int yyx, yycount;
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
- yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+ 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 = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("syntax error, unexpected ") + 1;
- yysize += yystrlen (yytname[yytype]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
{
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
-
- if (yycount < 5)
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
{
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
- yyerror ("syntax error; also virtual memory exhausted");
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror ("syntax error");
+ yyerror (YY_("syntax error"));
}
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
+ if (yychar <= YYEOF)
{
- /* 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;
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
}
-
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
-
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
- goto yyerrlab2;
+ goto yyerrlab1;
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action. |
-`----------------------------------------------------*/
-yyerrlab1:
-
- /* 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
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (0)
+ goto yyerrorlab;
- goto yyerrlab2;
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrlab2 -- pop states until the error token can be shifted. |
-`---------------------------------------------------------------*/
-yyerrlab2:
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1612,22 +1783,22 @@ yyerrlab2:
if (yyssp == yyss)
YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[yystate], yyvsp);
- yyvsp--;
- yystate = *--yyssp;
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
yystate = yyn;
goto yynewstate;
@@ -1647,16 +1818,25 @@ yyabortlab:
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
diff --git a/src/gutenprintui/printrcy.h b/src/gutenprintui/printrcy.h
index afa662b..a1ebec0 100644
--- a/src/gutenprintui/printrcy.h
+++ b/src/gutenprintui/printrcy.h
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -69,6 +69,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
diff --git a/src/gutenprintui2/Makefile.am b/src/gutenprintui2/Makefile.am
index 6b93566..2b49f89 100644
--- a/src/gutenprintui2/Makefile.am
+++ b/src/gutenprintui2/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.5 2005/06/26 10:56:51 rleigh Exp $
+## $Id: Makefile.am,v 1.6 2005/11/21 11:16:23 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/gutenprintui2/Makefile.in b/src/gutenprintui2/Makefile.in
index 3a43db9..0c0cecb 100644
--- a/src/gutenprintui2/Makefile.in
+++ b/src/gutenprintui2/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -17,8 +17,6 @@
# Variables
-SOURCES = $(libgutenprintui2_la_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -80,8 +78,8 @@ libgutenprintui2_la_OBJECTS = $(am_libgutenprintui2_la_OBJECTS)
@BUILD_LIBGUTENPRINTUI2_TRUE@am_libgutenprintui2_la_rpath = -rpath \
@BUILD_LIBGUTENPRINTUI2_TRUE@ $(libdir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -104,8 +102,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -143,7 +139,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -156,14 +151,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -298,13 +291,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -350,8 +338,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
m4datadir = $(datadir)/aclocal
pkgconfigdatadir = $(libdir)/pkgconfig
@@ -405,9 +391,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gutenprintui2/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui2/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/gutenprintui2/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/gutenprintui2/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -468,99 +454,41 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-curve.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-gammacurve.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-panel.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-plist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-printrcl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-printrcy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-typebuiltins.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgutenprintui2_la-ui-utils.Plo@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
libgutenprintui2_la-printrcy.lo: printrcy.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-printrcy.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-printrcy.Tpo" -c -o libgutenprintui2_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-printrcy.Tpo" "$(DEPDIR)/libgutenprintui2_la-printrcy.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-printrcy.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcy.c' object='libgutenprintui2_la-printrcy.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcy.lo `test -f 'printrcy.c' || echo '$(srcdir)/'`printrcy.c
libgutenprintui2_la-printrcl.lo: printrcl.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-printrcl.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-printrcl.Tpo" -c -o libgutenprintui2_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-printrcl.Tpo" "$(DEPDIR)/libgutenprintui2_la-printrcl.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-printrcl.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printrcl.c' object='libgutenprintui2_la-printrcl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-printrcl.lo `test -f 'printrcl.c' || echo '$(srcdir)/'`printrcl.c
libgutenprintui2_la-panel.lo: panel.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-panel.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-panel.Tpo" -c -o libgutenprintui2_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-panel.Tpo" "$(DEPDIR)/libgutenprintui2_la-panel.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-panel.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='panel.c' object='libgutenprintui2_la-panel.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-panel.lo `test -f 'panel.c' || echo '$(srcdir)/'`panel.c
libgutenprintui2_la-plist.lo: plist.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-plist.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-plist.Tpo" -c -o libgutenprintui2_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-plist.Tpo" "$(DEPDIR)/libgutenprintui2_la-plist.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-plist.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='plist.c' object='libgutenprintui2_la-plist.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-plist.lo `test -f 'plist.c' || echo '$(srcdir)/'`plist.c
libgutenprintui2_la-ui-utils.lo: ui-utils.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-ui-utils.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-ui-utils.Tpo" -c -o libgutenprintui2_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-ui-utils.Tpo" "$(DEPDIR)/libgutenprintui2_la-ui-utils.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-ui-utils.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ui-utils.c' object='libgutenprintui2_la-ui-utils.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-ui-utils.lo `test -f 'ui-utils.c' || echo '$(srcdir)/'`ui-utils.c
libgutenprintui2_la-print-image-thumbnail.lo: print-image-thumbnail.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-print-image-thumbnail.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Tpo" -c -o libgutenprintui2_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Tpo" "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-print-image-thumbnail.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='print-image-thumbnail.c' object='libgutenprintui2_la-print-image-thumbnail.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-print-image-thumbnail.lo `test -f 'print-image-thumbnail.c' || echo '$(srcdir)/'`print-image-thumbnail.c
libgutenprintui2_la-curve.lo: curve.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-curve.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-curve.Tpo" -c -o libgutenprintui2_la-curve.lo `test -f 'curve.c' || echo '$(srcdir)/'`curve.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-curve.Tpo" "$(DEPDIR)/libgutenprintui2_la-curve.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-curve.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='curve.c' object='libgutenprintui2_la-curve.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-curve.lo `test -f 'curve.c' || echo '$(srcdir)/'`curve.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-curve.lo `test -f 'curve.c' || echo '$(srcdir)/'`curve.c
libgutenprintui2_la-gammacurve.lo: gammacurve.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-gammacurve.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-gammacurve.Tpo" -c -o libgutenprintui2_la-gammacurve.lo `test -f 'gammacurve.c' || echo '$(srcdir)/'`gammacurve.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-gammacurve.Tpo" "$(DEPDIR)/libgutenprintui2_la-gammacurve.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-gammacurve.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gammacurve.c' object='libgutenprintui2_la-gammacurve.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-gammacurve.lo `test -f 'gammacurve.c' || echo '$(srcdir)/'`gammacurve.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-gammacurve.lo `test -f 'gammacurve.c' || echo '$(srcdir)/'`gammacurve.c
libgutenprintui2_la-typebuiltins.lo: typebuiltins.c
-@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -MT libgutenprintui2_la-typebuiltins.lo -MD -MP -MF "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Tpo" -c -o libgutenprintui2_la-typebuiltins.lo `test -f 'typebuiltins.c' || echo '$(srcdir)/'`typebuiltins.c; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Tpo" "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Plo"; else rm -f "$(DEPDIR)/libgutenprintui2_la-typebuiltins.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='typebuiltins.c' object='libgutenprintui2_la-typebuiltins.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-typebuiltins.lo `test -f 'typebuiltins.c' || echo '$(srcdir)/'`typebuiltins.c
+ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgutenprintui2_la_CFLAGS) $(CFLAGS) -c -o libgutenprintui2_la-typebuiltins.lo `test -f 'typebuiltins.c' || echo '$(srcdir)/'`typebuiltins.c
.l.c:
$(LEXCOMPILE) $<
@@ -732,7 +660,6 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -758,7 +685,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/gutenprintui2/gutenprintui-internal.h b/src/gutenprintui2/gutenprintui-internal.h
index 1ff37de..af3caae 100644
--- a/src/gutenprintui2/gutenprintui-internal.h
+++ b/src/gutenprintui2/gutenprintui-internal.h
@@ -1,5 +1,5 @@
/*
- * "$Id: gutenprintui-internal.h,v 1.2 2005/04/09 14:52:34 rlk Exp $"
+ * "$Id: gutenprintui-internal.h,v 1.3 2005/09/17 21:54:33 rlk Exp $"
*
* Print plug-in for the GIMP.
*
@@ -109,6 +109,7 @@ typedef struct
typedef struct
{
unsigned char *base_addr;
+ const char *output_type;
int bpp;
off_t offset;
off_t limit;
diff --git a/src/gutenprintui2/panel.c b/src/gutenprintui2/panel.c
index 8fc3c42..df2fdb6 100644
--- a/src/gutenprintui2/panel.c
+++ b/src/gutenprintui2/panel.c
@@ -1,5 +1,5 @@
/*
- * "$Id: panel.c,v 1.5 2005/08/14 16:08:29 rleigh Exp $"
+ * "$Id: panel.c,v 1.7 2005/10/06 02:19:53 rlk Exp $"
*
* Main window code for Print plug-in for the GIMP.
*
@@ -70,6 +70,9 @@ static GtkWidget *cyan_button;
static GtkWidget *magenta_button;
static GtkWidget *yellow_button;
static GtkWidget *black_button;
+static GtkWidget *red_button;
+static GtkWidget *green_button;
+static GtkWidget *blue_button;
static GtkWidget *print_dialog; /* Print dialog window */
@@ -142,6 +145,7 @@ static gboolean need_exposure = FALSE;
static gboolean suppress_scaling_adjustment = FALSE;
static gboolean suppress_scaling_callback = FALSE;
static gboolean thumbnail_update_pending = FALSE;
+static gboolean thumbnail_needs_rebuild = FALSE;
/*
* These are semaphores, not true booleans.
*/
@@ -253,7 +257,7 @@ static void redraw_color_swatch (void);
static void color_update (GtkAdjustment *adjustment);
static void dimension_update (GtkAdjustment *adjustment);
static void set_controls_active (GtkObject *checkbutton, gpointer optno);
-static void update_adjusted_thumbnail (void);
+static void update_adjusted_thumbnail (gboolean regenerate_image);
static void set_media_size(const gchar *new_media_size);
static const stp_printer_t *tmp_printer = NULL;
@@ -384,7 +388,7 @@ open_curve_editor(GtkObject *button, gpointer xopt)
stp_curve_destroy(opt->info.curve.current);
opt->info.curve.current = nseed;
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(FALSE);
}
/* gtk_window_activate_focus(GTK_WINDOW(opt->info.curve.dialog)); */
return 1;
@@ -400,7 +404,7 @@ set_default_curve_callback(GtkObject *button, gpointer xopt)
set_stpui_curve_values(gcurve, seed);
set_stp_curve_values(gcurve, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -416,7 +420,7 @@ set_previous_curve_callback(GtkObject *button, gpointer xopt)
set_stpui_curve_values(gcurve, seed);
set_stp_curve_values(gcurve, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -434,7 +438,7 @@ set_curve_callback(GtkObject *button, gpointer xopt)
stp_curve_destroy(opt->info.curve.current);
opt->info.curve.current = NULL;
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -447,7 +451,7 @@ curve_draw_callback(GtkWidget *widget, GdkEvent *event, gpointer xopt)
case GDK_BUTTON_RELEASE:
set_stp_curve_values(widget, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
break;
default:
break;
@@ -461,7 +465,7 @@ curve_type_changed(GtkWidget *widget, gpointer xopt)
option_t *opt = (option_t *)xopt;
set_stp_curve_values(widget, opt);
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
return 1;
}
@@ -479,7 +483,7 @@ cancel_curve_callback(GtkObject *button, gpointer xopt)
gtk_widget_set_sensitive(GTK_WIDGET(opt->checkbox), TRUE);
opt->info.curve.is_visible = FALSE;
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
return 1;
}
@@ -567,8 +571,7 @@ checkbox_callback(GtkObject *button, gpointer xopt)
opt->info.bool.current);
invalidate_frame();
invalidate_preview_thumbnail();
- if (opt->fast_desc->p_class == STP_PARAMETER_CLASS_OUTPUT)
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
preview_update();
return 1;
}
@@ -1148,7 +1151,7 @@ static void
color_button_callback(GtkWidget *widget, gpointer data)
{
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
static void
@@ -2133,6 +2136,27 @@ create_color_adjust_window (void)
g_signal_connect (G_OBJECT (black_button), "toggled",
G_CALLBACK (color_button_callback), NULL);
+ red_button = gtk_toggle_button_new_with_label(_("Red"));
+ gtk_box_pack_start(GTK_BOX(output_color_vbox), red_button, TRUE, TRUE, 0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(red_button), TRUE);
+ gtk_widget_show(GTK_WIDGET(red_button));
+ g_signal_connect (G_OBJECT (red_button), "toggled",
+ G_CALLBACK (color_button_callback), NULL);
+
+ green_button = gtk_toggle_button_new_with_label(_("Green"));
+ gtk_box_pack_start(GTK_BOX(output_color_vbox), green_button, TRUE, TRUE,0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(green_button), TRUE);
+ gtk_widget_show(GTK_WIDGET(green_button));
+ g_signal_connect (G_OBJECT (green_button), "toggled",
+ G_CALLBACK (color_button_callback), NULL);
+
+ blue_button = gtk_toggle_button_new_with_label(_("Blue"));
+ gtk_box_pack_start(GTK_BOX(output_color_vbox), blue_button, TRUE, TRUE, 0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(blue_button), TRUE);
+ gtk_widget_show(GTK_WIDGET(blue_button));
+ g_signal_connect (G_OBJECT (blue_button), "toggled",
+ G_CALLBACK (color_button_callback), NULL);
+
color_adjustment_table = gtk_table_new(1, 1, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (color_adjustment_table), 2);
gtk_table_set_row_spacings (GTK_TABLE (color_adjustment_table), 0);
@@ -2336,7 +2360,7 @@ create_main_window (void)
do_update_thumbnail = 1;
build_printer_combo ();
plist_callback (NULL, (gpointer) stpui_plist_current);
- update_adjusted_thumbnail ();
+ update_adjusted_thumbnail (TRUE);
/* The initial size request does not account for the
GtkScrolledWindow. */
@@ -2674,7 +2698,7 @@ set_orientation(int orientation)
preview_thumbnail_w = thumbnail_h;
break;
}
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(FALSE);
}
static void
@@ -2873,7 +2897,7 @@ do_color_updates (void)
}
}
}
- update_adjusted_thumbnail ();
+ update_adjusted_thumbnail (TRUE);
}
static void
@@ -2902,6 +2926,40 @@ update_standard_print_command(void)
}
static void
+set_color_options(void)
+{
+ stp_parameter_t desc;
+ stp_describe_parameter(pv->v, "PrintingMode", &desc);
+ if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST)
+ {
+ if (!stp_string_list_is_present(desc.bounds.str, "Color"))
+ {
+ gtk_widget_set_sensitive (output_types[1].button, TRUE);
+ if (gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON (output_types[0].button)) == TRUE)
+ gtk_toggle_button_set_active
+ (GTK_TOGGLE_BUTTON (output_types[1].button), TRUE);
+ gtk_widget_set_sensitive (output_types[0].button, FALSE);
+ }
+ else if (!stp_string_list_is_present(desc.bounds.str, "BW"))
+ {
+ gtk_widget_set_sensitive (output_types[0].button, TRUE);
+ if (gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON (output_types[1].button)) == TRUE)
+ gtk_toggle_button_set_active
+ (GTK_TOGGLE_BUTTON (output_types[0].button), TRUE);
+ gtk_widget_set_sensitive (output_types[1].button, FALSE);
+ }
+ else
+ {
+ gtk_widget_set_sensitive (output_types[0].button, TRUE);
+ gtk_widget_set_sensitive (output_types[1].button, TRUE);
+ }
+ }
+ stp_parameter_description_destroy(&desc);
+}
+
+static void
do_all_updates(void)
{
gint i;
@@ -2938,6 +2996,7 @@ do_all_updates(void)
g_signal_emit_by_name (G_OBJECT(scaling_adjustment), "value_changed");
}
+ set_color_options();
for (i = 0; i < output_type_count; i++)
{
if (stp_get_string_parameter(pv->v, "PrintingMode") &&
@@ -3061,7 +3120,6 @@ plist_callback (GtkWidget *widget,
{
gint i;
char *tmp;
- stp_parameter_t desc;
suppress_preview_update++;
invalidate_frame ();
@@ -3095,34 +3153,6 @@ plist_callback (GtkWidget *widget,
if (strcmp(stp_get_driver(pv->v), "") != 0)
tmp_printer = stp_get_printer(pv->v);
- stp_describe_parameter(pv->v, "PrintingMode", &desc);
- if (desc.p_type == STP_PARAMETER_TYPE_STRING_LIST)
- {
- if (!stp_string_list_is_present(desc.bounds.str, "Color"))
- {
- gtk_widget_set_sensitive (output_types[1].button, TRUE);
- if (gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (output_types[0].button)) == TRUE)
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (output_types[1].button), TRUE);
- gtk_widget_set_sensitive (output_types[0].button, FALSE);
- }
- else if (!stp_string_list_is_present(desc.bounds.str, "BW"))
- {
- gtk_widget_set_sensitive (output_types[0].button, TRUE);
- if (gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (output_types[1].button)) == TRUE)
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (output_types[0].button), TRUE);
- gtk_widget_set_sensitive (output_types[1].button, FALSE);
- }
- else
- {
- gtk_widget_set_sensitive (output_types[0].button, TRUE);
- gtk_widget_set_sensitive (output_types[1].button, TRUE);
- }
- }
- stp_parameter_description_destroy(&desc);
gtk_entry_set_text(GTK_ENTRY(file_entry),
stpui_plist_get_output_filename(pv));
tmp = stpui_build_standard_print_command(pv, stp_get_printer(pv->v));
@@ -3137,7 +3167,7 @@ plist_callback (GtkWidget *widget,
setup_update ();
do_all_updates();
suppress_preview_update--;
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
preview_update ();
}
@@ -3337,7 +3367,7 @@ combo_callback(GtkWidget *widget, gpointer data)
set_media_size(new_value);
g_idle_add(refresh_all_options, NULL);
if (option->fast_desc->p_class == STP_PARAMETER_CLASS_OUTPUT)
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
preview_update();
}
}
@@ -3356,6 +3386,7 @@ orientation_callback (GtkWidget *widget,
{
invalidate_preview_thumbnail ();
set_orientation((gint) data);
+ update_adjusted_thumbnail(TRUE);
preview_update ();
}
}
@@ -3377,7 +3408,7 @@ output_type_callback (GtkWidget *widget,
gtk_widget_show(output_color_vbox);
stp_set_string_parameter(pv->v, "PrintingMode", (const char *) data);
invalidate_preview_thumbnail ();
- update_adjusted_thumbnail ();
+ update_adjusted_thumbnail (TRUE);
set_options_active(NULL);
preview_update ();
do_all_updates();
@@ -3889,18 +3920,77 @@ fill_buffer_writefunc(void *priv, const char *buffer, size_t bytes)
{
int mask = 0;
int i;
- int pixels = bytes / 4;
+
priv_t *p = (priv_t *) priv;
unsigned char *where = p->base_addr + p->offset;
const unsigned char *xbuffer = (const unsigned char *)buffer;
- if (p->bpp == 1)
+ if (strcmp(p->output_type, "Whitescale") == 0)
+ {
+ memcpy(where, xbuffer, bytes);
+ p->offset += bytes;
+ }
+ else if (strcmp(p->output_type, "Grayscale") == 0)
{
- memcpy(where, buffer, bytes);
+ for (i = 0; i < bytes; i++)
+ where[i] = ~xbuffer[i];
p->offset += bytes;
}
+ else if (strcmp(p->output_type, "RGB") == 0)
+ {
+ int pixels = bytes / 3;
+ if (bytes + p->offset > p->limit)
+ bytes = p->limit - p->offset;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(red_button)))
+ mask |= 1;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(green_button)))
+ mask |= 2;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(blue_button)))
+ mask |= 4;
+
+ memset(where, 0, pixels * 3);
+ for (i = 0; i < pixels; i++)
+ {
+ if (mask & 1)
+ where[0] = xbuffer[0];
+ if (mask & 2)
+ where[1] = xbuffer[1];
+ if (mask & 4)
+ where[2] = xbuffer[2];
+ where += 3;
+ xbuffer += 3;
+ }
+ p->offset += pixels * 3;
+ }
+ else if (strcmp(p->output_type, "CMY") == 0)
+ {
+ int pixels = bytes / 3;
+ if (bytes + p->offset > p->limit)
+ bytes = p->limit - p->offset;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cyan_button)))
+ mask |= 1;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(magenta_button)))
+ mask |= 2;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(yellow_button)))
+ mask |= 4;
+
+ memset(where, 0xff, pixels * 3);
+ for (i = 0; i < pixels; i++)
+ {
+ if (mask & 1)
+ where[0] = -xbuffer[0];
+ if (mask & 2)
+ where[1] = -xbuffer[1];
+ if (mask & 4)
+ where[2] = -xbuffer[2];
+ where += 3;
+ xbuffer += 3;
+ }
+ p->offset += pixels * 3;
+ }
else
{
+ int pixels = bytes / 4;
if (bytes + p->offset > p->limit)
bytes = p->limit - p->offset;
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cyan_button)))
@@ -4077,7 +4167,7 @@ compute_thumbnail(const stp_vars_t *v)
stp_image_t *im = stpui_image_thumbnail_new(thumbnail_data, thumbnail_w,
thumbnail_h, thumbnail_bpp);
stp_vars_t *nv = stp_vars_create_copy(v);
- stp_set_driver(nv, "raw-data-8");
+ const char *output_type = stp_describe_output(nv);
stp_set_top(nv, 0);
stp_set_left(nv, 0);
stp_set_width(nv, thumbnail_w);
@@ -4086,18 +4176,65 @@ compute_thumbnail(const stp_vars_t *v)
stp_set_outdata(nv, &priv);
stp_set_errfunc(nv, stpui_get_errfunc());
stp_set_errdata(nv, stpui_get_errdata());
- if (!print_mode_is_color(nv))
+ if (strcmp(output_type, "Whitescale") == 0)
{
+ gtk_widget_hide(output_color_vbox);
priv.bpp = 1;
+ priv.output_type = "Whitescale";
stp_set_string_parameter(nv, "InkType", "RGBGray");
}
+ else if (strcmp(output_type, "Grayscale") == 0)
+ {
+ gtk_widget_hide(output_color_vbox);
+ priv.bpp = 1;
+ priv.output_type = "Grayscale";
+ stp_set_string_parameter(nv, "InkType", "CMYGray");
+ }
+ else if (strcmp(output_type, "CMY") == 0)
+ {
+ gtk_widget_hide(black_button);
+ gtk_widget_hide(red_button);
+ gtk_widget_hide(green_button);
+ gtk_widget_hide(blue_button);
+ gtk_widget_show(cyan_button);
+ gtk_widget_show(magenta_button);
+ gtk_widget_show(yellow_button);
+ gtk_widget_show(output_color_vbox);
+ priv.bpp = 3;
+ priv.output_type = "CMY";
+ stp_set_string_parameter(nv, "InkType", "CMY");
+ }
+ else if (strcmp(output_type, "RGB") == 0)
+ {
+ gtk_widget_hide(cyan_button);
+ gtk_widget_hide(magenta_button);
+ gtk_widget_hide(yellow_button);
+ gtk_widget_hide(black_button);
+ gtk_widget_show(red_button);
+ gtk_widget_show(green_button);
+ gtk_widget_show(blue_button);
+ gtk_widget_show(output_color_vbox);
+ priv.bpp = 3;
+ priv.output_type = "RGB";
+ stp_set_string_parameter(nv, "InkType", "RGB");
+ }
else
{
+ gtk_widget_hide(red_button);
+ gtk_widget_hide(green_button);
+ gtk_widget_hide(blue_button);
+ gtk_widget_show(cyan_button);
+ gtk_widget_show(magenta_button);
+ gtk_widget_show(yellow_button);
+ gtk_widget_show(black_button);
+ gtk_widget_show(output_color_vbox);
priv.bpp = 4;
+ priv.output_type = "CMYK";
stp_set_string_parameter(nv, "InkType", "CMYK");
}
stp_set_page_height(nv, thumbnail_h);
stp_set_page_width(nv, thumbnail_w);
+ stp_set_driver(nv, "raw-data-8");
stp_set_float_parameter(nv, "Density", 1.0);
stp_set_float_parameter(nv, "InkLimit", 0);
stp_set_string_parameter(nv, "InputImageType", "RGB");
@@ -4112,6 +4249,7 @@ compute_thumbnail(const stp_vars_t *v)
fprintf(stderr, "Could not print thumbnail!\n");
}
stp_vars_destroy(nv);
+ thumbnail_needs_rebuild = FALSE;
return answer;
}
@@ -4156,21 +4294,6 @@ set_thumbnail_orientation(void)
}
static void
-update_adjusted_thumbnail (void)
-{
- if (thumbnail_data && adjusted_thumbnail_data && do_update_thumbnail &&
- suppress_preview_update == 0)
- {
- if (compute_thumbnail(pv->v))
- {
- set_thumbnail_orientation();
- redraw_color_swatch ();
- preview_update ();
- }
- }
-}
-
-static void
draw_arrow (GdkWindow *w,
GdkGC *gc,
gint paper_left,
@@ -4453,13 +4576,30 @@ do_preview_thumbnail (void)
static gboolean
idle_preview_thumbnail(gpointer data)
{
- set_orientation(pv->orientation);
- do_preview_thumbnail();
+ if (thumbnail_data && adjusted_thumbnail_data && do_update_thumbnail)
+ {
+ thumbnail_update_pending = TRUE;
+ set_orientation(pv->orientation);
+ if (thumbnail_needs_rebuild && compute_thumbnail(pv->v))
+ {
+ set_thumbnail_orientation();
+ redraw_color_swatch ();
+ }
+ do_preview_thumbnail();
+ }
thumbnail_update_pending = FALSE;
return FALSE;
}
static void
+update_adjusted_thumbnail (gboolean regenerate_image)
+{
+ if (regenerate_image)
+ thumbnail_needs_rebuild = TRUE;
+ preview_update ();
+}
+
+static void
preview_expose (void)
{
need_exposure = TRUE;
@@ -4732,7 +4872,7 @@ color_update (GtkAdjustment *adjustment)
{
stp_set_float_parameter(pv->v, opt->fast_desc->name,
adjustment->value);
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
}
}
@@ -4757,7 +4897,7 @@ dimension_update (GtkAdjustment *adjustment)
{
stp_set_dimension_parameter(pv->v, opt->fast_desc->name,
adjustment->value * unit_scaler);
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(FALSE);
}
}
}
@@ -4877,7 +5017,7 @@ set_controls_active (GtkObject *checkbutton, gpointer xopt)
}
}
invalidate_preview_thumbnail();
- update_adjusted_thumbnail();
+ update_adjusted_thumbnail(TRUE);
}
static void
diff --git a/src/gutenprintui2/plist.c b/src/gutenprintui2/plist.c
index f895580..05a13ee 100644
--- a/src/gutenprintui2/plist.c
+++ b/src/gutenprintui2/plist.c
@@ -1,5 +1,5 @@
/*
- * "$Id: plist.c,v 1.5 2005/06/14 02:47:13 rlk Exp $"
+ * "$Id: plist.c,v 1.6 2005/10/26 01:28:35 rlk Exp $"
*
* Print plug-in for the GIMP.
*
@@ -311,6 +311,19 @@ stpui_set_image_channel_depth(gint depth)
image_channel_depth = depth;
}
+static void
+writefunc(void *file, const char *buf, size_t bytes)
+{
+ FILE *prn = (FILE *)file;
+ fwrite(buf, 1, bytes, prn);
+}
+
+static void
+stpui_errfunc(void *file, const char *buf, size_t bytes)
+{
+ g_message(buf);
+}
+
void
stpui_printer_initialize(stpui_plist_t *printer)
{
@@ -327,6 +340,8 @@ stpui_printer_initialize(stpui_plist_t *printer)
printer->auto_size_roll_feed_paper = 0;
printer->unit = 0;
printer->v = stp_vars_create();
+ stp_set_errfunc(printer->v, writefunc);
+ stp_set_errdata(printer->v, stderr);
stpui_plist_set_copy_count(printer, 1);
stp_set_string_parameter(printer->v, "InputImageType", image_type);
if (image_raw_channels)
@@ -917,7 +932,9 @@ stpui_printrc_load_v2(FILE *fp)
yyin = fp;
stpui_printrc_current_printer = NULL;
+ setlocale(LC_ALL, "C");
retval = yyparse();
+ setlocale(LC_ALL, "");
if (stpui_printrc_current_printer)
{
int i;
@@ -1228,19 +1245,6 @@ usr1_handler (int sig)
usr1_interrupt = 1;
}
-static void
-writefunc(void *file, const char *buf, size_t bytes)
-{
- FILE *prn = (FILE *)file;
- fwrite(buf, 1, bytes, prn);
-}
-
-static void
-stpui_errfunc(void *file, const char *buf, size_t bytes)
-{
- g_message(buf);
-}
-
/*
*
* Process control for actually printing. Documented 20040821
@@ -1747,5 +1751,5 @@ stpui_print(const stpui_plist_t *printer, stpui_image_t *image)
}
/*
- * End of "$Id: plist.c,v 1.5 2005/06/14 02:47:13 rlk Exp $".
+ * End of "$Id: plist.c,v 1.6 2005/10/26 01:28:35 rlk Exp $".
*/
diff --git a/src/gutenprintui2/printrcl.c b/src/gutenprintui2/printrcl.c
index 1c4d8e1..5cf2726 100644
--- a/src/gutenprintui2/printrcl.c
+++ b/src/gutenprintui2/printrcl.c
@@ -1,32 +1,85 @@
-/* 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 $
- */
+#line 3 "printrcl.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
#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. */
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
+/* 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)
+#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
@@ -34,34 +87,17 @@
#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
@@ -76,71 +112,71 @@
* 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
-/* 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 YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - 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).
*/
-typedef unsigned int yy_size_t;
+#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;
@@ -177,12 +213,16 @@ 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
@@ -196,23 +236,33 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
+
};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-static YY_BUFFER_STATE yy_current_buffer = 0;
+/* 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. */
/* 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_current_buffer
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* 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. */
@@ -225,69 +275,93 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart YY_PROTO(( FILE *input_file ));
+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 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 )
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-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 ));
+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 );
-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 * ));
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
#define yy_new_buffer yy_create_buffer
#define yy_set_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; \
+ 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; \
}
#define yy_set_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; \
+ 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; \
}
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define yywrap() 1
+#define yywrap(n) 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 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[] ));
+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[] );
/* 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 = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (size_t) (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
-static yyconst short int yy_accept[335] =
+/* 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] =
{ 0,
0, 0, 41, 40, 37, 39, 40, 38, 40, 40,
31, 35, 35, 35, 35, 35, 35, 35, 35, 35,
@@ -328,7 +402,7 @@ static yyconst short int yy_accept[335] =
0, 2, 18, 0
} ;
-static yyconst int yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -360,7 +434,7 @@ static yyconst int yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst int yy_meta[39] =
+static yyconst flex_int32_t yy_meta[39] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -368,7 +442,7 @@ static yyconst int yy_meta[39] =
3, 3, 3, 3, 3, 3, 3, 3
} ;
-static yyconst short int yy_base[340] =
+static yyconst flex_int16_t yy_base[340] =
{ 0,
0, 0, 374, 375, 371, 375, 368, 343, 364, 29,
32, 336, 341, 18, 26, 21, 32, 343, 0, 340,
@@ -409,7 +483,7 @@ static yyconst short int yy_base[340] =
81, 375, 375, 375, 94, 97, 100, 89, 103
} ;
-static yyconst short int yy_def[340] =
+static yyconst flex_int16_t yy_def[340] =
{ 0,
334, 1, 334, 334, 334, 334, 335, 336, 337, 334,
334, 338, 338, 338, 338, 338, 338, 338, 338, 338,
@@ -450,7 +524,7 @@ static yyconst short int yy_def[340] =
334, 334, 334, 0, 334, 334, 334, 334, 334
} ;
-static yyconst short int yy_nxt[414] =
+static yyconst flex_int16_t yy_nxt[414] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
11, 4, 4, 12, 13, 14, 15, 16, 17, 18,
@@ -500,7 +574,7 @@ static yyconst short int yy_nxt[414] =
334, 334, 334
} ;
-static yyconst short int yy_chk[414] =
+static yyconst flex_int16_t yy_chk[414] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -553,6 +627,9 @@ static yyconst short int 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.
*/
@@ -562,7 +639,6 @@ static char *yy_last_accepting_cpos;
#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 $"
*
@@ -621,7 +697,21 @@ q_strdup(const char *s)
return g_strndup(s + 1, strlen(s) - 2);
}
-#line 625 "printrcl.c"
+#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
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -629,65 +719,30 @@ q_strdup(const char *s)
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int yywrap (void );
#else
-extern int yywrap YY_PROTO(( void ));
+extern int yywrap (void );
#endif
#endif
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
+ static void yyunput (int c,char *buf_ptr );
+
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
+
#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
+static int yyinput (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 ));
+static int input (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. */
@@ -696,7 +751,6 @@ YY_MALLOC_DECL
#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().
@@ -709,9 +763,10 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
- int c = '*', n; \
+ int c = '*'; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -721,9 +776,22 @@ YY_MALLOC_DECL
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
+ 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); \
+ } \
+ }\
+\
+
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -744,12 +812,18 @@ YY_MALLOC_DECL
#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 int yylex YY_PROTO(( void ))
-#endif
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -766,27 +840,29 @@ YY_MALLOC_DECL
#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 779 "printrcl.c"
+#line 855 "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;
@@ -794,34 +870,36 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ 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 )
{
@@ -838,24 +916,22 @@ 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:
@@ -1019,6 +1095,7 @@ 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;
@@ -1034,6 +1111,7 @@ 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;
@@ -1049,6 +1127,7 @@ 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++;
@@ -1058,33 +1137,33 @@ YY_RULE_SETUP
#line 116 "printrcl.l"
ECHO;
YY_BREAK
-#line 1062 "printrcl.c"
+#line 1141 "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->yy_buffer_status == YY_BUFFER_NEW )
+ if ( YY_CURRENT_BUFFER_LVALUE->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->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ (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;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1094,13 +1173,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->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->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
@@ -1113,30 +1192,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
@@ -1147,7 +1226,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;
@@ -1155,30 +1234,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->yy_ch_buf[yy_n_chars];
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->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;
@@ -1189,8 +1268,7 @@ 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
*
@@ -1199,21 +1277,20 @@ 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()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
+static int yy_get_next_buffer (void)
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->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->yy_ch_buf[yy_n_chars + 1] )
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( yy_current_buffer->yy_fill_buffer == 0 )
+ if ( YY_CURRENT_BUFFER_LVALUE->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.
@@ -1233,34 +1310,30 @@ static int yy_get_next_buffer()
/* 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->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( YY_CURRENT_BUFFER_LVALUE->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->yy_n_chars = yy_n_chars = 0;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ size_t num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
-#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 )
{
@@ -1273,8 +1346,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1284,35 +1356,35 @@ static int yy_get_next_buffer()
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->yy_buf_size -
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->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->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->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->yy_buffer_status =
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1320,32 +1392,31 @@ static int yy_get_next_buffer()
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- 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;
+ (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;
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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()
- {
+ static yy_state_type yy_get_previous_state (void)
+{
register yy_state_type yy_current_state;
register char *yy_cp;
+
+ yy_current_state = (yy_start);
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ 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 )
{
@@ -1357,30 +1428,23 @@ static yy_state_type yy_get_previous_state()
}
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 );
*/
-
-#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
- {
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
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 )
{
@@ -1392,80 +1456,73 @@ yy_state_type yy_current_state;
yy_is_jam = (yy_current_state == 334);
return yy_is_jam ? 0 : yy_current_state;
- }
-
+}
-#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;
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ 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->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
+ 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 char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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;
+}
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
+#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput()
+ static int yyinput (void)
#else
-static int input()
+ static int input (void)
#endif
- {
- int c;
- *yy_c_buf_p = yy_hold_char;
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_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->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->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()
@@ -1479,16 +1536,16 @@ static int input()
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ yyrestart(yyin );
- /* fall through */
+ /*FALLTHROUGH*/
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();
@@ -1498,90 +1555,92 @@ static int input()
}
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;
- }
-
-
-#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 );
+}
+#endif /* ifndef YY_NO_INPUT */
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
+/** 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 );
}
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
+}
-#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 )
+/** 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 )
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->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ *(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_current_buffer = new_buffer;
- yy_load_buffer_state();
+ YY_CURRENT_BUFFER_LVALUE = 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;
- }
-
-
-#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;
- }
+ (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);
+}
-#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
- {
+/** 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 )
+{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1590,80 +1649,75 @@ int size;
/* 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 *) yy_flex_alloc( b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc(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;
- }
-
+}
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
if ( ! b )
return;
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
+ yyfree((void *) b->yy_ch_buf );
+ yyfree((void *) 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
-
+#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 )
- {
- yy_flush_buffer( b );
+{
+ int oerrno = errno;
+
+ yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#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
- }
-
-
-#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 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 ( ! b )
+/** 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 )
return;
b->yy_n_chars = 0;
@@ -1680,29 +1734,121 @@ YY_BUFFER_STATE b;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
+ 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;
+ }
-#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 ((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 )
+{
+ 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) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1716,47 +1862,43 @@ 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
-
-
-#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
+}
+/** 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
+ * @param yy_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) );
+}
-#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
- {
+/** 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 )
+{
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 *) yy_flex_alloc( n );
+ buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -1765,7 +1907,7 @@ 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()" );
@@ -1775,148 +1917,164 @@ int len;
b->yy_is_our_buffer = 1;
return b;
- }
-#endif
-
+}
-#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;
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+/* Redefine yyless() so it works in section 3 code. */
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, 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 )
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+/* Accessor methods (get/set functions) to struct members. */
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
- BEGIN(new_state);
- }
-#endif
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
-#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 length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
+/** Get the current token.
+ *
+ */
+char *yyget_text (void)
+{
+ return yytext;
+}
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void yyset_lineno (int line_number )
+{
+
+ yylineno = line_number;
+}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#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 ;
+}
-#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 );
- }
+void yyset_out (FILE * out_str )
+{
+ yyout = out_str ;
+}
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+void yyset_debug (int bdebug )
+{
+ yy_flex_debug = bdebug ;
+}
-/* Redefine yyless() so it works in section 3 code. */
+/* 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();
+ }
-#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 )
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+ return 0;
+}
-/* Internal utility routines. */
+/*
+ * Internal utility routines.
+ */
#ifndef yytext_ptr
-#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
- {
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
register int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i )
s1[i] = s2[i];
- }
+}
#endif
#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
+static int yy_flex_strlen (yyconst char * s )
+{
register int n;
- for ( n = 0; s[n]; ++n )
+ for ( n = 0; s[n]; ++n )
;
return n;
- }
+}
#endif
-
-#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
- {
+void *yyalloc (yy_size_t size )
+{
return (void *) malloc( 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
- {
+void *yyrealloc (void * ptr, yy_size_t size )
+{
/* 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
@@ -1925,23 +2083,25 @@ yy_size_t size;
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
+#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_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
#endif
#line 116 "printrcl.l"
diff --git a/src/gutenprintui2/printrcy.c b/src/gutenprintui2/printrcy.c
index 0c96062..c1f0cbe 100644
--- a/src/gutenprintui2/printrcy.c
+++ b/src/gutenprintui2/printrcy.c
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -36,6 +36,9 @@
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -93,6 +96,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
@@ -183,6 +187,11 @@ static stpui_plist_t *current_printer = NULL;
# define YYERROR_VERBOSE 0
#endif
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -195,22 +204,48 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 214 of yacc.c. */
-#line 199 "printrcy.c"
+/* Line 219 of yacc.c. */
+#line 209 "printrcy.c"
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
# endif
# endif
# endif
@@ -219,25 +254,51 @@ typedef int YYSTYPE;
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+# endif
# else
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
- || (YYSTYPE_IS_TRIVIAL)))
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
+ short int yyss;
YYSTYPE yyvs;
};
@@ -247,20 +308,20 @@ 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) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if 1 < __GNUC__
+# if defined (__GNUC__) && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
@@ -289,7 +350,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
- typedef short yysigned_char;
+ typedef short int yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@@ -310,7 +371,7 @@ union yyalloc
#define YYUNDEFTOK 2
#define YYMAXUTOK 295
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -389,7 +450,7 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const unsigned short int yyrline[] =
{
0, 100, 100, 111, 118, 128, 138, 148, 158, 164,
168, 172, 176, 180, 184, 188, 206, 210, 214, 217,
@@ -402,37 +463,37 @@ static const unsigned short yyrline[] =
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
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 yytoknum[] =
+static const unsigned short int yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -573,22 +634,6 @@ static const unsigned char yystos[] =
4, 3, 6, 7
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -596,7 +641,8 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#define YYERROR goto yyerrorlab
+
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -617,26 +663,59 @@ do \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up");\
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run). */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#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) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
+
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -659,36 +738,30 @@ do { \
YYFPRINTF Args; \
} while (0)
-# define YYDSYMPRINT(Args) \
-do { \
- if (yydebug) \
- yysymprint Args; \
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location) \
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Token, Value); \
+ yysymprint (stderr, \
+ Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded). |
+| TOP (included). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (short *bottom, short *top)
+yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
- short *bottom;
- short *top;
+ short int *bottom;
+ short int *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@@ -718,13 +791,13 @@ yy_reduce_print (yyrule)
#endif
{
int yyi;
- unsigned int yylineno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
+ yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
}
# define YY_REDUCE_PRINT(Rule) \
@@ -738,8 +811,7 @@ do { \
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -754,13 +826,9 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
@@ -782,7 +850,7 @@ yystrlen (yystr)
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
@@ -807,8 +875,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -818,7 +886,55 @@ yystpcpy (yydest, yysrc)
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
@@ -842,15 +958,15 @@ yysymprint (yyoutput, yytype, yyvaluep)
(void) yyvaluep;
if (yytype < YYNTOKENS)
- {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- }
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
switch (yytype)
{
default:
@@ -866,10 +982,11 @@ yysymprint (yyoutput, yytype, yyvaluep)
#if defined (__STDC__) || defined (__cplusplus)
static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
-yydestruct (yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
@@ -877,6 +994,10 @@ yydestruct (yytype, yyvaluep)
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
switch (yytype)
{
@@ -904,10 +1025,10 @@ int yyparse ();
-/* The lookahead symbol. */
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
@@ -933,17 +1054,17 @@ yyparse (void)
#else
int
yyparse ()
-
+ ;
#endif
#endif
{
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
+ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
/* Three stacks and their tools:
@@ -955,14 +1076,14 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
@@ -1019,14 +1140,14 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1037,21 +1158,21 @@ yyparse ()
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1083,18 +1204,18 @@ yyparse ()
yybackup:
/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
+/* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1109,7 +1230,7 @@ yybackup:
else
{
yytoken = YYTRANSLATE (yychar);
- YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1129,8 +1250,8 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
@@ -1182,27 +1303,27 @@ yyreduce:
case 2:
#line 101 "printrcy.y"
{
- current_printer = stpui_plist_create(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ current_printer = stpui_plist_create((yyvsp[-1].sval), (yyvsp[0].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 3:
#line 112 "printrcy.y"
{
- if (yyvsp[0].sval)
- g_free(yyvsp[0].sval);
+ if ((yyvsp[0].sval))
+ g_free((yyvsp[0].sval));
}
break;
case 4:
#line 119 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_queue_name(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_queue_name(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1210,10 +1331,10 @@ yyreduce:
case 5:
#line 129 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_output_filename(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_output_filename(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1221,10 +1342,10 @@ yyreduce:
case 6:
#line 139 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_extra_printer_options(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_extra_printer_options(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1232,10 +1353,10 @@ yyreduce:
case 7:
#line 149 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_plist_set_custom_command(current_printer, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_plist_set_custom_command(current_printer, (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
}
break;
@@ -1243,44 +1364,44 @@ yyreduce:
case 8:
#line 159 "printrcy.y"
{
- stpui_plist_set_command_type(current_printer, yyvsp[0].ival);
+ stpui_plist_set_command_type(current_printer, (yyvsp[0].ival));
}
break;
case 9:
#line 165 "printrcy.y"
- { current_printer->scaling = yyvsp[0].dval; }
+ { current_printer->scaling = (yyvsp[0].dval); }
break;
case 10:
#line 169 "printrcy.y"
- { current_printer->orientation = yyvsp[0].ival; }
+ { current_printer->orientation = (yyvsp[0].ival); }
break;
case 11:
#line 173 "printrcy.y"
- { current_printer->auto_size_roll_feed_paper = yyvsp[0].ival; }
+ { current_printer->auto_size_roll_feed_paper = (yyvsp[0].ival); }
break;
case 12:
#line 177 "printrcy.y"
- { current_printer->unit = yyvsp[0].ival; }
+ { current_printer->unit = (yyvsp[0].ival); }
break;
case 13:
#line 181 "printrcy.y"
- { stp_set_left(current_printer->v, yyvsp[0].ival); }
+ { stp_set_left(current_printer->v, (yyvsp[0].ival)); }
break;
case 14:
#line 185 "printrcy.y"
- { stp_set_top(current_printer->v, yyvsp[0].ival); }
+ { stp_set_top(current_printer->v, (yyvsp[0].ival)); }
break;
case 15:
#line 189 "printrcy.y"
{
- switch (yyvsp[0].ival)
+ switch ((yyvsp[0].ival))
{
case 0:
stp_set_string_parameter
@@ -1298,164 +1419,165 @@ yyreduce:
case 16:
#line 207 "printrcy.y"
- { stp_set_page_width(current_printer->v, yyvsp[0].ival); }
+ { stp_set_page_width(current_printer->v, (yyvsp[0].ival)); }
break;
case 17:
#line 211 "printrcy.y"
- { stp_set_page_height(current_printer->v, yyvsp[0].ival); }
+ { stp_set_page_height(current_printer->v, (yyvsp[0].ival)); }
break;
case 19:
#line 218 "printrcy.y"
{
- stp_set_int_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_int_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].ival));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_int_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_int_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
}
break;
case 20:
#line 232 "printrcy.y"
{
- stp_set_string_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_string_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].sval));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_string_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_string_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 21:
#line 247 "printrcy.y"
{
- stp_set_file_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].sval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_file_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].sval));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_file_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_file_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 22:
#line 262 "printrcy.y"
{
- stp_set_float_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].dval);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_float_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].dval));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_float_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_float_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
}
break;
case 23:
#line 276 "printrcy.y"
{
- stp_set_dimension_parameter(current_printer->v, yyvsp[-3].sval, yyvsp[0].ival);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_dimension_parameter(current_printer->v, (yyvsp[-3].sval), (yyvsp[0].ival));
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_dimension_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_dimension_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
}
break;
case 24:
#line 290 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "False") == 0)
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 0);
+ if (strcmp((yyvsp[0].sval), "False") == 0)
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[-3].sval), 0);
else
- stp_set_boolean_parameter(current_printer->v, yyvsp[-3].sval, 1);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_boolean_parameter(current_printer->v, (yyvsp[-3].sval), 1);
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_boolean_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_boolean_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 25:
#line 308 "printrcy.y"
{
- stp_curve_t *curve = stp_curve_create_from_string(yyvsp[0].sval);
+ stp_curve_t *curve = stp_curve_create_from_string((yyvsp[0].sval));
if (curve)
{
- stp_set_curve_parameter(current_printer->v, yyvsp[-3].sval, curve);
- if (strcmp(yyvsp[-1].sval, "False") == 0)
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_curve_parameter(current_printer->v, (yyvsp[-3].sval), curve);
+ if (strcmp((yyvsp[-1].sval), "False") == 0)
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_INACTIVE);
else
- stp_set_curve_parameter_active(current_printer->v, yyvsp[-3].sval,
+ stp_set_curve_parameter_active(current_printer->v, (yyvsp[-3].sval),
STP_PARAMETER_ACTIVE);
stp_curve_destroy(curve);
}
- g_free(yyvsp[-3].sval);
- g_free(yyvsp[-1].sval);
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[-3].sval));
+ g_free((yyvsp[-1].sval));
+ g_free((yyvsp[0].sval));
}
break;
case 56:
#line 353 "printrcy.y"
- { stpui_printrc_current_printer = yyvsp[0].sval; }
+ { stpui_printrc_current_printer = (yyvsp[0].sval); }
break;
case 57:
#line 357 "printrcy.y"
{
- if (strcmp(yyvsp[0].sval, "True") == 0)
+ if (strcmp((yyvsp[0].sval), "True") == 0)
stpui_show_all_paper_sizes = 1;
else
stpui_show_all_paper_sizes = 0;
- g_free(yyvsp[0].sval);
+ g_free((yyvsp[0].sval));
}
break;
case 61:
#line 373 "printrcy.y"
{
- if (yyvsp[0].sval)
+ if ((yyvsp[0].sval))
{
- stpui_set_global_parameter(yyvsp[-1].sval, yyvsp[0].sval);
- g_free(yyvsp[0].sval);
+ stpui_set_global_parameter((yyvsp[-1].sval), (yyvsp[0].sval));
+ g_free((yyvsp[0].sval));
}
- g_free(yyvsp[-1].sval);
+ g_free((yyvsp[-1].sval));
}
break;
+ default: break;
}
-/* Line 991 of yacc.c. */
-#line 1458 "printrcy.c"
+/* Line 1126 of yacc.c. */
+#line 1581 "printrcy.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1494,104 +1616,153 @@ yyerrlab:
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- char *yymsg;
- int yyx, yycount;
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
- yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+ 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 = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("syntax error, unexpected ") + 1;
- yysize += yystrlen (yytname[yytype]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
{
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
-
- if (yycount < 5)
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
{
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
- yyerror ("syntax error; also virtual memory exhausted");
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror ("syntax error");
+ yyerror (YY_("syntax error"));
}
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
+ if (yychar <= YYEOF)
{
- /* 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;
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
}
-
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
-
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
- goto yyerrlab2;
+ goto yyerrlab1;
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action. |
-`----------------------------------------------------*/
-yyerrlab1:
-
- /* 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
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (0)
+ goto yyerrorlab;
- goto yyerrlab2;
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrlab2 -- pop states until the error token can be shifted. |
-`---------------------------------------------------------------*/
-yyerrlab2:
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1612,22 +1783,22 @@ yyerrlab2:
if (yyssp == yyss)
YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[yystate], yyvsp);
- yyvsp--;
- yystate = *--yyssp;
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
yystate = yyn;
goto yynewstate;
@@ -1647,16 +1818,25 @@ yyabortlab:
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
diff --git a/src/gutenprintui2/printrcy.h b/src/gutenprintui2/printrcy.h
index afa662b..a1ebec0 100644
--- a/src/gutenprintui2/printrcy.h
+++ b/src/gutenprintui2/printrcy.h
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -69,6 +69,7 @@
pCURVE = 295
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tDIMENSION 260
diff --git a/src/main/Makefile.am b/src/main/Makefile.am
index 3377183..aa19a62 100644
--- a/src/main/Makefile.am
+++ b/src/main/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.91 2005/06/26 10:56:51 rleigh Exp $
+## $Id: Makefile.am,v 1.92 2005/11/21 11:16:23 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/main/Makefile.in b/src/main/Makefile.in
index 1bd64de..7fe8e15 100644
--- a/src/main/Makefile.in
+++ b/src/main/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -17,8 +17,6 @@
# Variables
-SOURCES = $(color_traditional_la_SOURCES) $(libgutenprint_la_SOURCES) $(print_canon_la_SOURCES) $(print_escp2_la_SOURCES) $(print_lexmark_la_SOURCES) $(print_olympus_la_SOURCES) $(print_pcl_la_SOURCES) $(print_ps_la_SOURCES) $(print_raw_la_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -146,8 +144,8 @@ am_print_raw_la_OBJECTS = print-raw.lo
print_raw_la_OBJECTS = $(am_print_raw_la_OBJECTS)
@BUILD_MODULES_TRUE@am_print_raw_la_rpath = -rpath $(pkgmoduledir)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -174,8 +172,6 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -213,7 +209,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -226,14 +221,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -368,13 +361,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -420,8 +408,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
pkgconfigdatadir = $(libdir)/pkgconfig
pkgxmldatadir = $(pkgdatadir)/$(VERSION)/xml
@@ -559,9 +545,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/main/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/main/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/main/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/main/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -660,74 +646,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bit-ops.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color-conversions.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve-cache.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curve.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-ed.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-eventone.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-inks.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-main.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-ordered.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-predithered.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither-very-fast.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-channels.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-driver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-inks.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-papers.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escp2-resolutions.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generic-options.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-attr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-file.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-node.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mxml-search.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/path.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-canon.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-color.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-dither-matrices.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-escp2-data.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-escp2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-lexmark.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-list.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-olympus.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-papers.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-pcl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-ps.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-raw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-util.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-vars.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-version.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print-weave.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printers.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sequence.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string-list.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Plo@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -891,7 +817,6 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-pkgmoduleLTLIBRARIES mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -918,7 +843,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/main/color-conversion.h b/src/main/color-conversion.h
index 28deb53..ab04380 100644
--- a/src/main/color-conversion.h
+++ b/src/main/color-conversion.h
@@ -1,5 +1,5 @@
/*
- * "$Id: color-conversion.h,v 1.10 2005/07/04 00:23:54 rlk Exp $"
+ * "$Id: color-conversion.h,v 1.11 2005/09/17 21:54:33 rlk Exp $"
*
* Gutenprint color management module - traditional Gimp-Print algorithm.
*
@@ -160,6 +160,7 @@ typedef struct
double brightness;
int linear_contrast_adjustment;
int printed_colorfunc;
+ int simple_gamma_correction;
stp_cached_curve_t hue_map;
stp_cached_curve_t lum_map;
stp_cached_curve_t sat_map;
diff --git a/src/main/curve-cache.c b/src/main/curve-cache.c
index 37b51b0..1ae7d0e 100644
--- a/src/main/curve-cache.c
+++ b/src/main/curve-cache.c
@@ -1,5 +1,5 @@
/*
- * "$Id: curve-cache.c,v 1.5 2004/09/17 18:38:17 rleigh Exp $"
+ * "$Id: curve-cache.c,v 1.6 2005/10/18 02:08:17 rlk Exp $"
*
* Gimp-Print color management module - traditional Gimp-Print algorithm.
*
@@ -88,7 +88,7 @@ stp_curve_cache_set_curve_copy(stp_cached_curve_t *cache, const stp_curve_t *cur
cache->curve = stp_curve_create_copy(curve);
}
-const size_t
+size_t
stp_curve_cache_get_count(stp_cached_curve_t *cache)
{
if (cache->curve)
diff --git a/src/main/escp2-channels.c b/src/main/escp2-channels.c
index 2946e06..15392c2 100644
--- a/src/main/escp2-channels.c
+++ b/src/main/escp2-channels.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-channels.c,v 1.56 2005/07/03 22:13:36 rlk Exp $"
+ * "$Id: escp2-channels.c,v 1.58 2005/10/29 21:31:19 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -200,6 +200,13 @@ static const physical_subchannel_t standard_black_subchannels[] =
DECLARE_INK_CHANNEL(standard_black);
+static const physical_subchannel_t f360_black_subchannels[] =
+{
+ { 0, 0, 1, "BlackDensity", NULL }
+};
+
+DECLARE_INK_CHANNEL(f360_black);
+
static const physical_subchannel_t x80_black_subchannels[] =
{
{ 0, -1, 48, "BlackDensity", NULL }
@@ -389,12 +396,12 @@ static const physical_subchannel_t standard_photo_black_subchannels[] =
DECLARE_INK_CHANNEL(standard_photo_black);
-static const physical_subchannel_t f360_r800_photo_black_subchannels[] =
+static const physical_subchannel_t f360_photo_black_subchannels[] =
{
{ 0, 4, 1, "BlackDensity", NULL }
};
-DECLARE_INK_CHANNEL(f360_r800_photo_black);
+DECLARE_INK_CHANNEL(f360_photo_black);
static const physical_subchannel_t r800_matte_black_subchannels[] =
{
@@ -410,19 +417,19 @@ static const physical_subchannel_t photo_black_subchannels[] =
DECLARE_INK_CHANNEL(photo_black);
-static const physical_subchannel_t f360_photo_black_subchannels[] =
+static const physical_subchannel_t extended_black_subchannels[] =
{
- { 0, 0, 0, "BlackDensity", NULL }
+ { 0, 1, 0, "BlackDensity", NULL }
};
-DECLARE_INK_CHANNEL(f360_photo_black);
+DECLARE_INK_CHANNEL(extended_black);
-static const physical_subchannel_t extended_black_subchannels[] =
+static const physical_subchannel_t f360_extended_black_subchannels[] =
{
- { 0, 1, 0, "BlackDensity", NULL }
+ { 0, 1, 1, "BlackDensity", NULL }
};
-DECLARE_INK_CHANNEL(extended_black);
+DECLARE_INK_CHANNEL(f360_extended_black);
static const physical_subchannel_t photo_cyan_subchannels[] =
{
@@ -439,6 +446,13 @@ static const physical_subchannel_t extended_cyan_subchannels[] =
DECLARE_INK_CHANNEL(extended_cyan);
+static const physical_subchannel_t f360_extended_cyan_subchannels[] =
+{
+ { 2, 1, 1, "CyanDensity", NULL }
+};
+
+DECLARE_INK_CHANNEL(f360_extended_cyan);
+
static const physical_subchannel_t photo_magenta_subchannels[] =
{
{ 1, 0, 0, "MagentaDensity", NULL },
@@ -454,6 +468,13 @@ static const physical_subchannel_t extended_magenta_subchannels[] =
DECLARE_INK_CHANNEL(extended_magenta);
+static const physical_subchannel_t f360_extended_magenta_subchannels[] =
+{
+ { 1, 1, 1, "MagentaDensity", NULL }
+};
+
+DECLARE_INK_CHANNEL(f360_extended_magenta);
+
static const physical_subchannel_t photo_yellow_subchannels[] =
{
{ 4, 0, 0, "YellowDensity", NULL }
@@ -475,6 +496,20 @@ static const physical_subchannel_t j_extended_yellow_subchannels[] =
DECLARE_INK_CHANNEL(j_extended_yellow);
+static const physical_subchannel_t extended_photo3_black_subchannels[] =
+{
+ { 0, 3, 0, "BlackDensity", NULL }
+};
+
+DECLARE_INK_CHANNEL(extended_photo3_black);
+
+static const physical_subchannel_t f360_extended_photo3_black_subchannels[] =
+{
+ { 0, 3, 1, "BlackDensity", NULL }
+};
+
+DECLARE_INK_CHANNEL(f360_extended_photo3_black);
+
/* For Japanese 7-color printers, with dark yellow */
static const physical_subchannel_t photo2_yellow_subchannels[] =
{
@@ -508,6 +543,24 @@ static const physical_subchannel_t f360_photo2_black_subchannels[] =
DECLARE_INK_CHANNEL(f360_photo2_black);
+static const physical_subchannel_t photo3_black_subchannels[] =
+{
+ { 0, 0, 0, "BlackDensity", NULL },
+ { 0, 1, 0, "BlackDensity", "GrayTransition" },
+ { 0, 3, 0, "BlackDensity", "LightGrayTransition" }
+};
+
+DECLARE_INK_CHANNEL(photo3_black);
+
+static const physical_subchannel_t f360_photo3_black_subchannels[] =
+{
+ { 0, 0, 1, "BlackDensity", NULL },
+ { 0, 1, 0, "BlackDensity", "GrayTransition" },
+ { 0, 3, 1, "BlackDensity", "LightGrayTransition" }
+};
+
+DECLARE_INK_CHANNEL(f360_photo3_black);
+
static const physical_subchannel_t quadtone_subchannels[] =
{
{ 0, -1, 0, "BlackDensity", NULL },
@@ -566,6 +619,14 @@ static const physical_subchannel_t f360_photo_cyan_subchannels[] =
DECLARE_INK_CHANNEL(f360_photo_cyan);
+static const physical_subchannel_t f360x_photo_cyan_subchannels[] =
+{
+ { 2, 0, 0, "CyanDensity", NULL },
+ { 2, 1, 1, "CyanDensity", "LightCyanTransition" }
+};
+
+DECLARE_INK_CHANNEL(f360x_photo_cyan);
+
static const physical_subchannel_t f360_photo_magenta_subchannels[] =
{
{ 1, 0, 1, "MagentaDensity", NULL },
@@ -574,6 +635,14 @@ static const physical_subchannel_t f360_photo_magenta_subchannels[] =
DECLARE_INK_CHANNEL(f360_photo_magenta);
+static const physical_subchannel_t f360x_photo_magenta_subchannels[] =
+{
+ { 1, 0, 0, "MagentaDensity", NULL },
+ { 1, 1, 1, "MagentaDensity", "LightMagentaTransition" }
+};
+
+DECLARE_INK_CHANNEL(f360x_photo_magenta);
+
#define DECLARE_CHANNEL_SET(name) \
static const channel_set_t name##_channel_set = \
@@ -642,7 +711,7 @@ const escp2_inkname_t stpi_escp2_default_photo_black_inkset =
static const ink_channel_t *const standard_photo_gloss_black_channels[] =
{
- &f360_r800_photo_black_channel, &standard_gloss_channel
+ &f360_photo_black_channel, &standard_gloss_channel
};
DECLARE_CHANNEL_SET(standard_photo_gloss_black);
@@ -693,6 +762,41 @@ static const escp2_inkname_t f360_two_color_grayscale_inkset =
/*
****************************************************************
* *
+ * Three shade gray *
+ * *
+ ****************************************************************
+ */
+
+static const ink_channel_t *const photo3_black_channels[] =
+{
+ &photo3_black_channel
+};
+
+DECLARE_CHANNEL_SET(photo3_black);
+
+static const escp2_inkname_t three_color_grayscale_inkset =
+{
+ "Gray3", N_("Three Level Grayscale"), INKSET_CcMmYKk,
+ &photo3_black_channel_set
+};
+
+static const ink_channel_t *const f360_photo3_black_channels[] =
+{
+ &f360_photo3_black_channel
+};
+
+DECLARE_CHANNEL_SET(f360_photo3_black);
+
+static const escp2_inkname_t f360_three_color_grayscale_inkset =
+{
+ "Gray3", N_("Three Level Grayscale"), INKSET_CcMmYKk,
+ &f360_photo3_black_channel_set
+};
+
+
+/*
+ ****************************************************************
+ * *
* Quadtone gray *
* *
****************************************************************
@@ -887,6 +991,19 @@ static const escp2_inkname_t three_color_r800_composite_inkset =
&r800_cmy_channel_set
};
+static const ink_channel_t *const r2400_cmy_channels[] =
+{
+ NULL, &standard_cyan_channel,
+ &f360_standard_magenta_channel, &standard_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(r2400_cmy);
+
+static const escp2_inkname_t three_color_r2400_composite_inkset =
+{
+ "CMY", N_("Three Color Composite"), INKSET_CMYK,
+ &r2400_cmy_channel_set
+};
/*
****************************************************************
@@ -938,9 +1055,23 @@ static const escp2_inkname_t four_color_r800_matte_inkset =
&r800_cmyk_channel_set
};
+static const ink_channel_t *const r2400_cmyk_channels[] =
+{
+ &f360_black_channel, &standard_cyan_channel,
+ &f360_standard_magenta_channel, &standard_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(r2400_cmyk);
+
+static const escp2_inkname_t four_color_r2400_standard_inkset =
+{
+ "CMYK", N_("Four Color Standard"), INKSET_CMYK,
+ &r2400_cmyk_channel_set
+};
+
static const ink_channel_t *const photo_gloss_cmyk_channels[] =
{
- &f360_r800_photo_black_channel, &f360_standard_cyan_channel,
+ &f360_photo_black_channel, &f360_standard_cyan_channel,
&standard_magenta_channel, &f360_standard_yellow_channel,
&standard_gloss_channel
};
@@ -949,7 +1080,7 @@ DECLARE_CHANNEL_SET(photo_gloss_cmyk);
static const ink_channel_t *const r800_photo_cmyk_channels[] =
{
- &f360_r800_photo_black_channel, &f360_standard_cyan_channel,
+ &f360_photo_black_channel, &f360_standard_cyan_channel,
&standard_magenta_channel, &f360_standard_yellow_channel,
};
@@ -1069,6 +1200,20 @@ static const escp2_inkname_t f360_five_color_photo_composite_inkset =
&f360_photo_composite_channel_set
};
+static const ink_channel_t *const five_color_photo3_channels[] =
+{
+ NULL, &f360x_photo_cyan_channel,
+ &f360_photo_magenta_channel, &standard_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(five_color_photo3);
+
+static const escp2_inkname_t five_color_photo3_inkset =
+{
+ "PhotoCMY", N_("Five Color Photo Composite"), INKSET_CcMmYK,
+ &five_color_photo3_channel_set
+};
+
/*
****************************************************************
@@ -1094,7 +1239,7 @@ static const escp2_inkname_t six_color_photo_inkset =
static const ink_channel_t *const f360_photo_channels[] =
{
- &f360_photo_black_channel, &f360_photo_cyan_channel,
+ &standard_black_channel, &f360_photo_cyan_channel,
&f360_photo_magenta_channel, &f360_photo_yellow_channel
};
@@ -1106,6 +1251,19 @@ static const escp2_inkname_t f360_six_color_photo_inkset =
&f360_photo_channel_set
};
+static const ink_channel_t *const six_color_photo3_channels[] =
+{
+ &f360_black_channel, &f360x_photo_cyan_channel,
+ &f360_photo_magenta_channel, &standard_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(six_color_photo3);
+
+static const escp2_inkname_t six_color_photo3_inkset =
+{
+ "PhotoCMYK", N_("Six Color Photo"), INKSET_CcMmYK,
+ &six_color_photo3_channel_set
+};
/*
****************************************************************
@@ -1180,6 +1338,20 @@ static const escp2_inkname_t f360_seven_color_enhanced_inkset =
&f360_photo2_channel_set
};
+static const ink_channel_t *const seven_color_photo3_channels[] =
+{
+ &f360_photo2_black_channel, &f360x_photo_cyan_channel,
+ &f360_photo_magenta_channel, &standard_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(seven_color_photo3);
+
+static const escp2_inkname_t seven_color_photo3_inkset =
+{
+ "PhotoCMYK7", N_("Seven Color Photo"), INKSET_CcMmYKk,
+ &seven_color_photo3_channel_set
+};
+
/*
****************************************************************
* *
@@ -1204,7 +1376,7 @@ static const escp2_inkname_t j_seven_color_enhanced_inkset =
static const ink_channel_t *const f360_photoj_channels[] =
{
- &f360_photo_black_channel, &f360_photo_cyan_channel,
+ &standard_black_channel, &f360_photo_cyan_channel,
&f360_photo_magenta_channel, &f360_photo2_yellow_channel
};
@@ -1220,6 +1392,29 @@ static const escp2_inkname_t f360_j_seven_color_enhanced_inkset =
/*
****************************************************************
* *
+ * Eight color CcMmYKkk *
+ * *
+ ****************************************************************
+ */
+
+static const ink_channel_t *const photo3_channels[] =
+{
+ &f360_photo3_black_channel, &f360x_photo_cyan_channel,
+ &f360_photo_magenta_channel, &standard_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(photo3);
+
+static const escp2_inkname_t eight_color_enhanced_inkset =
+{
+ "PhotoCMYK8", N_("Eight Color Photo"), INKSET_CcMmYKk,
+ &photo3_channel_set
+};
+
+
+/*
+ ****************************************************************
+ * *
* Five color CMYRB *
* *
****************************************************************
@@ -1298,7 +1493,7 @@ static const escp2_inkname_t six_color_r800_inkset =
static const ink_channel_t *const six_color_r800_photo_channels[] =
{
- &f360_r800_photo_black_channel, &r800_cyan_channel,
+ &f360_photo_black_channel, &r800_cyan_channel,
&r800_magenta_channel, &r800_yellow_channel,
&r800_red_channel, &r800_blue_channel
};
@@ -1313,7 +1508,7 @@ static const escp2_inkname_t six_color_r800_photo_inkset =
static const ink_channel_t *const six_color_r800_photo_gloss_channels[] =
{
- &f360_r800_photo_black_channel, &f360_standard_cyan_channel,
+ &f360_photo_black_channel, &f360_standard_cyan_channel,
&r800_magenta_channel, &r800_yellow_channel,
&r800_red_channel, &r800_blue_channel,
&standard_gloss_channel
@@ -1376,7 +1571,7 @@ static const escp2_inkname_t two_color_extended_inkset =
static const ink_channel_t *const f360_two_color_extended_channels[] =
{
- &f360_photo_black_channel, &extended_black_channel
+ &standard_black_channel, &extended_black_channel
};
DECLARE_CHANNEL_SET(f360_two_color_extended);
@@ -1603,7 +1798,7 @@ static const escp2_inkname_t six_color_r800_extended_inkset =
static const ink_channel_t *const f360_six_color_extended_channels[] =
{
- &f360_photo_black_channel,
+ &standard_black_channel,
&f360_standard_cyan_channel, &extended_cyan_channel,
&f360_standard_magenta_channel, &extended_magenta_channel,
&f360_photo_yellow_channel
@@ -1654,7 +1849,7 @@ static const escp2_inkname_t seven_color_extended_inkset =
static const ink_channel_t *const f360_seven_color_extended_channels[] =
{
- &f360_photo_black_channel, &extended_black_channel,
+ &standard_black_channel, &extended_black_channel,
&f360_standard_cyan_channel, &extended_cyan_channel,
&f360_standard_magenta_channel, &extended_magenta_channel,
&f360_photo_yellow_channel
@@ -1670,7 +1865,7 @@ static const escp2_inkname_t f360_seven_color_extended_inkset =
static const ink_channel_t *const seven_color_r800_gloss_extended_channels[] =
{
- &standard_black_channel, &f360_r800_photo_black_channel,
+ &standard_black_channel, &f360_photo_black_channel,
&r800_cyan_channel, &r800_magenta_channel,
&r800_yellow_channel, &r800_red_channel,
&r800_blue_channel, &standard_gloss_channel
@@ -1685,6 +1880,23 @@ static const escp2_inkname_t seven_color_r800_gloss_extended_inkset =
};
+static const ink_channel_t *const eight_color_extended_channels[] =
+{
+ &f360_black_channel, &extended_black_channel,
+ &f360_extended_photo3_black_channel,
+ &standard_cyan_channel, &f360_extended_cyan_channel,
+ &f360_standard_magenta_channel, &extended_magenta_channel,
+ &standard_yellow_channel
+};
+
+DECLARE_CHANNEL_SET(eight_color_extended);
+
+static const escp2_inkname_t eight_color_extended_inkset =
+{
+ "PhysicalCMYKkk", N_("Eight Color Raw"), INKSET_EXTENDED,
+ &eight_color_extended_channel_set
+};
+
static const shade_set_t standard_shades =
{
@@ -1725,8 +1937,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.3 }},
- { 2, { 1.0, 0.3 }},
+ { 2, { 1.0, 0.35 }},
+ { 2, { 1.0, 0.35 }},
{ 1, { 1.0 }},
{ 1, { 1.0 }},
{ 1, { 1.0 }},
@@ -1782,6 +1994,30 @@ static const shade_set_t ultrachrome_matte_shades = /* Ultrachrome with matte bl
{ 1, { 1.0 }},
};
+static const shade_set_t ultra3_photo_shades = /* R2400 with photo black ink */
+{
+ { 3, { 1.0, 0.555, 0.185 }},
+ { 2, { 1.0, 0.25 }},
+ { 2, { 1.0, 0.25 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+};
+
+static const shade_set_t ultra3_matte_shades = /* R2400 with matte black ink */
+{
+ { 3, { 1.0, 0.278, 0.093 }},
+ { 2, { 1.0, 0.25 }},
+ { 2, { 1.0, 0.25 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+ { 1, { 1.0 }},
+};
+
static const shade_set_t quadtone_shades = /* Some kind of quadtone ink */
{
{ 4, { 1.0, 0.75, 0.5, 0.25 }},
@@ -2038,6 +2274,25 @@ DECLARE_INKLIST("ultramatte", ultra_matte7, photo7,
N_("UltraChrome Matte Black"), ultrachrome,
ultrachrome_matte, ultrachrome_matte);
+static const escp2_inkname_t *const f360_photo8_ink_types[] =
+{
+ &eight_color_enhanced_inkset,
+ &seven_color_photo3_inkset,
+ &six_color_photo3_inkset,
+ &five_color_photo3_inkset,
+ &four_color_r2400_standard_inkset,
+ &three_color_r2400_composite_inkset,
+ &eight_color_extended_inkset,
+};
+
+DECLARE_INKLIST("ultra3photo", f360_ultra_photo8, f360_photo8,
+ N_("Photo Black"), ultrachrome_k3,
+ ultrachrome_k3_photo, ultra3_photo);
+
+DECLARE_INKLIST("ultra3matte", f360_ultra_matte8, f360_photo8,
+ N_("Matte Black"), ultrachrome_k3,
+ ultrachrome_k3_matte, ultra3_matte);
+
static const escp2_inkname_t *const cmykrb_matte_ink_types[] =
{
&six_color_r800_inkset,
@@ -2203,6 +2458,14 @@ static const inklist_t *const ultrachrome_group[] =
DECLARE_INKGROUP(ultrachrome);
+static const inklist_t *const f360_ultrachrome_k3_group[] =
+{
+ &f360_ultra_photo8_inklist,
+ &f360_ultra_matte8_inklist
+};
+
+DECLARE_INKGROUP(f360_ultrachrome_k3);
+
static const inklist_t *const cmykrb_group[] =
{
&cmykrb_photo_inklist,
diff --git a/src/main/escp2-inks.c b/src/main/escp2-inks.c
index 6b26b7f..eaffd03 100644
--- a/src/main/escp2-inks.c
+++ b/src/main/escp2-inks.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-inks.c,v 1.41 2005/08/14 01:27:44 rlk Exp $"
+ * "$Id: escp2-inks.c,v 1.42 2005/10/23 19:43:14 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -127,6 +127,20 @@ static const escp2_dropsize_t escp2_r300_2880_dropsizes =
static const escp2_dropsize_t escp2_r300_2880_1440_dropsizes =
{ "r300_2880_1440", 1, { 1.0 } };
+/* Stylus Photo R2400 */
+static const escp2_dropsize_t escp2_r2400_360_dropsizes =
+ { "r2400_360", 1, { 1 } };
+static const escp2_dropsize_t escp2_r2400_720_dropsizes =
+ { "r2400_1440", 3, { 0.180, 0.44, 1 } };
+static const escp2_dropsize_t escp2_r2400_1440_dropsizes =
+ { "r2400_1440", 3, { 0.180, 0.44, 1 } };
+static const escp2_dropsize_t escp2_r2400_2880_dropsizes =
+ { "r2400_1440", 3, { 0.180, 0.44, 1 } };
+static const escp2_dropsize_t escp2_r2400_2880_1440_dropsizes =
+ { "r2400_2880_1440", 2, { 0.41, 1 } };
+static const escp2_dropsize_t escp2_r2400_2880_2880_dropsizes =
+ { "r2400_2880_2880", 1, { 1.0 } };
+
/* Stylus C80 */
static const escp2_dropsize_t escp2_economy_pigment_dropsizes =
{ "economy_pigment", 3, { 0, 0, 1.0 } };
@@ -275,6 +289,19 @@ const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops =
&escp2_r300_2880_1440_dropsizes,
};
+const escp2_drop_list_t stpi_escp2_variable_r2400_drops =
+{
+ &escp2_r2400_360_dropsizes,
+ &escp2_r2400_360_dropsizes,
+ &escp2_r2400_720_dropsizes,
+ &escp2_r2400_720_dropsizes,
+ &escp2_r2400_1440_dropsizes,
+ &escp2_r2400_2880_dropsizes,
+ &escp2_r2400_2880_1440_dropsizes,
+ &escp2_r2400_2880_2880_dropsizes,
+ &escp2_r2400_2880_2880_dropsizes,
+};
+
const escp2_drop_list_t stpi_escp2_variable_1_5pl_drops =
{
&escp2_1_5pl_360_dropsizes,
diff --git a/src/main/escp2-papers.c b/src/main/escp2-papers.c
index 24a6e92..3980be0 100644
--- a/src/main/escp2-papers.c
+++ b/src/main/escp2-papers.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-papers.c,v 1.80 2005/08/14 14:55:22 rleigh Exp $"
+ * "$Id: escp2-papers.c,v 1.84 2005/10/30 00:57:40 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -141,12 +141,12 @@ static const char photo3_lum_adj[] =
"<gutenprint>\n"
"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
-/* C */ "0.60 0.61 0.64 0.68 0.73 0.78 0.82 0.85 " /* B */
-/* B */ "0.85 0.82 0.78 0.78 0.79 0.80 0.82 0.85 " /* M */
+/* C */ "0.66 0.67 0.69 0.73 0.77 0.83 0.87 0.89 " /* B */
+/* B */ "0.91 0.88 0.82 0.78 0.78 0.80 0.82 0.85 " /* M */
/* M */ "0.87 0.90 0.94 0.97 1.00 1.00 1.00 1.00 " /* R */
/* R */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* Y */
/* Y */ "1.00 1.00 0.99 0.98 0.96 0.94 0.92 0.88 " /* G */
-/* G */ "0.84 0.72 0.68 0.66 0.64 0.62 0.61 0.60 " /* C */
+/* G */ "0.84 0.72 0.69 0.67 0.66 0.66 0.66 0.66 " /* C */
"</sequence>\n"
"</curve>\n"
"</gutenprint>\n";
@@ -349,6 +349,97 @@ static const char ultra_glossy_hue_adj[] =
"</gutenprint>\n";
+static const char ultra_k3_matte_sat_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "1.00 1.00 1.00 1.05 1.10 1.15 1.15 1.15 " /* B */
+/* B */ "1.15 1.15 1.15 1.10 1.10 1.05 1.05 1.00 " /* M */
+/* M */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* R */
+/* R */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* Y */
+/* Y */ "1.00 1.05 1.15 1.25 1.35 1.45 1.50 1.50 " /* G */
+/* G */ "1.50 1.50 1.50 1.45 1.35 1.25 1.15 1.05 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char ultra_k3_matte_lum_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "0.49 0.51 0.55 0.61 0.67 0.71 0.76 0.79 " /* B */
+/* B */ "0.83 0.80 0.76 0.76 0.78 0.79 0.83 0.86 " /* M */
+/* M */ "0.93 0.95 0.97 0.97 0.97 0.97 0.96 0.96 " /* R */
+/* R */ "0.96 0.97 0.97 0.98 0.99 1.00 1.00 1.00 " /* Y */
+/* Y */ "1.00 0.98 0.97 0.95 0.93 0.91 0.88 0.83 " /* G */
+/* G */ "0.75 0.64 0.58 0.54 0.52 0.51 0.50 0.49 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char ultra_k3_matte_hue_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n"
+/* C */ "0.00 0.06 0.10 0.10 0.06 0.00 -.06 -.12 " /* B */
+/* B */ "-.18 -.21 -.22 -.22 -.22 -.22 -.22 -.22 " /* M */
+/* M */ "-.22 -.28 -.34 -.40 -.50 -.40 -.30 -.20 " /* R */
+/* R */ "-.12 -.07 -.04 -.02 0.00 0.00 0.00 0.00 " /* Y */
+/* Y */ "0.00 -.00 -.03 -.07 -.11 -.15 -.17 -.18 " /* G */
+/* G */ "-.19 -.20 -.19 -.18 -.16 -.12 -.08 -.04 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char ultra_k3_glossy_sat_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "1.00 1.00 1.00 1.05 1.10 1.15 1.15 1.15 " /* B */
+/* B */ "1.15 1.15 1.15 1.10 1.10 1.05 1.05 1.00 " /* M */
+/* M */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* R */
+/* R */ "1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 " /* Y */
+/* Y */ "1.00 1.05 1.15 1.25 1.35 1.45 1.50 1.50 " /* G */
+/* G */ "1.50 1.50 1.50 1.45 1.35 1.25 1.15 1.05 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char ultra_k3_glossy_lum_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"0\" upper-bound=\"4\">\n"
+/* C */ "0.49 0.53 0.60 0.64 0.67 0.69 0.72 0.75 " /* B */
+/* B */ "0.75 0.71 0.70 0.70 0.72 0.76 0.81 0.87 " /* M */
+/* M */ "0.93 0.95 0.97 0.98 0.98 0.97 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 0.98 0.97 0.96 0.95 0.93 0.90 0.87 " /* G */
+/* G */ "0.83 0.69 0.61 0.55 0.53 0.52 0.50 0.49 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+static const char ultra_k3_glossy_hue_adj[] =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<gutenprint>\n"
+"<curve wrap=\"wrap\" type=\"linear\" gamma=\"0\">\n"
+"<sequence count=\"48\" lower-bound=\"-6\" upper-bound=\"6\">\n"
+/* C */ "0.00 0.06 0.10 0.10 0.06 0.00 -.06 -.12 " /* B */
+/* B */ "-.18 -.21 -.22 -.22 -.22 -.22 -.22 -.22 " /* M */
+/* M */ "-.22 -.28 -.34 -.40 -.50 -.40 -.30 -.20 " /* R */
+/* R */ "-.12 -.07 -.04 -.02 0.00 0.00 0.00 0.00 " /* Y */
+/* Y */ "0.00 -.00 -.03 -.07 -.11 -.15 -.19 -.22 " /* G */
+/* G */ "-.25 -.22 -.19 -.15 -.12 -.10 -.06 -.03 " /* C */
+"</sequence>\n"
+"</curve>\n"
+"</gutenprint>\n";
+
+
static const char r800_matte_sat_adj[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<gutenprint>\n"
@@ -590,43 +681,43 @@ DECLARE_PAPER_ADJUSTMENTS(photo2);
static const paper_adjustment_t photo3_adjustments[] =
{
- { "Plain", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
+ { "Plain", 0.615, .35, 0.75, .15, .9, 1, .7, .8, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "PlainFast", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
+ { "PlainFast", 0.615, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Postcard", 0.83, .35, 0.5, .2, .9, 1, .59, .7, .9, 1, 1.0,
+ { "Postcard", 0.692, .35, 0.5, .2, .9, 1, .59, .7, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "GlossyFilm", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
+ { "GlossyFilm", 0.833, .5, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Transparency", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
+ { "Transparency", 0.833, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Envelope", 0.738, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
+ { "Envelope", 0.615, .35, 0.75, .15, .9, 1, .59, .7, .9, 1, 1.0,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "BackFilm", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
+ { "BackFilm", 0.833, .5, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Matte", 0.85, .35, 0.75, .3, .999, 1, .59, .7, .9, 1, 1,
+ { "Matte", 0.833, .35, 0.5, .25, .999, 1, .63, .72, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "MatteHeavy", 0.85, .35, .3, .3, .999, 1, .59, .7, .9, 1, 1,
+ { "MatteHeavy", 0.833, .35, 0.5, .25, .999, 1, .63, .72, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Inkjet", 0.85, .35, 0.75, .2, .9, 1, .59, .7, .9, 1, 1,
+ { "Inkjet", 0.709, .5, 0.75, .2, .9, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Coated", 1.2, .35, .5, .3, .999, 1, .59, .7, .9, 1, 1,
+ { "Coated", 0.833, .45, 0.5, .25, .999, 1, .76, .84, .66, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Photo", 1.00, .35, 0.5, .3, .999, 1, .59, .7, .9, 1, 1,
+ { "Photo", 0.833, .5, 0.5, .25, .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, .83, .66, 1, 0.85,
+ { "GlossyPhoto", 0.833, .75, 0.5, .25, .999, 1, .7, .8, .66, 1, 0.92,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Semigloss", 1.0, .25, 0.5, .3, .999, 1, .59, .7, .9, 1, 0.92,
+ { "Semigloss", 0.833, .75, 0.5, .3, .999, 1, .7, .8, .66, 1, 0.92,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Luster", 1.0, .25, 0.5, .3, .999, 1, .59, .7, .9, 1, 0.92,
+ { "Luster", 0.833, .75, 0.5, .3, .999, 1, .7, .8, .66, 1, 0.92,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "GlossyPaper", 1.00, .35, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
+ { "GlossyPaper", 0.833, .5, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Ilford", .85, .25, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
+ { "Ilford", 0.833, .5, 0.75, .2, .999, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "ColorLife", 1.00, .35, 0.75, .2, .9, 1, .59, .7, .9, 1, 1,
+ { "ColorLife", 0.833, .5, 0.75, .2, .9, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
- { "Other", 0.738, .35, 0.5, .5, .9, 1, .59, .7, .9, 1, 1,
+ { "Other", 0.615, .35, 0.5, .5, .9, 1, .59, .7, .9, 1, 1,
photo3_hue_adj, photo3_lum_adj, photo3_sat_adj },
};
@@ -770,6 +861,100 @@ static const paper_adjustment_t ultrachrome_matte_adjustments[] =
DECLARE_PAPER_ADJUSTMENTS(ultrachrome_matte);
+static const paper_adjustment_t ultrachrome_k3_photo_adjustments[] =
+{
+ { "Plain", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "PlainFast", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Postcard", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "GlossyFilm", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Transparency", 0.83, .75, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Envelope", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "BackFilm", 0.83, .75, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Matte", 0.92, 0.8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "MatteHeavy", 0.92, 0.8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Inkjet", 0.72, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Coated", 0.83, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Photo", 1.0, .5, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "GlossyPhoto", 0.72, 1, 1, .01, 1.8, 1, 1, 1, 1, 1, .92,
+ ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj },
+ { "Semigloss", 0.72, .8, 1, .01, 1.8, 1, 1, 1, 1, 1, .92,
+ ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj },
+ { "Luster", 0.72, .8, 1, .01, 1.8, 1, 1, 1, 1, 1, .92,
+ ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj },
+ { "ArchivalMatte", 0.92, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "WaterColorRadiant", 0.92, .8, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "GlossyPaper", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Ilford", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "ColorLife", 0.83, 1.0, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Other", 0.72, .1, 1, .01, 1.5, 1, 1, 1, 1, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+};
+
+DECLARE_PAPER_ADJUSTMENTS(ultrachrome_k3_photo);
+
+static const paper_adjustment_t ultrachrome_k3_matte_adjustments[] =
+{
+ { "Plain", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "PlainFast", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Postcard", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "GlossyFilm", 0.83, .5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Transparency", 0.83, .5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Envelope", 0.72, .1, 1, 0, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "BackFilm", 0.83, .5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Matte", 0.92, 0.5, 1, 0.00, 1.25, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "MatteHeavy", 0.92, 0.4, .4, .01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Inkjet", 0.72, .3, 1, .01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Coated", 0.83, .4, 1, .01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Photo", 1.0, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "GlossyPhoto", 0.72, 1, 1, .01, 0.5, 1, 1, 1, .6, 1, .92,
+ ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj },
+ { "Semigloss", 0.72, .8, 1, .01, 0.5, 1, 1, 1, .6, 1, .92,
+ ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj },
+ { "Luster", 0.72, .8, 1, .01, 0.5, 1, 1, 1, 1, .5, .92,
+ ultra_k3_glossy_hue_adj, ultra_k3_glossy_lum_adj, ultra_k3_glossy_sat_adj },
+ { "WaterColorRadiant", 0.92, 0.4, 1, .01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "GlossyPaper", 0.83, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Ilford", 0.83, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "ColorLife", 0.83, 0.5, 1, 0.01, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+ { "Other", 0.72, .1, .4, 0, 0.5, 1, 1, 1, .6, 1, 1.0,
+ ultra_k3_matte_hue_adj, ultra_k3_matte_lum_adj, ultra_k3_matte_sat_adj },
+};
+
+DECLARE_PAPER_ADJUSTMENTS(ultrachrome_k3_matte);
+
static const paper_adjustment_t r800_photo_adjustments[] =
{
{ "Plain", 0.72, .1, 1, .02, 1.4, .882, 1, .300, 1, 1, 1.0,
@@ -1096,6 +1281,54 @@ static const paper_t ultrachrome_papers[] =
DECLARE_PAPERS(ultrachrome);
+static const paper_t ultrachrome_k3_papers[] =
+{
+ { "Plain", N_("Plain Paper"), PAPER_PLAIN,
+ 1, 0, 0x6b, 0x1a, 0x01, NULL, "UltraMatte" },
+ { "PlainFast", N_("Plain Paper Fast Load"), PAPER_PLAIN,
+ 5, 0, 0x6b, 0x1a, 0x01, NULL, "UltraMatte" },
+ { "Postcard", N_("Postcard"), PAPER_PLAIN,
+ 2, 0, 0x00, 0x00, 0x02, NULL, "UltraMatte" },
+ { "GlossyFilm", N_("Glossy Film"), PAPER_PHOTO,
+ 3, 0, 0x6d, 0x00, 0x01, NULL, "UltraPhoto" },
+ { "Transparency", N_("Transparencies"), PAPER_TRANSPARENCY,
+ 3, 0, 0x6d, 0x00, 0x02, NULL, "UltraPhoto" },
+ { "Envelope", N_("Envelopes"), PAPER_PLAIN,
+ 4, 0, 0x6b, 0x1a, 0x01, NULL, "UltraMatte" },
+ { "BackFilm", N_("Back Light Film"), PAPER_TRANSPARENCY,
+ 6, 0, 0x6d, 0x00, 0x01, NULL, "UltraPhoto" },
+ { "Matte", N_("Matte Paper"), PAPER_GOOD,
+ 7, 0, 0x00, 0x00, 0x02, NULL, "UltraMatte" },
+ { "MatteHeavy", N_("Matte Paper Heavyweight"), PAPER_GOOD,
+ 7, 0, 0x00, 0x00, 0x02, NULL, "UltraMatte" },
+ { "Inkjet", N_("Inkjet Paper"), PAPER_GOOD,
+ 7, 0, 0x6b, 0x1a, 0x01, NULL, "UltraMatte" },
+ { "Coated", N_("Photo Quality Inkjet Paper"), PAPER_GOOD,
+ 7, 0, 0x6b, 0x1a, 0x01, NULL, "UltraPhoto" },
+ { "Photo", N_("Photo Paper"), PAPER_PHOTO,
+ 8, 0, 0x67, 0x00, 0x02, NULL, "UltraPhoto" },
+ { "GlossyPhoto", N_("Premium Glossy Photo Paper"), PAPER_PREMIUM_PHOTO,
+ 8, 0, 0x80, 0x00, 0x02, NULL, "UltraPhoto" },
+ { "Semigloss", N_("Premium Semigloss Photo Paper"), PAPER_PREMIUM_PHOTO,
+ 8, 0, 0x80, 0x00, 0x02, NULL, "UltraPhoto" },
+ { "Luster", N_("Premium Luster Photo Paper"), PAPER_PREMIUM_PHOTO,
+ 8, 0, 0x80, 0x00, 0x02, NULL, "UltraPhoto" },
+ { "ArchivalMatte", N_("Archival Matte Paper"), PAPER_PREMIUM_PHOTO,
+ 7, 0, 0x00, 0x00, 0x02, NULL, "UltraMatte" },
+ { "WaterColorRadiant", N_("Watercolor Paper - Radiant White"), PAPER_PREMIUM_PHOTO,
+ 7, 0, 0x00, 0x00, 0x02, NULL, "UltraMatte" },
+ { "GlossyPaper", N_("Photo Quality Glossy Paper"), PAPER_PHOTO,
+ 6, 0, 0x6b, 0x1a, 0x01, NULL, "UltraPhoto" },
+ { "Ilford", N_("Ilford Heavy Paper"), PAPER_PREMIUM_PHOTO,
+ 8, 0, 0x80, 0x00, 0x02, NULL, "UltraMatte" },
+ { "ColorLife", N_("ColorLife Paper"), PAPER_PREMIUM_PHOTO,
+ 8, 0, 0x67, 0x00, 0x02, NULL, "UltraPhoto" },
+ { "Other", N_("Other"), PAPER_PLAIN,
+ 0, 0, 0x6b, 0x1a, 0x01, NULL, "UltraMatte" },
+};
+
+DECLARE_PAPERS(ultrachrome_k3);
+
static const paper_t durabrite2_papers[] =
{
{ "Plain", N_("Plain Paper"), PAPER_PLAIN,
diff --git a/src/main/escp2-resolutions.c b/src/main/escp2-resolutions.c
index 011e2ef..419cf48 100644
--- a/src/main/escp2-resolutions.c
+++ b/src/main/escp2-resolutions.c
@@ -1,5 +1,5 @@
/*
- * "$Id: escp2-resolutions.c,v 1.28 2005/08/14 01:27:44 rlk Exp $"
+ * "$Id: escp2-resolutions.c,v 1.29 2005/10/23 19:43:14 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -106,6 +106,9 @@ static const res_t r_1440x720sw =
static const res_t r_1440x720hq2 =
{ "1440x720hq2", N_("1440 x 720 DPI Highest Quality"),
1440, 720, 1440, 720, 1, 0, 2 };
+static const res_t r_720x1440sw =
+{ "720x1440sw", N_("1440 x 720 DPI Transposed"),
+ 720, 1440, 720, 1440, 1, 0, 1 };
static const res_t r_2880x720mw =
{ "2880x720mw", N_("2880 x 720 DPI"),
@@ -133,6 +136,9 @@ static const res_t r_2880x1440mw =
static const res_t r_2880x1440sw =
{ "2880x1440sw", N_("2880 x 1440 DPI"),
2880, 1440, 2880, 1440, 1, 0, 1};
+static const res_t r_1440x2880sw =
+{ "1440x2880sw", N_("2880 x 1440 DPI Transposed"),
+ 1440, 2880, 1440, 2880, 1, 0, 1};
static const res_t r_2880x2880mw =
{ "2880x2880mw", N_("2880 x 2880 DPI"),
@@ -243,12 +249,14 @@ const res_t *const stpi_escp2_2880_1440dpi_reslist[] =
&r_720sw,
&r_1440x720sw,
+ &r_720x1440sw,
&r_2880x720sw,
&r_1440x1440sw,
&r_2880x1440sw,
+ &r_1440x2880sw,
&r_2880x2880sw,
@@ -296,10 +304,12 @@ const res_t *const stpi_escp2_superfine_reslist[] =
&r_720sw,
&r_1440x720sw,
+ &r_720x1440sw,
&r_1440x1440ov,
&r_2880x1440sw,
+ &r_1440x2880sw,
&r_2880x2880sw,
diff --git a/src/main/path.c b/src/main/path.c
index 86e131b..d59c625 100644
--- a/src/main/path.c
+++ b/src/main/path.c
@@ -1,5 +1,5 @@
/*
- * "$Id: path.c,v 1.17 2004/09/17 18:38:21 rleigh Exp $"
+ * "$Id: path.c,v 1.18 2005/10/18 02:08:17 rlk Exp $"
*
* Gutenprint path functions - split and search paths.
*
@@ -63,7 +63,7 @@ stp_path_search(stp_list_t *dirlist, /* List of directories to search */
{
stp_list_t *findlist; /* List of files to return */
stp_list_item_t *diritem; /* Current directory */
- struct dirent** module_dir; /* Current directory contents */
+ struct dirent** module_dir = NULL; /* Current directory contents */
char *module_name; /* File name to check */
int n; /* Number of directory entries */
diff --git a/src/main/print-canon.c b/src/main/print-canon.c
index a0d2dcb..53b56b0 100644
--- a/src/main/print-canon.c
+++ b/src/main/print-canon.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-canon.c,v 1.163 2005/08/25 23:40:40 rlk Exp $"
+ * "$Id: print-canon.c,v 1.167 2005/10/21 13:31:41 faust3 Exp $"
*
* Print plug-in CANON BJL driver for the GIMP.
*
@@ -55,7 +55,7 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-
+#include <math.h>
/* Solaris with gcc has problems because gcc's limits.h doesn't #define */
/* this */
#ifndef CHAR_BIT
@@ -763,6 +763,18 @@ typedef struct
int bits;
int ydpi;
color_info_t color_info[9]; /* C,M,Y,K,c,m,y,k,? */
+ int ncolors; /* number of colors to print with */
+ int physical_xdpi, nozzle_ydpi, stepper_ydpi;
+ int nozzles; /* count of inkjets for one pass */
+ int nozzle_separation;
+ int horizontal_passes;
+ int vertical_passes;
+ int vertical_oversample;
+ int *head_offset;
+ int last_pass_offset;
+ int bidirectional; /* tells us if we are allowed to print bidirectional */
+ int direction; /* stores the last direction of the print head */
+
} canon_privdata_t;
static void canon_write_line(stp_vars_t *v);
@@ -805,8 +817,12 @@ static void canon_write_line(stp_vars_t *v);
#define CANON_CAP_r 0x800ul
#define CANON_CAP_g 0x1000ul
#define CANON_CAP_ACKSHORT 0x2000ul
-#define CANON_CAP_extended_t 0x4000ul /* detailed level and bitdepth settings for every ink*/
-#define CANON_CAP_5pixelin1byte 0x8000ul /* 5 pixel with 3 levels in 1 byte compression */
+#define CANON_CAP_rr 0x4000ul
+#define CANON_CAP_WEAVE 0x8000ul /* S200 has to be fed with weaved data */
+ /* for Resolutions above 360dpi */
+#define CANON_CAP_extended_t 0x10000ul /* detailed level and bitdepth settings for every ink*/
+#define CANON_CAP_5pixelin1byte 0x20000ul /* 5 pixel with 3 levels in 1 byte compression */
+#define CANON_CAP_DUPLEX 0x40000ul
#define CANON_CAP_STD0 (CANON_CAP_b|CANON_CAP_c|CANON_CAP_d|\
CANON_CAP_l|CANON_CAP_q|CANON_CAP_t)
@@ -894,6 +910,27 @@ static const canon_cap_t canon_model_capabilities[] =
/* */
/* ************************************ */
+ { /* Canon S200x *//* heads: BC-24 */
+ 4202, 3,
+ 618, 936, /* 8.58" x 13 " */
+ 180, 2880, 2880, 4,
+ 10, 10, 9, 20,
+ CANON_INK_CMYK | CANON_INK_CMY | CANON_INK_K,
+ CANON_SLOT_ASF1,
+ CANON_CAP_STD1 | CANON_CAP_rr | CANON_CAP_WEAVE,
+ CANON_MODES(canon_nomodes),
+#ifndef EXPERIMENTAL_STUFF
+/* 2880dpi Resolutions: TBD */
+/* 180x180 360x360 720x720 1440x720 1440x1440 2880x2880 */
+ {-1, 0, 0, 0, 0, -1},
+/*------- 360x360 720x720 1440x720 1440x1440 ---------*/
+ { 1, 2, 1, 0.5, 0.3, 0.2},
+ CANON_INK(canon_ink_standard),
+#endif
+ standard_lum_adjustment,
+ standard_hue_adjustment,
+ standard_sat_adjustment
+ },
{ /* Canon BJ 30 *//* heads: BC-10 */
30, 1,
@@ -1304,7 +1341,7 @@ static const canon_cap_t canon_model_capabilities[] =
11, 9, 10, 18, /*border_left, border_right, border_top, border_bottom */
CANON_INK_CMYK /*| CANON_INK_CcMmYyK*/, /*canon inks */
CANON_SLOT_ASF1, /*paper slot */
- CANON_CAP_STD0|CANON_CAP_extended_t|CANON_CAP_5pixelin1byte, /*features */
+ CANON_CAP_STD0|CANON_CAP_extended_t|CANON_CAP_5pixelin1byte|CANON_CAP_DUPLEX, /*features */
CANON_MODES(canon_nomodes),
#ifndef EXPERIMENTAL_STUFF
{-1,0,0,-1,-1,-1}, /*150x150 300x300 600x600 1200x600 1200x1200 2400x2400*/
@@ -1375,10 +1412,12 @@ typedef struct {
typedef struct {
const canon_cap_t *caps;
int printing_color;
+ int is_first_page;
const paper_t *pt;
int print_head;
int colormode;
const char *source_str;
+ const char *duplex_str;
int xdpi;
int ydpi;
int page_width;
@@ -1406,6 +1445,8 @@ static const paper_t canon_paper_list[] = {
};
static const int paper_type_count = sizeof(canon_paper_list) / sizeof(paper_t);
+static void canon_advance_paper(stp_vars_t *, int);
+static void canon_flush_pass(stp_vars_t *, int, int);
static const stp_parameter_t the_parameters[] =
{
@@ -1451,6 +1492,12 @@ static const stp_parameter_t the_parameters[] =
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
},
+ {
+ "Duplex", N_("Double-Sided Printing"), N_("Basic Printer Setup"),
+ N_("Duplex/Tumble Setting"),
+ STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_FEATURE,
+ STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
+ }
};
static const int the_parameter_count =
@@ -1529,6 +1576,24 @@ static const float_param_t float_parameters[] =
static const int float_parameter_count =
sizeof(float_parameters) / sizeof(const float_param_t);
+/*
+ * Duplex support - modes available
+ * Note that the internal names MUST match those in cups/genppd.c else the
+ * PPD files will not be generated correctly
+ *
+ * TODO: Support for DuplexNoTumble, the image has to be rotated
+ */
+
+static const stp_param_string_t duplex_types[] =
+{
+ { "None", N_ ("Off") },
+/* { "DuplexNoTumble", N_ ("Long Edge (Standard)") } , */
+ { "DuplexTumble", N_ ("Short Edge (Flip)") }
+};
+#define NUM_DUPLEX (sizeof (duplex_types) / sizeof (stp_param_string_t))
+
+
+
static const paper_t *
get_media_type(const char *name)
{
@@ -1566,6 +1631,8 @@ canon_source_type(const char *name, const canon_cap_t * caps)
if (!strcmp(name,"Auto")) return 4;
if (!strcmp(name,"Manual")) return 0;
if (!strcmp(name,"ManualNP")) return 1;
+ if (!strcmp(name,"Cassette")) return 8;
+ if (!strcmp(name,"CD")) return 10;
}
stp_deprintf(STP_DBG_CANON,"canon: Unknown source type '%s' - reverting to auto\n",name);
@@ -1833,7 +1900,9 @@ static const stp_param_string_t media_sources[] =
{
{ "Auto", N_ ("Auto Sheet Feeder") },
{ "Manual", N_ ("Manual with Pause") },
- { "ManualNP", N_ ("Manual without Pause") }
+ { "ManualNP", N_ ("Manual without Pause") },
+ { "Cassette", N_ ("Cassette") },
+ { "CD", N_ ("CD tray") }
};
@@ -1989,7 +2058,7 @@ canon_parameters(const stp_vars_t *v, const char *name,
}
else if (strcmp(name, "InputSlot") == 0)
{
- int count = 3;
+ int count = sizeof(media_sources)/sizeof(media_sources[0]);
description->bounds.str= stp_string_list_create();
description->deflt.str= media_sources[0].name;
for (i = 0; i < count; i ++)
@@ -2006,6 +2075,36 @@ canon_parameters(const stp_vars_t *v, const char *name,
(description->bounds.str, "BW", _("Black and White"));
description->deflt.str =
stp_string_list_param(description->bounds.str, 0)->name;
+ }
+ else if (strcmp(name, "Duplex") == 0)
+ {
+ int offer_duplex=0;
+
+ description->bounds.str = stp_string_list_create();
+
+/*
+ * Don't offer the Duplex/Tumble options if the JobMode parameter is
+ * set to "Page" Mode.
+ * "Page" mode is set by the Gimp Plugin, which only outputs one page at a
+ * time, so Duplex/Tumble is meaningless.
+ */
+
+ if (stp_get_string_parameter(v, "JobMode"))
+ offer_duplex = strcmp(stp_get_string_parameter(v, "JobMode"), "Page");
+ else
+ offer_duplex=1;
+
+ if (offer_duplex && (caps->features & CANON_CAP_DUPLEX))
+ {
+ description->deflt.str = duplex_types[0].name;
+ for (i=0; i < NUM_DUPLEX; i++)
+ {
+ stp_string_list_add_string(description->bounds.str,
+ duplex_types[i].name,_(duplex_types[i].text));
+ }
+ }
+ else
+ description->is_active = 0;
}
}
@@ -2136,6 +2235,20 @@ canon_init_resetPrinter(const stp_vars_t *v, canon_init_t *init)
canon_cmd(v,ESC5b,0x4b, 2, 0x00,0x0f);
}
+/* ESC ($ -- 0x24 -- cmdSetDuplex --:
+ */
+static void
+canon_init_setDuplex(const stp_vars_t *v, canon_init_t *init)
+{
+ if (!(init->caps->features & CANON_CAP_DUPLEX))
+ return;
+ if (strncmp(init->duplex_str, "Duplex", 6))
+ return;
+ /* The same command seems to be needed for both Duplex and DuplexTumble
+ no idea about the meanings of the single bytes */
+ canon_cmd(v,ESC28,0x24,9,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x02);
+}
+
/* ESC (a -- 0x61 -- cmdSetPageMode --:
*/
static void
@@ -2165,13 +2278,13 @@ static void
canon_init_setColor(const stp_vars_t *v, canon_init_t *init)
{
unsigned char
- arg_63_1, arg_63_2, arg_63_3;
-
+ numargs, arg_63[6];
if (!(init->caps->features & CANON_CAP_c))
return;
- arg_63_1 = init->caps->model_id << 4; /* MODEL_ID */
+ numargs = 3;
+ arg_63[0] = init->caps->model_id << 4; /* MODEL_ID */
switch ( init->caps->model_id ) {
@@ -2180,12 +2293,12 @@ canon_init_setColor(const stp_vars_t *v, canon_init_t *init)
case 1: /* 360 dpi series - BJC-4000, BJC-210, BJC-70 and their descendants */
if (!init->printing_color)
- arg_63_1|= 0x01; /* PRINT_COLOUR */
+ arg_63[0]|= 0x01; /* PRINT_COLOUR */
- arg_63_2 = ((init->pt ? init->pt->media_code : 0) << 4) /* PRINT_MEDIA */
+ arg_63[1] = ((init->pt ? init->pt->media_code : 0) << 4) /* PRINT_MEDIA */
+ 1; /* hardcode to High quality for now */ /* PRINT_QUALITY */
- canon_cmd(v,ESC28,0x63, 2, arg_63_1, arg_63_2);
+ canon_cmd(v,ESC28,0x63, 2, arg_63[0], arg_63[1]);
break;
case 2: /* are any models using this? */
@@ -2193,13 +2306,32 @@ canon_init_setColor(const stp_vars_t *v, canon_init_t *init)
case 3: /* 720 dpi series - BJC-3000 and descendants */
if (!init->printing_color)
- arg_63_1|= 0x01; /* colour mode */
-
- arg_63_2 = (init->pt) ? init->pt->media_code : 0; /* print media type */
-
- arg_63_3 = 2; /* hardcode to whatever this means for now */ /* quality, apparently */
-
- canon_cmd(v,ESC28,0x63, 3, arg_63_1, arg_63_2, arg_63_3);
+ arg_63[0]|= 0x01; /* colour mode */
+
+ arg_63[1] = (init->pt) ? init->pt->media_code : 0; /* print media type */
+
+ if (init->caps->model == 4202) /* S200 */
+ {
+ if ((init->xdpi == 720) && (init->ydpi == 720 ))
+ arg_63[2] = 1;
+ else
+ arg_63[2] = 4; /* hardcoded: quality 3 (may be 0...4) */
+ /* bidirectional is controlled via quality: 0..2 is bidi, 3 and 4 uni */
+ /* not every combination works, no idea about the principle */
+ if ( (init->xdpi > 360) || (init->ydpi > 360) )
+ {
+ numargs = 6;
+ arg_63[3] = 0x10; arg_63[4] = 6; arg_63[5] = 8; /* arg5 makes a vert. offset for K */
+ if (!init->printing_color)
+ arg_63[4] = 1;
+ }
+ }
+ else
+ arg_63[2] = 2; /* hardcode to whatever this means for now; quality, apparently */
+
+ stp_zprintf(v, "\033\050\143");
+ stp_put16_le(numargs, v);
+ stp_zfwrite((const char *)arg_63, numargs, 1, v);
break;
}
@@ -2214,10 +2346,20 @@ canon_init_setResolution(const stp_vars_t *v, canon_init_t *init)
if (!(init->caps->features & CANON_CAP_d))
return;
+ if (init->caps->model != 4202 || (init->xdpi <= 360))
canon_cmd(v,ESC28,0x64, 4,
(init->ydpi >> 8 ), (init->ydpi & 255),
(init->xdpi >> 8 ), (init->xdpi & 255));
-}
+ else
+ if (init->xdpi < 2880)
+ canon_cmd(v,ESC28,0x64, 4,
+ (720 >> 8), (720 & 255),
+ (720 >> 8), (720 & 255));
+ else
+ canon_cmd(v,ESC28,0x64, 4,
+ (720 >> 8), (720 & 255),
+ (2880 >> 8), (2880 & 255));
+ }
/* ESC (g -- 0x67 -- cmdSetPageMargins --:
*/
@@ -2266,8 +2408,12 @@ canon_init_setTray(const stp_vars_t *v, canon_init_t *init)
arg_6c_1|= (source & 0x0f);
if (init->pt) arg_6c_2= init->pt->media_code;
-
- canon_cmd(v,ESC28,0x6c, 2, arg_6c_1, arg_6c_2);
+ if (!strcmp("CD",init->source_str)) {
+ stp_deprintf(STP_DBG_CANON,"canon: sending special cd setTray command\n");
+ canon_cmd(v,ESC28,0x6c, 3, 0x3a,0x12,0);
+ } else {
+ canon_cmd(v,ESC28,0x6c, 2, arg_6c_1, arg_6c_2);
+ }
}
/* ESC (m -- 0x6d -- -- :
@@ -2278,7 +2424,8 @@ canon_init_setPrintMode(const stp_vars_t *v, canon_init_t *init)
unsigned char
arg_6d_1 = 0x03, /* color printhead? */
arg_6d_2 = 0x00, /* 00=color 02=b/w */
- arg_6d_3 = 0x00, /* only 01 for bjc8200 */
+ arg_6d_3 = 0x00, /* only 01 for bjc8200 and S200*/
+ /* S200:for envelope and t-shirt transfer = 03 */
arg_6d_a = 0x03, /* A4 paper */
arg_6d_b = 0x00;
@@ -2298,7 +2445,7 @@ canon_init_setPrintMode(const stp_vars_t *v, canon_init_t *init)
if (!init->printing_color)
arg_6d_2= 0x02;
- if (init->caps->model==8200)
+ if (init->caps->model==8200 || init->caps->model==4202)
arg_6d_3= 0x01;
canon_cmd(v,ESC28,0x6d,12, arg_6d_1,
@@ -2326,10 +2473,15 @@ canon_init_setPageMargins2(const stp_vars_t *v, canon_init_t *init)
if (!(init->caps->features & CANON_CAP_p))
return;
-
- canon_cmd(v,ESC28,0x70, 8,
- arg_70_1, arg_70_2, 0x00, 0x00,
- arg_70_3, arg_70_4, 0x00, 0x00);
+ if (!strcmp(init->source_str,"CD")) {
+ canon_cmd(v,ESC28,0x70, 8, 0x00, 0x2a, 0xb0, 0x00,
+ 0x00, 0x01, 0xe0, 0x00);
+ stp_deprintf(STP_DBG_CANON,"sending cd margins\n");
+ } else {
+ canon_cmd(v,ESC28,0x70, 8,
+ arg_70_1, arg_70_2, 0x00, 0x00,
+ arg_70_3, arg_70_4, 0x00, 0x00);
+ }
}
/* ESC (q -- 0x71 -- setPageID -- :
@@ -2348,10 +2500,24 @@ canon_init_setPageID(const stp_vars_t *v, canon_init_t *init)
static void
canon_init_setX72(const stp_vars_t *v, canon_init_t *init)
{
- if (!(init->caps->features & CANON_CAP_r))
+ if ( !( (init->caps->features & CANON_CAP_r)
+ || (init->caps->features & CANON_CAP_rr) ) )
return;
- canon_cmd(v,ESC28,0x72, 1, 0x61); /* whatever for - 8200 needs it */
+ if ( (init->caps->features & CANON_CAP_r)
+ || (init->caps->features & CANON_CAP_rr) )
+ canon_cmd(v,ESC28,0x72, 1, 0x61); /* whatever for - 8200/S200 need it */
+ if (init->caps->features & CANON_CAP_rr)
+ canon_cmd(v,ESC28,0x72, 3, 0x63, 1, 0); /* whatever for - S200 needs it */
+ /* probably to set the print direction of the head */
+}
+
+/* ESC (r -- 0x72 -- ??? set direction ??? -- :
+ only works if quality = 01 (S200) */
+static void
+canon_set_X72(const stp_vars_t *v, int x72arg)
+{
+ canon_cmd(v,ESC28,0x72, 3, 0x63, x72arg, 0);
}
/* ESC (t -- 0x74 -- cmdSetImage --:
@@ -2366,7 +2532,15 @@ canon_init_setImage(const stp_vars_t *v, canon_init_t *init)
if (!(init->caps->features & CANON_CAP_t))
return;
-
+ if (init->caps->model==4202) /* 1 bit per pixel (arg 4,7,10,13); */
+ /* 2 level per pixel (arg 6,9,12,15) for each color */
+ /* though we print only 1bit/pixel - but this is how */
+ /* the windows driver works */
+ {
+ canon_cmd(v,ESC28,0x74, 30, 0x80, 4, 1, 1, 0, 2, 1, 0, 2, 1, 0, 2, 1, 0, 2,\
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ return;
+ }
if(init->caps->features & CANON_CAP_extended_t)
{
unsigned char buf[30] = {0x80,0x80,0x1,};
@@ -2412,8 +2586,10 @@ canon_init_printer(const stp_vars_t *v, canon_init_t *init)
{
int mytop;
/* init printer */
-
- canon_init_resetPrinter(v,init); /* ESC [K */
+ if (init->is_first_page) {
+ canon_init_resetPrinter(v,init); /* ESC [K */
+ canon_init_setDuplex(v,init); /* ESC ($ */
+ }
canon_init_setPageMode(v,init); /* ESC (a */
canon_init_setDataCompression(v,init); /* ESC (b */
canon_init_setPageID(v,init); /* ESC (q */
@@ -2555,6 +2731,57 @@ set_color_info(const canon_cap_t * caps,const canon_variable_ink_t* ink,color_in
set_bit_info(caps,small);
}
+static void
+set_mask(unsigned char *cd_mask, int x_center, int scaled_x_where,
+ int limit, int expansion, int invert)
+{
+ int clear_val = invert ? 255 : 0;
+ int set_val = invert ? 0 : 255;
+ int bytesize = 8 / expansion;
+ int byteextra = bytesize - 1;
+ int first_x_on = x_center - scaled_x_where;
+ int first_x_off = x_center + scaled_x_where;
+ if (first_x_on < 0)
+ first_x_on = 0;
+ if (first_x_on > limit)
+ first_x_on = limit;
+ if (first_x_off < 0)
+ first_x_off = 0;
+ if (first_x_off > limit)
+ first_x_off = limit;
+ first_x_on += byteextra;
+ if (first_x_off > (first_x_on - byteextra))
+ {
+ int first_x_on_byte = first_x_on / bytesize;
+ int first_x_on_mod = expansion * (byteextra - (first_x_on % bytesize));
+ int first_x_on_extra = ((1 << first_x_on_mod) - 1) ^ clear_val;
+ int first_x_off_byte = first_x_off / bytesize;
+ int first_x_off_mod = expansion * (byteextra - (first_x_off % bytesize));
+ int first_x_off_extra = ((1 << 8) - (1 << first_x_off_mod)) ^ clear_val;
+ if (first_x_off_byte < first_x_on_byte)
+ {
+ /* This can happen, if 6 or fewer points are turned on */
+ cd_mask[first_x_on_byte] = first_x_on_extra & first_x_off_extra;
+ }
+ else
+ {
+ if (first_x_on_extra != clear_val)
+
+ cd_mask[first_x_on_byte - 1] = first_x_on_extra;
+ if (first_x_off_byte > first_x_on_byte)
+ memset(cd_mask + first_x_on_byte, set_val,
+ first_x_off_byte - first_x_on_byte);
+ if (first_x_off_extra != clear_val)
+ cd_mask[first_x_off_byte] = first_x_off_extra;
+ }
+ }
+}
+
+
+#define CD_X_OFFSET 0
+#define CD_Y_OFFSET 230
+#define CD_OUTER_RADIUS (329/2)
+#define CD_INNER_RADIUS 56
/*
* 'canon_print()' - Print an image to a CANON printer.
*/
@@ -2567,6 +2794,9 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
const char *resolution = stp_get_string_parameter(v, "Resolution");
const char *media_source = stp_get_string_parameter(v, "InputSlot");
const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
+ const char *duplex_mode =stp_get_string_parameter(v, "Duplex");
+ int page_number = stp_get_int_parameter(v, "PageNumber");
+
int printing_color = 0;
const char *ink_type = stp_get_string_parameter(v, "InkType");
int top = stp_get_top(v);
@@ -2598,7 +2828,12 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
image_width;
int res_code;
int use_6color= 0;
+ int print_cd= (media_source && (!strcmp(media_source, "CD")));
double k_upper, k_lower;
+ unsigned char *cd_mask = NULL;
+ double outer_r_sq = 0;
+ double inner_r_sq = 0;
+
stp_curve_t *lum_adjustment = NULL;
stp_curve_t *hue_adjustment = NULL;
stp_curve_t *sat_adjustment = NULL;
@@ -2677,16 +2912,25 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
internal_imageable_area(v, 0, &page_left, &page_right,
&page_bottom, &page_top);
- left -= page_left;
- top -= page_top;
- page_width = page_right - page_left;
- page_height = page_bottom - page_top;
-
+ if (print_cd) {
+ left += CD_X_OFFSET;
+ top += CD_Y_OFFSET;
+ /*page_width = CD_OUTER_RADIUS*2;
+ page_height = CD_OUTER_RADIUS*2; */
+ stp_default_media_size(v, &page_width, &page_height);
+ out_width = page_width;
+ out_height = page_height;
+ } else {
+ left -= page_left;
+ top -= page_top;
+ page_width = page_right - page_left;
+ page_height = page_bottom - page_top;
+ }
image_height = stp_image_height(image);
image_width = stp_image_width(image);
stp_default_media_size(v, &n, &page_true_height);
-
+
PUT("top ",top,72);
PUT("left ",left,72);
PUT("page_true_height",page_true_height,72);
@@ -2704,6 +2948,8 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
init.print_head = printhead;
init.colormode = colormode;
init.source_str = media_source;
+ init.duplex_str = duplex_mode;
+ init.is_first_page = (page_number == 0);
init.xdpi = xdpi;
init.ydpi = ydpi;
init.page_width = page_width;
@@ -2752,7 +2998,7 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
for (i = 0; i < 7; i++)
privdata.cols[i] = NULL;
- if(xdpi==1440){
+ if((xdpi == 1440) && (model != 4202)){
privdata.delay[0] = 0;
privdata.delay[1] = 112;
privdata.delay[2] = 224;
@@ -2762,6 +3008,16 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
privdata.delay[6] = 336;
privdata.delay_max = 336;
stp_deprintf(STP_DBG_CANON,"canon: delay on!\n");
+ } else if (model ==4202 ){
+ privdata.delay[0]= 0;
+ privdata.delay[1]= 0x30;
+ privdata.delay[2]= 0x50;
+ privdata.delay[3]= 0x70;
+ privdata.delay[4]= 0;
+ privdata.delay[5]= 0;
+ privdata.delay[6]= 0;
+ privdata.delay_max= 0x70;
+ stp_deprintf(STP_DBG_CANON,"canon: delay for S200 on!\n");
} else {
for (i = 0; i < 7; i++)
privdata.delay[i] = 0;
@@ -2788,7 +3044,8 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
}
}
- privdata.buf_length = length * max_bits;
+ /* buffer length + 1 extra byte for offset data that might get added in canon_write */
+ privdata.buf_length = length * max_bits + 1;
privdata.length = length;
privdata.left = left;
privdata.bits = bits;
@@ -2922,6 +3179,91 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
(v, STP_ECOLOR_K, 0,
get_double_param(v, "BlackDensity") * get_double_param(v, "Density"));
+ /* initialize weaving for S200 for resolutions > 360dpi */
+ if ( (init.caps->features & CANON_CAP_WEAVE) && (xdpi > 360) )
+ {
+ privdata.stepper_ydpi = 720;
+ privdata.nozzle_ydpi = 360;
+ if (xdpi == 2880)
+ privdata.physical_xdpi = 2880;
+ else
+ privdata.physical_xdpi = 720;
+
+ stp_deprintf(STP_DBG_CANON,"canon: adjust leftskip: old=%d,\n", privdata.left);
+ privdata.left = (int)( (float)privdata.left * (float)privdata.physical_xdpi / (float)xdpi ); /* adjust left margin */
+ stp_deprintf(STP_DBG_CANON,"canon: adjust leftskip: new=%d,\n", privdata.left);
+
+ privdata.ncolors = 4;
+ privdata.head_offset = stp_zalloc(sizeof(int) * privdata.ncolors);
+ memset(privdata.head_offset, 0, sizeof(privdata.head_offset));
+
+ if ( colormode == COLOR_MONOCHROME )
+ privdata.nozzles = 64; /* black nozzles */
+ else
+ privdata.nozzles = 24; /* color nozzles */
+ if (colormode == COLOR_MONOCHROME)
+ {
+ privdata.ncolors = 1;
+ privdata.head_offset[0] = 0; /* K starts at 0 */
+ privdata.head_offset[1] = 0 ;/* how far C starts after K */
+ privdata.head_offset[2] = 0;/* how far M starts after K */
+ privdata.head_offset[3] = 0;/* how far Y starts after K */
+ top += 11;
+ }
+ else if (colormode == COLOR_CMYK)
+ {
+ privdata.head_offset[0] = 0; /* K starts at 0 */
+ privdata.head_offset[1] = 144 ;/* how far C starts after K */
+ privdata.head_offset[2] = 144 + 64;/* how far M starts after K */
+ privdata.head_offset[3] = 144 + 64 + 64;/* how far Y starts after K */
+ top += 5;
+ }
+ else /* colormode == CMY */
+ {
+ privdata.head_offset[0] = 0; /* K starts at 0 */
+ privdata.head_offset[1] = 0 ;/* how far C starts after K */
+ privdata.head_offset[2] = 64;/* how far M starts after K */
+ privdata.head_offset[3] = 128;/* how far Y starts after K */
+ top += 18;
+ }
+
+ privdata.nozzle_separation = privdata.stepper_ydpi / privdata.nozzle_ydpi;
+ privdata.horizontal_passes = xdpi / privdata.physical_xdpi;
+ privdata.vertical_passes = 1;
+ privdata.vertical_oversample = privdata.ydpi / privdata.stepper_ydpi;
+ privdata.bidirectional = 1; /* 1: bidirectional; 0: unidirectional printing */
+ privdata.direction = 1;
+ stp_allocate_component_data(v, "Driver", NULL, NULL, &privdata);
+ stp_deprintf(STP_DBG_CANON,"canon: initializing weaving: nozzles=%d, nozzle_separation=%d,\n"
+ "horizontal_passes=%d, vertical_passes=%d,vertical_oversample=%d,\n"
+ "ncolors=%d, out_width=%d, out_height=%d\n"
+ "weave_top=%d, weave_page_height=%d \n"
+ "head_offset=[%d,%d,%d,%d] \n",
+ privdata.nozzles, privdata.nozzle_separation,
+ privdata.horizontal_passes, privdata.vertical_passes,
+ privdata.vertical_oversample, privdata.ncolors,
+ out_width, out_height,
+ top * privdata.stepper_ydpi / 72, page_height * privdata.stepper_ydpi / 72,
+ privdata.head_offset[0],privdata.head_offset[1],
+ privdata.head_offset[2],privdata.head_offset[3]);
+
+ stp_initialize_weave(v, privdata.nozzles, privdata.nozzle_separation,
+ privdata.horizontal_passes, privdata.vertical_passes,
+ privdata.vertical_oversample, privdata.ncolors,
+ 1,
+ out_width, out_height,
+ top * privdata.stepper_ydpi / 72,
+ page_height * privdata.stepper_ydpi / 72,
+ privdata.head_offset,
+ STP_WEAVE_ZIGZAG,
+ canon_flush_pass,
+ stp_fill_uncompressed,
+ stp_pack_uncompressed,
+ stp_compute_uncompressed_linewidth);
+ privdata.last_pass_offset = 0;
+ }
+
+
errdiv = image_height / out_height;
errmod = image_height % out_height;
errval = 0;
@@ -2960,6 +3302,11 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
stp_allocate_component_data(v, "Driver", NULL, NULL, &privdata);
privdata.emptylines = 0;
+ if (print_cd) {
+ cd_mask = stp_malloc(1 + (out_width + 7) / 8);
+ outer_r_sq = (double)CD_OUTER_RADIUS * (double)CD_OUTER_RADIUS;
+ inner_r_sq = (double)CD_INNER_RADIUS * (double)CD_INNER_RADIUS;
+ }
for (y = 0; y < out_height; y ++)
{
int duplicate_line = 1;
@@ -2974,9 +3321,36 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
break;
}
}
-
- stp_dither(v, y, duplicate_line, zero_mask, NULL);
- canon_printfunc(v);
+ if (print_cd)
+ {
+ int x_center = CD_OUTER_RADIUS * xdpi / 72;
+ int y_distance_from_center =
+ CD_OUTER_RADIUS - (y * 72 / ydpi);
+ if (y_distance_from_center < 0)
+ y_distance_from_center = -y_distance_from_center;
+ memset(cd_mask, 0, (out_width + 7) / 8);
+ if (y_distance_from_center < CD_OUTER_RADIUS)
+ {
+ double y_sq = (double) y_distance_from_center *
+ (double) y_distance_from_center;
+ int x_where = sqrt(outer_r_sq - y_sq) + .5;
+ int scaled_x_where = x_where * xdpi / 72;
+ set_mask(cd_mask, x_center, scaled_x_where,
+ out_width, 1, 0);
+ if (y_distance_from_center < CD_INNER_RADIUS)
+ {
+ x_where = sqrt(inner_r_sq - y_sq) + .5;
+ scaled_x_where = x_where * ydpi / 72;
+ set_mask(cd_mask, x_center, scaled_x_where,
+ out_width, 1, 1);
+ }
+ }
+ }
+ stp_dither(v, y, duplicate_line, zero_mask, cd_mask);
+ if ( (init.caps->features & CANON_CAP_WEAVE) && (xdpi > 360) )
+ stp_write_weave(v, privdata.cols);
+ else
+ canon_printfunc(v);
errval += errmod;
errline += errdiv;
if (errval >= out_height)
@@ -2986,6 +3360,14 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
}
}
+ if ( (init.caps->features & CANON_CAP_WEAVE) && (xdpi > 360) )
+ {
+ stp_flush_all(v);
+ canon_advance_paper(v, 5);
+ }
+ else
+ {
+
/*
* Flush delayed buffers...
*/
@@ -3001,7 +3383,7 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
privdata.delay[i]);
}
}
-
+ }
stp_image_conclude(image);
/*
@@ -3011,6 +3393,9 @@ canon_do_print(stp_vars_t *v, stp_image_t *image)
for (i = 0; i < 7; i++)
if (privdata.cols[i])
stp_free(privdata.cols[i]);
+
+ if(cd_mask)
+ stp_free(cd_mask);
canon_deinit_printer(v, &init);
return status;
@@ -3247,22 +3632,31 @@ canon_write(stp_vars_t *v, /* I - Print file or command */
if (line[0] == 0 && memcmp(line, line + 1, length - 1) == 0)
return 0;
+ offset2 = offset / 8;
+ bitoffset = offset % 8;
+
/* fold lsb/msb pairs if drop modulation is active */
if (bits==2) {
+ int pixels_per_byte = 4;
+ if((caps->features & CANON_CAP_5pixelin1byte) && (pd->color_info[coloridx].level == 3))
+ pixels_per_byte = 5;
stp_fold(line,length,in_fold);
in_ptr= in_fold;
length= (length*8/4); /* 4 pixels in 8bit */
- offset= (offset*8/4); /* 4 pixels in 8bit */
+ /* calculate the number of compressed bytes that can be sent directly */
+ offset2 = offset / pixels_per_byte;
+ /* calculate the number of (uncompressed) bits that have to be added to the raster data */
+ bitoffset = (offset % pixels_per_byte) * 2;
}
if (bits==3) {
memset(in_fold,0,length);
canon_fold_3bit(line,length,in_fold);
in_ptr= in_fold;
length= (length*8)/3;
- offset= (offset/3)*8;
+ offset2 = offset/3;
#if 0
switch(offset%3){
case 0: offset= (offset/3)*8; break;
@@ -3270,12 +3664,11 @@ canon_write(stp_vars_t *v, /* I - Print file or command */
case 2: offset= (offset/3)*8/*+5 CAREFUL! CANNOT SHIFT _AFTER_ RECODING!!*/; break;
}
#endif
+ bitoffset= 0;
}
/* pack left border rounded to multiples of 8 dots */
comp_data= comp_buf;
- offset2= offset/8;
- bitoffset= offset%8;
while (offset2>0) {
unsigned char toffset = offset2 > 128 ? 128 : offset2;
comp_data[0] = 1 - toffset;
@@ -3285,7 +3678,15 @@ canon_write(stp_vars_t *v, /* I - Print file or command */
}
if (bitoffset) {
if (bitoffset<8)
- canon_shift_buffer(in_ptr,length,bitoffset);
+ {
+ in_ptr[ length++ ] = 0;
+ canon_shift_buffer(in_ptr,length,bitoffset);
+ }
+ else if (bitoffset == 8)
+ {
+ memmove(in_ptr + 1,in_ptr,length++);
+ in_ptr[0] = 0;
+ }
else
stp_deprintf(STP_DBG_CANON,"SEVERE BUG IN print-canon.c::canon_write() "
"bitoffset=%d!!\n",bitoffset);
@@ -3349,6 +3750,98 @@ canon_write_line(stp_vars_t *v)
pd->emptylines += 1;
}
+static void
+canon_advance_paper(stp_vars_t *v, int advance)
+{
+ if ( advance > 0 )
+ {
+ int a0, a1, a2, a3;
+ stp_deprintf(STP_DBG_CANON," --advance paper %d\n", advance);
+ a0 = advance & 0xff;
+ a1 = (advance >> 8) & 0xff;
+ a2 = (advance >> 16) & 0xff;
+ a3 = (advance >> 24) & 0xff;
+ stp_zprintf(v, "\033(e%c%c%c%c%c%c", 4, 0, a3, a2, a1, a0);
+ }
+}
+
+static void
+canon_flush_pass(stp_vars_t *v, int passno, int vertical_subpass)
+{
+ stp_lineoff_t *lineoffs = stp_get_lineoffsets_by_pass(v, passno);
+ stp_lineactive_t *lineactive = stp_get_lineactive_by_pass(v, passno);
+ const stp_linebufs_t *bufs = stp_get_linebases_by_pass(v, passno);
+ stp_pass_t *pass = stp_get_pass_by_pass(v, passno);
+ stp_linecount_t *linecount = stp_get_linecount_by_pass(v, passno);
+ canon_privdata_t *pd = (canon_privdata_t *) stp_get_component_data(v, "Driver");
+ int papershift = (pass->logicalpassstart - pd->last_pass_offset);
+
+ int color, line, written = 0, linelength = 0, lines = 0;
+ int idx[4]={3, 0, 1, 2}; /* color numbering is different between canon_write and weaving */
+
+ stp_deprintf(STP_DBG_CANON,"canon_flush_pass: ----pass=%d,---- \n", passno);
+ (pd->emptylines) = 0;
+
+ for ( color = 0; color < pd->ncolors; color++ ) /* find max. linecount */
+ {
+ if ( linecount[0].v[color] > lines )
+ lines = linecount[0].v[color];
+ }
+
+ for ( line = 0; line < lines; line++ ) /* go through each nozzle f that pass */
+ {
+ stp_deprintf(STP_DBG_CANON," --line=%d\n", line);
+
+ if ( written > 0 )
+ canon_cmd(v,ESC28,0x65, 2, 0, 1); /* go to next nozzle*/
+ /* if there was printed some data */
+
+ written = 0;
+ for ( color = 0; color < pd->ncolors; color++ )
+ {
+ if ( line < linecount[0].v[color] ) /* try only existing lines */
+ {
+ if ( lineactive[0].v[color] > 0 )
+ {
+ linelength = lineoffs[0].v[color] / linecount[0].v[color];
+/* stp_deprintf(STP_DBG_CANON,"canon_flush_pass: linelength=%d, bufs[0].v[color]=%p,"
+ "bufs[0].v[color]+line * linelength=%p, empty=%d \n", linelength, bufs[0].v[color],
+ bufs[0].v[color] + line * linelength, (pd->emptylines));
+*/
+ if ( pass->logicalpassstart - pd->last_pass_offset > 0 )
+ {
+ canon_advance_paper(v, papershift);
+ pd->last_pass_offset = pass->logicalpassstart;
+ if (pd->bidirectional)
+ {
+ pd->direction = (pd->direction +1) & 1;
+ canon_set_X72(v, pd->direction);
+ stp_deprintf(STP_DBG_CANON," --set direction %d\n", pd->direction);
+ }
+ }
+
+ written += canon_write(v, pd->caps,
+ (unsigned char *)(bufs[0].v[color] + line * linelength),
+ linelength, idx[color], pd->ydpi,
+ &(pd->emptylines), pd->out_width,
+ pd->left, pd->bits);
+ if (written) stp_deprintf(STP_DBG_CANON," --written color %d,\n", color);
+
+ }
+ }
+ }
+
+ if ( written == 0 ) /* count unused nozzles */
+ (pd->emptylines) += 1;
+ }
+
+ for ( color = 0; color < pd->ncolors; color++ )
+ {
+ lineoffs[0].v[color] = 0;
+ linecount[0].v[color] = 0;
+ }
+ stp_deprintf(STP_DBG_CANON," --ended-- with empty=%d \n", (pd->emptylines));
+}
static stp_family_t print_canon_module_data =
{
diff --git a/src/main/print-color.c b/src/main/print-color.c
index b6ebb71..c7c6574 100644
--- a/src/main/print-color.c
+++ b/src/main/print-color.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-color.c,v 1.131 2005/07/04 00:23:54 rlk Exp $"
+ * "$Id: print-color.c,v 1.132 2005/09/17 21:54:33 rlk Exp $"
*
* Gutenprint color management module - traditional Gutenprint algorithm.
*
@@ -156,6 +156,7 @@ typedef struct
double defval;
unsigned channel_mask;
int color_only;
+ int is_rgb;
} float_param_t;
#define RAW_GAMMA_CHANNEL(channel) \
@@ -165,7 +166,7 @@ typedef struct
N_("Gamma for raw channel " #channel), \
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT, \
STP_PARAMETER_LEVEL_INTERNAL, 0, 1, channel, 1, 0 \
- }, 0.1, 4.0, 1.0, CMASK_RAW, 0 \
+ }, 0.1, 4.0, 1.0, CMASK_RAW, 0, -1 \
}
static const float_param_t float_parameters[] =
@@ -176,7 +177,7 @@ static const float_param_t float_parameters[] =
N_("Color correction to be applied"),
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED, 1, 1, -1, 1, 0
- }, 0.0, 0.0, 0.0, CMASK_EVERY, 0
+ }, 0.0, 0.0, 0.0, CMASK_EVERY, 0, -1
},
{
{
@@ -184,7 +185,7 @@ static const float_param_t float_parameters[] =
N_("Bit depth per channel"),
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- }, 0.0, 0.0, 0.0, CMASK_EVERY, 0
+ }, 0.0, 0.0, 0.0, CMASK_EVERY, 0, -1
},
{
{
@@ -192,7 +193,7 @@ static const float_param_t float_parameters[] =
N_("Input image type"),
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- }, 0.0, 0.0, 0.0, CMASK_EVERY, 0
+ }, 0.0, 0.0, 0.0, CMASK_EVERY, 0, -1
},
{
{
@@ -200,7 +201,7 @@ static const float_param_t float_parameters[] =
N_("Output image type"),
STP_PARAMETER_TYPE_STRING_LIST, STP_PARAMETER_CLASS_CORE,
STP_PARAMETER_LEVEL_INTERNAL, 1, 1, -1, 1, 0
- }, 0.0, 0.0, 0.0, CMASK_EVERY, 0
+ }, 0.0, 0.0, 0.0, CMASK_EVERY, 0, -1
},
{
{
@@ -208,7 +209,15 @@ static const float_param_t float_parameters[] =
N_("Raw Channels"),
STP_PARAMETER_TYPE_INT, STP_PARAMETER_CLASS_CORE,
STP_PARAMETER_LEVEL_INTERNAL, 1, 1, -1, 1, 0
- }, 1.0, STP_CHANNEL_LIMIT, 1.0, CMASK_EVERY, 0
+ }, 1.0, STP_CHANNEL_LIMIT, 1.0, CMASK_EVERY, 0, -1
+ },
+ {
+ {
+ "SimpleGamma", N_("SimpleGamma"), N_("Gamma"),
+ N_("Do not correct for screen gamma"),
+ STP_PARAMETER_TYPE_BOOLEAN, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_INTERNAL, 0, 1, -1, 1, 0
+ }, 0.0, 1.0, 0.0, CMASK_EVERY, 0, -1
},
{
{
@@ -216,7 +225,7 @@ static const float_param_t float_parameters[] =
N_("Brightness of the print"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- }, 0.0, 2.0, 1.0, CMASK_ALL, 0
+ }, 0.0, 2.0, 1.0, CMASK_ALL, 0, -1
},
{
{
@@ -224,7 +233,7 @@ static const float_param_t float_parameters[] =
N_("Contrast of the print (0 is solid gray)"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- }, 0.0, 4.0, 1.0, CMASK_ALL, 0
+ }, 0.0, 4.0, 1.0, CMASK_ALL, 0, -1
},
{
{
@@ -232,7 +241,7 @@ static const float_param_t float_parameters[] =
N_("Use linear vs. fixed end point contrast adjustment"),
STP_PARAMETER_TYPE_BOOLEAN, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED3, 1, 1, -1, 1, 0
- }, 0.0, 0.0, 0.0, CMASK_ALL, 0
+ }, 0.0, 0.0, 0.0, CMASK_ALL, 0, -1
},
{
{
@@ -242,7 +251,7 @@ static const float_param_t float_parameters[] =
"values will produce a generally darker print. "),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, -1, 1, 0
- }, 0.1, 4.0, 1.0, CMASK_EVERY, 0
+ }, 0.1, 4.0, 1.0, CMASK_EVERY, 0, -1
},
{
{
@@ -250,7 +259,7 @@ static const float_param_t float_parameters[] =
N_("Gamma value assumed by application"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_INTERNAL, 0, 1, -1, 1, 0
- }, 0.1, 4.0, 1.0, CMASK_EVERY, 0
+ }, 0.1, 4.0, 1.0, CMASK_EVERY, 0, -1
},
{
{
@@ -258,7 +267,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the cyan 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_C, 1
+ }, 0.0, 4.0, 1.0, CMASK_C, 1, 0
},
{
{
@@ -266,7 +275,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the magenta gamma"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 2, 1, 0
- }, 0.0, 4.0, 1.0, CMASK_M, 1
+ }, 0.0, 4.0, 1.0, CMASK_M, 1, 0
},
{
{
@@ -274,7 +283,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the yellow gamma"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 3, 1, 0
- }, 0.0, 4.0, 1.0, CMASK_Y, 1
+ }, 0.0, 4.0, 1.0, CMASK_Y, 1, 0
},
{
{
@@ -282,7 +291,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, 1.0, 1.0, CMASK_R, 1
+ }, 0.0, 4.0, 1.0, CMASK_C, 1, 1
},
{
{
@@ -290,7 +299,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the green gamma"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 2, 1, 0
- }, 0.0, 4.0, 1.0, CMASK_G, 1
+ }, 0.0, 4.0, 1.0, CMASK_M, 1, 1
},
{
{
@@ -298,7 +307,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the blue gamma"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 3, 1, 0
- }, 0.0, 4.0, 1.0, CMASK_B, 1
+ }, 0.0, 4.0, 1.0, CMASK_Y, 1, 1
},
{
{
@@ -306,7 +315,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the black gamma"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED1, 0, 1, 3, 1, 0
- }, 0.0, 4.0, 1.0, CMASK_K, 1
+ }, 0.0, 4.0, 1.0, CMASK_K, 1, 0
},
{
{
@@ -314,7 +323,7 @@ static const float_param_t float_parameters[] =
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
+ }, 0.0, 1.0, 1.0, CMASK_C, 1, 0
},
{
{
@@ -322,7 +331,7 @@ static const float_param_t float_parameters[] =
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
+ }, 0.0, 1.0, 1.0, CMASK_M, 1, 0
},
{
{
@@ -330,7 +339,7 @@ static const float_param_t float_parameters[] =
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
+ }, 0.0, 1.0, 1.0, CMASK_Y, 1, 0
},
{
{
@@ -340,7 +349,7 @@ static const float_param_t float_parameters[] =
"using color and black inks"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_BASIC, 1, 1, -1, 1, 0
- }, 0.0, 9.0, 1.0, CMASK_CMY | CMASK_RGB, 1
+ }, 0.0, 9.0, 1.0, CMASK_CMY | CMASK_RGB, 1, 0
},
/* Need to think this through a bit more -- rlk 20030712 */
{
@@ -349,7 +358,7 @@ static const float_param_t float_parameters[] =
N_("Limit the total ink printed to the page"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 0, 0
- }, 0.0, STP_CHANNEL_LIMIT, STP_CHANNEL_LIMIT, CMASK_CMY, 0
+ }, 0.0, STP_CHANNEL_LIMIT, STP_CHANNEL_LIMIT, CMASK_CMY, 0, -1
},
{
{
@@ -357,7 +366,7 @@ static const float_param_t float_parameters[] =
N_("Adjust the gray component transition rate"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, 0, 1, 0
- }, 0.0, 1.0, 1.0, CMASK_K, 1
+ }, 0.0, 1.0, 1.0, CMASK_K, 1, 0
},
{
{
@@ -365,7 +374,7 @@ static const float_param_t float_parameters[] =
N_("Lower bound of gray component reduction"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, 0, 1, 0
- }, 0.0, 1.0, 0.2, CMASK_K, 1
+ }, 0.0, 1.0, 0.2, CMASK_K, 1, 0
},
{
{
@@ -373,7 +382,7 @@ static const float_param_t float_parameters[] =
N_("Upper bound of gray component reduction"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, 0, 1, 0
- }, 0.0, 5.0, 0.5, CMASK_K, 1
+ }, 0.0, 5.0, 0.5, CMASK_K, 1, 0
},
RAW_GAMMA_CHANNEL(0),
RAW_GAMMA_CHANNEL(1),
@@ -419,6 +428,7 @@ typedef struct
unsigned channel_mask;
int hsl_only;
int color_only;
+ int is_rgb;
} curve_param_t;
static int standard_curves_initialized = 0;
@@ -437,7 +447,7 @@ static stp_curve_t *gcr_curve_bounds = NULL;
N_("Output Curves"), N_("Curve for raw channel " #channel), \
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT, \
STP_PARAMETER_LEVEL_INTERNAL, 0, 1, channel, 1, 0 \
- }, &color_curve_bounds, CMASK_RAW, 0, 0 \
+ }, &color_curve_bounds, CMASK_RAW, 0, 0, -1 \
}
static curve_param_t curve_parameters[] =
@@ -448,7 +458,7 @@ static curve_param_t curve_parameters[] =
N_("Cyan curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 1, 1, 0
- }, &color_curve_bounds, CMASK_C, 0, 1
+ }, &color_curve_bounds, CMASK_C, 0, 1, 0
},
{
{
@@ -456,7 +466,7 @@ static curve_param_t curve_parameters[] =
N_("Magenta curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 2, 1, 0
- }, &color_curve_bounds, CMASK_M, 0, 1
+ }, &color_curve_bounds, CMASK_M, 0, 1, 0
},
{
{
@@ -464,7 +474,7 @@ static curve_param_t curve_parameters[] =
N_("Yellow curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 3, 1, 0
- }, &color_curve_bounds, CMASK_Y, 0, 1
+ }, &color_curve_bounds, CMASK_Y, 0, 1, 0
},
{
{
@@ -472,7 +482,7 @@ static curve_param_t curve_parameters[] =
N_("Black curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 0, 1, 0
- }, &color_curve_bounds, CMASK_K, 0, 0
+ }, &color_curve_bounds, CMASK_K, 0, 0, 0
},
{
{
@@ -480,23 +490,23 @@ static curve_param_t curve_parameters[] =
N_("Red curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 1, 1, 0
- }, &color_curve_bounds, CMASK_R, 0, 1
+ }, &color_curve_bounds, CMASK_C, 0, 1, 1
},
{
{
"GreenCurve", N_("Green Curve"), N_("Output Curves"),
N_("Green curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
- STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 1, 1, 0
- }, &color_curve_bounds, CMASK_G, 0, 1
+ STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 2, 1, 0
+ }, &color_curve_bounds, CMASK_M, 0, 1, 1
},
{
{
"BlueCurve", N_("Blue Curve"), N_("Output Curves"),
N_("Blue curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
- STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 1, 1, 0
- }, &color_curve_bounds, CMASK_B, 0, 1
+ STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 3, 1, 0
+ }, &color_curve_bounds, CMASK_Y, 0, 1, 1
},
{
{
@@ -504,7 +514,7 @@ static curve_param_t curve_parameters[] =
N_("White curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED2, 0, 1, 1, 1, 0
- }, &color_curve_bounds, CMASK_W, 0, 0
+ }, &color_curve_bounds, CMASK_W, 0, 0, 1
},
{
{
@@ -512,7 +522,7 @@ static curve_param_t curve_parameters[] =
N_("Hue adjustment curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED3, 0, 1, -1, 1, 0
- }, &hue_map_bounds, CMASK_CMY | CMASK_RGB, 1, 1
+ }, &hue_map_bounds, CMASK_CMY | CMASK_RGB, 1, 1, -1
},
{
{
@@ -520,7 +530,7 @@ static curve_param_t curve_parameters[] =
N_("Saturation adjustment curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED3, 0, 1, -1, 1, 0
- }, &sat_map_bounds, CMASK_CMY | CMASK_RGB, 1, 1
+ }, &sat_map_bounds, CMASK_CMY | CMASK_RGB, 1, 1, -1
},
{
{
@@ -528,7 +538,7 @@ static curve_param_t curve_parameters[] =
N_("Luminosity adjustment curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED3, 0, 1, -1, 1, 0
- }, &lum_map_bounds, CMASK_CMY | CMASK_RGB, 1, 1
+ }, &lum_map_bounds, CMASK_CMY | CMASK_RGB, 1, 1, -1
},
{
{
@@ -536,7 +546,7 @@ static curve_param_t curve_parameters[] =
N_("Gray component reduction curve"),
STP_PARAMETER_TYPE_CURVE, STP_PARAMETER_CLASS_OUTPUT,
STP_PARAMETER_LEVEL_ADVANCED3, 0, 1, 0, 1, 0
- }, &gcr_curve_bounds, CMASK_K, 0, 1
+ }, &gcr_curve_bounds, CMASK_K, 0, 1, -1
},
RAW_CURVE_CHANNEL(0),
RAW_CURVE_CHANNEL(1),
@@ -681,6 +691,7 @@ allocate_lut(void)
ret->app_gamma = 1.0;
ret->contrast = 1.0;
ret->brightness = 1.0;
+ ret->simple_gamma_correction = 0;
return ret;
}
@@ -721,6 +732,7 @@ copy_lut(void *vlut)
dest->screen_gamma = src->screen_gamma;
dest->contrast = src->contrast;
dest->brightness = src->brightness;
+ dest->simple_gamma_correction = src->simple_gamma_correction;
dest->linear_contrast_adjustment = src->linear_contrast_adjustment;
stp_curve_cache_copy(&(dest->hue_map), &(src->hue_map));
stp_curve_cache_copy(&(dest->lum_map), &(src->lum_map));
@@ -818,7 +830,7 @@ compute_gcr_curve(const stp_vars_t *vars)
}
static void
-initialize_gcr_curve(const stp_vars_t *vars)
+initialize_gcr_curve(stp_vars_t *vars)
{
lut_t *lut = (lut_t *)(stp_get_component_data(vars, "Color"));
stp_curve_t *curve = NULL;
@@ -840,7 +852,7 @@ initialize_gcr_curve(const stp_vars_t *vars)
}
else
curve = compute_gcr_curve(vars);
- stp_channel_set_gcr_curve((stp_vars_t *)vars, curve);
+ stp_channel_set_gcr_curve(vars, curve);
if (curve)
stp_curve_destroy(curve);
}
@@ -1085,6 +1097,33 @@ compute_a_curve_fast(lut_t *lut, int channel)
stp_free(tmp);
}
+static void
+compute_a_curve_simple(lut_t *lut, int channel)
+{
+ double *tmp;
+ stp_curve_t *curve = stp_curve_cache_get_curve(&(lut->channel_curves[channel]));
+ int i;
+ int isteps = lut->steps;
+ double gamma = 1.0 / (lut->gamma_values[channel] * lut->print_gamma);
+ if (isteps > 256)
+ isteps = 256;
+ tmp = stp_malloc(sizeof(double) * lut->steps);
+ for (i = 0; i < isteps; i++)
+ {
+ double pixel = (double) i / (double) (isteps - 1);
+ if (lut->input_color_description->color_model == COLOR_BLACK)
+ pixel = 1.0 - pixel;
+ pixel = pow(pixel, gamma);
+ if (lut->output_color_description->color_model == COLOR_BLACK)
+ pixel = 1.0 - pixel;
+ tmp[i] = floor((65535.0 * pixel) + 0.5);
+ }
+ stp_curve_set_data(curve, isteps, tmp);
+ if (isteps != lut->steps)
+ stp_curve_resample(curve, lut->steps);
+ stp_free(tmp);
+}
+
/*
* If the input and output color spaces both have a particular channel,
* we want to use the general algorithm. If not (i. e. we have to
@@ -1095,6 +1134,8 @@ compute_a_curve(lut_t *lut, int channel)
{
if (channel_is_synthesized(lut, channel))
compute_a_curve_fast(lut, channel);
+ else if (lut->simple_gamma_correction)
+ compute_a_curve_simple(lut, channel);
else
compute_a_curve_full(lut, channel);
}
@@ -1143,7 +1184,8 @@ compute_one_lut(lut_t *lut, int i)
STP_CURVE_BOUNDS_RESCALE);
if (stp_curve_is_piecewise(curve))
stp_curve_resample(curve, lut->steps);
- invert_curve(curve, invert_output);
+ if (lut->invert_output)
+ invert_curve(curve, invert_output);
stp_curve_resample(curve, lut->steps);
}
else
@@ -1201,6 +1243,7 @@ stpi_compute_lut(stp_vars_t *v)
lut->app_gamma = 1.0;
lut->contrast = 1.0;
lut->brightness = 1.0;
+ lut->simple_gamma_correction = 0;
if (stp_check_boolean_parameter(v, "LinearContrast", STP_PARAMETER_DEFAULTED))
lut->linear_contrast_adjustment =
@@ -1214,6 +1257,8 @@ stpi_compute_lut(stp_vars_t *v)
if (stp_check_float_parameter(v, "AppGamma", STP_PARAMETER_ACTIVE))
lut->app_gamma = stp_get_float_parameter(v, "AppGamma");
+ if (stp_check_boolean_parameter(v, "SimpleGamma", STP_PARAMETER_ACTIVE))
+ lut->simple_gamma_correction = stp_get_boolean_parameter(v, "SimpleGamma");
lut->screen_gamma = lut->app_gamma / 4.0; /* "Empirical" */
curve = stp_curve_create_copy(color_curve_bounds);
stp_curve_rescale(curve, 65535.0, STP_CURVE_COMPOSE_MULTIPLY,
@@ -1448,6 +1493,11 @@ stpi_color_traditional_describe_parameter(const stp_vars_t *v,
get_color_description(stp_describe_output(v));
if (color_description &&
(param->channel_mask & color_description->channels) &&
+ (param->is_rgb < 0 ||
+ (param->is_rgb == 0 &&
+ color_description->color_model == COLOR_BLACK) ||
+ (param->is_rgb == 1 &&
+ color_description->color_model == COLOR_WHITE)) &&
param->channel_mask != CMASK_RAW)
description->is_active = 1;
else
@@ -1570,6 +1620,11 @@ stpi_color_traditional_describe_parameter(const stp_vars_t *v,
const color_description_t *color_description =
get_color_description(stp_describe_output(v));
if (color_description &&
+ (param->is_rgb < 0 ||
+ (param->is_rgb == 0 &&
+ color_description->color_model == COLOR_BLACK) ||
+ (param->is_rgb == 1 &&
+ color_description->color_model == COLOR_WHITE)) &&
(param->channel_mask & color_description->channels))
description->is_active = 1;
else
diff --git a/src/main/print-dither-matrices.c b/src/main/print-dither-matrices.c
index a301fb0..b7fa06a 100644
--- a/src/main/print-dither-matrices.c
+++ b/src/main/print-dither-matrices.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-dither-matrices.c,v 1.34 2004/09/17 18:38:22 rleigh Exp $"
+ * "$Id: print-dither-matrices.c,v 1.35 2005/10/23 19:43:14 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -171,19 +171,27 @@ stp_dither_matrix_init_from_dither_array(stp_dither_matrix_impl_t *mat,
stp_array_get_size(array, &x_size, &y_size);
vec = stp_sequence_get_ushort_data(seq, &count);
- mat->base = x_size;;
+ mat->base = x_size;
mat->exp = 1;
- mat->x_size = x_size;
- mat->y_size = y_size;
+ if (transpose)
+ {
+ mat->x_size = y_size;
+ mat->y_size = x_size;
+ }
+ else
+ {
+ mat->x_size = x_size;
+ mat->y_size = y_size;
+ }
mat->total_size = mat->x_size * mat->y_size;
mat->matrix = stp_malloc(sizeof(unsigned) * mat->x_size * mat->y_size);
- for (x = 0; x < mat->x_size; x++)
- for (y = 0; y < mat->y_size; y++)
+ for (x = 0; x < x_size; x++)
+ for (y = 0; y < y_size; y++)
{
if (transpose)
- mat->matrix[x + y * mat->x_size] = vec[y + x * mat->y_size];
+ mat->matrix[y + x * y_size] = vec[x + y * x_size];
else
- mat->matrix[x + y * mat->x_size] = vec[x + y * mat->x_size];
+ mat->matrix[x + y * x_size] = vec[x + y * x_size];
}
mat->last_x = mat->last_x_mod = 0;
mat->last_y = mat->last_y_mod = 0;
diff --git a/src/main/print-escp2-data.c b/src/main/print-escp2-data.c
index 7d7191e..ac20bc4 100644
--- a/src/main/print-escp2-data.c
+++ b/src/main/print-escp2-data.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2-data.c,v 1.178 2005/08/14 01:27:44 rlk Exp $"
+ * "$Id: print-escp2-data.c,v 1.181 2005/10/29 21:31:19 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -81,6 +81,9 @@ static const escp2_dot_size_t c2pl_dotsizes =
static const escp2_dot_size_t c1_8pl_dotsizes =
{ 0x10, 0x10, 0x10, 0x10, 0x11, 0x12, 0x12, 0x13, 0x13 };
+static const escp2_dot_size_t p3_5pl_dotsizes =
+{ 0x10, 0x10, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12 };
+
static const escp2_dot_size_t sc440_dotsizes =
{ 3, 3, 2, 1, -1, -1, -1, -1, -1 };
@@ -211,7 +214,7 @@ static const escp2_base_resolutions_t pro_base_res =
* 8: 5760x2880
*/
-/* 0 1 2 3 4 5 6 7 */
+/* 0 1 2 3 4 5 6 7 8 */
static const escp2_densities_t g1_densities =
{ 2.6, 1.3, 1.3, 0.568, 0.0, 0.0, 0.0, 0.0, 0.0 };
@@ -241,11 +244,14 @@ static const escp2_densities_t c3pl_densities =
{ 2.6, 1.3, 0.65, 0.730, 0.7, 0.91, 0.455, 0.0, 0.0 };
static const escp2_densities_t p3pl_densities =
-{ 4.0, 2.0, 1.00, 0.815, 0.788, 0.821, 0.680, 0.340, 0.0 };
+{ 4.0, 2.0, 1.00, 0.679, 0.657, 0.684, 0.566, 0.283, 0.0 };
static const escp2_densities_t p1_5pl_densities =
{ 2.8, 1.4, 1.00, 1.000, 0.869, 0.942, 0.471, 0.500, 0.530 };
+static const escp2_densities_t p3_5pl_densities =
+{ 2.8, 1.4, 1.77, 0.886, 0.443, 0.221, 0.240, 0.293, 0.146 };
+
static const escp2_densities_t c2pl_densities =
{ 2.0, 1.0, 0.5, 0.650, 0.650, 0.0, 0.650, 0.325, 0.0 };
@@ -643,6 +649,20 @@ static const char *r800_channel_names[] =
DECLARE_CHANNEL_LIST(r800);
+static const char *r2400_channel_names[] =
+{
+ N_("Light Light Black"),
+ N_("Light Magenta"),
+ N_("Light Cyan"),
+ N_("Light Black"),
+ N_("Black"),
+ N_("Cyan"),
+ N_("Magenta"),
+ N_("Yellow"),
+};
+
+DECLARE_CHANNEL_LIST(r2400);
+
const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
{
/* FIRST GENERATION PRINTERS */
@@ -1840,6 +1860,40 @@ const stpi_escp2_printer_t stpi_escp2_model_capabilities[] =
&standard_quality_list, &new_init_sequence, &je_deinit_sequence,
NULL, &standard_channel_name_list
},
+ /* 70: Stylus Photo RX700 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
+ MODEL_PACKET_MODE_YES),
+ 180, 1, 2, 180, 1, 2, 180, 1, 2, 6,
+ 360, 14400, -1, 2880, 1440, 360, 120, 0, 1, 0, 190, 0, 0, 0,
+ INCH(17 / 2), INCH(1200), INCH(2), INCH(2),
+ 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842,
+ 4, 15, 0, 0,
+ p3pl_dotsizes, p3pl_densities, &stpi_escp2_variable_3pl_pmg_drops,
+ stpi_escp2_superfine_reslist, &stpi_escp2_photo_gen3_inkgroup,
+ variable_bits, variable_base_res, &cd_roll_feed_input_slot_list,
+ &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
+ NULL, &photo_channel_name_list
+ },
+ /* 71: Stylus Photo R2400 */
+ {
+ (MODEL_VARIABLE_YES | MODEL_COMMAND_2000 | MODEL_GRAYMODE_YES |
+ MODEL_XZEROMARGIN_YES | MODEL_VACUUM_NO | MODEL_FAST_360_NO |
+ MODEL_SEND_ZERO_ADVANCE_YES | MODEL_SUPPORTS_INK_CHANGE_NO |
+ MODEL_PACKET_MODE_YES),
+ 180, 1, 2, 180, 1, 2, 180, 1, 2, 8,
+ 360, 14400, -1, 2880, 2880, 360, 180, 0, 1, 0, 190, 0, 0, 0,
+ INCH(13), INCH(1200), INCH(2), INCH(2),
+ 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9, 0, 0, 204, 191, 595, 842,
+ 4, 15, 0, 0,
+ p3_5pl_dotsizes, p3_5pl_densities, &stpi_escp2_variable_r2400_drops,
+ stpi_escp2_superfine_reslist, &stpi_escp2_f360_ultrachrome_k3_inkgroup,
+ variable_bits, c1_5_base_res, &cd_roll_feed_input_slot_list,
+ &standard_quality_list, &new_init_sequence, &je_deinit_sequence,
+ NULL, &r2400_channel_name_list
+ },
};
const int stpi_escp2_model_limit =
diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c
index 8b8344b..4c4f588 100644
--- a/src/main/print-escp2.c
+++ b/src/main/print-escp2.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.c,v 1.343 2005/08/14 14:55:22 rleigh Exp $"
+ * "$Id: print-escp2.c,v 1.345 2005/10/23 19:43:14 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -497,6 +497,14 @@ static const float_param_t float_parameters[] =
},
{
{
+ "LightGrayTransition", N_("Light Gray Transition"), N_("Advanced Ink Adjustment"),
+ N_("Light Gray Transition"),
+ STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
+ STP_PARAMETER_LEVEL_ADVANCED4, 0, 1, -1, 1, 0
+ }, 0.0, 5.0, 1.0, 1
+ },
+ {
+ {
"Gray3Transition", N_("Dark Gray Transition"), N_("Advanced Ink Adjustment"),
N_("Dark Gray Transition"),
STP_PARAMETER_TYPE_DOUBLE, STP_PARAMETER_CLASS_OUTPUT,
@@ -1240,20 +1248,6 @@ set_hue_map_parameter(const stp_vars_t *v,
}
static void
-set_gray_transition_parameter(const stp_vars_t *v,
- stp_parameter_t *description,
- int expected_channels)
-{
- const escp2_inkname_t *ink_name = get_inktype(v);
- description->is_active = 0;
- if (ink_name && ink_name->channel_set->channels[STP_ECOLOR_K] &&
- (ink_name->channel_set->channels[STP_ECOLOR_K]->n_subchannels ==
- expected_channels) &&
- using_automatic_settings(v, AUTO_MODE_MANUAL))
- fill_transition_parameters(description);
-}
-
-static void
set_color_transition_parameter(const stp_vars_t *v,
stp_parameter_t *description,
int color)
@@ -1272,6 +1266,22 @@ set_color_transition_parameter(const stp_vars_t *v,
}
}
+static void
+set_gray_transition_parameter(const stp_vars_t *v,
+ stp_parameter_t *description,
+ int expected_channels)
+{
+ const escp2_inkname_t *ink_name = get_inktype(v);
+ description->is_active = 0;
+ if (ink_name && ink_name->channel_set->channels[STP_ECOLOR_K] &&
+ (ink_name->channel_set->channels[STP_ECOLOR_K]->n_subchannels ==
+ expected_channels) &&
+ using_automatic_settings(v, AUTO_MODE_MANUAL))
+ fill_transition_parameters(description);
+ else
+ set_color_transition_parameter(v, description, STP_ECOLOR_K);
+}
+
static const res_t *
find_default_resolution(const stp_vars_t *v, int desired_hres, int desired_vres,
int strict)
@@ -1679,6 +1689,8 @@ escp2_parameters(const stp_vars_t *v, const char *name,
}
else if (strcmp(name, "GrayTransition") == 0)
set_gray_transition_parameter(v, description, 2);
+ else if (strcmp(name, "LightGrayTransition") == 0)
+ set_gray_transition_parameter(v, description, 2);
else if (strcmp(name, "Gray1Transition") == 0 ||
strcmp(name, "Gray2Transition") == 0 ||
strcmp(name, "Gray3Transition") == 0)
@@ -1733,9 +1745,11 @@ escp2_parameters(const stp_vars_t *v, const char *name,
}
else if (strcmp(name, "PrintingMode") == 0)
{
+ const escp2_inkname_t *ink_name = get_inktype(v);
description->bounds.str = stp_string_list_create();
- stp_string_list_add_string
- (description->bounds.str, "Color", _("Color"));
+ if (!ink_name || ink_name->inkset != INKSET_QUADTONE)
+ stp_string_list_add_string
+ (description->bounds.str, "Color", _("Color"));
stp_string_list_add_string
(description->bounds.str, "BW", _("Black and White"));
description->deflt.str =
@@ -1766,6 +1780,7 @@ escp2_parameters(const stp_vars_t *v, const char *name,
}
else if (strcmp(name, "MultiChannelLimit") == 0)
{
+ description->is_active = 0;
if (stp_get_string_parameter(v, "PrintingMode") &&
strcmp(stp_get_string_parameter(v, "PrintingMode"), "BW") != 0 &&
using_automatic_settings(v, AUTO_MODE_MANUAL))
@@ -1774,8 +1789,6 @@ escp2_parameters(const stp_vars_t *v, const char *name,
if (ink_name && ink_name->inkset == INKSET_CMYKRB)
description->is_active = 1;
}
- else
- description->is_active = 0;
}
}
@@ -1944,6 +1957,8 @@ escp2_describe_output(const stp_vars_t *v)
{
switch (ink_type->inkset)
{
+ case INKSET_QUADTONE:
+ return "Grayscale";
case INKSET_CMYKRB:
case INKSET_CMYK:
case INKSET_CcMmYK:
diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h
index 0982996..8e4d373 100644
--- a/src/main/print-escp2.h
+++ b/src/main/print-escp2.h
@@ -1,5 +1,5 @@
/*
- * "$Id: print-escp2.h,v 1.95 2005/08/14 01:27:44 rlk Exp $"
+ * "$Id: print-escp2.h,v 1.97 2005/10/23 19:43:14 rlk Exp $"
*
* Print plug-in EPSON ESC/P2 driver for the GIMP.
*
@@ -71,7 +71,7 @@ typedef struct
const double dropsizes[MAX_DROP_SIZES];
} escp2_dropsize_t;
-typedef const escp2_dropsize_t *const escp2_drop_list_t[RES_N];
+typedef const escp2_dropsize_t *escp2_drop_list_t[RES_N];
/*
****************************************************************
@@ -525,6 +525,7 @@ extern const escp2_drop_list_t stpi_escp2_variable_3pl_drops;
extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_drops;
extern const escp2_drop_list_t stpi_escp2_variable_3pl_pigment_c66_drops;
extern const escp2_drop_list_t stpi_escp2_variable_3pl_pmg_drops;
+extern const escp2_drop_list_t stpi_escp2_variable_r2400_drops;
extern const escp2_drop_list_t stpi_escp2_variable_1440_4pl_drops;
extern const escp2_drop_list_t stpi_escp2_variable_ultrachrome_drops;
extern const escp2_drop_list_t stpi_escp2_variable_2880_4pl_drops;
@@ -536,6 +537,7 @@ extern const paperlist_t stpi_escp2_standard_paper_list;
extern const paperlist_t stpi_escp2_durabrite_paper_list;
extern const paperlist_t stpi_escp2_durabrite2_paper_list;
extern const paperlist_t stpi_escp2_ultrachrome_paper_list;
+extern const paperlist_t stpi_escp2_ultrachrome_k3_paper_list;
extern const paperlist_t stpi_escp2_r800_paper_list;
extern const paper_adjustment_list_t stpi_escp2_standard_paper_adjustment_list;
@@ -547,6 +549,8 @@ extern const paper_adjustment_list_t stpi_escp2_photo3_paper_adjustment_list;
extern const paper_adjustment_list_t stpi_escp2_sp960_paper_adjustment_list;
extern const paper_adjustment_list_t stpi_escp2_ultrachrome_photo_paper_adjustment_list;
extern const paper_adjustment_list_t stpi_escp2_ultrachrome_matte_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_ultrachrome_k3_photo_paper_adjustment_list;
+extern const paper_adjustment_list_t stpi_escp2_ultrachrome_k3_matte_paper_adjustment_list;
extern const paper_adjustment_list_t stpi_escp2_r800_photo_paper_adjustment_list;
extern const paper_adjustment_list_t stpi_escp2_r800_matte_paper_adjustment_list;
@@ -581,6 +585,7 @@ extern const inkgroup_t stpi_escp2_ultrachrome_inkgroup;
extern const inkgroup_t stpi_escp2_f360_photo_inkgroup;
extern const inkgroup_t stpi_escp2_f360_photo7_japan_inkgroup;
extern const inkgroup_t stpi_escp2_f360_ultrachrome_inkgroup;
+extern const inkgroup_t stpi_escp2_f360_ultrachrome_k3_inkgroup;
extern const inkgroup_t stpi_escp2_cmykrb_inkgroup;
extern const escp2_inkname_t stpi_escp2_default_black_inkset;
@@ -705,5 +710,5 @@ extern void stpi_escp2_terminate_page(stp_vars_t *v);
#endif /* GUTENPRINT_INTERNAL_ESCP2_H */
/*
- * End of "$Id: print-escp2.h,v 1.95 2005/08/14 01:27:44 rlk Exp $".
+ * End of "$Id: print-escp2.h,v 1.97 2005/10/23 19:43:14 rlk Exp $".
*/
diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c
index f879fba..a3dc35d 100644
--- a/src/main/print-olympus.c
+++ b/src/main/print-olympus.c
@@ -1,9 +1,10 @@
/*
- * "$Id: print-olympus.c,v 1.55 2005/07/01 09:56:12 m0m Exp $"
+ * "$Id: print-olympus.c,v 1.57 2005/10/21 08:55:40 m0m Exp $"
*
* Print plug-in Olympus driver for the GIMP.
*
- * Copyright 2003 Michael Mraka (Michael.Mraka@linux.cz)
+ * Copyright 2003 - 2005
+ * Michael Mraka (Michael.Mraka@linux.cz)
*
* The plug-in is based on the code of the RAW plugin for the GIMP of
* Michael Sweet (mike@easysw.com) and Robert Krawitz (rlk@alum.mit.edu)
@@ -908,6 +909,97 @@ static const char updp10_adj_yellow[] =
"</gutenprint>\n";
+/* Sony UP-DR150 */
+static const olymp_resolution_t updr150_res[] =
+{
+ { "346x346", 346, 346},
+};
+
+static const olymp_resolution_list_t updr150_res_list =
+{
+ updr150_res, sizeof(updr150_res) / sizeof(olymp_resolution_t)
+};
+
+static const olymp_pagesize_t updr150_page[] =
+{
+ { "w288h432", "2UPC-153 (4x6)", -1, -1, 0, 0, 3, 2},
+ { "B7", "2UPC-154 (3.5x5)", -1, -1, 3, 2, 0, 0},
+ { "w360h504", "2UPC-155 (5x7)", -1, -1, 0, 0, 4, 4},
+ { "w432h576", "2UPC-156 (6x8)", -1, -1, 3, 2, 5, 4},
+ { "Custom", NULL, -1, -1, 0, 0, 3, 2},
+};
+
+static const olymp_pagesize_list_t updr150_page_list =
+{
+ updr150_page, sizeof(updr150_page) / sizeof(olymp_pagesize_t)
+};
+
+static const olymp_printsize_t updr150_printsize[] =
+{
+ { "346x346", "w288h432", 1382, 2048},
+ { "346x346", "B7", 1210, 1728},
+ { "346x346", "w360h504", 1728, 2380},
+ { "346x346", "w432h576", 2048, 2724},
+ { "346x346", "Custom", 1382, 2048},
+};
+
+static const olymp_printsize_list_t updr150_printsize_list =
+{
+ updr150_printsize, sizeof(updr150_printsize) / sizeof(olymp_printsize_t)
+};
+
+static void updr150_printer_init_func(stp_vars_t *v)
+{
+ char pg = '\0';
+
+ stp_zfwrite("\x6a\xff\xff\xff\xef\xff\xff\xff", 1, 8, v);
+ if (strcmp(privdata.pagesize,"B7") == 0)
+ pg = '\x01';
+ else if (strcmp(privdata.pagesize,"w288h432") == 0)
+ pg = '\x02';
+ else if (strcmp(privdata.pagesize,"w360h504") == 0)
+ pg = '\x03';
+ else if (strcmp(privdata.pagesize,"w432h576") == 0)
+ pg = '\x04';
+ stp_putc(pg, v);
+
+ stp_zfwrite("\x00\x00\x00\xfc\xff\xff\xff"
+ "\xfb\xff\xff\xff\xf4\xff\xff\xff"
+ "\xf5\xff\xff\xff\x01\x00\x00\x00"
+ "\x07\x00\x00\x00\x1b\xe5\x00\x00"
+ "\x00\x08\x00\x08\x00\x00\x00\x00"
+ "\x00\x00\x00\x00\x00\x01\x00\xed"
+ "\xff\xff\xff\x07\x00\x00\x00\x1b"
+ "\xee\x00\x00\x00\x02\x00\x02\x00"
+ "\x00\x00\x00\x01\x07\x00\x00\x00"
+ "\x1b\x15\x00\x00\x00\x0d\x00\x0d"
+ "\x00\x00\x00\x00\x00\x00\x00\x07"
+ "\x00\x00\x00\x00", 1, 91, v);
+ stp_put16_be(privdata.xsize, v);
+ stp_put16_be(privdata.ysize, v);
+ stp_zfwrite("\xf9\xff\xff\xff\x07\x00\x00\x00"
+ "\x1b\xe1\x00\x00\x00\x0b\x00\x0b"
+ "\x00\x00\x00\x00\x80\x00\x00\x00"
+ "\x00\x00", 1, 26, v);
+ stp_put16_be(privdata.xsize, v);
+ stp_put16_be(privdata.ysize, v);
+ stp_zfwrite("\xf8\xff\xff\xff\x0b\x00\x00\x00\x1b\xea"
+ "\x00\x00\x00\x00", 1, 14, v);
+ stp_put32_be(privdata.xsize*privdata.ysize*3, v);
+ stp_zfwrite("\x00", 1, 1, v);
+ stp_put32_le(privdata.xsize*privdata.ysize*3, v);
+}
+
+static void updr150_printer_end_func(stp_vars_t *v)
+{
+ stp_zfwrite("\xfc\xff\xff"
+ "\xff\xfa\xff\xff\xff\x07\x00\x00"
+ "\x00\x1b\x0a\x00\x00\x00\x00\x00"
+ "\x07\x00\x00\x00\x1b\x17\x00\x00"
+ "\x00\x00\x00\xf3\xff\xff\xff"
+ , 1, 34, v);
+}
+
/* Fujifilm CX-400 */
static const olymp_resolution_t cx400_res[] =
{
@@ -984,6 +1076,7 @@ static const olymp_resolution_t all_resolutions[] =
{ "300x300", 300, 300},
{ "317x316", 317, 316},
{ "320x320", 320, 320},
+ { "346x346", 346, 346},
};
static const olymp_resolution_list_t all_res_list =
@@ -993,7 +1086,7 @@ static const olymp_resolution_list_t all_res_list =
static const olympus_cap_t olympus_model_capabilities[] =
{
- { /* Olympus P-10 */
+ { /* Olympus P-10, P-11 */
2,
&rgb_ink_list,
&res_320dpi_list,
@@ -1084,7 +1177,8 @@ static const olympus_cap_t olympus_model_capabilities[] =
cpx00_adj_cyan, cpx00_adj_magenta, cpx00_adj_yellow,
NULL,
},
- { /* Canon CP-220, CP-330, SELPHY CP-400, SELPHY CP-500, SELPHY CP-600 */
+ { /* Canon CP-220, CP-330, SELPHY CP-400, SELPHY CP-500, SELPHY CP-510,
+ SELPHY CP-600, SELPHY CP-710 */
1001,
&ymc_ink_list,
&res_314dpi_list,
@@ -1116,6 +1210,21 @@ static const olympus_cap_t olympus_model_capabilities[] =
updp10_adj_cyan, updp10_adj_magenta, updp10_adj_yellow,
&updp10_laminate_list,
},
+ { /* Sony UP-DR150 */
+ 2001,
+ &rgb_ink_list,
+ &updr150_res_list,
+ &updr150_page_list,
+ &updr150_printsize_list,
+ OLYMPUS_INTERLACE_NONE,
+ 1800,
+ OLYMPUS_FEATURE_FULL_WIDTH | OLYMPUS_FEATURE_FULL_HEIGHT,
+ &updr150_printer_init_func, &updr150_printer_end_func,
+ NULL, NULL,
+ NULL, NULL,
+ NULL, NULL, NULL,
+ NULL,
+ },
{ /* Fujifilm Printpix CX-400 */
3000,
&rgb_ink_list,
@@ -1605,7 +1714,8 @@ olympus_do_print(stp_vars_t *v, stp_image_t *image)
const int model = stp_get_model_id(v);
const char *ink_type = stp_get_string_parameter(v, "InkType");
const olympus_cap_t *caps = olympus_get_model_capabilities(model);
- int max_print_px_width, max_print_px_height;
+ int max_print_px_width = 0;
+ int max_print_px_height = 0;
int xdpi, ydpi; /* Resolution */
/* image in pixels */
diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c
index e02b2bd..ea41b4f 100644
--- a/src/main/print-pcl.c
+++ b/src/main/print-pcl.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-pcl.c,v 1.139 2005/07/03 22:13:39 rlk Exp $"
+ * "$Id: print-pcl.c,v 1.140 2005/10/18 02:08:17 rlk Exp $"
*
* Print plug-in HP PCL driver for the GIMP.
*
@@ -1446,7 +1446,7 @@ static const stp_param_string_t duplex_types[] =
* 'pcl_papersize_valid()' - Is the paper size valid for this printer.
*/
-static const int
+static int
pcl_papersize_valid(const stp_papersize_t *pt,
int model)
{
diff --git a/src/main/print-ps.c b/src/main/print-ps.c
index 6157db2..9d7e20e 100644
--- a/src/main/print-ps.c
+++ b/src/main/print-ps.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-ps.c,v 1.79 2004/09/17 18:38:26 rleigh Exp $"
+ * "$Id: print-ps.c,v 1.81 2005/10/10 12:52:29 rlk Exp $"
*
* Print plug-in Adobe PostScript driver for the GIMP.
*
@@ -623,6 +623,8 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
else
stp_set_string_parameter(nv, "STPIOutputType", "Whitescale");
+ stp_set_boolean_parameter(nv, "SimpleGamma", 1);
+
out_channels = stp_color_init(nv, image, 256);
if (model == 0)
@@ -652,6 +654,8 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
}
else
{
+ unsigned short *tmp_buf =
+ stp_malloc(sizeof(unsigned short) * (image_width * out_channels + 3));
if (strcmp(print_mode, "Color") == 0)
stp_puts("/DeviceRGB setcolorspace\n", v);
else
@@ -681,6 +685,7 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
for (y = 0, out_offset = 0; y < image_height; y ++)
{
+ unsigned short *where;
/* FIXME!!! */
if (stp_color_get_row(nv, image, y /*, out + out_offset */ , &zero_mask))
{
@@ -688,23 +693,33 @@ ps_print_internal(const stp_vars_t *v, stp_image_t *image)
break;
}
out = stp_channel_get_input(nv);
+ if (out_offset > 0)
+ {
+ memcpy(tmp_buf + out_offset, out,
+ image_width * out_channels * sizeof(unsigned short));
+ where = tmp_buf;
+ }
+ else
+ where = out;
out_ps_height = out_offset + image_width * out_channels;
if (y < (image_height - 1))
{
- ps_ascii85(v, out, out_ps_height & ~3, 0);
+ ps_ascii85(v, where, out_ps_height & ~3, 0);
out_offset = out_ps_height & 3;
}
else
{
- ps_ascii85(v, out, out_ps_height, 1);
+ ps_ascii85(v, where, out_ps_height, 1);
out_offset = 0;
}
if (out_offset > 0)
- memcpy(out, out + out_ps_height - out_offset, out_offset);
+ memcpy(tmp_buf, where + out_ps_height - out_offset,
+ out_offset * sizeof(unsigned short));
}
+ stp_free(tmp_buf);
}
stp_image_conclude(image);
diff --git a/src/main/print-raw.c b/src/main/print-raw.c
index f6353f3..dfad151 100644
--- a/src/main/print-raw.c
+++ b/src/main/print-raw.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-raw.c,v 1.36 2004/09/17 18:38:26 rleigh Exp $"
+ * "$Id: print-raw.c,v 1.37 2005/09/17 21:54:34 rlk Exp $"
*
* Print plug-in RAW driver for the GIMP.
*
@@ -237,6 +237,7 @@ raw_print(const stp_vars_t *v, stp_image_t *image)
}
stp_set_float_parameter(nv, "Density", 1.0);
+ stp_set_boolean_parameter(nv, "SimpleGamma", 1);
stp_channel_reset(nv);
for (i = 0; i < ink_channels; i++)
stp_channel_add(nv, i, 0, 1.0);
diff --git a/src/main/print-vars.c b/src/main/print-vars.c
index 8b480de..5c3d621 100644
--- a/src/main/print-vars.c
+++ b/src/main/print-vars.c
@@ -1,5 +1,5 @@
/*
- * "$Id: print-vars.c,v 1.73 2004/09/17 18:38:26 rleigh Exp $"
+ * "$Id: print-vars.c,v 1.74 2005/10/26 01:28:35 rlk Exp $"
*
* Print plug-in driver utility functions for the GIMP.
*
@@ -500,6 +500,12 @@ stp_set_default_string_parameter_n(stp_vars_t *v, const char *parameter,
const char *value, size_t bytes)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_STRING_LIST];
+ if (value)
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_string_parameter(%s, %s)\n",
+ parameter, value);
+ else
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_string_parameter(%s)\n",
+ parameter);
set_default_raw_parameter(list, parameter, value, bytes,
STP_PARAMETER_TYPE_STRING_LIST);
stp_set_verified(v, 0);
@@ -511,15 +517,7 @@ stp_set_default_string_parameter(stp_vars_t *v, const char *parameter,
{
int byte_count = 0;
if (value)
- {
- byte_count = strlen(value);
- stp_dprintf(STP_DBG_VARS, v,
- "stp_set_default_string_parameter(%s, %s)\n",
- parameter, value);
- }
- else
- stp_dprintf(STP_DBG_VARS, v, "stp_set_default_string_parameter(%s)\n",
- parameter);
+ byte_count = strlen(value);
stp_set_default_string_parameter_n(v, parameter, value, byte_count);
stp_set_verified(v, 0);
}
@@ -593,6 +591,12 @@ stp_set_file_parameter(stp_vars_t *v, const char *parameter,
size_t byte_count = 0;
if (value)
byte_count = strlen(value);
+ if (value)
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s, %s)\n",
+ parameter, value);
+ else
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s)\n",
+ parameter);
set_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -603,6 +607,12 @@ stp_set_file_parameter_n(stp_vars_t *v, const char *parameter,
const char *value, size_t byte_count)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_FILE];
+ if (value)
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s, %s)\n",
+ parameter, value);
+ else
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_file_parameter(%s)\n",
+ parameter);
set_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -616,6 +626,12 @@ stp_set_default_file_parameter(stp_vars_t *v, const char *parameter,
size_t byte_count = 0;
if (value)
byte_count = strlen(value);
+ if (value)
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s, %s)\n",
+ parameter, value);
+ else
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s)\n",
+ parameter);
set_default_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -626,6 +642,12 @@ stp_set_default_file_parameter_n(stp_vars_t *v, const char *parameter,
const char *value, size_t byte_count)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_FILE];
+ if (value)
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s, %s)\n",
+ parameter, value);
+ else
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_file_parameter(%s)\n",
+ parameter);
set_default_raw_parameter(list, parameter, value, byte_count,
STP_PARAMETER_TYPE_FILE);
stp_set_verified(v, 0);
@@ -658,6 +680,7 @@ stp_set_curve_parameter(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_CURVE];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_curve_parameter(%s)\n", parameter);
if (curve)
{
value_t *val;
@@ -690,6 +713,8 @@ stp_set_default_curve_parameter(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_CURVE];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_curve_parameter(%s)\n",
+ parameter);
if (!item)
{
if (curve)
@@ -764,6 +789,7 @@ stp_set_default_array_parameter(stp_vars_t *v, const char *parameter,
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_ARRAY];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_array_parameter(%s)\n", parameter);
if (!item)
{
if (array)
@@ -792,6 +818,8 @@ stp_get_array_parameter(const stp_vars_t *v, const char *parameter)
const stp_list_t *list = v->params[STP_PARAMETER_TYPE_ARRAY];
const value_t *val;
const stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_array_parameter(%s)\n",
+ parameter);
if (item)
{
val = (const value_t *) stp_list_item_get_data(item);
@@ -807,6 +835,8 @@ stp_set_int_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_INT];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_int_parameter(%s, %d)\n",
+ parameter, ival);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -831,6 +861,8 @@ stp_set_default_int_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_INT];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_int_parameter(%s, %d)\n",
+ parameter, ival);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -848,6 +880,7 @@ stp_clear_int_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_INT];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_clear_int_parameter(%s)\n", parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
@@ -890,6 +923,8 @@ stp_set_boolean_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_BOOLEAN];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_boolean_parameter(%s, %d)\n",
+ parameter, ival);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -918,6 +953,8 @@ stp_set_default_boolean_parameter(stp_vars_t *v, const char *parameter,
stp_list_t *list = v->params[STP_PARAMETER_TYPE_BOOLEAN];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_boolean_parameter(%s, %d)\n",
+ parameter, ival);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -938,6 +975,7 @@ stp_clear_boolean_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_BOOLEAN];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_clear_boolean_parameter(%s)\n", parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
@@ -980,6 +1018,8 @@ stp_set_dimension_parameter(stp_vars_t *v, const char *parameter, int ival)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DIMENSION];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_dimension_parameter(%s, %d)\n",
+ parameter, ival);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -1004,6 +1044,8 @@ stp_set_default_dimension_parameter(stp_vars_t *v, const char *parameter, int iv
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DIMENSION];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_dimension_parameter(%s, %d)\n",
+ parameter, ival);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -1021,6 +1063,7 @@ stp_clear_dimension_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DIMENSION];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_clear_dimension_parameter(%s)\n", parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
@@ -1063,6 +1106,8 @@ stp_set_float_parameter(stp_vars_t *v, const char *parameter, double dval)
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DOUBLE];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_float_parameter(%s, %f)\n",
+ parameter, dval);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -1088,6 +1133,8 @@ stp_set_default_float_parameter(stp_vars_t *v, const char *parameter,
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DOUBLE];
value_t *val;
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_set_default_float_parameter(%s, %f)\n",
+ parameter, dval);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -1105,6 +1152,7 @@ stp_clear_float_parameter(stp_vars_t *v, const char *parameter)
{
stp_list_t *list = v->params[STP_PARAMETER_TYPE_DOUBLE];
stp_list_item_t *item = stp_list_get_item_by_name(list, parameter);
+ stp_dprintf(STP_DBG_VARS, v, "stp_clear_float_parameter(%s)\n", parameter);
if (item)
stp_list_item_destroy(list, item);
stp_set_verified(v, 0);
diff --git a/src/main/printers.xml b/src/main/printers.xml
index 97300b7..d6e9ed3 100644
--- a/src/main/printers.xml
+++ b/src/main/printers.xml
@@ -4,7 +4,7 @@
XML description of printers known to libgutenprint
This file was originally generated. It should be edited by hand.
- "$Id: printers.xml,v 1.124 2005/08/10 11:27:35 rlk Exp $"
+ "$Id: printers.xml,v 1.135 2005/11/21 12:25:38 rlk Exp $"
-->
<gutenprint xmlns="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0"
@@ -102,6 +102,10 @@
<parameter type="float" name="Gamma">1.000</parameter>
<parameter type="float" name="Density">0.800</parameter>
</printer>
+ <printer name="Canon S200" driver="bjc-s200" manufacturer="Canon" model="4202">
+        <parameter type="float" name="Gamma">0.800</parameter>
+        <parameter type="float" name="Density">0.900</parameter>
+      </printer>
<printer name="Canon S400" driver="bjc-s400" manufacturer="Canon" model="3000">
<parameter type="float" name="Gamma">1.000</parameter>
<parameter type="float" name="Density">0.800</parameter>
@@ -124,6 +128,12 @@
</printer>
</family>
<family name="escp2">
+ <printer name="EPSON Stylus C20" driver="escp2-c20" manufacturer="Epson" model="42">
+ <parameter type="float" name="MagentaGamma">0.95</parameter>
+ <parameter type="float" name="YellowGamma">0.9</parameter>
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C20SX" driver="escp2-c20sx" manufacturer="Epson" model="42">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -136,6 +146,12 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C40" driver="escp2-c40" manufacturer="Epson" model="43">
+ <parameter type="float" name="MagentaGamma">0.95</parameter>
+ <parameter type="float" name="YellowGamma">0.9</parameter>
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C40SX" driver="escp2-c40sx" manufacturer="Epson" model="43">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -148,6 +164,12 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C41" driver="escp2-c41" manufacturer="Epson" model="43">
+ <parameter type="float" name="MagentaGamma">0.95</parameter>
+ <parameter type="float" name="YellowGamma">0.9</parameter>
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C41SX" driver="escp2-c41sx" manufacturer="Epson" model="43">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -160,6 +182,12 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C42" driver="escp2-c42" manufacturer="Epson" model="43">
+ <parameter type="float" name="MagentaGamma">0.95</parameter>
+ <parameter type="float" name="YellowGamma">0.9</parameter>
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C42SX" driver="escp2-c42sx" manufacturer="Epson" model="43">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -172,6 +200,12 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C43" driver="escp2-c43" manufacturer="Epson" model="43">
+ <parameter type="float" name="MagentaGamma">0.95</parameter>
+ <parameter type="float" name="YellowGamma">0.9</parameter>
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C43SX" driver="escp2-c43sx" manufacturer="Epson" model="43">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -184,6 +218,12 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C44" driver="escp2-c44" manufacturer="Epson" model="43">
+ <parameter type="float" name="MagentaGamma">0.95</parameter>
+ <parameter type="float" name="YellowGamma">0.9</parameter>
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C44SX" driver="escp2-c44sx" manufacturer="Epson" model="43">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -208,6 +248,12 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C48" driver="escp2-c48" manufacturer="Epson" model="43">
+ <parameter type="float" name="MagentaGamma">0.95</parameter>
+ <parameter type="float" name="YellowGamma">0.9</parameter>
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C50" driver="escp2-c50" manufacturer="Epson" model="56">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -242,6 +288,10 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C68" driver="escp2-c68" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus C70" driver="escp2-c70" manufacturer="Epson" model="44">
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
@@ -270,6 +320,10 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus C88" driver="escp2-c88" manufacturer="Epson" model="69">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus Color" driver="escp2" manufacturer="Epson" model="0">
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
@@ -518,6 +572,10 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus Photo R220" driver="escp2-r220" manufacturer="Epson" model="63">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus Photo R300" driver="escp2-r300" manufacturer="Epson" model="63">
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
@@ -526,6 +584,14 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus Photo R320" driver="escp2-r320" manufacturer="Epson" model="63">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus Photo R340" driver="escp2-r340" manufacturer="Epson" model="63">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus Photo RX400" driver="escp2-rx400" manufacturer="Epson" model="63">
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
@@ -562,6 +628,10 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus Photo RX700" driver="escp2-rx700" manufacturer="Epson" model="70">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus Photo R800" driver="escp2-r800" manufacturer="Epson" model="64">
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
@@ -570,6 +640,10 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus Photo R2400" driver="escp2-r2400" manufacturer="Epson" model="71">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus Pro 5000" driver="escp2-5000" manufacturer="Epson" model="27">
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
@@ -643,6 +717,25 @@
<parameter type="float" name="Gamma">0.470</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus CX3700" driver="escp2-cx3700" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus CX3800" driver="escp2-cx3800" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus CX3810" driver="escp2-cx3810" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus CX4200" driver="escp2-cx4200" manufacturer="Epson" model="65">
+ <parameter type="float" name="CyanGamma">0.96</parameter>
+ <parameter type="float" name="MagentaGamma">1.02</parameter>
+ <parameter type="float" name="YellowGamma">1.02</parameter>
+ <parameter type="float" name="Gamma">0.500</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus CX4600" driver="escp2-cx4600" manufacturer="Epson" model="65">
<parameter type="float" name="CyanGamma">0.96</parameter>
<parameter type="float" name="MagentaGamma">1.02</parameter>
@@ -650,6 +743,20 @@
<parameter type="float" name="Gamma">0.500</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus CX4700" driver="escp2-cx4700" manufacturer="Epson" model="65">
+ <parameter type="float" name="CyanGamma">0.96</parameter>
+ <parameter type="float" name="MagentaGamma">1.02</parameter>
+ <parameter type="float" name="YellowGamma">1.02</parameter>
+ <parameter type="float" name="Gamma">0.500</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus CX4800" driver="escp2-cx4800" manufacturer="Epson" model="65">
+ <parameter type="float" name="CyanGamma">0.96</parameter>
+ <parameter type="float" name="MagentaGamma">1.02</parameter>
+ <parameter type="float" name="YellowGamma">1.02</parameter>
+ <parameter type="float" name="Gamma">0.500</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus CX5100" driver="escp2-cx5100" manufacturer="Epson" model="55">
<parameter type="float" name="CyanGamma">0.96</parameter>
<parameter type="float" name="MagentaGamma">1.02</parameter>
@@ -678,6 +785,13 @@
<parameter type="float" name="Gamma">0.500</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus CX5800" driver="escp2-cx5800" manufacturer="Epson" model="65">
+ <parameter type="float" name="CyanGamma">0.96</parameter>
+ <parameter type="float" name="MagentaGamma">1.02</parameter>
+ <parameter type="float" name="YellowGamma">1.02</parameter>
+ <parameter type="float" name="Gamma">0.500</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus CX6300" driver="escp2-cx6300" manufacturer="Epson" model="60">
<parameter type="float" name="CyanGamma">0.96</parameter>
<parameter type="float" name="MagentaGamma">1.02</parameter>
@@ -706,6 +820,20 @@
<parameter type="float" name="Gamma">0.500</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus CX7700" driver="escp2-cx7700" manufacturer="Epson" model="65">
+ <parameter type="float" name="CyanGamma">0.96</parameter>
+ <parameter type="float" name="MagentaGamma">1.02</parameter>
+ <parameter type="float" name="YellowGamma">1.02</parameter>
+ <parameter type="float" name="Gamma">0.500</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus CX7800" driver="escp2-cx7800" manufacturer="Epson" model="65">
+ <parameter type="float" name="CyanGamma">0.96</parameter>
+ <parameter type="float" name="MagentaGamma">1.02</parameter>
+ <parameter type="float" name="YellowGamma">1.02</parameter>
+ <parameter type="float" name="Gamma">0.500</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON Stylus CX8300" driver="escp2-cx8300" manufacturer="Epson" model="60">
<parameter type="float" name="CyanGamma">0.96</parameter>
<parameter type="float" name="MagentaGamma">1.02</parameter>
@@ -720,6 +848,33 @@
<parameter type="float" name="Gamma">0.500</parameter>
<parameter type="float" name="Density">1.0</parameter>
</printer>
+ <printer name="EPSON Stylus D68" driver="escp2-d68" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus D88" driver="escp2-d88" manufacturer="Epson" model="69">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus DX3800" driver="escp2-dx3800" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus DX3850" driver="escp2-dx3850" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus DX4200" driver="escp2-dx4200" manufacturer="Epson" model="65">
+ <parameter type="float" name="CyanGamma">0.96</parameter>
+ <parameter type="float" name="MagentaGamma">1.02</parameter>
+ <parameter type="float" name="YellowGamma">1.02</parameter>
+ <parameter type="float" name="Gamma">0.500</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
+ <printer name="EPSON Stylus DX4800" driver="escp2-dx4800" manufacturer="Epson" model="66">
+ <parameter type="float" name="Gamma">0.470</parameter>
+ <parameter type="float" name="Density">1.0</parameter>
+ </printer>
<printer name="EPSON CL-700" driver="escp2-cl700" manufacturer="Epson" model="38">
<parameter type="float" name="MagentaGamma">0.95</parameter>
<parameter type="float" name="YellowGamma">0.9</parameter>
@@ -1219,6 +1374,8 @@
</printer>
<printer name="Sony UP-DP10" driver="sony-updp10" manufacturer="Sony" model="2000">
</printer>
+ <printer name="Sony UP-DR150" driver="sony-updr150" manufacturer="Sony" model="2001">
+ </printer>
<printer name="Fujifilm Printpix CX-400" driver="fujifilm-cx400" manufacturer="Fujifilm" model="3000">
</printer>
<printer name="Fujifilm Printpix CX-550" driver="fujifilm-cx550" manufacturer="Fujifilm" model="3001">
diff --git a/src/testpattern/Makefile.am b/src/testpattern/Makefile.am
index 8733129..45027ff 100644
--- a/src/testpattern/Makefile.am
+++ b/src/testpattern/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.22 2004/09/17 18:38:27 rleigh Exp $
+## $Id: Makefile.am,v 1.23 2005/11/21 11:16:23 rleigh Exp $
## Copyright (C) 2000 Roger Leigh
##
## This program is free software; you can redistribute it and/or modify
@@ -17,12 +17,8 @@
## Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.4 gnu
-
@SET_MAKE@
-MAINT_CHARSET = latin1
-
include $(top_srcdir)/scripts/global.mk
diff --git a/src/testpattern/Makefile.in b/src/testpattern/Makefile.in
index 0bb1ead..c34aede 100644
--- a/src/testpattern/Makefile.in
+++ b/src/testpattern/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -17,8 +17,6 @@
# Variables
-SOURCES = printers.c $(testpattern_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -71,8 +69,8 @@ am_testpattern_OBJECTS = testpattern.$(OBJEXT) testpatterny.$(OBJEXT) \
testpattern_OBJECTS = $(am_testpattern_OBJECTS)
testpattern_DEPENDENCIES = $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
-am__depfiles_maybe = depfiles
+depcomp =
+am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
@@ -102,8 +100,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkgdatadir = $(datadir)/$(PACKAGE)/samples
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -141,7 +137,6 @@ BUILD_TEST_TRUE = @BUILD_TEST_TRUE@
BUILD_TRANSLATED_CUPS_PPDS_FALSE = @BUILD_TRANSLATED_CUPS_PPDS_FALSE@
BUILD_TRANSLATED_CUPS_PPDS_TRUE = @BUILD_TRANSLATED_CUPS_PPDS_TRUE@
CC = @CC@
-CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CONVERT = @CONVERT@
CPP = @CPP@
@@ -154,14 +149,12 @@ CUPS_PPDS_AT_TOP_LEVEL_TRUE = @CUPS_PPDS_AT_TOP_LEVEL_TRUE@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
CXX = @CXX@
CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
DB2PS = @DB2PS@
DEFS = @DEFS@
-DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DVIPDF = @DVIPDF@
@@ -296,13 +289,8 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
+ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
@@ -348,8 +336,6 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AUTOMAKE_OPTIONS = 1.4 gnu
-MAINT_CHARSET = latin1
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
TESTS = run-testpattern run-testpattern-1
AM_LFLAGS = -i
@@ -373,9 +359,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/testpattern/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/testpattern/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu src/testpattern/Makefile
+ $(AUTOMAKE) --gnu --ignore-deps src/testpattern/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -446,31 +432,14 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printers.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpattern.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpatternl.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testpatterny.Po@am__quote@
-
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+ $(LTCOMPILE) -c -o $@ $<
.l.c:
$(LEXCOMPILE) $<
@@ -716,7 +685,6 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool \
clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
@@ -742,7 +710,6 @@ install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/testpattern/testpatternl.c b/src/testpattern/testpatternl.c
index ad2e0c6..cb68f00 100644
--- a/src/testpattern/testpatternl.c
+++ b/src/testpattern/testpatternl.c
@@ -1,32 +1,85 @@
-/* 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 $
- */
+#line 3 "testpatternl.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
#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. */
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
+/* 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)
+#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
@@ -34,34 +87,17 @@
#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
@@ -76,71 +112,71 @@
* 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
-/* 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 YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
/* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - 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).
*/
-typedef unsigned int yy_size_t;
+#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;
@@ -177,12 +213,16 @@ 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
@@ -196,23 +236,33 @@ struct yy_buffer_state
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
+
};
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-static YY_BUFFER_STATE yy_current_buffer = 0;
+/* 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. */
/* 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_current_buffer
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+/* 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. */
@@ -225,69 +275,93 @@ static int yy_start = 0; /* start state number */
*/
static int yy_did_buffer_switch_on_eof;
-void yyrestart YY_PROTO(( FILE *input_file ));
+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 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 )
+#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
-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 ));
+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 );
-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 * ));
+void *yyalloc (yy_size_t );
+void *yyrealloc (void *,yy_size_t );
+void yyfree (void * );
#define yy_new_buffer yy_create_buffer
#define yy_set_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; \
+ 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; \
}
#define yy_set_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; \
+ 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; \
}
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
-#define yywrap() 1
+#define yywrap(n) 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 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[] ));
+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[] );
/* 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 = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
+ (yytext_ptr) = yy_bp; \
+ yyleng = (size_t) (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
-static yyconst short int yy_accept[233] =
+/* 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] =
{ 0,
0, 0, 50, 49, 46, 48, 49, 47, 49, 49,
43, 32, 45, 45, 45, 45, 45, 45, 45, 45,
@@ -317,7 +391,7 @@ static yyconst short int yy_accept[233] =
16, 0
} ;
-static yyconst int yy_ec[256] =
+static yyconst flex_int32_t yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -349,7 +423,7 @@ static yyconst int yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst int yy_meta[38] =
+static yyconst flex_int32_t yy_meta[38] =
{ 0,
1, 1, 2, 3, 1, 1, 1, 4, 4, 4,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
@@ -357,7 +431,7 @@ static yyconst int yy_meta[38] =
4, 4, 4, 4, 4, 4, 4
} ;
-static yyconst short int yy_base[237] =
+static yyconst flex_int16_t yy_base[237] =
{ 0,
0, 0, 468, 469, 465, 469, 0, 0, 460, 455,
29, 469, 455, 31, 32, 33, 34, 35, 40, 47,
@@ -387,7 +461,7 @@ static yyconst short int yy_base[237] =
343, 469, 412, 416, 420, 115
} ;
-static yyconst short int yy_def[237] =
+static yyconst flex_int16_t yy_def[237] =
{ 0,
232, 1, 232, 232, 232, 232, 233, 234, 235, 232,
236, 232, 236, 236, 236, 236, 236, 236, 236, 236,
@@ -417,7 +491,7 @@ static yyconst short int yy_def[237] =
236, 0, 232, 232, 232, 232
} ;
-static yyconst short int yy_nxt[507] =
+static yyconst flex_int16_t yy_nxt[507] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
12, 13, 13, 14, 15, 16, 17, 13, 18, 19,
@@ -477,7 +551,7 @@ static yyconst short int yy_nxt[507] =
232, 232, 232, 232, 232, 232
} ;
-static yyconst short int yy_chk[507] =
+static yyconst flex_int16_t yy_chk[507] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -540,6 +614,9 @@ static yyconst short int 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.
*/
@@ -549,7 +626,6 @@ static char *yy_last_accepting_cpos;
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "testpatternl.l"
-#define INITIAL 0
/*
* "$Id: testpatternl.l,v 1.17 2005/07/28 00:58:45 rlk Exp $"
*
@@ -611,7 +687,21 @@ do \
while (0)
-#line 615 "testpatternl.c"
+#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
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -619,65 +709,30 @@ do \
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int yywrap (void );
#else
-extern int yywrap YY_PROTO(( void ));
+extern int yywrap (void );
#endif
#endif
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
+ static void yyunput (int c,char *buf_ptr );
+
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen (yyconst char * );
#endif
#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-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
+#ifdef __cplusplus
+static int yyinput (void );
#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
+static int input (void );
#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. */
@@ -686,7 +741,6 @@ YY_MALLOC_DECL
#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().
@@ -699,9 +753,10 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
- int c = '*', n; \
+ int c = '*'; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -711,9 +766,22 @@ YY_MALLOC_DECL
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
+ 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); \
+ } \
+ }\
+\
+
#endif
/* No semi-colon after return; correct usage is to write "yyterminate();" -
@@ -734,12 +802,18 @@ YY_MALLOC_DECL
#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 int yylex YY_PROTO(( void ))
-#endif
+#define YY_DECL_IS_OURS 1
+
+extern int yylex (void);
+
+#define YY_DECL int yylex (void)
+#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
@@ -756,27 +830,29 @@ YY_MALLOC_DECL
#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 769 "testpatternl.c"
+#line 845 "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;
@@ -784,34 +860,36 @@ YY_DECL
if ( ! yyout )
yyout = stdout;
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ 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 )
{
@@ -828,24 +906,22 @@ 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:
@@ -1069,6 +1145,7 @@ 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;
@@ -1084,6 +1161,7 @@ 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++;
@@ -1093,33 +1171,33 @@ YY_RULE_SETUP
#line 125 "testpatternl.l"
ECHO;
YY_BREAK
-#line 1097 "testpatternl.c"
+#line 1175 "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->yy_buffer_status == YY_BUFFER_NEW )
+ if ( YY_CURRENT_BUFFER_LVALUE->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->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ (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;
}
/* Note that here we test for yy_c_buf_p "<=" to the position
@@ -1129,13 +1207,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->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->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
@@ -1148,30 +1226,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
@@ -1182,7 +1260,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;
@@ -1190,30 +1268,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->yy_ch_buf[yy_n_chars];
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->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;
@@ -1224,8 +1302,7 @@ 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
*
@@ -1234,21 +1311,20 @@ 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()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
+static int yy_get_next_buffer (void)
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->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->yy_ch_buf[yy_n_chars + 1] )
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
- if ( yy_current_buffer->yy_fill_buffer == 0 )
+ if ( YY_CURRENT_BUFFER_LVALUE->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.
@@ -1268,34 +1344,30 @@ static int yy_get_next_buffer()
/* 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->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ if ( YY_CURRENT_BUFFER_LVALUE->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->yy_n_chars = yy_n_chars = 0;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
else
{
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ size_t num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
-#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 )
{
@@ -1308,8 +1380,7 @@ static int yy_get_next_buffer()
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
}
else
/* Can't grow it, we don't own it. */
@@ -1319,35 +1390,35 @@ static int yy_get_next_buffer()
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->yy_buf_size -
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->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->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), num_to_read );
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->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->yy_buffer_status =
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
}
}
@@ -1355,32 +1426,31 @@ static int yy_get_next_buffer()
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- 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;
+ (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;
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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()
- {
+ static yy_state_type yy_get_previous_state (void)
+{
register yy_state_type yy_current_state;
register char *yy_cp;
+
+ yy_current_state = (yy_start);
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ 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 )
{
@@ -1392,30 +1462,23 @@ static yy_state_type yy_get_previous_state()
}
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 );
*/
-
-#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
- {
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
+{
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 )
{
@@ -1427,80 +1490,73 @@ yy_state_type yy_current_state;
yy_is_jam = (yy_current_state == 232);
return yy_is_jam ? 0 : yy_current_state;
- }
-
+}
-#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;
+ static void yyunput (int c, register char * yy_bp )
+{
+ register char *yy_cp;
+
+ 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->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
+ 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 char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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;
+}
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
+#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput()
+ static int yyinput (void)
#else
-static int input()
+ static int input (void)
#endif
- {
- int c;
- *yy_c_buf_p = yy_hold_char;
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_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->yy_ch_buf[yy_n_chars] )
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->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()
@@ -1514,16 +1570,16 @@ static int input()
*/
/* Reset buffer status. */
- yyrestart( yyin );
+ yyrestart(yyin );
- /* fall through */
+ /*FALLTHROUGH*/
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();
@@ -1533,90 +1589,92 @@ static int input()
}
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;
- }
-
-
-#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 );
+}
+#endif /* ifndef YY_NO_INPUT */
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
+/** 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 );
}
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
+ yy_load_buffer_state( );
+}
-#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 )
+/** 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 )
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->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
+ *(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_current_buffer = new_buffer;
- yy_load_buffer_state();
+ YY_CURRENT_BUFFER_LVALUE = 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;
- }
-
-
-#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;
- }
+ (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);
+}
-#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
- {
+/** 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 )
+{
YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -1625,80 +1683,75 @@ int size;
/* 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 *) yy_flex_alloc( b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc(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;
- }
-
+}
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
+/** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+{
+
if ( ! b )
return;
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
+ yyfree((void *) b->yy_ch_buf );
-#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
+ yyfree((void *) b );
+}
+#ifndef __cplusplus
+extern int isatty (int );
+#endif /* __cplusplus */
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a yyrestart() or at EOF.
+ */
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
- {
- yy_flush_buffer( b );
+{
+ int oerrno = errno;
+
+ yy_flush_buffer(b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
-#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
- }
-
+ /* 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;
+ }
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+
+ errno = oerrno;
+}
- {
- if ( ! b )
+/** 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 )
return;
b->yy_n_chars = 0;
@@ -1715,29 +1768,121 @@ YY_BUFFER_STATE b;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
+ 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;
+ }
-#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 ((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 )
+{
+ 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) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
@@ -1751,47 +1896,43 @@ 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
-
-
-#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
+}
+/** 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
+ * @param yy_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) );
+}
-#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
- {
+/** 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 )
+{
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 *) yy_flex_alloc( n );
+ buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
@@ -1800,7 +1941,7 @@ 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()" );
@@ -1810,148 +1951,164 @@ int len;
b->yy_is_our_buffer = 1;
return b;
- }
-#endif
-
+}
-#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;
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+/* Redefine yyless() so it works in section 3 code. */
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, 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 )
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+/* Accessor methods (get/set functions) to struct members. */
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
+/** Get the current line number.
+ *
+ */
+int yyget_lineno (void)
+{
+
+ return yylineno;
+}
- BEGIN(new_state);
- }
-#endif
+/** Get the input stream.
+ *
+ */
+FILE *yyget_in (void)
+{
+ return yyin;
+}
+/** Get the output stream.
+ *
+ */
+FILE *yyget_out (void)
+{
+ return yyout;
+}
-#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 length of the current token.
+ *
+ */
+int yyget_leng (void)
+{
+ return yyleng;
+}
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
+/** Get the current token.
+ *
+ */
+char *yyget_text (void)
+{
+ return yytext;
+}
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void yyset_lineno (int line_number )
+{
+
+ yylineno = line_number;
+}
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#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 ;
+}
-#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 );
- }
+void yyset_out (FILE * out_str )
+{
+ yyout = out_str ;
+}
+int yyget_debug (void)
+{
+ return yy_flex_debug;
+}
+void yyset_debug (int bdebug )
+{
+ yy_flex_debug = bdebug ;
+}
-/* Redefine yyless() so it works in section 3 code. */
+/* 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();
+ }
-#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 )
+ /* Destroy the stack itself. */
+ yyfree((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+ return 0;
+}
-/* Internal utility routines. */
+/*
+ * Internal utility routines.
+ */
#ifndef yytext_ptr
-#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
- {
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
register int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i )
s1[i] = s2[i];
- }
+}
#endif
#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
+static int yy_flex_strlen (yyconst char * s )
+{
register int n;
- for ( n = 0; s[n]; ++n )
+ for ( n = 0; s[n]; ++n )
;
return n;
- }
+}
#endif
-
-#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
- {
+void *yyalloc (yy_size_t size )
+{
return (void *) malloc( 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
- {
+void *yyrealloc (void * ptr, yy_size_t size )
+{
/* 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
@@ -1960,23 +2117,25 @@ yy_size_t size;
* as though doing an assignment.
*/
return (void *) realloc( (char *) ptr, size );
- }
+}
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+void yyfree (void * ptr )
+{
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+}
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
+#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_DECL_IS_OURS
+#undef YY_DECL_IS_OURS
+#undef YY_DECL
#endif
#line 125 "testpatternl.l"
diff --git a/src/testpattern/testpatterny.c b/src/testpattern/testpatterny.c
index ede6285..cd1c6d3 100644
--- a/src/testpattern/testpatterny.c
+++ b/src/testpattern/testpatterny.c
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -36,6 +36,9 @@
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -99,6 +102,7 @@
END = 301
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tSTRING 260
@@ -228,6 +232,11 @@ find_color(const char *name)
# define YYERROR_VERBOSE 0
#endif
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -240,22 +249,48 @@ typedef int YYSTYPE;
/* Copy the second part of user declarations. */
-/* Line 214 of yacc.c. */
-#line 244 "testpatterny.c"
+/* Line 219 of yacc.c. */
+#line 254 "testpatterny.c"
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
# endif
# endif
# endif
@@ -264,25 +299,51 @@ typedef int YYSTYPE;
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+# endif
# else
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
- || (YYSTYPE_IS_TRIVIAL)))
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
+ short int yyss;
YYSTYPE yyvs;
};
@@ -292,20 +353,20 @@ 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) + sizeof (YYSTYPE)) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if 1 < __GNUC__
+# if defined (__GNUC__) && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
@@ -334,7 +395,7 @@ union yyalloc
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
- typedef short yysigned_char;
+ typedef short int yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
@@ -355,7 +416,7 @@ union yyalloc
#define YYUNDEFTOK 2
#define YYMAXUTOK 301
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -397,7 +458,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 yyprhs[] =
+static const unsigned short int yyprhs[] =
{
0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
19, 22, 25, 28, 31, 34, 37, 41, 43, 45,
@@ -450,7 +511,7 @@ static const yysigned_char yyrhs[] =
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned short yyrline[] =
+static const unsigned short int yyrline[] =
{
0, 139, 139, 139, 139, 139, 140, 140, 140, 140,
143, 155, 167, 179, 191, 203, 215, 227, 227, 227,
@@ -467,38 +528,38 @@ static const unsigned short yyrline[] =
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
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 yytoknum[] =
+static const unsigned short int yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
@@ -567,7 +628,7 @@ static const unsigned char yydefact[] =
};
/* YYDEFGOTO[NTERM-NUM]. */
-static const short yydefgoto[] =
+static const short int yydefgoto[] =
{
-1, 137, 85, 86, 87, 88, 89, 90, 91, 92,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
@@ -581,7 +642,7 @@ static const short yydefgoto[] =
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -131
-static const short yypact[] =
+static const short int yypact[] =
{
-131, -14, 16, 56, 41, 25, 36, 38, 53, 66,
67, 69, 70, 77, 78, 79, 81, 39, 22, 80,
@@ -603,7 +664,7 @@ static const short yypact[] =
};
/* YYPGOTO[NTERM-NUM]. */
-static const short yypgoto[] =
+static const short int yypgoto[] =
{
-131, 52, -131, -131, -131, -131, -131, -131, -131, -131,
-131, -131, -131, -131, -131, -131, -131, -131, -131, -131,
@@ -678,22 +739,6 @@ static const unsigned char yystos[] =
4, 4, 4, 4, 79, 4, 4, 4, 4, 4
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -701,7 +746,8 @@ static const unsigned char yystos[] =
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#define YYERROR goto yyerrorlab
+
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
@@ -722,26 +768,59 @@ do \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up");\
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run). */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#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) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
+
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -764,36 +843,30 @@ do { \
YYFPRINTF Args; \
} while (0)
-# define YYDSYMPRINT(Args) \
-do { \
- if (yydebug) \
- yysymprint Args; \
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location) \
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Token, Value); \
+ yysymprint (stderr, \
+ Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded). |
+| TOP (included). |
`------------------------------------------------------------------*/
#if defined (__STDC__) || defined (__cplusplus)
static void
-yy_stack_print (short *bottom, short *top)
+yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
- short *bottom;
- short *top;
+ short int *bottom;
+ short int *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
@@ -823,13 +896,13 @@ yy_reduce_print (yyrule)
#endif
{
int yyi;
- unsigned int yylineno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
+ yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
}
# define YY_REDUCE_PRINT(Rule) \
@@ -843,8 +916,7 @@ do { \
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -859,13 +931,9 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
@@ -887,7 +955,7 @@ yystrlen (yystr)
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
@@ -912,8 +980,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -923,7 +991,55 @@ yystpcpy (yydest, yysrc)
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
@@ -947,15 +1063,15 @@ yysymprint (yyoutput, yytype, yyvaluep)
(void) yyvaluep;
if (yytype < YYNTOKENS)
- {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- }
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
switch (yytype)
{
default:
@@ -971,10 +1087,11 @@ yysymprint (yyoutput, yytype, yyvaluep)
#if defined (__STDC__) || defined (__cplusplus)
static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
-yydestruct (yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
@@ -982,6 +1099,10 @@ yydestruct (yytype, yyvaluep)
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
switch (yytype)
{
@@ -1009,10 +1130,10 @@ int yyparse ();
-/* The lookahead symbol. */
+/* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
@@ -1038,17 +1159,17 @@ yyparse (void)
#else
int
yyparse ()
-
+ ;
#endif
#endif
{
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
+ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
/* Three stacks and their tools:
@@ -1060,14 +1181,14 @@ yyparse ()
to reallocate them elsewhere. */
/* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
@@ -1124,14 +1245,14 @@ yyparse ()
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1142,21 +1263,21 @@ yyparse ()
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1188,18 +1309,18 @@ yyparse ()
yybackup:
/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
+/* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1214,7 +1335,7 @@ yybackup:
else
{
yytoken = YYTRANSLATE (yychar);
- YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1234,8 +1355,8 @@ yybackup:
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
@@ -1288,12 +1409,12 @@ yyreduce:
#line 144 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>cmykspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>cmykspec %d\n", (yyvsp[0].ival));
global_image_type = "CMYK";
global_channel_depth = 4;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[0].ival) == 8 || (yyvsp[0].ival) == 16)
+ global_bit_depth = (yyvsp[0].ival);
}
break;
@@ -1301,12 +1422,12 @@ yyreduce:
#line 156 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>kcmyspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>kcmyspec %d\n", (yyvsp[0].ival));
global_image_type = "KCMY";
global_channel_depth = 4;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[0].ival) == 8 || (yyvsp[0].ival) == 16)
+ global_bit_depth = (yyvsp[0].ival);
}
break;
@@ -1314,12 +1435,12 @@ yyreduce:
#line 168 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>rgbspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>rgbspec %d\n", (yyvsp[0].ival));
global_image_type = "RGB";
global_channel_depth = 3;
global_invert_data = 1;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[0].ival) == 8 || (yyvsp[0].ival) == 16)
+ global_bit_depth = (yyvsp[0].ival);
}
break;
@@ -1327,12 +1448,12 @@ yyreduce:
#line 180 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>cmyspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>cmyspec %d\n", (yyvsp[0].ival));
global_image_type = "CMY";
global_channel_depth = 3;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[0].ival) == 8 || (yyvsp[0].ival) == 16)
+ global_bit_depth = (yyvsp[0].ival);
}
break;
@@ -1340,12 +1461,12 @@ yyreduce:
#line 192 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>grayspec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>grayspec %d\n", (yyvsp[0].ival));
global_image_type = "Grayscale";
global_channel_depth = 1;
global_invert_data = 0;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[0].ival) == 8 || (yyvsp[0].ival) == 16)
+ global_bit_depth = (yyvsp[0].ival);
}
break;
@@ -1353,12 +1474,12 @@ yyreduce:
#line 204 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>whitespec %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>whitespec %d\n", (yyvsp[0].ival));
global_image_type = "Whitescale";
global_channel_depth = 1;
global_invert_data = 1;
- if (yyvsp[0].ival == 8 || yyvsp[0].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ if ((yyvsp[0].ival) == 8 || (yyvsp[0].ival) == 16)
+ global_bit_depth = (yyvsp[0].ival);
}
break;
@@ -1366,23 +1487,23 @@ yyreduce:
#line 216 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>extendedspec %d\n", yyvsp[-1].ival);
+ fprintf(stderr, ">>>extendedspec %d\n", (yyvsp[-1].ival));
global_image_type = "Raw";
global_invert_data = 0;
- global_channel_depth = yyvsp[-1].ival;
- if (yyvsp[-1].ival == 8 || yyvsp[-1].ival == 16)
- global_bit_depth = yyvsp[0].ival;
+ global_channel_depth = (yyvsp[-1].ival);
+ if ((yyvsp[-1].ival) == 8 || (yyvsp[-1].ival) == 16)
+ global_bit_depth = (yyvsp[0].ival);
}
break;
case 25:
#line 234 "testpatterny.y"
{
- int channel = find_color(yyvsp[-1].sval);
+ int channel = find_color((yyvsp[-1]).sval);
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>level %s %f\n", yyvsp[-1].sval, yyvsp[0].dval);
+ fprintf(stderr, ">>>level %s %f\n", (yyvsp[-1]).sval, (yyvsp[0].dval));
if (channel >= 0)
- global_levels[channel] = yyvsp[0].dval;
+ global_levels[channel] = (yyvsp[0].dval);
}
break;
@@ -1390,20 +1511,20 @@ yyreduce:
#line 244 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>channel_level %d %f\n", yyvsp[-1].ival, yyvsp[0].dval);
- if (yyvsp[-1].ival >= 0 && yyvsp[-1].ival <= STP_CHANNEL_LIMIT)
- global_levels[yyvsp[-1].ival] = yyvsp[0].dval;
+ fprintf(stderr, ">>>channel_level %d %f\n", (yyvsp[-1].ival), (yyvsp[0].dval));
+ if ((yyvsp[-1].ival) >= 0 && (yyvsp[-1].ival) <= STP_CHANNEL_LIMIT)
+ global_levels[(yyvsp[-1].ival)] = (yyvsp[0].dval);
}
break;
case 27:
#line 253 "testpatterny.y"
{
- int channel = find_color(yyvsp[-1].sval);
+ int channel = find_color((yyvsp[-1]).sval);
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>gamma %s %f\n", yyvsp[-1].sval, yyvsp[0].dval);
+ fprintf(stderr, ">>>gamma %s %f\n", (yyvsp[-1]).sval, (yyvsp[0].dval));
if (channel >= 0)
- global_gammas[channel] = yyvsp[0].dval;
+ global_gammas[channel] = (yyvsp[0].dval);
}
break;
@@ -1411,9 +1532,9 @@ yyreduce:
#line 263 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>channel_gamma %d %f\n", yyvsp[-1].ival, yyvsp[0].dval);
- if (yyvsp[-1].ival >= 0 && yyvsp[-1].ival <= STP_CHANNEL_LIMIT)
- global_gammas[yyvsp[-1].ival] = yyvsp[0].dval;
+ fprintf(stderr, ">>>channel_gamma %d %f\n", (yyvsp[-1].ival), (yyvsp[0].dval));
+ if ((yyvsp[-1].ival) >= 0 && (yyvsp[-1].ival) <= STP_CHANNEL_LIMIT)
+ global_gammas[(yyvsp[-1].ival)] = (yyvsp[0].dval);
}
break;
@@ -1421,8 +1542,8 @@ yyreduce:
#line 272 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>global_gamma %f\n", yyvsp[0].dval);
- global_gamma = yyvsp[0].dval;
+ fprintf(stderr, ">>>global_gamma %f\n", (yyvsp[0].dval));
+ global_gamma = (yyvsp[0].dval);
}
break;
@@ -1430,8 +1551,8 @@ yyreduce:
#line 279 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>steps %d\n", yyvsp[0].ival);
- global_steps = yyvsp[0].ival;
+ fprintf(stderr, ">>>steps %d\n", (yyvsp[0].ival));
+ global_steps = (yyvsp[0].ival);
}
break;
@@ -1439,8 +1560,8 @@ yyreduce:
#line 286 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>ink_limit %f\n", yyvsp[0].dval);
- global_ink_limit = yyvsp[0].dval;
+ fprintf(stderr, ">>>ink_limit %f\n", (yyvsp[0].dval));
+ global_ink_limit = (yyvsp[0].dval);
}
break;
@@ -1448,9 +1569,9 @@ yyreduce:
#line 293 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>printer %s\n", yyvsp[0].sval);
- global_printer = strdup(yyvsp[0].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, ">>>printer %s\n", (yyvsp[0].sval));
+ global_printer = strdup((yyvsp[0].sval));
+ free((yyvsp[0].sval));
}
break;
@@ -1458,9 +1579,9 @@ yyreduce:
#line 302 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>page_size_name %s\n", yyvsp[0].sval);
- stp_set_string_parameter(global_vars, "PageSize", yyvsp[0].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, ">>>page_size_name %s\n", (yyvsp[0].sval));
+ stp_set_string_parameter(global_vars, "PageSize", (yyvsp[0].sval));
+ free((yyvsp[0].sval));
}
break;
@@ -1468,9 +1589,9 @@ yyreduce:
#line 311 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>page_size_custom %d %d\n", yyvsp[-1].ival, yyvsp[0].ival);
- stp_set_page_width(global_vars, yyvsp[-1].ival);
- stp_set_page_height(global_vars, yyvsp[0].ival);
+ fprintf(stderr, ">>>page_size_custom %d %d\n", (yyvsp[-1].ival), (yyvsp[0].ival));
+ stp_set_page_width(global_vars, (yyvsp[-1].ival));
+ stp_set_page_height(global_vars, (yyvsp[0].ival));
}
break;
@@ -1478,10 +1599,10 @@ yyreduce:
#line 323 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>parameter_string %s %s\n", yyvsp[-1].sval, yyvsp[0].sval);
- stp_set_string_parameter(global_vars, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, ">>>parameter_string %s %s\n", (yyvsp[-1].sval), (yyvsp[0].sval));
+ stp_set_string_parameter(global_vars, (yyvsp[-1].sval), (yyvsp[0].sval));
+ free((yyvsp[-1].sval));
+ free((yyvsp[0].sval));
}
break;
@@ -1489,9 +1610,9 @@ yyreduce:
#line 333 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>parameter_int %s %d\n", yyvsp[-1].sval, yyvsp[0].ival);
- stp_set_int_parameter(global_vars, yyvsp[-1].sval, yyvsp[0].ival);
- free(yyvsp[-1].sval);
+ fprintf(stderr, ">>>parameter_int %s %d\n", (yyvsp[-1].sval), (yyvsp[0].ival));
+ stp_set_int_parameter(global_vars, (yyvsp[-1].sval), (yyvsp[0].ival));
+ free((yyvsp[-1].sval));
}
break;
@@ -1499,9 +1620,9 @@ yyreduce:
#line 342 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>parameter_float %s %f\n", yyvsp[-1].sval, yyvsp[0].dval);
- stp_set_float_parameter(global_vars, yyvsp[-1].sval, yyvsp[0].dval);
- free(yyvsp[-1].sval);
+ fprintf(stderr, ">>>parameter_float %s %f\n", (yyvsp[-1].sval), (yyvsp[0].dval));
+ stp_set_float_parameter(global_vars, (yyvsp[-1].sval), (yyvsp[0].dval));
+ free((yyvsp[-1].sval));
}
break;
@@ -1509,8 +1630,8 @@ yyreduce:
#line 367 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>density %f\n", yyvsp[0].dval);
- global_density = yyvsp[0].dval;
+ fprintf(stderr, ">>>density %f\n", (yyvsp[0].dval));
+ global_density = (yyvsp[0].dval);
}
break;
@@ -1518,8 +1639,8 @@ yyreduce:
#line 374 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>top %f\n", yyvsp[0].dval);
- global_xtop = yyvsp[0].dval;
+ fprintf(stderr, ">>>top %f\n", (yyvsp[0].dval));
+ global_xtop = (yyvsp[0].dval);
}
break;
@@ -1527,8 +1648,8 @@ yyreduce:
#line 381 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>left %f\n", yyvsp[0].dval);
- global_xleft = yyvsp[0].dval;
+ fprintf(stderr, ">>>left %f\n", (yyvsp[0].dval));
+ global_xleft = (yyvsp[0].dval);
}
break;
@@ -1536,8 +1657,8 @@ yyreduce:
#line 388 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>hsize %f\n", yyvsp[0].dval);
- global_hsize = yyvsp[0].dval;
+ fprintf(stderr, ">>>hsize %f\n", (yyvsp[0].dval));
+ global_hsize = (yyvsp[0].dval);
}
break;
@@ -1545,8 +1666,8 @@ yyreduce:
#line 395 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>vsize %f\n", yyvsp[0].dval);
- global_vsize = yyvsp[0].dval;
+ fprintf(stderr, ">>>vsize %f\n", (yyvsp[0].dval));
+ global_vsize = (yyvsp[0].dval);
}
break;
@@ -1554,8 +1675,8 @@ yyreduce:
#line 402 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>blackline %d\n", yyvsp[0].ival);
- global_noblackline = !(yyvsp[0].ival);
+ fprintf(stderr, ">>>blackline %d\n", (yyvsp[0].ival));
+ global_noblackline = !((yyvsp[0].ival));
}
break;
@@ -1563,13 +1684,13 @@ yyreduce:
#line 410 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>color_block1 %f %f %f (%d)\n", yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval,
+ fprintf(stderr, ">>>color_block1 %f %f %f (%d)\n", (yyvsp[-2].dval), (yyvsp[-1].dval), (yyvsp[0].dval),
current_index);
if (current_index < STP_CHANNEL_LIMIT)
{
- current_testpattern->d.p.mins[current_index] = yyvsp[-2].dval;
- current_testpattern->d.p.vals[current_index] = yyvsp[-1].dval;
- current_testpattern->d.p.gammas[current_index] = yyvsp[0].dval;
+ current_testpattern->d.p.mins[current_index] = (yyvsp[-2].dval);
+ current_testpattern->d.p.vals[current_index] = (yyvsp[-1].dval);
+ current_testpattern->d.p.gammas[current_index] = (yyvsp[0].dval);
current_index++;
}
}
@@ -1578,14 +1699,14 @@ yyreduce:
case 55:
#line 434 "testpatterny.y"
{
- int channel = find_color(yyvsp[-3].sval);
+ int channel = find_color((yyvsp[-3]).sval);
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>color_block2a %s %f %f %f\n", yyvsp[-3].sval, yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval);
+ fprintf(stderr, ">>>color_block2a %s %f %f %f\n", (yyvsp[-3]).sval, (yyvsp[-2].dval), (yyvsp[-1].dval), (yyvsp[0].dval));
if (channel >= 0 && channel < STP_CHANNEL_LIMIT)
{
- current_testpattern->d.p.mins[channel] = yyvsp[-2].dval;
- current_testpattern->d.p.vals[channel] = yyvsp[-1].dval;
- current_testpattern->d.p.gammas[channel] = yyvsp[0].dval;
+ current_testpattern->d.p.mins[channel] = (yyvsp[-2].dval);
+ current_testpattern->d.p.vals[channel] = (yyvsp[-1].dval);
+ current_testpattern->d.p.gammas[channel] = (yyvsp[0].dval);
}
}
break;
@@ -1594,12 +1715,12 @@ yyreduce:
#line 448 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>color_block2b %d %f %f %f\n", yyvsp[-3].ival, yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval);
- if (yyvsp[-3].ival >= 0 && yyvsp[-3].ival < STP_CHANNEL_LIMIT)
+ fprintf(stderr, ">>>color_block2b %d %f %f %f\n", (yyvsp[-3].ival), (yyvsp[-2].dval), (yyvsp[-1].dval), (yyvsp[0].dval));
+ if ((yyvsp[-3].ival) >= 0 && (yyvsp[-3].ival) < STP_CHANNEL_LIMIT)
{
- current_testpattern->d.p.mins[yyvsp[-3].ival] = yyvsp[-2].dval;
- current_testpattern->d.p.vals[yyvsp[-3].ival] = yyvsp[-1].dval;
- current_testpattern->d.p.gammas[yyvsp[-3].ival] = yyvsp[0].dval;
+ current_testpattern->d.p.mins[(yyvsp[-3].ival)] = (yyvsp[-2].dval);
+ current_testpattern->d.p.vals[(yyvsp[-3].ival)] = (yyvsp[-1].dval);
+ current_testpattern->d.p.gammas[(yyvsp[-3].ival)] = (yyvsp[0].dval);
}
}
break;
@@ -1608,13 +1729,13 @@ yyreduce:
#line 473 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>patvars %f %f %f %f %f\n", yyvsp[-4].dval, yyvsp[-3].dval, yyvsp[-2].dval, yyvsp[-1].dval, yyvsp[0].dval);
+ fprintf(stderr, ">>>patvars %f %f %f %f %f\n", (yyvsp[-4].dval), (yyvsp[-3].dval), (yyvsp[-2].dval), (yyvsp[-1].dval), (yyvsp[0].dval));
current_testpattern->t = E_PATTERN;
- current_testpattern->d.p.lower = yyvsp[-4].dval;
- current_testpattern->d.p.upper = yyvsp[-3].dval;
- current_testpattern->d.p.levels[1] = yyvsp[-2].dval;
- current_testpattern->d.p.levels[2] = yyvsp[-1].dval;
- current_testpattern->d.p.levels[3] = yyvsp[0].dval;
+ current_testpattern->d.p.lower = (yyvsp[-4].dval);
+ current_testpattern->d.p.upper = (yyvsp[-3].dval);
+ current_testpattern->d.p.levels[1] = (yyvsp[-2].dval);
+ current_testpattern->d.p.levels[2] = (yyvsp[-1].dval);
+ current_testpattern->d.p.levels[3] = (yyvsp[0].dval);
current_testpattern = get_next_testpattern();
current_index = 0;
}
@@ -1640,9 +1761,9 @@ yyreduce:
#line 506 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>grid %d\n", yyvsp[0].ival);
+ fprintf(stderr, ">>>grid %d\n", (yyvsp[0].ival));
current_testpattern->t = E_GRID;
- current_testpattern->d.g.ticks = yyvsp[0].ival;
+ current_testpattern->d.g.ticks = (yyvsp[0].ival);
current_testpattern = get_next_testpattern();
current_index = 0;
}
@@ -1652,10 +1773,10 @@ yyreduce:
#line 517 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
- fprintf(stderr, ">>>image %d %d\n", yyvsp[-1].ival, yyvsp[0].ival);
+ fprintf(stderr, ">>>image %d %d\n", (yyvsp[-1].ival), (yyvsp[0].ival));
current_testpattern->t = E_IMAGE;
- current_testpattern->d.i.x = yyvsp[-1].ival;
- current_testpattern->d.i.y = yyvsp[0].ival;
+ current_testpattern->d.i.x = (yyvsp[-1].ival);
+ current_testpattern->d.i.y = (yyvsp[0].ival);
if (current_testpattern->d.i.x <= 0 ||
current_testpattern->d.i.y <= 0)
{
@@ -1669,50 +1790,50 @@ yyreduce:
case 70:
#line 534 "testpatterny.y"
{
- fprintf(stderr, yyvsp[0].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, (yyvsp[0].sval));
+ free((yyvsp[0].sval));
}
break;
case 71:
#line 540 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, (yyvsp[-1].sval), (yyvsp[0].sval));
+ free((yyvsp[-1].sval));
+ free((yyvsp[0].sval));
}
break;
case 72:
#line 547 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-2].sval, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-2].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, (yyvsp[-2].sval), (yyvsp[-1].sval), (yyvsp[0].sval));
+ free((yyvsp[-2].sval));
+ free((yyvsp[-1].sval));
+ free((yyvsp[0].sval));
}
break;
case 73:
#line 555 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-3].sval, yyvsp[-2].sval, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-3].sval);
- free(yyvsp[-2].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, (yyvsp[-3].sval), (yyvsp[-2].sval), (yyvsp[-1].sval), (yyvsp[0].sval));
+ free((yyvsp[-3].sval));
+ free((yyvsp[-2].sval));
+ free((yyvsp[-1].sval));
+ free((yyvsp[0].sval));
}
break;
case 74:
#line 564 "testpatterny.y"
{
- fprintf(stderr, yyvsp[-4].sval, yyvsp[-3].sval, yyvsp[-2].sval, yyvsp[-1].sval, yyvsp[0].sval);
- free(yyvsp[-4].sval);
- free(yyvsp[-3].sval);
- free(yyvsp[-2].sval);
- free(yyvsp[-1].sval);
- free(yyvsp[0].sval);
+ fprintf(stderr, (yyvsp[-4].sval), (yyvsp[-3].sval), (yyvsp[-2].sval), (yyvsp[-1].sval), (yyvsp[0].sval));
+ free((yyvsp[-4].sval));
+ free((yyvsp[-3].sval));
+ free((yyvsp[-2].sval));
+ free((yyvsp[-1].sval));
+ free((yyvsp[0].sval));
}
break;
@@ -1744,10 +1865,11 @@ yyreduce:
break;
+ default: break;
}
-/* Line 991 of yacc.c. */
-#line 1750 "testpatterny.c"
+/* Line 1126 of yacc.c. */
+#line 1873 "testpatterny.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1786,104 +1908,153 @@ yyerrlab:
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- char *yymsg;
- int yyx, yycount;
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
- yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
+ 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 = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("syntax error, unexpected ") + 1;
- yysize += yystrlen (yytname[yytype]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
{
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
-
- if (yycount < 5)
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
{
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
- yyerror ("syntax error; also virtual memory exhausted");
+ {
+ yyerror (YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror ("syntax error");
+ yyerror (YY_("syntax error"));
}
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
+ if (yychar <= YYEOF)
{
- /* 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;
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
}
-
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
- yychar = YYEMPTY;
-
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
- goto yyerrlab2;
+ goto yyerrlab1;
-/*----------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action. |
-`----------------------------------------------------*/
-yyerrlab1:
-
- /* 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
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (0)
+ goto yyerrorlab;
- goto yyerrlab2;
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrlab2 -- pop states until the error token can be shifted. |
-`---------------------------------------------------------------*/
-yyerrlab2:
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
@@ -1904,22 +2075,22 @@ yyerrlab2:
if (yyssp == yyss)
YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[yystate], yyvsp);
- yyvsp--;
- yystate = *--yyssp;
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
yystate = yyn;
goto yynewstate;
@@ -1939,16 +2110,25 @@ yyabortlab:
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
diff --git a/src/testpattern/testpatterny.h b/src/testpattern/testpatterny.h
index 2567b82..3b0a9f4 100644
--- a/src/testpattern/testpatterny.h
+++ b/src/testpattern/testpatterny.h
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -75,6 +75,7 @@
END = 301
};
#endif
+/* Tokens. */
#define tINT 258
#define tDOUBLE 259
#define tSTRING 260