summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2009-08-02 12:01:21 +0100
committerRoger Leigh <rleigh@debian.org>2009-08-02 12:01:21 +0100
commit0f09a5be038c93c1bd5ca2988e152345bbf74c00 (patch)
tree279995ae9eece33b9b05cd82993f4fce98356fe8 /test
parenta68ece422e0be1a0101dae2fa2408ef0e533c2e9 (diff)
Imported Upstream version 5.2.4
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.in33
-rwxr-xr-xtest/parse-escp24
-rwxr-xr-xtest/run-weavetest2
-rw-r--r--test/unprint.c45
4 files changed, 55 insertions, 29 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index 8e1e65e..6ff1406 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -50,11 +50,14 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/m4/stp.m4 $(top_srcdir)/m4/stp_cups.m4 \
- $(top_srcdir)/m4/stp_gimp.m4 $(top_srcdir)/m4/stp_option.m4 \
- $(top_srcdir)/m4/stp_release.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/stp.m4 \
+ $(top_srcdir)/m4/stp_cups.m4 $(top_srcdir)/m4/stp_gimp.m4 \
+ $(top_srcdir)/m4/stp_option.m4 $(top_srcdir)/m4/stp_release.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@@ -127,10 +130,6 @@ CUPS_CFLAGS = @CUPS_CFLAGS@
CUPS_CONFIG = @CUPS_CONFIG@
CUPS_LIBS = @CUPS_LIBS@
CUPS_PPD_PS_LEVEL = @CUPS_PPD_PS_LEVEL@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DB2HTML = @DB2HTML@
DB2PDF = @DB2PDF@
@@ -140,16 +139,15 @@ DEPDIR = @DEPDIR@
DIALOG = @DIALOG@
DOXYGEN = @DOXYGEN@
DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
DVIPDF = @DVIPDF@
DVIPS = @DVIPS@
-ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
FIND = @FIND@
FOOMATIC_CONFIGURE = @FOOMATIC_CONFIGURE@
FOOMATIC_KITLOAD = @FOOMATIC_KITLOAD@
@@ -194,6 +192,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
@@ -205,6 +204,7 @@ LIBREADLINE_DEPS = @LIBREADLINE_DEPS@
LIBS = $(INTLLIBS) @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
LN_S = @LN_S@
LTALLOCA = @LTALLOCA@
LTLIBICONV = @LTLIBICONV@
@@ -217,8 +217,12 @@ MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NM = @NM@
NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -252,8 +256,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -298,6 +301,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -310,6 +314,7 @@ sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS) $(GNUCFLAGS)
diff --git a/test/parse-escp2 b/test/parse-escp2
index 4664955..30839fa 100755
--- a/test/parse-escp2
+++ b/test/parse-escp2
@@ -556,7 +556,9 @@ while (! $atend) {
$horizontal_position / $horizontal_unit);
}
} elsif ($xchar eq "d") {
- printf " (nop)";
+ if ($opt_v) {
+ printf " (nop)";
+ }
}
}
$found = 1;
diff --git a/test/run-weavetest b/test/run-weavetest
index f1375d8..2444c66 100755
--- a/test/run-weavetest
+++ b/test/run-weavetest
@@ -18,7 +18,7 @@ if [ -z "$STP_MODULE_PATH" ] ; then
export STP_MODULE_PATH
fi
-passes='1,1,1 2,1,1 1,2,1 1,2,2 1,4,1 4,1,1 4,2,1 2,2,1 1,4,2 2,2,2 2,4,2 8,1,1 4,4,2 8,2,1 16,1,1'
+passes='1,1,1 2,1,1 1,2,1 1,2,2 1,4,1 4,1,1 1,8,1 1,16,1 4,2,1 4,4,1 4,8,1 4,16,1 2,2,1 2,4,1 2,8,1 2,16,1 1,4,2 1,8,2 1,16,2 2,2,2 2,4,2 2,8,2 2,16,2 8,1,1 4,4,2 4,8,2 8,2,1 8,4,1 8,8,1 16,1,1 16,2,1 16,4,1'
# All numbers of jets used by any printer.
jets='1 2 4 8 15 16 20 21 24 29 32 47 48 59 60 64 90 96 128 144 180 192 208 358 360 384'
diff --git a/test/unprint.c b/test/unprint.c
index cef064b..2fa8789 100644
--- a/test/unprint.c
+++ b/test/unprint.c
@@ -1,4 +1,4 @@
-/* $Id: unprint.c,v 1.42 2008/07/18 02:03:48 rlk Exp $ */
+/* $Id: unprint.c,v 1.44 2009/03/07 19:38:00 rlk Exp $ */
/*
* Generate PPM files from printer output
*
@@ -36,6 +36,12 @@
#define inline __inline__
#endif
+typedef enum {
+ QT_NONE,
+ QT_QUAD,
+ QT_MIS
+} quadtone_t;
+
/*
* Printer state variable.
*/
@@ -65,7 +71,7 @@ typedef struct {
int right_edge;
int top_edge;
int bottom_edge;
- int quadtone;
+ quadtone_t quadtone;
} pstate_t;
/* We'd need about a gigabyte of ram to hold a ppm file of an 8.5 x 11
@@ -132,7 +138,7 @@ line_type **page=NULL;
*/
/* convert either Epson1 or Epson2 color encoding into a sequential encoding */
-static inline int
+static int
seqcolor(int c)
{
switch (c)
@@ -289,7 +295,7 @@ static float ink_colors[MAX_INKS][4] =
{ .1, 1, 1, 1 }, /* 2 C */
{ 1, 1, .1, 1 }, /* 3 Y */
{ 1, .7, 1, 1 }, /* 4 m */
- { .4, 1, 1, 1 }, /* 5 c */
+ { .7, 1, 1, 1 }, /* 5 c */
{ .7, .7, .7, 1 }, /* 6 k */
{ .7, .7, 0, 1 }, /* 7 dY */
{ 1, 0, 0, 1 }, /* 8 R */
@@ -306,12 +312,14 @@ static float ink_colors[MAX_INKS][4] =
{ 1, 1, .1, 1 }, /* 19 Y */
};
-static float quadtone_inks[] = { 0.0, .25, .5, .75 };
+static float quadtone_inks[] = { 0.0, .5, .25, .75, .9, .8 };
+
+static float mis_quadtone_inks[] = { 0.0, .25, .75, .5, .55, .85 };
static float bpp_shift[] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 };
static inline void
-mix_ink(ppmpixel p, int color, unsigned int amount, float *ink, int quadtone)
+mix_ink(ppmpixel p, int color, unsigned int amount, float *ink, quadtone_t quadtone)
{
/* this is pretty crude */
@@ -321,12 +329,20 @@ mix_ink(ppmpixel p, int color, unsigned int amount, float *ink, int quadtone)
float size;
size = (float) amount / bpp_shift[pstate.bpp];
- if (quadtone)
- for (i = 0; i < 3; i++)
- p[i] *= (1 - size) + size * quadtone_inks[color];
- else
- for (i = 0; i < 3; i++)
- p[i] *= (1 - size) + size * ink[i];
+ switch (quadtone)
+ {
+ case QT_QUAD:
+ for (i = 0; i < 3; i++)
+ p[i] *= (1 - size) + size * quadtone_inks[color];
+ break;
+ case QT_MIS:
+ for (i = 0; i < 3; i++)
+ p[i] *= (1 - size) + size * mis_quadtone_inks[color];
+ break;
+ default:
+ for (i = 0; i < 3; i++)
+ p[i] *= (1 - size) + size * ink[i];
+ }
}
}
@@ -1672,7 +1688,10 @@ main(int argc,char *argv[])
no_output = 1;
break;
case 'Q':
- pstate.quadtone = 1;
+ pstate.quadtone = QT_QUAD;
+ break;
+ case 'M':
+ pstate.quadtone = QT_MIS;
break;
case 'u':
unweave = 1;