summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipsk/ChangeLog15
-rw-r--r--Build/source/texk/dvipsk/Makefile.am13
-rw-r--r--Build/source/texk/dvipsk/Makefile.in43
-rw-r--r--Build/source/texk/dvipsk/drawPS.c4
-rwxr-xr-xBuild/source/texk/dvipsk/eepic-nan.test9
-rw-r--r--Build/source/texk/dvipsk/testdata/alt-rule.pro17
-rw-r--r--Build/source/texk/dvipsk/testdata/config.pdf43
-rw-r--r--Build/source/texk/dvipsk/testdata/eepic-nan.dvibin0 -> 304 bytes
-rw-r--r--Build/source/texk/dvipsk/testdata/eepic-nan.tex15
-rw-r--r--Build/source/texk/dvipsk/testdata/tex.pro45
10 files changed, 181 insertions, 23 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog
index c64c7e908a8..f7f1d7c7b31 100644
--- a/Build/source/texk/dvipsk/ChangeLog
+++ b/Build/source/texk/dvipsk/ChangeLog
@@ -1,3 +1,18 @@
+2011-02-25 Karl Berry <karl@tug.org>
+
+ * drawPS.c (flushDashedPath): cast to double before squaring,
+ to avoid integer overflow. (I guess this was hidden before by the
+ assignment cast to float? Said to work in 2009, failed in 2010.)
+ * eepic-nan.test,
+ * testdata/eepic-nan.tex,
+ * testdata/eepic-nan.dvi,
+ * testdata/config.pdf,
+ * testdata/alt-rule.pro,
+ * testdata/tex.pro: new files to test. Report from Stefan Moser
+ to mactex-support, 20 Oct 2010 02:37:45.
+ * Makefile.am (tests): add eepic-nan,
+ (EXTRA_DIST): add new files.
+
2011-02-14 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* output.c: print R2 mode message only when secure == 2.
diff --git a/Build/source/texk/dvipsk/Makefile.am b/Build/source/texk/dvipsk/Makefile.am
index c4fb666d7ba..68de421793e 100644
--- a/Build/source/texk/dvipsk/Makefile.am
+++ b/Build/source/texk/dvipsk/Makefile.am
@@ -111,10 +111,13 @@ CLEANFILES = $(prologues) texc.lpro
## dvips tests
TESTS = afm2tfm-test.pl
-TESTS += beginfontk1.test dvips.test pfbincl.test quotecmd-test.pl
+TESTS += beginfontk1.test dvips.test eepic-nan.test \
+ pfbincl.test quotecmd-test.pl
-TESTS_ENVIRONMENT = TEXMFCNF=$(srcdir)/../kpathsea TEXCONFIG=$(srcdir)/testdata
+TESTS_ENVIRONMENT = TEXMFCNF=$(srcdir)/../kpathsea
+TESTS_ENVIRONMENT += TEXCONFIG=$(srcdir)/testdata
TESTS_ENVIRONMENT += TEXFONTS=$(srcdir)/testdata
+TESTS_ENVIRONMENT += TEXFONTMAPS=$(srcdir)/testdata
TESTS_ENVIRONMENT += TEXPSHEADERS=$(srcdir)/testdata
EXTRA_DIST += \
@@ -123,10 +126,12 @@ EXTRA_DIST += \
afm2tfm-test.pl \
beginfontk1.test \
dvips.test \
+ eepic-nan.test \
pfbincl.test \
quotecmd-test.pl \
testdata/8r.enc \
testdata/ad.enc \
+ testdata/alt-rule.pro \
testdata/beginfontk1.dvi \
testdata/beginfontk1.eps \
testdata/beginfontk1.tex \
@@ -140,10 +145,13 @@ EXTRA_DIST += \
testdata/cmsy10.tfm \
testdata/cmtt10.pfb \
testdata/cmtt10.tfm \
+ testdata/config.pdf \
testdata/config.ps \
testdata/dvipstst.tex \
testdata/dvipstst.xdv \
testdata/dvipstst.xps \
+ testdata/eepic-nan.dvi \
+ testdata/eepic-nan.tex \
testdata/intoverflow.dvi \
testdata/pfbincl.eps \
testdata/pfbincl.tex \
@@ -159,6 +167,7 @@ EXTRA_DIST += \
testdata/quotecmd.dvi \
testdata/quotecmd.tex \
testdata/special.pro \
+ testdata/tex.pro \
testdata/texc.pro \
testdata/texps.pro \
testdata/vfnameoverflow.dvi
diff --git a/Build/source/texk/dvipsk/Makefile.in b/Build/source/texk/dvipsk/Makefile.in
index 7f66c38d45e..ff31a6217ae 100644
--- a/Build/source/texk/dvipsk/Makefile.in
+++ b/Build/source/texk/dvipsk/Makefile.in
@@ -383,34 +383,37 @@ prologdir = ${prefix}/texmf/dvips/base
prologues = $(dist_prologues:.lpro=.pro) texc.pro
SUFFIXES = .pro .lpro
EXTRA_DIST = $(dist_prologues) texc.script NEWS TODO afm2tfm-test.pl \
- beginfontk1.test dvips.test pfbincl.test quotecmd-test.pl \
- testdata/8r.enc testdata/ad.enc testdata/beginfontk1.dvi \
+ beginfontk1.test dvips.test eepic-nan.test pfbincl.test \
+ quotecmd-test.pl testdata/8r.enc testdata/ad.enc \
+ testdata/alt-rule.pro testdata/beginfontk1.dvi \
testdata/beginfontk1.eps testdata/beginfontk1.tex \
testdata/cmex10.pfb testdata/cmex10.tfm testdata/cmmi10.pfb \
testdata/cmmi10.tfm testdata/cmr10.pfb testdata/cmr10.tfm \
testdata/cmsy10.pfb testdata/cmsy10.tfm testdata/cmtt10.pfb \
- testdata/cmtt10.tfm testdata/config.ps testdata/dvipstst.tex \
- testdata/dvipstst.xdv testdata/dvipstst.xps \
- testdata/intoverflow.dvi testdata/pfbincl.eps \
- testdata/pfbincl.tex testdata/pfbincl.xdv testdata/pfbincl.xps \
- testdata/psfonts.map testdata/ptmbi.vf testdata/ptmbi8r.tfm \
- testdata/ptmr.vf testdata/ptmr8r.tfm testdata/ptmri.vf \
- testdata/ptmri8r.tfm testdata/quotecmd.dvi \
- testdata/quotecmd.tex testdata/special.pro testdata/texc.pro \
- testdata/texps.pro testdata/vfnameoverflow.dvi atari \
- cmfonts.map config.ps contrib/PSTricks contrib/afm-extra \
- contrib/colorsep.lpro contrib/configs contrib/crop.lpr \
- contrib/latex209 contrib/treen.sh contrib/treen2.sh \
- contrib/volker contrib/whichinpath cyrfonts.map eufonts.map \
- flib.c hps/CHANGES_HPS.txt hps/README_HPS.txt lafonts.map \
- makefont.c mvs psfonts.map tex vmcms vms
+ testdata/cmtt10.tfm testdata/config.pdf testdata/config.ps \
+ testdata/dvipstst.tex testdata/dvipstst.xdv \
+ testdata/dvipstst.xps testdata/eepic-nan.dvi \
+ testdata/eepic-nan.tex testdata/intoverflow.dvi \
+ testdata/pfbincl.eps testdata/pfbincl.tex testdata/pfbincl.xdv \
+ testdata/pfbincl.xps testdata/psfonts.map testdata/ptmbi.vf \
+ testdata/ptmbi8r.tfm testdata/ptmr.vf testdata/ptmr8r.tfm \
+ testdata/ptmri.vf testdata/ptmri8r.tfm testdata/quotecmd.dvi \
+ testdata/quotecmd.tex testdata/special.pro testdata/tex.pro \
+ testdata/texc.pro testdata/texps.pro \
+ testdata/vfnameoverflow.dvi atari cmfonts.map config.ps \
+ contrib/PSTricks contrib/afm-extra contrib/colorsep.lpro \
+ contrib/configs contrib/crop.lpr contrib/latex209 \
+ contrib/treen.sh contrib/treen2.sh contrib/volker \
+ contrib/whichinpath cyrfonts.map eufonts.map flib.c \
+ hps/CHANGES_HPS.txt hps/README_HPS.txt lafonts.map makefont.c \
+ mvs psfonts.map tex vmcms vms
CLEANFILES = $(prologues) texc.lpro dvipstst.ps missfont.log mtest.ps \
pfbincl.ps
-TESTS = afm2tfm-test.pl beginfontk1.test dvips.test pfbincl.test \
- quotecmd-test.pl
+TESTS = afm2tfm-test.pl beginfontk1.test dvips.test eepic-nan.test \
+ pfbincl.test quotecmd-test.pl
TESTS_ENVIRONMENT = TEXMFCNF=$(srcdir)/../kpathsea \
TEXCONFIG=$(srcdir)/testdata TEXFONTS=$(srcdir)/testdata \
- TEXPSHEADERS=$(srcdir)/testdata
+ TEXFONTMAPS=$(srcdir)/testdata TEXPSHEADERS=$(srcdir)/testdata
all: c-auto.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/Build/source/texk/dvipsk/drawPS.c b/Build/source/texk/dvipsk/drawPS.c
index 2151b2a2721..4044f113a71 100644
--- a/Build/source/texk/dvipsk/drawPS.c
+++ b/Build/source/texk/dvipsk/drawPS.c
@@ -287,7 +287,9 @@ flushDashedPath(int dotted, double inchesPerDash)
for (i=2; i <= pathLen; i++) {
integer dx = hconvPS(xx[i-1]) - hconvPS(xx[i]);
integer dy = vconvPS(yy[i-1]) - vconvPS(yy[i]);
- double delta = sqrt((double) (dx * dx + dy * dy));
+ /* Cast to double before multiplying; otherwise, can result in
+ integer overflow and thus a negative result (eepic-nan.test). */
+ double delta = sqrt((double) (dx) * dx + (double) dy * dy);
double ipd;
int ndashes;
diff --git a/Build/source/texk/dvipsk/eepic-nan.test b/Build/source/texk/dvipsk/eepic-nan.test
new file mode 100755
index 00000000000..c89044da5aa
--- /dev/null
+++ b/Build/source/texk/dvipsk/eepic-nan.test
@@ -0,0 +1,9 @@
+#! /bin/sh
+# ensure we don't get nan from eepic doc.
+# Report from Stefan Moser to mactex-support, 20 Oct 2010 02:37:45.
+
+tst=eepic-nan
+./dvips -Ppdf $srcdir/testdata/$tst.dvi -o || exit 1
+grep ' nan ' $tst.ps && exit 1
+
+exit 0
diff --git a/Build/source/texk/dvipsk/testdata/alt-rule.pro b/Build/source/texk/dvipsk/testdata/alt-rule.pro
new file mode 100644
index 00000000000..c7fb9443923
--- /dev/null
+++ b/Build/source/texk/dvipsk/testdata/alt-rule.pro
@@ -0,0 +1,17 @@
+%!
+% Patch by TVZ
+% Makes dvips files draw rules with stroke rather than fill.
+% Makes narrow rules more predictable at low resolutions
+% after distilling to PDF.
+% May have unknown consequences for very thick rules.
+% Tested only with dvips 5.85(k).
+TeXDict begin
+/QV {
+ gsave newpath /ruleY X /ruleX X
+ Rx Ry gt
+ { ruleX ruleY Ry 2 div sub moveto Rx 0 rlineto Ry }
+ { ruleX Rx 2 div add ruleY moveto 0 Ry neg rlineto Rx }
+ ifelse
+ setlinewidth 0 setlinecap stroke grestore
+} bind def
+end
diff --git a/Build/source/texk/dvipsk/testdata/config.pdf b/Build/source/texk/dvipsk/testdata/config.pdf
new file mode 100644
index 00000000000..edba69157ed
--- /dev/null
+++ b/Build/source/texk/dvipsk/testdata/config.pdf
@@ -0,0 +1,43 @@
+% This is a config file for dvips, meant to produce PostScript optimized
+% for distilling to PDF. Created 12 Apr 1999 by Timothy van Zandt, later
+% modified te (papersize, o line).
+% Public domain.
+
+% Memory available: The default for Distiller 3.0x is 8meg.
+% Reduce to be on safe side:
+
+m 6000000
+
+% Default is to save output as file.
+% If possible, change this so that it pipes output to distiller.
+% If not, use command line ``-o file'' option to change name
+% of output file.
+
+o
+
+% Default resolution. Attempt to make `resolution independent'.
+% Resolution set to 8000dpi (could be as high as 10000).
+
+D 8000
+
+% Use outline fonts, not bitmaps.
+% (For the testdata/ dir, we only have the outlines.)
+p psfonts.map
+
+% Last resort sizes.
+% If you accidentally include a bitmapped pk font, it will probably go
+% at 600dpi.
+
+R 300 600
+
+% Partial Type1 font downloading. This will happen by default. Uncomment
+% this is you want to download entire fonts, which is not recommended.
+
+% j0
+
+% Switching algorithm for drawing rules. texc.pro is loaded by default,
+% but the h tex.pro is need so that it comes before the patch. See
+% below for more details.
+
+h tex.pro
+h alt-rule.pro
diff --git a/Build/source/texk/dvipsk/testdata/eepic-nan.dvi b/Build/source/texk/dvipsk/testdata/eepic-nan.dvi
new file mode 100644
index 00000000000..7824ca8c733
--- /dev/null
+++ b/Build/source/texk/dvipsk/testdata/eepic-nan.dvi
Binary files differ
diff --git a/Build/source/texk/dvipsk/testdata/eepic-nan.tex b/Build/source/texk/dvipsk/testdata/eepic-nan.tex
new file mode 100644
index 00000000000..3963245f22d
--- /dev/null
+++ b/Build/source/texk/dvipsk/testdata/eepic-nan.tex
@@ -0,0 +1,15 @@
+\documentclass{article}
+
+\usepackage{epic}
+\usepackage{eepic}
+
+\begin{document}
+
+\setlength{\unitlength}{1pt}
+\begin{picture}(300,200)(0,0)
+ \path(100,100)(150,150)
+ \dottedline{3}(50,20)(250,180)
+\end{picture}
+
+\end{document}
+
diff --git a/Build/source/texk/dvipsk/testdata/tex.pro b/Build/source/texk/dvipsk/testdata/tex.pro
new file mode 100644
index 00000000000..c2b28f05d19
--- /dev/null
+++ b/Build/source/texk/dvipsk/testdata/tex.pro
@@ -0,0 +1,45 @@
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S
+/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy
+setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask
+restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/dir 0 def/dyy{/dir 0 def}B/dyt{/dir 1 def}B/dty{/dir 2 def}B/dtt{/dir 3
+def}B/p{dir 2 eq{-90 rotate show 90 rotate}{dir 3 eq{-90 rotate show 90
+rotate}{show}ifelse}ifelse}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0
+N/Ry 0 N/V{}B/RV/v{/Ry X/Rx X V}B statusdict begin/product where{pop
+false[(Display)(NeXT)(LaserWriter 16/600)]{A length product length le{A
+length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}
+forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{
+BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat
+{BDot}imagemask grestore}}ifelse B/QV{gsave newpath transform round exch
+round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0
+rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B
+/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}
+B/g{0 M}B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p
+-3 w}B/n{p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{
+0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end