summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2017-10-25 12:30:55 +0200
committerDidier Raboud <odyx@debian.org>2017-10-25 12:30:55 +0200
commit9dd97a029bf391c42b1dc76f2f7c5e386bb8f466 (patch)
treeec2b3262b629dd03af9924906ec3bdbd6c54ef83 /src
parent337ffefc0bdf252749c81ebb9255556d54c3e632 (diff)
New upstream version 5.3.0~pre1
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/Makefile.in2
-rw-r--r--src/cups/Makefile.am29
-rw-r--r--src/cups/Makefile.in29
-rw-r--r--src/cups/backend_canonselphy.c4
-rw-r--r--src/cups/backend_dnpds40.c8
-rw-r--r--src/cups/backend_mitsu70x.c78
-rw-r--r--src/cups/backend_sonyupdr150.c5
-rw-r--r--src/cups/blacklist4
-rw-r--r--src/cups/genppd.c74
-rw-r--r--src/cups/rastertoprinter.c152
-rwxr-xr-xsrc/cups/test-rastertogutenprint.in5
-rw-r--r--src/escputil/escputil.c33
-rw-r--r--src/gimp2/print.c15
-rw-r--r--src/gutenprintui2/panel.c110
-rw-r--r--src/gutenprintui2/plist.c18
-rw-r--r--src/gutenprintui2/printrc.h1
-rw-r--r--src/gutenprintui2/printrcl.c187
-rw-r--r--src/gutenprintui2/printrcl.l10
-rw-r--r--src/gutenprintui2/printrcy.c426
-rw-r--r--src/gutenprintui2/printrcy.h148
-rw-r--r--src/gutenprintui2/printrcy.y42
-rw-r--r--src/main/canon-printers.h12
-rw-r--r--src/main/escp2-driver.c44
-rw-r--r--src/main/mxml-file.c5
-rw-r--r--src/main/mxml-node.c11
-rw-r--r--src/main/print-canon.c77
-rw-r--r--src/main/print-dpl.c49
-rw-r--r--src/main/print-escp2-data.c24
-rw-r--r--src/main/print-escp2.c217
-rw-r--r--src/main/print-escp2.h94
-rw-r--r--src/main/print-lexmark.c64
-rw-r--r--src/main/print-olympus.c111
-rw-r--r--src/main/print-papers.c26
-rw-r--r--src/main/print-pcl.c70
-rw-r--r--src/main/print-ps.c108
-rw-r--r--src/main/print-raw.c15
-rw-r--r--src/main/print-vars.c70
-rw-r--r--src/main/printers.c39
-rw-r--r--src/main/xml.c12
-rw-r--r--src/testpattern/printer_options.c12
-rw-r--r--src/testpattern/run-testpattern-2.in306
-rw-r--r--src/testpattern/testpattern.c61
-rw-r--r--src/testpattern/testpattern.h1
-rw-r--r--src/testpattern/testpatternl.c645
-rw-r--r--src/testpattern/testpatternl.l1
-rw-r--r--src/testpattern/testpatterny.c631
-rw-r--r--src/testpattern/testpatterny.h22
-rw-r--r--src/testpattern/testpatterny.y10
-rw-r--r--src/xml/escp2/model/Makefile.am4
-rw-r--r--src/xml/escp2/model/Makefile.in4
-rw-r--r--src/xml/escp2/model/model_130.xml160
-rw-r--r--src/xml/escp2/model/model_131.xml139
-rw-r--r--src/xml/printers.xml130
54 files changed, 2581 insertions, 1975 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b6d6f78..a9425ff 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,8 +23,8 @@ include $(top_srcdir)/scripts/global.mk
SUBDIRS = \
main \
xml \
- gutenprintui2 \
escputil \
+ gutenprintui2 \
gimp2 \
cups \
testpattern
diff --git a/src/Makefile.in b/src/Makefile.in
index 078e2c4..e89a66d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -410,8 +410,8 @@ GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la
SUBDIRS = \
main \
xml \
- gutenprintui2 \
escputil \
+ gutenprintui2 \
gimp2 \
cups \
testpattern
diff --git a/src/cups/Makefile.am b/src/cups/Makefile.am
index 62ce028..4ef097d 100644
--- a/src/cups/Makefile.am
+++ b/src/cups/Makefile.am
@@ -248,6 +248,11 @@ ppd-nonls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
$(MAKE) ppd-catalog-clean
LC_ALL= LANG= LANGUAGE= $(STP_NONLS_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ @WHICH_PPDS@ $(EXTRA_GENPPD_OPTS) -l C -p ppd/C
+ppd-nonls-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
+ $(mkdir_p) ppd/C
+ $(MAKE) ppd-catalog-clean
+ LC_ALL= LANG= LANGUAGE= $(STP_NONLS_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ @WHICH_PPDS@ $(EXTRA_GENPPD_OPTS) -l C -p ppd/C -a
+
ppd-global: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
@echo "Global PPDs:"
$(mkdir_p) ppd/Global
@@ -255,6 +260,13 @@ ppd-global: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global
$(MAKE) ppd-catalog-clean
+ppd-global-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
+ @echo "Global PPDs:"
+ $(mkdir_p) ppd/Global
+ $(MAKE) ppd-catalog
+ LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -a
+ $(MAKE) ppd-catalog-clean
+
ppd-global-ln: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
@echo "Global PPDs (localized numbers for testing):"
$(mkdir_p) ppd/Global
@@ -262,6 +274,13 @@ ppd-global-ln: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -N
$(MAKE) ppd-catalog-clean
+ppd-global-ln-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
+ @echo "Global PPDs (localized numbers for testing):"
+ $(mkdir_p) ppd/Global
+ $(MAKE) ppd-catalog
+ LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -N -a
+ $(MAKE) ppd-catalog-clean
+
ppd-nls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ ppd-nonls
$(mkdir_p) ppd
$(MAKE) ppd-catalog
@@ -272,6 +291,16 @@ ppd-nls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ ppd-nonls
done
$(MAKE) ppd-catalog-clean
+ppd-nls-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ ppd-nonls
+ $(mkdir_p) ppd
+ $(MAKE) ppd-catalog
+ for language in `$(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ -L` ; do \
+ $(mkdir_p) ppd/$$language ; \
+ echo -n "$$language: " ; \
+ LC_ALL=$$language LANG=$$language LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -l $$language -p ppd/$$language -a; \
+ done
+ $(MAKE) ppd-catalog-clean
+
dist-hook:
for dir in commands ; do \
if test -d $(srcdir)/$$dir ; then \
diff --git a/src/cups/Makefile.in b/src/cups/Makefile.in
index 27bcc47..04419cb 100644
--- a/src/cups/Makefile.in
+++ b/src/cups/Makefile.in
@@ -2019,6 +2019,11 @@ ppd-nonls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
$(MAKE) ppd-catalog-clean
LC_ALL= LANG= LANGUAGE= $(STP_NONLS_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ @WHICH_PPDS@ $(EXTRA_GENPPD_OPTS) -l C -p ppd/C
+ppd-nonls-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
+ $(mkdir_p) ppd/C
+ $(MAKE) ppd-catalog-clean
+ LC_ALL= LANG= LANGUAGE= $(STP_NONLS_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ @WHICH_PPDS@ $(EXTRA_GENPPD_OPTS) -l C -p ppd/C -a
+
ppd-global: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
@echo "Global PPDs:"
$(mkdir_p) ppd/Global
@@ -2026,6 +2031,13 @@ ppd-global: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global
$(MAKE) ppd-catalog-clean
+ppd-global-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
+ @echo "Global PPDs:"
+ $(mkdir_p) ppd/Global
+ $(MAKE) ppd-catalog
+ LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -a
+ $(MAKE) ppd-catalog-clean
+
ppd-global-ln: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
@echo "Global PPDs (localized numbers for testing):"
$(mkdir_p) ppd/Global
@@ -2033,6 +2045,13 @@ ppd-global-ln: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -N
$(MAKE) ppd-catalog-clean
+ppd-global-ln-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@
+ @echo "Global PPDs (localized numbers for testing):"
+ $(mkdir_p) ppd/Global
+ $(MAKE) ppd-catalog
+ LC_ALL= LANG= LANGUAGE= $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -p ppd/Global -N -a
+ $(MAKE) ppd-catalog-clean
+
ppd-nls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ ppd-nonls
$(mkdir_p) ppd
$(MAKE) ppd-catalog
@@ -2043,6 +2062,16 @@ ppd-nls: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ ppd-nonls
done
$(MAKE) ppd-catalog-clean
+ppd-nls-a: cups-genppd.@GUTENPRINT_RELEASE_VERSION@ ppd-nonls
+ $(mkdir_p) ppd
+ $(MAKE) ppd-catalog
+ for language in `$(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ -L` ; do \
+ $(mkdir_p) ppd/$$language ; \
+ echo -n "$$language: " ; \
+ LC_ALL=$$language LANG=$$language LANGUAGE=$$language $(STP_ENV) ./cups-genppd.@GUTENPRINT_RELEASE_VERSION@ $(EXTRA_GENPPD_OPTS) @WHICH_PPDS@ -l $$language -p ppd/$$language -a; \
+ done
+ $(MAKE) ppd-catalog-clean
+
dist-hook:
for dir in commands ; do \
if test -d $(srcdir)/$$dir ; then \
diff --git a/src/cups/backend_canonselphy.c b/src/cups/backend_canonselphy.c
index 1fdd3a5..8b016df 100644
--- a/src/cups/backend_canonselphy.c
+++ b/src/cups/backend_canonselphy.c
@@ -978,7 +978,7 @@ top:
if (ctx->cp900)
state = S_PRINTER_CP900_FOOTER;
else
- state = S_FINISHED;
+ state = S_PRINTER_DONE;
}
break;
case S_PRINTER_CP900_FOOTER: {
@@ -1051,7 +1051,7 @@ static void canonselphy_cmdline(void)
struct dyesub_backend canonselphy_backend = {
.name = "Canon SELPHY CP/ES",
- .version = "0.93",
+ .version = "0.94",
.uri_prefix = "canonselphy",
.cmdline_usage = canonselphy_cmdline,
.cmdline_arg = canonselphy_cmdline_arg,
diff --git a/src/cups/backend_dnpds40.c b/src/cups/backend_dnpds40.c
index 43fac69..0484eb9 100644
--- a/src/cups/backend_dnpds40.c
+++ b/src/cups/backend_dnpds40.c
@@ -1,7 +1,7 @@
/*
* DNP DS40/DS80 Photo Printer CUPS backend -- libusb-1.0 version
*
- * (c) 2013-2016 Solomon Peachy <pizza@shaftnet.org>
+ * (c) 2013-2017 Solomon Peachy <pizza@shaftnet.org>
*
* Development of this backend was sponsored by:
*
@@ -698,9 +698,11 @@ static void dnpds40_attach(void *vctx, struct libusb_device_handle *dev,
if (FW_VER_CHECK(1,20))
ctx->supports_adv_fullcut = ctx->supports_advmatte = 1;
if (FW_VER_CHECK(1,30))
- ctx->supports_luster = ctx->supports_finematte = 1;
+ ctx->supports_luster = 1;
if (FW_VER_CHECK(1,33))
ctx->supports_media_ext = 1;
+ if (FW_VER_CHECK(1,52))
+ ctx->supports_finematte = 1;
break;
case P_DNP_DS820:
ctx->native_width = 2560;
@@ -2484,7 +2486,7 @@ static int dnpds40_cmdline_arg(void *vctx, int argc, char **argv)
/* Exported */
struct dyesub_backend dnpds40_backend = {
.name = "DNP DS40/DS80/DSRX1/DS620",
- .version = "0.91",
+ .version = "0.92",
.uri_prefix = "dnpds40",
.cmdline_usage = dnpds40_cmdline,
.cmdline_arg = dnpds40_cmdline_arg,
diff --git a/src/cups/backend_mitsu70x.c b/src/cups/backend_mitsu70x.c
index 60d99dd..00547a0 100644
--- a/src/cups/backend_mitsu70x.c
+++ b/src/cups/backend_mitsu70x.c
@@ -115,8 +115,8 @@ typedef int (*send_image_dataFN)(struct BandImage *out, void *context,
#define USB_PID_MITSU_D90 0x3B60
#define USB_VID_KODAK 0x040a
#define USB_PID_KODAK305 0x404f
-//#define USB_VID_FUJIFILM XXXXXX
-//#define USB_PID_FUJI_ASK300 XXXXXX
+#define USB_VID_FUJIFILM 0x04cb
+#define USB_PID_FUJI_ASK300 0x5006
/* Width of the laminate data file */
#define LAMINATE_STRIDE 1864
@@ -304,7 +304,7 @@ struct mitsu70x_jobs {
struct mitsu70x_status_deck {
uint8_t mecha_status[2];
- uint8_t temperature; /* D70 family only, K60 no */
+ uint8_t temperature; /* D70/D80 family only, K60 no? */
uint8_t error_status[3];
uint8_t rsvd_a[10]; /* K60 family [1] == temperature? [3:6] == lifetime prints in BCD */
@@ -328,20 +328,23 @@ struct mitsu70x_printerstatus_resp {
uint8_t memory;
uint8_t power;
uint8_t unk[20];
- uint8_t sleeptime; /* In minutes, 0-10 */
+ uint8_t sleeptime; /* In minutes, 0-60 */
uint8_t iserial; /* 0x00 for Enabled, 0x80 for Disabled */
uint8_t unk_b[12];
int16_t model[6]; /* LE, UTF-16 */
int16_t serno[6]; /* LE, UTF-16 */
struct mitsu70x_status_ver vers[7]; // components are 'MLRTF'
uint8_t null[2];
- uint8_t user_serno[6]; /* Supposedly, don't know how to set it */
+ uint8_t user_serno[6]; /* XXX Supposedly, don't know how to set it */
struct mitsu70x_status_deck lower;
struct mitsu70x_status_deck upper;
} __attribute__((packed));
+#define MK60S_0105_M_CSUM 0x148C /* 1.05 316M3 1 148C */
#define EK305_0104_M_CSUM 0x2878 /* 1.04 316F8 3 2878 */
+#define MD70X_0110_M_CSUM 0x064D /* 1.10 316V1 1 064D */
#define MD70X_0112_M_CSUM 0x9FC3 /* 1.12 316W1 1 9FC3 */
+#define FA300_XXXX_M_CSUM 0x4431 /* ?.?? 416J2 1 4431 */
struct mitsu70x_memorystatus_resp {
uint8_t hdr[3]; /* E4 56 33 */
@@ -355,7 +358,7 @@ struct mitsu70x_memorystatus_resp {
struct mitsu70x_hdr {
uint8_t hdr[4]; /* 1b 5a 54 XX */ // XXX also, seen 1b 5a 43!
uint16_t jobid;
- uint8_t rewind[2]; /* XXX K60/EK305/D80 only, 0 normally, 1 for "skip" ??? */
+ uint8_t rewind[2]; /* K60/EK305/D80 only */
uint8_t zero0[8];
uint16_t cols;
@@ -365,14 +368,14 @@ struct mitsu70x_hdr {
uint8_t speed;
uint8_t zero1[7];
- uint8_t deck; /* 0 = default, 1 = lower, 2 = upper */
+ uint8_t deck; /* 0 = default, 1 = lower, 2 = upper -- Non-D70/D707 is always '1' */
uint8_t zero2[7];
uint8_t laminate; /* 00 == on, 01 == off */
uint8_t laminate_mode; /* 00 == glossy, 02 == matte */
uint8_t zero3[6];
uint8_t multicut;
- uint8_t zero4[12];
+ uint8_t zero4[12]; /* NOTE: everything past this point is an extension */
uint8_t sharpen; /* 0-9. 5 is "normal", 0 is "off" */
uint8_t mode; /* 0 for cooked YMC planar, 1 for packed BGR */
uint8_t use_lut; /* in BGR mode, 0 disables, 1 enables */
@@ -444,6 +447,15 @@ static char *mitsu70x_jobstatuses(uint8_t *sts)
case JOB_STATUS1_END_OK:
return "Normal End";
case JOB_STATUS1_END_HEADER:
+ switch(sts[2]) {
+ case JOB_STATUS2_END_HEADER_ERROR:
+ return "Incorrect Header data (bad print size?)";
+ case JOB_STATUS2_END_HEADER_MEMORY:
+ return "Insufficient printer memory";
+ default:
+ return "Unknown 'End Header' status2";
+ }
+ break;
case JOB_STATUS1_END_PRINT:
switch(sts[2]) {
case JOB_STATUS2_END_PRINT_MEDIA:
@@ -619,7 +631,7 @@ static const char *mitsu70x_media_types(uint8_t brand, uint8_t type)
else if (brand == 0xff && type == 0x05)
return "CK-D769 (6x9)";
else if (brand == 0xff && type == 0x0f)
- return "CK-D768 (6x8)";
+ return "CK-D768/CK-D868 (6x8)";
else if (brand == 0x6c && type == 0x84)
return "Kodak 5R (5x7)";
else if (brand == 0x6c && type == 0x8f)
@@ -628,14 +640,21 @@ static const char *mitsu70x_media_types(uint8_t brand, uint8_t type)
return "CK-K57R (5x7)";
else if (brand == 0x61 && type == 0x8f)
return "CK-K76R (6x8)";
+ else if (brand == 0x7a && type == 0x01)
+ return "RL-CF900 (3.5x5)";
+ else if (brand == 0x7a && type == 0x02)
+ return "RK-CF800/4R (4x6)";
+ else if (brand == 0x7a && type == 0x04)
+ return "R2L-CF460/5R (5x7)";
+ else if (brand == 0x7a && type == 0x0f)
+ return "R68-CF400/6R (6x8)";
else
return "Unknown";
// Also CK-D715, CK-D718, CK-D720, CK-D723 (4x6,5x8,6x8,6x9) for D70-S model
// CK-D746-U for D70-U model
// CK-D820 (6x8) for D80-S model
-// CK-D868 (6x8) for D80 (non-S)
-// D90 can use _all_ of htese types except for the -U!
+// D90 can use _all_ of these types except for the -U!
}
@@ -893,16 +912,16 @@ repeat:
}
} else if (ctx->type == P_FUJI_ASK300) {
ctx->laminatefname = CORRTABLE_PATH "/ASK300M2.raw"; // Same as D70
- ctx->lutfname = CORRTABLE_PATH "/CPD70L01.lut"; // XXX guess, driver did not come with external LUT!
+// ctx->lutfname = CORRTABLE_PATH "/CPD70L01.lut"; // XXX guess, driver did not come with external LUT!
if (mhdr.speed == 3 || mhdr.speed == 4) {
mhdr.speed = 3; /* Super Fine */
ctx->cpcfname = CORRTABLE_PATH "/ASK300T3.cpc";
} else {
ctx->cpcfname = CORRTABLE_PATH "/ASK300T1.cpc";
}
- if (mhdr.hdr[3] != 0x01) {
+ if (mhdr.hdr[3] != 0x80) {
WARNING("Print job has wrong submodel specifier (%x)\n", mhdr.hdr[3]);
- mhdr.hdr[3] = 0x01;
+ mhdr.hdr[3] = 0x80;
}
}
if (!mhdr.use_lut)
@@ -1271,9 +1290,9 @@ static int mitsu70x_set_sleeptime(struct mitsu70x_ctx *ctx, uint8_t time)
uint8_t cmdbuf[4];
int ret;
- /* 10 minutes max, according to all docs. */
- if (time > 10)
- time = 10;
+ /* 60 minutes max, according to all docs. */
+ if (time > 60)
+ time = 60;
/* Send Parameter.. */
memset(cmdbuf, 0, 4);
@@ -1471,6 +1490,9 @@ top:
if (ctx->type == P_KODAK_305) {
if (be16_to_cpu(resp.vers[0].checksum) != EK305_0104_M_CSUM)
WARNING("Printer FW out of date. Highly recommend upgrading EK305 to v1.04!\n");
+ } else if (ctx->type == P_MITSU_K60) {
+ if (be16_to_cpu(resp.vers[0].checksum) != MK60S_0105_M_CSUM)
+ WARNING("Printer FW out of date. Highly recommend upgrading K60 to v1.05!\n");
} else if (ctx->type == P_MITSU_D70X) {
if (be16_to_cpu(resp.vers[0].checksum) != MD70X_0112_M_CSUM)
WARNING("Printer FW out of date. Highly recommend upgrading D70/D707 to v1.12!\n");
@@ -1602,11 +1624,19 @@ skip_status:
ctx->last_donor_l = donor_l;
ctx->last_donor_u = donor_u;
ATTR("marker-levels=%d,%d\n", donor_l, donor_u);
+ ATTR("marker-message='\"%d native prints remaining on %s media\"','\"%d native prints remaining on %s media\"'\n",
+ be16_to_cpu(resp.lower.remain),
+ mitsu70x_media_types(resp.lower.media_brand, resp.lower.media_type),
+ be16_to_cpu(resp.upper.remain),
+ mitsu70x_media_types(resp.upper.media_brand, resp.upper.media_type));
}
} else {
if (donor_l != ctx->last_donor_l) {
ctx->last_donor_l = donor_l;
ATTR("marker-levels=%d\n", donor_l);
+ ATTR("marker-message=\"%d native prints remaining on %s media\"\n",
+ be16_to_cpu(resp.lower.remain),
+ mitsu70x_media_types(resp.lower.media_brand, resp.lower.media_type));
}
}
@@ -1873,7 +1903,7 @@ static int mitsu70x_cmdline_arg(void *vctx, int argc, char **argv)
/* Exported */
struct dyesub_backend mitsu70x_backend = {
.name = "Mitsubishi CP-D70/D707/K60/D80",
- .version = "0.61",
+ .version = "0.66",
.uri_prefix = "mitsu70x",
.cmdline_usage = mitsu70x_cmdline,
.cmdline_arg = mitsu70x_cmdline_arg,
@@ -1889,7 +1919,7 @@ struct dyesub_backend mitsu70x_backend = {
{ USB_VID_MITSU, USB_PID_MITSU_D80, P_MITSU_D80, ""},
// { USB_VID_MITSU, USB_PID_MITSU_D90, P_MITSU_D90, ""},
{ USB_VID_KODAK, USB_PID_KODAK305, P_KODAK_305, ""},
-// { USB_VID_FUJIFILM, USB_PID_FUJI_ASK300, P_FUJI_ASK300, ""},
+ { USB_VID_FUJIFILM, USB_PID_FUJI_ASK300, P_FUJI_ASK300, ""},
{ 0, 0, 0, ""}
}
};
@@ -1913,23 +1943,23 @@ struct dyesub_backend mitsu70x_backend = {
1b 5a 54 PP JJ JJ RR RR 00 00 00 00 00 00 00 00
XX XX YY YY QQ QQ ZZ ZZ SS 00 00 00 00 00 00 00
UU 00 00 00 00 00 00 00 LL TT 00 00 00 00 00 00
- RR 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ MM 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
(padded by NULLs to a 512-byte boundary)
- PP == 0x01 on D70x/D80/ASK300, 0x00 on K60, 0x90 on K305
+ PP == 0x01 on D70x/D80, 0x00 on K60, 0x90 on K305, 0x80 on ASK300
JJ JJ == Job ID, can leave at 00 00
XX XX == columns
YY YY == rows
QQ QQ == lamination columns (equal to XX XX)
ZZ ZZ == lamination rows (YY YY + 12 on D70x/D80/ASK300, YY YY on others)
- RR RR == "rewind inhibit", 01 01 enabled, normally 00 00 (All but D70x)
+ RR RR == "rewind inhibit", 01 01 enabled, normally 00 00 (All but D70x/A300)
SS == Print mode: 00 = Fine, 03 = SuperFine (D70x/D80 only), 04 = UltraFine
(Matte requires Superfine or Ultrafine)
UU == 00 = Auto, 01 = Lower Deck (required for !D70x), 02 = Upper Deck
LL == lamination enable, 00 == on, 01 == off
- TT == lamination mode: 00 glossy, 02 matte.
- RR == 00 (normal), 01 = (Double-cut 4x6), 05 = (double-cut 2x6)
+ TT == lamination mode: 00 glossy, 02 matte
+ MM == 00 (normal), 01 = (Double-cut 4x6), 05 = (double-cut 2x6)
Data planes:
16-bit data, rounded up to 512-byte block (XX * YY * 2 bytes)
diff --git a/src/cups/backend_sonyupdr150.c b/src/cups/backend_sonyupdr150.c
index 622be40..dae8bf1 100644
--- a/src/cups/backend_sonyupdr150.c
+++ b/src/cups/backend_sonyupdr150.c
@@ -216,7 +216,7 @@ static int updr150_read_parse(void *vctx, int data_fd) {
static int updr150_main_loop(void *vctx, int copies) {
struct updr150_ctx *ctx = vctx;
- int i = 0, ret;
+ int i, ret;
if (!ctx)
return CUPS_BACKEND_FAILED;
@@ -228,6 +228,7 @@ static int updr150_main_loop(void *vctx, int copies) {
}
top:
+ i = 0;
while (i < ctx->datalen) {
uint32_t len;
memcpy(&len, ctx->databuf + i, sizeof(len));
@@ -276,7 +277,7 @@ static int updr150_cmdline_arg(void *vctx, int argc, char **argv)
struct dyesub_backend updr150_backend = {
.name = "Sony UP-DR150/UP-DR200/UP-CR10",
- .version = "0.18",
+ .version = "0.19",
.uri_prefix = "sonyupdr150",
.cmdline_arg = updr150_cmdline_arg,
.init = updr150_init,
diff --git a/src/cups/blacklist b/src/cups/blacklist
index ed9399f..0ca284c 100644
--- a/src/cups/blacklist
+++ b/src/cups/blacklist
@@ -214,3 +214,7 @@
# CIAAT Brava 21
0x10ce 0x001e blacklist
+
+# Fujifilm ASK-300
+0x04cb 0x5006 blacklist
+
diff --git a/src/cups/genppd.c b/src/cups/genppd.c
index 2e47f34..2ae4124 100644
--- a/src/cups/genppd.c
+++ b/src/cups/genppd.c
@@ -123,7 +123,7 @@ typedef struct /**** Media size values ****/
{
const char *name, /* Media size name */
*text; /* Media size text */
- int width, /* Media width */
+ stp_dimension_t width, /* Media width */
height, /* Media height */
left, /* Media left margin */
right, /* Media right margin */
@@ -1246,10 +1246,10 @@ print_page_sizes(gpFile fp, stp_vars_t *v, int simplified,
int num_opts;
paper_t *the_papers;
int i;
- int width, height, /* Page information */
+ stp_dimension_t width, height, /* Page information */
bottom, left,
top, right;
- int min_width, /* Min/max custom size */
+ stp_dimension_t min_width, /* Min/max custom size */
min_height,
max_width,
max_height;
@@ -1277,6 +1277,7 @@ print_page_sizes(gpFile fp, stp_vars_t *v, int simplified,
continue;
}
if (simplified && num_opts >= 10 &&
+ (!desc.deflt.str || strcmp(opt->name, desc.deflt.str) != 0) &&
(papersize->paper_unit == PAPERSIZE_ENGLISH_EXTENDED ||
papersize->paper_unit == PAPERSIZE_METRIC_EXTENDED))
continue;
@@ -1334,7 +1335,7 @@ print_page_sizes(gpFile fp, stp_vars_t *v, int simplified,
for (i = 0; i < cur_opt; i ++)
{
gpprintf(fp, "*PageSize %s", the_papers[i].name);
- gpprintf(fp, "/%s:\t\"<</PageSize[%d %d]/ImagingBBox null>>setpagedevice\"\n",
+ gpprintf(fp, "/%s:\t\"<</PageSize[%.3f %.3f]/ImagingBBox null>>setpagedevice\"\n",
the_papers[i].text, the_papers[i].width, the_papers[i].height);
}
gpputs(fp, "*CloseUI: *PageSize\n\n");
@@ -1349,7 +1350,7 @@ print_page_sizes(gpFile fp, stp_vars_t *v, int simplified,
for (i = 0; i < cur_opt; i ++)
{
gpprintf(fp, "*PageRegion %s", the_papers[i].name);
- gpprintf(fp, "/%s:\t\"<</PageSize[%d %d]/ImagingBBox null>>setpagedevice\"\n",
+ gpprintf(fp, "/%s:\t\"<</PageSize[%.3f %.3f]/ImagingBBox null>>setpagedevice\"\n",
the_papers[i].text, the_papers[i].width, the_papers[i].height);
}
gpputs(fp, "*CloseUI: *PageRegion\n\n");
@@ -1359,7 +1360,7 @@ print_page_sizes(gpFile fp, stp_vars_t *v, int simplified,
for (i = 0; i < cur_opt; i ++)
{
gpprintf(fp, "*ImageableArea %s", the_papers[i].name);
- gpprintf(fp, "/%s:\t\"%d %d %d %d\"\n", the_papers[i].text,
+ gpprintf(fp, "/%s:\t\"%.3f %.3f %.3f %.3f\"\n", the_papers[i].text,
the_papers[i].left, the_papers[i].bottom,
the_papers[i].right, the_papers[i].top);
}
@@ -1371,7 +1372,7 @@ print_page_sizes(gpFile fp, stp_vars_t *v, int simplified,
for (i = 0; i < cur_opt; i ++)
{
gpprintf(fp, "*PaperDimension %s", the_papers[i].name);
- gpprintf(fp, "/%s:\t\"%d %d\"\n",
+ gpprintf(fp, "/%s:\t\"%.3f %.3f\"\n",
the_papers[i].text, the_papers[i].width, the_papers[i].height);
}
gpputs(fp, "\n");
@@ -1391,14 +1392,14 @@ print_page_sizes(gpFile fp, stp_vars_t *v, int simplified,
if (right > width)
width = right;
- gpprintf(fp, "*MaxMediaWidth: \"%d\"\n", max_width);
- gpprintf(fp, "*MaxMediaHeight: \"%d\"\n", max_height);
- gpprintf(fp, "*HWMargins: %d %d %d %d\n",
+ gpprintf(fp, "*MaxMediaWidth: \"%.3f\"\n", max_width);
+ gpprintf(fp, "*MaxMediaHeight: \"%.3f\"\n", max_height);
+ gpprintf(fp, "*HWMargins: %.3f %.3f %.3f %.3f\n",
left, height - bottom, width - right, top);
gpputs(fp, "*CustomPageSize True: \"pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice\"\n");
- gpprintf(fp, "*ParamCustomPageSize Width: 1 points %d %d\n",
+ gpprintf(fp, "*ParamCustomPageSize Width: 1 points %.3f %.3f\n",
min_width, max_width);
- gpprintf(fp, "*ParamCustomPageSize Height: 2 points %d %d\n",
+ gpprintf(fp, "*ParamCustomPageSize Height: 2 points %.3f %.3f\n",
min_height, max_height);
gpputs(fp, "*ParamCustomPageSize WidthOffset: 3 points 0 0\n");
gpputs(fp, "*ParamCustomPageSize HeightOffset: 4 points 0 0\n");
@@ -1747,15 +1748,15 @@ print_one_option(gpFile fp, stp_vars_t *v, const stp_string_list_t *po,
gpprintf(fp, "*StpStp%s: %d %d %d %d %d %.3f %.3f %.3f\n",
desc->name, desc->p_type, desc->is_mandatory,
desc->p_class, desc->p_level, desc->channel,
- (double) desc->bounds.dimension.lower,
- (double) desc->bounds.dimension.upper,
- (double) desc->deflt.dimension);
+ desc->bounds.dimension.lower,
+ desc->bounds.dimension.upper,
+ desc->deflt.dimension);
if (desc->is_mandatory)
{
gpprintf(fp, "*DefaultStp%s: %d\n",
- desc->name, desc->deflt.dimension);
+ desc->name, (int) desc->deflt.dimension);
gpprintf(fp, "*StpDefaultStp%s: %d\n",
- desc->name, desc->deflt.dimension);
+ desc->name, (int) desc->deflt.dimension);
}
else
{
@@ -1765,8 +1766,8 @@ print_one_option(gpFile fp, stp_vars_t *v, const stp_string_list_t *po,
}
if (!skip_color)
{
- for (i = desc->bounds.dimension.lower;
- i <= desc->bounds.dimension.upper; i++)
+ for (i = (int) desc->bounds.dimension.lower;
+ i <= (int) desc->bounds.dimension.upper; i++)
{
snprintf(dimstr, sizeof(dimstr), _("%.1f mm"),
(double)i * 25.4 / 72.0);
@@ -1777,6 +1778,15 @@ print_one_option(gpFile fp, stp_vars_t *v, const stp_string_list_t *po,
print_close_ui = 0;
gpprintf(fp, "*CloseUI: *Stp%s\n\n", desc->name);
+ /*
+ * Add custom option code and value parameter...
+ */
+
+ gpprintf(fp, "*CustomStp%s True: \"pop\"\n", desc->name);
+ gpprintf(fp, "*ParamCustomStp%s Value/%s: 1 points %d %d\n\n",
+ desc->name, _("Value"), (int) desc->bounds.dimension.lower,
+ (int) desc->bounds.dimension.upper);
+
break;
case STP_PARAMETER_TYPE_INT:
gpprintf(fp, "*OPOptionHints Stp%s: \"input spinbox\"\n", lparam->name);
@@ -1892,14 +1902,16 @@ print_one_localization(gpFile fp, const stp_string_list_t *po,
gpprintf(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc->name,
"None", _("None"));
/* Unlike the other fields, dimensions are not strictly numbers */
- for (i = desc->bounds.dimension.lower;
- i <= desc->bounds.dimension.upper; i++)
+ for (i = (int) desc->bounds.dimension.lower;
+ i <= (int) desc->bounds.dimension.upper; i++)
{
snprintf(dimstr, sizeof(dimstr), _("%.1f mm"),
(double)i * 25.4 / 72.0);
gpprintf(fp, "*%s.Stp%s %d/%s: \"\"\n", lang,
desc->name, i, dimstr);
}
+ gpprintf(fp, "*%s.ParamCustomStp%s Value/%s: \"\"\n", lang,
+ desc->name, _("Value"));
break;
case STP_PARAMETER_TYPE_INT:
@@ -1977,7 +1989,7 @@ write_ppd(
{
int i, j, k, l; /* Looping vars */
int num_opts; /* Number of printer options */
- int xdpi, ydpi; /* Resolution info */
+ stp_resolution_t xdpi, ydpi; /* Resolution info */
stp_vars_t *v; /* Variable info */
const char *driver; /* Driver name */
const char *family; /* Printer family */
@@ -2207,7 +2219,7 @@ write_ppd(
}
gpprintf(fp, "*%sStpQuality %s/%s:\t\"<</HWResolution[%d %d]/cupsRowFeed %d>>setpagedevice\"\n",
nocolor && strcmp(opt->name, desc.deflt.str) != 0 ? "?" : "",
- opt->name, stp_i18n_lookup(po, opt->text), xdpi, ydpi, i + 1);
+ opt->name, stp_i18n_lookup(po, opt->text), (int) xdpi, (int) ydpi, i + 1);
}
gpputs(fp, "*CloseUI: *StpQuality\n\n");
}
@@ -2231,7 +2243,7 @@ write_ppd(
stp_string_list_t *res_list = stp_string_list_create();
char res_name[64]; /* Plenty long enough for XXXxYYYdpi */
int resolution_ok;
- int tmp_xdpi, tmp_ydpi;
+ stp_resolution_t tmp_xdpi, tmp_ydpi;
if (is_color_opt)
gpprintf(fp, "*ColorKeyWords: \"Resolution\"\n");
@@ -2267,13 +2279,13 @@ write_ppd(
excess resolution. However, make the hardware resolution
match the printer default.
*/
- (void) snprintf(res_name, 63, "%dx%ddpi", tmp_xdpi + 1, tmp_xdpi);
+ (void) snprintf(res_name, 63, "%dx%ddpi", (int) tmp_xdpi + 1, (int) tmp_xdpi);
default_resolution = stp_strdup(res_name);
stp_string_list_add_string(res_list, res_name, res_name);
gpprintf(fp, "*DefaultResolution: %s\n", res_name);
gpprintf(fp, "*StpDefaultResolution: %s\n", res_name);
gpprintf(fp, "*Resolution %s/%s:\t\"<</HWResolution[%d %d]>>setpagedevice\"\n",
- res_name, _("Automatic"), xdpi, ydpi);
+ res_name, _("Automatic"), (int) xdpi, (int) ydpi);
gpprintf(fp, "*StpResolutionMap: %s %s\n", res_name, "None");
}
else
@@ -2282,9 +2294,9 @@ write_ppd(
stp_describe_resolution(v, &xdpi, &ydpi);
if (xdpi == ydpi)
- (void) snprintf(res_name, 63, "%ddpi", xdpi);
+ (void) snprintf(res_name, 63, "%ddpi", (int) xdpi);
else
- (void) snprintf(res_name, 63, "%dx%ddpi", xdpi, ydpi);
+ (void) snprintf(res_name, 63, "%dx%ddpi", (int) xdpi, (int) ydpi);
gpprintf(fp, "*DefaultResolution: %s\n", res_name);
gpprintf(fp, "*StpDefaultResolution: %s\n", res_name);
/*
@@ -2319,9 +2331,9 @@ write_ppd(
do
{
if (tmp_xdpi == tmp_ydpi)
- (void) snprintf(res_name, 63, "%ddpi", tmp_xdpi);
+ (void) snprintf(res_name, 63, "%ddpi", (int) tmp_xdpi);
else
- (void) snprintf(res_name, 63, "%dx%ddpi", tmp_xdpi, tmp_ydpi);
+ (void) snprintf(res_name, 63, "%dx%ddpi", (int) tmp_xdpi, (int) tmp_ydpi);
if ((!has_quality_parameter &&
strcmp(opt->name, desc.deflt.str) == 0) ||
!stp_string_list_is_present(res_list, res_name))
@@ -2343,7 +2355,7 @@ write_ppd(
stp_string_list_add_string(resolutions, res_name, opt->text);
gpprintf(fp, "*%sResolution %s/%s:\t\"<</HWResolution[%d %d]/cupsCompression %d>>setpagedevice\"\n",
nocolor && strcmp(opt->name, desc.deflt.str) != 0 ? "?" : "",
- res_name, stp_i18n_lookup(po, opt->text), xdpi, ydpi, i + 1);
+ res_name, stp_i18n_lookup(po, opt->text), (int) xdpi, (int) ydpi, i + 1);
if (strcmp(res_name, opt->name) != 0)
gpprintf(fp, "*StpResolutionMap: %s %s\n", res_name, opt->name);
}
diff --git a/src/cups/rastertoprinter.c b/src/cups/rastertoprinter.c
index 23faa85..0fa0668 100644
--- a/src/cups/rastertoprinter.c
+++ b/src/cups/rastertoprinter.c
@@ -94,6 +94,16 @@ typedef struct
int bottom_trim;
int adjusted_width;
int adjusted_height;
+ stp_dimension_t d_left;
+ stp_dimension_t d_right;
+ stp_dimension_t d_bottom;
+ stp_dimension_t d_top;
+ stp_dimension_t d_width;
+ stp_dimension_t d_height;
+ stp_dimension_t d_left_trim;
+ stp_dimension_t d_right_trim;
+ stp_dimension_t d_bottom_trim;
+ stp_dimension_t d_top_trim;
int last_percent;
int shrink_to_fit;
CUPS_HEADER_T header; /* Page header from file */
@@ -312,7 +322,7 @@ validate_options(stp_vars_t *v, cups_image_t *cups)
if (ps->width > 0)
{
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: Setting page width to %d\n",
+ fprintf(stderr, "DEBUG: Gutenprint: Setting page width to %.3f\n",
ps->width);
if (ps->width < stp_get_page_width(v))
stp_set_page_width(v, ps->width);
@@ -320,7 +330,7 @@ validate_options(stp_vars_t *v, cups_image_t *cups)
if (ps->height > 0)
{
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: Setting page height to %d\n",
+ fprintf(stderr, "DEBUG: Gutenprint: Setting page height to %.3f\n",
ps->height);
if (ps->height < stp_get_page_height(v))
stp_set_page_height(v, ps->height);
@@ -340,7 +350,7 @@ static stp_vars_t *
initialize_page(cups_image_t *cups, const stp_vars_t *default_settings,
const char *page_size_name)
{
- int tmp_left, tmp_right, tmp_top, tmp_bottom;
+ stp_dimension_t tmp_left, tmp_right, tmp_top, tmp_bottom;
stp_vars_t *v = stp_vars_create_copy(default_settings);
if (! suppress_messages)
@@ -417,7 +427,7 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings,
}
else if (stp_get_papersize_by_name(page_size_name))
{
- int width, height;
+ stp_dimension_t width, height;
if (!suppress_messages)
fprintf(stderr, "DEBUG: Gutenprint: Using page size %s with (%d, %d)\n",
page_size_name, cups->header.PageSize[1], cups->header.PageSize[0]);
@@ -469,16 +479,16 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings,
set_string_parameter(v, "JobMode", "Job");
validate_options(v, cups);
- stp_get_media_size(v, &(cups->width), &(cups->height));
+ stp_get_media_size(v, &(cups->d_width), &(cups->d_height));
stp_get_maximum_imageable_area(v, &tmp_left, &tmp_right,
&tmp_bottom, &tmp_top);
- stp_get_imageable_area(v, &(cups->left), &(cups->right),
- &(cups->bottom), &(cups->top));
+ stp_get_imageable_area(v, &(cups->d_left), &(cups->d_right),
+ &(cups->d_bottom), &(cups->d_top));
if (! suppress_messages)
{
- fprintf(stderr, "DEBUG: Gutenprint: limits w %d l %d r %d h %d t %d b %d\n",
- cups->width, cups->left, cups->right, cups->height, cups->top, cups->bottom);
- fprintf(stderr, "DEBUG: Gutenprint: max limits l %d r %d t %d b %d\n",
+ fprintf(stderr, "DEBUG: Gutenprint: limits w %.3f l %.3f r %.3f h %.3f t %.3f b %.3f\n",
+ cups->d_width, cups->d_left, cups->d_right, cups->d_height, cups->d_top, cups->d_bottom);
+ fprintf(stderr, "DEBUG: Gutenprint: max limits l %.3f r %.3f t %.3f b %.3f\n",
tmp_left, tmp_right, tmp_top, tmp_bottom);
}
@@ -486,94 +496,94 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings,
tmp_left = 0;
if (tmp_top < 0)
tmp_top = 0;
- if (tmp_right > tmp_left + cups->width)
- tmp_right = cups->width;
- if (tmp_bottom > tmp_top + cups->height)
- tmp_bottom = cups->height;
- if (tmp_left < cups->left)
+ if (tmp_right > tmp_left + cups->d_width)
+ tmp_right = cups->d_width;
+ if (tmp_bottom > tmp_top + cups->d_height)
+ tmp_bottom = cups->d_height;
+ if (tmp_left < cups->d_left)
{
if (cups->shrink_to_fit != 1)
{
- cups->left_trim = cups->left - tmp_left;
- tmp_left = cups->left;
+ cups->d_left_trim = cups->d_left - tmp_left;
+ tmp_left = cups->d_left;
}
else
- cups->left_trim = 0;
+ cups->d_left_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: left margin %d\n", cups->left_trim);
+ fprintf(stderr, "DEBUG: Gutenprint: left margin %.3f\n", cups->d_left_trim);
}
else
{
- cups->left_trim = 0;
+ cups->d_left_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: Adjusting left margin from %d to %d\n",
- cups->left, tmp_left);
- cups->left = tmp_left;
+ fprintf(stderr, "DEBUG: Gutenprint: Adjusting left margin from %.3f to %.3f\n",
+ cups->d_left, tmp_left);
+ cups->d_left = tmp_left;
}
- if (tmp_right > cups->right)
+ if (tmp_right > cups->d_right)
{
if (cups->shrink_to_fit != 1)
{
- cups->right_trim = tmp_right - cups->right;
- tmp_right = cups->right;
+ cups->d_right_trim = tmp_right - cups->d_right;
+ tmp_right = cups->d_right;
}
else
- cups->right_trim = 0;
+ cups->d_right_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: right margin %d\n", cups->right_trim);
+ fprintf(stderr, "DEBUG: Gutenprint: right margin %.3f\n", cups->d_right_trim);
}
else
{
- cups->right_trim = 0;
+ cups->d_right_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: Adjusting right margin from %d to %d\n",
- cups->right, tmp_right);
- cups->right = tmp_right;
+ fprintf(stderr, "DEBUG: Gutenprint: Adjusting right margin from %.3f to %.3f\n",
+ cups->d_right, tmp_right);
+ cups->d_right = tmp_right;
}
- if (tmp_top < cups->top)
+ if (tmp_top < cups->d_top)
{
if (cups->shrink_to_fit != 1)
{
- cups->top_trim = cups->top - tmp_top;
- tmp_top = cups->top;
+ cups->d_top_trim = cups->d_top - tmp_top;
+ tmp_top = cups->d_top;
}
else
- cups->top_trim = 0;
+ cups->d_top_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: top margin %d\n", cups->top_trim);
+ fprintf(stderr, "DEBUG: Gutenprint: top margin %.3f\n", cups->d_top_trim);
}
else
{
- cups->top_trim = 0;
+ cups->d_top_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: Adjusting top margin from %d to %d\n",
- cups->top, tmp_top);
- cups->top = tmp_top;
+ fprintf(stderr, "DEBUG: Gutenprint: Adjusting top margin from %.3f to %.3f\n",
+ cups->d_top, tmp_top);
+ cups->d_top = tmp_top;
}
- if (tmp_bottom > cups->bottom)
+ if (tmp_bottom > cups->d_bottom)
{
if (cups->shrink_to_fit != 1)
{
- cups->bottom_trim = tmp_bottom - cups->bottom;
- tmp_bottom = cups->bottom;
+ cups->d_bottom_trim = tmp_bottom - cups->d_bottom;
+ tmp_bottom = cups->d_bottom;
}
else
- cups->bottom_trim = 0;
+ cups->d_bottom_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: bottom margin %d\n", cups->bottom_trim);
+ fprintf(stderr, "DEBUG: Gutenprint: bottom margin %.3f\n", cups->d_bottom_trim);
}
else
{
- cups->bottom_trim = 0;
+ cups->d_bottom_trim = 0;
if (! suppress_messages)
- fprintf(stderr, "DEBUG: Gutenprint: Adjusting bottom margin from %d to %d\n",
- cups->bottom, tmp_bottom);
- cups->bottom = tmp_bottom;
+ fprintf(stderr, "DEBUG: Gutenprint: Adjusting bottom margin from %.3f to %.3f\n",
+ cups->d_bottom, tmp_bottom);
+ cups->d_bottom = tmp_bottom;
}
if (cups->shrink_to_fit == 2)
{
- int t_left, t_right, t_bottom, t_top;
+ stp_dimension_t t_left, t_right, t_bottom, t_top;
stp_get_imageable_area(v, &(t_left), &(t_right), &(t_bottom), &(t_top));
stp_set_width(v, t_right - t_left);
stp_set_height(v, t_bottom - t_top);
@@ -582,36 +592,36 @@ initialize_page(cups_image_t *cups, const stp_vars_t *default_settings,
}
else
{
- stp_set_width(v, cups->right - cups->left);
- stp_set_height(v, cups->bottom - cups->top);
- stp_set_left(v, cups->left);
- stp_set_top(v, cups->top);
+ stp_set_width(v, cups->d_right - cups->d_left);
+ stp_set_height(v, cups->d_bottom - cups->d_top);
+ stp_set_left(v, cups->d_left);
+ stp_set_top(v, cups->d_top);
}
- cups->right = cups->width - cups->right;
+ cups->d_right = cups->d_width - cups->d_right;
if (cups->shrink_to_fit == 1)
- cups->width = tmp_right - tmp_left;
+ cups->d_width = tmp_right - tmp_left;
else
- cups->width = cups->width - cups->left - cups->right;
- cups->width = cups->header.HWResolution[0] * cups->width / 72;
- cups->left = cups->header.HWResolution[0] * cups->left / 72;
- cups->right = cups->header.HWResolution[0] * cups->right / 72;
- cups->left_trim = cups->header.HWResolution[0] * cups->left_trim / 72;
- cups->right_trim = cups->header.HWResolution[0] * cups->right_trim / 72;
+ cups->d_width = cups->d_width - cups->d_left - cups->d_right;
+ cups->width = cups->header.HWResolution[0] * cups->d_width / 72;
+ cups->left = cups->header.HWResolution[0] * cups->d_left / 72;
+ cups->right = cups->header.HWResolution[0] * cups->d_right / 72;
+ cups->left_trim = cups->header.HWResolution[0] * cups->d_left_trim / 72;
+ cups->right_trim = cups->header.HWResolution[0] * cups->d_right_trim / 72;
cups->adjusted_width = cups->width;
if (cups->adjusted_width > cups->header.cupsWidth)
cups->adjusted_width = cups->header.cupsWidth;
- cups->bottom = cups->height - cups->bottom;
+ cups->d_bottom = cups->d_height - cups->d_bottom;
if (cups->shrink_to_fit == 1)
- cups->height = tmp_bottom - tmp_top;
+ cups->d_height = tmp_bottom - tmp_top;
else
- cups->height = cups->height - cups->top - cups->bottom;
- cups->height = cups->header.HWResolution[1] * cups->height / 72;
- cups->top = cups->header.HWResolution[1] * cups->top / 72;
- cups->bottom = cups->header.HWResolution[1] * cups->bottom / 72;
- cups->top_trim = cups->header.HWResolution[1] * cups->top_trim / 72;
- cups->bottom_trim = cups->header.HWResolution[1] * cups->bottom_trim / 72;
+ cups->d_height = cups->d_height - cups->d_top - cups->d_bottom;
+ cups->height = cups->header.HWResolution[1] * cups->d_height / 72;
+ cups->top = cups->header.HWResolution[1] * cups->d_top / 72;
+ cups->bottom = cups->header.HWResolution[1] * cups->d_bottom / 72;
+ cups->top_trim = cups->header.HWResolution[1] * cups->d_top_trim / 72;
+ cups->bottom_trim = cups->header.HWResolution[1] * cups->d_bottom_trim / 72;
cups->adjusted_height = cups->height;
if (cups->adjusted_height > cups->header.cupsHeight)
cups->adjusted_height = cups->header.cupsHeight;
diff --git a/src/cups/test-rastertogutenprint.in b/src/cups/test-rastertogutenprint.in
index 91b27ad..75d4102 100755
--- a/src/cups/test-rastertogutenprint.in
+++ b/src/cups/test-rastertogutenprint.in
@@ -232,8 +232,9 @@ get_ppds() {
}
if [ -n "$make_ppds" -o ! -d ppd/C ] ; then
- make ppd-nonls
-## Not all systems can work with gzipped PPDs
+ rm -rf ppd/C # Clean out any leftover simplified PPDs
+ make ppd-nonls-a # that double the time for the test
+## not all systems can work with gzipped PPDs
find ppd/C -name '*.ppd.gz' | xargs gunzip -f
fi
diff --git a/src/escputil/escputil.c b/src/escputil/escputil.c
index 971ca30..a309fb4 100644
--- a/src/escputil/escputil.c
+++ b/src/escputil/escputil.c
@@ -1769,9 +1769,40 @@ do_extended_ink_info_1(const stp_printer_t *printer)
gettext(stp_string_list_param(color_list, i)->text),
val, id, (year > 80 ? 19 : 20), year, month);
}
+ else if (sscanf(ind,
+ "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,
+ "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)
+ {
+ STP_DEBUG(printf("***Case 4: i %i val %ud year %ud mo %ud id %ud\n",
+ i, val, year, month, id));
+ if (i == 0)
+ printf("%20s %20s %12s %7s\n",
+ _("Ink cartridge"), _("Percent remaining"), _("Part number"),
+ _("Date"));
+ printf("%20s %20d T0%03d %2d%02d-%02d\n",
+ gettext(stp_string_list_param(color_list, i)->text),
+ val, id, (year > 80 ? 19 : 20), year, month);
+ }
+ else if (sscanf(ind,
+ "II:%*2s;IQT:%x;PDY:%x;PDM:%x;STY:%*2s;STM:%*2s;STD:%*2s;EDY:%*2s;EDM:%*2s;EDD:%*2s;IC1:%x;IC2:%*4s;IK:%*4s;TOV:%*x;TVU:%*x;VIQ:%*4x;UIQ:%*4x;ERC:%*x;SID:%*x;LOG:EPSON ;",
+ &val, &year, &month, &id ) == 4)
+ {
+ STP_DEBUG(printf("***Case 5: i %i val %ud year %ud mo %ud id %ud\n",
+ i, val, year, month, id));
+ if (i == 0)
+ printf("%20s %20s %12s %7s\n",
+ _("Ink cartridge"), _("Percent remaining"), _("Part number"),
+ _("Date"));
+ printf("%20s %20d T0%03d %2d%02d-%02d\n",
+ gettext(stp_string_list_param(color_list, i)->text),
+ val, id, (year > 80 ? 19 : 20), year, month);
+ }
else
{
- STP_DEBUG(printf("***Case 5: failure %i (%s)\n", i, ind));
+ STP_DEBUG(printf("***Case 6: failure %i (%s)\n", i, ind));
printf("Cannot identify cartridge in slot %d\n", i);
}
}
diff --git a/src/gimp2/print.c b/src/gimp2/print.c
index c24ca50..f1c4848 100644
--- a/src/gimp2/print.c
+++ b/src/gimp2/print.c
@@ -88,8 +88,8 @@ query (void)
{ GIMP_PDB_DRAWABLE,(BAD_CONST_CHAR) "drawable",(BAD_CONST_CHAR) "Input drawable" },
{ GIMP_PDB_STRING, (BAD_CONST_CHAR) "driver", (BAD_CONST_CHAR) "Printer driver short name" },
{ GIMP_PDB_STRING, (BAD_CONST_CHAR) "printer_queue",(BAD_CONST_CHAR) "CUPS Printer Queue" },
- { GIMP_PDB_INT32, (BAD_CONST_CHAR) "left", (BAD_CONST_CHAR) "Left offset (points, -1 = centered)" },
- { GIMP_PDB_INT32, (BAD_CONST_CHAR) "top", (BAD_CONST_CHAR) "Top offset (points, -1 = centered)" },
+ { GIMP_PDB_FLOAT, (BAD_CONST_CHAR) "left", (BAD_CONST_CHAR) "Left offset (points, -1 = centered)" },
+ { GIMP_PDB_FLOAT, (BAD_CONST_CHAR) "top", (BAD_CONST_CHAR) "Top offset (points, -1 = centered)" },
{ GIMP_PDB_INT32, (BAD_CONST_CHAR) "length_key_value_array", (BAD_CONST_CHAR) "Length of the key-value array" },
{ GIMP_PDB_STRINGARRAY, (BAD_CONST_CHAR) "keys", (BAD_CONST_CHAR) "Key-value pairs for Gutenprint Settings" },
};
@@ -305,13 +305,13 @@ run (const char *name, /* I - Name of print program. */
* Left offset (points, -1 = centered)
*/
- stp_set_left(gimp_vars.v, param[6].data.d_int32);
+ stp_set_left(gimp_vars.v, param[6].data.d_float);
/*
* Top offset (points, -1 = centered)
*/
- stp_set_top(gimp_vars.v, param[5].data.d_int32);
+ stp_set_top(gimp_vars.v, param[5].data.d_float);
/*
* Parse remaining parameters from key-value string array
@@ -371,6 +371,7 @@ run (const char *name, /* I - Name of print program. */
break;
case STP_PARAMETER_TYPE_DOUBLE:
+ case STP_PARAMETER_TYPE_DIMENSION:
/*
* Some useful floating point stp parameters
@@ -397,7 +398,10 @@ run (const char *name, /* I - Name of print program. */
}
else
{
- stp_set_float_parameter(gimp_vars.v, key, float_value);
+ if (desc.p_type == STP_PARAMETER_TYPE_DOUBLE)
+ stp_set_float_parameter(gimp_vars.v, key, float_value);
+ else
+ stp_set_dimension_parameter(gimp_vars.v, key, float_value);
}
break;
@@ -405,7 +409,6 @@ run (const char *name, /* I - Name of print program. */
case STP_PARAMETER_TYPE_FILE:
case STP_PARAMETER_TYPE_RAW:
case STP_PARAMETER_TYPE_ARRAY:
- case STP_PARAMETER_TYPE_DIMENSION:
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
fprintf(stderr,"Parameter type unsupported in gimp2 plugin for parameter %s\n", key);
break;
diff --git a/src/gutenprintui2/panel.c b/src/gutenprintui2/panel.c
index 92d18f9..fa2df8b 100644
--- a/src/gutenprintui2/panel.c
+++ b/src/gutenprintui2/panel.c
@@ -29,7 +29,7 @@
#define INCH 72
#define FINCH ((gdouble) INCH)
#define ROUNDUP(x, y) (((x) + ((y) - 1)) / (y))
-#define SCALE(x, y) (((x) + (1.0 / (2.0 * (y)))) * (y))
+#define SCALE(x, y) ((x) * (y))
#include <gutenprint/gutenprint-intl-internal.h>
#include <gutenprintui2/gutenprintui.h>
@@ -167,12 +167,12 @@ static gint preview_x, preview_y, preview_w, preview_h;
static gint physical_orientation = -2; /* Actual orientation */
-static gint paper_width, paper_height; /* Physical width */
-static gint printable_width, printable_height; /* Size of printable area */
-static gint print_width, print_height; /* Printed area of image */
-static gint left, right, top, bottom; /* Imageable region */
-static gint image_width, image_height; /* Image size (possibly rotated) */
-static gint image_true_width, image_true_height; /* Original image */
+static gdouble paper_width, paper_height; /* Physical width */
+static gdouble printable_width, printable_height; /* Size of printable area */
+static gdouble print_width, print_height; /* Printed area of image */
+static gdouble left, right, top, bottom; /* Imageable region */
+static gdouble image_width, image_height; /* Image size (possibly rotated) */
+static gdouble image_true_width, image_true_height; /* Original image */
static gdouble image_xres, image_yres; /* Original image resolution */
static gint do_update_thumbnail = 0;
static gint saveme = 0; /* True if printrc should be saved */
@@ -273,15 +273,15 @@ static int current_option_count = 0;
static unit_t units[] =
{
{ N_("Inch"), N_("Set the base unit of measurement to inches"),
- 72.0, NULL, "%.2f" },
+ 72.0, NULL, "%.4f" },
{ N_("cm"), N_("Set the base unit of measurement to centimetres"),
- 72.0 / 2.54, NULL, "%.2f" },
+ 72.0 / 2.54, NULL, "%.4f" },
{ N_("Points"), N_("Set the base unit of measurement to points (1/72\")"),
- 1.0, NULL, "%.0f" },
+ 1.0, NULL, "%.2f" },
{ N_("mm"), N_("Set the base unit of measurement to millimetres"),
- 72.0 / 25.4, NULL, "%.1f" },
+ 72.0 / 25.4, NULL, "%.3f" },
{ N_("Pica"), N_("Set the base unit of measurement to picas (1/12\")"),
- 72.0 / 12.0, NULL, "%.1f" },
+ 72.0 / 12.0, NULL, "%.3f" },
};
static const gint unit_count = sizeof(units) / sizeof(unit_t);
@@ -1158,21 +1158,11 @@ populate_option_table(GtkWidget *table, int p_class)
digits = 3;
minor_increment = .001;
}
- else if (unit_scaler > 10)
+ else
{
digits = 2;
minor_increment = .01;
}
- else if (unit_scaler > 1)
- {
- digits = 1;
- minor_increment = .1;
- }
- else
- {
- digits = 0;
- minor_increment = 1;
- }
add_reset_button(opt, table, 4, vpos[desc->p_level][desc->p_type]);
stpui_create_scale_entry(opt, GTK_TABLE(table), 0,
vpos[desc->p_level][desc->p_type]++,
@@ -1180,7 +1170,7 @@ populate_option_table(GtkWidget *table, int p_class)
opt->info.flt.deflt / unit_scaler,
opt->info.flt.lower / unit_scaler,
opt->info.flt.upper / unit_scaler,
- minor_increment, minor_increment * 10,
+ minor_increment, 1.0,
digits, TRUE, 0, 0, NULL,
!(desc->is_mandatory));
stpui_set_adjustment_tooltip(opt->info.flt.adjustment,
@@ -2198,7 +2188,7 @@ create_scaling_frame (void)
scaling_adjustment =
stpui_scale_entry_new (GTK_TABLE (table), 0, 0, _("Scaling:"), 100, 75,
100.0, minimum_image_percent, 100.0,
- 1.0, 10.0, 1, TRUE, 0, 0, NULL);
+ 1.0, 10.0, 2, TRUE, 0, 0, NULL);
stpui_set_adjustment_tooltip(scaling_adjustment,
_("Set the scale (size) of the image"));
g_signal_connect (G_OBJECT (scaling_adjustment), "value_changed",
@@ -2749,7 +2739,7 @@ scaling_callback (GtkWidget *widget)
*/
current_scale = GTK_ADJUSTMENT (scaling_adjustment)->value;
GTK_ADJUSTMENT (scaling_adjustment)->value =
- min_ppi_scaling / (current_scale / 100);
+ min_ppi_scaling / (current_scale / 100.0);
pv->scaling = 0.0;
}
else if (widget == scaling_percent)
@@ -2763,7 +2753,7 @@ scaling_callback (GtkWidget *widget)
GTK_ADJUSTMENT (scaling_adjustment)->lower = minimum_image_percent;
GTK_ADJUSTMENT (scaling_adjustment)->upper = 100.0;
- new_percent = 100 * min_ppi_scaling / current_scale;
+ new_percent = 100.0 * min_ppi_scaling / current_scale;
if (new_percent > 100)
new_percent = 100;
@@ -2893,8 +2883,8 @@ plist_build_combo (GtkWidget *combo, /* I - Combo widget */
void
stpui_set_image_dimensions(gint width, gint height)
{
- image_true_width = width;
- image_true_height = height;
+ image_true_width = (gdouble) width;
+ image_true_height = (gdouble) height;
}
void
@@ -2969,7 +2959,7 @@ static void
position_callback (GtkWidget *widget)
{
gdouble new_printed_value = atof (gtk_entry_get_text (GTK_ENTRY (widget)));
- gint new_value = SCALE(new_printed_value, units[pv->unit].scale);
+ gdouble new_value = SCALE(new_printed_value, units[pv->unit].scale);
reset_preview ();
suppress_preview_update++;
@@ -3488,10 +3478,10 @@ static void
custom_media_size_callback(GtkWidget *widget,
gpointer data)
{
- gint width_limit, height_limit;
- gint min_width_limit, min_height_limit;
+ gdouble width_limit, height_limit;
+ gdouble min_width_limit, min_height_limit;
gdouble new_printed_value = atof(gtk_entry_get_text(GTK_ENTRY(widget)));
- gint new_value = SCALE(new_printed_value, units[pv->unit].scale);
+ gdouble new_value = SCALE(new_printed_value, units[pv->unit].scale);
invalidate_frame ();
invalidate_preview_thumbnail ();
reset_preview ();
@@ -3534,9 +3524,9 @@ set_media_size(const gchar *new_media_size)
if (pap)
{
- gint size;
- int old_width = stp_get_page_width(pv->v);
- int old_height = stp_get_page_height(pv->v);
+ gdouble size;
+ gdouble old_width = stp_get_page_width(pv->v);
+ gdouble old_height = stp_get_page_height(pv->v);
int need_preview_update = 0;
if (! stpui_show_all_paper_sizes &&
@@ -3563,7 +3553,7 @@ set_media_size(const gchar *new_media_size)
if (pap->width == 0)
{
- int max_w, max_h, min_w, min_h;
+ gdouble max_w, max_h, min_w, min_h;
stp_get_size_limit(pv->v, &max_w, &max_h, &min_w, &min_h);
size = old_width;
if (size < min_w)
@@ -3589,11 +3579,11 @@ set_media_size(const gchar *new_media_size)
setup_auto_paper_size();
if (pap->height == 0)
{
- int max_w, max_h, min_w, min_h;
+ gdouble max_w, max_h, min_w, min_h;
stp_get_size_limit(pv->v, &max_w, &max_h, &min_w, &min_h);
if (auto_paper_size)
{
- int l, r, b, t;
+ gdouble l, r, b, t;
stp_set_page_height(pv->v, 0);
old_height = 0;
stp_get_imageable_area(pv->v, &l, &r, &b, &t);
@@ -4761,8 +4751,8 @@ do_preview_thumbnail (void)
gint printable_display_left, printable_display_top;
gint paper_display_width, paper_display_height;
gint printable_display_width, printable_display_height;
- int l_bottom = stp_get_top(pv->v) + stp_get_height(pv->v);
- int l_right = stp_get_left(pv->v) + stp_get_width(pv->v);
+ gdouble l_bottom = stp_get_top(pv->v) + stp_get_height(pv->v);
+ gdouble l_right = stp_get_left(pv->v) + stp_get_width(pv->v);
preview_ppi = preview_size_horiz * FINCH / (gdouble) paper_width;
@@ -4979,8 +4969,8 @@ preview_update (void)
pv->scaling = -min_ppi_scaling;
twidth = (FINCH * (gdouble) image_width / -pv->scaling);
- print_width = twidth + .5;
- print_height = (twidth * (gdouble) image_height / image_width) + .5;
+ print_width = twidth;
+ print_height = (twidth * (gdouble) image_height / image_width);
GTK_ADJUSTMENT (scaling_adjustment)->lower = min_ppi_scaling;
GTK_ADJUSTMENT (scaling_adjustment)->upper = max_ppi_scaling;
GTK_ADJUSTMENT (scaling_adjustment)->value = -pv->scaling;
@@ -5000,9 +4990,9 @@ preview_update (void)
{
gdouble twidth = printable_width * pv->scaling / 100;
- print_width = twidth + .5;
+ print_width = twidth;
print_height =
- (twidth * (gdouble) image_height / (gdouble) image_width) + .5;
+ (twidth * (gdouble) image_height / (gdouble) image_width);
}
else
{
@@ -5013,19 +5003,19 @@ preview_update (void)
/* i.e. if image is wider relative to its height than the width
of the printable area relative to its height */
{
- gdouble twidth = printable_width * pv->scaling / 100;
+ gdouble twidth = printable_width * pv->scaling / 100.0;
- print_width = twidth + .5;
+ print_width = twidth;
print_height =
- (twidth * (gdouble) image_height / (gdouble) image_width) + .5;
+ (twidth * (gdouble) image_height / (gdouble) image_width);
}
else
{
- gdouble theight = printable_height * pv->scaling /100;
+ gdouble theight = printable_height * pv->scaling /100.0;
- print_height = theight + .5;
+ print_height = theight;
print_width =
- (theight * (gdouble) image_width / (gdouble) image_height) + .5;
+ (theight * (gdouble) image_width / (gdouble) image_height);
}
}
@@ -5126,10 +5116,10 @@ preview_motion_callback (GtkWidget *widget,
gpointer data)
{
- gint old_top = stp_get_top (pv->v);
- gint old_left = stp_get_left (pv->v);
- gint new_top = old_top;
- gint new_left = old_left;
+ gdouble old_top = stp_get_top (pv->v);
+ gdouble old_left = stp_get_left (pv->v);
+ gdouble new_top = old_top;
+ gdouble new_left = old_left;
gint steps;
if (preview_active != 1 || event->type != GDK_MOTION_NOTIFY)
return;
@@ -5162,10 +5152,10 @@ preview_motion_callback (GtkWidget *widget,
case 2:
if (move_constraint & MOVE_HORIZONTAL)
{
- gint increment_width =
+ gdouble increment_width =
((move_constraint & MOVE_GRID) && pv->scaling > 0) ?
printable_width * pv->scaling / 100 : print_width;
- gint x_threshold = MAX (1, (preview_ppi * increment_width) / INCH);
+ gdouble x_threshold = MAX (1, (preview_ppi * increment_width) / FINCH);
if (event->x > mouse_x)
steps = MIN((event->x - mouse_x) / x_threshold,
((right - orig_left) / increment_width) - 1);
@@ -5176,10 +5166,10 @@ preview_motion_callback (GtkWidget *widget,
}
if (move_constraint & MOVE_VERTICAL)
{
- gint increment_height =
+ gdouble increment_height =
((move_constraint & MOVE_GRID) && pv->scaling > 0) ?
printable_height * pv->scaling / 100 : print_height;
- gint y_threshold = MAX (1, (preview_ppi * increment_height) / INCH);
+ gdouble y_threshold = MAX (1, (preview_ppi * increment_height) / FINCH);
if (event->y > mouse_y)
steps = MIN((event->y - mouse_y) / y_threshold,
((bottom - orig_top) / increment_height) - 1);
@@ -5245,7 +5235,7 @@ dimension_update (GtkAdjustment *adjustment)
opt->info.flt.adjustment &&
adjustment == GTK_ADJUSTMENT(opt->info.flt.adjustment))
{
- int new_value = (adjustment->value + (.5 / unit_scaler)) * unit_scaler;
+ gdouble new_value = adjustment->value * unit_scaler;
invalidate_preview_thumbnail ();
if (stp_get_dimension_parameter(pv->v, opt->fast_desc->name) !=
new_value)
diff --git a/src/gutenprintui2/plist.c b/src/gutenprintui2/plist.c
index c95fb11..a52d7bd 100644
--- a/src/gutenprintui2/plist.c
+++ b/src/gutenprintui2/plist.c
@@ -913,6 +913,9 @@ stpui_printrc_load_v1(FILE *fp)
case STP_PARAMETER_TYPE_DOUBLE:
stp_set_float_parameter(key.v, keyword, atof(value));
break;
+ case STP_PARAMETER_TYPE_DIMENSION:
+ stp_set_dimension_parameter(key.v, keyword, atof(value));
+ break;
case STP_PARAMETER_TYPE_INT:
stp_set_int_parameter(key.v, keyword, atoi(value));
break;
@@ -1045,6 +1048,7 @@ stpui_printrc_load(void)
case 2:
case 3:
case 4:
+ case 5:
stpui_printrc_load_v2(fp);
break;
}
@@ -1082,7 +1086,7 @@ stpui_printrc_save(void)
fprintf(stderr, "Number of printers: %d\n", stpui_plist_count);
#endif
- fputs("#PRINTRCv4 written by Gutenprint " PLUG_IN_VERSION "\n\n", fp);
+ fputs("#PRINTRCv5 written by Gutenprint " PLUG_IN_VERSION "\n\n", fp);
fprintf(fp, "Global-Settings:\n");
fprintf(fp, " Current-Printer: \"%s\"\n",
@@ -1109,15 +1113,15 @@ stpui_printrc_save(void)
fprintf(fp, " Output-Filename: \"%s\"\n", p->output_filename);
fprintf(fp, " Extra-Printer-Options: \"%s\"\n", p->extra_printer_options);
fprintf(fp, " Custom-Command: \"%s\"\n", p->custom_command);
- fprintf(fp, " Scaling: %.3f\n", p->scaling);
+ fprintf(fp, " Scaling: %.6f\n", p->scaling);
fprintf(fp, " Orientation: %d\n", p->orientation);
fprintf(fp, " Autosize-Roll-Paper: %d\n", p->auto_size_roll_feed_paper);
fprintf(fp, " Unit: %d\n", p->unit);
- fprintf(fp, " Left: %d\n", stp_get_left(p->v));
- fprintf(fp, " Top: %d\n", stp_get_top(p->v));
- fprintf(fp, " Custom_Page_Width: %d\n", stp_get_page_width(p->v));
- fprintf(fp, " Custom_Page_Height: %d\n", stp_get_page_height(p->v));
+ fprintf(fp, " Left: %f\n", stp_get_left(p->v));
+ fprintf(fp, " Top: %f\n", stp_get_top(p->v));
+ fprintf(fp, " Custom_Page_Width: %f\n", stp_get_page_width(p->v));
+ fprintf(fp, " Custom_Page_Height: %f\n", stp_get_page_height(p->v));
fprintf(fp, " Parameter %s Int True %d\n", copy_count_name,
stpui_plist_get_copy_count(p));
@@ -1159,7 +1163,7 @@ stpui_printrc_save(void)
case STP_PARAMETER_TYPE_DIMENSION:
if (stp_check_dimension_parameter(p->v, param->name,
STP_PARAMETER_INACTIVE))
- fprintf(fp, " Parameter %s Dimension %s %d\n", param->name,
+ fprintf(fp, " Parameter %s Dimension %s %f\n", param->name,
((stp_get_dimension_parameter_active
(p->v, param->name) == STP_PARAMETER_ACTIVE) ?
"True" : "False"),
diff --git a/src/gutenprintui2/printrc.h b/src/gutenprintui2/printrc.h
index b7d89fc..2aff9d9 100644
--- a/src/gutenprintui2/printrc.h
+++ b/src/gutenprintui2/printrc.h
@@ -30,7 +30,6 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef union yylv {
- int ival;
double dval;
char *sval;
} YYSTYPE;
diff --git a/src/gutenprintui2/printrcl.c b/src/gutenprintui2/printrcl.c
index 4d66c44..e9ad5d5 100644
--- a/src/gutenprintui2/printrcl.c
+++ b/src/gutenprintui2/printrcl.c
@@ -361,8 +361,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 40
-#define YY_END_OF_BUFFER 41
+#define YY_NUM_RULES 39
+#define YY_END_OF_BUFFER 40
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -372,41 +372,41 @@ struct yy_trans_info
};
static yyconst flex_int16_t yy_accept[336] =
{ 0,
- 0, 0, 41, 40, 37, 39, 40, 38, 40, 40,
- 31, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 37, 0, 33,
- 38, 38, 0, 31, 0, 0, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 38, 32, 0, 32, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 24, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 38, 35, 35, 35, 35, 35,
-
- 35, 35, 35, 35, 35, 0, 35, 35, 26, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 11,
- 34, 35, 38, 35, 35, 35, 35, 30, 35, 35,
- 35, 35, 35, 0, 35, 34, 35, 10, 35, 35,
- 35, 35, 35, 35, 0, 35, 8, 38, 35, 35,
- 35, 35, 35, 35, 35, 27, 35, 0, 0, 35,
- 35, 35, 35, 35, 0, 35, 0, 25, 38, 35,
- 29, 35, 35, 0, 35, 35, 35, 9, 0, 0,
- 0, 23, 35, 0, 35, 35, 35, 0, 35, 0,
- 38, 35, 0, 0, 0, 35, 35, 35, 0, 0,
-
- 0, 35, 0, 35, 35, 3, 0, 5, 0, 38,
- 0, 0, 0, 0, 35, 35, 28, 0, 0, 0,
- 35, 0, 35, 15, 0, 0, 38, 0, 0, 0,
- 0, 35, 35, 0, 0, 0, 35, 0, 35, 0,
- 0, 38, 36, 0, 0, 0, 0, 35, 35, 0,
- 0, 0, 35, 0, 35, 16, 0, 0, 0, 0,
- 0, 35, 4, 0, 0, 0, 6, 0, 14, 0,
- 0, 20, 0, 0, 35, 35, 0, 0, 0, 0,
- 0, 0, 0, 0, 35, 35, 0, 0, 0, 0,
- 0, 0, 0, 19, 35, 35, 0, 0, 0, 0,
-
- 0, 0, 1, 35, 35, 0, 0, 21, 17, 0,
- 0, 35, 35, 0, 0, 0, 0, 35, 12, 0,
+ 0, 0, 40, 39, 36, 38, 39, 37, 39, 39,
+ 31, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 36, 0, 32,
+ 37, 37, 0, 31, 0, 0, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 37, 31, 0, 31, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 24, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 37, 34, 34, 34, 34, 34,
+
+ 34, 34, 34, 34, 34, 0, 34, 34, 26, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 11,
+ 33, 34, 37, 34, 34, 34, 34, 30, 34, 34,
+ 34, 34, 34, 0, 34, 33, 34, 10, 34, 34,
+ 34, 34, 34, 34, 0, 34, 8, 37, 34, 34,
+ 34, 34, 34, 34, 34, 27, 34, 0, 0, 34,
+ 34, 34, 34, 34, 0, 34, 0, 25, 37, 34,
+ 29, 34, 34, 0, 34, 34, 34, 9, 0, 0,
+ 0, 23, 34, 0, 34, 34, 34, 0, 34, 0,
+ 37, 34, 0, 0, 0, 34, 34, 34, 0, 0,
+
+ 0, 34, 0, 34, 34, 3, 0, 5, 0, 37,
+ 0, 0, 0, 0, 34, 34, 28, 0, 0, 0,
+ 34, 0, 34, 15, 0, 0, 37, 0, 0, 0,
+ 0, 34, 34, 0, 0, 0, 34, 0, 34, 0,
+ 0, 37, 35, 0, 0, 0, 0, 34, 34, 0,
+ 0, 0, 34, 0, 34, 16, 0, 0, 0, 0,
+ 0, 34, 4, 0, 0, 0, 6, 0, 14, 0,
+ 0, 20, 0, 0, 34, 34, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 34, 0, 0, 0, 0,
+ 0, 0, 0, 19, 34, 34, 0, 0, 0, 0,
+
+ 0, 0, 1, 34, 34, 0, 0, 21, 17, 0,
+ 0, 34, 34, 0, 0, 0, 0, 34, 12, 0,
0, 0, 0, 13, 0, 0, 0, 7, 22, 0,
0, 0, 2, 18, 0
} ;
@@ -418,7 +418,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 4, 5, 1, 1, 1, 6, 1,
1, 1, 7, 1, 8, 9, 1, 10, 10, 11,
- 11, 11, 10, 10, 10, 10, 10, 12, 1, 1,
+ 11, 11, 11, 10, 10, 10, 10, 12, 1, 1,
1, 1, 1, 1, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
@@ -962,7 +962,7 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 78 "printrcl.l"
+#line 77 "printrcl.l"
#line 969 "printrcl.c"
@@ -1050,208 +1050,203 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 80 "printrcl.l"
+#line 79 "printrcl.l"
DBG(CURRENT_PRINTER); return CURRENT_PRINTER;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 81 "printrcl.l"
+#line 80 "printrcl.l"
DBG(SHOW_ALL_PAPER_SIZES); return SHOW_ALL_PAPER_SIZES;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 82 "printrcl.l"
+#line 81 "printrcl.l"
DBG(PRINTER); return PRINTER;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 83 "printrcl.l"
+#line 82 "printrcl.l"
DBG(DESTINATION); return DESTINATION;
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 84 "printrcl.l"
+#line 83 "printrcl.l"
DBG(SCALING); return SCALING;
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 85 "printrcl.l"
+#line 84 "printrcl.l"
DBG(ORIENTATION); return ORIENTATION;
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 86 "printrcl.l"
+#line 85 "printrcl.l"
DBG(AUTOSIZE_ROLL_PAPER); return AUTOSIZE_ROLL_PAPER;
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 87 "printrcl.l"
+#line 86 "printrcl.l"
DBG(UNIT); return UNIT;
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 88 "printrcl.l"
+#line 87 "printrcl.l"
DBG(DRIVER); return DRIVER;
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 89 "printrcl.l"
+#line 88 "printrcl.l"
DBG(LEFT); return LEFT;
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 90 "printrcl.l"
+#line 89 "printrcl.l"
DBG(TOP); return TOP;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 91 "printrcl.l"
+#line 90 "printrcl.l"
DBG(CUSTOM_PAGE_WIDTH); return CUSTOM_PAGE_WIDTH;
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 92 "printrcl.l"
+#line 91 "printrcl.l"
DBG(CUSTOM_PAGE_HEIGHT); return CUSTOM_PAGE_HEIGHT;
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 93 "printrcl.l"
+#line 92 "printrcl.l"
DBG(OUTPUT_TYPE); return OUTPUT_TYPE;
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 94 "printrcl.l"
+#line 93 "printrcl.l"
DBG(PARAMETER); return PARAMETER;
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 95 "printrcl.l"
+#line 94 "printrcl.l"
DBG(QUEUE_NAME); return QUEUE_NAME;
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 96 "printrcl.l"
+#line 95 "printrcl.l"
DBG(OUTPUT_FILENAME); return OUTPUT_FILENAME;
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 97 "printrcl.l"
+#line 96 "printrcl.l"
DBG(EXTRA_PRINTER_OPTIONS); return EXTRA_PRINTER_OPTIONS;
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 98 "printrcl.l"
+#line 97 "printrcl.l"
DBG(CUSTOM_COMMAND); return CUSTOM_COMMAND;
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 99 "printrcl.l"
+#line 98 "printrcl.l"
DBG(COMMAND_TYPE); return COMMAND_TYPE;
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 100 "printrcl.l"
+#line 99 "printrcl.l"
DBG(GLOBAL_SETTINGS); return GLOBAL_SETTINGS;
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 101 "printrcl.l"
+#line 100 "printrcl.l"
DBG(END_GLOBAL_SETTINGS); return END_GLOBAL_SETTINGS;
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 102 "printrcl.l"
+#line 101 "printrcl.l"
DBG(GLOBAL); return GLOBAL;
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 104 "printrcl.l"
+#line 103 "printrcl.l"
DBG(pINT); return pINT;
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 105 "printrcl.l"
+#line 104 "printrcl.l"
DBG(pSTRING_LIST); return pSTRING_LIST;
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 106 "printrcl.l"
+#line 105 "printrcl.l"
DBG(pFILE); return pFILE;
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 107 "printrcl.l"
+#line 106 "printrcl.l"
DBG(pDOUBLE); return pDOUBLE;
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 108 "printrcl.l"
+#line 107 "printrcl.l"
DBG(pDIMENSION); return pDIMENSION;
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 109 "printrcl.l"
+#line 108 "printrcl.l"
DBG(pBOOLEAN); return pBOOLEAN;
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 110 "printrcl.l"
+#line 109 "printrcl.l"
DBG(pCURVE); return pCURVE;
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 112 "printrcl.l"
-yylval.ival = atoi(yytext); DBG(tINT); return tINT;
+#line 111 "printrcl.l"
+yylval.dval = strtod(yytext, NULL); DBG(tNUMBER); return tNUMBER;
YY_BREAK
case 32:
+/* rule 32 can match eol */
YY_RULE_SETUP
-#line 113 "printrcl.l"
-yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
- YY_BREAK
-case 33:
-/* rule 33 can match eol */
-YY_RULE_SETUP
-#line 114 "printrcl.l"
+#line 112 "printrcl.l"
yylval.sval = q_strdup(yytext); DBG(tSTRING); return tSTRING;
YY_BREAK
-case 34:
+case 33:
YY_RULE_SETUP
-#line 115 "printrcl.l"
+#line 113 "printrcl.l"
yylval.sval = g_strdup(yytext); DBG(tBOOLEAN); return tBOOLEAN;
YY_BREAK
-case 35:
+case 34:
YY_RULE_SETUP
-#line 116 "printrcl.l"
+#line 114 "printrcl.l"
yylval.sval = g_strdup(yytext); DBG(tWORD); return tWORD;
YY_BREAK
-case 36:
-/* rule 36 can match eol */
+case 35:
+/* rule 35 can match eol */
YY_RULE_SETUP
-#line 117 "printrcl.l"
+#line 115 "printrcl.l"
DBG(PRINTRC_HDR); return PRINTRC_HDR;
YY_BREAK
-case 37:
+case 36:
YY_RULE_SETUP
-#line 118 "printrcl.l"
+#line 116 "printrcl.l"
DBG(whitespace1); /* Skip blanks/tabs */
YY_BREAK
-case 38:
+case 37:
YY_RULE_SETUP
-#line 119 "printrcl.l"
+#line 117 "printrcl.l"
DBG(comment1); /* Skip comments */
YY_BREAK
-case 39:
-/* rule 39 can match eol */
+case 38:
+/* rule 38 can match eol */
YY_RULE_SETUP
-#line 120 "printrcl.l"
+#line 118 "printrcl.l"
DBG(newline); mylineno++;
YY_BREAK
-case 40:
+case 39:
YY_RULE_SETUP
-#line 121 "printrcl.l"
+#line 119 "printrcl.l"
ECHO;
YY_BREAK
-#line 1255 "printrcl.c"
+#line 1250 "printrcl.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2245,4 +2240,4 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 121 "printrcl.l"
+#line 119 "printrcl.l"
diff --git a/src/gutenprintui2/printrcl.l b/src/gutenprintui2/printrcl.l
index 931f63d..578227c 100644
--- a/src/gutenprintui2/printrcl.l
+++ b/src/gutenprintui2/printrcl.l
@@ -68,11 +68,10 @@ q_strdup(const char *s)
digit [0-9]
boolean (True)|(False)
-integer [-+]?{digit}+
-float [-+]?{digit}+(\.{digit}+)?([eE][-+]?{digit}+)?
-string ([\"][^\"\n]*[\"])|([\'][^\']*[\'])
+number [-+]?{digit}+(\.{digit}+)?([eE][-+]?{digit}+)?
+string ([\"][^\"\n]*[\"])|([\'][^\']*[\'])
ws [ \t]+
-printrc_hdr #PRINTRCv[234].*\n
+printrc_hdr #PRINTRCv[2345].*\n
word [a-zA-Z][a-zA-Z0-9_]*
%%
@@ -109,8 +108,7 @@ Dimension DBG(pDIMENSION); return pDIMENSION;
Boolean DBG(pBOOLEAN); return pBOOLEAN;
Curve DBG(pCURVE); return pCURVE;
-{integer} yylval.ival = atoi(yytext); DBG(tINT); return tINT;
-{float} yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
+{number} yylval.dval = strtod(yytext, NULL); DBG(tNUMBER); return tNUMBER;
{string} yylval.sval = q_strdup(yytext); DBG(tSTRING); return tSTRING;
{boolean} yylval.sval = g_strdup(yytext); DBG(tBOOLEAN); return tBOOLEAN;
{word} yylval.sval = g_strdup(yytext); DBG(tWORD); return tWORD;
diff --git a/src/gutenprintui2/printrcy.c b/src/gutenprintui2/printrcy.c
index 7fb4d1b..7e81f19 100644
--- a/src/gutenprintui2/printrcy.c
+++ b/src/gutenprintui2/printrcy.c
@@ -133,85 +133,81 @@ extern int yydebug;
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
- tINT = 258,
- tDOUBLE = 259,
- tDIMENSION = 260,
- tBOOLEAN = 261,
- tSTRING = 262,
- tWORD = 263,
- tGSWORD = 264,
- CURRENT_PRINTER = 265,
- SHOW_ALL_PAPER_SIZES = 266,
- PRINTER = 267,
- DESTINATION = 268,
- SCALING = 269,
- ORIENTATION = 270,
- AUTOSIZE_ROLL_PAPER = 271,
- UNIT = 272,
- DRIVER = 273,
- LEFT = 274,
- TOP = 275,
- CUSTOM_PAGE_WIDTH = 276,
- CUSTOM_PAGE_HEIGHT = 277,
- OUTPUT_TYPE = 278,
- PRINTRC_HDR = 279,
- PARAMETER = 280,
- QUEUE_NAME = 281,
- OUTPUT_FILENAME = 282,
- EXTRA_PRINTER_OPTIONS = 283,
- CUSTOM_COMMAND = 284,
- COMMAND_TYPE = 285,
- GLOBAL_SETTINGS = 286,
- GLOBAL = 287,
- END_GLOBAL_SETTINGS = 288,
- pINT = 289,
- pSTRING_LIST = 290,
- pFILE = 291,
- pDOUBLE = 292,
- pDIMENSION = 293,
- pBOOLEAN = 294,
- pCURVE = 295
+ tNUMBER = 258,
+ tBOOLEAN = 259,
+ tSTRING = 260,
+ tWORD = 261,
+ tGSWORD = 262,
+ CURRENT_PRINTER = 263,
+ SHOW_ALL_PAPER_SIZES = 264,
+ PRINTER = 265,
+ DESTINATION = 266,
+ SCALING = 267,
+ ORIENTATION = 268,
+ AUTOSIZE_ROLL_PAPER = 269,
+ UNIT = 270,
+ DRIVER = 271,
+ LEFT = 272,
+ TOP = 273,
+ CUSTOM_PAGE_WIDTH = 274,
+ CUSTOM_PAGE_HEIGHT = 275,
+ OUTPUT_TYPE = 276,
+ PRINTRC_HDR = 277,
+ PARAMETER = 278,
+ QUEUE_NAME = 279,
+ OUTPUT_FILENAME = 280,
+ EXTRA_PRINTER_OPTIONS = 281,
+ CUSTOM_COMMAND = 282,
+ COMMAND_TYPE = 283,
+ GLOBAL_SETTINGS = 284,
+ GLOBAL = 285,
+ END_GLOBAL_SETTINGS = 286,
+ pINT = 287,
+ pSTRING_LIST = 288,
+ pFILE = 289,
+ pDOUBLE = 290,
+ pDIMENSION = 291,
+ pBOOLEAN = 292,
+ pCURVE = 293
};
#endif
/* Tokens. */
-#define tINT 258
-#define tDOUBLE 259
-#define tDIMENSION 260
-#define tBOOLEAN 261
-#define tSTRING 262
-#define tWORD 263
-#define tGSWORD 264
-#define CURRENT_PRINTER 265
-#define SHOW_ALL_PAPER_SIZES 266
-#define PRINTER 267
-#define DESTINATION 268
-#define SCALING 269
-#define ORIENTATION 270
-#define AUTOSIZE_ROLL_PAPER 271
-#define UNIT 272
-#define DRIVER 273
-#define LEFT 274
-#define TOP 275
-#define CUSTOM_PAGE_WIDTH 276
-#define CUSTOM_PAGE_HEIGHT 277
-#define OUTPUT_TYPE 278
-#define PRINTRC_HDR 279
-#define PARAMETER 280
-#define QUEUE_NAME 281
-#define OUTPUT_FILENAME 282
-#define EXTRA_PRINTER_OPTIONS 283
-#define CUSTOM_COMMAND 284
-#define COMMAND_TYPE 285
-#define GLOBAL_SETTINGS 286
-#define GLOBAL 287
-#define END_GLOBAL_SETTINGS 288
-#define pINT 289
-#define pSTRING_LIST 290
-#define pFILE 291
-#define pDOUBLE 292
-#define pDIMENSION 293
-#define pBOOLEAN 294
-#define pCURVE 295
+#define tNUMBER 258
+#define tBOOLEAN 259
+#define tSTRING 260
+#define tWORD 261
+#define tGSWORD 262
+#define CURRENT_PRINTER 263
+#define SHOW_ALL_PAPER_SIZES 264
+#define PRINTER 265
+#define DESTINATION 266
+#define SCALING 267
+#define ORIENTATION 268
+#define AUTOSIZE_ROLL_PAPER 269
+#define UNIT 270
+#define DRIVER 271
+#define LEFT 272
+#define TOP 273
+#define CUSTOM_PAGE_WIDTH 274
+#define CUSTOM_PAGE_HEIGHT 275
+#define OUTPUT_TYPE 276
+#define PRINTRC_HDR 277
+#define PARAMETER 278
+#define QUEUE_NAME 279
+#define OUTPUT_FILENAME 280
+#define EXTRA_PRINTER_OPTIONS 281
+#define CUSTOM_COMMAND 282
+#define COMMAND_TYPE 283
+#define GLOBAL_SETTINGS 284
+#define GLOBAL 285
+#define END_GLOBAL_SETTINGS 286
+#define pINT 287
+#define pSTRING_LIST 288
+#define pFILE 289
+#define pDOUBLE 290
+#define pDIMENSION 291
+#define pBOOLEAN 292
+#define pCURVE 293
@@ -242,7 +238,7 @@ int yyparse ();
/* Copy the second part of user declarations. */
/* Line 390 of yacc.c */
-#line 246 "printrcy.c"
+#line 242 "printrcy.c"
#ifdef short
# undef short
@@ -462,10 +458,10 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 10
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 75
+#define YYLAST 73
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 41
+#define YYNTOKENS 39
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 42
/* YYNRULES -- Number of rules. */
@@ -475,7 +471,7 @@ union yyalloc
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 295
+#define YYMAXUTOK 293
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -512,7 +508,7 @@ static const yytype_uint8 yytranslate[] =
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40
+ 35, 36, 37, 38
};
#if YYDEBUG
@@ -533,39 +529,39 @@ static const yytype_uint8 yyprhs[] =
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 82, 0, -1, 12, 7, 7, -1, 13, 7, -1,
- 26, 7, -1, 27, 7, -1, 28, 7, -1, 29,
- 7, -1, 30, 3, -1, 14, 4, -1, 15, 3,
- -1, 16, 3, -1, 17, 3, -1, 19, 3, -1,
- 20, 3, -1, 23, 3, -1, 21, 3, -1, 22,
- 3, -1, -1, 8, 34, 6, 3, -1, 8, 35,
- 6, 7, -1, 8, 36, 6, 7, -1, 8, 37,
- 6, 4, -1, 8, 38, 6, 3, -1, 8, 39,
- 6, 6, -1, 8, 40, 6, 7, -1, 59, -1,
- 60, -1, 61, -1, 62, -1, 64, -1, 65, -1,
- 63, -1, 25, 66, -1, 68, 67, -1, 58, -1,
- 43, -1, 49, -1, 50, -1, 51, -1, 52, -1,
- 53, -1, 54, -1, 56, -1, 57, -1, 55, -1,
- 44, -1, 45, -1, 46, -1, 47, -1, 48, -1,
- 70, 69, -1, 58, -1, 42, 70, 68, -1, 72,
- 71, -1, 58, -1, 10, 7, -1, 11, 6, -1,
- 73, -1, 74, -1, 73, 74, -1, 8, 7, -1,
- 75, -1, 77, -1, 79, 78, -1, 58, -1, 31,
- 79, 33, -1, 80, -1, 76, -1, 58, -1, 24,
- 81, 72, -1
+ 80, 0, -1, 10, 5, 5, -1, 11, 5, -1,
+ 24, 5, -1, 25, 5, -1, 26, 5, -1, 27,
+ 5, -1, 28, 3, -1, 12, 3, -1, 13, 3,
+ -1, 14, 3, -1, 15, 3, -1, 17, 3, -1,
+ 18, 3, -1, 21, 3, -1, 19, 3, -1, 20,
+ 3, -1, -1, 6, 32, 4, 3, -1, 6, 33,
+ 4, 5, -1, 6, 34, 4, 5, -1, 6, 35,
+ 4, 3, -1, 6, 36, 4, 3, -1, 6, 37,
+ 4, 4, -1, 6, 38, 4, 5, -1, 57, -1,
+ 58, -1, 59, -1, 60, -1, 62, -1, 63, -1,
+ 61, -1, 23, 64, -1, 66, 65, -1, 56, -1,
+ 41, -1, 47, -1, 48, -1, 49, -1, 50, -1,
+ 51, -1, 52, -1, 54, -1, 55, -1, 53, -1,
+ 42, -1, 43, -1, 44, -1, 45, -1, 46, -1,
+ 68, 67, -1, 56, -1, 40, 68, 66, -1, 70,
+ 69, -1, 56, -1, 8, 5, -1, 9, 4, -1,
+ 71, -1, 72, -1, 71, 72, -1, 6, 5, -1,
+ 73, -1, 75, -1, 77, 76, -1, 56, -1, 29,
+ 77, 31, -1, 78, -1, 74, -1, 56, -1, 22,
+ 79, 70, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 99, 99, 110, 117, 127, 137, 147, 157, 164,
- 171, 178, 185, 192, 199, 206, 227, 234, 241, 244,
- 261, 279, 297, 314, 331, 352, 375, 375, 375, 375,
- 376, 376, 376, 379, 382, 382, 385, 385, 385, 385,
- 386, 386, 386, 386, 386, 387, 387, 387, 387, 388,
- 388, 391, 391, 394, 397, 397, 400, 404, 414, 414,
- 417, 420, 431, 431, 434, 434, 437, 440, 440, 440,
- 443
+ 0, 97, 97, 108, 115, 125, 135, 145, 155, 162,
+ 169, 176, 183, 190, 197, 204, 225, 232, 239, 242,
+ 259, 277, 295, 312, 329, 350, 373, 373, 373, 373,
+ 374, 374, 374, 377, 380, 380, 383, 383, 383, 383,
+ 384, 384, 384, 384, 384, 385, 385, 385, 385, 386,
+ 386, 389, 389, 392, 395, 395, 398, 402, 412, 412,
+ 415, 418, 429, 429, 432, 432, 435, 438, 438, 438,
+ 441
};
#endif
@@ -574,25 +570,24 @@ static const yytype_uint16 yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "tINT", "tDOUBLE", "tDIMENSION",
- "tBOOLEAN", "tSTRING", "tWORD", "tGSWORD", "CURRENT_PRINTER",
- "SHOW_ALL_PAPER_SIZES", "PRINTER", "DESTINATION", "SCALING",
- "ORIENTATION", "AUTOSIZE_ROLL_PAPER", "UNIT", "DRIVER", "LEFT", "TOP",
- "CUSTOM_PAGE_WIDTH", "CUSTOM_PAGE_HEIGHT", "OUTPUT_TYPE", "PRINTRC_HDR",
- "PARAMETER", "QUEUE_NAME", "OUTPUT_FILENAME", "EXTRA_PRINTER_OPTIONS",
- "CUSTOM_COMMAND", "COMMAND_TYPE", "GLOBAL_SETTINGS", "GLOBAL",
- "END_GLOBAL_SETTINGS", "pINT", "pSTRING_LIST", "pFILE", "pDOUBLE",
- "pDIMENSION", "pBOOLEAN", "pCURVE", "$accept", "Printer", "Destination",
- "Queue_Name", "Output_Filename", "Extra_Printer_Options",
- "Custom_Command", "Command_Type", "Scaling", "Orientation",
- "Autosize_Roll_Paper", "Unit", "Left", "Top", "Output_Type",
- "Custom_Page_Width", "Custom_Page_Height", "Empty", "Int_Param",
- "String_List_Param", "File_Param", "Double_Param", "Dimension_Param",
- "Boolean_Param", "Curve_Param", "Typed_Param", "Parameter", "Parameters",
- "Standard_Value", "Standard_Values", "A_Printer", "Printers",
- "Current_Printer", "Show_All_Paper_Sizes", "Global", "Old_Globals",
- "New_Global_Setting", "Global_Setting", "Global_Settings",
- "Global_Subblock", "Global_Block", "Thing", YY_NULL
+ "$end", "error", "$undefined", "tNUMBER", "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", YY_NULL
};
#endif
@@ -604,22 +599,21 @@ static const yytype_uint16 yytoknum[] =
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295
+ 285, 286, 287, 288, 289, 290, 291, 292, 293
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 66, 66, 66,
- 66, 66, 66, 67, 68, 68, 69, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
- 69, 70, 70, 71, 72, 72, 73, 74, 75, 75,
- 76, 77, 78, 78, 79, 79, 80, 81, 81, 81,
- 82
+ 0, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 64, 64, 64,
+ 64, 64, 64, 65, 66, 66, 67, 67, 67, 67,
+ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ 67, 68, 68, 69, 70, 70, 71, 72, 73, 73,
+ 74, 75, 76, 76, 77, 77, 78, 79, 79, 79,
+ 80
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -669,17 +663,17 @@ static const yytype_int8 yydefgoto[] =
#define YYPACT_NINF -26
static const yytype_int8 yypact[] =
{
- -22, -2, 6, 0, -26, -26, 5, -26, -26, -26,
- -26, -26, -26, -7, 11, -26, -26, 7, 13, -26,
- -26, -26, -26, -26, -26, -26, 14, -26, -26, -26,
- 15, -26, 17, -26, 18, 20, 24, 32, 38, 39,
- 45, 46, 47, 48, 49, 50, 51, 52, 57, -26,
+ -20, -2, 14, 10, -26, -26, 7, -26, -26, -26,
+ -26, -26, -26, -5, 13, -26, -26, 8, 15, -26,
+ -26, -26, -26, -26, -26, -26, 16, -26, -26, -26,
+ 17, -26, 18, -26, 19, 22, 31, 37, 38, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 55, -26,
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
- -26, -26, -26, -26, -26, 27, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, 29, -26, -26, -26, -26,
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
- -26, -26, 10, -26, -25, -26, -26, -26, -26, -26,
- -26, -26, -26, 55, 56, 58, 59, 60, 61, 62,
- 66, 63, 64, 68, 70, 69, 67, -26, -26, -26,
+ -26, -26, 53, -26, -25, -26, -26, -26, -26, -26,
+ -26, -26, -26, 56, 57, 58, 59, 60, 61, 62,
+ 64, 63, 65, 66, 68, 69, 67, -26, -26, -26,
-26, -26, -26, -26
};
@@ -689,7 +683,7 @@ static const yytype_int8 yypgoto[] =
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
-26, -26, -26, -26, -26, -26, -26, -4, -26, -26,
-26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
- -26, -26, 40, 41, -26, -26, -26, -26, -26, -26,
+ -26, -26, 6, 40, -26, -26, -26, -26, -26, -26,
-26, -26
};
@@ -699,14 +693,14 @@ static const yytype_int8 yypgoto[] =
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 12, 18, 1, 3, 14, 16, 10, 11, 3, 93,
- 94, 95, 96, 97, 98, 99, 14, 25, 84, 26,
- 29, 30, 33, 31, 68, 67, 19, 69, 64, 4,
- 34, 35, 36, 37, 38, 70, 39, 40, 41, 42,
- 43, 71, 72, 44, 45, 46, 47, 48, 73, 74,
- 75, 76, 82, 20, 21, 0, 77, 78, 79, 80,
- 81, 100, 101, 0, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 113, 112
+ 12, 18, 1, 3, 14, 16, 3, 93, 94, 95,
+ 96, 97, 98, 99, 10, 11, 14, 25, 26, 20,
+ 29, 30, 33, 31, 67, 68, 19, 4, 64, 34,
+ 35, 36, 37, 38, 69, 39, 40, 41, 42, 43,
+ 70, 71, 44, 45, 46, 47, 48, 72, 73, 74,
+ 75, 76, 82, 21, 77, 78, 79, 80, 81, 84,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 110,
+ 109, 111, 113, 112
};
#define yypact_value_is_default(Yystate) \
@@ -715,34 +709,34 @@ static const yytype_uint8 yytable[] =
#define yytable_value_is_error(Yytable_value) \
YYID (0)
-static const yytype_int8 yycheck[] =
+static const yytype_uint8 yycheck[] =
{
- 4, 8, 24, 10, 11, 9, 0, 7, 10, 34,
- 35, 36, 37, 38, 39, 40, 11, 6, 8, 12,
- 7, 7, 7, 27, 4, 7, 33, 3, 32, 31,
- 13, 14, 15, 16, 17, 3, 19, 20, 21, 22,
- 23, 3, 3, 26, 27, 28, 29, 30, 3, 3,
- 3, 3, 25, 13, 13, -1, 7, 7, 7, 7,
- 3, 6, 6, -1, 6, 6, 6, 6, 6, 3,
- 7, 7, 4, 3, 7, 6
+ 4, 6, 22, 8, 9, 9, 8, 32, 33, 34,
+ 35, 36, 37, 38, 0, 5, 9, 4, 10, 13,
+ 5, 5, 5, 27, 5, 3, 31, 29, 32, 11,
+ 12, 13, 14, 15, 3, 17, 18, 19, 20, 21,
+ 3, 3, 24, 25, 26, 27, 28, 3, 3, 3,
+ 3, 3, 23, 13, 5, 5, 5, 5, 3, 6,
+ 4, 4, 4, 4, 4, 4, 4, 3, 5, 3,
+ 5, 3, 5, 4
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 24, 82, 10, 31, 58, 73, 76, 80, 81,
- 0, 7, 58, 79, 11, 74, 58, 72, 8, 33,
- 73, 74, 75, 77, 78, 6, 12, 42, 71, 7,
- 7, 58, 70, 7, 13, 14, 15, 16, 17, 19,
- 20, 21, 22, 23, 26, 27, 28, 29, 30, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 68, 69, 7, 4, 3,
- 3, 3, 3, 3, 3, 3, 3, 7, 7, 7,
- 7, 3, 25, 67, 8, 59, 60, 61, 62, 63,
- 64, 65, 66, 34, 35, 36, 37, 38, 39, 40,
- 6, 6, 6, 6, 6, 6, 6, 3, 7, 7,
- 4, 3, 6, 7
+ 0, 22, 80, 8, 29, 56, 71, 74, 78, 79,
+ 0, 5, 56, 77, 9, 72, 56, 70, 6, 31,
+ 71, 72, 73, 75, 76, 4, 10, 40, 69, 5,
+ 5, 56, 68, 5, 11, 12, 13, 14, 15, 17,
+ 18, 19, 20, 21, 24, 25, 26, 27, 28, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 66, 67, 5, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 5, 5, 5,
+ 5, 3, 23, 65, 6, 57, 58, 59, 60, 61,
+ 62, 63, 64, 32, 33, 34, 35, 36, 37, 38,
+ 4, 4, 4, 4, 4, 4, 4, 3, 5, 5,
+ 3, 3, 4, 5
};
#define yyerrok (yyerrstatus = 0)
@@ -1544,7 +1538,7 @@ yyreduce:
{
case 2:
/* Line 1792 of yacc.c */
-#line 100 "printrcy.y"
+#line 98 "printrcy.y"
{
current_printer = stpui_plist_create((yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
g_free((yyvsp[(2) - (3)].sval));
@@ -1554,7 +1548,7 @@ yyreduce:
case 3:
/* Line 1792 of yacc.c */
-#line 111 "printrcy.y"
+#line 109 "printrcy.y"
{
if ((yyvsp[(2) - (2)].sval))
g_free((yyvsp[(2) - (2)].sval));
@@ -1563,7 +1557,7 @@ yyreduce:
case 4:
/* Line 1792 of yacc.c */
-#line 118 "printrcy.y"
+#line 116 "printrcy.y"
{
if (current_printer && (yyvsp[(2) - (2)].sval))
{
@@ -1575,7 +1569,7 @@ yyreduce:
case 5:
/* Line 1792 of yacc.c */
-#line 128 "printrcy.y"
+#line 126 "printrcy.y"
{
if (current_printer && (yyvsp[(2) - (2)].sval))
{
@@ -1587,7 +1581,7 @@ yyreduce:
case 6:
/* Line 1792 of yacc.c */
-#line 138 "printrcy.y"
+#line 136 "printrcy.y"
{
if (current_printer && (yyvsp[(2) - (2)].sval))
{
@@ -1599,7 +1593,7 @@ yyreduce:
case 7:
/* Line 1792 of yacc.c */
-#line 148 "printrcy.y"
+#line 146 "printrcy.y"
{
if (current_printer && (yyvsp[(2) - (2)].sval))
{
@@ -1611,16 +1605,16 @@ yyreduce:
case 8:
/* Line 1792 of yacc.c */
-#line 158 "printrcy.y"
+#line 156 "printrcy.y"
{
if (current_printer)
- stpui_plist_set_command_type(current_printer, (yyvsp[(2) - (2)].ival));
+ stpui_plist_set_command_type(current_printer, (int) (yyvsp[(2) - (2)].dval));
}
break;
case 9:
/* Line 1792 of yacc.c */
-#line 165 "printrcy.y"
+#line 163 "printrcy.y"
{
if (current_printer)
current_printer->scaling = (yyvsp[(2) - (2)].dval);
@@ -1629,56 +1623,56 @@ yyreduce:
case 10:
/* Line 1792 of yacc.c */
-#line 172 "printrcy.y"
+#line 170 "printrcy.y"
{
if (current_printer)
- current_printer->orientation = (yyvsp[(2) - (2)].ival);
+ current_printer->orientation = (int) (yyvsp[(2) - (2)].dval);
}
break;
case 11:
/* Line 1792 of yacc.c */
-#line 179 "printrcy.y"
+#line 177 "printrcy.y"
{
if (current_printer)
- current_printer->auto_size_roll_feed_paper = (yyvsp[(2) - (2)].ival);
+ current_printer->auto_size_roll_feed_paper = (int) (yyvsp[(2) - (2)].dval);
}
break;
case 12:
/* Line 1792 of yacc.c */
-#line 186 "printrcy.y"
+#line 184 "printrcy.y"
{
if (current_printer)
- current_printer->unit = (yyvsp[(2) - (2)].ival);
+ current_printer->unit = (int) (yyvsp[(2) - (2)].dval);
}
break;
case 13:
/* Line 1792 of yacc.c */
-#line 193 "printrcy.y"
+#line 191 "printrcy.y"
{
if (current_printer)
- stp_set_left(current_printer->v, (yyvsp[(2) - (2)].ival));
+ stp_set_left(current_printer->v, (yyvsp[(2) - (2)].dval));
}
break;
case 14:
/* Line 1792 of yacc.c */
-#line 200 "printrcy.y"
+#line 198 "printrcy.y"
{
if (current_printer)
- stp_set_top(current_printer->v, (yyvsp[(2) - (2)].ival));
+ stp_set_top(current_printer->v, (yyvsp[(2) - (2)].dval));
}
break;
case 15:
/* Line 1792 of yacc.c */
-#line 207 "printrcy.y"
+#line 205 "printrcy.y"
{
if (current_printer)
{
- switch ((yyvsp[(2) - (2)].ival))
+ switch ((int) (yyvsp[(2) - (2)].dval))
{
case 0:
stp_set_string_parameter
@@ -1697,29 +1691,29 @@ yyreduce:
case 16:
/* Line 1792 of yacc.c */
-#line 228 "printrcy.y"
+#line 226 "printrcy.y"
{
if (current_printer)
- stp_set_page_width(current_printer->v, (yyvsp[(2) - (2)].ival));
+ stp_set_page_width(current_printer->v, (yyvsp[(2) - (2)].dval));
}
break;
case 17:
/* Line 1792 of yacc.c */
-#line 235 "printrcy.y"
+#line 233 "printrcy.y"
{
if (current_printer)
- stp_set_page_height(current_printer->v, (yyvsp[(2) - (2)].ival));
+ stp_set_page_height(current_printer->v, (yyvsp[(2) - (2)].dval));
}
break;
case 19:
/* Line 1792 of yacc.c */
-#line 245 "printrcy.y"
+#line 243 "printrcy.y"
{
if (current_printer)
{
- stp_set_int_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].ival));
+ stp_set_int_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (int) (yyvsp[(4) - (4)].dval));
if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
stp_set_int_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
STP_PARAMETER_INACTIVE);
@@ -1734,7 +1728,7 @@ yyreduce:
case 20:
/* Line 1792 of yacc.c */
-#line 262 "printrcy.y"
+#line 260 "printrcy.y"
{
if (current_printer)
{
@@ -1754,7 +1748,7 @@ yyreduce:
case 21:
/* Line 1792 of yacc.c */
-#line 280 "printrcy.y"
+#line 278 "printrcy.y"
{
if (current_printer)
{
@@ -1774,7 +1768,7 @@ yyreduce:
case 22:
/* Line 1792 of yacc.c */
-#line 298 "printrcy.y"
+#line 296 "printrcy.y"
{
if (current_printer)
{
@@ -1793,11 +1787,11 @@ yyreduce:
case 23:
/* Line 1792 of yacc.c */
-#line 315 "printrcy.y"
+#line 313 "printrcy.y"
{
if (current_printer)
{
- stp_set_dimension_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].ival));
+ stp_set_dimension_parameter(current_printer->v, (yyvsp[(1) - (4)].sval), (yyvsp[(4) - (4)].dval));
if (strcmp((yyvsp[(3) - (4)].sval), "False") == 0)
stp_set_dimension_parameter_active(current_printer->v, (yyvsp[(1) - (4)].sval),
STP_PARAMETER_INACTIVE);
@@ -1812,7 +1806,7 @@ yyreduce:
case 24:
/* Line 1792 of yacc.c */
-#line 332 "printrcy.y"
+#line 330 "printrcy.y"
{
if (current_printer)
{
@@ -1835,7 +1829,7 @@ yyreduce:
case 25:
/* Line 1792 of yacc.c */
-#line 353 "printrcy.y"
+#line 351 "printrcy.y"
{
if (current_printer)
{
@@ -1860,13 +1854,13 @@ yyreduce:
case 56:
/* Line 1792 of yacc.c */
-#line 401 "printrcy.y"
+#line 399 "printrcy.y"
{ stpui_printrc_current_printer = (yyvsp[(2) - (2)].sval); }
break;
case 57:
/* Line 1792 of yacc.c */
-#line 405 "printrcy.y"
+#line 403 "printrcy.y"
{
if (strcmp((yyvsp[(2) - (2)].sval), "True") == 0)
stpui_show_all_paper_sizes = 1;
@@ -1878,7 +1872,7 @@ yyreduce:
case 61:
/* Line 1792 of yacc.c */
-#line 421 "printrcy.y"
+#line 419 "printrcy.y"
{
if ((yyvsp[(2) - (2)].sval))
{
@@ -1891,7 +1885,7 @@ yyreduce:
/* Line 1792 of yacc.c */
-#line 1895 "printrcy.c"
+#line 1889 "printrcy.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2123,5 +2117,5 @@ yyreturn:
/* Line 2055 of yacc.c */
-#line 446 "printrcy.y"
+#line 444 "printrcy.y"
diff --git a/src/gutenprintui2/printrcy.h b/src/gutenprintui2/printrcy.h
index a123453..322e60c 100644
--- a/src/gutenprintui2/printrcy.h
+++ b/src/gutenprintui2/printrcy.h
@@ -46,85 +46,81 @@ extern int yydebug;
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
- tINT = 258,
- tDOUBLE = 259,
- tDIMENSION = 260,
- tBOOLEAN = 261,
- tSTRING = 262,
- tWORD = 263,
- tGSWORD = 264,
- CURRENT_PRINTER = 265,
- SHOW_ALL_PAPER_SIZES = 266,
- PRINTER = 267,
- DESTINATION = 268,
- SCALING = 269,
- ORIENTATION = 270,
- AUTOSIZE_ROLL_PAPER = 271,
- UNIT = 272,
- DRIVER = 273,
- LEFT = 274,
- TOP = 275,
- CUSTOM_PAGE_WIDTH = 276,
- CUSTOM_PAGE_HEIGHT = 277,
- OUTPUT_TYPE = 278,
- PRINTRC_HDR = 279,
- PARAMETER = 280,
- QUEUE_NAME = 281,
- OUTPUT_FILENAME = 282,
- EXTRA_PRINTER_OPTIONS = 283,
- CUSTOM_COMMAND = 284,
- COMMAND_TYPE = 285,
- GLOBAL_SETTINGS = 286,
- GLOBAL = 287,
- END_GLOBAL_SETTINGS = 288,
- pINT = 289,
- pSTRING_LIST = 290,
- pFILE = 291,
- pDOUBLE = 292,
- pDIMENSION = 293,
- pBOOLEAN = 294,
- pCURVE = 295
+ tNUMBER = 258,
+ tBOOLEAN = 259,
+ tSTRING = 260,
+ tWORD = 261,
+ tGSWORD = 262,
+ CURRENT_PRINTER = 263,
+ SHOW_ALL_PAPER_SIZES = 264,
+ PRINTER = 265,
+ DESTINATION = 266,
+ SCALING = 267,
+ ORIENTATION = 268,
+ AUTOSIZE_ROLL_PAPER = 269,
+ UNIT = 270,
+ DRIVER = 271,
+ LEFT = 272,
+ TOP = 273,
+ CUSTOM_PAGE_WIDTH = 274,
+ CUSTOM_PAGE_HEIGHT = 275,
+ OUTPUT_TYPE = 276,
+ PRINTRC_HDR = 277,
+ PARAMETER = 278,
+ QUEUE_NAME = 279,
+ OUTPUT_FILENAME = 280,
+ EXTRA_PRINTER_OPTIONS = 281,
+ CUSTOM_COMMAND = 282,
+ COMMAND_TYPE = 283,
+ GLOBAL_SETTINGS = 284,
+ GLOBAL = 285,
+ END_GLOBAL_SETTINGS = 286,
+ pINT = 287,
+ pSTRING_LIST = 288,
+ pFILE = 289,
+ pDOUBLE = 290,
+ pDIMENSION = 291,
+ pBOOLEAN = 292,
+ pCURVE = 293
};
#endif
/* Tokens. */
-#define tINT 258
-#define tDOUBLE 259
-#define tDIMENSION 260
-#define tBOOLEAN 261
-#define tSTRING 262
-#define tWORD 263
-#define tGSWORD 264
-#define CURRENT_PRINTER 265
-#define SHOW_ALL_PAPER_SIZES 266
-#define PRINTER 267
-#define DESTINATION 268
-#define SCALING 269
-#define ORIENTATION 270
-#define AUTOSIZE_ROLL_PAPER 271
-#define UNIT 272
-#define DRIVER 273
-#define LEFT 274
-#define TOP 275
-#define CUSTOM_PAGE_WIDTH 276
-#define CUSTOM_PAGE_HEIGHT 277
-#define OUTPUT_TYPE 278
-#define PRINTRC_HDR 279
-#define PARAMETER 280
-#define QUEUE_NAME 281
-#define OUTPUT_FILENAME 282
-#define EXTRA_PRINTER_OPTIONS 283
-#define CUSTOM_COMMAND 284
-#define COMMAND_TYPE 285
-#define GLOBAL_SETTINGS 286
-#define GLOBAL 287
-#define END_GLOBAL_SETTINGS 288
-#define pINT 289
-#define pSTRING_LIST 290
-#define pFILE 291
-#define pDOUBLE 292
-#define pDIMENSION 293
-#define pBOOLEAN 294
-#define pCURVE 295
+#define tNUMBER 258
+#define tBOOLEAN 259
+#define tSTRING 260
+#define tWORD 261
+#define tGSWORD 262
+#define CURRENT_PRINTER 263
+#define SHOW_ALL_PAPER_SIZES 264
+#define PRINTER 265
+#define DESTINATION 266
+#define SCALING 267
+#define ORIENTATION 268
+#define AUTOSIZE_ROLL_PAPER 269
+#define UNIT 270
+#define DRIVER 271
+#define LEFT 272
+#define TOP 273
+#define CUSTOM_PAGE_WIDTH 274
+#define CUSTOM_PAGE_HEIGHT 275
+#define OUTPUT_TYPE 276
+#define PRINTRC_HDR 277
+#define PARAMETER 278
+#define QUEUE_NAME 279
+#define OUTPUT_FILENAME 280
+#define EXTRA_PRINTER_OPTIONS 281
+#define CUSTOM_COMMAND 282
+#define COMMAND_TYPE 283
+#define GLOBAL_SETTINGS 284
+#define GLOBAL 285
+#define END_GLOBAL_SETTINGS 286
+#define pINT 287
+#define pSTRING_LIST 288
+#define pFILE 289
+#define pDOUBLE 290
+#define pDIMENSION 291
+#define pBOOLEAN 292
+#define pCURVE 293
diff --git a/src/gutenprintui2/printrcy.y b/src/gutenprintui2/printrcy.y
index bf6f9a1..6832634 100644
--- a/src/gutenprintui2/printrcy.y
+++ b/src/gutenprintui2/printrcy.y
@@ -52,9 +52,7 @@ static stpui_plist_t *current_printer = NULL;
%}
-%token <ival> tINT
-%token <dval> tDOUBLE
-%token <ival> tDIMENSION
+%token <dval> tNUMBER
%token <sval> tBOOLEAN
%token <sval> tSTRING
%token <sval> tWORD
@@ -154,60 +152,60 @@ Custom_Command: CUSTOM_COMMAND tSTRING
}
;
-Command_Type: COMMAND_TYPE tINT
+Command_Type: COMMAND_TYPE tNUMBER
{
if (current_printer)
- stpui_plist_set_command_type(current_printer, $2);
+ stpui_plist_set_command_type(current_printer, (int) $2);
}
;
-Scaling: SCALING tDOUBLE
+Scaling: SCALING tNUMBER
{
if (current_printer)
current_printer->scaling = $2;
}
;
-Orientation: ORIENTATION tINT
+Orientation: ORIENTATION tNUMBER
{
if (current_printer)
- current_printer->orientation = $2;
+ current_printer->orientation = (int) $2;
}
;
-Autosize_Roll_Paper: AUTOSIZE_ROLL_PAPER tINT
+Autosize_Roll_Paper: AUTOSIZE_ROLL_PAPER tNUMBER
{
if (current_printer)
- current_printer->auto_size_roll_feed_paper = $2;
+ current_printer->auto_size_roll_feed_paper = (int) $2;
}
;
-Unit: UNIT tINT
+Unit: UNIT tNUMBER
{
if (current_printer)
- current_printer->unit = $2;
+ current_printer->unit = (int) $2;
}
;
-Left: LEFT tINT
+Left: LEFT tNUMBER
{
if (current_printer)
stp_set_left(current_printer->v, $2);
}
;
-Top: TOP tINT
+Top: TOP tNUMBER
{
if (current_printer)
stp_set_top(current_printer->v, $2);
}
;
-Output_Type: OUTPUT_TYPE tINT
+Output_Type: OUTPUT_TYPE tNUMBER
{
if (current_printer)
{
- switch ($2)
+ switch ((int) $2)
{
case 0:
stp_set_string_parameter
@@ -224,14 +222,14 @@ Output_Type: OUTPUT_TYPE tINT
}
;
-Custom_Page_Width: CUSTOM_PAGE_WIDTH tINT
+Custom_Page_Width: CUSTOM_PAGE_WIDTH tNUMBER
{
if (current_printer)
stp_set_page_width(current_printer->v, $2);
}
;
-Custom_Page_Height: CUSTOM_PAGE_HEIGHT tINT
+Custom_Page_Height: CUSTOM_PAGE_HEIGHT tNUMBER
{
if (current_printer)
stp_set_page_height(current_printer->v, $2);
@@ -241,11 +239,11 @@ Custom_Page_Height: CUSTOM_PAGE_HEIGHT tINT
Empty:
;
-Int_Param: tWORD pINT tBOOLEAN tINT
+Int_Param: tWORD pINT tBOOLEAN tNUMBER
{
if (current_printer)
{
- stp_set_int_parameter(current_printer->v, $1, $4);
+ stp_set_int_parameter(current_printer->v, $1, (int) $4);
if (strcmp($3, "False") == 0)
stp_set_int_parameter_active(current_printer->v, $1,
STP_PARAMETER_INACTIVE);
@@ -294,7 +292,7 @@ File_Param: tWORD pFILE tBOOLEAN tSTRING
}
;
-Double_Param: tWORD pDOUBLE tBOOLEAN tDOUBLE
+Double_Param: tWORD pDOUBLE tBOOLEAN tNUMBER
{
if (current_printer)
{
@@ -311,7 +309,7 @@ Double_Param: tWORD pDOUBLE tBOOLEAN tDOUBLE
}
;
-Dimension_Param: tWORD pDIMENSION tBOOLEAN tINT
+Dimension_Param: tWORD pDIMENSION tBOOLEAN tNUMBER
{
if (current_printer)
{
diff --git a/src/main/canon-printers.h b/src/main/canon-printers.h
index fec7df1..6345443 100644
--- a/src/main/canon-printers.h
+++ b/src/main/canon-printers.h
@@ -37,12 +37,12 @@
typedef struct canon_caps {
const char* name; /* model name */
int model_id; /* model ID code for use in commands */
- int max_width; /* maximum printable paper size */
- int max_height;
- int border_left; /* left margin, points */
- int border_right; /* right margin, points */
- int border_top; /* absolute top margin, points */
- int border_bottom; /* absolute bottom margin, points */
+ stp_dimension_t max_width; /* maximum printable paper size */
+ stp_dimension_t max_height;
+ stp_dimension_t border_left; /* left margin, points */
+ stp_dimension_t border_right; /* right margin, points */
+ stp_dimension_t border_top; /* absolute top margin, points */
+ stp_dimension_t border_bottom; /* absolute bottom margin, points */
/* int raster_lines_per_block; */
/* number of raster lines in every F) command */
const canon_slotlist_t* slotlist; /*available paperslots */
diff --git a/src/main/escp2-driver.c b/src/main/escp2-driver.c
index c49f41b..f3c8d51 100644
--- a/src/main/escp2-driver.c
+++ b/src/main/escp2-driver.c
@@ -83,6 +83,12 @@ print_remote_float_param(stp_vars_t *v, const char *param, double value)
}
static void
+print_remote_dim_param(stp_vars_t *v, const char *param, double value)
+{
+ print_remote_float_param(v, param, value);
+}
+
+static void
print_debug_params(stp_vars_t *v)
{
escp2_privdata_t *pd = get_privdata(v);
@@ -93,10 +99,10 @@ print_debug_params(stp_vars_t *v)
print_remote_param(v, "Version", VERSION);
print_remote_param(v, "Release Date", RELEASE_DATE);
print_remote_param(v, "Driver", stp_get_driver(v));
- print_remote_int_param(v, "Left", stp_get_left(v));
- print_remote_int_param(v, "Top", stp_get_top(v));
- print_remote_int_param(v, "Page Width", stp_get_page_width(v));
- print_remote_int_param(v, "Page Height", stp_get_page_height(v));
+ print_remote_dim_param(v, "Left", stp_get_left(v));
+ print_remote_dim_param(v, "Top", stp_get_top(v));
+ print_remote_dim_param(v, "Page Width", stp_get_page_width(v));
+ print_remote_dim_param(v, "Page Height", stp_get_page_height(v));
print_remote_int_param(v, "Model", stp_get_model_id(v));
print_remote_int_param(v, "Ydpi", pd->res->vres);
print_remote_int_param(v, "Xdpi", pd->res->hres);
@@ -108,19 +114,23 @@ print_debug_params(stp_vars_t *v)
*/
print_remote_int_param(v, "Use_printer_weave", pd->use_printer_weave);
print_remote_int_param(v, "Duplex", pd->duplex);
- print_remote_int_param(v, "Page_left", pd->page_left);
- print_remote_int_param(v, "Page_right", pd->page_right);
- print_remote_int_param(v, "Page_top", pd->page_top);
- print_remote_int_param(v, "Page_bottom", pd->page_bottom);
- print_remote_int_param(v, "Page_width", pd->page_width);
- print_remote_int_param(v, "Page_height", pd->page_height);
- print_remote_int_param(v, "Page_true_height", pd->page_true_height);
- print_remote_int_param(v, "Page_extra_height", pd->page_extra_height);
- print_remote_int_param(v, "Paper_extra_bottom", pd->paper_extra_bottom);
- print_remote_int_param(v, "Image_left", pd->image_left);
- print_remote_int_param(v, "Image_top", pd->image_top);
- print_remote_int_param(v, "Image_width", pd->image_width);
- print_remote_int_param(v, "Image_height", pd->image_height);
+ print_remote_dim_param(v, "Page_left", pd->page_left);
+ print_remote_dim_param(v, "Page_right", pd->page_right);
+ print_remote_dim_param(v, "Page_top", pd->page_top);
+ print_remote_dim_param(v, "Page_bottom", pd->page_bottom);
+ print_remote_dim_param(v, "Page_width", pd->page_width);
+ print_remote_dim_param(v, "Page_height", pd->page_height);
+ print_remote_dim_param(v, "Page_true_height", pd->page_true_height);
+ print_remote_dim_param(v, "Page_extra_height", pd->page_extra_height);
+ print_remote_dim_param(v, "Paper_extra_bottom", pd->paper_extra_bottom);
+ print_remote_dim_param(v, "Image_left", pd->image_left);
+ print_remote_dim_param(v, "Image_top", pd->image_top);
+ print_remote_dim_param(v, "Image_width", pd->image_width);
+ print_remote_dim_param(v, "Image_height", pd->image_height);
+ print_remote_dim_param(v, "CD_X_offset", pd->cd_x_offset);
+ print_remote_dim_param(v, "CD_Y_offset", pd->cd_y_offset);
+ print_remote_dim_param(v, "CD_inner_radius", pd->cd_inner_radius);
+ print_remote_dim_param(v, "CD_outer_radius", pd->cd_outer_radius);
print_remote_int_param(v, "Image_scaled_width", pd->image_scaled_width);
print_remote_int_param(v, "Image_scaled_height", pd->image_scaled_height);
print_remote_int_param(v, "Image_printed_width", pd->image_printed_width);
diff --git a/src/main/mxml-file.c b/src/main/mxml-file.c
index 8f8ff46..4ee1328 100644
--- a/src/main/mxml-file.c
+++ b/src/main/mxml-file.c
@@ -429,6 +429,10 @@ mxml_load_data(stp_mxml_node_t *top, /* I - Top node */
node = stp_mxmlNewReal(parent, strtod(buffer, &bufptr));
break;
+ case STP_MXML_DIMENSION :
+ node = stp_mxmlNewDimension(parent, strtod(buffer, &bufptr));
+ break;
+
case STP_MXML_TEXT :
node = stp_mxmlNewText(parent, whitespace, buffer);
break;
@@ -1242,6 +1246,7 @@ mxml_write_node(stp_mxml_node_t *node, /* I - Node to write */
break;
case STP_MXML_REAL :
+ case STP_MXML_DIMENSION :
if (node->prev)
{
if (col > STP_MXML_WRAP)
diff --git a/src/main/mxml-node.c b/src/main/mxml-node.c
index afecf68..b050fe2 100644
--- a/src/main/mxml-node.c
+++ b/src/main/mxml-node.c
@@ -21,6 +21,7 @@
* stp_mxmlNewInteger() - Create a new integer node.
* stp_mxmlNewOpaque() - Create a new opaque string.
* stp_mxmlNewReal() - Create a new real number node.
+ * stp_mxmlNewDimension() - Create a new dimension node.
* stp_mxmlNewText() - Create a new text fragment node.
* stp_mxmlRemove() - Remove a node from its parent.
* mxml_new() - Create a new node.
@@ -223,6 +224,9 @@ stp_mxmlDelete(stp_mxml_node_t *node) /* I - Node to delete */
case STP_MXML_REAL :
/* Nothing to do */
break;
+ case STP_MXML_DIMENSION :
+ /* Nothing to do */
+ break;
case STP_MXML_TEXT :
if (node->value.text.string)
free(node->value.text.string);
@@ -369,6 +373,13 @@ stp_mxmlNewReal(stp_mxml_node_t *parent, /* I - Parent node or STP_MXML_NO_PAREN
return (node);
}
+stp_mxml_node_t * /* O - New node */
+stp_mxmlNewDimension(stp_mxml_node_t *parent, /* I - Parent node or STP_MXML_NO_PARENT */
+ stp_dimension_t dimension) /* I - Dimension value */
+{
+ return stp_mxmlNewReal(parent, (double) dimension);
+}
+
/*
* 'stp_mxmlNewText()' - Create a new text fragment node.
diff --git a/src/main/print-canon.c b/src/main/print-canon.c
index 7b1b1cc..4405fae 100644
--- a/src/main/print-canon.c
+++ b/src/main/print-canon.c
@@ -2666,7 +2666,7 @@ canon_size_type(const stp_vars_t *v, const canon_cap_t * caps)
stp_deprintf(STP_DBG_CANON,"canon: Unknown paper size '%s' - using custom\n",name);
} else {
- stp_deprintf(STP_DBG_CANON,"canon: Couldn't look up paper size %dx%d - "
+ stp_deprintf(STP_DBG_CANON,"canon: Couldn't look up paper size %fx%f - "
"using custom\n",stp_get_page_height(v), stp_get_page_width(v));
}
return 0;
@@ -2763,7 +2763,7 @@ static void fix_papersize(unsigned char arg_ESCP_1, int *paper_width, int *paper
}
static void
-canon_describe_resolution(const stp_vars_t *v, int *x, int *y)
+canon_describe_resolution(const stp_vars_t *v, stp_resolution_t *x, stp_resolution_t *y)
{
const canon_mode_t* mode = NULL;
const canon_cap_t * caps = canon_get_model_capabilities(v);
@@ -3292,18 +3292,18 @@ static void
internal_imageable_area(const stp_vars_t *v, /* I */
int use_paper_margins,
int use_maximum_area,
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
- int width, length; /* Size of page */
+ stp_dimension_t width, length; /* Size of page */
int cd = 0; /* CD selected */
const char *media_size = stp_get_string_parameter(v, "PageSize");
- int left_margin = 0;
- int right_margin = 0;
- int bottom_margin = 0;
- int top_margin = 0;
+ stp_dimension_t left_margin = 0;
+ stp_dimension_t right_margin = 0;
+ stp_dimension_t bottom_margin = 0;
+ stp_dimension_t top_margin = 0;
const stp_papersize_t *pt = NULL;
const char* input_slot = stp_get_string_parameter(v, "InputSlot");
@@ -3387,49 +3387,49 @@ internal_imageable_area(const stp_vars_t *v, /* I */
}
}
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: left_margin %d\n",left_margin);
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: right_margin %d\n",right_margin);
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: top_margin %d\n",top_margin);
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: bottom_margin %d\n",bottom_margin);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: left_margin %f\n",left_margin);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: right_margin %f\n",right_margin);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: top_margin %f\n",top_margin);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: bottom_margin %f\n",bottom_margin);
*left = left_margin;
*right = width - right_margin;
*top = top_margin;
*bottom = length - bottom_margin;
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_left %d\n",*left);
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_right %d\n",*right);
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_top %d\n",*top);
- stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_bottom %d\n",*bottom);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_left %f\n",*left);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_right %f\n",*right);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_top %f\n",*top);
+ stp_dprintf(STP_DBG_CANON, v,"internal_imageable_area: page_bottom %f\n",*bottom);
}
static void
canon_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
internal_imageable_area(v, 1, 0, left, right, bottom, top);
}
static void
canon_maximum_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
internal_imageable_area(v, 1, 1, left, right, bottom, top);
}
static void
canon_limit(const stp_vars_t *v, /* I */
- int *width,
- int *height,
- int *min_width,
- int *min_height)
+ stp_dimension_t *width,
+ stp_dimension_t *height,
+ stp_dimension_t *min_width,
+ stp_dimension_t *min_height)
{
const canon_cap_t * caps=
canon_get_model_capabilities(v);
@@ -4409,7 +4409,7 @@ canon_init_setESC_P(const stp_vars_t *v, const canon_privdata_t *init)
{
unsigned char arg_ESCP_1, arg_ESCP_2, arg_ESCP_5, arg_ESCP_6, arg_ESCP_7, arg_ESCP_9;
- int width, length;
+ stp_dimension_t width, length;
/* const char *media_size = stp_get_string_parameter(v, "PageSize");
const stp_papersize_t *pt = NULL; */
const char* orientation_type = stp_get_string_parameter(v, "Orientation");
@@ -5697,7 +5697,10 @@ static void setup_page(stp_vars_t* v,canon_privdata_t* privdata){
const char *media_source = stp_get_string_parameter(v, "InputSlot");
const char *cd_type = stp_get_string_parameter(v, "PageSize");
int print_cd = (media_source && (!strcmp(media_source, "CD")));
- int page_left, page_top, page_right, page_bottom;
+ stp_dimension_t page_left,
+ page_top,
+ page_right,
+ page_bottom;
int hub_size = 0;
#if 0
@@ -5765,10 +5768,10 @@ static void setup_page(stp_vars_t* v,canon_privdata_t* privdata){
privdata->page_height = page_bottom - page_top; /* checked in Epson: matches */
}
- stp_dprintf(STP_DBG_CANON, v, "setup_page page_top = %i\n",page_top);
- stp_dprintf(STP_DBG_CANON, v, "setup_page page_bottom = %i\n",page_bottom);
- stp_dprintf(STP_DBG_CANON, v, "setup_page page_left = %i\n",page_left);
- stp_dprintf(STP_DBG_CANON, v, "setup_page page_right = %i\n",page_right);
+ stp_dprintf(STP_DBG_CANON, v, "setup_page page_top = %f\n",page_top);
+ stp_dprintf(STP_DBG_CANON, v, "setup_page page_bottom = %f\n",page_bottom);
+ stp_dprintf(STP_DBG_CANON, v, "setup_page page_left = %f\n",page_left);
+ stp_dprintf(STP_DBG_CANON, v, "setup_page page_right = %f\n",page_right);
stp_dprintf(STP_DBG_CANON, v, "setup_page top = %i\n",privdata->top);
stp_dprintf(STP_DBG_CANON, v, "setup_page left = %i\n",privdata->left);
stp_dprintf(STP_DBG_CANON, v, "setup_page out_height = %i\n",privdata->out_height);
diff --git a/src/main/print-dpl.c b/src/main/print-dpl.c
index 23f825b..e8f27e8 100644
--- a/src/main/print-dpl.c
+++ b/src/main/print-dpl.c
@@ -645,7 +645,7 @@ dpl_get_model_capabilities (int model) /* I: Model */
*/
static void
-dpl_describe_resolution (const stp_vars_t * v, int *x, int *y)
+dpl_describe_resolution (const stp_vars_t * v, stp_resolution_t *x, stp_resolution_t *y)
{
int i;
const char *resolution = stp_get_string_parameter (v, "Resolution");
@@ -675,7 +675,8 @@ dpl_describe_resolution (const stp_vars_t * v, int *x, int *y)
int
dpl_get_multiplier (const stp_vars_t * v)
{
- int x, y, multiplier;
+ stp_resolution_t x, y;
+ int multiplier;
int i;
int max_dpi;
int model = stp_get_model_id (v);
@@ -935,12 +936,12 @@ dpl_parameters (const stp_vars_t * v, const char *name,
*/
static void
internal_imageable_area (const stp_vars_t * v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
- int width, height; /* Size of page */
+ stp_dimension_t width, height; /* Size of page */
stp_default_media_size (v, &width, &height);
@@ -952,17 +953,17 @@ internal_imageable_area (const stp_vars_t * v, /* I */
static void
dpl_imageable_area (const stp_vars_t * v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
internal_imageable_area (v, left, right, bottom, top);
}
static void
dpl_limit (const stp_vars_t * v, /* I */
- int *width, int *height, int *min_width, int *min_height)
+ stp_dimension_t *width, stp_dimension_t *height, stp_dimension_t *min_width, stp_dimension_t *min_height)
{
const dpl_cap_t *caps = dpl_get_model_capabilities (stp_get_model_id (v));
*width = caps->custom_max_width;
@@ -985,11 +986,11 @@ pcx_header (stp_vars_t * v, stp_image_t * image)
unsigned short top; /* y = 0 is at bottom */
unsigned short bytes;
short xdpi;
- int i_xdpi;
- int *xdpi_p = (&i_xdpi);
+ stp_resolution_t r_xdpi;
+ stp_resolution_t *xdpi_p = (&r_xdpi);
short ydpi;
- int i_ydpi;
- int *ydpi_p = (&i_ydpi);
+ stp_resolution_t r_ydpi;
+ stp_resolution_t *ydpi_p = (&r_ydpi);
int n;
const short zero = 0;
@@ -1001,8 +1002,8 @@ pcx_header (stp_vars_t * v, stp_image_t * image)
/* Get resolutions */
dpl_describe_resolution (v, xdpi_p, ydpi_p);
- xdpi = (short) i_xdpi;
- ydpi = (short) i_ydpi;
+ xdpi = (short) r_xdpi;
+ ydpi = (short) r_ydpi;
bytes = (xdpi * 4 + 7 ) / 8; /* must be an even number */
if (bytes != (bytes & 0xfffe))
@@ -1085,7 +1086,7 @@ dpl_do_print (stp_vars_t * v, stp_image_t * image)
double v_offset = get_double_param (v, "VertOffset");
double present = get_double_param (v, "Present");
int y; /* Looping vars */
- int xdpi, ydpi; /* Resolution */
+ stp_resolution_t xdpi, ydpi; /* Resolution */
int multiplier;
unsigned char *black; /* Black bitmap data */
unsigned zero_mask;
@@ -1119,7 +1120,7 @@ dpl_do_print (stp_vars_t * v, stp_image_t * image)
dpl_describe_resolution (v, &xdpi, &ydpi);
- stp_deprintf (STP_DBG_DPL, "dpl: resolution=%dx%d\n", xdpi, ydpi);
+ stp_deprintf (STP_DBG_DPL, "dpl: resolution=%dx%d\n", (int) xdpi, (int) ydpi);
if (xdpi <= 0 || ydpi <= 0)
{
stp_eprintf (v, "No resolution found; cannot print.\n");
@@ -1221,7 +1222,7 @@ dpl_do_print (stp_vars_t * v, stp_image_t * image)
if (image_height / ydpi > 4)
{
stp_zprintf (v, "\002M%04i\r",
- 300 * image_height / ydpi + (3 * privdata.v_offset));
+ 300 * image_height / ((int) ydpi) + (3 * privdata.v_offset));
}
else
{
@@ -1229,7 +1230,7 @@ dpl_do_print (stp_vars_t * v, stp_image_t * image)
}
/* set Label Width */
stp_zprintf (v, "\002KcLW%04i\r",
- 100 * image_width / xdpi + privdata.h_offset);
+ 100 * image_width / ((int) xdpi) + privdata.h_offset);
if (0 != privdata.label_separator)
{
if (1 == privdata.label_separator)
@@ -1243,7 +1244,7 @@ dpl_do_print (stp_vars_t * v, stp_image_t * image)
else
{
stp_zprintf (v, "\002c%04i\r", 100 * /* Continuous mode */
- image_height / ydpi + privdata.v_offset);
+ image_height / ((int) ydpi) + privdata.v_offset);
}
}
if (privdata.darkness > -1)
@@ -1364,7 +1365,7 @@ dpl_pcx (stp_vars_t * v, /* I - Print file or command */
int count = 0;
int in = 0;
int out = 0;
- int xdpi, ydpi;
+ stp_resolution_t xdpi, ydpi;
int model = stp_get_model_id (v);
const dpl_cap_t *caps = dpl_get_model_capabilities (model);
int i;
diff --git a/src/main/print-escp2-data.c b/src/main/print-escp2-data.c
index 259204a..870ec40 100644
--- a/src/main/print-escp2-data.c
+++ b/src/main/print-escp2-data.c
@@ -212,7 +212,7 @@ load_model_from_file(const stp_vars_t *v, stp_mxml_node_t *xmod, int model)
while (child && i < 4)
{
if (child->type == STP_MXML_TEXT)
- data[i++] = stp_xmlstrtoul(child->value.text.string);
+ data[i++] = stp_xmlstrtodim(child->value.text.string);
child = child->next;
}
if (dtype && !strcmp(dtype, "duplex"))
@@ -299,36 +299,36 @@ load_model_from_file(const stp_vars_t *v, stp_mxml_node_t *xmod, int model)
p->bidirectional_upper_limit = stp_xmlstrtoul(val);
else if (!strcmp(name, "minimumMediaSize"))
{
- p->min_paper_width = stp_xmlstrtoul(child->value.text.string);
+ p->min_paper_width = stp_xmlstrtodim(child->value.text.string);
child = child->next;
- p->min_paper_height = stp_xmlstrtoul(child->value.text.string);
+ p->min_paper_height = stp_xmlstrtodim(child->value.text.string);
}
else if (!strcmp(name, "maximumMediaSize"))
{
- p->max_paper_width = stp_xmlstrtoul(child->value.text.string);
+ p->max_paper_width = stp_xmlstrtodim(child->value.text.string);
child = child->next;
- p->max_paper_height = stp_xmlstrtoul(child->value.text.string);
+ p->max_paper_height = stp_xmlstrtodim(child->value.text.string);
}
else if (!strcmp(name, "maximumImageableArea"))
{
- p->max_imageable_width = stp_xmlstrtoul(child->value.text.string);
+ p->max_imageable_width = stp_xmlstrtodim(child->value.text.string);
child = child->next;
- p->max_imageable_height = stp_xmlstrtoul(child->value.text.string);
+ p->max_imageable_height = stp_xmlstrtodim(child->value.text.string);
}
else if (!strcmp(name, "CDOffset"))
{
- p->cd_x_offset = stp_xmlstrtoul(child->value.text.string);
+ p->cd_x_offset = stp_xmlstrtodim(child->value.text.string);
child = child->next;
- p->cd_y_offset = stp_xmlstrtoul(child->value.text.string);
+ p->cd_y_offset = stp_xmlstrtodim(child->value.text.string);
}
else if (!strcmp(name, "CDMediaSize"))
{
- p->cd_page_width = stp_xmlstrtoul(child->value.text.string);
+ p->cd_page_width = stp_xmlstrtodim(child->value.text.string);
child = child->next;
- p->cd_page_height = stp_xmlstrtoul(child->value.text.string);
+ p->cd_page_height = stp_xmlstrtodim(child->value.text.string);
}
else if (!strcmp(name, "extraBottom"))
- p->paper_extra_bottom = stp_xmlstrtoul(val);
+ p->paper_extra_bottom = stp_xmlstrtodim(val);
else if (!strcmp(name, "AlignmentChoices"))
{
p->alignment_passes =
diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c
index d666d1c..f4e90f1 100644
--- a/src/main/print-escp2.c
+++ b/src/main/print-escp2.c
@@ -117,6 +117,14 @@ static const double ink_darknesses[] =
STP_PARAMETER_LEVEL_INTERNAL, 0, 1, STP_CHANNEL_NONE, 1, 0 \
}
+#define PARAMETER_DIMENSION(s) \
+{ \
+ "escp2_" #s, "escp2_" #s, \
+ "Color=Yes,Category=Advanced Printer Functionality", NULL, \
+ STP_PARAMETER_TYPE_DIMENSION, STP_PARAMETER_CLASS_FEATURE, \
+ STP_PARAMETER_LEVEL_INTERNAL, 0, 1, STP_CHANNEL_NONE, 1, 0 \
+}
+
#define PARAMETER_INT_RO(s) \
{ \
"escp2_" #s, "escp2_" #s, \
@@ -415,12 +423,12 @@ static const stp_parameter_t the_parameters[] =
PARAMETER_INT(black_nozzle_separation),
PARAMETER_INT(fast_nozzle_separation),
PARAMETER_INT(separation_rows),
- PARAMETER_INT(max_paper_width),
- PARAMETER_INT(max_paper_height),
- PARAMETER_INT(min_paper_width),
- PARAMETER_INT(min_paper_height),
- PARAMETER_INT(max_imageable_width),
- PARAMETER_INT(max_imageable_height),
+ PARAMETER_DIMENSION(max_paper_width),
+ PARAMETER_DIMENSION(max_paper_height),
+ PARAMETER_DIMENSION(min_paper_width),
+ PARAMETER_DIMENSION(min_paper_height),
+ PARAMETER_DIMENSION(max_imageable_width),
+ PARAMETER_DIMENSION(max_imageable_height),
PARAMETER_INT(extra_feed),
PARAMETER_INT(pseudo_separation_rows),
PARAMETER_INT(base_separation),
@@ -435,10 +443,10 @@ static const stp_parameter_t the_parameters[] =
PARAMETER_INT(base_horizontal_position_alignment),
PARAMETER_INT(bidirectional_upper_limit),
PARAMETER_INT(physical_channels),
- PARAMETER_INT(left_margin),
- PARAMETER_INT(right_margin),
- PARAMETER_INT(top_margin),
- PARAMETER_INT(bottom_margin),
+ PARAMETER_DIMENSION(left_margin),
+ PARAMETER_DIMENSION(right_margin),
+ PARAMETER_DIMENSION(top_margin),
+ PARAMETER_DIMENSION(bottom_margin),
PARAMETER_INT(ink_type),
PARAMETER_INT(bits),
PARAMETER_INT(base_res),
@@ -446,10 +454,10 @@ static const stp_parameter_t the_parameters[] =
PARAMETER_INT_RO(alignment_choices),
PARAMETER_INT_RO(alternate_alignment_passes),
PARAMETER_INT_RO(alternate_alignment_choices),
- PARAMETER_INT(cd_x_offset),
- PARAMETER_INT(cd_y_offset),
- PARAMETER_INT(cd_page_width),
- PARAMETER_INT(cd_page_height),
+ PARAMETER_DIMENSION(cd_page_width),
+ PARAMETER_DIMENSION(cd_page_height),
+ PARAMETER_DIMENSION(cd_x_offset),
+ PARAMETER_DIMENSION(cd_y_offset),
PARAMETER_INT(paper_extra_bottom),
PARAMETER_RAW(preinit_sequence),
PARAMETER_RAW(preinit_remote_sequence),
@@ -1040,6 +1048,19 @@ escp2_##f(const stp_vars_t *v) \
} \
}
+#define DEF_DIMENSION_ACCESSOR(f) \
+static stp_dimension_t \
+escp2_##f(const stp_vars_t *v) \
+{ \
+ if (stp_check_dimension_parameter(v, "escp2_" #f, STP_PARAMETER_ACTIVE)) \
+ return stp_get_dimension_parameter(v, "escp2_" #f); \
+ else \
+ { \
+ stpi_escp2_printer_t *printdef = stp_escp2_get_printer(v); \
+ return (stp_dimension_t) printdef->f; \
+ } \
+}
+
#define DEF_RAW_ACCESSOR(f, t) \
static t \
escp2_##f(const stp_vars_t *v) \
@@ -1053,12 +1074,12 @@ escp2_##f(const stp_vars_t *v) \
} \
}
-#define DEF_ROLL_ACCESSOR(f, t) \
-static t \
+#define DEF_ROLL_ACCESSOR(f) \
+static stp_dimension_t \
escp2_##f(const stp_vars_t *v, int rollfeed) \
{ \
- if (stp_check_int_parameter(v, "escp2_" #f, STP_PARAMETER_ACTIVE)) \
- return stp_get_int_parameter(v, "escp2_" #f); \
+ if (stp_check_dimension_parameter(v, "escp2_" #f, STP_PARAMETER_ACTIVE)) \
+ return stp_get_dimension_parameter(v, "escp2_" #f); \
else \
{ \
stpi_escp2_printer_t *printdef = stp_escp2_get_printer(v); \
@@ -1117,22 +1138,22 @@ DEF_SIMPLE_ACCESSOR(alignment_choices, int)
DEF_SIMPLE_ACCESSOR(alternate_alignment_passes, int)
DEF_SIMPLE_ACCESSOR(alternate_alignment_choices, int)
-DEF_SIMPLE_ACCESSOR(max_paper_width, unsigned)
-DEF_SIMPLE_ACCESSOR(max_paper_height, unsigned)
-DEF_SIMPLE_ACCESSOR(min_paper_width, unsigned)
-DEF_SIMPLE_ACCESSOR(min_paper_height, unsigned)
-DEF_SIMPLE_ACCESSOR(max_imageable_width, unsigned)
-DEF_SIMPLE_ACCESSOR(max_imageable_height, unsigned)
-DEF_SIMPLE_ACCESSOR(cd_page_width, int)
-DEF_SIMPLE_ACCESSOR(cd_page_height, int)
+DEF_DIMENSION_ACCESSOR(max_paper_width)
+DEF_DIMENSION_ACCESSOR(max_paper_height)
+DEF_DIMENSION_ACCESSOR(min_paper_width)
+DEF_DIMENSION_ACCESSOR(min_paper_height)
+DEF_DIMENSION_ACCESSOR(max_imageable_width)
+DEF_DIMENSION_ACCESSOR(max_imageable_height)
+DEF_DIMENSION_ACCESSOR(cd_page_width)
+DEF_DIMENSION_ACCESSOR(cd_page_height)
-DEF_SIMPLE_ACCESSOR(cd_x_offset, int)
-DEF_SIMPLE_ACCESSOR(cd_y_offset, int)
+DEF_DIMENSION_ACCESSOR(cd_x_offset)
+DEF_DIMENSION_ACCESSOR(cd_y_offset)
-DEF_ROLL_ACCESSOR(left_margin, unsigned)
-DEF_ROLL_ACCESSOR(right_margin, unsigned)
-DEF_ROLL_ACCESSOR(top_margin, unsigned)
-DEF_ROLL_ACCESSOR(bottom_margin, unsigned)
+DEF_ROLL_ACCESSOR(left_margin)
+DEF_ROLL_ACCESSOR(right_margin)
+DEF_ROLL_ACCESSOR(top_margin)
+DEF_ROLL_ACCESSOR(bottom_margin)
DEF_RAW_ACCESSOR(preinit_sequence, const stp_raw_t *)
DEF_RAW_ACCESSOR(preinit_remote_sequence, const stp_raw_t *)
@@ -1140,6 +1161,14 @@ DEF_RAW_ACCESSOR(postinit_remote_sequence, const stp_raw_t *)
DEF_RAW_ACCESSOR(vertical_borderless_sequence, const stp_raw_t *)
+/* froundto( 500.5 points, 180 dpi, 72 points/inch) */
+static double
+froundto(double value, double numerator, double denominator)
+{
+ double multiplier = (double) ((int) ((numerator + (denominator / 2)) / denominator));
+ return ((double) ((int) ((value * multiplier) + .5))) / multiplier;
+}
+
static const resolution_list_t *
escp2_reslist(const stp_vars_t *v)
{
@@ -1619,8 +1648,8 @@ get_printer_resolution_bounds(const stp_vars_t *v,
static int
verify_papersize(const stp_vars_t *v, const stp_papersize_t *pt)
{
- unsigned int height_limit, width_limit;
- unsigned int min_height_limit, min_width_limit;
+ stp_dimension_t height_limit, width_limit;
+ stp_dimension_t min_height_limit, min_width_limit;
unsigned int envelope_landscape =
stp_escp2_has_cap(v, MODEL_ENVELOPE_LANDSCAPE, MODEL_ENVELOPE_LANDSCAPE_YES);
width_limit = escp2_max_paper_width(v);
@@ -2845,7 +2874,7 @@ stp_escp2_find_resolution(const stp_vars_t *v)
}
static inline int
-imax(int a, int b)
+smax(stp_dimension_t a, stp_dimension_t b)
{
if (a > b)
return a;
@@ -2855,8 +2884,8 @@ imax(int a, int b)
static void
escp2_media_size(const stp_vars_t *v, /* I */
- int *width, /* O - Width in points */
- int *height) /* O - Height in points */
+ stp_dimension_t *width, /* O - Width in points */
+ stp_dimension_t *height) /* O - Height in points */
{
if (stp_get_page_width(v) > 0 && stp_get_page_height(v) > 0)
{
@@ -2921,17 +2950,18 @@ escp2_media_size(const stp_vars_t *v, /* I */
static void
internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
int use_maximum_area,
- int *left, int *right, int *bottom, int *top)
+ stp_dimension_t *left, stp_dimension_t *right,
+ stp_dimension_t *bottom, stp_dimension_t *top)
{
- int width, height; /* Size of page */
+ stp_dimension_t width, height; /* Size of page */
int rollfeed = 0; /* Roll feed selected */
int cd = 0; /* CD selected */
const char *media_size = stp_get_string_parameter(v, "PageSize");
const char *duplex = stp_get_string_parameter(v, "Duplex");
- int left_margin = 0;
- int right_margin = 0;
- int bottom_margin = 0;
- int top_margin = 0;
+ stp_dimension_t left_margin = 0;
+ stp_dimension_t right_margin = 0;
+ stp_dimension_t bottom_margin = 0;
+ stp_dimension_t top_margin = 0;
const stp_papersize_t *pt = NULL;
const input_slot_t *input_slot = NULL;
@@ -2973,10 +3003,10 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
top_margin = pt->top;
}
- left_margin = imax(left_margin, escp2_left_margin(v, rollfeed));
- right_margin = imax(right_margin, escp2_right_margin(v, rollfeed));
- bottom_margin = imax(bottom_margin, escp2_bottom_margin(v, rollfeed));
- top_margin = imax(top_margin, escp2_top_margin(v, rollfeed));
+ left_margin = smax(left_margin, escp2_left_margin(v, rollfeed));
+ right_margin = smax(right_margin, escp2_right_margin(v, rollfeed));
+ bottom_margin = smax(bottom_margin, escp2_bottom_margin(v, rollfeed));
+ top_margin = smax(top_margin, escp2_top_margin(v, rollfeed));
}
if (supports_borderless(v) &&
(use_maximum_area ||
@@ -2989,11 +3019,11 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
{
if (use_paper_margins)
{
- unsigned width_limit = escp2_max_paper_width(v);
- int offset = escp2_zero_margin_offset(v);
- int margin = escp2_micro_left_margin(v);
- int sep = escp2_base_separation(v);
- int delta = -((offset - margin) * 72 / sep);
+ stp_dimension_t width_limit = escp2_max_paper_width(v);
+ stp_dimension_t offset = escp2_zero_margin_offset(v);
+ stp_dimension_t margin = escp2_micro_left_margin(v);
+ stp_dimension_t sep = escp2_base_separation(v);
+ stp_dimension_t delta = -((offset - margin) * 72.0 / sep);
left_margin = delta; /* Allow some overlap if paper isn't */
right_margin = delta; /* positioned correctly */
if (width - right_margin - 3 > width_limit)
@@ -3021,10 +3051,10 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
}
if (!use_maximum_area && duplex && strcmp(duplex, "None") != 0)
{
- left_margin = imax(left_margin, escp2_duplex_left_margin(v));
- right_margin = imax(right_margin, escp2_duplex_right_margin(v));
- bottom_margin = imax(bottom_margin, escp2_duplex_bottom_margin(v));
- top_margin = imax(top_margin, escp2_duplex_top_margin(v));
+ left_margin = smax(left_margin, escp2_duplex_left_margin(v));
+ right_margin = smax(right_margin, escp2_duplex_right_margin(v));
+ bottom_margin = smax(bottom_margin, escp2_duplex_bottom_margin(v));
+ top_margin = smax(top_margin, escp2_duplex_top_margin(v));
}
if (width > escp2_max_imageable_width(v))
@@ -3043,28 +3073,28 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins,
static void
escp2_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
internal_imageable_area(v, 1, 0, left, right, bottom, top);
}
static void
escp2_maximum_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
internal_imageable_area(v, 1, 1, left, right, bottom, top);
}
static void
escp2_limit(const stp_vars_t *v, /* I */
- int *width, int *height,
- int *min_width, int *min_height)
+ stp_dimension_t *width, stp_dimension_t *height,
+ stp_dimension_t *min_width, stp_dimension_t *min_height)
{
*width = escp2_max_paper_width(v);
*height = escp2_max_paper_height(v);
@@ -3073,7 +3103,7 @@ escp2_limit(const stp_vars_t *v, /* I */
}
static void
-escp2_describe_resolution(const stp_vars_t *v, int *x, int *y)
+escp2_describe_resolution(const stp_vars_t *v, stp_resolution_t *x, stp_resolution_t *y)
{
const res_t *res = stp_escp2_find_resolution(v);
if (res && verify_resolution(v, res))
@@ -4052,9 +4082,9 @@ setup_page(stp_vars_t *v)
{
escp2_privdata_t *pd = get_privdata(v);
const input_slot_t *input_slot = stp_escp2_get_input_slot(v);
- int extra_left = 0;
- int extra_top = 0;
- int hub_size = 0;
+ stp_dimension_t extra_left = 0;
+ stp_dimension_t extra_top = 0;
+ stp_dimension_t hub_size = 0;
int min_horizontal_alignment = escp2_min_horizontal_position_alignment(v);
int base_horizontal_alignment =
pd->res->hres / escp2_base_horizontal_position_alignment(v);
@@ -4064,7 +4094,8 @@ setup_page(stp_vars_t *v)
const char *cd_type = stp_get_string_parameter(v, "PageSize");
if (cd_type && (strcmp(cd_type, "CDCustom") == 0 ))
{
- int outer_diameter = stp_get_dimension_parameter(v, "CDOuterDiameter");
+ stp_dimension_t outer_diameter =
+ stp_get_dimension_parameter(v, "CDOuterDiameter");
stp_set_page_width(v, outer_diameter);
stp_set_page_height(v, outer_diameter);
stp_set_width(v, outer_diameter);
@@ -4074,11 +4105,11 @@ setup_page(stp_vars_t *v)
else
{
const char *inner_radius_name = stp_get_string_parameter(v, "CDInnerRadius");
- hub_size = 43 * 10 * 72 / 254; /* 43 mm standard CD hub */
+ hub_size = 43.0 * 10.0 * 72.0 / 254.0; /* 43 mm standard CD hub */
if (inner_radius_name && strcmp(inner_radius_name, "Small") == 0)
- hub_size = 16 * 10 * 72 / 254; /* 15 mm prints to the hole - play it
- safe and print 16 mm */
+ hub_size = 16.0 * 10.0 * 72.0 / 254.0; /* 15 mm prints to the hole -
+ play safe and print 16 mm */
}
escp2_media_size(v, &(pd->page_true_width), &(pd->page_true_height));
@@ -4134,11 +4165,16 @@ setup_page(stp_vars_t *v)
internal_imageable_area(v, 0, 0, &pd->page_left, &pd->page_right,
&pd->page_bottom, &pd->page_top);
+ stp_set_left(v, froundto(stp_get_left(v), pd->res->hres, 72));
+ stp_set_width(v, froundto(stp_get_width(v), pd->res->hres, 72));
+ stp_set_top(v, froundto(stp_get_top(v), pd->res->hres, 72));
+ stp_set_height(v, froundto(stp_get_height(v), pd->res->hres, 72));
+
if (input_slot && input_slot->is_cd && escp2_cd_x_offset(v) > 0)
{
- int left_center = escp2_cd_x_offset(v) +
+ stp_dimension_t left_center = escp2_cd_x_offset(v) +
stp_get_dimension_parameter(v, "CDXAdjustment");
- int top_center = escp2_cd_y_offset(v) +
+ stp_dimension_t top_center = escp2_cd_y_offset(v) +
stp_get_dimension_parameter(v, "CDYAdjustment");
pd->page_true_height = pd->page_bottom - pd->page_top;
pd->page_true_width = pd->page_right - pd->page_left;
@@ -4150,13 +4186,13 @@ setup_page(stp_vars_t *v)
pd->page_bottom -= pd->page_top;
pd->page_top = 0;
pd->page_left = 0;
- extra_top = top_center - (pd->page_bottom / 2);
- extra_left = left_center - (pd->page_right / 2);
- pd->cd_inner_radius = hub_size * pd->micro_units / 72 / 2;
- pd->cd_outer_radius = pd->page_right * pd->micro_units / 72 / 2;
+ extra_top = top_center - (pd->page_bottom / 2.0);
+ extra_left = left_center - (pd->page_right / 2.0);
+ pd->cd_inner_radius = hub_size * pd->micro_units / 72.0 / 2.0;
+ pd->cd_outer_radius = pd->page_right * pd->micro_units / 72.0 / 2.0;
pd->cd_x_offset =
- ((pd->page_right / 2) - stp_get_left(v)) * pd->micro_units / 72;
- pd->cd_y_offset = stp_get_top(v) * pd->res->printed_vres / 72;
+ ((pd->page_right / 2.0) - stp_get_left(v)) * pd->micro_units / 72.0;
+ pd->cd_y_offset = stp_get_top(v) * pd->res->printed_vres / 72.0;
if (escp2_cd_page_height(v))
{
pd->page_right = escp2_cd_page_width(v);
@@ -4279,15 +4315,15 @@ escp2_print_data(stp_vars_t *v, stp_image_t *image)
int errlast = -1;
int errline = 0;
int y;
- double outer_r_sq = 0;
- double inner_r_sq = 0;
+ stp_dimension_t outer_r_sq = 0;
+ stp_dimension_t inner_r_sq = 0;
int x_center = pd->cd_x_offset * pd->res->printed_hres / pd->micro_units;
unsigned char *cd_mask = NULL;
if (pd->cd_outer_radius > 0)
{
cd_mask = stp_malloc(1 + (pd->image_printed_width + 7) / 8);
- outer_r_sq = (double) pd->cd_outer_radius * (double) pd->cd_outer_radius;
- inner_r_sq = (double) pd->cd_inner_radius * (double) pd->cd_inner_radius;
+ outer_r_sq = pd->cd_outer_radius * pd->cd_outer_radius;
+ inner_r_sq = pd->cd_inner_radius * pd->cd_inner_radius;
}
for (y = 0; y < pd->image_printed_height; y ++)
@@ -4305,7 +4341,7 @@ escp2_print_data(stp_vars_t *v, stp_image_t *image)
if (cd_mask)
{
- int y_distance_from_center =
+ stp_dimension_t y_distance_from_center =
pd->cd_outer_radius -
((y + pd->cd_y_offset) * pd->micro_units / pd->res->printed_vres);
if (y_distance_from_center < 0)
@@ -4313,15 +4349,14 @@ escp2_print_data(stp_vars_t *v, stp_image_t *image)
memset(cd_mask, 0, (pd->image_printed_width + 7) / 8);
if (y_distance_from_center < pd->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;
+ stp_dimension_t y_sq = y_distance_from_center * y_distance_from_center;
+ stp_dimension_t x_where = sqrt(outer_r_sq - y_sq);
int scaled_x_where = x_where * pd->res->printed_hres / pd->micro_units;
set_mask(cd_mask, x_center, scaled_x_where,
pd->image_printed_width, 1, 0);
if (y_distance_from_center < pd->cd_inner_radius)
{
- x_where = sqrt(inner_r_sq - y_sq) + .5;
+ x_where = sqrt(inner_r_sq - y_sq);
scaled_x_where = x_where * pd->res->printed_hres / pd->micro_units;
set_mask(cd_mask, x_center, scaled_x_where,
pd->image_printed_width, 1, 1);
diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h
index 600083a..3f4bfa9 100644
--- a/src/main/print-escp2.h
+++ b/src/main/print-escp2.h
@@ -378,48 +378,48 @@ typedef struct escp2_printer
/* in auto mode */
/*****************************************************************************/
/* Paper size limits */
- int max_paper_width; /* Maximum paper width, in points */
- int max_paper_height; /* Maximum paper height, in points */
- int min_paper_width; /* Maximum paper width, in points */
- int min_paper_height; /* Maximum paper height, in points */
- int max_imageable_width; /* Maximum imageable area, in points */
- int max_imageable_height; /* Maximum imageable area, in points */
+ stp_dimension_t max_paper_width; /* Maximum paper width, in points */
+ stp_dimension_t max_paper_height; /* Maximum paper height, in points */
+ stp_dimension_t min_paper_width; /* Maximum paper width, in points */
+ stp_dimension_t min_paper_height; /* Maximum paper height, in points */
+ stp_dimension_t max_imageable_width; /* Maximum imageable area, in points */
+ stp_dimension_t max_imageable_height; /* Maximum imageable area, in points */
/*****************************************************************************/
/* Borders */
/* SHEET FED: */
/* Softweave: */
- short left_margin; /* Left margin, points */
- short right_margin; /* Right margin, points */
- short top_margin; /* Absolute top margin, points */
- short bottom_margin; /* Absolute bottom margin, points */
+ stp_dimension_t left_margin; /* Left margin, points */
+ stp_dimension_t right_margin; /* Right margin, points */
+ stp_dimension_t top_margin; /* Absolute top margin, points */
+ stp_dimension_t bottom_margin; /* Absolute bottom margin, points */
/* Printer weave: */
- short m_left_margin; /* Left margin, points */
- short m_right_margin; /* Right margin, points */
- short m_top_margin; /* Absolute top margin, points */
- short m_bottom_margin; /* Absolute bottom margin, points */
+ stp_dimension_t m_left_margin; /* Left margin, points */
+ stp_dimension_t m_right_margin; /* Right margin, points */
+ stp_dimension_t m_top_margin; /* Absolute top margin, points */
+ stp_dimension_t m_bottom_margin; /* Absolute bottom margin, points */
/* ROLL FEED: */
/* Softweave: */
- short roll_left_margin; /* Left margin, points */
- short roll_right_margin; /* Right margin, points */
- short roll_top_margin; /* Absolute top margin, points */
- short roll_bottom_margin; /* Absolute bottom margin, points */
+ stp_dimension_t roll_left_margin; /* Left margin, points */
+ stp_dimension_t roll_right_margin; /* Right margin, points */
+ stp_dimension_t roll_top_margin; /* Absolute top margin, points */
+ stp_dimension_t roll_bottom_margin; /* Absolute bottom margin, points */
/* Printer weave: */
- short m_roll_left_margin; /* Left margin, points */
- short m_roll_right_margin; /* Right margin, points */
- short m_roll_top_margin; /* Absolute top margin, points */
- short m_roll_bottom_margin; /* Absolute bottom margin, points */
+ stp_dimension_t m_roll_left_margin; /* Left margin, points */
+ stp_dimension_t m_roll_right_margin; /* Right margin, points */
+ stp_dimension_t m_roll_top_margin; /* Absolute top margin, points */
+ stp_dimension_t m_roll_bottom_margin; /* Absolute bottom margin, points */
/* Duplex margin limit (SHRT_MIN = no limit): */
- short duplex_left_margin; /* Left margin, points */
- short duplex_right_margin; /* Right margin, points */
- short duplex_top_margin; /* Absolute top margin, points */
- short duplex_bottom_margin; /* Absolute bottom margin, points */
+ stp_dimension_t duplex_left_margin; /* Left margin, points */
+ stp_dimension_t duplex_right_margin; /* Right margin, points */
+ stp_dimension_t duplex_top_margin; /* Absolute top margin, points */
+ stp_dimension_t duplex_bottom_margin; /* Absolute bottom margin, points */
/* Print directly to CD */
- short cd_x_offset; /* Center of CD (horizontal offset) */
- short cd_y_offset; /* Center of CD (vertical offset) */
- short cd_page_width; /* Width of "page" when printing to CD */
- short cd_page_height; /* Height of "page" when printing to CD */
+ stp_dimension_t cd_x_offset; /* Center of CD (horizontal offset) */
+ stp_dimension_t cd_y_offset; /* Center of CD (vertical offset) */
+ stp_dimension_t cd_page_width; /* Width of "page" when printing to CD */
+ stp_dimension_t cd_page_height; /* Height of "page" when printing to CD */
/* Extra height for form factor command */
- short paper_extra_bottom; /* Extra space on the bottom of the page */
+ stp_dimension_t paper_extra_bottom; /* Extra space on the bottom of the page */
/*****************************************************************************/
/* Parameters for escputil */
short alignment_passes;
@@ -565,26 +565,26 @@ typedef struct
int extra_vertical_passes; /* Quality enhancement */
/* page parameters */ /* Indexed from top left */
- int page_left; /* Left edge of page (points) */
- int page_right; /* Right edge of page (points) */
- int page_top; /* Top edge of page (points) */
- int page_bottom; /* Bottom edge of page (points) */
- int page_width; /* Page width (points) */
- int page_height; /* Page height (points) */
- int page_true_height; /* Physical page height (points) */
- int page_true_width; /* Physical page height (points) */
- int cd_x_offset; /* CD X offset (micro units) */
- int cd_y_offset; /* CD Y offset (micro units) */
- int cd_outer_radius; /* CD radius (micro units) */
- int cd_inner_radius; /* CD radius (micro units) */
+ stp_dimension_t page_left; /* Left edge of page (points) */
+ stp_dimension_t page_right; /* Right edge of page (points) */
+ stp_dimension_t page_top; /* Top edge of page (points) */
+ stp_dimension_t page_bottom; /* Bottom edge of page (points) */
+ stp_dimension_t page_width; /* Page width (points) */
+ stp_dimension_t page_height; /* Page height (points) */
+ stp_dimension_t page_true_height; /* Physical page height (points) */
+ stp_dimension_t page_true_width; /* Physical page height (points) */
+ stp_dimension_t cd_x_offset; /* CD X offset (micro units) */
+ stp_dimension_t cd_y_offset; /* CD Y offset (micro units) */
+ stp_dimension_t cd_outer_radius; /* CD radius (micro units) */
+ stp_dimension_t cd_inner_radius; /* CD radius (micro units) */
int page_extra_height; /* Extra height for set_form_factor (rows) */
int paper_extra_bottom; /* Extra bottom for set_page_size (rows) */
/* Image parameters */ /* Indexed from top left */
- int image_height; /* Height of printed region (points) */
- int image_width; /* Width of printed region (points) */
- int image_top; /* First printed row (points) */
- int image_left; /* Left edge of image (points) */
+ stp_dimension_t image_height; /* Height of printed region (points) */
+ stp_dimension_t image_width; /* Width of printed region (points) */
+ stp_dimension_t image_top; /* First printed row (points) */
+ stp_dimension_t image_left; /* Left edge of image (points) */
int image_scaled_width; /* Width of physical printed region (dots) */
int image_printed_width; /* Width of printed region (dots) */
int image_scaled_height; /* Height of physical printed region (dots) */
diff --git a/src/main/print-lexmark.c b/src/main/print-lexmark.c
index 9c7bf97..6c9df76 100644
--- a/src/main/print-lexmark.c
+++ b/src/main/print-lexmark.c
@@ -1094,7 +1094,8 @@ lexmark_sat_adjustment(const lexmark_cap_t * caps, const stp_vars_t *v)
static void
-lexmark_describe_resolution(const stp_vars_t *v, int *x, int *y)
+lexmark_describe_resolution(const stp_vars_t *v,
+ stp_resolution_t *x, stp_resolution_t *y)
{
const char *resolution = stp_get_string_parameter(v, "Resolution");
const lexmark_res_t *res =
@@ -1307,16 +1308,16 @@ lexmark_parameters(const stp_vars_t *v, const char *name,
static void
internal_imageable_area(const stp_vars_t *v, /* I */
int use_paper_margins,
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
- int width, length; /* Size of page */
- int left_margin = 0;
- int right_margin = 0;
- int bottom_margin = 0;
- int top_margin = 0;
+ stp_dimension_t width, length; /* Size of page */
+ stp_dimension_t left_margin = 0;
+ stp_dimension_t right_margin = 0;
+ stp_dimension_t bottom_margin = 0;
+ stp_dimension_t top_margin = 0;
const char *media_size = stp_get_string_parameter(v, "PageSize");
const stp_papersize_t *pt = NULL;
const lexmark_cap_t *caps =
@@ -1347,20 +1348,20 @@ internal_imageable_area(const stp_vars_t *v, /* I */
static void
lexmark_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
internal_imageable_area(v, 1, left, right, bottom, top);
}
static void
lexmark_limit(const stp_vars_t *v, /* I */
- int *width,
- int *height,
- int *min_width,
- int *min_height)
+ stp_dimension_t *width,
+ stp_dimension_t *height,
+ stp_dimension_t *min_width,
+ stp_dimension_t *min_height)
{
const lexmark_cap_t * caps= lexmark_get_model_capabilities(stp_get_model_id(v));
*width = caps->max_paper_width;
@@ -1597,15 +1598,16 @@ lexmark_do_print(stp_vars_t *v, stp_image_t *image)
{
int status = 1;
int y; /* Looping vars */
- int xdpi, ydpi; /* Resolution */
- int n; /* Output number */
- int page_width, /* Width of page */
+ stp_resolution_t xdpi, ydpi; /* Resolution */
+ stp_dimension_t page_width, /* Width of page */
page_height, /* Length of page */
page_left,
page_top,
page_right,
page_bottom,
- page_true_height, /* True length of page */
+ page_true_width, /* True length of page */
+ page_true_height; /* True length of page */
+ int
out_width, /* Width of image on page in pixels */
out_height, /* Length of image on page */
length, /* Length of raster data in bytes*/
@@ -1652,8 +1654,8 @@ lexmark_do_print(stp_vars_t *v, stp_image_t *image)
const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
int printing_color = 0;
const char *ink_type = stp_get_string_parameter(v, "InkType");
- int top = stp_get_top(v);
- int left = stp_get_left(v);
+ stp_dimension_t top = stp_get_top(v);
+ stp_dimension_t left = stp_get_left(v);
const lexmark_cap_t * caps= lexmark_get_model_capabilities(model);
const lexmark_res_t *res_para_ptr =
@@ -1712,7 +1714,7 @@ lexmark_do_print(stp_vars_t *v, stp_image_t *image)
*/
stp_describe_resolution(v, &xdpi, &ydpi);
- stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: resolution=%dx%d\n",xdpi,ydpi);
+ stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: resolution=%dx%d\n",(int)xdpi,(int)ydpi);
switch (res_para_ptr->resid) {
case DPI300:
@@ -1750,8 +1752,8 @@ densityDivisor /= 1.2;
nozzle_separation = ydpi / physical_ydpi;
horizontal_passes = xdpi / physical_xdpi;
- stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: horizontal_passes %i, xdpi %i, physical_xdpi %i\n",
- horizontal_passes, xdpi, physical_xdpi);
+ stp_dprintf(STP_DBG_LEXMARK, v, "lexmark: horizontal_passes %i, xdpi %d, physical_xdpi %i\n",
+ horizontal_passes, (int)xdpi, physical_xdpi);
@@ -1776,11 +1778,11 @@ densityDivisor /= 1.2;
page_width = page_right - page_left;
page_height = page_bottom - page_top;
- stp_dprintf(STP_DBG_LEXMARK, v, "page_right %d, page_left %d, page_top %d, page_bottom %d, left %d, top %d\n",page_right, page_left, page_top, page_bottom,left, top);
+ stp_dprintf(STP_DBG_LEXMARK, v, "page_right %f, page_left %f, page_top %f, page_bottom %f, left %f, top %f\n",page_right, page_left, page_top, page_bottom,left, top);
image_height = stp_image_height(image);
- stp_default_media_size(v, &n, &page_true_height);
+ stp_default_media_size(v, &page_true_width, &page_true_height);
lxm3200_linetoeject = (page_true_height * 1200) / 72;
@@ -1798,11 +1800,11 @@ densityDivisor /= 1.2;
out_height = ydpi * out_height / 72;
- stp_dprintf(STP_DBG_LEXMARK, v, "border: left %d, x_raster_res %d, offset_left %d\n", left, caps->x_raster_res, caps->offset_left_border);
+ stp_dprintf(STP_DBG_LEXMARK, v, "border: left %f, x_raster_res %d, offset_left %d\n", left, caps->x_raster_res, caps->offset_left_border);
left = ((caps->x_raster_res * left) / 72) + caps->offset_left_border;
- stp_dprintf(STP_DBG_LEXMARK, v, "border: left %d\n", left);
+ stp_dprintf(STP_DBG_LEXMARK, v, "border: left %f\n", left);
diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c
index acfc1d1..26ce9c8 100644
--- a/src/main/print-olympus.c
+++ b/src/main/print-olympus.c
@@ -73,9 +73,9 @@
#ifndef MAX
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif /* !MAX */
-#define PX(pt,dpi) ((pt) * (dpi) / 72)
-#define PT(px,dpi) ((px) * 72 / (dpi))
-#define PT1(px,dpi) (((px) * 72 / (dpi))+1)
+#define PX(pt,dpi) (int)(((stp_dimension_t)(pt) * (stp_resolution_t)(dpi) / (stp_resolution_t)72) + 0.5f)
+#define PT(px,dpi) ((stp_resolution_t)(px) * (stp_resolution_t)72 / (stp_dimension_t)(dpi))
+#define PT1 PT
#define LIST(list_t, list_name, items_t, items_name) \
static const list_t list_name = \
{ \
@@ -110,8 +110,8 @@ typedef struct {
typedef struct {
const char* name;
- int w_dpi;
- int h_dpi;
+ stp_resolution_t w_dpi;
+ stp_resolution_t h_dpi;
} dyesub_resolution_t;
typedef struct {
@@ -122,12 +122,12 @@ typedef struct {
typedef struct {
const char* name;
const char* text;
- int width_pt;
- int height_pt;
- int border_pt_left;
- int border_pt_right;
- int border_pt_top;
- int border_pt_bottom;
+ stp_dimension_t width_pt;
+ stp_dimension_t height_pt;
+ stp_dimension_t border_pt_left;
+ stp_dimension_t border_pt_right;
+ stp_dimension_t border_pt_top;
+ stp_dimension_t border_pt_bottom;
int print_mode;
} dyesub_pagesize_t;
@@ -237,8 +237,8 @@ typedef struct
/* Private data for dyesub driver as a whole */
typedef struct
{
- int w_dpi, h_dpi;
- int w_size, h_size;
+ stp_resolution_t w_dpi, h_dpi;
+ stp_dimension_t w_size, h_size;
char plane;
int block_min_w, block_min_h;
int block_max_w, block_max_h;
@@ -5127,6 +5127,11 @@ static const dyesub_printsize_t fuji_ask300_printsize[] =
LIST(dyesub_printsize_list_t, fuji_ask300_printsize_list, dyesub_printsize_t, fuji_ask300_printsize);
+static void fuji_ask300_printer_init(stp_vars_t *v)
+{
+ mitsu_cpd70k60_printer_init(v, 0x80);
+}
+
/* Shinko CHC-S9045 (experimental) */
static const dyesub_pagesize_t shinko_chcs9045_page[] =
{
@@ -7708,12 +7713,12 @@ static const dyesub_cap_t dyesub_model_capabilities[] =
SHRT_MAX,
#ifdef MITSU70X_8BPP
DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT | DYESUB_FEATURE_PLANE_LEFTTORIGHT,
- &mitsu_cpd70x_printer_init, NULL,
+ &fuji_ask300_printer_init, NULL,
#else
DYESUB_FEATURE_FULL_WIDTH | DYESUB_FEATURE_FULL_HEIGHT
| DYESUB_FEATURE_PLANE_INTERLACE | DYESUB_FEATURE_16BPP
| DYESUB_FEATURE_BIGENDIAN,
- &mitsu_cpd70x_printer_init, &mitsu_cpd70x_printer_end,
+ &fuji_ask300_printer_init, &mitsu_cpd70x_printer_end,
#endif
NULL, &mitsu_cpd70x_plane_end,
NULL, NULL, /* No block funcs */
@@ -8477,8 +8482,8 @@ dyesub_current_pagesize(const stp_vars_t *v)
static void
dyesub_media_size(const stp_vars_t *v,
- int *width,
- int *height)
+ stp_dimension_t *width,
+ stp_dimension_t *height)
{
const dyesub_pagesize_t *p = dyesub_current_pagesize(v);
stp_default_media_size(v, width, height);
@@ -8492,13 +8497,13 @@ dyesub_media_size(const stp_vars_t *v,
static void
dyesub_imageable_area_internal(const stp_vars_t *v,
int use_maximum_area,
- int *left,
- int *right,
- int *bottom,
- int *top,
+ stp_dimension_t *left,
+ stp_dimension_t *right,
+ stp_dimension_t *bottom,
+ stp_dimension_t *top,
int *print_mode)
{
- int width, height;
+ stp_dimension_t width, height;
const dyesub_pagesize_t *p = dyesub_current_pagesize(v);
const dyesub_cap_t *caps = dyesub_get_model_capabilities(
stp_get_model_id(v));
@@ -8529,10 +8534,10 @@ dyesub_imageable_area_internal(const stp_vars_t *v,
static void
dyesub_imageable_area(const stp_vars_t *v,
- int *left,
- int *right,
- int *bottom,
- int *top)
+ stp_dimension_t *left,
+ stp_dimension_t *right,
+ stp_dimension_t *bottom,
+ stp_dimension_t *top)
{
int not_used;
dyesub_imageable_area_internal(v, 0, left, right, bottom, top, &not_used);
@@ -8540,10 +8545,10 @@ dyesub_imageable_area(const stp_vars_t *v,
static void
dyesub_maximum_imageable_area(const stp_vars_t *v,
- int *left,
- int *right,
- int *bottom,
- int *top)
+ stp_dimension_t *left,
+ stp_dimension_t *right,
+ stp_dimension_t *bottom,
+ stp_dimension_t *top)
{
int not_used;
const int model = stp_get_model_id(v);
@@ -8562,8 +8567,8 @@ dyesub_maximum_imageable_area(const stp_vars_t *v,
static void
dyesub_limit(const stp_vars_t *v, /* I */
- int *width, int *height,
- int *min_width, int *min_height)
+ stp_dimension_t *width, stp_dimension_t *height,
+ stp_dimension_t *min_width, stp_dimension_t *min_height)
{
*width = SHRT_MAX;
*height = SHRT_MAX;
@@ -8572,7 +8577,8 @@ dyesub_limit(const stp_vars_t *v, /* I */
}
static void
-dyesub_describe_resolution(const stp_vars_t *v, int *x, int *y)
+dyesub_describe_resolution(const stp_vars_t *v,
+ stp_resolution_t *x, stp_resolution_t *y)
{
const char *resolution = stp_get_string_parameter(v, "Resolution");
const dyesub_cap_t *caps = dyesub_get_model_capabilities(
@@ -9001,22 +9007,23 @@ dyesub_do_print(stp_vars_t *v, stp_image_t *image)
const dyesub_cap_t *caps = dyesub_get_model_capabilities(model);
int max_print_px_width = 0;
int max_print_px_height = 0;
- int w_dpi, h_dpi; /* Resolution */
+ int w_dpi, h_dpi;
+ stp_resolution_t wr_dpi, hr_dpi; /* Resolution */
/* output in 1/72" */
- int out_pt_width = stp_get_width(v);
- int out_pt_height = stp_get_height(v);
- int out_pt_left = stp_get_left(v);
- int out_pt_top = stp_get_top(v);
+ stp_dimension_t out_pt_width = stp_get_width(v);
+ stp_dimension_t out_pt_height = stp_get_height(v);
+ stp_dimension_t out_pt_left = stp_get_left(v);
+ stp_dimension_t out_pt_top = stp_get_top(v);
/* page in 1/72" */
- int page_pt_width = stp_get_page_width(v);
- int page_pt_height = stp_get_page_height(v);
- int page_pt_left = 0;
- int page_pt_right = 0;
- int page_pt_top = 0;
- int page_pt_bottom = 0;
- int page_mode;
+ stp_dimension_t page_pt_width = stp_get_page_width(v);
+ stp_dimension_t page_pt_height = stp_get_page_height(v);
+ stp_dimension_t page_pt_left = 0;
+ stp_dimension_t page_pt_right = 0;
+ stp_dimension_t page_pt_top = 0;
+ stp_dimension_t page_pt_bottom = 0;
+ int page_mode;
int pl;
@@ -9042,7 +9049,9 @@ dyesub_do_print(stp_vars_t *v, stp_image_t *image)
pv.imgw_px = stp_image_width(image);
pv.imgh_px = stp_image_height(image);
- stp_describe_resolution(v, &w_dpi, &h_dpi);
+ stp_describe_resolution(v, &wr_dpi, &hr_dpi);
+ w_dpi = (int) wr_dpi;
+ h_dpi = (int) hr_dpi;
dyesub_printsize(v, &max_print_px_width, &max_print_px_height);
/* Duplex processing -- Rotate even pages for DuplexNoTumble */
@@ -9102,14 +9111,14 @@ dyesub_do_print(stp_vars_t *v, stp_image_t *image)
dyesub_swap_ints(&w_dpi, &h_dpi);
stp_deprintf(STP_DBG_DYESUB,
- "paper (pt) %d x %d\n"
+ "paper (pt) %f x %f\n"
"image (px) %d x %d\n"
- "image (pt) %d x %d\n"
- "* out (pt) %d x %d\n"
+ "image (pt) %f x %f\n"
+ "* out (pt) %f x %f\n"
"* out (px) %d x %d\n"
- "* left x top (pt) %d x %d\n"
+ "* left x top (pt) %f x %f\n"
"* left x top (px) %d x %d\n"
- "border (pt) (%d - %d) = %d x (%d - %d) = %d\n"
+ "border (pt) (%f - %f) = %f x (%f - %f) = %f\n"
"printable pixels (px) %d x %d\n"
"res (dpi) %d x %d\n",
page_pt_width, page_pt_height,
diff --git a/src/main/print-papers.c b/src/main/print-papers.c
index 7ce254d..b5fb1e7 100644
--- a/src/main/print-papers.c
+++ b/src/main/print-papers.c
@@ -160,15 +160,15 @@ stp_get_papersize_by_index(int idx)
}
static int
-paper_size_mismatch(int l, int w, const stp_papersize_t *val)
+paper_size_mismatch(stp_dimension_t l, stp_dimension_t w, const stp_papersize_t *val)
{
- int hdiff = abs(l - (int) val->height);
- int vdiff = abs(w - (int) val->width);
+ stp_dimension_t hdiff = abs(l - (stp_dimension_t) val->height);
+ stp_dimension_t vdiff = abs(w - (stp_dimension_t) val->width);
return hdiff > vdiff ? hdiff : vdiff;
}
const stp_papersize_t *
-stp_get_papersize_by_size(int l, int w)
+stp_get_papersize_by_size(stp_dimension_t l, stp_dimension_t w)
{
int score = INT_MAX;
const stp_papersize_t *ref = NULL;
@@ -201,7 +201,7 @@ stp_get_papersize_by_size(int l, int w)
}
const stp_papersize_t *
-stp_get_papersize_by_size_exact(int l, int w)
+stp_get_papersize_by_size_exact(stp_dimension_t l, stp_dimension_t w)
{
const stp_papersize_t *ref = NULL;
const stp_papersize_t *val = NULL;
@@ -225,8 +225,8 @@ stp_get_papersize_by_size_exact(int l, int w)
void
stp_default_media_size(const stp_vars_t *v, /* I */
- int *width, /* O - Width in points */
- int *height) /* O - Height in points */
+ stp_dimension_t *width, /* O - Width in points */
+ stp_dimension_t *height) /* O - Height in points */
{
if (stp_get_page_width(v) > 0 && stp_get_page_height(v) > 0)
{
@@ -326,7 +326,7 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
stmp = stp_mxmlElementGetAttr(prop, "value");
if (stmp)
{
- outpaper->width = stp_xmlstrtoul(stmp);
+ outpaper->width = stp_xmlstrtodim(stmp);
width = 1;
}
}
@@ -335,29 +335,29 @@ stp_xml_process_paper(stp_mxml_node_t *paper) /* The paper node */
stmp = stp_mxmlElementGetAttr(prop, "value");
if (stmp)
{
- outpaper->height = stp_xmlstrtoul(stmp);
+ outpaper->height = stp_xmlstrtodim(stmp);
height = 1;
}
}
if (!strcmp(prop_name, "left"))
{
stmp = stp_mxmlElementGetAttr(prop, "value");
- outpaper->left = stp_xmlstrtoul(stmp);
+ outpaper->left = stp_xmlstrtodim(stmp);
}
if (!strcmp(prop_name, "right"))
{
stmp = stp_mxmlElementGetAttr(prop, "value");
- outpaper->right = stp_xmlstrtoul(stmp);
+ outpaper->right = stp_xmlstrtodim(stmp);
}
if (!strcmp(prop_name, "bottom"))
{
stmp = stp_mxmlElementGetAttr(prop, "value");
- outpaper->bottom = stp_xmlstrtoul(stmp);
+ outpaper->bottom = stp_xmlstrtodim(stmp);
}
if (!strcmp(prop_name, "top"))
{
stmp = stp_mxmlElementGetAttr(prop, "value");
- outpaper->top = stp_xmlstrtoul(stmp);
+ outpaper->top = stp_xmlstrtodim(stmp);
}
if (!strcmp(prop_name, "unit"))
{
diff --git a/src/main/print-pcl.c b/src/main/print-pcl.c
index 5ef206e..8752e58 100644
--- a/src/main/print-pcl.c
+++ b/src/main/print-pcl.c
@@ -1727,7 +1727,7 @@ pcl_get_model_capabilities(int model) /* I: Model */
*/
static void
-pcl_describe_resolution(const stp_vars_t *v, int *x, int *y)
+pcl_describe_resolution(const stp_vars_t *v, stp_resolution_t *x, stp_resolution_t *y)
{
int i;
int model = stp_get_model_id(v);
@@ -1757,8 +1757,8 @@ pcl_describe_resolution(const stp_vars_t *v, int *x, int *y)
if ((caps->resolutions & pcl_qualities[i].pcl_code) &&
!strcmp(quality, pcl_qualities[i].pcl_name))
{
- *x = pcl_qualities[i].p0;
- *y = pcl_qualities[i].p1;
+ *x = (stp_dimension_t) pcl_qualities[i].p0;
+ *y = (stp_dimension_t) pcl_qualities[i].p1;
return;
}
}
@@ -2272,20 +2272,20 @@ pcl_parameters(const stp_vars_t *v, const char *name,
static void
internal_imageable_area(const stp_vars_t *v, /* I */
int use_paper_margins,
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
- int width, height; /* Size of page */
+ stp_dimension_t width, height; /* Size of page */
const pcl_cap_t *caps; /* Printer caps */
int pcl_media_size; /* Converted media size */
const char *media_size = stp_get_string_parameter(v, "PageSize");
const stp_papersize_t *pp = NULL;
- int left_margin = 0;
- int right_margin = 0;
- int bottom_margin = 0;
- int top_margin = 0;
+ stp_dimension_t left_margin = 0;
+ stp_dimension_t right_margin = 0;
+ stp_dimension_t bottom_margin = 0;
+ stp_dimension_t top_margin = 0;
caps = pcl_get_model_capabilities(stp_get_model_id(v));
@@ -2339,20 +2339,20 @@ internal_imageable_area(const stp_vars_t *v, /* I */
static void
pcl_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
internal_imageable_area(v, 1, left, right, bottom, top);
}
static void
pcl_limit(const stp_vars_t *v, /* I */
- int *width,
- int *height,
- int *min_width,
- int *min_height)
+ stp_dimension_t *width,
+ stp_dimension_t *height,
+ stp_dimension_t *min_width,
+ stp_dimension_t *min_height)
{
const pcl_cap_t *caps= pcl_get_model_capabilities(stp_get_model_id(v));
*width = caps->custom_max_width;
@@ -2368,7 +2368,7 @@ pcl_describe_output(const stp_vars_t *v)
int model = stp_get_model_id(v);
const pcl_cap_t *caps = pcl_get_model_capabilities(model);
const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
- int xdpi, ydpi;
+ stp_resolution_t xdpi, ydpi;
pcl_describe_resolution(v, &xdpi, &ydpi);
if (!print_mode || strcmp(print_mode, "Color") == 0)
@@ -2531,21 +2531,21 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
double v_offset = get_double_param(v, "VertOffset");
int page_number = stp_get_int_parameter(v, "PageNumber");
int printing_color = 0;
- int top = stp_get_top(v);
- int left = stp_get_left(v);
+ int top = (int) stp_get_top(v) + .5;
+ int left = (int) stp_get_left(v) + .5;
int y; /* Looping vars */
- int xdpi, ydpi; /* Resolution */
+ stp_resolution_t xdpi, ydpi; /* Resolution */
unsigned char *black, /* Black bitmap data */
*cyan, /* Cyan bitmap data */
*magenta, /* Magenta bitmap data */
*yellow, /* Yellow bitmap data */
*lcyan, /* Light Cyan bitmap data */
*lmagenta; /* Light Magenta bitmap data */
- int page_left,
- page_top,
- page_right,
- page_bottom,
- out_width, /* Width of image on page */
+ stp_dimension_t page_left,
+ page_top,
+ page_right,
+ page_bottom;
+ int out_width, /* Width of image on page */
out_height, /* Height of image on page */
errdiv, /* Error dividend */
errmod, /* Error modulus */
@@ -2589,7 +2589,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
pcl_describe_resolution(v, &xdpi, &ydpi);
- stp_deprintf(STP_DBG_PCL,"pcl: resolution=%dx%d\n",xdpi,ydpi);
+ stp_deprintf(STP_DBG_PCL,"pcl: resolution=%dx%d\n",(int)xdpi,(int)ydpi);
if (xdpi <= 0 || ydpi <= 0)
{
stp_eprintf(v, "No resolution found; cannot print.\n");
@@ -2633,8 +2633,8 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
* Compute the output size...
*/
- out_width = stp_get_width(v);
- out_height = stp_get_height(v);
+ out_width = (int) stp_get_width(v) + .5;
+ out_height = (int) stp_get_height(v) + .5;
internal_imageable_area(v, 0, &page_left, &page_right,
&page_bottom, &page_top);
@@ -2770,7 +2770,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
"@PJL SET PAPERLENGTH=%d\n"
"@PJL SET VERTICALOFFSET=%d\n"
"@PJL SET HORIZONTALOFFSET=%d\n"
- "@PJL ENTER LANGUAGE=PCL\n", xdpi, out_width*10,
+ "@PJL ENTER LANGUAGE=PCL\n", (int) xdpi, out_width*10,
out_height*10, privdata.v_offset, privdata.h_offset);
if ( privdata.label_separator != 0) {
@@ -2800,7 +2800,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
stp_zprintf(v, "\033&l%dA", pcl_media_size); /* Set media size we calculated above */
}
- stp_zprintf(v, "\033&l%dP", stp_get_page_height(v) / 12);
+ stp_zprintf(v, "\033&l%dP", ((int) stp_get_page_height(v)) / 12);
/* Length of "forms" in "lines" */
stp_puts("\033&l0L", v); /* Turn off perforation skip */
if (! label) {
@@ -2978,7 +2978,7 @@ pcl_do_print(stp_vars_t *v, stp_image_t *image)
}
else
{
- stp_zprintf(v, "\033*t%dR", xdpi); /* Simple resolution */
+ stp_zprintf(v, "\033*t%dR", (int) xdpi); /* Simple resolution */
if (printing_color)
{
if ((caps->color_type & PCL_COLOR_CMY) == PCL_COLOR_CMY)
diff --git a/src/main/print-ps.c b/src/main/print-ps.c
index 557f3a8..5a8ab9c 100644
--- a/src/main/print-ps.c
+++ b/src/main/print-ps.c
@@ -137,9 +137,9 @@ ps_option_to_param(stp_parameter_t *param, stp_mxml_node_t *option)
break;
case STP_PARAMETER_TYPE_DIMENSION:
param->deflt.dimension = atoi(default_value);
- param->bounds.dimension.upper = (int) upper_bound;
- param->bounds.dimension.lower = (int) lower_bound;
- stp_deprintf(STP_DBG_PS, " %d %d %d\n",
+ param->bounds.dimension.upper = (stp_dimension_t) upper_bound;
+ param->bounds.dimension.lower = (stp_dimension_t) lower_bound;
+ stp_deprintf(STP_DBG_PS, " %f %f %f\n",
param->deflt.dimension, param->bounds.dimension.upper,
param->bounds.dimension.lower);
break;
@@ -436,8 +436,8 @@ ps_parameters(const stp_vars_t *v, const char *name,
static void
ps_media_size_internal(const stp_vars_t *v, /* I */
- int *width, /* O - Width in points */
- int *height) /* O - Height in points */
+ stp_dimension_t *width, /* O - Width in points */
+ stp_dimension_t *height) /* O - Height in points */
{
const char *pagesize = stp_get_string_parameter(v, "PageSize");
int status = check_ppd_file(v);
@@ -466,12 +466,12 @@ ps_media_size_internal(const stp_vars_t *v, /* I */
}
}
- stp_dprintf(STP_DBG_PS, v, "dimensions %d %d\n", *width, *height);
+ stp_dprintf(STP_DBG_PS, v, "dimensions %f %f\n", *width, *height);
return;
}
static void
-ps_media_size(const stp_vars_t *v, int *width, int *height)
+ps_media_size(const stp_vars_t *v, stp_dimension_t *width, stp_dimension_t *height)
{
#ifdef HAVE_LOCALE_H
char *locale = stp_strdup(setlocale(LC_ALL, NULL));
@@ -491,12 +491,12 @@ ps_media_size(const stp_vars_t *v, int *width, int *height)
static void
ps_imageable_area_internal(const stp_vars_t *v, /* I */
int use_max_area, /* I - Use maximum area */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
- int width, height;
+ stp_dimension_t width, height;
const char *pagesize = stp_get_string_parameter(v, "PageSize");
if (!pagesize)
pagesize = "";
@@ -517,13 +517,13 @@ ps_imageable_area_internal(const stp_vars_t *v, /* I */
double pright = atoi(stp_mxmlElementGetAttr(paper, "right"));
double ptop = atoi(stp_mxmlElementGetAttr(paper, "top"));
double pbottom = atoi(stp_mxmlElementGetAttr(paper, "bottom"));
- stp_dprintf(STP_DBG_PS, v, "size=l %f r %f b %f t %f h %d w %d\n",
+ stp_dprintf(STP_DBG_PS, v, "size=l %f r %f b %f t %f h %f w %f\n",
pleft, pright, pbottom, ptop, height, width);
- *left = (int) pleft;
- *right = (int) pright;
- *top = height - (int) ptop;
- *bottom = height - (int) pbottom;
- stp_dprintf(STP_DBG_PS, v, ">>>> l %d r %d b %d t %d h %d w %d\n",
+ *left = (stp_dimension_t) pleft;
+ *right = (stp_dimension_t) pright;
+ *top = height - (stp_dimension_t) ptop;
+ *bottom = height - (stp_dimension_t) pbottom;
+ stp_dprintf(STP_DBG_PS, v, ">>>> l %f r %f b %f t %f h %f w %f\n",
*left, *right, *bottom, *top, height, width);
}
}
@@ -540,7 +540,7 @@ ps_imageable_area_internal(const stp_vars_t *v, /* I */
*bottom = height;
}
- stp_dprintf(STP_DBG_PS, v, "pagesize %s max_area=%d l %d r %d b %d t %d h %d w %d\n",
+ stp_dprintf(STP_DBG_PS, v, "pagesize %s max_area=%d l %f r %f b %f t %f h %f w %f\n",
pagesize ? pagesize : "(null)",
use_max_area, *left, *right, *bottom, *top, width, height);
@@ -549,10 +549,10 @@ ps_imageable_area_internal(const stp_vars_t *v, /* I */
static void
ps_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
#ifdef HAVE_LOCALE_H
char *locale = stp_strdup(setlocale(LC_ALL, NULL));
@@ -567,10 +567,10 @@ ps_imageable_area(const stp_vars_t *v, /* I */
static void
ps_maximum_imageable_area(const stp_vars_t *v, /* I */
- int *left, /* O - Left position in points */
- int *right, /* O - Right position in points */
- int *bottom, /* O - Bottom position in points */
- int *top) /* O - Top position in points */
+ stp_dimension_t *left, /* O - Left position in points */
+ stp_dimension_t *right, /* O - Right position in points */
+ stp_dimension_t *bottom, /* O - Bottom position in points */
+ stp_dimension_t *top) /* O - Top position in points */
{
#ifdef HAVE_LOCALE_H
char *locale = stp_strdup(setlocale(LC_ALL, NULL));
@@ -585,13 +585,13 @@ ps_maximum_imageable_area(const stp_vars_t *v, /* I */
static void
ps_limit(const stp_vars_t *v, /* I */
- int *width,
- int *height,
- int *min_width,
- int *min_height)
+ stp_dimension_t *width,
+ stp_dimension_t *height,
+ stp_dimension_t *min_width,
+ stp_dimension_t *min_height)
{
- *width = INT_MAX;
- *height = INT_MAX;
+ *width = (stp_dimension_t) INT_MAX;
+ *height = (stp_dimension_t) INT_MAX;
*min_width = 1;
*min_height = 1;
}
@@ -600,18 +600,24 @@ ps_limit(const stp_vars_t *v, /* I */
* This is really bogus...
*/
static void
-ps_describe_resolution_internal(const stp_vars_t *v, int *x, int *y)
+ps_describe_resolution_internal(const stp_vars_t *v, stp_resolution_t *x, stp_resolution_t *y)
{
const char *resolution = stp_get_string_parameter(v, "Resolution");
*x = -1;
*y = -1;
if (resolution)
- sscanf(resolution, "%dx%d", x, y);
+ {
+ int tx = -1;
+ int ty = -1;
+ sscanf(resolution, "%dx%d", &tx, &ty);
+ *x = (stp_resolution_t) tx;
+ *y = (stp_resolution_t) ty;
+ }
return;
}
static void
-ps_describe_resolution(const stp_vars_t *v, int *x, int *y)
+ps_describe_resolution(const stp_vars_t *v, stp_resolution_t *x, stp_resolution_t *y)
{
#ifdef HAVE_LOCALE_H
char *locale = stp_strdup(setlocale(LC_ALL, NULL));
@@ -744,11 +750,11 @@ ps_external_options(const stp_vars_t *v)
if (stp_get_dimension_parameter(v, desc.name) !=
desc.deflt.dimension)
{
- stp_dprintf(STP_DBG_PS, v, "Adding dimension parameter %s (%s): %d %d\n",
+ stp_dprintf(STP_DBG_PS, v, "Adding dimension parameter %s (%s): %f %f\n",
desc.name, ppd_name ? ppd_name : "(null)",
stp_get_dimension_parameter(v, desc.name),
desc.deflt.dimension);
- stp_asprintf(&tmp, "%d",
+ stp_asprintf(&tmp, "%f",
stp_get_dimension_parameter(v, desc.name));
stp_string_list_add_string(answer,
ppd_name ? ppd_name : desc.name,
@@ -870,7 +876,7 @@ ps_print_device_settings(stp_vars_t *v)
if(stp_get_dimension_parameter(v,desc.name)!=desc.deflt.dimension)
{
stp_puts("[{\n", v);
- stp_zprintf(v, "%%%%IncludeFeature: *%s %d\n", desc.name,
+ stp_zprintf(v, "%%%%IncludeFeature: *%s %f\n", desc.name,
stp_get_dimension_parameter(v, desc.name));
stp_puts("} stopped cleartomark\n", v);
}
@@ -897,18 +903,18 @@ ps_print_internal(stp_vars_t *v, stp_image_t *image)
const char *print_mode = stp_get_string_parameter(v, "PrintingMode");
const char *input_image_type = stp_get_string_parameter(v, "InputImageType");
unsigned short *out = NULL;
- int top = stp_get_top(v);
- int left = stp_get_left(v);
+ stp_dimension_t top = stp_get_top(v);
+ stp_dimension_t left = stp_get_left(v);
int y; /* Looping vars */
- int page_left, /* Left margin of page */
+ stp_dimension_t page_left, /* Left margin of page */
page_right, /* Right margin of page */
page_top, /* Top of page */
page_bottom, /* Bottom of page */
page_width, /* Width of page */
page_height, /* Height of page */
- paper_width, /* Width of physical page */
- paper_height, /* Height of physical page */
- out_width, /* Width of image on page */
+ paper_width, /* Width of physical page */
+ paper_height; /* Height of physical page */
+ int out_width, /* Width of image on page */
out_height, /* Height of image on page */
out_channels, /* Output bytes per pixel */
out_ps_height, /* Output height (Level 2 output) */
@@ -955,13 +961,13 @@ ps_print_internal(stp_vars_t *v, stp_image_t *image)
stp_dprintf(STP_DBG_PS, v,
"out_width = %d, out_height = %d\n", out_width, out_height);
stp_dprintf(STP_DBG_PS, v,
- "page_left = %d, page_right = %d, page_bottom = %d, page_top = %d\n",
+ "page_left = %f, page_right = %f, page_bottom = %f, page_top = %f\n",
page_left, page_right, page_bottom, page_top);
- stp_dprintf(STP_DBG_PS, v, "left = %d, top = %d\n", left, top);
- stp_dprintf(STP_DBG_PS, v, "page_width = %d, page_height = %d\n",
+ stp_dprintf(STP_DBG_PS, v, "left = %f, top = %f\n", left, top);
+ stp_dprintf(STP_DBG_PS, v, "page_width = %f, page_height = %f\n",
page_width, page_height);
- stp_dprintf(STP_DBG_PS, v, "bounding box l %d b %d r %d t %d\n",
+ stp_dprintf(STP_DBG_PS, v, "bounding box l %f b %f r %f t %f\n",
page_left, paper_height - page_bottom,
page_right, paper_height - page_top);
@@ -973,7 +979,7 @@ ps_print_internal(stp_vars_t *v, stp_image_t *image)
stp_zprintf(v, "%%%%Creator: %s/Gutenprint\n", stp_image_get_appname(image));
#endif
stp_zprintf(v, "%%%%CreationDate: %s", ctime(&curtime));
- stp_zprintf(v, "%%%%BoundingBox: %d %d %d %d\n",
+ stp_zprintf(v, "%%%%BoundingBox: %f %f %f %f\n",
page_left, paper_height - page_bottom,
page_right, paper_height - page_top);
stp_puts("%%DocumentData: Clean7Bit\n", v);
@@ -991,7 +997,7 @@ ps_print_internal(stp_vars_t *v, stp_image_t *image)
stp_puts("%%Page: 1 1\n", v);
stp_puts("gsave\n", v);
- stp_zprintf(v, "%d %d translate\n", left, top);
+ stp_zprintf(v, "%f %f translate\n", left, top);
/* Force locale to "C", because decimal numbers in Postscript must
always be printed with a decimal point rather than the
diff --git a/src/main/print-raw.c b/src/main/print-raw.c
index 766aa9f..131d095 100644
--- a/src/main/print-raw.c
+++ b/src/main/print-raw.c
@@ -175,10 +175,10 @@ raw_parameters(const stp_vars_t *v, const char *name,
static void
raw_imageable_area(const stp_vars_t *v,
- int *left,
- int *right,
- int *bottom,
- int *top)
+ stp_dimension_t *left,
+ stp_dimension_t *right,
+ stp_dimension_t *bottom,
+ stp_dimension_t *top)
{
*left = 0;
*top = 0;
@@ -188,8 +188,8 @@ raw_imageable_area(const stp_vars_t *v,
static void
raw_limit(const stp_vars_t *v, /* I */
- int *width, int *height,
- int *min_width, int *min_height)
+ stp_dimension_t *width, stp_dimension_t *height,
+ stp_dimension_t *min_width, stp_dimension_t *min_height)
{
*width = 65535;
*height = 65535;
@@ -198,7 +198,8 @@ raw_limit(const stp_vars_t *v, /* I */
}
static void
-raw_describe_resolution(const stp_vars_t *v, int *x, int *y)
+raw_describe_resolution(const stp_vars_t *v,
+ stp_resolution_t *x, stp_resolution_t *y)
{
*x = 72;
*y = 72;
diff --git a/src/main/print-vars.c b/src/main/print-vars.c
index 515cb76..4526f71 100644
--- a/src/main/print-vars.c
+++ b/src/main/print-vars.c
@@ -48,6 +48,7 @@ typedef struct
int ival;
int bval;
double dval;
+ stp_dimension_t sval;
stp_curve_t *cval;
stp_array_t *aval;
stp_raw_t rval;
@@ -66,12 +67,12 @@ struct stp_vars /* Plug-in variables */
{
char *driver; /* Name of printer "driver" */
char *color_conversion; /* Color module in use */
- int left; /* Offset from left-upper corner, points */
- int top; /* ... */
- int width; /* Width of the image, points */
- int height; /* ... */
- int page_width; /* Width of page in points */
- int page_height; /* Height of page in points */
+ stp_dimension_t left; /* Offset from left-upper corner, points */
+ stp_dimension_t top; /* ... */
+ stp_dimension_t width; /* Width of the image, points */
+ stp_dimension_t height; /* ... */
+ stp_dimension_t page_width; /* Width of page in points */
+ stp_dimension_t page_height; /* Height of page in points */
stp_list_t *params[STP_PARAMETER_TYPE_INVALID];
stp_list_t *internal_data;
void (*outfunc)(void *data, const char *buffer, size_t bytes);
@@ -190,8 +191,10 @@ value_copy(const void *item)
case STP_PARAMETER_TYPE_RAW:
copy_to_raw(&(ret->value.rval), v->value.rval.data, v->value.rval.bytes);
break;
- case STP_PARAMETER_TYPE_INT:
case STP_PARAMETER_TYPE_DIMENSION:
+ ret->value.sval = v->value.sval;
+ break;
+ case STP_PARAMETER_TYPE_INT:
case STP_PARAMETER_TYPE_BOOLEAN:
ret->value.ival = v->value.ival;
break;
@@ -411,12 +414,12 @@ pre##_get_##s(const stp_vars_t *v) \
DEF_STRING_FUNCS(driver, stp)
DEF_STRING_FUNCS(color_conversion, stp)
-DEF_FUNCS(left, int, stp)
-DEF_FUNCS(top, int, stp)
-DEF_FUNCS(width, int, stp)
-DEF_FUNCS(height, int, stp)
-DEF_FUNCS(page_width, int, stp)
-DEF_FUNCS(page_height, int, stp)
+DEF_FUNCS(left, stp_dimension_t, stp)
+DEF_FUNCS(top, stp_dimension_t, stp)
+DEF_FUNCS(width, stp_dimension_t, stp)
+DEF_FUNCS(height, stp_dimension_t, stp)
+DEF_FUNCS(page_width, stp_dimension_t, stp)
+DEF_FUNCS(page_height, stp_dimension_t, stp)
DEF_FUNCS(outdata, void *, stp)
DEF_FUNCS(errdata, void *, stp)
DEF_FUNCS(outfunc, stp_outfunc_t, stp)
@@ -1012,13 +1015,13 @@ stp_get_boolean_parameter(const stp_vars_t *v, const char *parameter)
}
void
-stp_set_dimension_parameter(stp_vars_t *v, const char *parameter, int ival)
+stp_set_dimension_parameter(stp_vars_t *v, const char *parameter, stp_dimension_t sval)
{
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_deprintf(STP_DBG_VARS, "stp_set_dimension_parameter(0x%p, %s, %d)\n",
- (const void *) v, parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_dimension_parameter(0x%p, %s, %f)\n",
+ (const void *) v, parameter, sval);
if (item)
{
val = (value_t *) stp_list_item_get_data(item);
@@ -1033,18 +1036,19 @@ stp_set_dimension_parameter(stp_vars_t *v, const char *parameter, int ival)
val->active = STP_PARAMETER_ACTIVE;
stp_list_item_create(list, NULL, val);
}
- val->value.ival = ival;
+ val->value.sval = sval;
stp_set_verified(v, 0);
}
void
-stp_set_default_dimension_parameter(stp_vars_t *v, const char *parameter, int ival)
+stp_set_default_dimension_parameter(stp_vars_t *v, const char *parameter,
+ stp_dimension_t sval)
{
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_deprintf(STP_DBG_VARS, "stp_set_default_dimension_parameter(0x%p, %s, %d)\n",
- (const void *) v, parameter, ival);
+ stp_deprintf(STP_DBG_VARS, "stp_set_default_dimension_parameter(0x%p, %s, %f)\n",
+ (const void *) v, parameter, sval);
if (!item)
{
val = stp_malloc(sizeof(value_t));
@@ -1052,7 +1056,7 @@ stp_set_default_dimension_parameter(stp_vars_t *v, const char *parameter, int iv
val->typ = STP_PARAMETER_TYPE_DIMENSION;
val->active = STP_PARAMETER_DEFAULTED;
stp_list_item_create(list, NULL, val);
- val->value.ival = ival;
+ val->value.sval = sval;
}
stp_set_verified(v, 0);
}
@@ -1069,7 +1073,7 @@ stp_clear_dimension_parameter(stp_vars_t *v, const char *parameter)
stp_set_verified(v, 0);
}
-int
+stp_dimension_t
stp_get_dimension_parameter(const stp_vars_t *v, const char *parameter)
{
const stp_list_t *list = v->params[STP_PARAMETER_TYPE_DIMENSION];
@@ -1077,7 +1081,7 @@ stp_get_dimension_parameter(const stp_vars_t *v, const char *parameter)
if (item)
{
const value_t *val = (const value_t *) stp_list_item_get_data(item);
- return val->value.ival;
+ return val->value.sval;
}
else
{
@@ -1085,7 +1089,7 @@ stp_get_dimension_parameter(const stp_vars_t *v, const char *parameter)
stp_describe_parameter(v, parameter, &desc);
if (desc.p_type == STP_PARAMETER_TYPE_DIMENSION)
{
- int intval = desc.deflt.integer;
+ stp_dimension_t intval = desc.deflt.dimension;
stp_parameter_description_destroy(&desc);
return intval;
}
@@ -1471,9 +1475,9 @@ stpi_vars_print_error(const stp_vars_t *v, const char *prefix)
};
stp_erprintf("%s: Gutenprint: === BEGIN GUTENPRINT SETTINGS ===\n", prefix);
stp_erprintf("%s: Gutenprint: Driver: %s\n", prefix, stp_get_driver(v));
- stp_erprintf("%s: Gutenprint: L: %d T: %d W: %d H: %d\n", prefix, stp_get_left(v),
+ stp_erprintf("%s: Gutenprint: L: %f T: %f W: %f H: %f\n", prefix, stp_get_left(v),
stp_get_top(v), stp_get_width(v), stp_get_height(v));
- stp_erprintf("%s: Gutenprint: Page: %dx%d\n", prefix, stp_get_page_width(v),
+ stp_erprintf("%s: Gutenprint: Page: %fx%f\n", prefix, stp_get_page_width(v),
stp_get_page_height(v));
stp_erprintf("%s: Gutenprint: Conversion: %s\n", prefix, stp_get_color_conversion(v));
for (i = 0; i < STP_PARAMETER_TYPE_INVALID; i++)
@@ -1513,8 +1517,12 @@ stpi_vars_print_error(const stp_vars_t *v, const char *prefix)
if (crep)
stp_free(crep);
break;
- case STP_PARAMETER_TYPE_INT:
case STP_PARAMETER_TYPE_DIMENSION:
+ stp_erprintf("%s: Gutenprint: (%s) (%i) (%s) [%f]\n", prefix,
+ val->name, val->active, data_types[val->typ],
+ val->value.sval);
+ break;
+ case STP_PARAMETER_TYPE_INT:
case STP_PARAMETER_TYPE_BOOLEAN:
stp_erprintf("%s: Gutenprint: (%s) (%i) (%s) [%d]\n", prefix,
val->name, val->active, data_types[val->typ],
@@ -1634,7 +1642,7 @@ debug_print_parameter_description(const stp_parameter_t *desc, const char *who,
break;
case STP_PARAMETER_TYPE_DIMENSION:
stp_deprintf(STP_DBG_VARS,
- " Dimension default: %d Bounds: %d %d\n",
+ " Dimension default: %f Bounds: %f %f\n",
desc->deflt.dimension,
desc->bounds.dimension.lower, desc->bounds.dimension.upper);
break;
@@ -2002,10 +2010,10 @@ fill_vars_from_xmltree(stp_mxml_node_t *prop, stp_mxml_node_t *root,
if (cnode->type == STP_MXML_TEXT)
{
stp_set_dimension_parameter
- (v, p_name, (int) stp_xmlstrtol(cnode->value.text.string));
+ (v, p_name, (int) stp_xmlstrtodim(cnode->value.text.string));
type = STP_PARAMETER_TYPE_DOUBLE;
if (stp_get_debug_level() & STP_DBG_XML)
- stp_deprintf(STP_DBG_XML, " Set dimension '%s' to '%s' (%d)\n",
+ stp_deprintf(STP_DBG_XML, " Set dimension '%s' to '%s' (%f)\n",
p_name, cnode->value.text.string,
stp_get_dimension_parameter(v, p_name));
}
@@ -2276,7 +2284,7 @@ stp_xmltree_create_from_vars(const stp_vars_t *v)
break;
case STP_PARAMETER_TYPE_DIMENSION:
stp_mxmlElementSetAttr(node, "type", "dimension");
- stp_mxmlNewInteger(node, stp_get_dimension_parameter(v, name));
+ stp_mxmlNewDimension(node, stp_get_dimension_parameter(v, name));
break;
default:
stp_mxmlElementSetAttr(node, "type", "INVALID!");
diff --git a/src/main/printers.c b/src/main/printers.c
index 9722bd4..d9fb458 100644
--- a/src/main/printers.c
+++ b/src/main/printers.c
@@ -452,7 +452,7 @@ stp_printer_get_defaults(const stp_printer_t *printer)
}
void
-stp_get_media_size(const stp_vars_t *v, int *width, int *height)
+stp_get_media_size(const stp_vars_t *v, stp_dimension_t *width, stp_dimension_t *height)
{
const stp_printfuncs_t *printfuncs =
stpi_get_printfuncs(stp_get_printer(v));
@@ -461,7 +461,8 @@ stp_get_media_size(const stp_vars_t *v, int *width, int *height)
void
stp_get_imageable_area(const stp_vars_t *v,
- int *left, int *right, int *bottom, int *top)
+ stp_dimension_t *left, stp_dimension_t *right,
+ stp_dimension_t *bottom, stp_dimension_t *top)
{
const stp_printfuncs_t *printfuncs =
stpi_get_printfuncs(stp_get_printer(v));
@@ -470,7 +471,8 @@ stp_get_imageable_area(const stp_vars_t *v,
void
stp_get_maximum_imageable_area(const stp_vars_t *v,
- int *left, int *right, int *bottom, int *top)
+ stp_dimension_t *left, stp_dimension_t *right,
+ stp_dimension_t *bottom, stp_dimension_t *top)
{
const stp_printfuncs_t *printfuncs =
stpi_get_printfuncs(stp_get_printer(v));
@@ -478,8 +480,9 @@ stp_get_maximum_imageable_area(const stp_vars_t *v,
}
void
-stp_get_size_limit(const stp_vars_t *v, int *max_width, int *max_height,
- int *min_width, int *min_height)
+stp_get_size_limit(const stp_vars_t *v,
+ stp_dimension_t *max_width, stp_dimension_t *max_height,
+ stp_dimension_t *min_width, stp_dimension_t *min_height)
{
const stp_printfuncs_t *printfuncs =
stpi_get_printfuncs(stp_get_printer(v));
@@ -487,7 +490,7 @@ stp_get_size_limit(const stp_vars_t *v, int *max_width, int *max_height,
}
void
-stp_describe_resolution(const stp_vars_t *v, int *x, int *y)
+stp_describe_resolution(const stp_vars_t *v, stp_resolution_t *x, stp_resolution_t *y)
{
const stp_printfuncs_t *printfuncs =
stpi_get_printfuncs(stp_get_printer(v));
@@ -660,18 +663,18 @@ verify_int_param(const stp_vars_t *v, const char *parameter,
static int
verify_dimension_param(const stp_vars_t *v, const char *parameter,
- stp_parameter_t *desc, int quiet)
+ stp_parameter_t *desc, int quiet)
{
stp_dprintf(STP_DBG_VARS, v, " Verifying dimension %s\n", parameter);
if (desc->is_mandatory ||
stp_check_dimension_parameter(v, parameter, STP_PARAMETER_ACTIVE))
{
- int checkval = stp_get_dimension_parameter(v, parameter);
+ stp_dimension_t checkval = stp_get_dimension_parameter(v, parameter);
if (checkval < desc->bounds.dimension.lower ||
checkval > desc->bounds.dimension.upper)
{
if (!quiet)
- stp_eprintf(v, _("%s must be between %d and %d (is %d)\n"),
+ stp_eprintf(v, _("%s must be between %f and %f (is %f)\n"),
parameter, desc->bounds.dimension.lower,
desc->bounds.dimension.upper, checkval);
stp_parameter_description_destroy(desc);
@@ -816,7 +819,7 @@ stp_verify_printer_params(stp_vars_t *v)
int nparams;
int i;
int answer = 1;
- int left, top, bottom, right;
+ stp_dimension_t left, top, bottom, right;
const char *pagesize = stp_get_string_parameter(v, "PageSize");
stp_dprintf(STP_DBG_VARS, v, "** Entering stp_verify_printer_params(0x%p)\n",
@@ -835,7 +838,7 @@ stp_verify_printer_params(stp_vars_t *v)
}
else
{
- int width, height, min_height, min_width;
+ stp_dimension_t width, height, min_height, min_width;
stp_get_size_limit(v, &width, &height, &min_width, &min_height);
if (stp_get_page_height(v) <= min_height ||
stp_get_page_height(v) > height ||
@@ -845,7 +848,7 @@ stp_verify_printer_params(stp_vars_t *v)
stp_eprintf(v, _("Page size is not valid\n"));
}
stp_dprintf(STP_DBG_PAPER, v,
- "page size max %d %d min %d %d actual %d %d\n",
+ "page size max %f %f min %f %f actual %f %f\n",
width, height, min_width, min_height,
stp_get_page_width(v), stp_get_page_height(v));
}
@@ -853,23 +856,23 @@ stp_verify_printer_params(stp_vars_t *v)
stp_get_imageable_area(v, &left, &right, &bottom, &top);
stp_dprintf(STP_DBG_PAPER, v,
- "page left %d top %d right %d bottom %d\n",
+ "page left %f top %f right %f bottom %f\n",
left, top, right, bottom);
stp_dprintf(STP_DBG_PAPER, v,
- "requested left %d top %d width %d height %d\n",
+ "requested left %f top %f width %f height %f\n",
stp_get_left(v), stp_get_top(v),
stp_get_width(v), stp_get_height(v));
if (stp_get_top(v) < top)
{
answer = 0;
- stp_eprintf(v, _("Top margin must not be less than %d\n"), top);
+ stp_eprintf(v, _("Top margin must not be less than %f\n"), top);
}
if (stp_get_left(v) < left)
{
answer = 0;
- stp_eprintf(v, _("Left margin must not be less than %d\n"), left);
+ stp_eprintf(v, _("Left margin must not be less than %f\n"), left);
}
if (stp_get_height(v) <= 0)
@@ -887,14 +890,14 @@ stp_verify_printer_params(stp_vars_t *v)
if (stp_get_left(v) + stp_get_width(v) > right)
{
answer = 0;
- stp_eprintf(v, _("Image is too wide for the page: left margin is %d, width %d, right edge is %d\n"),
+ stp_eprintf(v, _("Image is too wide for the page: left margin is %f, width %f, right edge is %f\n"),
stp_get_left(v), stp_get_width(v), right);
}
if (stp_get_top(v) + stp_get_height(v) > bottom)
{
answer = 0;
- stp_eprintf(v, _("Image is too long for the page: top margin is %d, height %d, bottom edge is %d\n"),
+ stp_eprintf(v, _("Image is too long for the page: top margin is %f, height %f, bottom edge is %f\n"),
stp_get_top(v), stp_get_height(v), bottom);
}
diff --git a/src/main/xml.c b/src/main/xml.c
index a630902..c4c92f4 100644
--- a/src/main/xml.c
+++ b/src/main/xml.c
@@ -336,6 +336,18 @@ stp_xmlstrtod(const char *textval)
}
/*
+ * Convert a text string into a dimension.
+ */
+stp_dimension_t
+stp_xmlstrtodim(const char *textval)
+{
+ double val; /* The value to return */
+ val = (stp_dimension_t) strtod(textval, (char **)NULL);
+
+ return val;
+}
+
+/*
* Convert an encoded text string into a raw.
*/
stp_raw_t *
diff --git a/src/testpattern/printer_options.c b/src/testpattern/printer_options.c
index 37ce076..44003a1 100644
--- a/src/testpattern/printer_options.c
+++ b/src/testpattern/printer_options.c
@@ -134,16 +134,16 @@ main(int argc, char **argv)
driver, desc.name, param->name, param->text);
if (strcmp(desc.name, "Resolution") == 0)
{
- int x, y;
+ stp_resolution_t x, y;
stp_set_string_parameter(pv, "Resolution",
param->name);
stp_describe_resolution(pv, &x, &y);
if (x > 0 && y > 0)
{
printf("$stpdata{'%s'}{'%s'}{'%s'} = '%d';\n",
- driver, "x_resolution", param->name, x);
+ driver, "x_resolution", param->name, (int) x);
printf("$stpdata{'%s'}{'%s'}{'%s'} = '%d';\n",
- driver, "y_resolution", param->name, y);
+ driver, "y_resolution", param->name, (int) y);
}
}
stp_clear_string_parameter(pv, "Resolution");
@@ -217,11 +217,11 @@ main(int argc, char **argv)
if (desc.bounds.dimension.lower <= desc.deflt.dimension &&
desc.bounds.dimension.upper >= desc.deflt.dimension)
{
- printf("$stp_dimension_values{'%s'}{'MINVAL'}{'%s'} = %d;\n",
+ printf("$stp_dimension_values{'%s'}{'MINVAL'}{'%s'} = %f;\n",
driver, desc.name, desc.bounds.dimension.lower);
- printf("$stp_dimension_values{'%s'}{'MAXVAL'}{'%s'} = %d;\n",
+ printf("$stp_dimension_values{'%s'}{'MAXVAL'}{'%s'} = %f;\n",
driver, desc.name, desc.bounds.dimension.upper);
- printf("$stp_dimension_values{'%s'}{'DEFVAL'}{'%s'} = %d;\n",
+ printf("$stp_dimension_values{'%s'}{'DEFVAL'}{'%s'} = %f;\n",
driver, desc.name, desc.deflt.dimension);
/* printf("$stp_dimension_values{'%s'}{'LONG_NAME'}{'%s'} = '%s';\n",
driver, desc.name, gettext(desc.text)); */
diff --git a/src/testpattern/run-testpattern-2.in b/src/testpattern/run-testpattern-2.in
index 45220b8..006da1c 100644
--- a/src/testpattern/run-testpattern-2.in
+++ b/src/testpattern/run-testpattern-2.in
@@ -45,6 +45,7 @@ my $include_pattern = '';
my $exclude_pattern = '';
my %exclude_list = ();
my @standard_options = ("InkType",
+ "Resolution",
"InkSet,RawChannels",
"DitherAlgorithm",
"Duplex",
@@ -103,6 +104,7 @@ my $list_options = 0;
my $verbose = 0;
my $use_unused_options = 0;
my $proc_count = 1;
+my $round = 0;
my @default_options = ();
my %base_settings = ("DitherAlgorithm" => "Fast");
@@ -151,6 +153,7 @@ GetOptions("C=s" => \$csum_type,
"v+" => \$valgrind,
"x=s" => \@exclude_list,
"y=s" => \@exclude_patterns,
+ "u" => \$round,
"t:i" => \$proc_count);
sub print_help_and_exit() {
@@ -200,7 +203,7 @@ Usage: run-testpattern-2 [opts] [model ...]
-vvv Show reachable data also
-vvvv Minimal checks only
- Test selection options:
+ Test selection/control options:
-d option=value Test this option with only the specified (default) value,
if available.
-G geometry Specify geometry (=(HxV)(+L+T), as fractions of page).
@@ -208,18 +211,21 @@ Usage: run-testpattern-2 [opts] [model ...]
option1,option2... tests all combinations of each
option. For floating point and integer options, a
selection of values is tested.
+ To remove an option from the list tested, specify
+ -o -option
Default:
$options
+ -o+ Any options specified with -o will be tested in addition
+ to those specified.
-p page count Specify number of pages to print per printer. Default $std_pages.
-P page count Specify number of pages to print per printer when testing
duplex mode. Default $duplex_pages.
- -r Do not test each resolution (test only the default).
-R Use the minimum resolution (rather than the default)
- to test other options.
- -RR Use only the minimum resolution, and do not test other
- resolutions.
+ to test other options. Equivalent to -dResolution=MIN.
-X Repeat specified cases listed on standard input.
-N Supply all requested options, even if unused.
+ -u Round all dimensions to the lower point (for
+ regression testing against Gutenprint 5.2).
Miscellaneous options:
-i Use the installed Gutenprint libraries rather than
@@ -242,9 +248,36 @@ if ($help) {
print_help_and_exit();
}
-my $pages = $std_pages;
+if ($use_min_res) {
+ $base_settings{"Resolution"} = "MIN";
+}
-if (! @special_options) {
+if (@special_options) {
+ my (%options);
+ my ($optseq) = 1;
+ if (scalar grep { /^\+$/ } @special_options) {
+ map { $options{$_} = $optseq++; } @standard_options;
+ }
+ if (scalar grep { /^\-$/ } @special_options) {
+ %options = ();
+ }
+ foreach my $opt (@special_options) {
+ next if $_ eq '+';
+ if ($opt =~ /^-/) {
+ $opt = substr($opt, 1);
+ delete $options{$opt};
+ } else {
+ if ($opt =~ /^\+/) {
+ $opt = substr($opt, 1);
+ }
+ if (! defined $options{$opt}) {
+ $options{$opt} = $optseq++;
+ }
+ }
+ }
+ my (%ropt) = reverse %options;
+ @special_options = map { $ropt{$_} } sort { $a <=> $b } keys %ropt;
+} else {
@special_options = @standard_options;
}
@@ -362,8 +395,8 @@ sub set_global_message($) {
push @global_messages, "message \"$message\";\n"
}
-sub print_one_testpattern($;$) {
- my ($printer, $raw) = @_;
+sub print_one_testpattern($$;$) {
+ my ($printer, $pages, $raw) = @_;
my $stuff = join "", @global_messages;
$stuff .= join "", @job_extras;
$global_printer = $printer;
@@ -388,6 +421,9 @@ sub print_one_testpattern($;$) {
$stuff .= sprintf("top %f;\n", $top);
$stuff .= "blackline 0;\n";
$stuff .= "steps 16;\n";
+ if ($round) {
+ $stuff .= "round;\n";
+ }
if ($raw > 0) {
$stuff .= "mode extended $raw 16;\n";
$stuff .= "xpattern ";
@@ -629,175 +665,147 @@ sub build_key($$) {
return join ",", @answer;
}
-sub do_printer($$) {
- my ($printer, $global_fh) = @_;
- my $tmp;
+sub get_min_max_res($) {
+ my ($printer) = @_;
+ my (@resolutions) = grep {$_ ne 'None' } keys %{$stpdata{$printer}{'Resolution'}};
my $min_res_name;
my $min_res_value = 0;
my $max_res_name;
my $max_res_value = 0;
- my $first_time = 1;
- my $key;
- my $skip_resolutions_local = $skip_resolutions;
- my %opt_vals = {};
- $tmp = $stpdata{$printer}{'Resolution'};
- my (@resolutions) = grep {$_ ne 'None' } keys %$tmp;
- $tmp = $stpdata{$printer}{'PrintingMode'};
- my (@printing_modes) = grep {$_ ne 'None' } keys %$tmp;
+ foreach my $res (sort @resolutions) {
+ my $res_value = ($stpdata{$printer}{'x_resolution'}{$res} *
+ $stpdata{$printer}{'y_resolution'}{$res});
+ if ($min_res_value == 0 || $res_value < $min_res_value) {
+ $min_res_value = $res_value;
+ $min_res_name = $res;
+ }
+ if ($res_value > $max_res_value) {
+ $max_res_value = $res_value;
+ $max_res_name = $res;
+ }
+ }
+ return ($min_res_name, $max_res_name);
+}
+
+sub get_printing_modes($) {
+ my ($printer) = @_;
+ my (@printing_modes) = grep {$_ ne 'None' } keys %{$stpdata{$printer}{'PrintingMode'}};
if ($base_settings{'PrintingMode'}) {
if ($base_settings{'PrintingMode'} eq 'Color' &&
grep { $_ eq 'Color' } @printing_modes) {
- @printing_modes = 'Color';
+ return ('Color');
} elsif ($base_settings{'PrintingMode'} eq 'BW' &&
grep { $_ eq 'BW' } @printing_modes) {
- @printing_modes = 'BW';
+ return ('BW');
} else {
- return;
+ return ();
}
+ } else {
+ return @printing_modes;
}
+}
- foreach $tmp (sort @resolutions) {
- my $res_value = ($stpdata{$printer}{'x_resolution'}{$tmp} *
- $stpdata{$printer}{'y_resolution'}{$tmp});
- if ($min_res_value == 0 || $res_value < $min_res_value) {
- $min_res_value = $res_value;
- $min_res_name = $tmp;
- }
- if ($res_value > $min_res_value) {
- $max_res_value = $res_value;
- $max_res_name = $tmp;
- }
- }
- foreach $key (@special_options) {
- my (@subkeys) = (split(/,/, $key));
- if (grep { /^Resolution$/ } @subkeys) {
- $skip_resolutions_local = 1;
- }
- my $nkey = build_key($key, $printer);
- if ($nkey ne "") {
- my (@vals) = build_list($nkey, $printer, $min_res_name, $max_res_name);
- $nkey =~ s/=[^,]*//g;
- $opt_vals{$nkey} = \@vals;
+sub get_optvals($$$) {
+ my ($printer, $min_res_name, $max_res_name) = @_;
+ my (%opt_vals);
+ if (! @special_options) {
+ $opt_vals{"Default"} = ['all'];
+ } else {
+ foreach my $key (@special_options) {
+ my (@subkeys) = (split(/,/, $key));
+ my $nkey = build_key($key, $printer);
+ if ($nkey ne "") {
+ my (@vals) = build_list($nkey, $printer, $min_res_name, $max_res_name);
+ $nkey =~ s/=[^,]*//g;
+ $opt_vals{$nkey} = \@vals;
+ }
}
}
- if ($use_min_res > 1) {
- @resolutions = ($min_res_name);
- }
- # We want to do all resolutions and all ink types in both color modes.
- # We don't need to do both resolutions and ink types.
- my $pmode;
- foreach $pmode (sort @printing_modes) {
- my ($resolution);
- $pages = $std_pages;
- if (! $skip_resolutions_local) {
- foreach $resolution (sort @resolutions) {
+ return %opt_vals;
+}
+
+# Resolution needs special handling because of MIN and MAX
+# Duplex needs special handling because of printing multiple pages, and
+# need to set JobMode
+# RawChannels needs special handling because it's handled specially by
+# the underlying testpattern command.
+sub do_printer($$) {
+ my ($printer, $global_fh) = @_;
+ my $first_time = 1;
+ my %opt_vals = {};
+
+ my (@printing_modes) = get_printing_modes($printer);
+ return if (! @printing_modes);
+ my ($min_res, $max_res) = get_min_max_res($printer);
+ my (%opt_vals) = get_optvals($printer, $min_res, $max_res);
+ foreach my $pmode (sort @printing_modes) {
+ foreach my $key (sort keys %opt_vals) {
+ next if ($key eq "RawChannels" && $pmode ne "Color");
+ next if (! defined $opt_vals{$key} || $opt_vals{$key} < 1);
+ my (@opts) = sort @{$opt_vals{$key}};
+ my (@subkeys) = split (/,/, $key);
+ my (%subkeys);
+ map {$subkeys{$_} = 1} @subkeys;
+ my $opt;
+ foreach $opt (@opts) {
@extras = ();
@job_extras = ();
@messages = ();
@global_messages = ();
+ my (@ovals);
+ my $rawval;
+ my (@subopts) = split (/,/, $opt);
+ map {
+ my $k = $subkeys[$_];
+ my $v = $subopts[$_];
+ next if ($k eq "RawChannels" && $v ne "None" && $pmode ne "Color");
+ if ($k eq "RawChannels") {
+ $rawval = $v;
+ } else {
+ set_opt($k, $v, $printer);
+ }
+ push @ovals, "${k}=${v}";
+ } (0..$#subkeys);
+ map {
+ if ($key ne $_) {
+ my $setting = $base_settings{$_};
+ if ($_ eq "Resolution" && $setting eq "MIN") {
+ $setting = $min_res;
+ } elsif ($_ eq "Resolution" && $setting eq "MAX") {
+ $setting = $max_res;
+ }
+ set_opt($_, $setting, $printer);
+ push @ovals, "${_}=$setting";
+ }
+ } grep { ! defined $subkeys{$_} &&
+ ($use_unused_options ||
+ defined $stpdata{$printer}{$_})} (keys %base_settings);
+ my $pages = $std_pages;
+ set_opt("PrintingMode", $pmode, $printer);
+ if ($key =~ /Duplex/) {
+ set_opt("JobMode", "Job", $printer);
+ $pages = $duplex_pages;
+ }
+ my $rawval;
if ($first_time) {
if ($quiet < 2) {
set_global_message("$printer\n");
} elsif ($quiet == 2) {
set_global_message(".");
}
+ $first_time = 0;
}
- set_opt("PrintingMode", $pmode, $printer);
- set_opt("Resolution", $resolution, $printer);
- map { set_opt($_, $base_settings{$_}, $printer)} grep { $use_unused_options || defined $stpdata{$printer}{$_}} sort keys %base_settings;
- my ($case) = "${printer}_PrintingMode_${pmode}_Resolution_${resolution}";
+ my ($mstring) = join "_", @ovals;
+ $mstring =~ s/=/_/g;
+ my ($ostring) = join "+", @ovals;
+ my $case = "${printer}_PrintingMode_${pmode}_${mstring}";
$global_case = $case;
if (! $rerun || $rerun_cases{$case}) {
- $first_time = 0;
$global_messages = $case;
do_output($case);
- set_message(" ${pmode}+${resolution}");
- my $output = print_one_testpattern($printer);
- do_print( $output, $global_fh );
- }
- }
- }
- foreach $key (sort keys %opt_vals) {
- next if ($key eq "RawChannels" && $pmode ne "Color");
- my (@subkeys) = split (/,/, $key);
- my (%subkeys);
- map {$subkeys{$_} = 1} @subkeys;
- $tmp = $opt_vals{$key};
- if (defined $tmp && $tmp >= 1) {
- my (@opts) = sort @$tmp;
- my $opt;
- my $rawval;
- my $set_resolution = 0;
- foreach $opt (sort @opts) {
- my (@subopts) = split (/,/, $opt);
- @extras = ();
- @job_extras = ();
- @messages = ();
- @global_messages = ();
- set_opt("PrintingMode", $pmode, $printer);
- if ($use_min_res && ! grep { /^Resolution$/ } @subkeys) {
- set_opt("Resolution", $min_res_name, $printer);
- }
- my (@mvals);
- my (@ovals);
- map {
- my $k = $subkeys[$_];
- my $v = $subopts[$_];
- if ($k eq "RawChannels") {
- next if ($v ne "None" && $pmode ne "Color");
- $rawval = $v;
- } else {
- set_opt($k, $v, $printer);
- }
- push @mvals, "${k}_${v}";
- push @ovals, "${k}=${v}";
- } (0..$#subkeys);
- if ($first_time) {
- if ($quiet < 2) {
- set_global_message("$printer\n");
- } elsif ($quiet == 2) {
- set_global_message(".");
- }
- $first_time = 0;
- }
- # FIXME! need to handle Duplex as a subkey
- map {
- $pages = $std_pages;
- if ($key ne $_) {
- set_opt($_, $base_settings{$_}, $printer);
- push @mvals, "${_}_$base_settings{$_}";
- push @ovals, "${_}=$base_settings{$_}";
- if ($_ eq "Resolution") {
- $set_resolution = 1;
- }
- if ($_ eq "Duplex") {
- set_opt("JobMode", "Job", $printer);
- $pages = $duplex_pages;
- }
- }
- } grep { ! defined $subkeys{$_} &&
- ($use_unused_options ||
- defined $stpdata{$printer}{$_})} (keys %base_settings);
- my ($mstring) = join "_", @mvals;
- my ($ostring) = join "+", @ovals;
- my $case;
- if ($use_min_res && ! $set_resolution) {
- $case = "${printer}_PrintingMode_${pmode}_Resolution_${min_res_name}_${mstring}";
- } else {
- $case = "${printer}_PrintingMode_${pmode}_${mstring}";
- }
- $global_case = $case;
- if (! $rerun || $rerun_cases{$case}) {
- $global_messages = $case;
- do_output($case);
- if ($use_min_res && ! $set_resolution) {
- set_message(" ${ostring}+${pmode}+${min_res_name}");
- } else {
- set_message(" ${ostring}+${pmode}");
- }
- my $output = print_one_testpattern($printer, $rawval);
- do_print( $output, $global_fh );
- }
+ set_message(" ${pmode}+${ostring}");
+ my $output = print_one_testpattern($printer, $pages, $rawval);
+ do_print($output, $global_fh);
}
}
}
@@ -837,7 +845,7 @@ sub restart_testpattern {
if ($single > 1) {
warn("\n***TESTPATTERN CRASHED*** ($global_case) ($err)!\n");
} else {
- warn("\n***TESTPATTERN CRASHED*** (cannot determine case) ($err)!\n");
+ warn("\n***TESTPATTERN CRASHED*** (cannot determine case, near $global_case) ($err)!\n");
}
if ($halt_on_error) {
stopit();
diff --git a/src/testpattern/testpattern.c b/src/testpattern/testpattern.c
index fa3f7ae..06f8664 100644
--- a/src/testpattern/testpattern.c
+++ b/src/testpattern/testpattern.c
@@ -96,6 +96,7 @@ int global_noscale = 0;
int global_suppress_output = 0;
int global_quiet = 0;
int global_fail_verify_ok = 0;
+int global_round_size = 0;
char *global_output = NULL;
FILE *output = NULL;
int write_to_process = 0;
@@ -114,6 +115,15 @@ c_strlen(const char *s)
return strlen(s);
}
+static double
+roundto(double n)
+{
+ if (global_round_size)
+ return (double) ((int) n);
+ else
+ return n;
+}
+
static char *
c_strndup(const char *s, int n)
{
@@ -266,9 +276,9 @@ do_print(void)
int status = 0;
stp_vars_t *v;
const stp_printer_t *the_printer;
- int left, right, top, bottom;
- int x, y;
- int width, height;
+ stp_dimension_t left, right, top, bottom;
+ stp_resolution_t x, y;
+ stp_dimension_t width, height;
int retval;
stp_parameter_list_t params;
int count;
@@ -409,43 +419,52 @@ do_print(void)
stp_set_printer_defaults_soft(v, the_printer);
stp_get_imageable_area(v, &left, &right, &bottom, &top);
+ left = roundto(left);
+ right = roundto(right);
+ bottom = roundto(bottom);
+ top = roundto(top);
stp_describe_resolution(v, &x, &y);
if (x < 0)
x = 300;
if (y < 0)
y = 300;
- width = right - left;
- height = bottom - top;
+ width = roundto(right - left);
+ height = roundto(bottom - top);
switch (global_size_mode)
{
case SIZE_PT:
- top += (int) (global_xtop + .5);
- left += (int) (global_xleft + .5);
- width = (int) (global_hsize + .5);
- height = (int) (global_vsize + .5);
+ top += roundto((int) (global_xtop + .5));
+ left += roundto((int) (global_xleft + .5));
+ width = roundto((int) (global_hsize + .5));
+ height = roundto((int) (global_vsize + .5));
break;
case SIZE_IN:
- top += (int) ((global_xtop * 72) + .5);
- left += (int) ((global_xleft * 72) + .5);
- width = (int) ((global_hsize * 72) + .5);
- height = (int) ((global_vsize * 72) + .5);
+ top += roundto((int) ((global_xtop * 72) + .5));
+ left += roundto((int) ((global_xleft * 72) + .5));
+ width = roundto((int) ((global_hsize * 72) + .5));
+ height = roundto((int) ((global_vsize * 72) + .5));
break;
case SIZE_MM:
- top += (int) ((global_xtop * 72 / 25.4) + .5);
- left += (int) ((global_xleft * 72 / 25.4) + .5);
- width = (int) ((global_hsize * 72 / 25.4) + .5);
- height = (int) ((global_vsize * 72 / 25.4) + .5);
+ top += roundto((int) ((global_xtop * 72 / 25.4) + .5));
+ left += roundto((int) ((global_xleft * 72 / 25.4) + .5));
+ width = roundto((int) ((global_hsize * 72 / 25.4) + .5));
+ height = roundto((int) ((global_vsize * 72 / 25.4) + .5));
break;
case SIZE_RELATIVE:
default:
- top += height * global_xtop;
- left += width * global_xleft;
- width *= global_hsize;
- height *= global_vsize;
+ top = roundto(top + (height * global_xtop));
+ left = roundto(left + (width * global_xleft));
+ width = roundto(width * global_hsize);
+ height = roundto(height * global_vsize);
break;
}
+ if (width < 1)
+ width = 1;
+ if (height < 1)
+ height = 1;
+
stp_set_width(v, width);
stp_set_height(v, height);
#if 0
diff --git a/src/testpattern/testpattern.h b/src/testpattern/testpattern.h
index b39bee9..a5dbe27 100644
--- a/src/testpattern/testpattern.h
+++ b/src/testpattern/testpattern.h
@@ -89,6 +89,7 @@ extern int global_channel_depth;
extern int global_did_something;
extern int global_invert_data;
extern int global_noscale;
+extern int global_round_size;
extern char *global_output;
extern int global_quiet;
extern FILE *output;
diff --git a/src/testpattern/testpatternl.c b/src/testpattern/testpatternl.c
index 0c3b20b..24cff35 100644
--- a/src/testpattern/testpatternl.c
+++ b/src/testpattern/testpatternl.c
@@ -361,8 +361,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 52
-#define YY_END_OF_BUFFER 53
+#define YY_NUM_RULES 53
+#define YY_END_OF_BUFFER 54
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -370,39 +370,39 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[285] =
+static yyconst flex_int16_t yy_accept[289] =
{ 0,
- 0, 0, 53, 52, 49, 51, 52, 50, 52, 52,
- 46, 46, 30, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 49, 0, 48, 50, 0, 46,
- 46, 48, 0, 46, 47, 48, 48, 46, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 18, 48, 48, 48, 48, 48, 19, 48, 48, 48,
- 48, 48, 17, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 47, 0, 46, 47, 0, 48, 47, 46,
- 48, 48, 35, 48, 48, 48, 44, 48, 48, 48,
-
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 34, 48, 48, 48, 13, 48, 48,
- 48, 48, 47, 48, 48, 32, 45, 48, 48, 48,
- 48, 48, 37, 36, 27, 48, 48, 48, 33, 14,
- 48, 48, 48, 48, 48, 31, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 45, 48, 48, 48, 48, 48, 1, 20, 25, 48,
- 2, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 3, 21, 38, 48, 48, 48,
-
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 39, 48, 48, 48, 48, 48, 48, 48, 48,
- 45, 48, 28, 12, 48, 43, 48, 48, 45, 48,
- 45, 40, 41, 48, 48, 23, 5, 48, 48, 48,
- 48, 48, 45, 26, 48, 48, 48, 48, 16, 48,
- 48, 24, 22, 4, 45, 29, 6, 15, 42, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 7, 48, 8, 48, 48, 48, 11,
- 10, 48, 9, 0
+ 0, 0, 54, 53, 50, 52, 53, 51, 53, 53,
+ 47, 47, 30, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 50, 0, 49, 51, 0, 47,
+ 47, 49, 0, 47, 48, 49, 49, 47, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 18, 49, 49, 49, 49, 49, 19, 49, 49, 49,
+ 49, 49, 17, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 48, 0, 47, 48, 0, 49, 48,
+ 47, 49, 49, 35, 49, 49, 49, 45, 49, 49,
+
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 34, 49, 49, 49, 49, 13,
+ 49, 49, 49, 49, 48, 49, 49, 32, 46, 49,
+ 49, 49, 49, 49, 37, 36, 27, 49, 49, 49,
+ 33, 14, 49, 49, 49, 49, 49, 31, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 46, 49, 49, 49, 49, 49, 1,
+ 20, 25, 49, 2, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 42, 49, 49, 3, 21,
+
+ 38, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 39, 49, 49, 49, 49,
+ 49, 49, 49, 49, 46, 49, 28, 12, 49, 44,
+ 49, 49, 46, 49, 46, 40, 41, 49, 49, 23,
+ 5, 49, 49, 49, 49, 49, 46, 26, 49, 49,
+ 49, 49, 16, 49, 49, 24, 22, 4, 46, 29,
+ 6, 15, 43, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 7, 49, 8,
+ 49, 49, 49, 11, 10, 49, 9, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -448,77 +448,81 @@ static yyconst flex_int32_t yy_meta[66] =
3, 3, 3, 3, 3
} ;
-static yyconst flex_int16_t yy_base[289] =
+static yyconst flex_int16_t yy_base[293] =
{ 0,
- 0, 0, 882, 887, 874, 887, 871, 0, 868, 56,
- 60, 64, 887, 863, 68, 74, 70, 71, 72, 75,
- 90, 76, 112, 122, 109, 105, 137, 136, 133, 119,
- 126, 132, 150, 153, 868, 865, 887, 0, 861, 177,
- 190, 855, 79, 200, 205, 217, 242, 221, 227, 228,
- 182, 229, 194, 225, 196, 160, 123, 253, 255, 235,
- 256, 246, 273, 326, 270, 264, 854, 284, 265, 272,
- 306, 269, 853, 286, 291, 301, 336, 300, 294, 327,
- 316, 323, 349, 375, 362, 302, 381, 386, 390, 0,
- 346, 361, 394, 395, 396, 399, 164, 401, 397, 375,
-
- 400, 403, 402, 405, 415, 418, 407, 412, 417, 420,
- 422, 434, 442, 450, 444, 452, 456, 454, 462, 464,
- 465, 476, 472, 851, 470, 480, 483, 849, 481, 468,
- 484, 497, 422, 485, 487, 846, 839, 482, 507, 510,
- 491, 512, 836, 793, 786, 516, 520, 519, 778, 738,
- 526, 533, 539, 531, 541, 712, 543, 553, 554, 547,
- 557, 555, 558, 559, 560, 563, 561, 571, 568, 577,
- 583, 589, 587, 600, 594, 595, 708, 659, 655, 588,
- 581, 602, 606, 614, 620, 617, 615, 619, 635, 624,
- 641, 621, 645, 632, 574, 567, 514, 647, 627, 653,
-
- 651, 652, 629, 670, 669, 657, 673, 679, 682, 686,
- 690, 499, 685, 692, 691, 696, 697, 700, 706, 702,
- 428, 710, 427, 426, 704, 337, 713, 727, 335, 730,
- 318, 315, 312, 729, 732, 238, 198, 734, 745, 733,
- 717, 751, 188, 181, 739, 754, 756, 761, 176, 766,
- 771, 163, 152, 151, 117, 115, 772, 102, 97, 810,
- 776, 773, 758, 781, 782, 788, 790, 794, 791, 797,
- 784, 805, 830, 95, 808, 93, 828, 818, 811, 92,
- 87, 814, 85, 887, 877, 880, 883, 84
+ 0, 0, 886, 910, 883, 910, 879, 0, 876, 56,
+ 60, 64, 910, 872, 68, 74, 70, 71, 72, 75,
+ 90, 76, 112, 122, 109, 105, 137, 138, 140, 117,
+ 123, 80, 132, 162, 878, 875, 910, 0, 872, 191,
+ 201, 868, 180, 205, 215, 230, 252, 247, 145, 165,
+ 144, 234, 115, 167, 178, 188, 219, 264, 265, 235,
+ 275, 226, 271, 324, 268, 223, 867, 274, 276, 292,
+ 311, 280, 866, 291, 295, 294, 313, 339, 318, 314,
+ 337, 346, 347, 380, 393, 384, 396, 371, 400, 406,
+ 0, 404, 370, 410, 412, 303, 413, 95, 414, 312,
+
+ 417, 418, 419, 421, 424, 189, 426, 429, 428, 440,
+ 431, 211, 434, 433, 458, 436, 461, 441, 443, 465,
+ 471, 468, 478, 482, 862, 480, 484, 488, 491, 858,
+ 489, 500, 502, 499, 503, 507, 495, 854, 853, 508,
+ 512, 516, 509, 529, 849, 832, 821, 532, 535, 517,
+ 798, 794, 531, 546, 537, 558, 559, 793, 562, 556,
+ 553, 565, 563, 566, 569, 575, 573, 577, 579, 586,
+ 587, 588, 589, 597, 605, 600, 615, 598, 618, 787,
+ 748, 678, 620, 643, 625, 621, 606, 634, 636, 639,
+ 642, 646, 629, 648, 654, 592, 649, 580, 585, 539,
+
+ 445, 661, 647, 662, 669, 676, 668, 680, 681, 671,
+ 683, 696, 703, 707, 709, 444, 706, 699, 692, 673,
+ 310, 711, 720, 704, 376, 722, 366, 364, 724, 360,
+ 733, 729, 355, 732, 332, 321, 315, 744, 727, 302,
+ 298, 747, 750, 753, 760, 755, 245, 244, 738, 765,
+ 770, 754, 225, 773, 775, 221, 209, 195, 175, 151,
+ 759, 102, 97, 810, 784, 771, 795, 786, 789, 815,
+ 792, 818, 801, 797, 812, 826, 824, 93, 835, 87,
+ 827, 841, 842, 85, 82, 846, 81, 910, 900, 903,
+ 906, 84
+
} ;
-static yyconst flex_int16_t yy_def[289] =
+static yyconst flex_int16_t yy_def[293] =
{ 0,
- 284, 1, 284, 284, 284, 284, 285, 286, 287, 284,
- 288, 288, 284, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 284, 285, 284, 286, 287, 284,
- 284, 288, 284, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 284, 284, 284, 284, 284, 288, 288, 47,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
-
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 284, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 1, 288, 288, 288, 288, 289, 290, 291, 288,
+ 292, 292, 288, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 288, 289, 288, 290, 291, 288,
+ 288, 292, 288, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 288, 288, 288, 288, 288, 292, 292,
+ 47, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 288, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
+ 292, 292, 292, 292, 292, 292, 292, 0, 288, 288,
+ 288, 288
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
- 288, 288, 288, 0, 284, 284, 284, 284
} ;
-static yyconst flex_int16_t yy_nxt[953] =
+static yyconst flex_int16_t yy_nxt[976] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 10, 4, 11,
12, 12, 13, 14, 15, 16, 17, 18, 14, 19,
@@ -527,107 +531,109 @@ static yyconst flex_int16_t yy_nxt[953] =
14, 15, 16, 17, 18, 14, 19, 20, 21, 14,
22, 23, 24, 25, 26, 27, 28, 29, 30, 14,
31, 32, 33, 34, 14, 40, 41, 41, 43, 44,
- 44, 45, 43, 48, 48, 48, 284, 46, 284, 284,
- 284, 46, 284, 284, 284, 57, 42, 53, 86, 86,
- 86, 62, 49, 284, 50, 284, 47, 55, 284, 51,
-
- 284, 284, 58, 284, 46, 284, 59, 56, 46, 54,
- 284, 52, 57, 284, 53, 60, 61, 284, 62, 49,
- 284, 50, 47, 284, 55, 284, 51, 284, 58, 63,
- 284, 284, 59, 56, 284, 65, 69, 52, 70, 66,
- 284, 284, 60, 61, 284, 284, 78, 67, 99, 68,
- 71, 64, 80, 74, 76, 75, 63, 79, 284, 284,
- 284, 284, 65, 69, 70, 77, 66, 72, 284, 73,
- 82, 284, 284, 78, 67, 99, 68, 71, 81, 80,
- 74, 76, 75, 79, 284, 43, 83, 83, 83, 284,
- 284, 77, 98, 72, 84, 73, 284, 82, 43, 85,
-
- 85, 85, 284, 140, 284, 81, 284, 84, 43, 44,
- 44, 45, 97, 43, 45, 45, 45, 46, 98, 93,
- 95, 84, 46, 87, 88, 284, 89, 89, 89, 43,
- 48, 48, 48, 284, 84, 284, 284, 284, 46, 97,
- 91, 92, 94, 284, 46, 93, 284, 95, 104, 46,
- 284, 90, 90, 90, 284, 90, 90, 90, 90, 90,
- 90, 284, 96, 284, 284, 46, 100, 91, 92, 94,
- 101, 106, 284, 284, 102, 104, 103, 284, 284, 105,
- 284, 284, 90, 90, 90, 90, 90, 90, 96, 114,
- 122, 107, 284, 100, 284, 115, 117, 101, 106, 284,
-
- 116, 102, 284, 103, 118, 124, 105, 108, 284, 284,
- 123, 86, 86, 86, 284, 129, 114, 122, 107, 84,
- 284, 115, 117, 284, 284, 119, 284, 116, 128, 131,
- 118, 284, 124, 108, 284, 284, 120, 123, 121, 125,
- 109, 110, 129, 284, 284, 284, 84, 132, 130, 126,
- 111, 112, 119, 127, 284, 128, 131, 43, 83, 83,
- 83, 134, 120, 113, 121, 125, 84, 109, 110, 284,
- 43, 85, 85, 85, 132, 130, 126, 111, 112, 84,
- 127, 87, 87, 284, 133, 133, 133, 135, 134, 113,
- 133, 133, 133, 84, 284, 89, 89, 89, 284, 89,
-
- 89, 89, 284, 284, 284, 284, 84, 284, 284, 284,
- 284, 284, 143, 284, 135, 284, 139, 136, 141, 145,
- 284, 137, 142, 284, 147, 284, 284, 138, 284, 151,
- 284, 133, 133, 133, 284, 284, 284, 144, 143, 150,
- 146, 152, 284, 139, 136, 141, 145, 65, 137, 142,
- 284, 147, 284, 138, 148, 149, 151, 52, 284, 82,
- 284, 153, 284, 144, 284, 150, 146, 154, 152, 156,
- 284, 157, 284, 284, 65, 155, 284, 160, 284, 159,
- 284, 149, 158, 52, 284, 163, 82, 164, 284, 284,
- 284, 284, 284, 284, 154, 284, 156, 161, 157, 284,
-
- 168, 155, 162, 173, 160, 284, 159, 284, 171, 158,
- 165, 166, 163, 172, 164, 284, 169, 176, 284, 167,
- 284, 170, 284, 161, 284, 177, 168, 284, 284, 162,
- 173, 174, 175, 178, 284, 171, 165, 179, 166, 284,
- 172, 284, 169, 180, 176, 167, 182, 284, 170, 284,
- 181, 284, 177, 183, 185, 284, 186, 184, 174, 175,
- 178, 284, 284, 284, 179, 284, 284, 284, 284, 284,
- 180, 284, 189, 182, 190, 284, 284, 181, 196, 284,
- 183, 185, 284, 186, 184, 284, 187, 191, 197, 284,
- 192, 284, 194, 188, 195, 284, 284, 284, 193, 189,
-
- 198, 190, 284, 284, 199, 196, 201, 200, 284, 206,
- 284, 205, 187, 191, 284, 197, 192, 207, 194, 202,
- 195, 204, 284, 284, 203, 284, 198, 284, 284, 284,
- 208, 199, 284, 201, 200, 284, 206, 284, 205, 210,
- 284, 211, 217, 284, 207, 202, 209, 212, 204, 284,
- 213, 203, 214, 284, 215, 284, 225, 208, 216, 284,
- 284, 284, 221, 284, 220, 284, 210, 284, 211, 217,
- 218, 219, 209, 212, 222, 223, 213, 284, 284, 214,
- 215, 284, 228, 225, 226, 216, 227, 284, 221, 224,
- 284, 220, 230, 284, 284, 231, 229, 218, 284, 284,
-
- 284, 222, 223, 232, 284, 284, 234, 233, 284, 228,
- 284, 226, 284, 227, 284, 224, 284, 236, 284, 230,
- 284, 284, 231, 229, 235, 284, 237, 239, 240, 244,
- 232, 238, 241, 234, 233, 284, 242, 284, 284, 243,
- 284, 284, 284, 252, 236, 246, 284, 284, 245, 248,
- 235, 249, 237, 284, 239, 240, 244, 238, 241, 284,
- 251, 250, 284, 242, 284, 243, 284, 247, 253, 284,
- 252, 254, 246, 256, 284, 245, 248, 255, 249, 284,
- 284, 284, 268, 258, 284, 259, 284, 251, 250, 284,
- 284, 257, 284, 247, 284, 253, 284, 254, 284, 284,
-
- 256, 284, 284, 266, 255, 284, 267, 269, 276, 268,
- 258, 260, 259, 284, 270, 271, 284, 257, 284, 284,
- 272, 273, 284, 274, 261, 262, 284, 275, 263, 279,
- 266, 264, 267, 283, 269, 276, 284, 282, 284, 277,
- 270, 265, 271, 278, 284, 280, 272, 284, 273, 274,
- 281, 261, 262, 275, 284, 263, 279, 284, 264, 284,
- 283, 284, 284, 284, 282, 277, 37, 265, 37, 35,
- 278, 284, 280, 37, 37, 35, 281, 36, 36, 36,
- 38, 284, 38, 39, 39, 39, 3, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
-
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284
+ 44, 45, 43, 48, 48, 48, 288, 46, 288, 288,
+ 288, 46, 288, 288, 288, 57, 42, 53, 288, 288,
+ 288, 62, 49, 288, 50, 288, 47, 55, 288, 51,
+
+ 81, 288, 58, 288, 46, 288, 59, 56, 46, 54,
+ 288, 52, 57, 288, 53, 60, 61, 288, 62, 49,
+ 288, 50, 47, 288, 55, 288, 51, 81, 58, 63,
+ 288, 288, 59, 56, 142, 65, 69, 52, 70, 66,
+ 288, 96, 60, 61, 79, 288, 288, 67, 288, 68,
+ 71, 64, 288, 288, 80, 74, 63, 75, 92, 288,
+ 82, 77, 65, 69, 70, 76, 66, 72, 96, 73,
+ 288, 79, 78, 288, 67, 288, 68, 71, 93, 83,
+ 80, 94, 74, 288, 75, 92, 288, 82, 77, 87,
+ 87, 87, 76, 72, 98, 73, 288, 288, 78, 43,
+
+ 84, 84, 84, 288, 97, 93, 83, 94, 85, 43,
+ 86, 86, 86, 43, 44, 44, 45, 288, 85, 288,
+ 99, 98, 46, 43, 45, 45, 45, 288, 150, 288,
+ 97, 288, 46, 288, 288, 85, 88, 89, 288, 90,
+ 90, 90, 288, 288, 100, 85, 99, 95, 105, 46,
+ 155, 107, 288, 288, 116, 43, 48, 48, 48, 46,
+ 288, 91, 91, 91, 46, 91, 91, 91, 91, 91,
+ 91, 100, 288, 288, 95, 105, 288, 101, 107, 288,
+ 116, 102, 288, 288, 288, 103, 104, 115, 288, 108,
+ 117, 46, 91, 91, 91, 91, 91, 91, 106, 288,
+
+ 288, 123, 288, 288, 101, 109, 288, 118, 102, 125,
+ 288, 288, 103, 104, 115, 124, 108, 117, 288, 288,
+ 288, 288, 288, 288, 119, 106, 288, 126, 123, 288,
+ 120, 109, 288, 118, 140, 131, 125, 144, 110, 111,
+ 288, 121, 124, 122, 242, 288, 130, 288, 112, 113,
+ 119, 127, 128, 126, 288, 288, 129, 120, 132, 133,
+ 140, 114, 131, 288, 144, 110, 111, 121, 288, 122,
+ 242, 134, 288, 130, 288, 112, 113, 127, 288, 128,
+ 135, 135, 135, 129, 288, 132, 133, 114, 43, 84,
+ 84, 84, 43, 86, 86, 86, 137, 85, 134, 88,
+
+ 88, 85, 135, 135, 135, 87, 87, 87, 288, 90,
+ 90, 90, 288, 85, 288, 90, 90, 90, 288, 136,
+ 288, 288, 288, 137, 85, 288, 288, 288, 85, 288,
+ 141, 143, 288, 138, 288, 147, 288, 288, 139, 288,
+ 85, 288, 288, 149, 288, 153, 136, 65, 288, 288,
+ 83, 288, 288, 288, 145, 146, 159, 141, 143, 148,
+ 138, 152, 147, 151, 154, 139, 288, 157, 52, 288,
+ 149, 160, 153, 288, 65, 156, 288, 83, 158, 288,
+ 145, 146, 161, 159, 162, 148, 288, 152, 288, 151,
+ 288, 154, 288, 157, 52, 165, 288, 288, 160, 288,
+
+ 163, 167, 156, 288, 164, 158, 166, 288, 288, 161,
+ 288, 162, 135, 135, 135, 288, 288, 288, 168, 169,
+ 288, 175, 165, 173, 288, 288, 163, 170, 167, 176,
+ 174, 164, 171, 166, 172, 179, 177, 288, 178, 288,
+ 288, 183, 180, 288, 168, 288, 169, 288, 175, 181,
+ 173, 186, 182, 170, 288, 184, 176, 174, 171, 185,
+ 172, 288, 179, 177, 288, 178, 288, 288, 183, 180,
+ 288, 288, 188, 288, 288, 189, 181, 288, 186, 182,
+ 193, 288, 184, 288, 187, 288, 185, 288, 288, 190,
+ 192, 196, 191, 288, 288, 288, 288, 288, 194, 188,
+
+ 288, 195, 189, 200, 201, 288, 288, 193, 288, 198,
+ 199, 187, 197, 288, 288, 190, 203, 192, 196, 223,
+ 202, 204, 205, 288, 194, 208, 288, 195, 288, 288,
+ 200, 201, 206, 288, 209, 198, 199, 288, 213, 207,
+ 211, 210, 288, 203, 288, 212, 202, 288, 204, 205,
+ 288, 288, 208, 214, 288, 288, 288, 288, 206, 219,
+ 215, 209, 288, 218, 213, 220, 207, 211, 210, 288,
+ 288, 216, 212, 217, 222, 221, 288, 288, 224, 288,
+ 214, 288, 225, 226, 288, 219, 288, 215, 288, 288,
+ 218, 288, 220, 227, 230, 229, 232, 216, 231, 217,
+
+ 288, 222, 221, 241, 288, 224, 233, 288, 225, 234,
+ 226, 288, 288, 228, 288, 288, 235, 288, 240, 288,
+ 227, 230, 229, 232, 236, 231, 237, 238, 288, 241,
+ 288, 239, 288, 233, 245, 288, 234, 288, 243, 228,
+ 288, 288, 244, 235, 252, 240, 288, 250, 246, 248,
+ 249, 236, 288, 237, 238, 288, 288, 239, 288, 247,
+ 245, 288, 288, 288, 253, 243, 254, 288, 288, 244,
+ 258, 252, 257, 288, 250, 246, 248, 249, 288, 288,
+ 255, 288, 251, 288, 261, 247, 256, 260, 259, 263,
+ 262, 253, 288, 254, 288, 288, 258, 288, 264, 257,
+
+ 288, 288, 288, 288, 271, 288, 288, 255, 251, 288,
+ 261, 270, 273, 256, 260, 259, 263, 262, 288, 272,
+ 288, 274, 276, 288, 265, 266, 288, 279, 267, 288,
+ 271, 268, 288, 278, 288, 288, 280, 282, 270, 273,
+ 288, 269, 275, 288, 284, 277, 272, 274, 276, 288,
+ 288, 265, 266, 279, 288, 267, 283, 288, 268, 278,
+ 281, 288, 288, 280, 282, 287, 288, 269, 286, 275,
+ 288, 284, 277, 285, 288, 288, 288, 37, 37, 35,
+ 288, 37, 37, 283, 35, 288, 281, 288, 288, 288,
+ 288, 288, 287, 288, 288, 286, 288, 288, 288, 285,
+
+ 36, 36, 36, 38, 288, 38, 39, 39, 39, 3,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288
} ;
-static yyconst flex_int16_t yy_chk[953] =
+static yyconst flex_int16_t yy_chk[976] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -637,103 +643,105 @@ static yyconst flex_int16_t yy_chk[953] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 10, 10, 10, 11, 11,
11, 11, 12, 12, 12, 12, 15, 11, 17, 18,
- 19, 12, 16, 20, 22, 19, 288, 17, 43, 43,
- 43, 22, 15, 283, 16, 281, 11, 18, 21, 16,
-
- 280, 276, 19, 274, 11, 259, 20, 18, 12, 17,
- 258, 16, 19, 26, 17, 21, 21, 25, 22, 15,
- 23, 16, 11, 256, 18, 255, 16, 30, 19, 23,
- 24, 57, 20, 18, 31, 24, 25, 16, 26, 24,
- 32, 29, 21, 21, 28, 27, 30, 24, 57, 24,
- 27, 23, 32, 28, 29, 28, 23, 31, 33, 254,
- 253, 34, 24, 25, 26, 29, 24, 27, 56, 27,
- 34, 252, 97, 30, 24, 57, 24, 27, 33, 32,
- 28, 29, 28, 31, 249, 40, 40, 40, 40, 244,
- 51, 29, 56, 27, 40, 27, 243, 34, 41, 41,
-
- 41, 41, 53, 97, 55, 33, 237, 41, 44, 44,
- 44, 44, 55, 45, 45, 45, 45, 44, 56, 51,
- 53, 40, 45, 46, 46, 46, 46, 46, 46, 48,
- 48, 48, 48, 54, 41, 49, 50, 52, 48, 55,
- 49, 50, 52, 60, 44, 51, 236, 53, 60, 45,
- 47, 47, 47, 47, 62, 47, 47, 47, 47, 47,
- 47, 58, 54, 59, 61, 48, 58, 49, 50, 52,
- 58, 62, 66, 69, 58, 60, 59, 72, 65, 61,
- 70, 63, 47, 47, 47, 47, 47, 47, 54, 65,
- 72, 63, 68, 58, 74, 66, 69, 58, 62, 75,
-
- 68, 58, 79, 59, 70, 75, 61, 63, 78, 76,
- 74, 86, 86, 86, 71, 79, 65, 72, 63, 86,
- 233, 66, 69, 232, 81, 71, 231, 68, 78, 81,
- 70, 82, 75, 63, 64, 80, 71, 74, 71, 76,
- 64, 64, 79, 229, 77, 226, 86, 82, 80, 77,
- 64, 64, 71, 77, 91, 78, 81, 83, 83, 83,
- 83, 91, 71, 64, 71, 76, 83, 64, 64, 92,
- 85, 85, 85, 85, 82, 80, 77, 64, 64, 85,
- 77, 84, 84, 100, 84, 84, 84, 92, 91, 64,
- 87, 87, 87, 83, 88, 88, 88, 88, 89, 89,
-
- 89, 89, 93, 94, 95, 99, 85, 96, 101, 98,
- 103, 102, 100, 104, 92, 107, 96, 93, 98, 102,
- 108, 94, 99, 105, 104, 109, 106, 95, 110, 108,
- 111, 133, 133, 133, 224, 223, 221, 101, 100, 107,
- 103, 109, 112, 96, 93, 98, 102, 112, 94, 99,
- 113, 104, 115, 95, 105, 106, 108, 110, 114, 113,
- 116, 111, 118, 101, 117, 107, 103, 114, 109, 116,
- 119, 117, 120, 121, 112, 115, 130, 120, 125, 119,
- 123, 106, 118, 110, 122, 123, 113, 125, 126, 129,
- 138, 127, 131, 134, 114, 135, 116, 121, 117, 141,
-
- 130, 115, 122, 138, 120, 132, 119, 212, 134, 118,
- 126, 127, 123, 135, 125, 139, 131, 141, 140, 129,
- 142, 132, 197, 121, 146, 142, 130, 148, 147, 122,
- 138, 139, 140, 146, 151, 134, 126, 147, 127, 154,
- 135, 152, 131, 148, 141, 129, 152, 153, 132, 155,
- 151, 157, 142, 153, 155, 160, 157, 154, 139, 140,
- 146, 158, 159, 162, 147, 161, 163, 164, 165, 167,
- 148, 166, 160, 152, 161, 196, 169, 151, 167, 168,
- 153, 155, 195, 157, 154, 170, 158, 162, 168, 181,
- 163, 171, 165, 159, 166, 173, 180, 172, 164, 160,
-
- 169, 161, 175, 176, 170, 167, 172, 171, 174, 180,
- 182, 176, 158, 162, 183, 168, 163, 182, 165, 173,
- 166, 175, 184, 187, 174, 186, 169, 188, 185, 192,
- 183, 170, 190, 172, 171, 199, 180, 203, 176, 185,
- 194, 186, 192, 189, 182, 173, 184, 187, 175, 191,
- 188, 174, 189, 193, 190, 198, 203, 183, 191, 201,
- 202, 200, 199, 179, 198, 206, 185, 178, 186, 192,
- 193, 194, 184, 187, 200, 201, 188, 205, 204, 189,
- 190, 207, 206, 203, 204, 191, 205, 208, 199, 202,
- 209, 198, 208, 213, 210, 209, 207, 193, 211, 215,
-
- 214, 200, 201, 210, 216, 217, 213, 211, 218, 206,
- 220, 204, 225, 205, 219, 202, 177, 215, 222, 208,
- 156, 227, 209, 207, 214, 241, 216, 218, 219, 227,
- 210, 217, 220, 213, 211, 228, 222, 234, 230, 225,
- 235, 240, 238, 241, 215, 230, 150, 245, 228, 235,
- 214, 238, 216, 239, 218, 219, 227, 217, 220, 242,
- 240, 239, 246, 222, 247, 225, 263, 234, 242, 248,
- 241, 245, 230, 247, 250, 228, 235, 246, 238, 251,
- 257, 262, 263, 250, 261, 251, 149, 240, 239, 264,
- 265, 248, 271, 234, 145, 242, 266, 245, 267, 269,
-
- 247, 144, 268, 261, 246, 270, 262, 264, 271, 263,
- 250, 257, 251, 272, 265, 266, 275, 248, 260, 279,
- 267, 268, 282, 269, 260, 260, 278, 270, 260, 275,
- 261, 260, 262, 282, 264, 271, 277, 279, 273, 272,
- 265, 260, 266, 273, 143, 277, 267, 137, 268, 269,
- 278, 260, 260, 270, 136, 260, 275, 128, 260, 124,
- 282, 73, 67, 42, 279, 272, 39, 260, 36, 35,
- 273, 14, 277, 9, 7, 5, 278, 285, 285, 285,
- 286, 3, 286, 287, 287, 287, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
-
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284
+ 19, 12, 16, 20, 22, 19, 292, 17, 32, 287,
+ 285, 22, 15, 284, 16, 280, 11, 18, 21, 16,
+
+ 32, 278, 19, 98, 11, 263, 20, 18, 12, 17,
+ 262, 16, 19, 26, 17, 21, 21, 25, 22, 15,
+ 23, 16, 11, 53, 18, 30, 16, 32, 19, 23,
+ 24, 31, 20, 18, 98, 24, 25, 16, 26, 24,
+ 33, 53, 21, 21, 30, 27, 28, 24, 29, 24,
+ 27, 23, 51, 49, 31, 28, 23, 28, 49, 260,
+ 33, 29, 24, 25, 26, 28, 24, 27, 53, 27,
+ 34, 30, 29, 50, 24, 54, 24, 27, 50, 34,
+ 31, 51, 28, 259, 28, 49, 55, 33, 29, 43,
+ 43, 43, 28, 27, 55, 27, 56, 106, 29, 40,
+
+ 40, 40, 40, 258, 54, 50, 34, 51, 40, 41,
+ 41, 41, 41, 44, 44, 44, 44, 257, 41, 112,
+ 56, 55, 44, 45, 45, 45, 45, 57, 106, 256,
+ 54, 66, 45, 253, 62, 40, 46, 46, 46, 46,
+ 46, 46, 52, 60, 57, 41, 56, 52, 60, 44,
+ 112, 62, 248, 247, 66, 48, 48, 48, 48, 45,
+ 47, 47, 47, 47, 48, 47, 47, 47, 47, 47,
+ 47, 57, 58, 59, 52, 60, 65, 58, 62, 63,
+ 66, 58, 68, 61, 69, 58, 59, 65, 72, 63,
+ 68, 48, 47, 47, 47, 47, 47, 47, 61, 74,
+
+ 70, 72, 76, 75, 58, 63, 241, 69, 58, 75,
+ 240, 96, 58, 59, 65, 74, 63, 68, 221, 71,
+ 100, 77, 80, 237, 70, 61, 79, 76, 72, 236,
+ 71, 63, 64, 69, 96, 80, 75, 100, 64, 64,
+ 235, 71, 74, 71, 221, 81, 79, 78, 64, 64,
+ 70, 77, 78, 76, 82, 83, 78, 71, 81, 82,
+ 96, 64, 80, 233, 100, 64, 64, 71, 230, 71,
+ 221, 83, 228, 79, 227, 64, 64, 77, 93, 78,
+ 88, 88, 88, 78, 225, 81, 82, 64, 84, 84,
+ 84, 84, 86, 86, 86, 86, 93, 84, 83, 85,
+
+ 85, 86, 85, 85, 85, 87, 87, 87, 89, 89,
+ 89, 89, 92, 87, 90, 90, 90, 90, 94, 92,
+ 95, 97, 99, 93, 84, 101, 102, 103, 86, 104,
+ 97, 99, 105, 94, 107, 103, 109, 108, 95, 111,
+ 87, 114, 113, 105, 116, 109, 92, 113, 110, 118,
+ 114, 119, 216, 201, 101, 102, 118, 97, 99, 104,
+ 94, 108, 103, 107, 110, 95, 115, 116, 111, 117,
+ 105, 119, 109, 120, 113, 115, 122, 114, 117, 121,
+ 101, 102, 120, 118, 121, 104, 123, 108, 126, 107,
+ 124, 110, 127, 116, 111, 124, 128, 131, 119, 129,
+
+ 122, 127, 115, 137, 123, 117, 126, 134, 132, 120,
+ 133, 121, 135, 135, 135, 136, 140, 143, 128, 129,
+ 141, 137, 124, 134, 142, 150, 122, 131, 127, 140,
+ 136, 123, 132, 126, 133, 143, 141, 144, 142, 153,
+ 148, 150, 144, 149, 128, 155, 129, 200, 137, 148,
+ 134, 155, 149, 131, 154, 153, 140, 136, 132, 154,
+ 133, 161, 143, 141, 160, 142, 156, 157, 150, 144,
+ 159, 163, 157, 162, 164, 159, 148, 165, 155, 149,
+ 163, 167, 153, 166, 156, 168, 154, 169, 198, 160,
+ 162, 166, 161, 199, 170, 171, 172, 173, 164, 157,
+
+ 196, 165, 159, 170, 171, 174, 178, 163, 176, 168,
+ 169, 156, 167, 175, 187, 160, 173, 162, 166, 198,
+ 172, 174, 175, 177, 164, 178, 179, 165, 183, 186,
+ 170, 171, 176, 185, 179, 168, 169, 193, 187, 177,
+ 185, 183, 188, 173, 189, 186, 172, 190, 174, 175,
+ 191, 184, 178, 188, 192, 203, 194, 197, 176, 193,
+ 189, 179, 195, 192, 187, 194, 177, 185, 183, 202,
+ 204, 190, 186, 191, 197, 195, 207, 205, 202, 210,
+ 188, 220, 203, 204, 206, 193, 182, 189, 208, 209,
+ 192, 211, 194, 205, 208, 207, 210, 190, 209, 191,
+
+ 219, 197, 195, 220, 212, 202, 211, 218, 203, 212,
+ 204, 213, 224, 206, 217, 214, 213, 215, 219, 222,
+ 205, 208, 207, 210, 214, 209, 215, 217, 223, 220,
+ 226, 218, 229, 211, 224, 239, 212, 232, 222, 206,
+ 234, 231, 223, 213, 239, 219, 249, 234, 226, 231,
+ 232, 214, 238, 215, 217, 242, 181, 218, 243, 229,
+ 224, 244, 252, 246, 242, 222, 243, 261, 245, 223,
+ 249, 239, 246, 250, 234, 226, 231, 232, 251, 266,
+ 244, 254, 238, 255, 252, 229, 245, 251, 250, 255,
+ 254, 242, 265, 243, 268, 180, 249, 269, 261, 246,
+
+ 271, 158, 152, 267, 266, 274, 151, 244, 238, 273,
+ 252, 265, 268, 245, 251, 250, 255, 254, 264, 267,
+ 275, 269, 271, 270, 264, 264, 272, 274, 264, 147,
+ 266, 264, 277, 273, 276, 281, 275, 277, 265, 268,
+ 146, 264, 270, 279, 281, 272, 267, 269, 271, 282,
+ 283, 264, 264, 274, 286, 264, 279, 145, 264, 273,
+ 276, 139, 138, 275, 277, 286, 130, 264, 283, 270,
+ 125, 281, 272, 282, 73, 67, 42, 39, 36, 35,
+ 14, 9, 7, 279, 5, 3, 276, 0, 0, 0,
+ 0, 0, 286, 0, 0, 283, 0, 0, 0, 282,
+
+ 289, 289, 289, 290, 0, 290, 291, 291, 291, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
+ 288, 288, 288, 288, 288
} ;
static yy_state_type yy_last_accepting_state;
@@ -816,7 +824,7 @@ do \
while (0)
-#line 820 "testpatternl.c"
+#line 828 "testpatternl.c"
#define INITIAL 0
@@ -1001,7 +1009,7 @@ YY_DECL
#line 81 "testpatternl.l"
-#line 1005 "testpatternl.c"
+#line 1013 "testpatternl.c"
if ( !(yy_init) )
{
@@ -1054,13 +1062,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 285 )
+ if ( yy_current_state >= 289 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 887 );
+ while ( yy_base[yy_current_state] != 910 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1292,61 +1300,66 @@ DBG(NOSCALE); return NOSCALE;
case 42:
YY_RULE_SETUP
#line 124 "testpatternl.l"
-DBG(START_JOB); return START_JOB;
+DBG(ROUND); return ROUND;
YY_BREAK
case 43:
YY_RULE_SETUP
#line 125 "testpatternl.l"
-DBG(END_JOB); return END_JOB;
+DBG(START_JOB); return START_JOB;
YY_BREAK
case 44:
YY_RULE_SETUP
#line 126 "testpatternl.l"
-DBG(END); return END;
+DBG(END_JOB); return END_JOB;
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 128 "testpatternl.l"
-yylval.sval = yytext;DBG(COLOR); return COLOR;
+#line 127 "testpatternl.l"
+DBG(END); return END;
YY_BREAK
case 46:
YY_RULE_SETUP
#line 129 "testpatternl.l"
-yylval.ival = strtol(yytext, NULL, 0); yylval.dval = (double) yylval.ival; DBG(tINT); return tINT;
+yylval.sval = yytext;DBG(COLOR); return COLOR;
YY_BREAK
case 47:
YY_RULE_SETUP
#line 130 "testpatternl.l"
-yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
+yylval.ival = strtol(yytext, NULL, 0); yylval.dval = (double) yylval.ival; DBG(tINT); return tINT;
YY_BREAK
case 48:
-/* rule 48 can match eol */
YY_RULE_SETUP
#line 131 "testpatternl.l"
-yylval.sval = c_strstrip(yytext); DBG(tSTRING); return tSTRING;
+yylval.dval = strtod(yytext, NULL); DBG(tDOUBLE); return tDOUBLE;
YY_BREAK
case 49:
+/* rule 49 can match eol */
YY_RULE_SETUP
#line 132 "testpatternl.l"
-DBG(whitespace); /* Skip blanks/tabs */
+yylval.sval = c_strstrip(yytext); DBG(tSTRING); return tSTRING;
YY_BREAK
case 50:
YY_RULE_SETUP
#line 133 "testpatternl.l"
-DBG(comment); /* Skip comments */
+DBG(whitespace); /* Skip blanks/tabs */
YY_BREAK
case 51:
-/* rule 51 can match eol */
YY_RULE_SETUP
#line 134 "testpatternl.l"
-DBG(newline); mylineno++;
+DBG(comment); /* Skip comments */
YY_BREAK
case 52:
+/* rule 52 can match eol */
YY_RULE_SETUP
#line 135 "testpatternl.l"
+DBG(newline); mylineno++;
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 136 "testpatternl.l"
ECHO;
YY_BREAK
-#line 1350 "testpatternl.c"
+#line 1363 "testpatternl.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1638,7 +1651,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 285 )
+ if ( yy_current_state >= 289 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
@@ -1666,11 +1679,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 285 )
+ if ( yy_current_state >= 289 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
- yy_is_jam = (yy_current_state == 284);
+ yy_is_jam = (yy_current_state == 288);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2340,4 +2353,4 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 135 "testpatternl.l"
+#line 136 "testpatternl.l"
diff --git a/src/testpattern/testpatternl.l b/src/testpattern/testpatternl.l
index a340ce6..21e8bcf 100644
--- a/src/testpattern/testpatternl.l
+++ b/src/testpattern/testpatternl.l
@@ -121,6 +121,7 @@ white yylval.ival = WHITE;DBG(WHITE); return WHITE;
output DBG(OUTPUT); return OUTPUT;
message DBG(MESSAGE); return MESSAGE;
noscale DBG(NOSCALE); return NOSCALE;
+round DBG(ROUND); return ROUND;
start_job DBG(START_JOB); return START_JOB;
end_job DBG(END_JOB); return END_JOB;
end DBG(END); return END;
diff --git a/src/testpattern/testpatterny.c b/src/testpattern/testpatterny.c
index da90dcc..4a2de11 100644
--- a/src/testpattern/testpatterny.c
+++ b/src/testpattern/testpatterny.c
@@ -209,11 +209,12 @@ extern int yydebug;
WHITE = 296,
MODE = 297,
PAGESIZE = 298,
- MESSAGE = 299,
- OUTPUT = 300,
- START_JOB = 301,
- END_JOB = 302,
- END = 303
+ ROUND = 299,
+ MESSAGE = 300,
+ OUTPUT = 301,
+ START_JOB = 302,
+ END_JOB = 303,
+ END = 304
};
#endif
/* Tokens. */
@@ -258,11 +259,12 @@ extern int yydebug;
#define WHITE 296
#define MODE 297
#define PAGESIZE 298
-#define MESSAGE 299
-#define OUTPUT 300
-#define START_JOB 301
-#define END_JOB 302
-#define END 303
+#define ROUND 299
+#define MESSAGE 300
+#define OUTPUT 301
+#define START_JOB 302
+#define END_JOB 303
+#define END 304
@@ -293,7 +295,7 @@ int yyparse ();
/* Copy the second part of user declarations. */
/* Line 390 of yacc.c */
-#line 297 "testpatterny.c"
+#line 299 "testpatterny.c"
#ifdef short
# undef short
@@ -511,22 +513,22 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 62
+#define YYFINAL 64
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 177
+#define YYLAST 179
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 49
+#define YYNTOKENS 50
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 77
+#define YYNNTS 78
/* YYNRULES -- Number of rules. */
-#define YYNRULES 130
+#define YYNRULES 132
/* YYNRULES -- Number of states. */
-#define YYNSTATES 183
+#define YYNSTATES 185
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 303
+#define YYMAXUTOK 304
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -564,7 +566,7 @@ static const yytype_uint8 yytranslate[] =
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48
+ 45, 46, 47, 48, 49
};
#if YYDEBUG
@@ -574,75 +576,75 @@ static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
19, 22, 24, 26, 28, 30, 32, 34, 36, 39,
- 41, 43, 46, 50, 54, 58, 62, 65, 68, 71,
- 74, 77, 81, 83, 85, 89, 93, 97, 101, 105,
- 107, 109, 111, 113, 115, 118, 121, 124, 126, 128,
- 130, 132, 134, 136, 138, 140, 143, 146, 149, 152,
- 155, 159, 161, 164, 165, 167, 170, 175, 181, 183,
- 185, 187, 190, 191, 193, 195, 197, 203, 207, 210,
- 213, 217, 219, 220, 223, 226, 228, 231, 233, 235,
+ 41, 43, 45, 48, 52, 56, 60, 64, 67, 70,
+ 73, 76, 79, 83, 85, 87, 91, 95, 99, 103,
+ 107, 109, 111, 113, 115, 117, 120, 123, 126, 128,
+ 130, 132, 134, 136, 138, 140, 142, 145, 148, 151,
+ 154, 157, 161, 163, 166, 167, 169, 172, 177, 183,
+ 185, 187, 189, 192, 193, 195, 197, 199, 205, 209,
+ 212, 215, 219, 221, 222, 225, 228, 230, 233, 235,
237, 239, 241, 243, 245, 247, 249, 251, 253, 255,
257, 259, 261, 263, 265, 267, 269, 271, 273, 275,
- 277, 279, 281, 283, 285, 288, 290, 292, 294, 296,
- 299, 300, 303, 305, 306, 309, 311, 313, 314, 317,
- 318
+ 277, 279, 281, 283, 285, 287, 289, 292, 294, 296,
+ 298, 300, 303, 304, 307, 309, 310, 313, 315, 317,
+ 318, 321, 322
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 124, 0, -1, 4, -1, 3, -1, 36, -1, 37,
+ 126, 0, -1, 4, -1, 3, -1, 36, -1, 37,
-1, 38, -1, 39, -1, 40, -1, 41, -1, 31,
- 3, -1, 51, -1, 52, -1, 53, -1, 54, -1,
- 55, -1, 56, -1, 57, -1, 58, 3, -1, 58,
- -1, 59, -1, 42, 60, -1, 8, 6, 50, -1,
- 8, 3, 50, -1, 7, 6, 50, -1, 7, 3,
- 50, -1, 7, 50, -1, 9, 3, -1, 10, 50,
- -1, 11, 5, -1, 43, 5, -1, 43, 3, 3,
- -1, 70, -1, 71, -1, 12, 5, 5, -1, 13,
- 5, 3, -1, 14, 5, 3, -1, 15, 5, 50,
- -1, 16, 5, 5, -1, 73, -1, 74, -1, 76,
- -1, 77, -1, 75, -1, 17, 50, -1, 18, 50,
- -1, 19, 50, -1, 21, -1, 23, -1, 22, -1,
- 24, -1, 82, -1, 84, -1, 83, -1, 85, -1,
- 20, 86, -1, 25, 50, -1, 26, 50, -1, 27,
- 3, -1, 28, 3, -1, 50, 50, 50, -1, 92,
- -1, 93, 92, -1, -1, 93, -1, 92, 94, -1,
- 6, 50, 50, 50, -1, 35, 3, 50, 50, 50,
- -1, 96, -1, 97, -1, 98, -1, 99, 98, -1,
- -1, 99, -1, 95, -1, 100, -1, 50, 50, 50,
- 50, 50, -1, 29, 102, 101, -1, 30, 101, -1,
- 33, 3, -1, 32, 3, 3, -1, 5, -1, -1,
- 108, 107, -1, 44, 108, -1, 45, -1, 45, 5,
- -1, 110, -1, 111, -1, 46, -1, 47, -1, 64,
- -1, 65, -1, 62, -1, 63, -1, 66, -1, 67,
- -1, 68, -1, 69, -1, 78, -1, 79, -1, 80,
- -1, 81, -1, 88, -1, 89, -1, 90, -1, 91,
- -1, 61, -1, 72, -1, 109, -1, 112, -1, 113,
- -1, 114, -1, 87, -1, 115, 34, -1, 103, -1,
- 104, -1, 105, -1, 109, -1, 117, 34, -1, -1,
- 119, 118, -1, 106, -1, -1, 121, 116, -1, 119,
- -1, 120, -1, -1, 48, 34, -1, -1, 121, 125,
- 122, 123, -1
+ 3, -1, 52, -1, 53, -1, 54, -1, 55, -1,
+ 56, -1, 57, -1, 58, -1, 59, 3, -1, 59,
+ -1, 60, -1, 44, -1, 42, 61, -1, 8, 6,
+ 51, -1, 8, 3, 51, -1, 7, 6, 51, -1,
+ 7, 3, 51, -1, 7, 51, -1, 9, 3, -1,
+ 10, 51, -1, 11, 5, -1, 43, 5, -1, 43,
+ 3, 3, -1, 72, -1, 73, -1, 12, 5, 5,
+ -1, 13, 5, 3, -1, 14, 5, 3, -1, 15,
+ 5, 51, -1, 16, 5, 5, -1, 75, -1, 76,
+ -1, 78, -1, 79, -1, 77, -1, 17, 51, -1,
+ 18, 51, -1, 19, 51, -1, 21, -1, 23, -1,
+ 22, -1, 24, -1, 84, -1, 86, -1, 85, -1,
+ 87, -1, 20, 88, -1, 25, 51, -1, 26, 51,
+ -1, 27, 3, -1, 28, 3, -1, 51, 51, 51,
+ -1, 94, -1, 95, 94, -1, -1, 95, -1, 94,
+ 96, -1, 6, 51, 51, 51, -1, 35, 3, 51,
+ 51, 51, -1, 98, -1, 99, -1, 100, -1, 101,
+ 100, -1, -1, 101, -1, 97, -1, 102, -1, 51,
+ 51, 51, 51, 51, -1, 29, 104, 103, -1, 30,
+ 103, -1, 33, 3, -1, 32, 3, 3, -1, 5,
+ -1, -1, 110, 109, -1, 45, 110, -1, 46, -1,
+ 46, 5, -1, 112, -1, 113, -1, 47, -1, 48,
+ -1, 66, -1, 67, -1, 64, -1, 65, -1, 68,
+ -1, 69, -1, 70, -1, 71, -1, 80, -1, 81,
+ -1, 82, -1, 83, -1, 90, -1, 91, -1, 92,
+ -1, 93, -1, 63, -1, 74, -1, 111, -1, 114,
+ -1, 115, -1, 116, -1, 89, -1, 62, -1, 117,
+ 34, -1, 105, -1, 106, -1, 107, -1, 111, -1,
+ 119, 34, -1, -1, 121, 120, -1, 108, -1, -1,
+ 123, 118, -1, 121, -1, 122, -1, -1, 49, 34,
+ -1, -1, 123, 127, 124, 125, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 144, 144, 144, 149, 159, 169, 179, 189, 199,
- 209, 219, 219, 219, 219, 219, 219, 219, 222, 230,
- 230, 233, 236, 246, 255, 265, 274, 281, 288, 295,
- 304, 313, 322, 322, 325, 335, 344, 353, 362, 376,
- 376, 376, 376, 376, 378, 385, 392, 399, 406, 413,
- 420, 427, 427, 427, 427, 429, 431, 438, 445, 453,
- 461, 476, 476, 479, 479, 482, 485, 499, 512, 512,
- 515, 515, 518, 518, 521, 521, 524, 539, 542, 557,
- 568, 585, 592, 592, 595, 598, 608, 614, 614, 617,
- 621, 625, 625, 625, 625, 625, 625, 626, 626, 626,
- 626, 626, 626, 626, 627, 627, 627, 627, 627, 627,
- 628, 628, 628, 628, 631, 635, 635, 635, 635, 638,
- 642, 642, 645, 649, 649, 652, 652, 655, 655, 660,
- 659
+ 0, 145, 145, 145, 150, 160, 170, 180, 190, 200,
+ 210, 220, 220, 220, 220, 220, 220, 220, 223, 231,
+ 231, 234, 241, 244, 254, 263, 273, 282, 289, 296,
+ 303, 312, 321, 330, 330, 333, 343, 352, 361, 370,
+ 384, 384, 384, 384, 384, 386, 393, 400, 407, 414,
+ 421, 428, 435, 435, 435, 435, 437, 439, 446, 453,
+ 461, 469, 484, 484, 487, 487, 490, 493, 507, 520,
+ 520, 523, 523, 526, 526, 529, 529, 532, 547, 550,
+ 565, 576, 593, 600, 600, 603, 606, 616, 622, 622,
+ 625, 629, 633, 633, 633, 633, 633, 633, 634, 634,
+ 634, 634, 634, 634, 634, 635, 635, 635, 635, 635,
+ 635, 636, 636, 636, 636, 636, 639, 643, 643, 643,
+ 643, 646, 650, 650, 653, 657, 657, 660, 660, 663,
+ 663, 668, 667
};
#endif
@@ -657,22 +659,23 @@ static const char *const yytname[] =
"DENSITY", "TOP", "LEFT", "SIZE_MODE", "RELATIVE", "PT", "IN", "MM",
"HSIZE", "VSIZE", "BLACKLINE", "NOSCALE", "PATTERN", "XPATTERN",
"EXTENDED", "IMAGE", "GRID", "SEMI", "CHANNEL", "CMYK", "KCMY", "RGB",
- "CMY", "GRAY", "WHITE", "MODE", "PAGESIZE", "MESSAGE", "OUTPUT",
+ "CMY", "GRAY", "WHITE", "MODE", "PAGESIZE", "ROUND", "MESSAGE", "OUTPUT",
"START_JOB", "END_JOB", "END", "$accept", "NUMBER", "cmykspec",
"kcmyspec", "rgbspec", "cmyspec", "grayspec", "whitespec",
- "extendedspec", "modespec1", "modespec2", "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_bool",
- "parameter_float", "parameter_curve", "parameter", "density", "top",
- "left", "size_relative", "size_in", "size_pt", "size_mm", "size_mode_1",
- "size_mode", "hsize", "vsize", "blackline", "noscale", "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",
- "Message", "Messages", "message", "Output0", "Output1", "output",
- "start_job", "end_job", "A_Rule", "Rule", "A_Pattern", "Pattern",
- "Patterns", "Image", "Rules", "Print", "EOF", "Thing", "$@1", YY_NULL
+ "extendedspec", "modespec1", "modespec2", "modespec", "round",
+ "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_bool", "parameter_float", "parameter_curve", "parameter",
+ "density", "top", "left", "size_relative", "size_in", "size_pt",
+ "size_mm", "size_mode_1", "size_mode", "hsize", "vsize", "blackline",
+ "noscale", "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", "Message", "Messages", "message", "Output0",
+ "Output1", "output", "start_job", "end_job", "A_Rule", "Rule",
+ "A_Pattern", "Pattern", "Patterns", "Image", "Rules", "Print", "EOF",
+ "Thing", "$@1", YY_NULL
};
#endif
@@ -685,27 +688,27 @@ static const yytype_uint16 yytoknum[] =
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
- 295, 296, 297, 298, 299, 300, 301, 302, 303
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 49, 50, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 58, 58, 58, 58, 58, 58, 59, 60,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 72, 73, 74, 75, 76, 77, 78,
- 78, 78, 78, 78, 79, 80, 81, 82, 83, 84,
- 85, 86, 86, 86, 86, 87, 88, 89, 90, 91,
- 92, 93, 93, 94, 94, 95, 96, 97, 98, 98,
- 99, 99, 100, 100, 101, 101, 102, 103, 104, 105,
- 106, 107, 108, 108, 109, 110, 111, 112, 112, 113,
- 114, 115, 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 116, 117, 117, 117, 117, 118,
- 119, 119, 120, 121, 121, 122, 122, 123, 123, 125,
- 124
+ 0, 50, 51, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 59, 59, 59, 59, 59, 59, 60, 61,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 74, 75, 76, 77, 78, 79,
+ 80, 80, 80, 80, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 88, 88, 88, 89, 90, 91, 92,
+ 93, 94, 95, 95, 96, 96, 97, 98, 99, 100,
+ 100, 101, 101, 102, 102, 103, 103, 104, 105, 106,
+ 107, 108, 109, 110, 110, 111, 112, 113, 114, 114,
+ 115, 116, 117, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 118, 119, 119, 119,
+ 119, 120, 121, 121, 122, 123, 123, 124, 124, 125,
+ 125, 127, 126
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -713,18 +716,18 @@ static const yytype_uint8 yyr2[] =
{
0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
2, 1, 1, 1, 1, 1, 1, 1, 2, 1,
- 1, 2, 3, 3, 3, 3, 2, 2, 2, 2,
- 2, 3, 1, 1, 3, 3, 3, 3, 3, 1,
- 1, 1, 1, 1, 2, 2, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
- 3, 1, 2, 0, 1, 2, 4, 5, 1, 1,
- 1, 2, 0, 1, 1, 1, 5, 3, 2, 2,
- 3, 1, 0, 2, 2, 1, 2, 1, 1, 1,
+ 1, 1, 2, 3, 3, 3, 3, 2, 2, 2,
+ 2, 2, 3, 1, 1, 3, 3, 3, 3, 3,
+ 1, 1, 1, 1, 1, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
+ 2, 3, 1, 2, 0, 1, 2, 4, 5, 1,
+ 1, 1, 2, 0, 1, 1, 1, 5, 3, 2,
+ 2, 3, 1, 0, 2, 2, 1, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 1, 1, 1, 1, 2,
- 0, 2, 1, 0, 2, 1, 1, 0, 2, 0,
- 4
+ 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
+ 1, 2, 0, 2, 1, 0, 2, 1, 1, 0,
+ 2, 0, 4
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
@@ -732,77 +735,77 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 123, 129, 0, 0, 0, 0, 0, 0, 0, 0,
+ 125, 131, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 82, 85, 89, 90, 107, 93, 94,
- 91, 92, 95, 96, 97, 98, 32, 33, 108, 39,
- 40, 43, 41, 42, 99, 100, 101, 102, 113, 103,
- 104, 105, 106, 109, 87, 88, 110, 111, 112, 0,
- 124, 120, 1, 3, 2, 0, 26, 0, 0, 27,
- 3, 28, 29, 0, 0, 0, 0, 0, 44, 45,
- 46, 47, 49, 48, 50, 51, 53, 52, 54, 55,
- 56, 57, 58, 59, 0, 4, 5, 6, 7, 8,
- 9, 11, 12, 13, 14, 15, 16, 17, 19, 20,
- 21, 0, 30, 84, 86, 114, 0, 122, 125, 126,
- 127, 25, 24, 23, 22, 34, 35, 36, 37, 38,
- 10, 18, 31, 81, 83, 0, 0, 72, 0, 115,
- 116, 117, 118, 0, 121, 0, 130, 80, 0, 72,
- 0, 0, 0, 63, 74, 68, 69, 70, 73, 75,
- 78, 79, 119, 128, 0, 77, 0, 0, 0, 61,
- 64, 65, 71, 0, 0, 0, 60, 62, 0, 66,
- 0, 76, 67
+ 0, 0, 0, 21, 83, 86, 90, 91, 115, 108,
+ 94, 95, 92, 93, 96, 97, 98, 99, 33, 34,
+ 109, 40, 41, 44, 42, 43, 100, 101, 102, 103,
+ 114, 104, 105, 106, 107, 110, 88, 89, 111, 112,
+ 113, 0, 126, 122, 1, 3, 2, 0, 27, 0,
+ 0, 28, 3, 29, 30, 0, 0, 0, 0, 0,
+ 45, 46, 47, 48, 50, 49, 51, 52, 54, 53,
+ 55, 56, 57, 58, 59, 60, 0, 4, 5, 6,
+ 7, 8, 9, 11, 12, 13, 14, 15, 16, 17,
+ 19, 20, 22, 0, 31, 85, 87, 116, 0, 124,
+ 127, 128, 129, 26, 25, 24, 23, 35, 36, 37,
+ 38, 39, 10, 18, 32, 82, 84, 0, 0, 73,
+ 0, 117, 118, 119, 120, 0, 123, 0, 132, 81,
+ 0, 73, 0, 0, 0, 64, 75, 69, 70, 71,
+ 74, 76, 79, 80, 121, 130, 0, 78, 0, 0,
+ 0, 62, 65, 66, 72, 0, 0, 0, 61, 63,
+ 0, 67, 0, 77, 68
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 152, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 110, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 85, 86, 87, 88, 89, 48, 49,
- 50, 51, 52, 153, 170, 171, 154, 155, 156, 157,
- 158, 159, 160, 149, 139, 140, 141, 117, 134, 113,
- 53, 54, 55, 56, 57, 58, 59, 60, 143, 144,
- 118, 119, 1, 120, 146, 2, 61
+ -1, 154, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 112, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 87, 88, 89, 90, 91, 50,
+ 51, 52, 53, 54, 155, 172, 173, 156, 157, 158,
+ 159, 160, 161, 162, 151, 141, 142, 143, 119, 136,
+ 115, 55, 56, 57, 58, 59, 60, 61, 62, 145,
+ 146, 120, 121, 1, 122, 148, 2, 63
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -141
+#define YYPACT_NINF -143
static const yytype_int16 yypact[] =
{
- -141, 9, 40, 41, 69, 45, 28, 44, 53, 54,
- 58, 71, 72, 28, 28, 28, -16, 28, 28, 47,
- 75, 30, 36, -141, 74, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, -141, 46,
- -141, 42, -141, 28, -141, 28, -141, 28, 28, -141,
- -141, -141, -141, 76, 79, 80, 28, 81, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, 82, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, 84, -141,
- -141, 85, -141, 86, -141, -141, 87, -141, 13, -141,
- 48, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, 89, 28, -2, 90, -141,
- -141, -141, -141, 50, -141, 55, -141, -141, 28, -2,
- 28, 91, 28, 28, -141, -141, -141, -141, 3, -141,
- -141, -141, -141, -141, 28, -141, 28, 28, 28, -141,
- 28, -141, -141, 28, 28, 28, -141, -141, 28, -141,
- 28, -141, -141
+ -143, 9, 40, 41, 71, 45, 28, 44, 54, 55,
+ 56, 60, 73, 28, 28, 28, -16, 28, 28, 47,
+ 76, 32, 36, -143, -143, 75, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, 42, -143, 49, -143, 28, -143, 28, -143, 28,
+ 28, -143, -143, -143, -143, 77, 80, 81, 28, 82,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, 83, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ 85, -143, -143, 86, -143, 87, -143, -143, 88, -143,
+ 13, -143, 46, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, 90, 28, -2,
+ 91, -143, -143, -143, -143, 51, -143, 62, -143, -143,
+ 28, -2, 28, 94, 28, 28, -143, -143, -143, -143,
+ 3, -143, -143, -143, -143, -143, 28, -143, 28, 28,
+ 28, -143, 28, -143, -143, 28, 28, 28, -143, -143,
+ 28, -143, 28, -143, -143
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -141, -3, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -140, -141, -141, -141, -141, -141, -63,
- -141, -141, -52, -141, -141, -141, -141, -141, -141, -141,
- -20, -141, -141, -141, -141, -141, -141, -141, -141, -141,
- -141, -141, -141, -141, -141, -141, -141
+ -143, -3, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -142, -143, -143, -143, -143, -143,
+ -70, -143, -143, -53, -143, -143, -143, -143, -143, -143,
+ -143, -21, -143, -143, -143, -143, -143, -143, -143, -143,
+ -143, -143, -143, -143, -143, -143, -143, -143
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -811,28 +814,28 @@ static const yytype_int16 yypgoto[] =
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 66, 70, 64, 71, 150, 81, 82, 83, 84, 150,
- 78, 79, 80, 169, 90, 91, 3, 4, 5, 6,
+ 68, 72, 66, 73, 152, 83, 84, 85, 86, 152,
+ 80, 81, 82, 171, 92, 93, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 177, 70, 64, 151, 17, 18, 19, 20, 151, 111,
- 62, 112, 136, 137, 63, 64, 138, 65, 69, 72,
- 92, 21, 22, 23, 24, 25, 26, 23, 73, 74,
- 121, 94, 122, 75, 123, 124, 95, 96, 97, 98,
- 99, 100, 67, 128, 116, 68, 76, 77, 93, 114,
- 115, 125, 126, 127, 162, 130, 129, 131, 132, 163,
- 135, 133, 147, 161, 167, 172, 145, 165, 142, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 179, 72, 66, 153, 17, 18, 19, 20, 153, 113,
+ 64, 114, 138, 139, 65, 66, 140, 67, 71, 74,
+ 94, 21, 22, 23, 24, 25, 26, 27, 24, 75,
+ 76, 77, 123, 96, 124, 78, 125, 126, 97, 98,
+ 99, 100, 101, 102, 69, 130, 117, 70, 79, 95,
+ 116, 118, 127, 128, 129, 164, 132, 131, 133, 134,
+ 174, 137, 135, 149, 163, 147, 165, 169, 167, 144,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 148, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 164, 0, 166, 0, 168,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 173, 0, 174, 175, 176, 0, 0, 0, 0,
- 178, 179, 180, 0, 0, 181, 0, 182
+ 0, 0, 0, 0, 0, 150, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 166, 0, 168,
+ 0, 170, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 175, 0, 176, 177, 178, 0, 0,
+ 0, 0, 180, 181, 182, 0, 0, 183, 0, 184
};
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-141)))
+ (!!((Yystate) == (-143)))
#define yytable_value_is_error(Yytable_value) \
YYID (0)
@@ -840,48 +843,48 @@ static const yytype_uint8 yytable[] =
static const yytype_int16 yycheck[] =
{
3, 3, 4, 6, 6, 21, 22, 23, 24, 6,
- 13, 14, 15, 153, 17, 18, 7, 8, 9, 10,
+ 13, 14, 15, 155, 17, 18, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 170, 3, 4, 35, 25, 26, 27, 28, 35, 3,
+ 172, 3, 4, 35, 25, 26, 27, 28, 35, 3,
0, 5, 29, 30, 3, 4, 33, 6, 3, 5,
- 3, 42, 43, 44, 45, 46, 47, 44, 5, 5,
- 63, 31, 65, 5, 67, 68, 36, 37, 38, 39,
- 40, 41, 3, 76, 32, 6, 5, 5, 3, 5,
- 34, 5, 3, 3, 34, 3, 5, 3, 3, 34,
- 3, 5, 3, 3, 3, 158, 48, 149, 118, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3, 42, 43, 44, 45, 46, 47, 48, 45, 5,
+ 5, 5, 65, 31, 67, 5, 69, 70, 36, 37,
+ 38, 39, 40, 41, 3, 78, 34, 6, 5, 3,
+ 5, 32, 5, 3, 3, 34, 3, 5, 3, 3,
+ 160, 3, 5, 3, 3, 49, 34, 3, 151, 120,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 136, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 148, -1, 150, -1, 152,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 164, -1, 166, 167, 168, -1, -1, -1, -1,
- 173, 174, 175, -1, -1, 178, -1, 180
+ -1, -1, -1, -1, -1, 138, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 150, -1, 152,
+ -1, 154, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 166, -1, 168, 169, 170, -1, -1,
+ -1, -1, 175, 176, 177, -1, -1, 180, -1, 182
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 121, 124, 7, 8, 9, 10, 11, 12, 13,
+ 0, 123, 126, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 25, 26, 27,
- 28, 42, 43, 44, 45, 46, 47, 61, 62, 63,
+ 28, 42, 43, 44, 45, 46, 47, 48, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 76, 77, 78, 79, 80, 81, 87, 88,
- 89, 90, 91, 109, 110, 111, 112, 113, 114, 115,
- 116, 125, 0, 3, 4, 6, 50, 3, 6, 3,
- 3, 50, 5, 5, 5, 5, 5, 5, 50, 50,
- 50, 21, 22, 23, 24, 82, 83, 84, 85, 86,
- 50, 50, 3, 3, 31, 36, 37, 38, 39, 40,
- 41, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 3, 5, 108, 5, 34, 32, 106, 119, 120,
- 122, 50, 50, 50, 50, 5, 3, 3, 50, 5,
- 3, 3, 3, 5, 107, 3, 29, 30, 33, 103,
- 104, 105, 109, 117, 118, 48, 123, 3, 50, 102,
- 6, 35, 50, 92, 95, 96, 97, 98, 99, 100,
- 101, 3, 34, 34, 50, 101, 50, 3, 50, 92,
- 93, 94, 98, 50, 50, 50, 50, 92, 50, 50,
- 50, 50, 50
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 89, 90, 91, 92, 93, 111, 112, 113, 114, 115,
+ 116, 117, 118, 127, 0, 3, 4, 6, 51, 3,
+ 6, 3, 3, 51, 5, 5, 5, 5, 5, 5,
+ 51, 51, 51, 21, 22, 23, 24, 84, 85, 86,
+ 87, 88, 51, 51, 3, 3, 31, 36, 37, 38,
+ 39, 40, 41, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 3, 5, 110, 5, 34, 32, 108,
+ 121, 122, 124, 51, 51, 51, 51, 5, 3, 3,
+ 51, 5, 3, 3, 3, 5, 109, 3, 29, 30,
+ 33, 105, 106, 107, 111, 119, 120, 49, 125, 3,
+ 51, 104, 6, 35, 51, 94, 97, 98, 99, 100,
+ 101, 102, 103, 3, 34, 34, 51, 103, 51, 3,
+ 51, 94, 95, 96, 100, 51, 51, 51, 51, 94,
+ 51, 51, 51, 51, 51
};
#define yyerrok (yyerrstatus = 0)
@@ -1683,14 +1686,14 @@ yyreduce:
{
case 3:
/* Line 1792 of yacc.c */
-#line 145 "testpatterny.y"
+#line 146 "testpatterny.y"
{
}
break;
case 4:
/* Line 1792 of yacc.c */
-#line 150 "testpatterny.y"
+#line 151 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>cmykspec\n");
@@ -1702,7 +1705,7 @@ yyreduce:
case 5:
/* Line 1792 of yacc.c */
-#line 160 "testpatterny.y"
+#line 161 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>kcmyspec\n");
@@ -1714,7 +1717,7 @@ yyreduce:
case 6:
/* Line 1792 of yacc.c */
-#line 170 "testpatterny.y"
+#line 171 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>rgbspec\n");
@@ -1726,7 +1729,7 @@ yyreduce:
case 7:
/* Line 1792 of yacc.c */
-#line 180 "testpatterny.y"
+#line 181 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>cmyspec\n");
@@ -1738,7 +1741,7 @@ yyreduce:
case 8:
/* Line 1792 of yacc.c */
-#line 190 "testpatterny.y"
+#line 191 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>grayspec\n");
@@ -1750,7 +1753,7 @@ yyreduce:
case 9:
/* Line 1792 of yacc.c */
-#line 200 "testpatterny.y"
+#line 201 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>whitespec\n");
@@ -1762,7 +1765,7 @@ yyreduce:
case 10:
/* Line 1792 of yacc.c */
-#line 210 "testpatterny.y"
+#line 211 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>extendedspec %d\n", (yyvsp[(2) - (2)].ival));
@@ -1774,7 +1777,7 @@ yyreduce:
case 18:
/* Line 1792 of yacc.c */
-#line 223 "testpatterny.y"
+#line 224 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>modespec2 %d\n", (yyvsp[(2) - (2)].ival));
@@ -1783,9 +1786,19 @@ yyreduce:
}
break;
- case 22:
+ case 21:
+/* Line 1792 of yacc.c */
+#line 235 "testpatterny.y"
+ {
+ if (getenv("STP_TESTPATTERN_DEBUG"))
+ fprintf(stderr, ">>>round\n");
+ global_round_size = 1;
+ }
+ break;
+
+ case 23:
/* Line 1792 of yacc.c */
-#line 237 "testpatterny.y"
+#line 245 "testpatterny.y"
{
int channel = find_color((yyvsp[(2) - (3)].sval));
if (getenv("STP_TESTPATTERN_DEBUG"))
@@ -1795,9 +1808,9 @@ yyreduce:
}
break;
- case 23:
+ case 24:
/* Line 1792 of yacc.c */
-#line 247 "testpatterny.y"
+#line 255 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>channel_level %d %f\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval));
@@ -1806,9 +1819,9 @@ yyreduce:
}
break;
- case 24:
+ case 25:
/* Line 1792 of yacc.c */
-#line 256 "testpatterny.y"
+#line 264 "testpatterny.y"
{
int channel = find_color((yyvsp[(2) - (3)].sval));
if (getenv("STP_TESTPATTERN_DEBUG"))
@@ -1818,9 +1831,9 @@ yyreduce:
}
break;
- case 25:
+ case 26:
/* Line 1792 of yacc.c */
-#line 266 "testpatterny.y"
+#line 274 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>channel_gamma %d %f\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval));
@@ -1829,9 +1842,9 @@ yyreduce:
}
break;
- case 26:
+ case 27:
/* Line 1792 of yacc.c */
-#line 275 "testpatterny.y"
+#line 283 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>global_gamma %f\n", (yyvsp[(2) - (2)].dval));
@@ -1839,9 +1852,9 @@ yyreduce:
}
break;
- case 27:
+ case 28:
/* Line 1792 of yacc.c */
-#line 282 "testpatterny.y"
+#line 290 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>steps %d\n", (yyvsp[(2) - (2)].ival));
@@ -1849,9 +1862,9 @@ yyreduce:
}
break;
- case 28:
+ case 29:
/* Line 1792 of yacc.c */
-#line 289 "testpatterny.y"
+#line 297 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>ink_limit %f\n", (yyvsp[(2) - (2)].dval));
@@ -1859,9 +1872,9 @@ yyreduce:
}
break;
- case 29:
+ case 30:
/* Line 1792 of yacc.c */
-#line 296 "testpatterny.y"
+#line 304 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>printer %s\n", (yyvsp[(2) - (2)].sval));
@@ -1870,9 +1883,9 @@ yyreduce:
}
break;
- case 30:
+ case 31:
/* Line 1792 of yacc.c */
-#line 305 "testpatterny.y"
+#line 313 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>page_size_name %s\n", (yyvsp[(2) - (2)].sval));
@@ -1881,9 +1894,9 @@ yyreduce:
}
break;
- case 31:
+ case 32:
/* Line 1792 of yacc.c */
-#line 314 "testpatterny.y"
+#line 322 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>page_size_custom %d %d\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival));
@@ -1892,9 +1905,9 @@ yyreduce:
}
break;
- case 34:
+ case 35:
/* Line 1792 of yacc.c */
-#line 326 "testpatterny.y"
+#line 334 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>parameter_string %s %s\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval));
@@ -1904,9 +1917,9 @@ yyreduce:
}
break;
- case 35:
+ case 36:
/* Line 1792 of yacc.c */
-#line 336 "testpatterny.y"
+#line 344 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>parameter_int %s %d\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].ival));
@@ -1915,9 +1928,9 @@ yyreduce:
}
break;
- case 36:
+ case 37:
/* Line 1792 of yacc.c */
-#line 345 "testpatterny.y"
+#line 353 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>parameter_bool %s %d\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].ival));
@@ -1926,9 +1939,9 @@ yyreduce:
}
break;
- case 37:
+ case 38:
/* Line 1792 of yacc.c */
-#line 354 "testpatterny.y"
+#line 362 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>parameter_float %s %f\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].dval));
@@ -1937,9 +1950,9 @@ yyreduce:
}
break;
- case 38:
+ case 39:
/* Line 1792 of yacc.c */
-#line 363 "testpatterny.y"
+#line 371 "testpatterny.y"
{
stp_curve_t *curve = stp_curve_create_from_string((yyvsp[(3) - (3)].sval));
if (getenv("STP_TESTPATTERN_DEBUG"))
@@ -1953,9 +1966,9 @@ yyreduce:
}
break;
- case 44:
+ case 45:
/* Line 1792 of yacc.c */
-#line 379 "testpatterny.y"
+#line 387 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>density %f\n", (yyvsp[(2) - (2)].dval));
@@ -1963,9 +1976,9 @@ yyreduce:
}
break;
- case 45:
+ case 46:
/* Line 1792 of yacc.c */
-#line 386 "testpatterny.y"
+#line 394 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>top %f\n", (yyvsp[(2) - (2)].dval));
@@ -1973,9 +1986,9 @@ yyreduce:
}
break;
- case 46:
+ case 47:
/* Line 1792 of yacc.c */
-#line 393 "testpatterny.y"
+#line 401 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>left %f\n", (yyvsp[(2) - (2)].dval));
@@ -1983,9 +1996,9 @@ yyreduce:
}
break;
- case 47:
+ case 48:
/* Line 1792 of yacc.c */
-#line 400 "testpatterny.y"
+#line 408 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>relative size\n");
@@ -1993,9 +2006,9 @@ yyreduce:
}
break;
- case 48:
+ case 49:
/* Line 1792 of yacc.c */
-#line 407 "testpatterny.y"
+#line 415 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>size inches\n");
@@ -2003,9 +2016,9 @@ yyreduce:
}
break;
- case 49:
+ case 50:
/* Line 1792 of yacc.c */
-#line 414 "testpatterny.y"
+#line 422 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>size pt\n");
@@ -2013,9 +2026,9 @@ yyreduce:
}
break;
- case 50:
+ case 51:
/* Line 1792 of yacc.c */
-#line 421 "testpatterny.y"
+#line 429 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>size mm\n");
@@ -2023,9 +2036,9 @@ yyreduce:
}
break;
- case 56:
+ case 57:
/* Line 1792 of yacc.c */
-#line 432 "testpatterny.y"
+#line 440 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>hsize %f\n", (yyvsp[(2) - (2)].dval));
@@ -2033,9 +2046,9 @@ yyreduce:
}
break;
- case 57:
+ case 58:
/* Line 1792 of yacc.c */
-#line 439 "testpatterny.y"
+#line 447 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>vsize %f\n", (yyvsp[(2) - (2)].dval));
@@ -2043,9 +2056,9 @@ yyreduce:
}
break;
- case 58:
+ case 59:
/* Line 1792 of yacc.c */
-#line 446 "testpatterny.y"
+#line 454 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>blackline %d\n", (yyvsp[(2) - (2)].ival));
@@ -2053,9 +2066,9 @@ yyreduce:
}
break;
- case 59:
+ case 60:
/* Line 1792 of yacc.c */
-#line 454 "testpatterny.y"
+#line 462 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>noscale %d\n", (yyvsp[(2) - (2)].ival));
@@ -2063,9 +2076,9 @@ yyreduce:
}
break;
- case 60:
+ case 61:
/* Line 1792 of yacc.c */
-#line 462 "testpatterny.y"
+#line 470 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>color_block1 %f %f %f (%d)\n", (yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].dval), (yyvsp[(3) - (3)].dval),
@@ -2080,9 +2093,9 @@ yyreduce:
}
break;
- case 66:
+ case 67:
/* Line 1792 of yacc.c */
-#line 486 "testpatterny.y"
+#line 494 "testpatterny.y"
{
int channel = find_color((yyvsp[(1) - (4)].sval));
if (getenv("STP_TESTPATTERN_DEBUG"))
@@ -2096,9 +2109,9 @@ yyreduce:
}
break;
- case 67:
+ case 68:
/* Line 1792 of yacc.c */
-#line 500 "testpatterny.y"
+#line 508 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>color_block2b %d %f %f %f\n", (yyvsp[(2) - (5)].ival), (yyvsp[(3) - (5)].dval), (yyvsp[(4) - (5)].dval), (yyvsp[(5) - (5)].dval));
@@ -2111,9 +2124,9 @@ yyreduce:
}
break;
- case 76:
+ case 77:
/* Line 1792 of yacc.c */
-#line 525 "testpatterny.y"
+#line 533 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>patvars %f %f %f %f %f\n", (yyvsp[(1) - (5)].dval), (yyvsp[(2) - (5)].dval), (yyvsp[(3) - (5)].dval), (yyvsp[(4) - (5)].dval), (yyvsp[(5) - (5)].dval));
@@ -2128,9 +2141,9 @@ yyreduce:
}
break;
- case 78:
+ case 79:
/* Line 1792 of yacc.c */
-#line 543 "testpatterny.y"
+#line 551 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>xpattern\n");
@@ -2145,9 +2158,9 @@ yyreduce:
}
break;
- case 79:
+ case 80:
/* Line 1792 of yacc.c */
-#line 558 "testpatterny.y"
+#line 566 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>grid %d\n", (yyvsp[(2) - (2)].ival));
@@ -2158,9 +2171,9 @@ yyreduce:
}
break;
- case 80:
+ case 81:
/* Line 1792 of yacc.c */
-#line 569 "testpatterny.y"
+#line 577 "testpatterny.y"
{
if (getenv("STP_TESTPATTERN_DEBUG"))
fprintf(stderr, ">>>image %d %d\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival));
@@ -2177,18 +2190,18 @@ yyreduce:
}
break;
- case 81:
+ case 82:
/* Line 1792 of yacc.c */
-#line 586 "testpatterny.y"
+#line 594 "testpatterny.y"
{
fprintf(stderr,"%s",(yyvsp[(1) - (1)].sval));
free((yyvsp[(1) - (1)].sval));
}
break;
- case 85:
+ case 86:
/* Line 1792 of yacc.c */
-#line 599 "testpatterny.y"
+#line 607 "testpatterny.y"
{
close_output();
if (global_output)
@@ -2198,53 +2211,53 @@ yyreduce:
}
break;
- case 86:
+ case 87:
/* Line 1792 of yacc.c */
-#line 609 "testpatterny.y"
+#line 617 "testpatterny.y"
{
global_output = (yyvsp[(2) - (2)].sval);
}
break;
- case 89:
+ case 90:
/* Line 1792 of yacc.c */
-#line 618 "testpatterny.y"
+#line 626 "testpatterny.y"
{ start_job = 1; }
break;
- case 90:
+ case 91:
/* Line 1792 of yacc.c */
-#line 622 "testpatterny.y"
+#line 630 "testpatterny.y"
{ end_job = 1; }
break;
- case 114:
+ case 116:
/* Line 1792 of yacc.c */
-#line 632 "testpatterny.y"
+#line 640 "testpatterny.y"
{ global_did_something = 1; }
break;
- case 119:
+ case 121:
/* Line 1792 of yacc.c */
-#line 639 "testpatterny.y"
+#line 647 "testpatterny.y"
{ global_did_something = 1; }
break;
- case 122:
+ case 124:
/* Line 1792 of yacc.c */
-#line 646 "testpatterny.y"
+#line 654 "testpatterny.y"
{ global_did_something = 1; }
break;
- case 128:
+ case 130:
/* Line 1792 of yacc.c */
-#line 656 "testpatterny.y"
+#line 664 "testpatterny.y"
{ return 0; }
break;
- case 129:
+ case 131:
/* Line 1792 of yacc.c */
-#line 660 "testpatterny.y"
+#line 668 "testpatterny.y"
{
current_testpattern = get_next_testpattern();
}
@@ -2252,7 +2265,7 @@ yyreduce:
/* Line 1792 of yacc.c */
-#line 2256 "testpatterny.c"
+#line 2269 "testpatterny.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2484,5 +2497,5 @@ yyreturn:
/* Line 2055 of yacc.c */
-#line 666 "testpatterny.y"
+#line 674 "testpatterny.y"
diff --git a/src/testpattern/testpatterny.h b/src/testpattern/testpatterny.h
index deb113c..6fae959 100644
--- a/src/testpattern/testpatterny.h
+++ b/src/testpattern/testpatterny.h
@@ -87,11 +87,12 @@ extern int yydebug;
WHITE = 296,
MODE = 297,
PAGESIZE = 298,
- MESSAGE = 299,
- OUTPUT = 300,
- START_JOB = 301,
- END_JOB = 302,
- END = 303
+ ROUND = 299,
+ MESSAGE = 300,
+ OUTPUT = 301,
+ START_JOB = 302,
+ END_JOB = 303,
+ END = 304
};
#endif
/* Tokens. */
@@ -136,11 +137,12 @@ extern int yydebug;
#define WHITE 296
#define MODE 297
#define PAGESIZE 298
-#define MESSAGE 299
-#define OUTPUT 300
-#define START_JOB 301
-#define END_JOB 302
-#define END 303
+#define ROUND 299
+#define MESSAGE 300
+#define OUTPUT 301
+#define START_JOB 302
+#define END_JOB 303
+#define END 304
diff --git a/src/testpattern/testpatterny.y b/src/testpattern/testpatterny.y
index 3b89160..0a4df6b 100644
--- a/src/testpattern/testpatterny.y
+++ b/src/testpattern/testpatterny.y
@@ -129,6 +129,7 @@ find_color(const char *name)
%token WHITE
%token MODE
%token PAGESIZE
+%token ROUND
%token MESSAGE
%token OUTPUT
%token START_JOB
@@ -230,6 +231,13 @@ modespec2: modespec1 tINT
modespec: modespec1 | modespec2
;
+round: ROUND
+ {
+ if (getenv("STP_TESTPATTERN_DEBUG"))
+ fprintf(stderr, ">>>round\n");
+ global_round_size = 1;
+ }
+
inputspec: MODE modespec
;
@@ -625,7 +633,7 @@ end_job: END_JOB
A_Rule: gamma | channel_gamma | level | channel_level | global_gamma | steps
| ink_limit | printer | parameter | density | top | left | hsize
| vsize | blackline | noscale | inputspec | page_size | message
- | output | start_job | end_job | size_mode
+ | output | start_job | end_job | size_mode | round
;
Rule: A_Rule SEMI
diff --git a/src/xml/escp2/model/Makefile.am b/src/xml/escp2/model/Makefile.am
index f971699..b705d12 100644
--- a/src/xml/escp2/model/Makefile.am
+++ b/src/xml/escp2/model/Makefile.am
@@ -154,7 +154,9 @@ pkgxmldata_DATA = \
model_126.xml \
model_127.xml \
model_128.xml \
- model_129.xml
+ model_129.xml \
+ model_130.xml \
+ model_131.xml
xml-stamp: $(pkgxmldata_DATA) Makefile.am
-rm -f $@ $@.tmp
diff --git a/src/xml/escp2/model/Makefile.in b/src/xml/escp2/model/Makefile.in
index a5aa582..0d8b15f 100644
--- a/src/xml/escp2/model/Makefile.in
+++ b/src/xml/escp2/model/Makefile.in
@@ -508,7 +508,9 @@ pkgxmldata_DATA = \
model_126.xml \
model_127.xml \
model_128.xml \
- model_129.xml
+ model_129.xml \
+ model_130.xml \
+ model_131.xml
CLEANFILES = xmli18n-tmp.h xml-stamp xml-stamp.tmp
EXTRA_DIST = $(pkgxmldata_DATA)
diff --git a/src/xml/escp2/model/model_130.xml b/src/xml/escp2/model/model_130.xml
new file mode 100644
index 0000000..9ce64ba
--- /dev/null
+++ b/src/xml/escp2/model/model_130.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+
+<gutenprint xmlns="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint.xsd">
+<copyright>
+ * Copyright 2008 Robert Krawitz (rlk@alum.mit.edu)
+ *
+ * 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 the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * 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.
+</copyright>
+<escp2Model id="130">
+ <media src="escp2/media/f360_ultrachrome_k3v.xml"/>
+ <inputSlots src="escp2/inputslots/pro3880.xml"/>
+ <qualityPresets src="escp2/qualitypresets/v2880.xml"/>
+ <inkGroup src="escp2/inks/f360_ultrachrome_k3v.xml"/>
+ <mediaSizes src="escp2/mediasizes/standard.xml"/>
+ <verticalBorderlessSequence>US\003\000\000\000\002</verticalBorderlessSequence>
+ <preinitSequence>\000\000\000\033\001@EJL\0401284.4\012@EJL\040\040\040\040\040\012\033@</preinitSequence>
+ <preinitRemoteSequence>SN\001\000\000</preinitRemoteSequence>
+ <postinitRemoteSequence>JE\001\000\000</postinitRemoteSequence>
+ <commandSet>2000</commandSet>
+ <borderless>Full</borderless>
+ <supportsVariableDropsizes/>
+ <hasFastGraymode/>
+ <sendZeroAdvance/>
+ <supportsD4Mode/>
+ <hasInterchangeableInkCartridges/>
+ <preferredEnvelopeOrientation>Portrait</preferredEnvelopeOrientation>
+ <headConfiguration type="default">
+ <Nozzles>180</Nozzles>
+ <MinNozzles>1</MinNozzles>
+ <FirstNozzle>0</FirstNozzle>
+ <NozzleSeparation>2</NozzleSeparation>
+ </headConfiguration>
+ <physicalChannels>9</physicalChannels>
+ <baseSeparation>360</baseSeparation>
+ <resolutionScale>14400</resolutionScale>
+ <minimumResolution>360 180</minimumResolution>
+ <maximumResolution>5760 2880</maximumResolution>
+ <extraVerticalFeed>10</extraVerticalFeed>
+ <separationRows>1</separationRows>
+ <zeroMarginOffset>96</zeroMarginOffset>
+ <microLeftMargin>42</microLeftMargin>
+ <minHorizontalAlignment>1</minHorizontalAlignment>
+ <baseHorizontalAlignment>180</baseHorizontalAlignment>
+ <bidirectionalAutoUpperLimit>2073600</bidirectionalAutoUpperLimit>
+ <minimumMediaSize>144 144</minimumMediaSize>
+ <maximumMediaSize>1224 86400</maximumMediaSize>
+ <maximumImageableArea>1224 86400</maximumImageableArea>
+ <margins interleave="soft" media="sheet">9 9 0 0</margins>
+ <margins interleave="printer" media="sheet">9 9 0 0</margins>
+ <margins interleave="soft" media="roll">9 9 0 0</margins>
+ <margins interleave="printer" media="roll">9 9 0 0</margins>
+ <CDOffset>221 262</CDOffset>
+ <CDMediaSize>595 842</CDMediaSize>
+ <AlignmentChoices>4 15 0 0</AlignmentChoices>
+ <resolutions>
+ <resolution translate="text" name="360x180sw" text="360 x 180 DPI Draft">
+ <physicalResolution>360 180</physicalResolution>
+ <parameter type="float" name="escp2_density">3.270000</parameter>
+ <parameter type="integer" name="escp2_ink_type">6</parameter>
+ <parameter type="integer" name="escp2_base_res">360</parameter>
+ <parameter type="integer" name="escp2_bits">1</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="360sw" text="360 DPI">
+ <physicalResolution>360 360</physicalResolution>
+ <parameter type="float" name="escp2_density">1.630000</parameter>
+ <parameter type="integer" name="escp2_ink_type">17</parameter>
+ <parameter type="integer" name="escp2_base_res">360</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="720x360sw" text="720 x 360 DPI">
+ <physicalResolution>720 360</physicalResolution>
+ <parameter type="float" name="escp2_density">1.550000</parameter>
+ <parameter type="integer" name="escp2_ink_type">17</parameter>
+ <parameter type="integer" name="escp2_base_res">360</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.400000</parameter>
+ <parameter type="float" name="DropSize2">0.552000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="720sw" text="720 DPI">
+ <physicalResolution>720 720</physicalResolution>
+ <parameter type="float" name="escp2_density">1.550000</parameter>
+ <parameter type="integer" name="escp2_ink_type">17</parameter>
+ <parameter type="integer" name="escp2_base_res">360</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.400000</parameter>
+ <parameter type="float" name="DropSize2">0.552000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="1440x720sw" text="1440 x 720 DPI">
+ <physicalResolution>1440 720</physicalResolution>
+ <parameter type="float" name="escp2_density">0.775000</parameter>
+ <parameter type="integer" name="escp2_ink_type">18</parameter>
+ <parameter type="integer" name="escp2_base_res">360</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.386500</parameter>
+ <parameter type="float" name="DropSize2">0.536000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="1440sw" text="1440 x 1440 DPI">
+ <physicalResolution>1440 1440</physicalResolution>
+ <parameter type="float" name="escp2_density">0.3875000</parameter>
+ <parameter type="integer" name="escp2_ink_type">18</parameter>
+ <parameter type="integer" name="escp2_base_res">360</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.386500</parameter>
+ <parameter type="float" name="DropSize2">0.536000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="2880x1440sw" text="2880 x 1440 DPI">
+ <physicalResolution>2880 1440</physicalResolution>
+ <parameter type="float" name="escp2_density">0.775000</parameter>
+ <parameter type="integer" name="escp2_ink_type">5</parameter>
+ <parameter type="integer" name="escp2_base_res">720</parameter>
+ <parameter type="integer" name="escp2_bits">1</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="5760x1440sw" text="5760 x 1440 DPI">
+ <physicalResolution>5760 1440</physicalResolution>
+ <parameter type="float" name="escp2_density">0.775000</parameter>
+ <parameter type="integer" name="escp2_ink_type">5</parameter>
+ <parameter type="integer" name="escp2_base_res">720</parameter>
+ <parameter type="integer" name="escp2_bits">1</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="2880x2880sw" text="2880 x 2880 DPI">
+ <physicalResolution>2880 2880</physicalResolution>
+ <parameter type="float" name="escp2_density">0.388000</parameter>
+ <parameter type="integer" name="escp2_ink_type">5</parameter>
+ <parameter type="integer" name="escp2_base_res">720</parameter>
+ <parameter type="integer" name="escp2_bits">1</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="5760x2880sw" text="5760 x 2880 DPI">
+ <physicalResolution>5760 2880</physicalResolution>
+ <parameter type="float" name="escp2_density">0.194000</parameter>
+ <parameter type="integer" name="escp2_ink_type">5</parameter>
+ <parameter type="integer" name="escp2_base_res">720</parameter>
+ <parameter type="integer" name="escp2_bits">1</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ </resolutions>
+</escp2Model>
+</gutenprint>
diff --git a/src/xml/escp2/model/model_131.xml b/src/xml/escp2/model/model_131.xml
new file mode 100644
index 0000000..26de179
--- /dev/null
+++ b/src/xml/escp2/model/model_131.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+
+<gutenprint xmlns="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint.xsd">
+<copyright>
+ * Copyright 2008 Robert Krawitz (rlk@alum.mit.edu)
+ *
+ * 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 the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * 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.
+</copyright>
+<escp2Model id="131">
+ <media src="escp2/media/pro_ultrachrome_k3v10.xml"/>
+ <inputSlots src="escp2/inputslots/pro_cutter_roll_feed.xml"/>
+ <qualityPresets src="escp2/qualitypresets/prox900.xml"/>
+ <inkGroup src="escp2/inks/pro_ultrachrome_k3v10.xml"/>
+ <printerWeaves src="escp2/weaves/pro7600.xml"/>
+ <preinitSequence>\000\000\000\033\001@EJL\0401284.4\012@EJL\040\040\040\040\040\012\033@</preinitSequence>
+ <postinitRemoteSequence>JE\001\000\000</postinitRemoteSequence>
+ <commandSet>Pro</commandSet>
+ <borderless>HorizontalOnly</borderless>
+ <supportsVariableDropsizes/>
+ <hasFastGraymode/>
+ <sendZeroAdvance/>
+ <supportsD4Mode/>
+ <preferredEnvelopeOrientation>Landscape</preferredEnvelopeOrientation>
+ <headConfiguration type="default">
+ <Nozzles>1</Nozzles>
+ <MinNozzles>1</MinNozzles>
+ <FirstNozzle>0</FirstNozzle>
+ <NozzleSeparation>1</NozzleSeparation>
+ </headConfiguration>
+ <physicalChannels>10</physicalChannels>
+ <baseSeparation>360</baseSeparation>
+ <resolutionScale>14400</resolutionScale>
+ <minimumResolution>360 180</minimumResolution>
+ <maximumResolution>2880 2880</maximumResolution>
+ <separationRows>1</separationRows>
+ <zeroMarginOffset>43</zeroMarginOffset>
+ <microLeftMargin>5</microLeftMargin>
+ <minHorizontalAlignment>1</minHorizontalAlignment>
+ <baseHorizontalAlignment>28800</baseHorizontalAlignment>
+ <bidirectionalAutoUpperLimit>2073600</bidirectionalAutoUpperLimit>
+ <minimumMediaSize>144 144</minimumMediaSize>
+ <maximumMediaSize>1224 86400</maximumMediaSize>
+ <maximumImageableArea>1224 86400</maximumImageableArea>
+ <margins interleave="soft" media="sheet">9 9 9 40</margins>
+ <margins interleave="printer" media="sheet">9 9 9 40</margins>
+ <margins interleave="soft" media="roll">9 9 0 0</margins>
+ <margins interleave="printer" media="roll">9 9 0 0</margins>
+ <AlignmentChoices>3 15 0 0</AlignmentChoices>
+ <resolutions>
+ <resolution translate="text" name="360pro" text="360 DPI">
+ <physicalResolution>360 360</physicalResolution>
+ <printerWeave command="\033(i\001\000\001"/>
+ <parameter type="float" name="escp2_density">5.000000</parameter>
+ <parameter type="integer" name="escp2_ink_type">17</parameter>
+ <parameter type="integer" name="escp2_base_res">2880</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.290000</parameter>
+ <parameter type="float" name="DropSize2">0.630000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="720x360mw" text="720 x 360 DPI">
+ <physicalResolution>720 360</physicalResolution>
+ <printerWeave command="\033(i\001\000\001"/>
+ <parameter type="float" name="escp2_density">2.520000</parameter>
+ <parameter type="integer" name="escp2_ink_type">17</parameter>
+ <parameter type="integer" name="escp2_base_res">2880</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.290000</parameter>
+ <parameter type="float" name="DropSize2">0.630000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="720mw" text="720 DPI">
+ <physicalResolution>720 720</physicalResolution>
+ <printerWeave command="\033(i\001\000\001"/>
+ <parameter type="float" name="escp2_density">1.260000</parameter>
+ <parameter type="integer" name="escp2_ink_type">17</parameter>
+ <parameter type="integer" name="escp2_base_res">2880</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.290000</parameter>
+ <parameter type="float" name="DropSize2">0.630000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="720x1440mw" text="1440 x 720 DPI">
+ <physicalResolution>720 1440</physicalResolution>
+ <printerWeave command="\033(i\001\000\001"/>
+ <parameter type="float" name="escp2_density">0.891000</parameter>
+ <parameter type="integer" name="escp2_ink_type">18</parameter>
+ <parameter type="integer" name="escp2_base_res">2880</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.275000</parameter>
+ <parameter type="float" name="DropSize2">0.450000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="1440x1440mw" text="1440 x 1440 DPI">
+ <physicalResolution>1440 1440</physicalResolution>
+ <printerWeave command="\033(i\001\000\001"/>
+ <parameter type="float" name="escp2_density">0.446000</parameter>
+ <parameter type="integer" name="escp2_ink_type">18</parameter>
+ <parameter type="integer" name="escp2_base_res">2880</parameter>
+ <parameter type="integer" name="escp2_bits">2</parameter>
+ <parameter type="float" name="DropSize1">0.275000</parameter>
+ <parameter type="float" name="DropSize2">0.450000</parameter>
+ <parameter type="float" name="DropSize3">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="2880x1440mw" text="2880 x 1440 DPI">
+ <physicalResolution>2880 1440</physicalResolution>
+ <printerWeave command="\033(i\001\000\001"/>
+ <parameter type="float" name="escp2_density">0.775000</parameter>
+ <parameter type="integer" name="escp2_ink_type">5</parameter>
+ <parameter type="integer" name="escp2_base_res">2880</parameter>
+ <parameter type="integer" name="escp2_bits">1</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ <resolution translate="text" name="2880x2880mw" text="2880 x 2880 DPI">
+ <physicalResolution>2880 2880</physicalResolution>
+ <printerWeave command="\033(i\001\000\001"/>
+ <parameter type="float" name="escp2_density">0.388000</parameter>
+ <parameter type="integer" name="escp2_ink_type">5</parameter>
+ <parameter type="integer" name="escp2_base_res">2880</parameter>
+ <parameter type="integer" name="escp2_bits">1</parameter>
+ <parameter type="float" name="DropSize1">1.000000</parameter>
+ </resolution>
+ </resolutions>
+</escp2Model>
+</gutenprint>
diff --git a/src/xml/printers.xml b/src/xml/printers.xml
index 6a8a773..3c8822a 100644
--- a/src/xml/printers.xml
+++ b/src/xml/printers.xml
@@ -1540,6 +1540,15 @@
<printer translate="name" name="Epson L310" driver="escp2-l310" manufacturer="Epson" model="129" parameters="cx3500_params" />
<printer translate="name" name="Epson L1300" driver="escp2-l1300" manufacturer="Epson" model="99" parameters="standard_params" />
<printer translate="name" name="Epson L1800" driver="escp2-l1800" manufacturer="Epson" model="122" parameters="cx3500_params" />
+ <printer translate="name" name="Epson SC-P400 Series" driver="escp2-p400-s" manufacturer="Epson" model="91" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SC-P600 Series" driver="escp2-p600-s" manufacturer="Epson" model="115" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SC-P800 Series" driver="escp2-p800-s" manufacturer="Epson" model="130" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SC-P6000 Series" driver="escp2-p6000-s" manufacturer="Epson" model="89" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SC-P7000 Series" driver="escp2-p7000-s" manufacturer="Epson" model="124" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SC-P8000 Series" driver="escp2-p8000-s" manufacturer="Epson" model="90" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SC-P9000 Series" driver="escp2-p9000-s" manufacturer="Epson" model="125" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SC-P10000 Series" driver="escp2-p10000-s" manufacturer="Epson" model="90" parameters="standard_params">EXPERIMENTAL; only three levels of gray supported</printer>
+ <printer translate="name" name="Epson SC-P20000 Series" driver="escp2-p20000-s" manufacturer="Epson" model="88" parameters="standard_params">EXPERIMENTAL; only three levels of gray supported</printer>
<printer translate="name" name="Epson Stylus C20" deviceid="MFG:EPSON;MDL:Stylus C20;DES:EPSON Stylus C20;CMD:ESCPL2,BDC,D4;" driver="escp2-c20" manufacturer="Epson" model="42" parameters="480_params" />
<printer translate="name" name="Epson Stylus C20SX" driver="escp2-c20sx" manufacturer="Epson" model="42" parameters="480_params" />
<printer translate="name" name="Epson Stylus C20UX" deviceid="MFG:EPSON;MDL:Stylus C20;DES:EPSON Stylus C20;CMD:ESCPL2,BDC,D4;" driver="escp2-c20ux" manufacturer="Epson" model="42" parameters="480_params" />
@@ -1734,6 +1743,7 @@
<printer translate="name" name="Epson Stylus Pro 4800/4880 Back Compatible" driver="escp2-4600" manufacturer="Epson" model="112" parameters="standard_params" />
<printer translate="name" name="Epson Stylus Pro 4800" driver="escp2-4800" manufacturer="Epson" model="106" parameters="standard_params" />
<printer translate="name" name="Epson Stylus Pro 4880" driver="escp2-4880" manufacturer="Epson" model="102" parameters="standard_params" />
+ <printer translate="name" name="Epson Stylus Pro 4900" driver="escp2-4900" manufacturer="Epson" model="131" parameters="standard_params" />
<printer translate="name" name="Epson Stylus Pro 5000" driver="escp2-5000" manufacturer="Epson" model="27" parameters="standard_params" />
<printer translate="name" name="Epson Stylus Pro 5500" driver="escp2-5500" manufacturer="Epson" model="40" parameters="pro_5500_params" />
<printer translate="name" name="Epson Stylus Pro 7000" driver="escp2-7000" manufacturer="Epson" model="28" parameters="standard_params" />
@@ -1914,7 +1924,7 @@
<printer translate="name" name="Epson Stylus XP100" driver="escp2-xp100" manufacturer="Epson" model="123" parameters="standard_params">EXPERIMENTAL</printer>
<printer translate="name" name="Epson SureColor P400" driver="escp2-p400" manufacturer="Epson" model="91" parameters="standard_params">EXPERIMENTAL</printer>
<printer translate="name" name="Epson SureColor P600" driver="escp2-p600" manufacturer="Epson" model="115" parameters="standard_params">EXPERIMENTAL</printer>
- <printer translate="name" name="Epson SureColor P800" driver="escp2-p800" manufacturer="Epson" model="102" parameters="standard_params">EXPERIMENTAL</printer>
+ <printer translate="name" name="Epson SureColor P800" driver="escp2-p800" manufacturer="Epson" model="130" parameters="standard_params">EXPERIMENTAL</printer>
<printer translate="name" name="Epson SureColor P6000" driver="escp2-p6000" manufacturer="Epson" model="89" parameters="standard_params">EXPERIMENTAL</printer>
<printer translate="name" name="Epson SureColor P7000" driver="escp2-p7000" manufacturer="Epson" model="124" parameters="standard_params">EXPERIMENTAL</printer>
<printer translate="name" name="Epson SureColor P7000 Commercial Edition" driver="escp2-p7000c" manufacturer="Epson" model="126" parameters="standard_params">EXPERIMENTAL; violet ink not supported</printer>
@@ -2130,10 +2140,6 @@
<printer translate="name" name="Brother HL-1670N" driver="brother-hl-1670n" manufacturer="Brother" model="6" parameters="pcl_laser_params" />
<printer translate="name" name="Brother HL-1850" driver="brother-hl-1850" manufacturer="Brother" model="6" parameters="pcl_laser_params" />
<printer translate="name" name="Brother HL-1870N" driver="brother-hl-1870n" manufacturer="Brother" model="6" parameters="pcl_laser_params" />
- <!-- Brother HL-2030 series -->
- <printer translate="name" name="Brother HL-2030" deviceid="MFG:Brother;MDL:HL-2030 series;CMD:PJL,HBP;" driver="brother-hl-2030" manufacturer="Brother" model="6" parameters="pcl_laser_params" />
- <printer translate="name" name="Brother HL-2035" driver="brother-hl-2035" manufacturer="Brother" model="6" parameters="pcl_laser_params" />
- <!-- -->
<printer translate="name" name="Brother HL-2060" driver="brother-hl-2060" manufacturer="Brother" model="6" parameters="pcl_laser_params" />
<printer translate="name" name="Brother HL-2250DN" driver="brother-hl-2250dn" manufacturer="Brother" model="62" parameters="pcl_laser_params" />
<printer translate="name" name="Brother HL-2460" deviceid="MFG:Brother;MDL:Brother HL-2460 series;" driver="brother-hl-2460" manufacturer="Brother" model="6" parameters="pcl_laser_params" />
@@ -3129,87 +3135,87 @@
<printer translate="name" name="Canon SELPHY ES20" driver="canon-es20" manufacturer="Canon" model="1005" parameters="nativecopies" />
<printer translate="name" name="Canon SELPHY ES30" deviceid="MFG:Canon;CMD:Raster3;MDL:ES30;CLS:PRINTER;DES:Canon SELPHY ES30;VER:1.00;" driver="canon-es30" manufacturer="Canon" model="1006" parameters="nativecopies" />
<printer translate="name" name="Canon SELPHY ES40" deviceid="MFG:Canon;CMD:Raster3;MDL:ES40;CLS:PRINTER;DES:Canon SELPHY ES40;VER:1.00;" driver="canon-es40" manufacturer="Canon" model="1007" parameters="nativecopies" />
- <printer translate="name" name="Sony UP-DP10" driver="sony-updp10" manufacturer="Sony" model="2000" />
- <printer translate="name" name="Sony UP-DR150" deviceid="MFG:Sony;MDL:UP-DR150;DES:Sony UP-DR150;CMD:SONY-Original;CLS:PRINTER" driver="sony-updr150" manufacturer="Sony" model="2001" parameters="nativecopies" />
- <printer translate="name" name="Sony DPP-EX5" driver="sony-dppex5" manufacturer="Sony" model="2002" />
- <printer translate="name" name="Sony DPP-EX7" driver="sony-dppex7" manufacturer="Sony" model="2002" />
- <printer translate="name" name="Sony UP-DR100" driver="sony-updr100" manufacturer="Sony" model="2003" />
- <printer translate="name" name="Sony UP-DR200" driver="sony-updr200" manufacturer="Sony" model="2004" parameters="nativecopies" />
- <printer translate="name" name="Sony UP-CR10L" driver="sony-upcr10l" manufacturer="Sony" model="2005" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="CIAAT Brava 21" deviceid="MFG:CIAAT;CMD:SUPCC;MDL:BRAVA21;CLS:PRINTER;DES:Thermal Dye Photo Printer;" driver="ciaat-brava-21" manufacturer="CIAAT" model="5005" parameters="nativecopies" />
+ <printer translate="name" name="Citizen CX" driver="citizen-cx" deviceid="MANUFACTURER:CITIZEN SYSTEMS ;MODEL:CX;" manufacturer="Citizen" model="6000" parameters="nativecopies" />
+ <printer translate="name" name="Citizen CX-W" driver="citizen-cx-w" manufacturer="Citizen" model="6001" parameters="nativecopies" />
+ <printer translate="name" name="Citizen CY" driver="citizen-cy" manufacturer="Citizen" model="6002" parameters="nativecopies" />
+ <printer translate="name" name="Citizen CW-01" driver="citizen-cw-01" manufacturer="Citizen" model="6005" parameters="nativecopies" />
+ <printer translate="name" name="Citizen OP900" driver="citizen-op900" manufacturer="Citizen" model="6005" parameters="nativecopies" />
+ <printer translate="name" name="Citizen CW-02" driver="citizen-cw-02" manufacturer="Citizen" model="6000" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Citizen OP900II" driver="citizen-op900ii" manufacturer="Citizen" model="6000" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Dai Nippon Printing DS40" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DS40;" driver="dnp-ds40" manufacturer="Dai Nippon Printing" model="6000" parameters="nativecopies" />
+ <printer translate="name" name="Dai Nippon Printing DS80" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DS80;" driver="dnp-ds80" manufacturer="Dai Nippon Printing" model="6001" parameters="nativecopies" />
+ <printer translate="name" name="Dai Nippon Printing DS80DX" driver="dnp-ds80dx" manufacturer="Dai Nippon Printing" model="6006" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Dai Nippon Printing DS620" driver="dnp-ds620" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DP-DS620;" manufacturer="Dai Nippon Printing" model="6003" parameters="nativecopies" />
+ <printer translate="name" name="Dai Nippon Printing DS820" driver="dnp-ds820" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DP-DS820;" manufacturer="Dai Nippon Printing" model="6007" parameters="nativecopies" />
+ <printer translate="name" name="Dai Nippon Printing DSRX1" driver="dnp-dsrx1" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DS-RX1;" manufacturer="Dai Nippon Printing" model="6002" parameters="nativecopies" />
<printer translate="name" name="Dai Nippon Printing SL10" driver="dnp-sl10" manufacturer="Dai Nippon Printing" model="2005" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Fujifilm ASK-300" driver="fujifilm-ask-300" manufacturer="Fujifilm" model="4112" parameters="nativecopies" />
+ <printer translate="name" name="Fujifilm FinePix-NX-500" driver="fujifilm-nx500" manufacturer="Fujifilm" model="3002" />
<printer translate="name" name="Fujifilm Printpix-CX-400" driver="fujifilm-cx400" manufacturer="Fujifilm" model="3000" />
<printer translate="name" name="Fujifilm Printpix-CX-550" driver="fujifilm-cx550" manufacturer="Fujifilm" model="3001" />
- <printer translate="name" name="Fujifilm FinePix-NX-500" driver="fujifilm-nx500" manufacturer="Fujifilm" model="3002" />
- <printer translate="name" name="Kodak Easyshare-Printer-Dock" driver="kodak-dock" manufacturer="Kodak" model="4000" />
+ <printer translate="name" name="Kodak 305" deviceid="MFG:KODAK;CMD:KODAK305;MDL:305 Photo Printer;CLS:PRINTER;DES:KODAK 305 Photo Printer" driver="kodak-305" manufacturer="Kodak" model="4108" parameters="nativecopies" />
+ <printer translate="name" name="Kodak 605" deviceid="MFG:Eastman Kodak Company;CMD:SUPCC;MCL:KODAK 605 Photo Printer;CLS:PRINTER;DES:Thermal Dye Photo Printer;" driver="kodak-605" manufacturer="Kodak" model="4003" parameters="nativecopies" />
+ <printer translate="name" name="Kodak 1400" deviceid="MFG:Eastman Kodak Company;CMD:EK1;MDL: 1400 Printer;CLS:Printer;DES:Kodak 1400 Printer;`" driver="kodak-1400" manufacturer="Kodak" model="4004" parameters="nativecopies" />
+ <printer translate="name" name="Kodak 6800" deviceid="MFG:Eastman Kodak Company;CMD:ESC;MDL:Photo Printer 6800;CLS:PRINTER;DES:KODAK Photo Printer 6800;" driver="kodak-6800" manufacturer="Kodak" model="4001" parameters="nativecopies" />
+ <printer translate="name" name="Kodak 6850" deviceid="MFG:Eastman Kodak Company;CMD:ESC;MDL:Photo Printer 6850;CLS:PRINTER;DES:KODAK Photo Printer 6850;" driver="kodak-6850" manufacturer="Kodak" model="4002" parameters="nativecopies" />
+ <printer translate="name" name="Kodak 7000" driver="kodak-7000" manufacturer="Kodak" model="4008" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Kodak 7010" driver="kodak-7010" manufacturer="Kodak" model="4008" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Kodak 7015" driver="kodak-7015" manufacturer="Kodak" model="4009" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Kodak 805" deviceid="MFG:Eastman Kodak Company;CMD:EK2;MDL: KODAK 805 Photo Printer;CLS:Printer;DES:Kodak 805 Photo Printer;" driver="kodak-805" manufacturer="Kodak" model="4005" parameters="nativecopies" />
+ <printer translate="name" name="Kodak 8500" driver="kodak-8500" manufacturer="Kodak" model="4100" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Kodak 8800" driver="kodak-8800" manufacturer="Kodak" model="4006" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Kodak 8810" driver="kodak-8810" manufacturer="Kodak" model="4007" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Kodak 9810" driver="kodak-9810" manufacturer="Kodak" model="4006" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Kodak EasyShare-G600-Printer-Dock" driver="kodak-g600-dock" manufacturer="Kodak" model="4000" />
+ <printer translate="name" name="Kodak Easyshare-Printer-Dock" driver="kodak-dock" manufacturer="Kodak" model="4000" />
<printer translate="name" name="Kodak PD-4000" driver="kodak-pd-4000" manufacturer="Kodak" model="4000" />
<printer translate="name" name="Kodak PD-6000" driver="kodak-pd-6000" manufacturer="Kodak" model="4000" />
<printer translate="name" name="Kodak Photo-Printer" driver="kodak-photo-printer" manufacturer="Kodak" model="4000" />
<printer translate="name" name="Kodak Photo-Printer-500" driver="kodak-photo-printer-500" manufacturer="Kodak" model="4000" />
<printer translate="name" name="Kodak Printer-Dock-Plus" driver="kodak-dock-plus" manufacturer="Kodak" model="4000" />
<printer translate="name" name="Kodak Printer-Dock-Plus-S3" driver="kodak-dock-plus-s3" manufacturer="Kodak" model="4000" />
- <printer translate="name" name="Kodak 6800" deviceid="MFG:Eastman Kodak Company;CMD:ESC;MDL:Photo Printer 6800;CLS:PRINTER;DES:KODAK Photo Printer 6800;" driver="kodak-6800" manufacturer="Kodak" model="4001" parameters="nativecopies" />
- <printer translate="name" name="Kodak 6850" deviceid="MFG:Eastman Kodak Company;CMD:ESC;MDL:Photo Printer 6850;CLS:PRINTER;DES:KODAK Photo Printer 6850;" driver="kodak-6850" manufacturer="Kodak" model="4002" parameters="nativecopies" />
- <printer translate="name" name="Kodak 605" deviceid="MFG:Eastman Kodak Company;CMD:SUPCC;MCL:KODAK 605 Photo Printer;CLS:PRINTER;DES:Thermal Dye Photo Printer;" driver="kodak-605" manufacturer="Kodak" model="4003" parameters="nativecopies" />
- <printer translate="name" name="Kodak 1400" deviceid="MFG:Eastman Kodak Company;CMD:EK1;MDL: 1400 Printer;CLS:Printer;DES:Kodak 1400 Printer;`" driver="kodak-1400" manufacturer="Kodak" model="4004" parameters="nativecopies" />
- <printer translate="name" name="Kodak 805" deviceid="MFG:Eastman Kodak Company;CMD:EK2;MDL: KODAK 805 Photo Printer;CLS:Printer;DES:Kodak 805 Photo Printer;" driver="kodak-805" manufacturer="Kodak" model="4005" parameters="nativecopies" />
- <printer translate="name" name="Kodak 8500" driver="kodak-8500" manufacturer="Kodak" model="4100" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Kodak 9810" driver="kodak-9810" manufacturer="Kodak" model="4006" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Kodak 8800" driver="kodak-8800" manufacturer="Kodak" model="4006" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Kodak 8810" driver="kodak-8810" manufacturer="Kodak" model="4007" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Kodak 7000" driver="kodak-7000" manufacturer="Kodak" model="4008" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Kodak 7010" driver="kodak-7010" manufacturer="Kodak" model="4008" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Kodak 7015" driver="kodak-7015" manufacturer="Kodak" model="4009" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Mitsubishi CP-3020D" driver="mitsubishi-3020d" manufacturer="Mitsubishi" model="4101" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Mitsubishi CP-3020DU" driver="mitsubishi-3020du" manufacturer="Mitsubishi" model="4101" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Mitsubishi CP-3020DE" driver="mitsubishi-3020de" manufacturer="Mitsubishi" model="4101" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Mitsubishi CP-3020DA" driver="mitsubishi-3020da" manufacturer="Mitsubishi" model="4102" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Mitsubishi CP-3020DAE" driver="mitsubishi-3020dae" manufacturer="Mitsubishi" model="4102" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Mitsubishi CP-3020DE" driver="mitsubishi-3020de" manufacturer="Mitsubishi" model="4101" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Mitsubishi CP-3020DU" driver="mitsubishi-3020du" manufacturer="Mitsubishi" model="4101" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Mitsubishi CP-3800DW" driver="mitsubishi-cp-3800dw" manufacturer="Mitsubishi" model="6001" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi CP-9500DW" driver="mitsubishi-9500dw" manufacturer="Mitsubishi" model="4115" parameters="nativecopies" />
<printer translate="name" name="Mitsubishi CP-9550D" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CP9550D ;CLS:PRINTER;DES:MITSUBISHI CP9550D" driver="mitsubishi-9550d" manufacturer="Mitsubishi" model="4103" parameters="nativecopies" />
<printer translate="name" name="Mitsubishi CP-9550DW" driver="mitsubishi-9550dw" manufacturer="Mitsubishi" model="4103" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi CP-9550DW-S" driver="mitsubishi-9550dw-s" manufacturer="Mitsubishi" model="4111" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi CP-9550DZ" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CP9550DZ;CLS:PRINTER;DES:MITSUBISHI CP9550DZ;" driver="mitsubishi-9550dz" manufacturer="Mitsubishi" model="4111" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi CP-9600DW" driver="mitsubishi-9600dw" manufacturer="Mitsubishi" model="4110" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi CP-9800D" driver="mitsubishi-9800d" manufacturer="Mitsubishi" model="4113" >EXPERIMENTAL</printer>
+ <printer translate="name" name="Mitsubishi CP-9800DW" driver="mitsubishi-9800dw" manufacturer="Mitsubishi" model="4113" >EXPERIMENTAL</printer>
+ <printer translate="name" name="Mitsubishi CP-9800DW-S" driver="mitsubishi-9800dw-s" manufacturer="Mitsubishi" model="4113" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi CP-9800DZ" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CP9800DZ;CLS:PRINTER;DES:MITSUBISHI CP9800DZ;" driver="mitsubishi-9800dz" manufacturer="Mitsubishi" model="4113" parameters="nativecopies" />
<printer translate="name" name="Mitsubishi CP-9810D" driver="mitsubishi-9810d" manufacturer="Mitsubishi" model="4104" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Mitsubishi CP-9810DW" driver="mitsubishi-9810dw" manufacturer="Mitsubishi" model="4104" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Mitsubishi CP-D80DW" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CPD80D;CLS:PRINTER;DES:MITSUBISHI_CPD80D" driver="mitsubishi-d80dw" manufacturer="Mitsubishi" model="4107" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi CP-D90DW" driver="mitsubishi-d90dw" manufacturer="Mitsubishi" model="4109" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Mitsubishi CP-D70DW" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CP60D70D707D;CLS:PRINTER;DES:MITSUBISHI CP60D70D707D" driver="mitsubishi-d70dw" manufacturer="Mitsubishi" model="4105" parameters="nativecopies" />
<printer translate="name" name="Mitsubishi CP-D707DW" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CP60D70D707D;CLS:PRINTER;DES:MITSUBISHI CP60D70D707D" driver="mitsubishi-d707dw" manufacturer="Mitsubishi" model="4105" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Mitsubishi CP-K60DW-S" driver="mitsubishi-k60dw" manufacturer="Mitsubishi" model="4106" parameters="nativecopies" />
- <printer translate="name" name="Mitsubishi CP-D80DW" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CPD80D;CLS:PRINTER;DES:MITSUBISHI_CPD80D" driver="mitsubishi-d80dw" manufacturer="Mitsubishi" model="4107" parameters="nativecopies" />
- <printer translate="name" name="Kodak 305" deviceid="MFG:KODAK;CMD:KODAK305;MDL:305 Photo Printer;CLS:PRINTER;DES:KODAK 305 Photo Printer" driver="kodak-305" manufacturer="Kodak" model="4108" parameters="nativecopies" />
- <printer translate="name" name="Mitsubishi CP-D90DW" driver="mitsubishi-d90dw" manufacturer="Mitsubishi" model="4109" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Mitsubishi CP-9600DW" driver="mitsubishi-9600dw" manufacturer="Mitsubishi" model="4110" parameters="nativecopies" />
- <printer translate="name" name="Mitsubishi CP-9550DZ" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CP9550DZ;CLS:PRINTER;DES:MITSUBISHI CP9550DZ;" driver="mitsubishi-9550dz" manufacturer="Mitsubishi" model="4111" parameters="nativecopies" />
- <printer translate="name" name="Mitsubishi CP-9550DW-S" driver="mitsubishi-9550dw-s" manufacturer="Mitsubishi" model="4111" parameters="nativecopies" />
- <printer translate="name" name="Fujifilm ASK-300" driver="fujifilm-ask-300" manufacturer="Fujifilm" model="4112" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Mitsubishi CP-9800D" driver="mitsubishi-9800d" manufacturer="Mitsubishi" model="4113" >EXPERIMENTAL</printer>
- <printer translate="name" name="Mitsubishi CP-9800DW" driver="mitsubishi-9800dw" manufacturer="Mitsubishi" model="4113" >EXPERIMENTAL</printer>
- <printer translate="name" name="Mitsubishi CP-9800DZ" deviceid="MFG:MITSUBISHI;CMD:MEL;MDL:CP9800DZ;CLS:PRINTER;DES:MITSUBISHI CP9800DZ;" driver="mitsubishi-9800dz" manufacturer="Mitsubishi" model="4113" parameters="nativecopies" />
- <printer translate="name" name="Mitsubishi CP-9800DW-S" driver="mitsubishi-9800dw-s" manufacturer="Mitsubishi" model="4113" parameters="nativecopies" />
- <printer translate="name" name="Mitsubishi P95D" driverid="MFG:MITSUBISHI;CMD:MEL;MDL:P95D ;CLS:PRINTER;DES:MITSUBISHI P95D ;" driver="mitsubishi-p95d" manufacturer="Mitsubishi" model="4114" parameters="nativecopies" />
- <printer translate="name" name="Mitsubishi CP-9500DW" driver="mitsubishi-9500dw" manufacturer="Mitsubishi" model="4115" parameters="nativecopies" />
<printer translate="name" name="Mitsubishi P93D" driverid="MFG:MITSUBISHI;CMD:MEL;MDL:P93D;CLS:PRINTER;DES:MITSUBISHI P93D;" driver="mitsubishi-p93d" manufacturer="Mitsubishi" model="4116" parameters="nativecopies" />
- <printer translate="name" name="Shinko CHC-S9045" driver="shinko-chcs9045" manufacturer="Shinko" model="5000" />
- <printer translate="name" name="Shinko CHC-S2145" deviceid="MFG:SHINKO;CMD:SUPCC;MDL:CHC-S2145;CLS:PRINTER;DES:SHINKO CHC-S2145;" driver="shinko-chcs2145" manufacturer="Shinko" model="5001" parameters="nativecopies" />
- <printer translate="name" name="Sinfonia S2145/S2" driver="sinfonia-chcs2145" manufacturer="Sinfonia" model="5001" parameters="nativecopies" />
+ <printer translate="name" name="Mitsubishi P95D" driverid="MFG:MITSUBISHI;CMD:MEL;MDL:P95D ;CLS:PRINTER;DES:MITSUBISHI P95D ;" driver="mitsubishi-p95d" manufacturer="Mitsubishi" model="4114" parameters="nativecopies" />
<printer translate="name" name="Shinko CHC-S1245" driver="shinko-chcs1245" manufacturer="Shinko" model="5002" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Sinfonia CHC-S1245/E1" driver="sinfonia-chcs1245" manufacturer="Sinfonia" model="5002" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Shinko CHC-S6245" driver="shinko-chcs6245" manufacturer="Shinko" model="5003" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Sinfonia CHC-S6245/CE1" driver="sinfonia-chcs6245" manufacturer="Sinfonia" model="5003" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Shinko CHC-S2145" deviceid="MFG:SHINKO;CMD:SUPCC;MDL:CHC-S2145;CLS:PRINTER;DES:SHINKO CHC-S2145;" driver="shinko-chcs2145" manufacturer="Shinko" model="5001" parameters="nativecopies" />
<printer translate="name" name="Shinko CHC-S6145" driver="shinko-chcs6145" manufacturer="Shinko" model="5004" parameters="nativecopies" />
+ <printer translate="name" name="Shinko CHC-S6245" driver="shinko-chcs6245" manufacturer="Shinko" model="5003" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Shinko CHC-S9045" driver="shinko-chcs9045" manufacturer="Shinko" model="5000" />
+ <printer translate="name" name="Sinfonia CHC-S1245/E1" driver="sinfonia-chcs1245" manufacturer="Sinfonia" model="5002" parameters="nativecopies">EXPERIMENTAL</printer>
<printer translate="name" name="Sinfonia CHC-S6145/CS2" deviceid="MFG:SINFONIA;CMD:SUPCC;MDL:CHC-S6145;CLS:PRINTER;DES:Thermal Dye Photo Printer;" driver="sinfonia-chcs6145" manufacturer="Sinfonia" model="5004" parameters="nativecopies" />
- <printer translate="name" name="CIAAT Brava 21" deviceid="MFG:CIAAT;CMD:SUPCC;MDL:BRAVA21;CLS:PRINTER;DES:Thermal Dye Photo Printer;" driver="ciaat-brava-21" manufacturer="CIAAT" model="5005" parameters="nativecopies" />
- <printer translate="name" name="Dai Nippon Printing DS40" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DS40;" driver="dnp-ds40" manufacturer="Dai Nippon Printing" model="6000" parameters="nativecopies" />
- <printer translate="name" name="Dai Nippon Printing DS80" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DS80;" driver="dnp-ds80" manufacturer="Dai Nippon Printing" model="6001" parameters="nativecopies" />
- <printer translate="name" name="Dai Nippon Printing DSRX1" driver="dnp-dsrx1" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DS-RX1;" manufacturer="Dai Nippon Printing" model="6002" parameters="nativecopies" />
- <printer translate="name" name="Dai Nippon Printing DS620" driver="dnp-ds620" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DP-DS620;" manufacturer="Dai Nippon Printing" model="6003" parameters="nativecopies" />
- <printer translate="name" name="Citizen CX" driver="citizen-cx" deviceid="MANUFACTURER:CITIZEN SYSTEMS ;MODEL:CX;" manufacturer="Citizen" model="6000" parameters="nativecopies" />
- <printer translate="name" name="Citizen CX-W" driver="citizen-cx-w" manufacturer="Citizen" model="6001" parameters="nativecopies" />
- <printer translate="name" name="Citizen CY" driver="citizen-cy" manufacturer="Citizen" model="6002" parameters="nativecopies" />
- <printer translate="name" name="Citizen CW-01" driver="citizen-cw-01" manufacturer="Citizen" model="6005" parameters="nativecopies" />
- <printer translate="name" name="Citizen OP900" driver="citizen-op900" manufacturer="Citizen" model="6005" parameters="nativecopies" />
- <printer translate="name" name="Citizen CW-02" driver="citizen-cw-02" manufacturer="Citizen" model="6000" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Citizen OP900II" driver="citizen-op900ii" manufacturer="Citizen" model="6000" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Mitsubishi CP-3800DW" driver="mitsubishi-cp-3800dw" manufacturer="Mitsubishi" model="6001" parameters="nativecopies" />
- <printer translate="name" name="Dai Nippon Printing DS80DX" driver="dnp-ds80dx" manufacturer="Dai Nippon Printing" model="6006" parameters="nativecopies">EXPERIMENTAL</printer>
- <printer translate="name" name="Dai Nippon Printing DS820" driver="dnp-ds820" deviceid="MANUFACTURER:Dai Nippon Printing ;MODEL:DP-DS820;" manufacturer="Dai Nippon Printing" model="6007" parameters="nativecopies" />
+ <printer translate="name" name="Sinfonia CHC-S6245/CE1" driver="sinfonia-chcs6245" manufacturer="Sinfonia" model="5003" parameters="nativecopies">EXPERIMENTAL</printer>
+ <printer translate="name" name="Sinfonia S2145/S2" driver="sinfonia-chcs2145" manufacturer="Sinfonia" model="5001" parameters="nativecopies" />
+ <printer translate="name" name="Sony UP-DP10" driver="sony-updp10" manufacturer="Sony" model="2000" />
+ <printer translate="name" name="Sony UP-DR150" deviceid="MFG:Sony;MDL:UP-DR150;DES:Sony UP-DR150;CMD:SONY-Original;CLS:PRINTER" driver="sony-updr150" manufacturer="Sony" model="2001" parameters="nativecopies" />
+ <printer translate="name" name="Sony DPP-EX5" driver="sony-dppex5" manufacturer="Sony" model="2002" />
+ <printer translate="name" name="Sony DPP-EX7" driver="sony-dppex7" manufacturer="Sony" model="2002" />
+ <printer translate="name" name="Sony UP-DR100" driver="sony-updr100" manufacturer="Sony" model="2003" />
+ <printer translate="name" name="Sony UP-DR200" driver="sony-updr200" manufacturer="Sony" model="2004" parameters="nativecopies" />
+ <printer translate="name" name="Sony UP-CR10L" driver="sony-upcr10l" manufacturer="Sony" model="2005" parameters="nativecopies">EXPERIMENTAL</printer>
</family>
<family name="raw">
<printer translate="name" name="RAW DATA 16 bit" driver="raw-data-16" manufacturer="" model="0" />