summaryrefslogtreecommitdiff
path: root/Master/bin/i386-freebsd
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-31 23:30:46 +0000
committerKarl Berry <karl@freefriends.org>2006-12-31 23:30:46 +0000
commitea8cdb2c44082b3029c4d1dbf17360094b66fe89 (patch)
tree64766b7e6da2447acae3c774d50cf9ea61d9b191 /Master/bin/i386-freebsd
parent75a7295fd0ea5ba0faa392e0237d0e4ed5fe913a (diff)
new freebsd binaries from manfred
git-svn-id: svn://tug.org/texlive/trunk@3071 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/bin/i386-freebsd')
-rwxr-xr-xMaster/bin/i386-freebsd/afm2plbin72768 -> 70084 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/afm2tfmbin79648 -> 76100 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/alephbin445504 -> 453780 bytes
l---------Master/bin/i386-freebsd/amstex2
-rwxr-xr-xMaster/bin/i386-freebsd/bg5convbin3288 -> 3660 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/bg5latex17
-rwxr-xr-xMaster/bin/i386-freebsd/bg5pdflatex17
-rwxr-xr-xMaster/bin/i386-freebsd/bibtexbin130012 -> 128240 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/bibtex8bin156488 -> 153412 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/cef5convbin4496 -> 5692 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/cef5latex17
-rwxr-xr-xMaster/bin/i386-freebsd/cef5pdflatex17
-rwxr-xr-xMaster/bin/i386-freebsd/cefconvbin4392 -> 5692 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ceflatex17
-rwxr-xr-xMaster/bin/i386-freebsd/cefpdflatex17
-rwxr-xr-xMaster/bin/i386-freebsd/cefsconvbin4508 -> 5692 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/cefslatex17
-rwxr-xr-xMaster/bin/i386-freebsd/cefspdflatex17
-rwxr-xr-xMaster/bin/i386-freebsd/cfftot1bin309732 -> 296012 bytes
l---------Master/bin/i386-freebsd/cslatex2
l---------Master/bin/i386-freebsd/csplain2
-rwxr-xr-xMaster/bin/i386-freebsd/ctanglebin83180 -> 81884 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ctiebin62560 -> 60804 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ctxtools2
-rwxr-xr-xMaster/bin/i386-freebsd/cweavebin112204 -> 114396 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/detexbin69572 -> 77088 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/devnagbin23368 -> 23764 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/disdvibin10436 -> 10456 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dmpbin70708 -> 69060 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dt2dvbin29288 -> 30356 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dv2dtbin9608 -> 10676 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvi2ttybin17668 -> 18104 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvibookbin30464 -> 39716 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dviconcatbin27504 -> 34172 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvicopybin103152 -> 105856 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvidvibin14216 -> 18740 bytes
l---------Master/bin/i386-freebsd/dvigif1
-rwxr-xr-xMaster/bin/i386-freebsd/dviljbin91028 -> 86356 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvilj2pbin91380 -> 86708 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvilj4bin96436 -> 91508 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvilj4lbin96436 -> 91508 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvipdfmbin364040 -> 341836 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvipdfmxbin688932 -> 651992 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvipngbin487120 -> 784152 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvipsbin208736 -> 206500 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dviselectbin29380 -> 37216 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvitodvibin33376 -> 43812 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvitompbin84312 -> 83544 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/dvitypebin86700 -> 85892 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ebbbin197468 -> 192992 bytes
l---------Master/bin/i386-freebsd/eplain2
-rwxr-xr-xMaster/bin/i386-freebsd/epsffitbin7768 -> 8040 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/epstopdf38
l---------Master/bin/i386-freebsd/etex2
-rwxr-xr-xMaster/bin/i386-freebsd/exatools2
-rwxr-xr-xMaster/bin/i386-freebsd/extconvbin3288 -> 3660 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/fmtutil5
-rwxr-xr-xMaster/bin/i386-freebsd/gbklatex17
-rwxr-xr-xMaster/bin/i386-freebsd/gbkpdflatex17
-rwxr-xr-xMaster/bin/i386-freebsd/gftodvibin88692 -> 87804 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/gftopkbin78316 -> 75780 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/gftypebin75416 -> 75064 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/gsftopkbin72092 -> 70792 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/hbf2gfbin79416 -> 77296 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/htcontext4
-rwxr-xr-xMaster/bin/i386-freebsd/htlatex2
-rwxr-xr-xMaster/bin/i386-freebsd/htmex2
-rwxr-xr-xMaster/bin/i386-freebsd/httex2
-rwxr-xr-xMaster/bin/i386-freebsd/httexi2
-rwxr-xr-xMaster/bin/i386-freebsd/infobin126488 -> 126528 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/infokeybin20080 -> 19824 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/install-infobin20820 -> 22636 bytes
l---------Master/bin/i386-freebsd/jadetex2
-rwxr-xr-xMaster/bin/i386-freebsd/kpseaccessbin4188 -> 4248 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/kpsereadlinkbin4124 -> 4164 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/kpsestatbin4672 -> 4720 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/kpsewhichbin65552 -> 65400 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/lacheckbin49576 -> 50996 bytes
l---------Master/bin/i386-freebsd/latex2
-rwxr-xr-xMaster/bin/i386-freebsd/luatools2
-rwxr-xr-xMaster/bin/i386-freebsd/magbin4340 -> 5744 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/makeindexbin125264 -> 121528 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/makeinfobin181264 -> 180000 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/makempxbin5200 -> 60736 bytes
-rwxr-xr-x[l---------]Master/bin/i386-freebsd/makempy3
l---------Master/bin/i386-freebsd/mex2
-rwxr-xr-xMaster/bin/i386-freebsd/mfbin257416 -> 258820 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/mf-nowinbin253836 -> 254368 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/mftbin95580 -> 96240 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/mk4ht265
l---------Master/bin/i386-freebsd/mllatex2
l---------Master/bin/i386-freebsd/mltex2
-rwxr-xr-xMaster/bin/i386-freebsd/mmafmbin185044 -> 181980 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/mmpfbbin263280 -> 242164 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/mpostbin259088 -> 346280 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/mpstools2
-rwxr-xr-xMaster/bin/i386-freebsd/mptobin7144 -> 7412 bytes
-rwxr-xr-x[l---------]Master/bin/i386-freebsd/mptopdf3
-rwxr-xr-xMaster/bin/i386-freebsd/mtxtools2
-rwxr-xr-xMaster/bin/i386-freebsd/musixflxbin14216 -> 14132 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/newerbin4744 -> 4836 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/odvicopybin108368 -> 112224 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/odvitypebin87884 -> 86372 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/omegabin453216 -> 463796 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/omfontsbin142176 -> 136796 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/otanglebin45312 -> 51924 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/otfinfobin474028 -> 352944 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/otftotfmbin784532 -> 651192 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/otp2ocpbin72312 -> 70196 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/outocpbin56996 -> 56768 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/patgenbin35424 -> 36500 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/pdfclosebin6468 -> 6216 bytes
-rwxr-xr-x[l---------]Master/bin/i386-freebsd/pdfcrop309
l---------Master/bin/i386-freebsd/pdfcslatex2
l---------Master/bin/i386-freebsd/pdfcsplain2
l---------[-rwxr-xr-x]Master/bin/i386-freebsd/pdfetexbin1123508 -> 6 bytes
l---------Master/bin/i386-freebsd/pdfjadetex2
l---------Master/bin/i386-freebsd/pdflatex2
l---------Master/bin/i386-freebsd/pdfmex2
-rwxr-xr-xMaster/bin/i386-freebsd/pdfopenbin6916 -> 6984 bytes
l---------Master/bin/i386-freebsd/pdfplatex2
-rwxr-xr-x[l---------]Master/bin/i386-freebsd/pdftexbin7 -> 1203468 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/pdftools2
l---------Master/bin/i386-freebsd/pdfxmltex2
-rwxr-xr-xMaster/bin/i386-freebsd/perltex42
-rwxr-xr-xMaster/bin/i386-freebsd/pfb2pfabin6420 -> 7316 bytes
l---------Master/bin/i386-freebsd/physe2
l---------Master/bin/i386-freebsd/phyzzx2
-rwxr-xr-xMaster/bin/i386-freebsd/pk2bmbin8992 -> 9244 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/pktogfbin75156 -> 72636 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/pktypebin66872 -> 65240 bytes
l---------Master/bin/i386-freebsd/platex2
-rwxr-xr-xMaster/bin/i386-freebsd/pltotfbin56600 -> 56096 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/pooltypebin20548 -> 23184 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ps2pkbin155016 -> 154068 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ps4pdf51
-rwxr-xr-xMaster/bin/i386-freebsd/psbookbin10496 -> 10684 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/psnupbin17692 -> 18592 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/psresizebin16220 -> 15808 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/psselectbin11392 -> 11612 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/pstopdf2
-rwxr-xr-xMaster/bin/i386-freebsd/pstopsbin16700 -> 16224 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/rlxtools2
-rwxr-xr-xMaster/bin/i386-freebsd/runtools2
-rwxr-xr-xMaster/bin/i386-freebsd/sjisconvbin3304 -> 3672 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/sjislatex17
-rwxr-xr-xMaster/bin/i386-freebsd/sjispdflatex17
-rwxr-xr-xMaster/bin/i386-freebsd/t1asciibin21472 -> 23356 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1asmbin26528 -> 28476 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1binarybin20896 -> 22876 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1disasmbin25600 -> 26972 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1dotlessjbin268244 -> 236540 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1lintbin199904 -> 190304 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1macbin30112 -> 32540 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1reencodebin211484 -> 228424 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1testpagebin242992 -> 215892 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t1unmacbin27808 -> 30012 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/t4htbin73188 -> 73024 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/tanglebin91388 -> 93936 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/tcdialogbin127088 -> 125688 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/texbin276492 -> 283236 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/tex4htbin132516 -> 134784 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/texconfig4
-rwxr-xr-xMaster/bin/i386-freebsd/texexec24
-rwxr-xr-x[l---------]Master/bin/i386-freebsd/texfont3
-rwxr-xr-xMaster/bin/i386-freebsd/texi2html8
-rwxr-xr-xMaster/bin/i386-freebsd/texindexbin15196 -> 15616 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/texmfstart2556
l---------Master/bin/i386-freebsd/texsis2
-rwxr-xr-xMaster/bin/i386-freebsd/textools2
-rwxr-xr-x[l---------]Master/bin/i386-freebsd/texutil3
-rwxr-xr-xMaster/bin/i386-freebsd/tftoplbin83836 -> 81616 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/tiebin8992 -> 8796 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/tmftools2
-rwxr-xr-xMaster/bin/i386-freebsd/ttf2afmbin78584 -> 78288 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ttf2pkbin211100 -> 206200 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ttf2tfmbin229584 -> 220840 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/ttftotype42bin0 -> 235440 bytes
l---------Master/bin/i386-freebsd/uniqleaf1
-rwxr-xr-xMaster/bin/i386-freebsd/updmap9
l---------Master/bin/i386-freebsd/utf8mex2
-rwxr-xr-xMaster/bin/i386-freebsd/vftovpbin96692 -> 98076 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/vpe421
-rwxr-xr-xMaster/bin/i386-freebsd/vptovfbin70904 -> 68704 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/weavebin105272 -> 110328 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/xdvi-xaw.binbin752056 -> 715588 bytes
-rwxr-xr-xMaster/bin/i386-freebsd/xdvipdfmxbin0 -> 1108436 bytes
l---------Master/bin/i386-freebsd/xelatex1
l---------Master/bin/i386-freebsd/xeplain1
-rwxr-xr-xMaster/bin/i386-freebsd/xetexbin0 -> 7684212 bytes
l---------Master/bin/i386-freebsd/xmltex2
-rwxr-xr-xMaster/bin/i386-freebsd/xmltools2
192 files changed, 3893 insertions, 141 deletions
diff --git a/Master/bin/i386-freebsd/afm2pl b/Master/bin/i386-freebsd/afm2pl
index 6791a7d73d0..d511cd3bd36 100755
--- a/Master/bin/i386-freebsd/afm2pl
+++ b/Master/bin/i386-freebsd/afm2pl
Binary files differ
diff --git a/Master/bin/i386-freebsd/afm2tfm b/Master/bin/i386-freebsd/afm2tfm
index 1e410133b4f..4b7a7136179 100755
--- a/Master/bin/i386-freebsd/afm2tfm
+++ b/Master/bin/i386-freebsd/afm2tfm
Binary files differ
diff --git a/Master/bin/i386-freebsd/aleph b/Master/bin/i386-freebsd/aleph
index ae298596f4e..27291707331 100755
--- a/Master/bin/i386-freebsd/aleph
+++ b/Master/bin/i386-freebsd/aleph
Binary files differ
diff --git a/Master/bin/i386-freebsd/amstex b/Master/bin/i386-freebsd/amstex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/amstex
+++ b/Master/bin/i386-freebsd/amstex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/bg5conv b/Master/bin/i386-freebsd/bg5conv
index 9bd134c7cb6..399bf8d160c 100755
--- a/Master/bin/i386-freebsd/bg5conv
+++ b/Master/bin/i386-freebsd/bg5conv
Binary files differ
diff --git a/Master/bin/i386-freebsd/bg5latex b/Master/bin/i386-freebsd/bg5latex
index b9a36fa844c..257a8446e21 100755
--- a/Master/bin/i386-freebsd/bg5latex
+++ b/Master/bin/i386-freebsd/bg5latex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/bg5pdflatex b/Master/bin/i386-freebsd/bg5pdflatex
index f65d86d5417..80adc376a93 100755
--- a/Master/bin/i386-freebsd/bg5pdflatex
+++ b/Master/bin/i386-freebsd/bg5pdflatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/bibtex b/Master/bin/i386-freebsd/bibtex
index 1a515859697..d1eb00cfdb6 100755
--- a/Master/bin/i386-freebsd/bibtex
+++ b/Master/bin/i386-freebsd/bibtex
Binary files differ
diff --git a/Master/bin/i386-freebsd/bibtex8 b/Master/bin/i386-freebsd/bibtex8
index 3cabad84fc2..96f25e9645c 100755
--- a/Master/bin/i386-freebsd/bibtex8
+++ b/Master/bin/i386-freebsd/bibtex8
Binary files differ
diff --git a/Master/bin/i386-freebsd/cef5conv b/Master/bin/i386-freebsd/cef5conv
index a8e743a7479..866dd9eec10 100755
--- a/Master/bin/i386-freebsd/cef5conv
+++ b/Master/bin/i386-freebsd/cef5conv
Binary files differ
diff --git a/Master/bin/i386-freebsd/cef5latex b/Master/bin/i386-freebsd/cef5latex
index b8917c1cd26..7eda1633766 100755
--- a/Master/bin/i386-freebsd/cef5latex
+++ b/Master/bin/i386-freebsd/cef5latex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/cef5pdflatex b/Master/bin/i386-freebsd/cef5pdflatex
index bd398e0240c..25fe066a53f 100755
--- a/Master/bin/i386-freebsd/cef5pdflatex
+++ b/Master/bin/i386-freebsd/cef5pdflatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/cefconv b/Master/bin/i386-freebsd/cefconv
index 851f1f07194..bbdfb597f44 100755
--- a/Master/bin/i386-freebsd/cefconv
+++ b/Master/bin/i386-freebsd/cefconv
Binary files differ
diff --git a/Master/bin/i386-freebsd/ceflatex b/Master/bin/i386-freebsd/ceflatex
index 50c5be54fd9..d34244d9a5b 100755
--- a/Master/bin/i386-freebsd/ceflatex
+++ b/Master/bin/i386-freebsd/ceflatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/cefpdflatex b/Master/bin/i386-freebsd/cefpdflatex
index 0615149c5b9..4c7309f2bf2 100755
--- a/Master/bin/i386-freebsd/cefpdflatex
+++ b/Master/bin/i386-freebsd/cefpdflatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/cefsconv b/Master/bin/i386-freebsd/cefsconv
index f4c9c6a1188..2dc1d3c9fd3 100755
--- a/Master/bin/i386-freebsd/cefsconv
+++ b/Master/bin/i386-freebsd/cefsconv
Binary files differ
diff --git a/Master/bin/i386-freebsd/cefslatex b/Master/bin/i386-freebsd/cefslatex
index fb2944ceda7..619d08c7577 100755
--- a/Master/bin/i386-freebsd/cefslatex
+++ b/Master/bin/i386-freebsd/cefslatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/cefspdflatex b/Master/bin/i386-freebsd/cefspdflatex
index 1985eebe5c8..02bf6598f71 100755
--- a/Master/bin/i386-freebsd/cefspdflatex
+++ b/Master/bin/i386-freebsd/cefspdflatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/cfftot1 b/Master/bin/i386-freebsd/cfftot1
index 2c5b43cef71..1a3d0d3736d 100755
--- a/Master/bin/i386-freebsd/cfftot1
+++ b/Master/bin/i386-freebsd/cfftot1
Binary files differ
diff --git a/Master/bin/i386-freebsd/cslatex b/Master/bin/i386-freebsd/cslatex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/cslatex
+++ b/Master/bin/i386-freebsd/cslatex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/csplain b/Master/bin/i386-freebsd/csplain
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/csplain
+++ b/Master/bin/i386-freebsd/csplain
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/ctangle b/Master/bin/i386-freebsd/ctangle
index 0bc34f8b0aa..07f24134ea7 100755
--- a/Master/bin/i386-freebsd/ctangle
+++ b/Master/bin/i386-freebsd/ctangle
Binary files differ
diff --git a/Master/bin/i386-freebsd/ctie b/Master/bin/i386-freebsd/ctie
index 2ee8faedfa6..d5fc368fb48 100755
--- a/Master/bin/i386-freebsd/ctie
+++ b/Master/bin/i386-freebsd/ctie
Binary files differ
diff --git a/Master/bin/i386-freebsd/ctxtools b/Master/bin/i386-freebsd/ctxtools
new file mode 100755
index 00000000000..84e47bbee3c
--- /dev/null
+++ b/Master/bin/i386-freebsd/ctxtools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart ctxtools.rb "$@"
diff --git a/Master/bin/i386-freebsd/cweave b/Master/bin/i386-freebsd/cweave
index c74a8bdcd1d..493c76d6586 100755
--- a/Master/bin/i386-freebsd/cweave
+++ b/Master/bin/i386-freebsd/cweave
Binary files differ
diff --git a/Master/bin/i386-freebsd/detex b/Master/bin/i386-freebsd/detex
index 1aea86f7d06..0ef709a013c 100755
--- a/Master/bin/i386-freebsd/detex
+++ b/Master/bin/i386-freebsd/detex
Binary files differ
diff --git a/Master/bin/i386-freebsd/devnag b/Master/bin/i386-freebsd/devnag
index 67c7598b619..d9295ba508e 100755
--- a/Master/bin/i386-freebsd/devnag
+++ b/Master/bin/i386-freebsd/devnag
Binary files differ
diff --git a/Master/bin/i386-freebsd/disdvi b/Master/bin/i386-freebsd/disdvi
index 4b35df4b7db..06c1afe99e6 100755
--- a/Master/bin/i386-freebsd/disdvi
+++ b/Master/bin/i386-freebsd/disdvi
Binary files differ
diff --git a/Master/bin/i386-freebsd/dmp b/Master/bin/i386-freebsd/dmp
index 5f44ce0f392..c738b5283b5 100755
--- a/Master/bin/i386-freebsd/dmp
+++ b/Master/bin/i386-freebsd/dmp
Binary files differ
diff --git a/Master/bin/i386-freebsd/dt2dv b/Master/bin/i386-freebsd/dt2dv
index 7e1d92a5a41..3b43b1b3b65 100755
--- a/Master/bin/i386-freebsd/dt2dv
+++ b/Master/bin/i386-freebsd/dt2dv
Binary files differ
diff --git a/Master/bin/i386-freebsd/dv2dt b/Master/bin/i386-freebsd/dv2dt
index 96fb3dabce2..70c145ed1c0 100755
--- a/Master/bin/i386-freebsd/dv2dt
+++ b/Master/bin/i386-freebsd/dv2dt
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvi2tty b/Master/bin/i386-freebsd/dvi2tty
index 380e45c542c..7dec2ddee9e 100755
--- a/Master/bin/i386-freebsd/dvi2tty
+++ b/Master/bin/i386-freebsd/dvi2tty
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvibook b/Master/bin/i386-freebsd/dvibook
index 6c27a349c10..3f47c7a874c 100755
--- a/Master/bin/i386-freebsd/dvibook
+++ b/Master/bin/i386-freebsd/dvibook
Binary files differ
diff --git a/Master/bin/i386-freebsd/dviconcat b/Master/bin/i386-freebsd/dviconcat
index 57aab05946b..62fff312a8e 100755
--- a/Master/bin/i386-freebsd/dviconcat
+++ b/Master/bin/i386-freebsd/dviconcat
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvicopy b/Master/bin/i386-freebsd/dvicopy
index a8666cec53b..6a2952f45d4 100755
--- a/Master/bin/i386-freebsd/dvicopy
+++ b/Master/bin/i386-freebsd/dvicopy
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvidvi b/Master/bin/i386-freebsd/dvidvi
index 3432afcbde8..f7ecb580d84 100755
--- a/Master/bin/i386-freebsd/dvidvi
+++ b/Master/bin/i386-freebsd/dvidvi
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvigif b/Master/bin/i386-freebsd/dvigif
deleted file mode 120000
index c1eef0afe05..00000000000
--- a/Master/bin/i386-freebsd/dvigif
+++ /dev/null
@@ -1 +0,0 @@
-dvipng \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/dvilj b/Master/bin/i386-freebsd/dvilj
index 681cb1e0cd0..a4e7635900b 100755
--- a/Master/bin/i386-freebsd/dvilj
+++ b/Master/bin/i386-freebsd/dvilj
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvilj2p b/Master/bin/i386-freebsd/dvilj2p
index 701f6e65d78..7ba417f477e 100755
--- a/Master/bin/i386-freebsd/dvilj2p
+++ b/Master/bin/i386-freebsd/dvilj2p
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvilj4 b/Master/bin/i386-freebsd/dvilj4
index 6ee7095659a..fd423716816 100755
--- a/Master/bin/i386-freebsd/dvilj4
+++ b/Master/bin/i386-freebsd/dvilj4
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvilj4l b/Master/bin/i386-freebsd/dvilj4l
index 70317f7fcde..0dbf80edc3b 100755
--- a/Master/bin/i386-freebsd/dvilj4l
+++ b/Master/bin/i386-freebsd/dvilj4l
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvipdfm b/Master/bin/i386-freebsd/dvipdfm
index 696a0c6f4d5..3489b1f68dd 100755
--- a/Master/bin/i386-freebsd/dvipdfm
+++ b/Master/bin/i386-freebsd/dvipdfm
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvipdfmx b/Master/bin/i386-freebsd/dvipdfmx
index cf358aaadcc..fb56a30dd99 100755
--- a/Master/bin/i386-freebsd/dvipdfmx
+++ b/Master/bin/i386-freebsd/dvipdfmx
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvipng b/Master/bin/i386-freebsd/dvipng
index 3f00697b344..b028d25fb4c 100755
--- a/Master/bin/i386-freebsd/dvipng
+++ b/Master/bin/i386-freebsd/dvipng
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvips b/Master/bin/i386-freebsd/dvips
index 84ae5977de0..a3c0b8286ff 100755
--- a/Master/bin/i386-freebsd/dvips
+++ b/Master/bin/i386-freebsd/dvips
Binary files differ
diff --git a/Master/bin/i386-freebsd/dviselect b/Master/bin/i386-freebsd/dviselect
index 8d72f52291d..460765479ee 100755
--- a/Master/bin/i386-freebsd/dviselect
+++ b/Master/bin/i386-freebsd/dviselect
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvitodvi b/Master/bin/i386-freebsd/dvitodvi
index 53990e745f5..3c4bb1ef2bf 100755
--- a/Master/bin/i386-freebsd/dvitodvi
+++ b/Master/bin/i386-freebsd/dvitodvi
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvitomp b/Master/bin/i386-freebsd/dvitomp
index 4fa52397d9b..78726b33961 100755
--- a/Master/bin/i386-freebsd/dvitomp
+++ b/Master/bin/i386-freebsd/dvitomp
Binary files differ
diff --git a/Master/bin/i386-freebsd/dvitype b/Master/bin/i386-freebsd/dvitype
index ce143cb5818..356f0a8c1ac 100755
--- a/Master/bin/i386-freebsd/dvitype
+++ b/Master/bin/i386-freebsd/dvitype
Binary files differ
diff --git a/Master/bin/i386-freebsd/ebb b/Master/bin/i386-freebsd/ebb
index 7295282b615..1dd342c3de3 100755
--- a/Master/bin/i386-freebsd/ebb
+++ b/Master/bin/i386-freebsd/ebb
Binary files differ
diff --git a/Master/bin/i386-freebsd/eplain b/Master/bin/i386-freebsd/eplain
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/eplain
+++ b/Master/bin/i386-freebsd/eplain
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/epsffit b/Master/bin/i386-freebsd/epsffit
index 1679eac7a49..0f762b1d572 100755
--- a/Master/bin/i386-freebsd/epsffit
+++ b/Master/bin/i386-freebsd/epsffit
Binary files differ
diff --git a/Master/bin/i386-freebsd/epstopdf b/Master/bin/i386-freebsd/epstopdf
index e7ea5f239df..0fb015d4420 100755
--- a/Master/bin/i386-freebsd/epstopdf
+++ b/Master/bin/i386-freebsd/epstopdf
@@ -58,13 +58,17 @@ use strict;
# * Quote OutFilename
# 2005/10/01 v2.9.3draft (Gerben Wierda)
# * Quote OutFilename
+# 2005/10/06 v2.9.4gw (Gerben Wierda)
+# * This has become the official version for now
+# 2005/10/06 v2.9.5gw (Gerben Wierda)
+# * Fixed a horrendous bug in the (atend) handling code
#
### program identification
my $program = "epstopdf";
-my $filedate="2003/04/20";
-my $fileversion="2.9.3draft";
-my $copyright = "Copyright 1998-2002 by Sebastian Rahtz et al.";
+my $filedate="2006/01/29";
+my $fileversion="2.9.5gw";
+my $copyright = "Copyright 1998-2006 by Sebastian Rahtz et al.";
my $title = "\U$program\E $fileversion, $filedate - $copyright\n";
### ghostscript command name
@@ -249,13 +253,14 @@ if ($buflen > 0) {
# that array until it is empty, then move again back to <IN>
$buf .= <IN> unless eof( IN);
$buflen = length( $buf);
+ $bufarraypos = 0;
# Some extra magic is needed here: if we set $/ to \r, Perl's re engine
# still thinks eol is \n in regular expressions (not very nice) so we
# cannot split on ^, but have to split on \r and reappend those.
if ($/ eq "\r") {
- @bufarray = split( /\r/ms, $buf);
- grep( $_ .= "\r", @bufarray);
+ @bufarray = split( /\r/ms, $buf); # split on \r
+ grep( $_ .= "\r", @bufarray); # re-append \r to each array item
}
else {
@bufarray = split( /^/ms, $buf);
@@ -268,6 +273,8 @@ sub getline {
$_ = shift( @bufarray);
unshift( @parsedbufarray, $_); # for myseek and mytell
$bufarraypos += length( $_);
+ # debug "getline from array. bufarraypos = $bufarraypos";
+ # debug "*** READ: $_";
}
else {
$_ = <IN>;
@@ -278,31 +285,40 @@ sub getline {
### mytell and myseek, work on <IN> only
sub mytell {
if ($#bufarray) {
+ # debug "Telling ARRAY position $bufarraypos";
return $bufarraypos;
}
else {
- return tell( IN);
+ my $pos = tell( IN);
+ # debug "Telling FILE position $pos";
+ return $pos;
}
}
sub myseek {
my $pos = shift;
+ # debug "Seeking to position $pos in input";
if ($pos < $buflen) {
+ # debug "myseek position $pos < buffer size $buflen";
# We were still parsing the array, reset to the end of buf and
# move to the right line in the array.
- # Now, move stuff from the @parsedbufarray until we are back at $pos
+ # Now, move stuff from the @parsedbufarray back until we are back at $pos
my $tmpline;
- while ($pos > 0) {
+ while ($bufarraypos > $pos) {
+ # debug "myseek bufarray position $bufarraypos > position $pos";
# we test on parsedbufarray to prevent an infinite loop on
# a programming error (DEVELOP only)
die "Programming error 1\n" unless $#parsedbufarray;
- $tmpline = pop( @parsedbufarray);
- $pos -= length( $tmpline);
- push( @bufarray, $tmpline);
+ $tmpline = shift( @parsedbufarray);
+ $bufarraypos -= length( $tmpline);
+ unshift( @bufarray, $tmpline);
+ debug "*** UNREAD: $tmpline";
}
+ # debug "Returning to ARRAY size position $buflen (bufarraypos = $bufarraypos)";
return seek( IN, $buflen, 0);
}
else {
+ # debug "Seeking to FILE position $pos";
return seek( IN, $pos, 0);
}
}
diff --git a/Master/bin/i386-freebsd/etex b/Master/bin/i386-freebsd/etex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/etex
+++ b/Master/bin/i386-freebsd/etex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/exatools b/Master/bin/i386-freebsd/exatools
new file mode 100755
index 00000000000..50ff0f07e46
--- /dev/null
+++ b/Master/bin/i386-freebsd/exatools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart exatools.rb "$@"
diff --git a/Master/bin/i386-freebsd/extconv b/Master/bin/i386-freebsd/extconv
index 625bf4b1d34..c31cba38885 100755
--- a/Master/bin/i386-freebsd/extconv
+++ b/Master/bin/i386-freebsd/extconv
Binary files differ
diff --git a/Master/bin/i386-freebsd/fmtutil b/Master/bin/i386-freebsd/fmtutil
index c8daaf8e112..e061f4f20af 100755
--- a/Master/bin/i386-freebsd/fmtutil
+++ b/Master/bin/i386-freebsd/fmtutil
@@ -29,6 +29,7 @@
###############################################################################
# program history:
# Fr Apr 8 19:15:05 CEST 2005 cleanup now has an argument for the return code
+# Do Mar 02 10:42:31 CET 2006 add tmpdir to TEXFORMATS
# So Mär 27 18:52:06 CEST 2005 honor $TMPDIR, $TEMP and $TMP, not just $TMP
# Sa Jan 15 18:13:46 CET 2005 avoid multiple variable assignments in one statement
# Di Jan 11 11:42:36 CET 2005 fix --byhyphen with relative hyphenfile
@@ -517,6 +518,10 @@ main()
# due to KPSE_DOT, we don't search the current directory, so include
# it explicitly for formats that \write and later on \read
TEXINPUTS="$tmpdir:$TEXINPUTS"; export TEXINPUTS
+ # for formats that load other formats (e.g., jadetex loads latex.fmt),
+ # add the current directory to TEXFORMATS, too. Currently unnecessary
+ # for MFBASES and MPMEMS.
+ TEXFORMATS="$tmpdir:$TEXFORMATS"; export TEXFORMATS
setupTmpDir
cd "$tmpdir" || cleanup 1
diff --git a/Master/bin/i386-freebsd/gbklatex b/Master/bin/i386-freebsd/gbklatex
index c7fcf7f13bc..f799f7b6e63 100755
--- a/Master/bin/i386-freebsd/gbklatex
+++ b/Master/bin/i386-freebsd/gbklatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/gbkpdflatex b/Master/bin/i386-freebsd/gbkpdflatex
index 6cdb3cfee51..6dd3ee3de9e 100755
--- a/Master/bin/i386-freebsd/gbkpdflatex
+++ b/Master/bin/i386-freebsd/gbkpdflatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/gftodvi b/Master/bin/i386-freebsd/gftodvi
index 62419018548..479cf08ee8d 100755
--- a/Master/bin/i386-freebsd/gftodvi
+++ b/Master/bin/i386-freebsd/gftodvi
Binary files differ
diff --git a/Master/bin/i386-freebsd/gftopk b/Master/bin/i386-freebsd/gftopk
index 3bdd88c7104..ea629ff12bc 100755
--- a/Master/bin/i386-freebsd/gftopk
+++ b/Master/bin/i386-freebsd/gftopk
Binary files differ
diff --git a/Master/bin/i386-freebsd/gftype b/Master/bin/i386-freebsd/gftype
index d844c16c4c5..7709b86401c 100755
--- a/Master/bin/i386-freebsd/gftype
+++ b/Master/bin/i386-freebsd/gftype
Binary files differ
diff --git a/Master/bin/i386-freebsd/gsftopk b/Master/bin/i386-freebsd/gsftopk
index 6fdab04c5ee..862df68ac58 100755
--- a/Master/bin/i386-freebsd/gsftopk
+++ b/Master/bin/i386-freebsd/gsftopk
Binary files differ
diff --git a/Master/bin/i386-freebsd/hbf2gf b/Master/bin/i386-freebsd/hbf2gf
index 9674eb8e904..d9f3f2b10a6 100755
--- a/Master/bin/i386-freebsd/hbf2gf
+++ b/Master/bin/i386-freebsd/hbf2gf
Binary files differ
diff --git a/Master/bin/i386-freebsd/htcontext b/Master/bin/i386-freebsd/htcontext
index 190ac31f862..9d6d4549574 100755
--- a/Master/bin/i386-freebsd/htcontext
+++ b/Master/bin/i386-freebsd/htcontext
@@ -1,7 +1,7 @@
#!/bin/sh
- texexec --arg="opt-arg=$2" --use=tex4ht $5 $1
+ texexec --arg="ht-1=$2" --use=tex4ht $5 $1
tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
- t4ht -f/$1 $4 -cvalidatehtml ## -d~/WWW/temp/ -m644
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
diff --git a/Master/bin/i386-freebsd/htlatex b/Master/bin/i386-freebsd/htlatex
index 04713bb7794..1b8b7cea74a 100755
--- a/Master/bin/i386-freebsd/htlatex
+++ b/Master/bin/i386-freebsd/htlatex
@@ -3,7 +3,7 @@
latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
- t4ht -f/$1 $4 -cvalidatehtml ## -d~/WWW/temp/ -m644
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
diff --git a/Master/bin/i386-freebsd/htmex b/Master/bin/i386-freebsd/htmex
index 7e34ac6d523..b4aa3d9a06e 100755
--- a/Master/bin/i386-freebsd/htmex
+++ b/Master/bin/i386-freebsd/htmex
@@ -3,7 +3,7 @@
mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
mex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
- t4ht -f/$1 $4 -cvalidatehtml ## -d~/WWW/temp/ -m644
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
diff --git a/Master/bin/i386-freebsd/httex b/Master/bin/i386-freebsd/httex
index 1fdf5f3d940..44920e72077 100755
--- a/Master/bin/i386-freebsd/httex
+++ b/Master/bin/i386-freebsd/httex
@@ -3,7 +3,7 @@
tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\HCode '$2'.a.b.c.\input ' $1
tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
- t4ht -f/$1 $4 -cvalidatehtml ## -d~/WWW/temp/ -m644
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
diff --git a/Master/bin/i386-freebsd/httexi b/Master/bin/i386-freebsd/httexi
index b3d841ed9a3..0ce3cb4a589 100755
--- a/Master/bin/i386-freebsd/httexi
+++ b/Master/bin/i386-freebsd/httexi
@@ -3,7 +3,7 @@
tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
tex $5 '\def\Link#1.a.b.c.{\expandafter\def\csname tex4ht\endcsname{\expandafter\def\csname tex4ht\endcsname{#1,html}\input tex4ht.sty }}\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\let\svrm=\rm\def\rm{\svrm\ifx\c\comment\def\rm{\let\rm=\svrm\catcode`\@=12\catcode`\\=0 \csname tex4ht\endcsname\catcode`\@=0\catcode`\\=13 }\expandafter\rm\fi}\HCode '$2'.a.b.c.\input ' $1
tex4ht -f/$1 -i~/tex4ht.dir/texmf/tex4ht/ht-fonts/$3
- t4ht -f/$1 $4 -cvalidatehtml ## -d~/WWW/temp/ -m644
+ t4ht -f/$1 $4 ## -d~/WWW/temp/ -m644
# texindex ?
diff --git a/Master/bin/i386-freebsd/info b/Master/bin/i386-freebsd/info
index 365abc60658..4e9eab94200 100755
--- a/Master/bin/i386-freebsd/info
+++ b/Master/bin/i386-freebsd/info
Binary files differ
diff --git a/Master/bin/i386-freebsd/infokey b/Master/bin/i386-freebsd/infokey
index 7211aa3aba8..c7eb7d599d8 100755
--- a/Master/bin/i386-freebsd/infokey
+++ b/Master/bin/i386-freebsd/infokey
Binary files differ
diff --git a/Master/bin/i386-freebsd/install-info b/Master/bin/i386-freebsd/install-info
index 27c5b71e27a..8b70f3ad20e 100755
--- a/Master/bin/i386-freebsd/install-info
+++ b/Master/bin/i386-freebsd/install-info
Binary files differ
diff --git a/Master/bin/i386-freebsd/jadetex b/Master/bin/i386-freebsd/jadetex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/jadetex
+++ b/Master/bin/i386-freebsd/jadetex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/kpseaccess b/Master/bin/i386-freebsd/kpseaccess
index 0a04bde7090..9b4f16fa4f0 100755
--- a/Master/bin/i386-freebsd/kpseaccess
+++ b/Master/bin/i386-freebsd/kpseaccess
Binary files differ
diff --git a/Master/bin/i386-freebsd/kpsereadlink b/Master/bin/i386-freebsd/kpsereadlink
index 65fb369d4f4..68a3165f86d 100755
--- a/Master/bin/i386-freebsd/kpsereadlink
+++ b/Master/bin/i386-freebsd/kpsereadlink
Binary files differ
diff --git a/Master/bin/i386-freebsd/kpsestat b/Master/bin/i386-freebsd/kpsestat
index 94f921e4258..aff9563d365 100755
--- a/Master/bin/i386-freebsd/kpsestat
+++ b/Master/bin/i386-freebsd/kpsestat
Binary files differ
diff --git a/Master/bin/i386-freebsd/kpsewhich b/Master/bin/i386-freebsd/kpsewhich
index 3a4481d4ad6..6badfe4d6f8 100755
--- a/Master/bin/i386-freebsd/kpsewhich
+++ b/Master/bin/i386-freebsd/kpsewhich
Binary files differ
diff --git a/Master/bin/i386-freebsd/lacheck b/Master/bin/i386-freebsd/lacheck
index 7e062e35c74..1a3bca755a7 100755
--- a/Master/bin/i386-freebsd/lacheck
+++ b/Master/bin/i386-freebsd/lacheck
Binary files differ
diff --git a/Master/bin/i386-freebsd/latex b/Master/bin/i386-freebsd/latex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/latex
+++ b/Master/bin/i386-freebsd/latex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/luatools b/Master/bin/i386-freebsd/luatools
new file mode 100755
index 00000000000..cb3ec1add4a
--- /dev/null
+++ b/Master/bin/i386-freebsd/luatools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart luatools.lua "$@"
diff --git a/Master/bin/i386-freebsd/mag b/Master/bin/i386-freebsd/mag
index bb3d87db411..0e301ca972c 100755
--- a/Master/bin/i386-freebsd/mag
+++ b/Master/bin/i386-freebsd/mag
Binary files differ
diff --git a/Master/bin/i386-freebsd/makeindex b/Master/bin/i386-freebsd/makeindex
index 5722509b981..26c971b1273 100755
--- a/Master/bin/i386-freebsd/makeindex
+++ b/Master/bin/i386-freebsd/makeindex
Binary files differ
diff --git a/Master/bin/i386-freebsd/makeinfo b/Master/bin/i386-freebsd/makeinfo
index 112c5211806..a757928f3b6 100755
--- a/Master/bin/i386-freebsd/makeinfo
+++ b/Master/bin/i386-freebsd/makeinfo
Binary files differ
diff --git a/Master/bin/i386-freebsd/makempx b/Master/bin/i386-freebsd/makempx
index 8aaa9bac1dc..171eb280eb0 100755
--- a/Master/bin/i386-freebsd/makempx
+++ b/Master/bin/i386-freebsd/makempx
Binary files differ
diff --git a/Master/bin/i386-freebsd/makempy b/Master/bin/i386-freebsd/makempy
index afced152700..4bf7a1af230 120000..100755
--- a/Master/bin/i386-freebsd/makempy
+++ b/Master/bin/i386-freebsd/makempy
@@ -1 +1,2 @@
-texexec \ No newline at end of file
+#!/bin/sh
+texmfstart makempy.pl "$@"
diff --git a/Master/bin/i386-freebsd/mex b/Master/bin/i386-freebsd/mex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/mex
+++ b/Master/bin/i386-freebsd/mex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/mf b/Master/bin/i386-freebsd/mf
index 25a4cc89c71..44217d6b5e2 100755
--- a/Master/bin/i386-freebsd/mf
+++ b/Master/bin/i386-freebsd/mf
Binary files differ
diff --git a/Master/bin/i386-freebsd/mf-nowin b/Master/bin/i386-freebsd/mf-nowin
index a92816011ac..efbfbb5f436 100755
--- a/Master/bin/i386-freebsd/mf-nowin
+++ b/Master/bin/i386-freebsd/mf-nowin
Binary files differ
diff --git a/Master/bin/i386-freebsd/mft b/Master/bin/i386-freebsd/mft
index f31064d100b..b9684bfdb3d 100755
--- a/Master/bin/i386-freebsd/mft
+++ b/Master/bin/i386-freebsd/mft
Binary files differ
diff --git a/Master/bin/i386-freebsd/mk4ht b/Master/bin/i386-freebsd/mk4ht
index 019d9cfc7c8..0f4b664506c 100755
--- a/Master/bin/i386-freebsd/mk4ht
+++ b/Master/bin/i386-freebsd/mk4ht
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-# mk4ht 2005-09-23-22:09 %
-# Copyright (C) 2003--2005 Eitan M. Gurari %
+# mk4ht 2006-08-28-20:45 %
+# Copyright (C) 2003--2006 Eitan M. Gurari %
# %
# %
# This work may be distributed and/or modified under the %
@@ -29,56 +29,72 @@ my @options = (
"ht", "htlatex", "latex", "", "", "-cvalidatehtml",
"ht", "httex", "tex", "", "", "-cvalidatehtml",
"ht", "httexi", "texi", "", "", "-cvalidatehtml",
- "ht", "htcontext", "texexec", "", "", "-cvalidatehtml",
+ "ht", "htcontext", "context", "", "", "-cvalidatehtml",
+ "xh", "xhlatex", "latex", "xhtml", "", "-cvalidate",
+ "xh", "xhtex", "tex", "xhtml", "", "-cvalidate",
+ "xh", "xhtexi", "texi", "xhtml", "", "-cvalidate",
+ "xh", "xhcontext","context", "xhtml", "", "-cvalidat",
"uxh", "uxhlatex", "latex", "xhtml,uni-html4", " -cunihtf", "-cvalidate",
"uxh", "uxhtex", "tex", "xhtml,uni-html4", " -cunihtf", "-cvalidate",
"uxh", "uxhtexi", "texi", "xhtml,uni-html4", " -cunihtf", "-cvalidate",
- "uxh", "uxhcontext","texexec", "xhtml,uni-html4", " -cunihtf", "-cvalidate",
+ "uxh", "uxhcontext","context", "xhtml,uni-html4", " -cunihtf", "-cvalidate",
"xhm", "xhmlatex", "latex", "xhtml,mathml", " -cunihtf", "-cvalidate",
"xhm", "xhmtex", "tex", "xhtml,mathml", " -cunihtf", "-cvalidate",
"xhm", "xhmtexi", "texi", "xhtml,mathml", " -cunihtf", "-cvalidate",
- "xhm", "xhmcontext","texexec", "xhtml,mathml", " -cunihtf", "-cvalidate",
+ "xhm", "xhmcontext","context", "xhtml,mathml", " -cunihtf", "-cvalidate",
"mz", "mzlatex", "latex", "xhtml,mozilla", " -cmozhtf", "-cvalidate",
"mz", "mztex", "tex", "xhtml,mozilla", " -cmozhtf", "-cvalidate",
"mz", "mztexi", "texi", "xhtml,mozilla", " -cmozhtf", "-cvalidate",
- "mz", "mzcontext", "texexec", "xhtml,mozilla", " -cmozhtf", "-cvalidate",
- "oo", "oolatex", "latex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-coo -cvalidate",
- "oo", "ootex", "tex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-coo -cvalidate",
- "oo", "ootexi", "texi", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-coo -cvalidate",
- "oo", "oocontext", "texexec", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-coo -cvalidate",
+ "mz", "mzcontext", "context", "xhtml,mozilla", " -cmozhtf", "-cvalidate",
+ "oo", "oolatex", "latex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo",
+ "oo", "ootex", "tex", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo",
+ "oo", "ootexi", "texi", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo",
+ "oo", "oocontext", "context", "xhtml,ooffice", "ooffice/\! -cmozhtf", "-cooxtpipes -coo",
+ "es", "eslatex", "latex", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk",
+ "es", "estex", "tex", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk",
+ "es", "estexi", "texi", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk",
+ "es", "escontext", "context", "xhtml,emspk", " -cemspkhtf -s4es", "-cemspk",
+ "js", "jslatex", "latex", "xhtml,jsml", " -cjsmlhtf", "-cjsml",
+ "js", "jstex", "tex", "xhtml,jsml", " -cjsmlhtf", "-cjsml",
+ "js", "jstexi", "texi", "xhtml,jsml", " -cjsmlhtf", "-cjsml",
+ "js", "jscontext", "context", "xhtml,jsml", " -cjsmlhtf", "-cjsml",
"tei", "teilatex", "latex", "xhtml,tei", " -cunihtf", "-cvalidate",
"tei", "teitex", "tex", "xhtml,tei", " -cunihtf", "-cvalidate",
"tei", "teitexi", "texi", "xhtml,tei", " -cunihtf", "-cvalidate",
- "tei", "teicontext","texexec", "xhtml,tei", " -cunihtf", "-cvalidate",
+ "tei", "teicontext","context", "xhtml,tei", " -cunihtf", "-cvalidate",
"teim", "teimlatex", "latex", "xhtml,tei-mml"," -cunihtf", "-cvalidate",
"teim", "teimtex", "tex", "xhtml,tei-mml"," -cunihtf", "-cvalidate",
"teim", "teimtexi", "texi", "xhtml,tei-mml"," -cunihtf", "-cvalidate",
- "teim", "teimcontext","texexec","xhtml,tei-mml"," -cunihtf", "-cvalidate",
- "db", "dblatex", "latex", "xhtml,docbook", " -cunihtf", "-cvalidate",
- "db", "dbtex", "tex", "xhtml,docbook", " -cunihtf", "-cvalidate",
- "db", "dbtexi", "texi", "xhtml,docbook", " -cunihtf", "-cvalidate",
- "db", "dbcontext", "texexec", "xhtml,docbook", " -cunihtf", "-cvalidate",
- "dbm", "dbmlatex", "latex", "xhtml,docbook-mml", " -cunihtf", "-cvalidate",
- "dbm", "dbmtex", "tex", "xhtml,docbook-mml", " -cunihtf", "-cvalidate",
- "dbm", "dbmtexi", "texi", "xhtml,docbook-mml", " -cunihtf", "-cvalidate",
- "dbm", "dbmcontext","texexec", "xhtml,docbook-mml", " -cunihtf", "-cvalidate",
+ "teim", "teimcontext","context","xhtml,tei-mml"," -cunihtf", "-cvalidate",
+ "db", "dblatex", "latex", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk",
+ "db", "dbtex", "tex", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk",
+ "db", "dbtexi", "texi", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk",
+ "db", "dbcontext", "context", "xhtml,docbook", " -cunihtf", "-cvalidate -cdocbk",
+ "dbm", "dbmlatex", "latex", "xhtml,docbook-mml", " -cunihtf", "-cdocbk",
+ "dbm", "dbmtex", "tex", "xhtml,docbook-mml", " -cunihtf", "-cdocbk",
+ "dbm", "dbmtexi", "texi", "xhtml,docbook-mml", " -cunihtf", "-cdocbk",
+ "dbm", "dbmcontext","context", "xhtml,docbook-mml", " -cunihtf", "-cdocbk",
"w", "wlatex", "latex", "xhtml,word", " -csymhtf", "",
"w", "wtex", "tex", "xhtml,word", " -csymhtf", "",
"w", "wtexi", "texi", "xhtml,word", " -csymhtf", "",
- "w", "wcontext", "texexec", "xhtml,word", " -csymhtf", "",
- "jh", "jhlatex", "latex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
- "jh", "jhtex", "tex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
- "jh", "jhtexi", "texi", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
- "jh", "jhcontext","texexec", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidate",
+ "w", "wcontext", "context", "xhtml,word", " -csymhtf", "",
+ "jh", "jhlatex", "latex", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml",
+ "jh", "jhtex", "tex", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml",
+ "jh", "jhtexi", "texi", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml",
+ "jh", "jhcontext","context", "html,javahelp,3.2,unicode", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp -cvalidatehtml",
+ "jh1", "jh1latex", "latex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp",
+ "jh1", "jh1tex", "tex", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp",
+ "jh1", "jh1texi", "texi", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp",
+ "jh1", "jh1context","context", "html,javahelp,3.2,unicode,jh1.0", " -cmozhtf -u10", " -d%1-doc/ -cjavahelp",
);
sub showInstrucions(){
print " option1: mk4ht #1 \"#2\" \"#3\" \"#4\" \"#5\"\n";
print " \n";
- print " #1: htlatex, mzlatex, oolatex, dblatex, dbmlatex,\n";
- print " teilatex, teimlatex, uxhlatex, wlatex, xhlatex,\n";
- print " xhmlatex\n";
+ print " #1: htlatex, xhlatex, mzlatex, oolatex, dblatex, dbmlatex,\n";
+ print " jhlatex, eslatex, teilatex, teimlatex, uxhlatex, \n";
+ print " wlatex, xhmlatex\n";
print " \n";
print " also 'tex', 'texi', and 'context' instead of 'latex'\n";
print " \n";
@@ -99,9 +115,70 @@ sub showInstrucions(){
print " variable, the requests for the commands \"latex\",\n";
print " \"tex\", etc. can be replaced with other equivalent\n";
print " commands (e.g., \"tex -fmt=latex\").\n";
+
+ print "--------------------------------------------------------------------------\n";
+print " Private configuration file: mk4ht.cfg\n";
+print "--------------------------------------------------------------------------\n";
+print "\n";
+print "A private configuration file mk4ht.cfg or .mk4ht may be placed at the\n";
+print "work or home directory, to update existing commands and introduce new\n";
+print "ones. The configuration file may contain records of the following\n";
+print "kinds.\n";
+print "\n";
+print " # Comment\n";
+print " \n";
+print " name = type\n";
+print " Defines a ht*tex like command, and assocites to it the \n";
+print " TeX compiler of the specified type. Examples of TeX \n";
+print " types: latex, tex, texi, and context.\n";
+print " \n";
+print " name.tex = options\n";
+print " Command line options for the compilation under\n";
+print " the (la)tex compiler\n";
+print " \n";
+print " name.tex4ht = options\n";
+print " Command line options for tex4ht.c \n";
+print " \n";
+print " name.t4ht = options\n";
+print " Command line options for t4ht.c\n";
+print " \n";
+print "Each record should appear in a different line. Variants\n";
+print "`name.tex += options', `name.tex4ht += options',\n";
+print "`name.t4ht += options' of the above records are also allowed.\n";
+print "They append the listed options to the base values.\n";
+print "\n";
+print "Example:\n";
+print "\n";
+print " foohlatex = latex\n";
+print " foohlatex.tex = xhtml,uni-html4\n";
+print " foohlatex.tex4ht += -cunihtf\n";
+print " foohlatex.t4ht = -cvalidate\n";
+print " htlatex.t4ht += -d./\n";
+
+
+ print "--------------------------------------------------------------------------\n";
+print " Deleting files\n";
+print "--------------------------------------------------------------------------\n";
+print "\n";
+print "The configuration file mk4ht.cfg may also contain requests for\n";
+print "removing files created in the work directory during the compilation.\n";
+print "The requests are to be made through records of the following forms.\n";
+print "\n";
+print " clean ext1 ext2 ...\n";
+print " The extensions of the file name to be removed.\n";
+print " \n";
+print " clean.name ext1 ext2 ...\n";
+print " Conditional request. The `name' refers to the ht*tex \n";
+print " like command in use.\n";
+print "\n";
+print "Example:\n";
+print " clean dvi idv\n";
+print " clean.foohlatex lg \n";
+print " clean.htlatex lg tmp\n";
+
}
-print "mk4ht (2005-09-23-22:09)\n";
+print "mk4ht (2006-08-28-20:45)\n";
if( !@ARGV ){
print "improper command\n";
showInstrucions(); exit(1);
@@ -110,22 +187,118 @@ my @command=("","","","","");
my $i=0;
my $j=0;
my $param;
+my $name;
+my $compiler;
+my $tex;
+my $tex4ht;
+my $t4ht;
+my $texp;
+my $tex4htp = "";
+my $t4htp = "";
+my @ext;
+
foreach $param (@ARGV) {
if( $i == 0 ){
+ my $inf;
+open $inf, "<mk4ht.cfg"
+or
+( open $inf, "<.mk4ht"
+ or
+ (
+ open $inf, "<" . $ENV{HOME} . "/mk4ht.cfg"
+ or
+ (
+ open $inf, "<" . $ENV{HOME} . "/.mk4ht"
+ or $inf = ""
+) ) )
+;
+
+if( $inf ){
+ print "(mk4ht cfg)\n";
+ while(<$inf>) {
+ my($line) = $_;
+ chomp($line); # remove eoln char
+ if ($line =~ m|\s*#.*|) {}
+ elsif($line =~ m|^\s*(\S*)\.(\S*)\s*\+=\s*(.*\S)\s*$|) {
+ if( ($param."tex4ht") eq ($1.$2) ){
+ $tex4htp = $tex4htp . " " . $3;
+ }
+ elsif( ($param."t4ht") eq ($1.$2) ){
+ $t4htp = $t4htp . " " . $3;
+ }
+ elsif( ($param."tex") eq ($1.$2) ){
+ $texp = $texp . "," . $3;
+ }
+ }
+ elsif($line =~ m|^\s*(\S*)\.(\S*)\s*=\s*(.*\S)\s*$|) {
+ if( ($param."tex4ht") eq ($1.$2) ){
+ $tex4ht = $3 . " ";
+ $tex4htp = "";
+ }
+ elsif( ($param."t4ht") eq ($1.$2) ){
+ $t4ht = $3 . " ";
+ $t4htp = "";
+ }
+ elsif( ($param."tex") eq ($1.$2) ){
+ $tex = $3 . ",";
+ $texp = "";
+ }
+ }
+ elsif($line =~ m|^\s*(\S*)\s*=\s*(.*\S)\s*$|) {
+ if( $param eq $1 ){
+ $name = $1;
+ $compiler = $2;
+ }
+ }
+ elsif($line =~ m|^\s*clean\s+(.+)|){
+ my(@array) = split(' ',$1);
+ push(@ext,@array);
+} elsif($line =~ m|^\s*clean\.(\S+)\s+(.+)|){
+ if( $1 eq @ARGV[0] ){
+ my(@array) = split(' ',$2);
+ push(@ext,@array);
+} }
+
+ elsif ($line) { print "--- Error --- " . $line . "\n"; }
+ }
+ close $inf;
+}
+
for( $j=1; $j<$#options; $j+=6 ){
if( $param eq $options[$j] ){
- if( $options[$j-1] eq "" ){
- $command[0] = $options[$j];
+ if( $name ){
+ $command[0] = "ht".$compiler;
+if( $tex ){ $command[2] = $tex; } else { $command[2] = ""; }
+if( $tex4ht ){ $command[3] = $tex4ht; } else { $command[3] = ""; }
+if( $t4ht ){ $command[4] = $t4ht; } else { $command[4] = ""; }
+
} else {
- $command[0] = "ht".$options[$j+1];
+ if( $options[$j-1] eq "" ){
+ $command[0] = $options[$j];
+} else {
+ $command[0] = "ht".$options[$j+1];
+}
+if( $tex ){ $command[2] = $tex; } else { $command[2] = $options[$j+2]; }
+if( $tex4ht ){ $command[3] = $tex4ht; } else { $command[3] = $options[$j+3]; }
+if( $t4ht ){ $command[4] = $t4ht; } else { $command[4] = $options[$j+4]; }
+
}
- $command[2] = $options[$j+2];
- $command[3] = $options[$j+3];
- $command[4] = $options[$j+4];
+ if( $texp ){ $command[2] = $command[2] . "," . $texp; }
+if( $tex4htp){ $command[3] = $command[3] . " " . $tex4htp; }
+if( $t4htp ){ $command[4] = $command[4] . " " . $t4htp; }
+
last;
} }
- if( $j>$#options ){ print "improper command: $param \n";
- showInstrucions(); exit(1); }
+ if( $j>$#options ){
+ if( $name ){ $command[0] = "ht".$compiler;
+if( $tex ){ $command[2] = $tex; } else { $command[2] = ""; }
+if( $tex4ht ){ $command[3] = $tex4ht; } else { $command[3] = ""; }
+if( $t4ht ){ $command[4] = $t4ht; } else { $command[4] = ""; }
+ }
+ else {
+ print "improper command: $param \n";
+ showInstrucions(); exit(1);
+ } }
} elsif ( $i== 1 ) {
$command[1] = $param;
} elsif ( $i== 2 ) {
@@ -148,6 +321,22 @@ print "$commando\n";
my $rtrn;
if( $rtrn = system($commando) ){
print "--- error --- failed to execute command\n";
-} else { exit( !$rtrn ); }
+} else {
+ my $file;
+my $ext;
+my(@array) = split('\.',@ARGV[1]);
+my $texFile = @array[0];
+opendir(DIR,".") ;
+while ($file = readdir(DIR) ){
+ if(index($file,$texFile) == 0 ){
+ foreach $ext(@ext){
+ if (index($file,$ext,length($file)-length($ext)) != -1){
+ if( stat($file)){
+ unlink($file);
+ print "Deleted: ". $file . "\n";
+} } } } }
+closedir(DIR);
+ exit( !$rtrn );
+}
diff --git a/Master/bin/i386-freebsd/mllatex b/Master/bin/i386-freebsd/mllatex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/mllatex
+++ b/Master/bin/i386-freebsd/mllatex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/mltex b/Master/bin/i386-freebsd/mltex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/mltex
+++ b/Master/bin/i386-freebsd/mltex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/mmafm b/Master/bin/i386-freebsd/mmafm
index 00949ba8d6c..127b477b903 100755
--- a/Master/bin/i386-freebsd/mmafm
+++ b/Master/bin/i386-freebsd/mmafm
Binary files differ
diff --git a/Master/bin/i386-freebsd/mmpfb b/Master/bin/i386-freebsd/mmpfb
index 70d53e9cfcb..b3647cfe2ec 100755
--- a/Master/bin/i386-freebsd/mmpfb
+++ b/Master/bin/i386-freebsd/mmpfb
Binary files differ
diff --git a/Master/bin/i386-freebsd/mpost b/Master/bin/i386-freebsd/mpost
index ab19c26fd9e..a25ae844dbd 100755
--- a/Master/bin/i386-freebsd/mpost
+++ b/Master/bin/i386-freebsd/mpost
Binary files differ
diff --git a/Master/bin/i386-freebsd/mpstools b/Master/bin/i386-freebsd/mpstools
new file mode 100755
index 00000000000..b4c8f634548
--- /dev/null
+++ b/Master/bin/i386-freebsd/mpstools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart mpstools.rb "$@"
diff --git a/Master/bin/i386-freebsd/mpto b/Master/bin/i386-freebsd/mpto
index eea9d7c8308..ae7cfa863ad 100755
--- a/Master/bin/i386-freebsd/mpto
+++ b/Master/bin/i386-freebsd/mpto
Binary files differ
diff --git a/Master/bin/i386-freebsd/mptopdf b/Master/bin/i386-freebsd/mptopdf
index afced152700..980a3123d1a 120000..100755
--- a/Master/bin/i386-freebsd/mptopdf
+++ b/Master/bin/i386-freebsd/mptopdf
@@ -1 +1,2 @@
-texexec \ No newline at end of file
+#!/bin/sh
+texmfstart mptopdf.pl "$@"
diff --git a/Master/bin/i386-freebsd/mtxtools b/Master/bin/i386-freebsd/mtxtools
new file mode 100755
index 00000000000..2922e0b4674
--- /dev/null
+++ b/Master/bin/i386-freebsd/mtxtools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart mtxtools.rb "$@"
diff --git a/Master/bin/i386-freebsd/musixflx b/Master/bin/i386-freebsd/musixflx
index 4aed17d8756..58229f956b4 100755
--- a/Master/bin/i386-freebsd/musixflx
+++ b/Master/bin/i386-freebsd/musixflx
Binary files differ
diff --git a/Master/bin/i386-freebsd/newer b/Master/bin/i386-freebsd/newer
index 2b5eefce76a..644d3728c02 100755
--- a/Master/bin/i386-freebsd/newer
+++ b/Master/bin/i386-freebsd/newer
Binary files differ
diff --git a/Master/bin/i386-freebsd/odvicopy b/Master/bin/i386-freebsd/odvicopy
index 740ca2ca9c8..e2b3de74d80 100755
--- a/Master/bin/i386-freebsd/odvicopy
+++ b/Master/bin/i386-freebsd/odvicopy
Binary files differ
diff --git a/Master/bin/i386-freebsd/odvitype b/Master/bin/i386-freebsd/odvitype
index 2ca772d83f7..a36bf37209e 100755
--- a/Master/bin/i386-freebsd/odvitype
+++ b/Master/bin/i386-freebsd/odvitype
Binary files differ
diff --git a/Master/bin/i386-freebsd/omega b/Master/bin/i386-freebsd/omega
index 590cd096896..13ebe1c6d61 100755
--- a/Master/bin/i386-freebsd/omega
+++ b/Master/bin/i386-freebsd/omega
Binary files differ
diff --git a/Master/bin/i386-freebsd/omfonts b/Master/bin/i386-freebsd/omfonts
index 17815e9df92..c167bfc7083 100755
--- a/Master/bin/i386-freebsd/omfonts
+++ b/Master/bin/i386-freebsd/omfonts
Binary files differ
diff --git a/Master/bin/i386-freebsd/otangle b/Master/bin/i386-freebsd/otangle
index 1d5db99ec21..61120616bdc 100755
--- a/Master/bin/i386-freebsd/otangle
+++ b/Master/bin/i386-freebsd/otangle
Binary files differ
diff --git a/Master/bin/i386-freebsd/otfinfo b/Master/bin/i386-freebsd/otfinfo
index b36dd862fc0..f1e3f07d1ca 100755
--- a/Master/bin/i386-freebsd/otfinfo
+++ b/Master/bin/i386-freebsd/otfinfo
Binary files differ
diff --git a/Master/bin/i386-freebsd/otftotfm b/Master/bin/i386-freebsd/otftotfm
index c6f41e41985..cc9eac09d03 100755
--- a/Master/bin/i386-freebsd/otftotfm
+++ b/Master/bin/i386-freebsd/otftotfm
Binary files differ
diff --git a/Master/bin/i386-freebsd/otp2ocp b/Master/bin/i386-freebsd/otp2ocp
index 88442e2feaf..f1ff9050c20 100755
--- a/Master/bin/i386-freebsd/otp2ocp
+++ b/Master/bin/i386-freebsd/otp2ocp
Binary files differ
diff --git a/Master/bin/i386-freebsd/outocp b/Master/bin/i386-freebsd/outocp
index 34125941ea3..ddbd8629973 100755
--- a/Master/bin/i386-freebsd/outocp
+++ b/Master/bin/i386-freebsd/outocp
Binary files differ
diff --git a/Master/bin/i386-freebsd/patgen b/Master/bin/i386-freebsd/patgen
index e4a29f81502..f4b3749c7ad 100755
--- a/Master/bin/i386-freebsd/patgen
+++ b/Master/bin/i386-freebsd/patgen
Binary files differ
diff --git a/Master/bin/i386-freebsd/pdfclose b/Master/bin/i386-freebsd/pdfclose
index 4de05d9aa3f..e22b380c7fc 100755
--- a/Master/bin/i386-freebsd/pdfclose
+++ b/Master/bin/i386-freebsd/pdfclose
Binary files differ
diff --git a/Master/bin/i386-freebsd/pdfcrop b/Master/bin/i386-freebsd/pdfcrop
index afced152700..c7d2319af7a 120000..100755
--- a/Master/bin/i386-freebsd/pdfcrop
+++ b/Master/bin/i386-freebsd/pdfcrop
@@ -1 +1,308 @@
-texexec \ No newline at end of file
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
+ if 0;
+use strict;
+$^W=1; # turn warning on
+#
+# pdfcrop.pl
+#
+# Copyright (C) 2002, 2004 Heiko Oberdiek.
+#
+# This program may be distributed and/or modified under the
+# conditions of the LaTeX Project Public License, either version 1.2
+# of this license or (at your option) any later version.
+# The latest version of this license is in
+# http://www.latex-project.org/lppl.txt
+# and version 1.2 or later is part of all distributions of LaTeX
+# version 1999/12/01 or later.
+#
+# See file "readme.txt" for a list of files that belong to this project.
+#
+# This file "pdfcrop.pl" may be renamed to "pdfcrop"
+# for installation purposes.
+#
+my $file = "pdfcrop.pl";
+my $program = uc($&) if $file =~ /^\w+/;
+my $version = "1.5";
+my $date = "2004/06/24";
+my $author = "Heiko Oberdiek";
+my $copyright = "Copyright (c) 2002, 2004 by $author.";
+#
+# Reqirements: Perl5, Ghostscript
+# History:
+# 2002/10/30 v1.0: First release.
+# 2002/10/30 v1.1: Option --hires added.
+# 2002/11/04 v1.2: "nul" instead of "/dev/null" for windows.
+# 2002/11/23 v1.3: Use of File::Spec module's "devnull" call.
+# 2002/11/29 v1.4: Option --papersize added.
+# 2004/06/24 v1.5: Clear map file entries so that pdfTeX
+# does not touch the fonts.
+#
+
+### program identification
+my $title = "$program $version, $date - $copyright\n";
+
+### error strings
+my $Error = "!!! Error:"; # error prefix
+
+### string constants for Ghostscript run
+# get Ghostscript command name
+my $GS = "gs";
+$GS = "gs386" if $^O =~ /dos/i;
+$GS = "gsos2" if $^O =~ /os2/i;
+$GS = "gswin32c" if $^O =~ /mswin32/i;
+$GS = "gswin32c" if $^O =~ /cygwin/i;
+
+# Windows detection (no SIGHUP)
+my $Win = 0;
+$Win = 1 if $^O =~ /mswin32/i;
+$Win = 1 if $^O =~ /cygwin/i;
+
+# "null" device
+use File::Spec::Functions qw(devnull);
+my $null = devnull();
+
+### variables
+my $inputfile = "";
+my $outputfile = "";
+my $tmp = "tmp-\L$program\E-$$";
+
+### option variables
+my @bool = ("false", "true");
+$::opt_help = 0;
+$::opt_debug = 0;
+$::opt_verbose = 0;
+$::opt_gscmd = $GS;
+$::opt_pdftexcmd = "pdftex";
+$::opt_margins = "0 0 0 0";
+$::opt_clip = 0;
+$::opt_hires = 0;
+$::opt_papersize = "";
+
+my $usage = <<"END_OF_USAGE";
+${title}Syntax: \L$program\E [options] <input[.pdf]> [output file]
+Function: Margins are calculated and removed for each page in the file.
+Options: (defaults:)
+ --help print usage
+ --(no)verbose verbose printing ($bool[$::opt_verbose])
+ --(no)debug debug informations ($bool[$::opt_debug])
+ --gscmd <name> call of ghostscript ($::opt_gscmd)
+ --pdftexcmd <name> call of pdfTeX ($::opt_pdftexcmd)
+ --margins "<left> <top> <right> <bottom>" ($::opt_margins)
+ add extra margins, unit is bp. If only one number is
+ given, then it is used for all margins, in the case
+ of two numbers they are also used for right and bottom.
+ --(no)clip clipping support, if margins are set ($bool[$::opt_clip])
+ --(no)hires using `%%HiResBoundingBox' ($bool[$::opt_hires])
+ instead of `%%BoundingBox'
+ --papersize <foo> parameter for gs's -sPAPERSIZE=<foo>,
+ use only with older gs versions <7.32 ($::opt_papersize)
+Examples:
+ \L$program\E --margins 10 input.pdf output.pdf
+ \L$program\E --margins '5 10 5 20' --clip input.pdf output.pdf
+END_OF_USAGE
+
+### process options
+my @OrgArgv = @ARGV;
+use Getopt::Long;
+GetOptions(
+ "help!",
+ "debug!",
+ "verbose!",
+ "gscmd=s",
+ "pdftexcmd=s",
+ "margins=s",
+ "clip!",
+ "hires!",
+ "papersize=s",
+) or die $usage;
+!$::opt_help or die $usage;
+
+$::opt_verbose = 1 if $::opt_debug;
+
+@ARGV >= 1 or die $usage;
+
+print $title;
+
+@ARGV <= 2 or die "$Error Too many files!\n";
+
+### input file
+$inputfile = shift @ARGV;
+
+if (! -f $inputfile) {
+ if (-f "$inputfile.pdf") {
+ $inputfile .= ".pdf";
+ }
+ else {
+ die "$Error Input file `$inputfile' not found!\n";
+ }
+}
+
+print "* Input file: $inputfile\n" if $::opt_debug;
+
+### output file
+if (@ARGV) {
+ $outputfile = shift @ARGV;
+}
+else {
+ $outputfile = $inputfile;
+ $outputfile =~ s/\.pdf$//i;
+ $outputfile .= "-crop.pdf";
+}
+
+print "* Output file: $outputfile\n" if $::opt_debug;
+
+### margins
+my ($llx, $lly, $urx, $ury) = (0, 0, 0, 0);
+if ($::opt_margins =~
+ /^\s*([\-\.\d]+)\s+([\-\.\d]+)\s+([\-\.\d]+)\s+([\-\.\d]+)\s*$/) {
+ ($llx, $lly, $urx, $ury) = ($1, $2, $3, $4);
+}
+else {
+ if ($::opt_margins =~ /^\s*([\-\.\d]+)\s+([\-\.\d]+)\s*$/) {
+ ($llx, $lly, $urx, $ury) = ($1, $2, $1, $2);
+ }
+ else {
+ if ($::opt_margins =~ /^\s*([\-\.\d]+)\s*$/) {
+ ($llx, $lly, $urx, $ury) = ($1, $1, $1, $1);
+ }
+ else {
+ die "$Error Parse error (option --margins)!\n";
+ }
+ }
+}
+print "* Margins: $llx $lly $urx $ury\n" if $::opt_debug;
+
+### cleanup system
+my @unlink_files = ();
+my $exit_code = 1;
+sub clean {
+ print "* Cleanup\n" if $::opt_debug;
+ if ($::opt_debug) {
+ print "* Temporary files: @unlink_files\n";
+ }
+ else {
+ for (; @unlink_files>0; ) {
+ unlink shift @unlink_files;
+ }
+ }
+}
+sub cleanup {
+ clean();
+ exit($exit_code);
+}
+$SIG{'INT'} = \&cleanup;
+$SIG{'__DIE__'} = \&clean;
+
+### Calculation of BoundingBoxes
+
+my $cmd = "$::opt_gscmd -sDEVICE=bbox -dBATCH -dNOPAUSE ";
+$cmd .= "-sPAPERSIZE=$::opt_papersize " if $::opt_papersize;
+$cmd .= "-c save pop -f " . $inputfile;
+my $cmdpipe = $cmd . " 2>&1 1>$null |";
+
+my $tmpfile = "$tmp.tex";
+push @unlink_files, $tmpfile;
+open(TMP, ">$tmpfile") or
+ die "$Error Cannot write tmp file `$tmpfile'!\n";
+print TMP "\\def\\pdffile{$inputfile}\n";
+print TMP <<'END_TMP_HEAD';
+\csname pdfmapfile\endcsname{}
+\def\page #1 [#2 #3 #4 #5]{%
+ \count0=#1\relax
+ \setbox0=\hbox{%
+ \pdfximage page #1{\pdffile}%
+ \pdfrefximage\pdflastximage
+ }%
+ \pdfhorigin=-#2bp\relax
+ \pdfvorigin=#3bp\relax
+ \pdfpagewidth=#4bp\relax
+ \advance\pdfpagewidth by -#2bp\relax
+ \pdfpageheight=#5bp\relax
+ \advance\pdfpageheight by -#3bp\relax
+ \ht0=\pdfpageheight
+ \shipout\box0\relax
+}
+\def\pageclip #1 [#2 #3 #4 #5][#6 #7 #8 #9]{%
+ \count0=#1\relax
+ \dimen0=#4bp\relax \advance\dimen0 by -#2bp\relax
+ \edef\imagewidth{\the\dimen0}%
+ \dimen0=#5bp\relax \advance\dimen0 by -#3bp\relax
+ \edef\imageheight{\the\dimen0}%
+ \pdfximage page #1{\pdffile}%
+ \setbox0=\hbox{%
+ \kern -#2bp\relax
+ \lower #3bp\hbox{\pdfrefximage\pdflastximage}%
+ }%
+ \wd0=\imagewidth\relax
+ \ht0=\imageheight\relax
+ \dp0=0pt\relax
+ \pdfhorigin=#6pt\relax
+ \pdfvorigin=#7bp\relax
+ \pdfpagewidth=\imagewidth
+ \advance\pdfpagewidth by #6bp\relax
+ \advance\pdfpagewidth by #8bp\relax
+ \pdfpageheight=\imageheight\relax
+ \advance\pdfpageheight by #7bp\relax
+ \advance\pdfpageheight by #9bp\relax
+ \pdfxform0\relax
+ \shipout\hbox{\pdfrefxform\pdflastxform}%
+}%
+END_TMP_HEAD
+
+print "* Running ghostscript for BoundingBox calculation ...\n"
+ if $::opt_verbose;
+print "* Ghostscript pipe: $cmdpipe\n" if $::opt_debug;
+
+my $page = 0;
+open(CMD, $cmdpipe) or
+ die "$Error Cannot call ghostscript!\n";
+while (<CMD>) {
+ my $bb = ($::opt_hires) ? "%%HiResBoundingBox" : "%%BoundingBox";
+ next unless
+ /^$bb:\s*([\.\d]+) ([\.\d]+) ([\.\d]+) ([\.\d]+)/o;
+ $page++;
+ print "* Page $page: $1 $2 $3 $4\n" if $::opt_verbose;
+ if ($::opt_clip) {
+ print TMP "\\pageclip $page [$1 $2 $3 $4][$llx $lly $urx $ury]\n";
+ }
+ else {
+ my ($a, $b, $c, $d) = ($1 - $llx, $2 - $ury, $3 + $urx, $4 + $lly);
+ print TMP "\\page $page [$a $b $c $d]\n";
+ }
+}
+close(CMD);
+
+print TMP "\\csname \@\@end\\endcsname\n\\end\n";
+close(TMP);
+
+### Run pdfTeX
+
+push @unlink_files, "$tmp.log";
+if ($::opt_verbose) {
+ $cmd = "$::opt_pdftexcmd -interaction=nonstopmode $tmp";
+}
+else {
+ $cmd = "$::opt_pdftexcmd -interaction=batchmode $tmp";
+}
+print "* Running pdfTeX ...\n" if $::opt_verbose;
+print "* pdfTeX call: $cmd\n" if $::opt_debug;
+if ($::opt_verbose) {
+ system($cmd);
+}
+else {
+ `$cmd`;
+}
+if ($?) {
+ die "$Error pdfTeX run failed!\n";
+}
+
+### Move temp file to output
+rename "$tmp.pdf", $outputfile or
+ die "$Error Cannot move `$tmp.pdf' to `$outputfile'!\n";
+
+print "==> $page pages written on `$outputfile'.\n";
+
+$exit_code = 0;
+cleanup();
+
+__END__
diff --git a/Master/bin/i386-freebsd/pdfcslatex b/Master/bin/i386-freebsd/pdfcslatex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/pdfcslatex
+++ b/Master/bin/i386-freebsd/pdfcslatex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pdfcsplain b/Master/bin/i386-freebsd/pdfcsplain
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/pdfcsplain
+++ b/Master/bin/i386-freebsd/pdfcsplain
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pdfetex b/Master/bin/i386-freebsd/pdfetex
index 216910c8296..f68cc91498e 100755..120000
--- a/Master/bin/i386-freebsd/pdfetex
+++ b/Master/bin/i386-freebsd/pdfetex
Binary files differ
diff --git a/Master/bin/i386-freebsd/pdfjadetex b/Master/bin/i386-freebsd/pdfjadetex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/pdfjadetex
+++ b/Master/bin/i386-freebsd/pdfjadetex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pdflatex b/Master/bin/i386-freebsd/pdflatex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/pdflatex
+++ b/Master/bin/i386-freebsd/pdflatex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pdfmex b/Master/bin/i386-freebsd/pdfmex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/pdfmex
+++ b/Master/bin/i386-freebsd/pdfmex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pdfopen b/Master/bin/i386-freebsd/pdfopen
index 1f56c8864df..fc23d646dba 100755
--- a/Master/bin/i386-freebsd/pdfopen
+++ b/Master/bin/i386-freebsd/pdfopen
Binary files differ
diff --git a/Master/bin/i386-freebsd/pdfplatex b/Master/bin/i386-freebsd/pdfplatex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/pdfplatex
+++ b/Master/bin/i386-freebsd/pdfplatex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pdftex b/Master/bin/i386-freebsd/pdftex
index eb4e1e5aff7..7bf0163dcae 120000..100755
--- a/Master/bin/i386-freebsd/pdftex
+++ b/Master/bin/i386-freebsd/pdftex
Binary files differ
diff --git a/Master/bin/i386-freebsd/pdftools b/Master/bin/i386-freebsd/pdftools
new file mode 100755
index 00000000000..92ee803a868
--- /dev/null
+++ b/Master/bin/i386-freebsd/pdftools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart pdftools.rb "$@"
diff --git a/Master/bin/i386-freebsd/pdfxmltex b/Master/bin/i386-freebsd/pdfxmltex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/pdfxmltex
+++ b/Master/bin/i386-freebsd/pdfxmltex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/perltex b/Master/bin/i386-freebsd/perltex
index 09a656dae3f..dd8dda2804b 100755
--- a/Master/bin/i386-freebsd/perltex
+++ b/Master/bin/i386-freebsd/perltex
@@ -15,19 +15,23 @@
#
# This is a generated file.
#
-# Copyright (C) 2004 by Scott Pakin <scott+pt@pakin.org>
+# Copyright (C) 2006, Scott Pakin <scott+pt@pakin.org>
#
# This file may be distributed and/or modified under the conditions
-# of the LaTeX Project Public License, either version 1.2 of this
+# of the LaTeX Project Public License, either version 1.3c of this
# license or (at your option) any later version. The latest
# version of this license is in:
#
# http://www.latex-project.org/lppl.txt
#
-# and version 1.2 or later is part of all distributions of LaTeX
-# version 1999/12/01 or later.
+# and version 1.3c or later is part of all distributions of LaTeX
+# version 2006/05/20 or later.
#-------------------------------------------------------------------
+sub top_level_eval ($)
+{
+ return eval $_[0];
+}
use Safe;
use Opcode;
use Getopt::Long;
@@ -49,6 +53,7 @@ my $fromflag;
my $doneflag;
my $logfile;
my $sandbox = new Safe;
+my $sandbox_eval;
my $latexpid;
$latexprog = $ENV{"PERLTEX"} || "latex";
Getopt::Long::Configure("require_order", "pass_through");
@@ -97,9 +102,14 @@ if (!$latexpid) {
exec {$latexcmdline[0]} @latexcmdline;
die "exec('@latexcmdline'): $!\n";
}
-@permittedops=(":browse") if $#permittedops==-1;
-@permittedops=(Opcode::full_opset()) if !$runsafely;
-$sandbox->permit_only (@permittedops);
+if ($runsafely) {
+ @permittedops=(":browse") if $#permittedops==-1;
+ $sandbox->permit_only (@permittedops);
+ $sandbox_eval = sub {$sandbox->reval($_[0])};
+}
+else {
+ $sandbox_eval = \&top_level_eval;
+}
while (1) {
my $awaitexists = sub {
while (!-e $_[0]) {
@@ -136,12 +146,18 @@ while (1) {
}
my $perlcode;
if ($optag eq "DEF") {
- $perlcode =
- sprintf "sub %s {%s}\n",
- $macroname, $otherstuff[0];
+ $perlcode =
+ sprintf "sub %s {%s}\n",
+ $macroname, $otherstuff[0];
+ }
+ elsif ($optag eq "USE") {
+ $perlcode = sprintf "%s (%s);\n", $macroname, join(", ", @otherstuff);
+ }
+ elsif ($optag eq "RUN") {
+ $perlcode = $otherstuff[0];
}
else {
- $perlcode = sprintf "%s (%s);\n", $macroname, join(", ", @otherstuff);
+ die "${progname}: Internal error -- unexpected operation tag \"$optag\"\n";
}
print LOGFILE "#" x 31, " PERL CODE ", "#" x 32, "\n";
print LOGFILE $perlcode, "\n";
@@ -151,13 +167,13 @@ while (1) {
my $warningmsg;
local $SIG{__WARN__} =
sub {chomp ($warningmsg=$_[0]); return 0};
- $result = $sandbox->reval ($perlcode);
+ $result = $sandbox_eval->($perlcode);
if (defined $warningmsg) {
$warningmsg =~ s/at \(eval \d+\) line \d+\W+//;
print LOGFILE "# ===> $warningmsg\n\n";
}
}
- $result="" if !$result;
+ $result="" if !$result || $optag eq "RUN";
if ($@) {
my $msg = $@;
$msg =~ s/at \(eval \d+\) line \d+\W+//;
diff --git a/Master/bin/i386-freebsd/pfb2pfa b/Master/bin/i386-freebsd/pfb2pfa
index 4bdd9ddacea..3613cbd15ee 100755
--- a/Master/bin/i386-freebsd/pfb2pfa
+++ b/Master/bin/i386-freebsd/pfb2pfa
Binary files differ
diff --git a/Master/bin/i386-freebsd/physe b/Master/bin/i386-freebsd/physe
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/physe
+++ b/Master/bin/i386-freebsd/physe
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/phyzzx b/Master/bin/i386-freebsd/phyzzx
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/phyzzx
+++ b/Master/bin/i386-freebsd/phyzzx
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pk2bm b/Master/bin/i386-freebsd/pk2bm
index 22201f8b4e8..545b4eeb229 100755
--- a/Master/bin/i386-freebsd/pk2bm
+++ b/Master/bin/i386-freebsd/pk2bm
Binary files differ
diff --git a/Master/bin/i386-freebsd/pktogf b/Master/bin/i386-freebsd/pktogf
index d760ae6c178..1905d203f33 100755
--- a/Master/bin/i386-freebsd/pktogf
+++ b/Master/bin/i386-freebsd/pktogf
Binary files differ
diff --git a/Master/bin/i386-freebsd/pktype b/Master/bin/i386-freebsd/pktype
index da8f2b363f6..cb648b1a9b2 100755
--- a/Master/bin/i386-freebsd/pktype
+++ b/Master/bin/i386-freebsd/pktype
Binary files differ
diff --git a/Master/bin/i386-freebsd/platex b/Master/bin/i386-freebsd/platex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/platex
+++ b/Master/bin/i386-freebsd/platex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/pltotf b/Master/bin/i386-freebsd/pltotf
index e8928e3b4fd..d575d240e70 100755
--- a/Master/bin/i386-freebsd/pltotf
+++ b/Master/bin/i386-freebsd/pltotf
Binary files differ
diff --git a/Master/bin/i386-freebsd/pooltype b/Master/bin/i386-freebsd/pooltype
index 3057c9da115..269e591cc8e 100755
--- a/Master/bin/i386-freebsd/pooltype
+++ b/Master/bin/i386-freebsd/pooltype
Binary files differ
diff --git a/Master/bin/i386-freebsd/ps2pk b/Master/bin/i386-freebsd/ps2pk
index 5af0ce18146..bb3a1c221d9 100755
--- a/Master/bin/i386-freebsd/ps2pk
+++ b/Master/bin/i386-freebsd/ps2pk
Binary files differ
diff --git a/Master/bin/i386-freebsd/ps4pdf b/Master/bin/i386-freebsd/ps4pdf
index 81f254a3735..cbdcb022926 100755
--- a/Master/bin/i386-freebsd/ps4pdf
+++ b/Master/bin/i386-freebsd/ps4pdf
@@ -1,6 +1,13 @@
#!/bin/sh
# Copyright (C) 2004, Thomas Esser. Public domain.
+# 2005-03-08: New option "--crop", Rolf Niepraschk.
+# dvips call only if the dvi file exist (RN).
+# 2005-06-27: ps2pdf call only if the ps file exist (RN).
+# 2006-04-05: "\RequirePackage{pst-pdf}" added to the (pdf)LaTeX calls
+# as suggested by Niall Murphy.
+# 2006-07-14: Better temp dir handling (suggested by Karl Berry) (RN).
+# 2006-07-23: New option --Xps2pdf and code cleanup (thanks to Karl Berry) (RN).
# First, work around bugs/limitations in some shells on some systems:
test -f /bin/sh5 && test -z "$RUNNING_SH5" \
@@ -22,7 +29,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
###############################################################################
cleanup()
{
- rc=$1
+ rc=$?
$needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \
&& { rm -f "$tmpdir"/*; cd /; rmdir "$tmpdir"; }
@@ -38,7 +45,7 @@ setupTmpDir()
{
$needsCleanup && return
- trap 'cleanup 1' 1 2 3 7 13 15
+ trap 'cleanup' 1 2 3 7 13 15
needsCleanup=true
(umask 077; mkdir "$tmpdir") \
|| abort "could not create directory \`$tmpdir'"
@@ -61,14 +68,17 @@ myexec()
if test $rc != 0; then
echo "$0: command $@ returned with code $rc"
cat <$log
- cleanup $rc
+ (exit $rc) # set return value
+ cleanup
fi
}
# some initializations
progname=pdflatexps
silent=true # default setting; change if you like
+crop=false
needsCleanup=false
+ps2pdf_opts="-dAutoRotatePages=/None"
tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/.$progname$$
log=$tmpdir/log
version="1.0"
@@ -76,10 +86,16 @@ version="1.0"
# look for optional things first
while
case $1 in
- --help|-h) echo "$0 [-v|-q] file"
- echo "Process LaTeX document containing PSforPDF macros."
- exit 0;;
+ --help|-h) echo "$0 [-v|-q|--crop|--version|--Xps2pdf OPT] FILE"
+ echo "Process LaTeX document FILE using the pst-pdf package,"
+ echo "including running latex, dvips, and ps2pdf as necessary."
+ echo "--Xps2pdf OPT passes OPT to ps2pdf."
+ echo " (-dAutoRotatePages=/None is always passed.)"
+ echo "--crop runs pdfcrop on ps2pdf output."
+ exit 0;;
--version) echo "$progname version $version"; exit 0;;
+ --crop|-c) crop=true;;
+ --Xps2pdf|-Xps2pdf) shift; ps2pdf_opts="$ps2pdf_opts $1";;
-q) silent=true;;
-v) silent=false;;
-*) echo "$progname: unknown option $1 ignored";;
@@ -88,17 +104,30 @@ while
do
shift
done
+
# remaining option: filename
file=$1
+if test -z "$file"; then
+ echo "$0: no file to process, try --help for more information." >&2
+ exit 1
+fi
# jobname von TeX: Verzeichnisse entfernen, evtl. vorhandene Extension
# entfernen.
job=`echo "x$1" | sed 's@x@@; s@.*/@@; s@\.[^.]*$@@'`
setupTmpDir
-myexec latex "$file"
-myexec dvips -Ppdf -o "$job-pics.ps" "$job.dvi"
-myexec ps2pdf -dAutoRotatePages=/None "$job-pics.ps" "$job-pics.pdf"
-myexec pdflatex "$file"
+myexec latex \
+ "\AtBeginDocument{\RequirePackage{pst-pdf}} \input{$file}"
+test -f "$job.dvi" && myexec dvips -Ppdf -o "$job-pics.ps" "$job.dvi"
+test -f "$job-pics.ps" && myexec ps2pdf \
+ "$ps2pdf_opts" "$job-pics.ps" "$job-pics.pdf"
+if $crop; then
+ myexec pdfcrop "$job-pics.pdf" "$job-pics-crop.pdf"
+ mv "$job-pics-crop.pdf" "$job-pics.pdf"
+fi
+myexec pdflatex \
+ "\AtBeginDocument{\RequirePackage{pst-pdf}} \input{$file}"
+true
+cleanup
-cleanup 0
diff --git a/Master/bin/i386-freebsd/psbook b/Master/bin/i386-freebsd/psbook
index f1a887abe91..2f972fb90c0 100755
--- a/Master/bin/i386-freebsd/psbook
+++ b/Master/bin/i386-freebsd/psbook
Binary files differ
diff --git a/Master/bin/i386-freebsd/psnup b/Master/bin/i386-freebsd/psnup
index 5e9a2bb87e6..5539bd03d2b 100755
--- a/Master/bin/i386-freebsd/psnup
+++ b/Master/bin/i386-freebsd/psnup
Binary files differ
diff --git a/Master/bin/i386-freebsd/psresize b/Master/bin/i386-freebsd/psresize
index 24b9ef5aa05..f9792b7f44c 100755
--- a/Master/bin/i386-freebsd/psresize
+++ b/Master/bin/i386-freebsd/psresize
Binary files differ
diff --git a/Master/bin/i386-freebsd/psselect b/Master/bin/i386-freebsd/psselect
index a74427a5a6b..7197c4cb312 100755
--- a/Master/bin/i386-freebsd/psselect
+++ b/Master/bin/i386-freebsd/psselect
Binary files differ
diff --git a/Master/bin/i386-freebsd/pstopdf b/Master/bin/i386-freebsd/pstopdf
new file mode 100755
index 00000000000..5b38ed426cb
--- /dev/null
+++ b/Master/bin/i386-freebsd/pstopdf
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart pstopdf.rb "$@"
diff --git a/Master/bin/i386-freebsd/pstops b/Master/bin/i386-freebsd/pstops
index 2a0dfbd01e0..c649b1d9520 100755
--- a/Master/bin/i386-freebsd/pstops
+++ b/Master/bin/i386-freebsd/pstops
Binary files differ
diff --git a/Master/bin/i386-freebsd/rlxtools b/Master/bin/i386-freebsd/rlxtools
new file mode 100755
index 00000000000..41cea40fc09
--- /dev/null
+++ b/Master/bin/i386-freebsd/rlxtools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart rlxtools.rb "$@"
diff --git a/Master/bin/i386-freebsd/runtools b/Master/bin/i386-freebsd/runtools
new file mode 100755
index 00000000000..ff9a333791b
--- /dev/null
+++ b/Master/bin/i386-freebsd/runtools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart runtools.rb "$@"
diff --git a/Master/bin/i386-freebsd/sjisconv b/Master/bin/i386-freebsd/sjisconv
index 97422d7e8a2..01c1bb1a245 100755
--- a/Master/bin/i386-freebsd/sjisconv
+++ b/Master/bin/i386-freebsd/sjisconv
Binary files differ
diff --git a/Master/bin/i386-freebsd/sjislatex b/Master/bin/i386-freebsd/sjislatex
index 2c9bc229c7b..68c554e6d71 100755
--- a/Master/bin/i386-freebsd/sjislatex
+++ b/Master/bin/i386-freebsd/sjislatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/sjispdflatex b/Master/bin/i386-freebsd/sjispdflatex
index 294c5b188d0..e8d070e9dc6 100755
--- a/Master/bin/i386-freebsd/sjispdflatex
+++ b/Master/bin/i386-freebsd/sjispdflatex
@@ -1,5 +1,22 @@
#! /bin/sh
+# Copyright (C) 1994-2006 Werner Lemberg <wl@gnu.org>
+#
+# 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 in doc/COPYING; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301 USA
+
n=1
argv=
diff --git a/Master/bin/i386-freebsd/t1ascii b/Master/bin/i386-freebsd/t1ascii
index f3803942353..bb980260c54 100755
--- a/Master/bin/i386-freebsd/t1ascii
+++ b/Master/bin/i386-freebsd/t1ascii
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1asm b/Master/bin/i386-freebsd/t1asm
index 999f0321f18..b64f133e3d1 100755
--- a/Master/bin/i386-freebsd/t1asm
+++ b/Master/bin/i386-freebsd/t1asm
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1binary b/Master/bin/i386-freebsd/t1binary
index 31aaf8f132f..1b422566549 100755
--- a/Master/bin/i386-freebsd/t1binary
+++ b/Master/bin/i386-freebsd/t1binary
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1disasm b/Master/bin/i386-freebsd/t1disasm
index b6f286bb5a0..6879a0abbc5 100755
--- a/Master/bin/i386-freebsd/t1disasm
+++ b/Master/bin/i386-freebsd/t1disasm
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1dotlessj b/Master/bin/i386-freebsd/t1dotlessj
index e0cf030e0f5..abbbbef61ce 100755
--- a/Master/bin/i386-freebsd/t1dotlessj
+++ b/Master/bin/i386-freebsd/t1dotlessj
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1lint b/Master/bin/i386-freebsd/t1lint
index abd8c31193a..d9e4adba655 100755
--- a/Master/bin/i386-freebsd/t1lint
+++ b/Master/bin/i386-freebsd/t1lint
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1mac b/Master/bin/i386-freebsd/t1mac
index f7710f60820..04a207a1da9 100755
--- a/Master/bin/i386-freebsd/t1mac
+++ b/Master/bin/i386-freebsd/t1mac
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1reencode b/Master/bin/i386-freebsd/t1reencode
index 92ce949c2b5..abf16bfb42e 100755
--- a/Master/bin/i386-freebsd/t1reencode
+++ b/Master/bin/i386-freebsd/t1reencode
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1testpage b/Master/bin/i386-freebsd/t1testpage
index bb2fe222b94..9c35dce1389 100755
--- a/Master/bin/i386-freebsd/t1testpage
+++ b/Master/bin/i386-freebsd/t1testpage
Binary files differ
diff --git a/Master/bin/i386-freebsd/t1unmac b/Master/bin/i386-freebsd/t1unmac
index 90119f2e341..c4d0bd5f73a 100755
--- a/Master/bin/i386-freebsd/t1unmac
+++ b/Master/bin/i386-freebsd/t1unmac
Binary files differ
diff --git a/Master/bin/i386-freebsd/t4ht b/Master/bin/i386-freebsd/t4ht
index 3d8809cc979..a205ac321ec 100755
--- a/Master/bin/i386-freebsd/t4ht
+++ b/Master/bin/i386-freebsd/t4ht
Binary files differ
diff --git a/Master/bin/i386-freebsd/tangle b/Master/bin/i386-freebsd/tangle
index 66b8b238e36..ed9ada7d5b8 100755
--- a/Master/bin/i386-freebsd/tangle
+++ b/Master/bin/i386-freebsd/tangle
Binary files differ
diff --git a/Master/bin/i386-freebsd/tcdialog b/Master/bin/i386-freebsd/tcdialog
index 1680dc5a031..eb6d79f52ce 100755
--- a/Master/bin/i386-freebsd/tcdialog
+++ b/Master/bin/i386-freebsd/tcdialog
Binary files differ
diff --git a/Master/bin/i386-freebsd/tex b/Master/bin/i386-freebsd/tex
index 3fa640129c4..ee32ee140d3 100755
--- a/Master/bin/i386-freebsd/tex
+++ b/Master/bin/i386-freebsd/tex
Binary files differ
diff --git a/Master/bin/i386-freebsd/tex4ht b/Master/bin/i386-freebsd/tex4ht
index 567079254ee..0995a9c930c 100755
--- a/Master/bin/i386-freebsd/tex4ht
+++ b/Master/bin/i386-freebsd/tex4ht
Binary files differ
diff --git a/Master/bin/i386-freebsd/texconfig b/Master/bin/i386-freebsd/texconfig
index 633ba7e807d..0dc3f753f0b 100755
--- a/Master/bin/i386-freebsd/texconfig
+++ b/Master/bin/i386-freebsd/texconfig
@@ -24,7 +24,7 @@ test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
progname=texconfig
# the version string
-version=1118467711 # seconds since `00:00:00 1970-01-01 UTC'
+version=1167506445 # seconds since `00:00:00 1970-01-01 UTC'
# date '+%s' (with GNU date)
envVars="
@@ -632,7 +632,7 @@ Get more help with
echoLocateBinary kpsewhich updmap fmtutil texconfig tex pdfetex mktexpk dvips dvipdfm
echo
echo '=========================== active config files =========================='
- echoLocateCfgfile texmf.cnf updmap.cfg fmtutil.cnf config.ps mktex.cnf XDvi pdftexconfig.tex config | sort +1
+ echoLocateCfgfile texmf.cnf updmap.cfg fmtutil.cnf config.ps mktex.cnf XDvi pdftexconfig.tex config | sort -k 2
echo
echo '============================= font map files ============================='
for m in psfonts.map pdftex.map ps2pk.map dvipdfm.map; do
diff --git a/Master/bin/i386-freebsd/texexec b/Master/bin/i386-freebsd/texexec
index 529d2a8dc23..2158172906a 100755
--- a/Master/bin/i386-freebsd/texexec
+++ b/Master/bin/i386-freebsd/texexec
@@ -1,24 +1,2 @@
#!/bin/sh
-
-test -f /bin/sh5 && test -z "$RUNNING_SH5" \
- && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
- && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5 $0 ${1+"$@"}; }
-unset RUNNING_SH5
-
-test -f /bin/bsh && test -z "$RUNNING_BSH" \
- && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
- && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
-unset RUNNING_BSH
-
-export PATH
-
-# hack around a bug in zsh:
-test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
-
-what=`echo $0 | sed 's@.*/@@'`
-
-p=`kpsewhich -format=texmfscripts $what.pl`
-{ test -n "$p" && test -f "$p"; } \
- || { echo "\`$what.pl' not found."; exit 1; }
-
-perl "$p" ${1+"$@"}
+texmfstart texexec.rb "$@"
diff --git a/Master/bin/i386-freebsd/texfont b/Master/bin/i386-freebsd/texfont
index afced152700..a91f786e3f8 120000..100755
--- a/Master/bin/i386-freebsd/texfont
+++ b/Master/bin/i386-freebsd/texfont
@@ -1 +1,2 @@
-texexec \ No newline at end of file
+#!/bin/sh
+texmfstart texfont.pl "$@"
diff --git a/Master/bin/i386-freebsd/texi2html b/Master/bin/i386-freebsd/texi2html
index 5ffaa1e9f4c..439651440fa 100755
--- a/Master/bin/i386-freebsd/texi2html
+++ b/Master/bin/i386-freebsd/texi2html
@@ -75,7 +75,7 @@ my $THISVERSION = '1.76';
my $THISPROG = "texi2html $THISVERSION"; # program name and version
# set by configure, prefix for the sysconfdir and so on
-my $prefix = '/data/TeXCol/binary_build/source.development/inst';
+my $prefix = '/home/manfred/VC/dante/TeXLive/binary-build/inst';
my $sysconfdir;
my $pkgdatadir;
my $datadir;
@@ -92,10 +92,10 @@ else
$sysconfdir = "/usr/local/etc";
}
-if ('/data/TeXCol/binary_build/source.development/inst' ne '@' . 'datadir@')
+if ('/home/manfred/VC/dante/TeXLive/binary-build/inst' ne '@' . 'datadir@')
{
- $pkgdatadir = eval '"/data/TeXCol/binary_build/source.development/inst/texi2html"';
- $datadir = eval '"/data/TeXCol/binary_build/source.development/inst"';
+ $pkgdatadir = eval '"/home/manfred/VC/dante/TeXLive/binary-build/inst/texi2html"';
+ $datadir = eval '"/home/manfred/VC/dante/TeXLive/binary-build/inst"';
}
else
{
diff --git a/Master/bin/i386-freebsd/texindex b/Master/bin/i386-freebsd/texindex
index 5e73e7b7b4a..f53ea3ef49e 100755
--- a/Master/bin/i386-freebsd/texindex
+++ b/Master/bin/i386-freebsd/texindex
Binary files differ
diff --git a/Master/bin/i386-freebsd/texmfstart b/Master/bin/i386-freebsd/texmfstart
new file mode 100755
index 00000000000..a886b2aa142
--- /dev/null
+++ b/Master/bin/i386-freebsd/texmfstart
@@ -0,0 +1,2556 @@
+#!/usr/bin/env ruby
+
+# program : texmfstart
+# copyright : PRAGMA Advanced Document Engineering
+# version : 1.9.0 - 2003/2006
+# author : Hans Hagen
+#
+# project : ConTeXt / eXaMpLe
+# info : j.hagen@xs4all.nl
+# www : www.pragma-pod.com / www.pragma-ade.com
+
+# no special requirements, i.e. no exa modules/classes used
+
+# texmfstart [switches] filename [optional arguments]
+#
+# ruby2exe texmfstart --help -> avoids stub test
+#
+# Of couse I can make this into a nice class, which i'll undoubtely will
+# do when I feel the need. In that case it will be part of a bigger game.
+
+# turning this into a service would be nice, so some day ...
+
+# --locate => provides location
+# --exec => exec instead of system
+# --iftouched=a,b => only if timestamp a<>b
+# --ifchanged=a,b => only if checksum changed
+#
+# file: path: bin:
+
+# texmfstart --exec bin:scite *.tex
+
+# we don't depend on other libs
+
+$: << File.expand_path(File.dirname($0)) ; $: << File.join($:.last,'lib') ; $:.uniq!
+
+require "rbconfig"
+require "md5"
+
+# kpse_merge_done: require 'base/kpseremote'
+# kpse_merge_done: require 'base/kpsedirect'
+# kpse_merge_done: require 'base/kpsefast'
+# kpse_merge_done: require 'base/merge'
+
+# kpse_merge_start
+
+# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpseremote.rb'
+
+# kpse_merge_done: require 'base/kpsefast'
+
+case ENV['KPSEMETHOD']
+ when /soap/o then # kpse_merge_done: require 'base/kpse/soap'
+ when /drb/o then # kpse_merge_done: require 'base/kpse/drb'
+ else # kpse_merge_done: require 'base/kpse/drb'
+end
+
+class KpseRemote
+
+ @@port = ENV['KPSEPORT'] || 7000
+ @@method = ENV['KPSEMETHOD'] || 'drb'
+
+ def KpseRemote::available?
+ @@method && @@port
+ end
+
+ def KpseRemote::start_server(port=nil)
+ kpse = KpseServer.new(port || @@port)
+ kpse.start
+ end
+
+ def KpseRemote::start_client(port=nil) # keeps object in server
+ kpseclient = KpseClient.new(port || @@port)
+ kpseclient.start
+ kpse = kpseclient.object
+ tree = kpse.choose(KpseUtil::identify, KpseUtil::environment)
+ [kpse, tree]
+ end
+
+ def KpseRemote::fetch(port=nil) # no need for defining methods but slower, send whole object
+ kpseclient = KpseClient.new(port || @@port)
+ kpseclient.start
+ kpseclient.object.fetch(KpseUtil::identify, KpseUtil::environment) rescue nil
+ end
+
+ def initialize(port=nil)
+ if KpseRemote::available? then
+ begin
+ @kpse, @tree = KpseRemote::start_client(port)
+ rescue
+ @kpse, @tree = nil, nil
+ end
+ else
+ @kpse, @tree = nil, nil
+ end
+ end
+
+ def progname=(value)
+ @kpse.set(@tree,'progname',value)
+ end
+ def format=(value)
+ @kpse.set(@tree,'format',value)
+ end
+ def engine=(value)
+ @kpse.set(@tree,'engine',value)
+ end
+
+ def progname
+ @kpse.get(@tree,'progname')
+ end
+ def format
+ @kpse.get(@tree,'format')
+ end
+ def engine
+ @kpse.get(@tree,'engine')
+ end
+
+ def load
+ @kpse.load(KpseUtil::identify, KpseUtil::environment)
+ end
+ def okay?
+ @kpse && @tree
+ end
+ def set(key,value)
+ @kpse.set(@tree,key,value)
+ end
+ def load_cnf
+ @kpse.load_cnf(@tree)
+ end
+ def load_lsr
+ @kpse.load_lsr(@tree)
+ end
+ def expand_variables
+ @kpse.expand_variables(@tree)
+ end
+ def expand_braces(str)
+ clean_name(@kpse.expand_braces(@tree,str))
+ end
+ def expand_path(str)
+ clean_name(@kpse.expand_path(@tree,str))
+ end
+ def expand_var(str)
+ clean_name(@kpse.expand_var(@tree,str))
+ end
+ def show_path(str)
+ clean_name(@kpse.show_path(@tree,str))
+ end
+ def var_value(str)
+ clean_name(@kpse.var_value(@tree,str))
+ end
+ def find_file(filename)
+ clean_name(@kpse.find_file(@tree,filename))
+ end
+ def find_files(filename,first=false)
+ # dodo: each filename
+ @kpse.find_files(@tree,filename,first)
+ end
+
+ private
+
+ def clean_name(str)
+ str.gsub(/\\/,'/')
+ end
+
+end
+
+
+# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpsefast.rb'
+
+# module : base/kpsefast
+# copyright : PRAGMA Advanced Document Engineering
+# version : 2005
+# author : Hans Hagen
+#
+# project : ConTeXt / eXaMpLe
+# concept : Hans Hagen
+# info : j.hagen@xs4all.nl
+
+# todo: multiple cnf files
+#
+
+class String
+
+ def split_path
+ if self =~ /\;/o || self =~ /^[a-z]\:/io then
+ self.split(";")
+ else
+ self.split(":")
+ end
+ end
+
+end
+
+class Array
+
+ def join_path
+ self.join(File::PATH_SEPARATOR)
+ end
+
+end
+
+class File
+
+ def File.locate_file(path,name)
+ begin
+ files = Dir.entries(path)
+ if files.include?(name) then
+ fullname = File.join(path,name)
+ return fullname if FileTest.file?(fullname)
+ end
+ files.each do |p|
+ fullname = File.join(path,p)
+ if p != '.' and p != '..' and FileTest.directory?(fullname) and result = locate_file(fullname,name) then
+ return result
+ end
+ end
+ rescue
+ # bad path
+ end
+ return nil
+ end
+
+ def File.glob_file(pattern)
+ return Dir.glob(pattern).first
+ end
+
+end
+
+module KpseUtil
+
+ # to be adapted, see loading cnf file
+
+ @@texmftrees = ['texmf-local','texmf.local','../..','texmf'] # '../..' is for gwtex
+ @@texmfcnf = 'texmf.cnf'
+
+ def KpseUtil::identify
+ # we mainly need to identify the local tex stuff and wse assume that
+ # the texmfcnf variable is set; otherwise we need to expand the
+ # TEXMF variable and that takes time since it may involve more
+ ownpath = File.expand_path($0)
+ if ownpath.gsub!(/texmf.*?$/o, '') then
+ ENV['SELFAUTOPARENT'] = ownpath
+ else
+ ENV['SELFAUTOPARENT'] = '.' # fall back
+ # may be too tricky:
+ #
+ # (ENV['PATH'] ||'').split_path.each do |p|
+ # if p.gsub!(/texmf.*?$/o, '') then
+ # ENV['SELFAUTOPARENT'] = p
+ # break
+ # end
+ # end
+ end
+ filenames = Array.new
+ if ENV['TEXMFCNF'] && ! ENV['TEXMFCNF'].empty? then
+ ENV['TEXMFCNF'].to_s.split_path.each do |path|
+ filenames << File.join(path,@@texmfcnf)
+ end
+ elsif ENV['SELFAUTOPARENT'] == '.' then
+ filenames << File.join('.',@@texmfcnf)
+ else
+ @@texmftrees.each do |tree|
+ filenames << File.join(ENV['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf)
+ end
+ end
+ loop do
+ busy = false
+ filenames.collect! do |f|
+ f.gsub(/\$([a-zA-Z0-9\_\-]+)/o) do
+ if (! ENV[$1]) || (ENV[$1] == $1) then
+ "$#{$1}"
+ else
+ busy = true
+ ENV[$1]
+ end
+ end
+ end
+ break unless busy
+ end
+ filenames.delete_if do |f|
+ ! FileTest.file?(f)
+ end
+ return filenames
+ end
+
+ def KpseUtil::environment
+ Hash.new.merge(ENV)
+ end
+
+end
+
+class KpseFast
+
+ # formats are an incredible inconsistent mess
+
+ @@suffixes = Hash.new
+ @@formats = Hash.new
+ @@suffixmap = Hash.new
+
+ @@texmfcnf = 'texmf.cnf'
+
+ @@suffixes['gf'] = ['.<resolution>gf'] # todo
+ @@suffixes['pk'] = ['.<resolution>pk'] # todo
+ @@suffixes['tfm'] = ['.tfm']
+ @@suffixes['afm'] = ['.afm']
+ @@suffixes['base'] = ['.base']
+ @@suffixes['bib'] = ['.bib']
+ @@suffixes['bst'] = ['.bst']
+ @@suffixes['cnf'] = ['.cnf']
+ @@suffixes['ls-R'] = ['ls-R', 'ls-r']
+ @@suffixes['fmt'] = ['.fmt', '.efmt', '.efm', '.ofmt', '.ofm', '.oft', '.eofmt', '.eoft', '.eof', '.pfmt', '.pfm', '.epfmt', '.epf', '.xpfmt', '.xpf', '.afmt', '.afm']
+ @@suffixes['map'] = ['.map']
+ @@suffixes['mem'] = ['.mem']
+ @@suffixes['mf'] = ['.mf']
+ @@suffixes['mfpool'] = ['.pool']
+ @@suffixes['mft'] = ['.mft']
+ @@suffixes['mp'] = ['.mp']
+ @@suffixes['mppool'] = ['.pool']
+ @@suffixes['ocp'] = ['.ocp']
+ @@suffixes['ofm'] = ['.ofm', '.tfm']
+ @@suffixes['opl'] = ['.opl']
+ @@suffixes['otp'] = ['.otp']
+ @@suffixes['ovf'] = ['.ovf']
+ @@suffixes['ovp'] = ['.ovp']
+ @@suffixes['graphic/figure'] = ['.eps', '.epsi']
+ @@suffixes['tex'] = ['.tex']
+ @@suffixes['texpool'] = ['.pool']
+ @@suffixes['PostScript header'] = ['.pro']
+ @@suffixes['type1 fonts'] = ['.pfa', '.pfb']
+ @@suffixes['vf'] = ['.vf']
+ @@suffixes['ist'] = ['.ist']
+ @@suffixes['truetype fonts'] = ['.ttf', '.ttc']
+ @@suffixes['web'] = ['.web', '.ch']
+ @@suffixes['cweb'] = ['.w', '.web', '.ch']
+ @@suffixes['enc files'] = ['.enc']
+ @@suffixes['cmap files'] = ['.cmap']
+ @@suffixes['subfont definition files'] = ['.sfd']
+ @@suffixes['lig files'] = ['.lig']
+ @@suffixes['bitmap font'] = []
+ @@suffixes['MetaPost support'] = []
+ @@suffixes['TeX system documentation'] = []
+ @@suffixes['TeX system sources'] = []
+ @@suffixes['Troff fonts'] = []
+ @@suffixes['dvips config'] = []
+ @@suffixes['type42 fonts'] = []
+ @@suffixes['web2c files'] = []
+ @@suffixes['other text files'] = []
+ @@suffixes['other binary files'] = []
+ @@suffixes['misc fonts'] = []
+ @@suffixes['opentype fonts'] = []
+ @@suffixes['pdftex config'] = []
+ @@suffixes['texmfscripts'] = []
+
+ # replacements
+
+ @@suffixes['fmt'] = ['.fmt']
+ @@suffixes['type1 fonts'] = ['.pfa', '.pfb', '.pfm']
+ @@suffixes['tex'] = ['.tex', '.xml']
+ @@suffixes['texmfscripts'] = ['rb','lua','py','pl']
+
+ @@suffixes.keys.each do |k| @@suffixes[k].each do |s| @@suffixmap[s] = k end end
+
+ # TTF2TFMINPUTS
+ # MISCFONTS
+ # TEXCONFIG
+ # DVIPDFMINPUTS
+ # OTFFONTS
+
+ @@formats['gf'] = ''
+ @@formats['pk'] = ''
+ @@formats['tfm'] = 'TFMFONTS'
+ @@formats['afm'] = 'AFMFONTS'
+ @@formats['base'] = 'MFBASES'
+ @@formats['bib'] = ''
+ @@formats['bst'] = ''
+ @@formats['cnf'] = ''
+ @@formats['ls-R'] = ''
+ @@formats['fmt'] = 'TEXFORMATS'
+ @@formats['map'] = 'TEXFONTMAPS'
+ @@formats['mem'] = 'MPMEMS'
+ @@formats['mf'] = 'MFINPUTS'
+ @@formats['mfpool'] = 'MFPOOL'
+ @@formats['mft'] = ''
+ @@formats['mp'] = 'MPINPUTS'
+ @@formats['mppool'] = 'MPPOOL'
+ @@formats['ocp'] = 'OCPINPUTS'
+ @@formats['ofm'] = 'OFMFONTS'
+ @@formats['opl'] = 'OPLFONTS'
+ @@formats['otp'] = 'OTPINPUTS'
+ @@formats['ovf'] = 'OVFFONTS'
+ @@formats['ovp'] = 'OVPFONTS'
+ @@formats['graphic/figure'] = ''
+ @@formats['tex'] = 'TEXINPUTS'
+ @@formats['texpool'] = 'TEXPOOL'
+ @@formats['PostScript header'] = 'TEXPSHEADERS'
+ @@formats['type1 fonts'] = 'T1FONTS'
+ @@formats['vf'] = 'VFFONTS'
+ @@formats['ist'] = ''
+ @@formats['truetype fonts'] = 'TTFONTS'
+ @@formats['web'] = ''
+ @@formats['cweb'] = ''
+ @@formats['enc files'] = 'ENCFONTS'
+ @@formats['cmap files'] = 'CMAPFONTS'
+ @@formats['subfont definition files'] = 'SFDFONTS'
+ @@formats['lig files'] = 'LIGFONTS'
+ @@formats['bitmap font'] = ''
+ @@formats['MetaPost support'] = ''
+ @@formats['TeX system documentation'] = ''
+ @@formats['TeX system sources'] = ''
+ @@formats['Troff fonts'] = ''
+ @@formats['dvips config'] = ''
+ @@formats['type42 fonts'] = 'T42FONTS'
+ @@formats['web2c files'] = 'WEB2C'
+ @@formats['other text files'] = ''
+ @@formats['other binary files'] = ''
+ @@formats['misc fonts'] = ''
+ @@formats['opentype fonts'] = 'OPENTYPEFONTS'
+ @@formats['pdftex config'] = 'PDFTEXCONFIG'
+ @@formats['texmfscripts'] = 'TEXMFSCRIPTS'
+
+ attr_accessor :progname, :engine, :format, :rootpath, :treepath,
+ :verbose, :remember, :scandisk, :diskcache, :renewcache
+
+ @@cacheversion = '1'
+
+ def initialize
+ @rootpath = ''
+ @treepath = ''
+ @progname = 'kpsewhich'
+ @engine = 'pdfetex'
+ @variables = Hash.new
+ @expansions = Hash.new
+ @files = Hash.new
+ @found = Hash.new
+ @kpsevars = Hash.new
+ @lsrfiles = Array.new
+ @cnffiles = Array.new
+ @verbose = true
+ @remember = true
+ @scandisk = true
+ @diskcache = true
+ @renewcache = false
+ @isolate = false
+
+ @diskcache = false
+ @cachepath = nil
+ @cachefile = 'tmftools.log'
+
+ @environment = ENV
+ end
+
+ def set(key,value)
+ case key
+ when 'progname' then @progname = value
+ when 'engine' then @engine = value
+ when 'format' then @format = value
+ end
+ end
+
+ def push_environment(env)
+ @environment = env
+ end
+
+ # {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}
+ #
+ # $SELFAUTOLOC : /usr/tex/bin/platform
+ # $SELFAUTODIR : /usr/tex/bin
+ # $SELFAUTOPARENT : /usr/tex
+ #
+ # since we live in scriptpath we need a slightly different method
+
+ def load_cnf(filenames=nil)
+ unless filenames then
+ ownpath = File.expand_path($0)
+ if ownpath.gsub!(/texmf.*?$/o, '') then
+ @environment['SELFAUTOPARENT'] = ownpath
+ else
+ @environment['SELFAUTOPARENT'] = '.'
+ end
+ unless @treepath.empty? then
+ unless @rootpath.empty? then
+ @treepath = @treepath.split(',').collect do |p| File.join(@rootpath,p) end.join(',')
+ end
+ @environment['TEXMF'] = @treepath
+ # only the first one
+ @environment['TEXMFCNF'] = File.join(@treepath.split(',').first,'texmf/web2c')
+ end
+ unless @rootpath.empty? then
+ @environment['TEXMFCNF'] = File.join(@rootpath,'texmf/web2c')
+ @environment['SELFAUTOPARENT'] = @rootpath
+ @isolate = true
+ end
+ filenames = Array.new
+ if @environment['TEXMFCNF'] and not @environment['TEXMFCNF'].empty? then
+ @environment['TEXMFCNF'].to_s.split_path.each do |path|
+ filenames << File.join(path,@@texmfcnf)
+ end
+ elsif @environment['SELFAUTOPARENT'] == '.' then
+ filenames << File.join('.',@@texmfcnf)
+ else
+ ['texmf-local','texmf'].each do |tree|
+ filenames << File.join(@environment['SELFAUTOPARENT'],tree,'web2c',@@texmfcnf)
+ end
+ end
+ end
+ # <root>/texmf/web2c/texmf.cnf
+ filenames = _expanded_path_(filenames)
+ @rootpath = filenames.first
+ 3.times do
+ @rootpath = File.dirname(@rootpath)
+ end
+ filenames.collect! do |f|
+ f.gsub("\\", '/')
+ end
+ filenames.each do |fname|
+ if FileTest.file?(fname) and f = File.open(fname) then
+ @cnffiles << fname
+ while line = f.gets do
+ loop do
+ # concatenate lines ending with \
+ break unless line.sub!(/\\\s*$/o) do
+ f.gets || ''
+ end
+ end
+ case line
+ when /^[\%\#]/o then
+ # comment
+ when /^\s*(.*?)\s*\=\s*(.*?)\s*$/o then
+ key, value = $1, $2
+ unless @variables.key?(key) then
+ value.sub!(/\%.*$/,'')
+ value.sub!(/\~/, "$HOME")
+ @variables[key] = value
+ end
+ @kpsevars[key] = true
+ end
+ end
+ f.close
+ end
+ end
+ end
+
+ def load_lsr
+ @lsrfiles = []
+ simplified_list(expansion('TEXMF')).each do |p|
+ ['ls-R','ls-r'].each do |f|
+ filename = File.join(p,f)
+ if FileTest.file?(filename) then
+ @lsrfiles << [filename,File.size(filename)]
+ break
+ end
+ end
+ end
+ @files = Hash.new
+ if @diskcache then
+ ['HOME','TEMP','TMP','TMPDIR'].each do |key|
+ if @environment[key] then
+ if FileTest.directory?(@environment[key]) then
+ @cachepath = @environment[key]
+ @cachefile = [@rootpath.gsub(/[^A-Z0-9]/io, '-').gsub(/\-+/,'-'),File.basename(@cachefile)].join('-')
+ break
+ end
+ end
+ end
+ if @cachepath and not @renewcache and FileTest.file?(File.join(@cachepath,@cachefile)) then
+ begin
+ if f = File.open(File.join(@cachepath,@cachefile)) then
+ cacheversion = Marshal.load(f)
+ if cacheversion == @@cacheversion then
+ lsrfiles = Marshal.load(f)
+ if lsrfiles == @lsrfiles then
+ @files = Marshal.load(f)
+ end
+ end
+ f.close
+ end
+ rescue
+ @files = Hash.new
+ end
+ end
+ end
+ return if @files.size > 0
+ @lsrfiles.each do |filedata|
+ filename, filesize = filedata
+ filepath = File.dirname(filename)
+ begin
+ path = '.'
+ data = IO.readlines(filename)
+ if data[0].chomp =~ /% ls\-R \-\- filename database for kpathsea\; do not change this line\./io then
+ data.each do |line|
+ case line
+ when /^[a-zA-Z0-9]/o then
+ line.chomp!
+ if @files[line] then
+ @files[line] << path
+ else
+ @files[line] = [path]
+ end
+ when /^\.\/(.*?)\:$/o then
+ path = File.join(filepath,$1)
+ end
+ end
+ end
+ rescue
+ # sorry
+ end
+ end
+ if @diskcache and @cachepath and f = File.open(File.join(@cachepath,@cachefile),'wb') then
+ f << Marshal.dump(@@cacheversion)
+ f << Marshal.dump(@lsrfiles)
+ f << Marshal.dump(@files)
+ f.close
+ end
+ end
+
+ def expand_variables
+ @expansions = Hash.new
+ if @isolate then
+ @variables['TEXMFCNF'] = @environment['TEXMFCNF'].dup
+ @variables['SELFAUTOPARENT'] = @environment['SELFAUTOPARENT'].dup
+ else
+ @environment.keys.each do |e|
+ if e =~ /^([a-zA-Z]+)\_(.*)\s*$/o then
+ @expansions["#{$1}.#{$2}"] = (@environment[e] ||'').dup
+ else
+ @expansions[e] = (@environment[e] ||'').dup
+ end
+ end
+ end
+ @variables.keys.each do |k|
+ @expansions[k] = @variables[k].dup unless @expansions[k]
+ end
+ loop do
+ busy = false
+ @expansions.keys.each do |k|
+ @expansions[k].gsub!(/\$([a-zA-Z0-9\_\-]*)/o) do
+ busy = true
+ @expansions[$1] || ''
+ end
+ @expansions[k].gsub!(/\$\{([a-zA-Z0-9\_\-]*)\}/o) do
+ busy = true
+ @expansions[$1] || ''
+ end
+ end
+ break unless busy
+ end
+ @expansions.keys.each do |k|
+ @expansions[k] = @expansions[k].gsub("\\", '/')
+ end
+ end
+
+ def variable(name='')
+ (name and not name.empty? and @variables[name.sub('$','')]) or ''
+ end
+
+ def expansion(name='')
+ (name and not name.empty? and @expansions[name.sub('$','')]) or ''
+ end
+
+ def variable?(name='')
+ name and not name.empty? and @variables.key?(name.sub('$',''))
+ end
+
+ def expansion?(name='')
+ name and not name.empty? and @expansions.key?(name.sub('$',''))
+ end
+
+ def simplified_list(str)
+ lst = str.gsub(/^\{/o,'').gsub(/\}$/o,'').split(",")
+ lst.collect do |l|
+ l.sub(/^[\!]*/,'').sub(/[\/\\]*$/o,'')
+ end
+ end
+
+ def original_variable(variable)
+ if variable?("#{@progname}.#{variable}") then
+ variable("#{@progname}.#{variable}")
+ elsif variable?(variable) then
+ variable(variable)
+ else
+ ''
+ end
+ end
+
+ def expanded_variable(variable)
+ if expansion?("#{variable}.#{@progname}") then
+ expansion("#{variable}.#{@progname}")
+ elsif expansion?(variable) then
+ expansion(variable)
+ else
+ ''
+ end
+ end
+
+ def original_path(filename='')
+ _expanded_path_(original_variable(var_of_format_or_suffix(filename)).split(";"))
+ end
+
+ def expanded_path(filename='')
+ _expanded_path_(expanded_variable(var_of_format_or_suffix(filename)).split(";"))
+ end
+
+ def _expanded_path_(pathlist)
+ i, n = 0, 0
+ pathlist.collect! do |mainpath|
+ mainpath.gsub(/([\{\}])/o) do
+ if $1 == "{" then
+ i += 1 ; n = i if i > n ; "<#{i}>"
+ else
+ i -= 1 ; "</#{i+1}>"
+ end
+ end
+ end
+ n.times do |i|
+ loop do
+ more = false
+ newlist = []
+ pathlist.each do |path|
+ unless path.sub!(/^(.*?)<(#{n-i})>(.*?)<\/\2>(.*?)$/) do
+ pre, mid, post = $1, $3, $4
+ mid.gsub!(/\,$/,',.')
+ mid.split(',').each do |m|
+ more = true
+ if m == '.' then
+ newlist << "#{pre}#{post}"
+ else
+ newlist << "#{pre}#{m}#{post}"
+ end
+ end
+ end then
+ newlist << path
+ end
+ end
+ if more then
+ pathlist = [newlist].flatten # copy -)
+ else
+ break
+ end
+ end
+ end
+ pathlist = pathlist.uniq.collect do |path|
+ p = path
+ # p.gsub(/^\/+/o) do '' end
+ # p.gsub!(/(.)\/\/(.)/o) do "#{$1}/#{$2}" end
+ # p.gsub!(/\/\/+$/o) do '//' end
+ p.gsub!(/\/\/+/o) do '//' end
+ p
+ end
+ pathlist
+ end
+
+ # todo: ignore case
+
+ def var_of_format(str)
+ @@formats[str] || ''
+ end
+
+ def var_of_suffix(str) # includes .
+ if @@suffixmap.key?(str) then @@formats[@@suffixmap[str]] else '' end
+ end
+
+ def var_of_format_or_suffix(str)
+ if @@formats.key?(str) then
+ @@formats[str]
+ elsif @@suffixmap.key?(File.extname(str)) then # extname includes .
+ @@formats[@@suffixmap[File.extname(str)]] # extname includes .
+ else
+ ''
+ end
+ end
+
+end
+
+class KpseFast
+
+ # test things
+
+ def list_variables(kpseonly=true)
+ @variables.keys.sort.each do |k|
+ if kpseonly then
+ puts("#{k} = #{@variables[k]}") if @kpsevars[k]
+ else
+ puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@variables[k]}")
+ end
+ end
+ end
+
+ def list_expansions(kpseonly=true)
+ @expansions.keys.sort.each do |k|
+ if kpseonly then
+ puts("#{k} = #{@expansions[k]}") if @kpsevars[k]
+ else
+ puts("#{if @kpsevars[k] then 'K' else 'E' end} #{k} = #{@expansions[k]}")
+ end
+ end
+ end
+
+ def list_lsr
+ puts("files = #{@files.size}")
+ end
+
+ def set_test_patterns
+ @variables["KPSE_TEST_PATTERN_A"] = "foo/{1,2}/bar//"
+ @variables["KPSE_TEST_PATTERN_B"] = "!!x{A,B{1,2}}y"
+ @variables["KPSE_TEST_PATTERN_C"] = "x{A,B//{1,2}}y"
+ @variables["KPSE_TEST_PATTERN_D"] = "x{A,B//{1,2,}}//y"
+ end
+
+ def show_test_patterns
+ ['A','B','D'].each do |i|
+ puts ""
+ puts @variables ["KPSE_TEST_PATTERN_#{i}"]
+ puts ""
+ puts expand_path("KPSE_TEST_PATTERN_#{i}").split_path
+ puts ""
+ end
+ end
+
+end
+
+class KpseFast
+
+ # kpse stuff
+
+ def expand_braces(str) # output variable and brace expansion of STRING.
+ _expanded_path_(original_variable(str).split_path).join_path
+ end
+
+ def expand_path(str) # output complete path expansion of STRING.
+ _expanded_path_(expanded_variable(str).split_path).join_path
+ end
+
+ def expand_var(str) # output variable expansion of STRING.
+ expanded_variable(str)
+ end
+
+ def show_path(str) # output search path for file type NAME
+ expanded_path(str).join_path
+ end
+
+ def var_value(str) # output the value of variable $STRING.
+ original_variable(str)
+ end
+
+end
+
+class KpseFast
+
+ def _is_cnf_?(filename)
+ filename == File.basename((@cnffiles.first rescue @@texmfcnf) || @@texmfcnf)
+ end
+
+ def find_file(filename)
+ if _is_cnf_?(filename) then
+ @cnffiles.first rescue ''
+ else
+ [find_files(filename,true)].flatten.first || ''
+ end
+ end
+
+ def find_files(filename,first=false)
+ if _is_cnf_?(filename) then
+ result = @cnffiles.dup
+ else
+ if @remember then
+ # stamp = "#{filename}--#{@format}--#{@engine}--#{@progname}"
+ stamp = "#{filename}--#{@engine}--#{@progname}"
+ return @found[stamp] if @found.key?(stamp)
+ end
+ pathlist = expanded_path(filename)
+ result = []
+ filelist = if @files.key?(filename) then @files[filename].uniq else nil end
+ done = false
+ if pathlist.size == 0 then
+ if FileTest.file?(filename) then
+ done = true
+ result << '.'
+ end
+ else
+ pathlist.each do |path|
+ doscan = if path =~ /^\!\!/o then false else true end
+ recurse = if path =~ /\/\/$/o then true else false end
+ pathname = path.dup
+ pathname.gsub!(/^\!+/o, '')
+ done = false
+ if not done and filelist then
+ # checking for exact match
+ if filelist.include?(pathname) then
+ result << pathname
+ done = true
+ end
+ if not done and recurse then
+ # checking for fuzzy //
+ pathname.gsub!(/\/+$/o, '/.*')
+ # pathname.gsub!(/\/\//o,'/[\/]*/')
+ pathname.gsub!(/\/\//o,'/.*?/')
+ re = /^#{pathname}/
+ filelist.each do |f|
+ if re =~ f then
+ result << f # duplicates will be filtered later
+ done = true
+ end
+ break if done
+ end
+ end
+ end
+ if not done and doscan then
+ # checking for path itself
+ pname = pathname.sub(/\.\*$/,'')
+ if not pname =~ /\*/o and FileTest.file?(File.join(pname,filename)) then
+ result << pname
+ done = true
+ end
+ end
+ break if done and first
+ end
+ end
+ if not done and @scandisk then
+ pathlist.each do |path|
+ pathname = path.dup
+ unless pathname.gsub!(/^\!+/o, '') then # !! prevents scan
+ recurse = pathname.gsub!(/\/+$/o, '')
+ complex = pathname.gsub!(/\/\//o,'/*/')
+ if recurse then
+ if complex then
+ if ok = File.glob_file("#{pathname}/**/#{filename}") then
+ result << File.dirname(ok)
+ done = true
+ end
+ elsif ok = File.locate_file(pathname,filename) then
+ result << File.dirname(ok)
+ done = true
+ end
+ elsif complex then
+ if ok = File.glob_file("#{pathname}/#{filename}") then
+ result << File.dirname(ok)
+ done = true
+ end
+ elsif FileTest.file?(File.join(pathname,filename)) then
+ result << pathname
+ done = true
+ end
+ break if done and first
+ end
+ end
+ end
+ result = result.uniq.collect do |pathname|
+ File.join(pathname,filename)
+ end
+ @found[stamp] = result if @remember
+ end
+ return result # redundant
+ end
+
+end
+
+class KpseFast
+
+ class FileData
+ attr_accessor :tag, :name, :size, :date
+ def initialize(tag=0,name=nil,size=nil,date=nil)
+ @tag, @name, @size, @date = tag, name, size, date
+ end
+ def FileData.sizes(a)
+ a.collect do |aa|
+ aa.size
+ end
+ end
+ def report
+ case @tag
+ when 1 then "deleted | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
+ when 2 then "present | #{@size.to_s.rjust(8)} | #{@date.strftime('%m/%d/%Y %I:%M')} | #{@name}"
+ when 3 then "obsolete | #{' '*8} | #{' '*16} | #{@name}"
+ end
+ end
+ end
+
+ def analyze_files(filter='',strict=false,sort='',delete=false)
+ puts("command line = #{ARGV.join(' ')}")
+ puts("number of files = #{@files.size}")
+ puts("filter pattern = #{filter}")
+ puts("loaded cnf files = #{@cnffiles.join(' ')}")
+ puts('')
+ if filter.gsub!(/^not:/,'') then
+ def the_same(filter,filename)
+ not filter or filter.empty? or /#{filter}/ !~ filename
+ end
+ else
+ def the_same(filter,filename)
+ not filter or filter.empty? or /#{filter}/ =~ filename
+ end
+ end
+ @files.keys.each do |name|
+ if @files[name].size > 1 then
+ data = Array.new
+ @files[name].each do |path|
+ filename = File.join(path,name)
+ # if not filter or filter.empty? or /#{filter}/ =~ filename then
+ if the_same(filter,filename) then
+ if FileTest.file?(filename) then
+ if delete then
+ data << FileData.new(1,filename,File.size(filename),File.mtime(filename))
+ begin
+ File.delete(filename) if delete
+ rescue
+ end
+ else
+ data << FileData.new(2,filename,File.size(filename),File.mtime(filename))
+ end
+ else
+ # data << FileData.new(3,filename)
+ end
+ end
+ end
+ if data.length > 1 then
+ if strict then
+ # if data.collect do |d| d.size end.uniq! then
+ # data.sort! do |a,b| b.size <=> a.size end
+ # data.each do |d| puts d.report end
+ # puts ''
+ # end
+ data.sort! do |a,b|
+ if a.size and b.size then
+ b.size <=> a.size
+ else
+ 0
+ end
+ end
+ bunch = Array.new
+ done = false
+ data.each do |d|
+ if bunch.size == 0 then
+ bunch << d
+ elsif bunch[0].size == d.size then
+ bunch << d
+ else
+ if bunch.size > 1 then
+ bunch.each do |b|
+ puts b.report
+ end
+ done = true
+ end
+ bunch = [d]
+ end
+ end
+ puts '' if done
+ else
+ case sort
+ when 'size' then data.sort! do |a,b| a.size <=> b.size end
+ when 'revsize' then data.sort! do |a,b| b.size <=> a.size end
+ when 'date' then data.sort! do |a,b| a.date <=> b.date end
+ when 'revdate' then data.sort! do |a,b| b.date <=> a.date end
+ end
+ data.each do |d| puts d.report end
+ puts ''
+ end
+ end
+ end
+ end
+ end
+
+end
+
+
+ # k = KpseFast.new # (root)
+ # k.set_test_patterns
+ # k.load_cnf
+ # k.expand_variables
+ # k.load_lsr
+
+ # k.show_test_patterns
+
+ # puts k.list_variables
+ # puts k.list_expansions
+ # k.list_lsr
+ # puts k.expansion("$TEXMF")
+ # puts k.expanded_path("TEXINPUTS","context")
+
+ # k.progname, k.engine, k.format = 'context', 'pdfetex', 'tfm'
+ # k.scandisk = false # == must_exist
+ # k.expand_variables
+
+ # 10.times do |i| puts k.find_file('texnansi-lmr10.tfm') end
+
+ # puts "expand braces $TEXMF"
+ # puts k.expand_braces("$TEXMF")
+ # puts "expand path $TEXMF"
+ # puts k.expand_path("$TEXMF")
+ # puts "expand var $TEXMF"
+ # puts k.expand_var("$TEXMF")
+ # puts "expand path $TEXMF"
+ # puts k.show_path('tfm')
+ # puts "expand value $TEXINPUTS"
+ # puts k.var_value("$TEXINPUTS")
+ # puts "expand value $TEXINPUTS.context"
+ # puts k.var_value("$TEXINPUTS.context")
+
+ # exit
+
+
+
+# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpse/drb.rb'
+
+require 'drb'
+# kpse_merge_done: require 'base/kpse/trees'
+
+class KpseServer
+
+ attr_accessor :port
+
+ def initialize(port=7000)
+ @port = port
+ end
+
+ def start
+ puts "starting drb service at port #{@port}"
+ DRb.start_service("druby://localhost:#{@port}", KpseTrees.new)
+ trap(:INT) do
+ DRb.stop_service
+ end
+ DRb.thread.join
+ end
+
+ def stop
+ # todo
+ end
+
+end
+
+class KpseClient
+
+ attr_accessor :port
+
+ def initialize(port=7000)
+ @port = port
+ @kpse = nil
+ end
+
+ def start
+ # only needed when callbacks are used / slow, due to Socket::getaddrinfo
+ # DRb.start_service
+ end
+
+ def object
+ @kpse = DRbObject.new(nil,"druby://localhost:#{@port}")
+ end
+
+end
+
+
+# SERVER_URI="druby://localhost:8787"
+#
+# # Start a local DRbServer to handle callbacks.
+# #
+# # Not necessary for this small example, but will be required
+# # as soon as we pass a non-marshallable object as an argument
+# # to a dRuby call.
+# DRb.start_service
+#
+
+
+# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpse/trees.rb'
+
+require 'monitor'
+# kpse_merge_done: require 'base/kpsefast'
+
+class KpseTrees < Monitor
+
+ def initialize
+ @trees = Hash.new
+ end
+
+ def pattern(filenames)
+ filenames.join('|').gsub(/\\+/o,'/').downcase
+ end
+
+ def choose(filenames,environment)
+ current = pattern(filenames)
+ load(filenames,environment) unless @trees[current]
+ puts "enabling tree #{current}"
+ current
+ end
+
+ def fetch(filenames,environment) # will send whole object !
+ current = pattern(filenames)
+ load(filenames,environment) unless @trees[current]
+ puts "fetching tree #{current}"
+ @trees[current]
+ end
+
+ def load(filenames,environment)
+ current = pattern(filenames)
+ puts "loading tree #{current}"
+ @trees[current] = KpseFast.new
+ @trees[current].push_environment(environment)
+ @trees[current].load_cnf(filenames)
+ @trees[current].expand_variables
+ @trees[current].load_lsr
+ end
+
+ def set(tree,key,value)
+ case key
+ when 'progname' then @trees[tree].progname = value
+ when 'engine' then @trees[tree].engine = value
+ when 'format' then @trees[tree].format = value
+ end
+ end
+ def get(tree,key)
+ case key
+ when 'progname' then @trees[tree].progname
+ when 'engine' then @trees[tree].engine
+ when 'format' then @trees[tree].format
+ end
+ end
+
+ def load_cnf(tree)
+ @trees[tree].load_cnf
+ end
+ def load_lsr(tree)
+ @trees[tree].load_lsr
+ end
+ def expand_variables(tree)
+ @trees[tree].expand_variables
+ end
+ def expand_braces(tree,str)
+ @trees[tree].expand_braces(str)
+ end
+ def expand_path(tree,str)
+ @trees[tree].expand_path(str)
+ end
+ def expand_var(tree,str)
+ @trees[tree].expand_var(str)
+ end
+ def show_path(tree,str)
+ @trees[tree].show_path(str)
+ end
+ def var_value(tree,str)
+ @trees[tree].var_value(str)
+ end
+ def find_file(tree,filename)
+ @trees[tree].find_file(filename)
+ end
+ def find_files(tree,filename,first)
+ @trees[tree].find_files(filename,first)
+ end
+
+end
+
+
+# kpse_merge_file: 'C:/data/develop/context/ruby/base/kpsedirect.rb'
+
+class KpseDirect
+
+ attr_accessor :progname, :format, :engine
+
+ def initialize
+ @progname, @format, @engine = '', '', ''
+ end
+
+ def expand_path(str)
+ clean_name(`kpsewhich -expand-path=#{str}`.chomp)
+ end
+
+ def expand_var(str)
+ clean_name(`kpsewhich -expand-var=#{str}`.chomp)
+ end
+
+ def find_file(str)
+ clean_name(`kpsewhich #{_progname_} #{_format_} #{str}`.chomp)
+ end
+
+ def _progname_
+ if @progname.empty? then '' else "-progname=#{@progname}" end
+ end
+ def _format_
+ if @format.empty? then '' else "-format=\"#{@format}\"" end
+ end
+
+ private
+
+ def clean_name(str)
+ str.gsub(/\\/,'/')
+ end
+
+end
+
+
+# kpse_merge_file: 'C:/data/develop/context/ruby/base/merge.rb'
+
+# module : base/merge
+# copyright : PRAGMA Advanced Document Engineering
+# version : 2006
+# author : Hans Hagen
+#
+# project : ConTeXt / eXaMpLe
+# concept : Hans Hagen
+# info : j.hagen@xs4all.nl
+
+
+# this module will package all the used modules in the file itself
+# so that we can relocate the file at wish, usage:
+#
+# merge:
+#
+# unless SelfMerge::ok? && SelfMerge::merge then
+# puts("merging should happen on the path were the base inserts reside")
+# end
+#
+# cleanup:
+#
+# unless SelfMerge::cleanup then
+# puts("merging should happen on the path were the base inserts reside")
+
+module SelfMerge
+
+ @@kpsemergestart = "\# kpse_merge_start"
+ @@kpsemergestop = "\# kpse_merge_stop"
+ @@kpsemergefile = "\# kpse_merge_file: "
+ @@kpsemergedone = "\# kpse_merge_done: "
+
+ @@filename = File.basename($0)
+ @@ownpath = File.expand_path(File.dirname($0))
+ @@modroot = '(base|graphics|rslb|www)' # needed in regex in order not to mess up SelfMerge
+ @@modules = $".collect do |file| File.expand_path(file) end
+
+ @@modules.delete_if do |file|
+ file !~ /^#{@@ownpath}\/#{@@modroot}.*$/
+ end
+
+ def SelfMerge::ok?
+ begin
+ @@modules.each do |file|
+ return false unless FileTest.file?(file)
+ end
+ rescue
+ return false
+ else
+ return true
+ end
+ end
+
+ def SelfMerge::merge
+ begin
+ if SelfMerge::ok? && rbfile = IO.read(@@filename) then
+ begin
+ inserts = "#{@@kpsemergestart}\n\n"
+ @@modules.each do |file|
+ inserts << "#{@@kpsemergefile}'#{file}'\n\n"
+ inserts << IO.read(file).gsub(/^#.*?\n$/,'')
+ inserts << "\n\n"
+ end
+ inserts << "#{@@kpsemergestop}\n\n"
+ # no gsub! else we end up in SelfMerge
+ rbfile.sub!(/#{@@kpsemergestart}\s*#{@@kpsemergestop}/mois) do
+ inserts
+ end
+ rbfile.gsub!(/^(.*)(require [\"\'].*?#{@@modroot}.*)$/) do
+ pre, post = $1, $2
+ if pre =~ /#{@@kpsemergedone}/ then
+ "#{pre}#{post}"
+ else
+ "#{pre}#{@@kpsemergedone}#{post}"
+ end
+ end
+ rescue
+ return false
+ else
+ begin
+ File.open(@@filename,'w') do |f|
+ f << rbfile
+ end
+ rescue
+ return false
+ end
+ end
+ end
+ rescue
+ return false
+ else
+ return true
+ end
+ end
+
+ def SelfMerge::cleanup
+ begin
+ if rbfile = IO.read(@@filename) then
+ begin
+ rbfile.sub!(/#{@@kpsemergestart}(.*)#{@@kpsemergestop}\s*/mois) do
+ "#{@@kpsemergestart}\n\n#{@@kpsemergestop}\n\n"
+ end
+ rbfile.gsub!(/^(.*#{@@kpsemergedone}.*)$/) do
+ str = $1
+ if str =~ /require [\"\']/ then
+ str.gsub(/#{@@kpsemergedone}/, '')
+ else
+ str
+ end
+ end
+ rescue
+ return false
+ else
+ begin
+ File.open(@@filename,'w') do |f|
+ f << rbfile
+ end
+ rescue
+ return false
+ end
+ end
+ end
+ rescue
+ return false
+ else
+ return true
+ end
+ end
+
+ def SelfMerge::replace
+ if SelfMerge::ok? then
+ SelfMerge::cleanup
+ SelfMerge::merge
+ end
+ end
+
+end
+
+
+# kpse_merge_stop
+
+
+
+$mswindows = Config::CONFIG['host_os'] =~ /mswin/
+$separator = File::PATH_SEPARATOR
+$version = "2.0.2"
+$ownpath = File.dirname($0)
+
+if $mswindows then
+ require "win32ole"
+ require "Win32API"
+end
+
+# exit if defined?(REQUIRE2LIB)
+
+$stdout.sync = true
+$stderr.sync = true
+
+$applications = Hash.new
+$suffixinputs = Hash.new
+$predefined = Hash.new
+
+$suffixinputs['pl'] = 'PERLINPUTS'
+$suffixinputs['rb'] = 'RUBYINPUTS'
+$suffixinputs['py'] = 'PYTHONINPUTS'
+$suffixinputs['lua'] = 'LUAINPUTS'
+$suffixinputs['jar'] = 'JAVAINPUTS'
+$suffixinputs['pdf'] = 'PDFINPUTS'
+
+$predefined['texexec'] = 'texexec.rb'
+$predefined['texutil'] = 'texutil.rb'
+$predefined['texfont'] = 'texfont.pl'
+$predefined['texshow'] = 'texshow.pl'
+
+$predefined['makempy'] = 'makempy.pl'
+$predefined['mptopdf'] = 'mptopdf.pl'
+$predefined['pstopdf'] = 'pstopdf.rb'
+
+$predefined['examplex'] = 'examplex.rb'
+$predefined['concheck'] = 'concheck.rb'
+
+$predefined['runtools'] = 'runtools.rb'
+$predefined['textools'] = 'textools.rb'
+$predefined['tmftools'] = 'tmftools.rb'
+$predefined['ctxtools'] = 'ctxtools.rb'
+$predefined['rlxtools'] = 'rlxtools.rb'
+$predefined['pdftools'] = 'pdftools.rb'
+$predefined['mpstools'] = 'mpstools.rb'
+$predefined['exatools'] = 'exatools.rb'
+$predefined['xmltools'] = 'xmltools.rb'
+$predefined['luatools'] = 'luatools.lua'
+$predefined['mtxtools'] = 'mtxtools.rb'
+
+$predefined['newpstopdf'] = 'pstopdf.rb'
+$predefined['newtexexec'] = 'texexec.rb'
+$predefined['pdftrimwhite'] = 'pdftrimwhite.pl'
+
+$makelist = [
+ # context
+ 'texexec',
+ 'texutil',
+ 'texfont',
+ # mp/ps
+ 'pstopdf',
+ 'mptopdf',
+ 'makempy',
+ # misc
+ 'ctxtools',
+ 'pdftools',
+ 'xmltools',
+ 'textools',
+ 'mpstools',
+ 'tmftools',
+ 'exatools',
+ 'runtools',
+ 'rlxtools',
+ 'luatools',
+ 'mtxtools',
+ #
+ # no, 'texmfstart'
+]
+
+$scriptlist = 'rb|pl|py|lua|jar'
+$documentlist = 'pdf|ps|eps|htm|html'
+
+$editor = ENV['TEXMFSTART_EDITOR'] || ENV['EDITOR'] || ENV['editor'] || 'scite'
+
+$crossover = true # to other tex tools, else only local
+$kpse = nil
+
+def set_applications(page=1)
+
+ $applications['unknown'] = ''
+ $applications['perl'] = $applications['pl'] = 'perl'
+ $applications['ruby'] = $applications['rb'] = 'ruby'
+ $applications['python'] = $applications['py'] = 'python'
+ $applications['lua'] = $applications['lua'] = 'lua'
+ $applications['java'] = $applications['jar'] = 'java'
+
+ if $mswindows then
+ $applications['pdf'] = ['',"pdfopen --page #{page} --file",'acroread']
+ $applications['html'] = ['','netscape','mozilla','opera','iexplore']
+ $applications['ps'] = ['','gview32','gv','gswin32','gs']
+ else
+ $applications['pdf'] = ["pdfopen --page #{page} --file",'acroread']
+ $applications['html'] = ['netscape','mozilla','opera']
+ $applications['ps'] = ['gview','gv','gs']
+ end
+
+ $applications['htm'] = $applications['html']
+ $applications['eps'] = $applications['ps']
+
+end
+
+set_applications()
+
+def check_kpse
+ if $kpse then
+ # already done
+ else
+ begin
+ if KpseRemote::available? then
+ $kpse = KpseRemote.new
+ if $kpse.okay? then
+ puts("kpse : remote") if $verbose
+ else
+ $kpse = KpseDirect.new
+ puts("kpse : direct (forced)") if $verbose
+ end
+ else
+ $kpse = KpseDirect.new
+ puts("kpse : direct") if $verbose
+ end
+ rescue
+ puts("kpse : direct (fallback)") if $verbose
+ end
+ end
+end
+
+if $mswindows then
+
+ GetShortPathName = Win32API.new('kernel32', 'GetShortPathName', ['P','P','N'], 'N')
+ GetLongPathName = Win32API.new('kernel32', 'GetLongPathName', ['P','P','N'], 'N')
+
+ def dowith_pathname (filename,filemethod)
+ filename = filename.gsub(/\\/o,'/') # no gsub! because filename can be frozen
+ case filename
+ when /\;/o then
+ # could be a path spec
+ return filename
+ when /\s+/o then
+ # danger lurking
+ buffer = ' ' * 260
+ length = filemethod.call(filename,buffer,buffer.size)
+ if length>0 then
+ return buffer.slice(0..length-1)
+ else
+ # when the path or file does not exist, nothing is returned
+ # so we try to handle the path separately from the basename
+ basename = File.basename(filename)
+ pathname = File.dirname(filename)
+ length = filemethod.call(pathname,buffer,260)
+ if length>0 then
+ return buffer.slice(0..length-1) + '/' + basename
+ else
+ return filename
+ end
+ end
+ else
+ # no danger
+ return filename
+ end
+ end
+
+ def longpathname (filename)
+ dowith_pathname(filename,GetLongPathName)
+ end
+
+ def shortpathname (filename)
+ dowith_pathname(filename,GetShortPathName)
+ end
+
+else
+
+ def longpathname (filename)
+ filename
+ end
+
+ def shortpathname (filename)
+ filename
+ end
+
+end
+
+class File
+
+ # def File.needsupdate(oldname,newname)
+ # begin
+ # if $mswindows then
+ # return File.stat(oldname).mtime > File.stat(newname).mtime
+ # else
+ # return File.stat(oldname).mtime != File.stat(newname).mtime
+ # end
+ # rescue
+ # return true
+ # end
+ # end
+
+ @@update_eps = 1
+
+ def File.needsupdate(oldname,newname)
+ begin
+ oldtime = File.stat(oldname).mtime.to_i
+ newtime = File.stat(newname).mtime.to_i
+ if newtime >= oldtime then
+ return false
+ elsif oldtime-newtime < @@update_eps then
+ return false
+ else
+ return true
+ end
+ rescue
+ return true
+ end
+ end
+
+ def File.syncmtimes(oldname,newname)
+ return
+ begin
+ if $mswindows then
+ # does not work (yet) / gives future timestamp
+ # t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here
+ # File.utime(0,t,oldname,newname)
+ else
+ t = File.mtime(oldname) # i'm not sure if the time is frozen, so we do it here
+ File.utime(0,t,oldname,newname)
+ end
+ rescue
+ end
+ end
+
+ def File.timestamp(name)
+ begin
+ "#{File.stat(name).mtime}"
+ rescue
+ return 'unknown'
+ end
+ end
+
+end
+
+def hashed (arr=[])
+ arg = if arr.class == String then arr.split(' ') else arr.dup end
+ hsh = Hash.new
+ if arg.length > 0
+ hsh['arguments'] = ''
+ done = false
+ arg.each do |s|
+ if done then
+ hsh['arguments'] += ' ' + s
+ else
+ kvl = s.split('=')
+ if kvl[0].sub!(/^\-+/,'') then
+ hsh[kvl[0]] = if kvl.length > 1 then kvl[1] else true end
+ else
+ hsh['file'] = s
+ done = true
+ end
+ end
+ end
+ end
+ return hsh
+end
+
+def launch(filename)
+ if $browser && $mswindows then
+ filename = filename.gsub(/\.[\/\\]/) do
+ Dir.getwd + '/'
+ end
+ report("launching #{filename}")
+ ie = WIN32OLE.new("InternetExplorer.Application")
+ ie.visible = true
+ ie.navigate(filename)
+ return true
+ else
+ return false
+ end
+end
+
+# env|environment
+# rel|relative
+# loc|locate|kpse|path|file
+
+def expanded(arg) # no "other text files", too restricted
+ arg.gsub(/(env|environment)\:([a-zA-Z\-\_\.0-9]+)/o) do
+ method, original, resolved = $1, $2, ''
+ if resolved = ENV[original] then
+ report("environment variable #{original} expands to #{resolved}") unless $report
+ resolved
+ else
+ report("environment variable #{original} cannot be resolved") unless $report
+ original
+ end
+ end . gsub(/(rel|relative)\:([a-zA-Z\-\_\.0-9]+)/o) do
+ method, original, resolved = $1, $2, ''
+ ['.','..','../..'].each do |r|
+ if FileTest.file?(File.join(r,original)) then
+ resolved = File.join(r,original)
+ break
+ end
+ end
+ if resolved.empty? then
+ original
+ else
+ resolved
+ end
+ end . gsub(/(kpse|loc|locate|file|path)\:([a-zA-Z\-\_\.0-9]+)/o) do
+ method, original, resolved = $1, $2, ''
+ if $program && ! $program.empty? then
+ # pstrings = ["-progname=#{$program}"]
+ pstrings = [$program]
+ else
+ # pstrings = ['','-progname=context']
+ pstrings = ['','context']
+ end
+ # auto suffix with texinputs as fall back
+ if ENV["_CTX_K_V_#{original}_"] then
+ resolved = ENV["_CTX_K_V_#{original}_"]
+ report("environment provides #{original} as #{resolved}") unless $report
+ resolved
+ else
+ check_kpse
+ pstrings.each do |pstr|
+ if resolved.empty? then
+ # command = "kpsewhich #{pstr} #{original}"
+ # report("running #{command}")
+ report("locating '#{original}' in program space '#{pstr}'")
+ begin
+ # resolved = `#{command}`.chomp
+ $kpse.progname = pstr
+ $kpse.format = ''
+ resolved = $kpse.find_file(original).gsub(/\\/,'/')
+ rescue
+ resolved = ''
+ end
+ end
+ # elsewhere in the tree
+ if resolved.empty? then
+ # command = "kpsewhich #{pstr} -format=\"other text files\" #{original}"
+ # report("running #{command}")
+ report("locating '#{original}' in program space '#{pstr}' using format 'other text files'")
+ begin
+ # resolved = `#{command}`.chomp
+ $kpse.progname = pstr
+ $kpse.format = 'other text files'
+ resolved = $kpse.find_file(original).gsub(/\\/,'/')
+ rescue
+ resolved = ''
+ end
+ end
+ end
+ if resolved.empty? then
+ original = File.dirname(original) if method =~ /path/
+ report("#{original} is not resolved") unless $report
+ ENV["_CTX_K_V_#{original}_"] = original if $crossover
+ original
+ else
+ resolved = File.dirname(resolved) if method =~ /path/
+ report("#{original} is resolved to #{resolved}") unless $report
+ ENV["_CTX_K_V_#{original}_"] = resolved if $crossover
+ resolved
+ end
+ end
+ end
+end
+
+def changeddir?(path)
+ if path.empty? then
+ return true
+ else
+ begin
+ Dir.chdir(path) if ! path.empty?
+ rescue
+ report("unable to change to directory: #{path}")
+ else
+ report("changed to directory: #{path}")
+ end
+ return File.expand_path(Dir.getwd) == File.expand_path(path)
+ end
+end
+
+def runcommand(command)
+ if $locate then
+ command = command.split(' ').collect do |c|
+ if c =~ /\//o then
+ begin
+ cc = File.expand_path(c)
+ c = cc if FileTest.file?(cc)
+ rescue
+ end
+ end
+ c
+ end . join(' ')
+ print command # to stdout and no newline
+ elsif $execute then
+ report("using 'exec' instead of 'system' call: #{command}")
+ exec(command) if changeddir?($path)
+ else
+ report("using 'system' call: #{command}")
+ system(command) if changeddir?($path)
+ end
+end
+
+def runoneof(application,fullname,browserpermitted)
+ if browserpermitted && launch(fullname) then
+ return true
+ else
+ report("starting #{$filename}") unless $report
+ output("\n") if $report && $verbose
+ applications = $applications[application.downcase]
+ if ! applications then
+ output("problems with determining application type")
+ return true
+ elsif applications.class == Array then
+ if $report then
+ output([fullname,expanded($arguments)].join(' '))
+ return true
+ else
+ applications.each do |a|
+ return true if runcommand([a,fullname,expanded($arguments)].join(' '))
+ end
+ end
+ elsif applications.empty? then
+ if $report then
+ output([fullname,expanded($arguments)].join(' '))
+ return true
+ else
+ return runcommand([fullname,expanded($arguments)].join(' '))
+ end
+ else
+ if $report then
+ output([applications,fullname,expanded($arguments)].join(' '))
+ return true
+ else
+ return runcommand([applications,fullname,expanded($arguments)].join(' '))
+ end
+ end
+ return false
+ end
+end
+
+def report(str)
+ $stdout.puts(str) if $verbose
+end
+
+def output(str)
+ $stdout.puts(str)
+end
+
+def usage
+ print "version : #{$version} - 2003/2006 - www.pragma-ade.com\n"
+ print("\n")
+ print("usage : texmfstart [switches] filename [optional arguments]\n")
+ print("\n")
+ print("switches : --verbose --report --browser --direct --execute --locate --iftouched --ifchanged\n")
+ print(" --program --file --page --arguments --batch --edit --report --clear\n")
+ print(" --make --lmake --wmake --path --stubpath --indirect --before --after\n")
+ print(" --tree --autotree --environment --showenv\n")
+ print("\n")
+ print("example : texmfstart pstopdf.rb cow.eps\n")
+ print(" texmfstart --locate examplex.rb\n")
+ print(" texmfstart --execute examplex.rb\n")
+ print(" texmfstart --browser examplap.pdf\n")
+ print(" texmfstart showcase.pdf\n")
+ print(" texmfstart --page=2 --file=showcase.pdf\n")
+ print(" texmfstart --program=yourtex yourscript.rb arg-1 arg-2\n")
+ print(" texmfstart --direct xsltproc kpse:somefile.xsl somefile.xml\n")
+ print(" texmfstart --direct ruby rel:wn-cleanup-1.rb oldfile.xml newfile.xml\n")
+ print(" texmfstart bin:xsltproc env:somepreset path:somefile.xsl somefile.xml\n")
+ print(" texmfstart --iftouched=normal,lowres downsample.rb normal lowres\n")
+ print(" texmfstart --ifchanged=somefile.dat --direct processit somefile.dat\n")
+ print(" texmfstart bin:scite kpse:texmf.cnf\n")
+ print(" texmfstart --exec bin:scite *.tex\n")
+ print(" texmfstart --edit texmf.cnf\n")
+ print(" texmfstart --edit kpse:texmf.cnf\n")
+ print(" texmfstart --serve\n")
+ print("\n")
+ print(" texmfstart --stubpath=/usr/local/bin [--make --remove] --verbose all\n")
+ print(" texmfstart --stubpath=auto [--make --remove] all\n")
+ print("\n")
+ check_kpse
+end
+
+# somehow registration does not work out (at least not under windows)
+
+def tag(name)
+ if $crossover then "_CTX_K_S_#{name}_" else "TEXMFSTART.#{name}" end
+end
+
+def registered?(filename)
+ return ENV[tag(filename)] != nil
+end
+
+def registered(filename)
+ return ENV[tag(filename)] || 'unknown'
+end
+
+def register(filename,fullname)
+ if fullname && ! fullname.empty? then # && FileTest.file?(fullname)
+ ENV[tag(filename)] = fullname
+ report("registering '#{filename}' as '#{fullname}'")
+ return true
+ else
+ return false
+ end
+end
+
+def find(filename,program)
+ begin
+ filename = filename.sub(/script:/o, '') # so we have bin: and script: and nothing
+ if $predefined.key?(filename) then
+ report("expanding '#{filename}' to '#{$predefined[filename]}'")
+ filename = $predefined[filename]
+ end
+ if registered?(filename) then
+ report("already located '#{filename}'")
+ return registered(filename)
+ end
+ # create suffix list
+ if filename =~ /^(.*)\.(.+)$/ then
+ filename = $1
+ suffixlist = [$2]
+ else
+ suffixlist = [$scriptlist.split('|'),$documentlist.split('|')].flatten
+ end
+ # first we honor a given path
+ if filename =~ /[\\\/]/ then
+ report("trying to honor '#{filename}'")
+ suffixlist.each do |suffix|
+ fullname = filename+'.'+suffix
+ if FileTest.file?(fullname) && register(filename,fullname)
+ return shortpathname(fullname)
+ end
+ end
+ end
+ filename.sub!(/^.*[\\\/]/, '')
+ # next we look at the current path and the callerpath
+ [ ['.','current'],
+ [$ownpath,'caller'], ["#{$ownpath}/../#{suffixlist[0]}",'caller'],
+ [registered("THREAD"),'thread'], ["#{registered("THREAD")}/../#{suffixlist[0]}",'thread'],
+ ].each do |p|
+ if p && ! p.empty? && ! (p[0] == 'unknown') then
+ suffixlist.each do |suffix|
+ fname = "#{filename}.#{suffix}"
+ fullname = File.expand_path(File.join(p[0],fname))
+ report("locating '#{fname}' in #{p[1]} path '#{p[0]}'")
+ if FileTest.file?(fullname) && register(filename,fullname) then
+ report("'#{fname}' located in #{p[1]} path")
+ return shortpathname(fullname)
+ end
+ end
+ end
+ end
+ # now we consult environment settings
+ fullname = nil
+ check_kpse
+ $kpse.progname = program
+ suffixlist.each do |suffix|
+ begin
+ break unless $suffixinputs[suffix]
+ environment = ENV[$suffixinputs[suffix]] || ENV[$suffixinputs[suffix]+".#{$program}"]
+ if ! environment || environment.empty? then
+ begin
+ # environment = `kpsewhich -expand-path=\$#{$suffixinputs[suffix]}`.chomp
+ environment = $kpse.expand_path("\$#{$suffixinputs[suffix]}")
+ rescue
+ environment = nil
+ else
+ if environment && ! environment.empty? then
+ report("using kpsewhich variable #{$suffixinputs[suffix]}")
+ end
+ end
+ elsif environment && ! environment.empty? then
+ report("using environment variable #{$suffixinputs[suffix]}")
+ end
+ if environment && ! environment.empty? then
+ environment.split($separator).each do |e|
+ e.strip!
+ e = '.' if e == '\.' # somehow . gets escaped
+ e += '/' unless e =~ /[\\\/]$/
+ fullname = e + filename + '.' + suffix
+ report("testing '#{fullname}'")
+ if FileTest.file?(fullname) then
+ break
+ else
+ fullname = nil
+ end
+ end
+ end
+ rescue
+ report("environment string '#{$suffixinputs[suffix]}' cannot be used to locate '#{filename}'")
+ fullname = nil
+ else
+ return shortpathname(fullname) if register(filename,fullname)
+ end
+ end
+ return shortpathname(fullname) if register(filename,fullname)
+ # then we fall back on kpsewhich
+ suffixlist.each do |suffix|
+ # TDS script scripts location as per 2004
+ if suffix =~ /(#{$scriptlist})/ then
+ begin
+ report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (1)")
+ # fullname = `kpsewhich -progname=#{program} -format=texmfscripts #{filename}.#{suffix}`.chomp
+ $kpse.format = 'texmfscripts'
+ fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/')
+ rescue
+ report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (1)")
+ fullname = nil
+ else
+ return shortpathname(fullname) if register(filename,fullname)
+ end
+ end
+ # old TDS location: .../texmf/context/...
+ begin
+ report("using 'kpsewhich' to locate '#{filename}' in suffix space '#{suffix}' (2)")
+ # fullname = `kpsewhich -progname=#{program} -format="other text files" #{filename}.#{suffix}`.chomp
+ $kpse.format = 'other text files'
+ fullname = $kpse.find_file("#{filename}.#{suffix}").gsub(/\\/,'/')
+ rescue
+ report("kpsewhich cannot locate '#{filename}' in suffix space '#{suffix}' (2)")
+ fullname = nil
+ else
+ return shortpathname(fullname) if register(filename,fullname)
+ end
+ end
+ return shortpathname(fullname) if register(filename,fullname)
+ # let's take a look at the path
+ paths = ENV['PATH'].split($separator)
+ suffixlist.each do |s|
+ paths.each do |p|
+ suffixedname = "#{filename}.#{s}"
+ report("checking #{p} for #{filename}")
+ if FileTest.file?(File.join(p,suffixedname)) then
+ fullname = File.join(p,suffixedname)
+ return shortpathname(fullname) if register(filename,fullname)
+ end
+ end
+ end
+ # bad luck, we need to search the tree ourselves
+ if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then
+ report("aggressively locating '#{filename}' in document trees")
+ begin
+ # texroot = `kpsewhich -expand-var=$SELFAUTOPARENT`.chomp
+ texroot = $kpse.expand_var("$SELFAUTOPARENT")
+ rescue
+ texroot = ''
+ else
+ texroot.sub!(/[\\\/][^\\\/]*?$/, '')
+ end
+ if not texroot.empty? then
+ sffxlst = suffixlist.join(',')
+ begin
+ report("locating '#{filename}' in document tree '#{texroot}/doc*'")
+ if (result = Dir.glob("#{texroot}/doc*/**/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then
+ fullname = result[0]
+ end
+ rescue
+ report("locating '#{filename}.#{suffixlist.join('|')}' in tree '#{texroot}' aborted")
+ end
+ end
+ return shortpathname(fullname) if register(filename,fullname)
+ end
+ report("aggressively locating '#{filename}' in tex trees")
+ begin
+ # textrees = `kpsewhich -expand-var=$TEXMF`.chomp
+ textrees = $kpse.expand_var("$TEXMF")
+ rescue
+ textrees = ''
+ end
+ if not textrees.empty? then
+ textrees.gsub!(/[\{\}\!]/, '')
+ textrees = textrees.split(',')
+ if (suffixlist.length == 1) && (suffixlist.first =~ /(#{$documentlist})/) then
+ speedup = ['doc**','**']
+ else
+ speedup = ['**']
+ end
+ sffxlst = suffixlist.join(',')
+ speedup.each do |speed|
+ textrees.each do |tt|
+ tt.gsub!(/[\\\/]$/, '')
+ if FileTest.directory?(tt) then
+ begin
+ report("locating '#{filename}' in tree '#{tt}/#{speed}/#{filename}.{#{sffxlst}}'")
+ if (result = Dir.glob("#{tt}/#{speed}/#{filename}.{#{sffxlst}}")) && result && result[0] && FileTest.file?(result[0]) then
+ fullname = result[0]
+ break
+ end
+ rescue
+ report("locating '#{filename}' in tree '#{tt}' aborted")
+ next
+ end
+ end
+ end
+ break if fullname && ! fullname.empty?
+ end
+ end
+ if register(filename,fullname) then
+ return shortpathname(fullname)
+ else
+ return ''
+ end
+ rescue
+ error, trace = $!, $@.join("\n")
+ report("fatal error: #{error}\n#{trace}")
+ # report("fatal error")
+ end
+end
+
+def run(fullname)
+ if ! fullname || fullname.empty? then
+ output("the file '#{$filename}' is not found")
+ elsif FileTest.file?(fullname) then
+ begin
+ case fullname
+ when /\.(#{$scriptlist})$/i then
+ return runoneof($1,fullname,false)
+ when /\.(#{$documentlist})$/i then
+ return runoneof($1,fullname,true)
+ else
+ return runoneof('unknown',fullname,false)
+ end
+ rescue
+ report("starting '#{$filename}' in program space '#{$program}' fails (#{$!})")
+ end
+ else
+ report("the file '#{$filename}' in program space '#{$program}' is not accessible")
+ end
+ return false
+end
+
+def direct(fullname)
+ begin
+ return runcommand([fullname.sub(/^(bin|binary)\:/, ''),expanded($arguments)].join(' '))
+ rescue
+ return false
+ end
+end
+
+def edit(filename)
+ begin
+ return runcommand([$editor,expanded(filename),expanded($arguments)].join(' '))
+ rescue
+ return false
+ end
+end
+
+def make(filename,windows=false,linux=false,remove=false)
+ basename = File.basename(filename).gsub(/\.[^.]+?$/, '')
+ if $stubpath == 'auto' then
+ basename = File.dirname($0) + '/' + basename
+ else
+ basename = $stubpath + '/' + basename unless $stubpath.empty?
+ end
+ if filename == 'texmfstart' then
+ program = 'ruby'
+ command = 'kpsewhich --format=texmfscripts --progname=context texmfstart.rb'
+ filename = `#{command}`.chomp.gsub(/\\/, '/')
+ if filename.empty? then
+ report("failure: #{command}")
+ return
+ elsif not remove then
+ if windows then
+ ['bat','exe'].each do |suffix|
+ if FileTest.file?("#{basename}.#{suffix}") then
+ report("windows stub '#{basename}.#{suffix}' skipped (already present)")
+ return
+ end
+ end
+ elsif linux && FileTest.file?(basename) then
+ report("unix stub '#{basename}' skipped (already present)")
+ return
+ end
+ end
+ else
+ program = nil
+ if filename =~ /[\\\/]/ && filename =~ /\.(#{$scriptlist})$/ then
+ program = $applications[$1]
+ end
+ filename = "\"#{filename}\"" if filename =~ /\s/
+ program = 'texmfstart' if $indirect || ! program || program.empty?
+ end
+ begin
+ callname = $predefined[filename.sub(/\.*?$/,'')] || filename
+ if remove then
+ if windows && (File.delete(basename+'.bat') rescue false) then
+ report("windows stub '#{basename}.bat' removed (calls #{callname})")
+ elsif linux && (File.delete(basename) rescue false) then
+ report("unix stub '#{basename}' removed (calls #{callname})")
+ end
+ else
+ if windows && f = open(basename+'.bat','w') then
+ f.binmode
+ f.write("@echo off\015\012")
+ f.write("#{program} #{callname} %*\015\012")
+ f.close
+ report("windows stub '#{basename}.bat' made (calls #{callname})")
+ elsif linux && f = open(basename,'w') then
+ f.binmode
+ f.write("#!/bin/sh\012")
+ f.write("#{program} #{callname} \"$@\"\012")
+ f.close
+ report("unix stub '#{basename}' made (calls #{callname})")
+ end
+ end
+ rescue
+ report("failed to make stub '#{basename}' #{$!}")
+ return false
+ else
+ return true
+ end
+end
+
+def process(&block)
+ if $iftouched then
+ files = $directives['iftouched'].split(',')
+ oldname, newname = files[0], files[1]
+ if oldname && newname && File.needsupdate(oldname,newname) then
+ report("file #{oldname}: #{File.timestamp(oldname)}")
+ report("file #{newname}: #{File.timestamp(newname)}")
+ report("file is touched, processing started")
+ yield
+ File.syncmtimes(oldname,newname)
+ else
+ report("file #{oldname} is untouched")
+ end
+ elsif $ifchanged then
+ filename = $directives['ifchanged']
+ checkname = filename + ".md5"
+ oldchecksum, newchecksum = "old", "new"
+ begin
+ newchecksum = MD5.new(IO.read(filename)).hexdigest.upcase
+ rescue
+ newchecksum = "new"
+ else
+ begin
+ oldchecksum = IO.read(checkname).chomp
+ rescue
+ oldchecksum = "old"
+ end
+ end
+ if $verbose then
+ report("old checksum #{filename}: #{oldchecksum}")
+ report("new checksum #{filename}: #{newchecksum}")
+ end
+ if oldchecksum != newchecksum then
+ report("file is changed, processing started")
+ begin
+ File.open(checkname,'w') do |f|
+ f << newchecksum
+ end
+ rescue
+ end
+ yield
+ else
+ report("file #{filename} is unchanged")
+ end
+ else
+ yield
+ end
+end
+
+def checkenvironment(tree)
+ report('')
+ ENV['TMP'] = ENV['TMP'] || ENV['TEMP'] || ENV['TMPDIR'] || ENV['HOME']
+ case RUBY_PLATFORM
+ when /(mswin|bccwin|mingw|cygwin)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-mswin'
+ when /(linux)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-linux'
+ when /(darwin|rhapsody|nextstep)/i then ENV['TEXOS'] = ENV['TEXOS'] || 'texmf-macosx'
+ # when /(netbsd|unix)/i then # todo
+ else # todo
+ end
+ ENV['TEXOS'] = "#{ENV['TEXOS'].sub(/^[\\\/]*/, '').sub(/[\\\/]*$/, '')}"
+ ENV['TEXPATH'] = tree.sub(/\/+$/,'') # + '/'
+ ENV['TEXMFOS'] = "#{ENV['TEXPATH']}/#{ENV['TEXOS']}"
+ report('')
+ report("preset : TEXPATH => #{ENV['TEXPATH']}")
+ report("preset : TEXOS => #{ENV['TEXOS']}")
+ report("preset : TEXMFOS => #{ENV['TEXMFOS']}")
+ report("preset : TMP => #{ENV['TMP']}")
+ report('')
+end
+
+def loadfile(filename)
+ begin
+ IO.readlines(filename).each do |line|
+ case line.chomp
+ when /^[\#\%]/ then
+ # comment
+ when /^(.*?)\s*(\>|\=|\<)\s*(.*)\s*$/ then
+ # = assign | > prepend | < append
+ key, how, value = $1, $2, $3
+ begin
+ # $SAFE = 0
+ value.gsub!(/\%(.*?)\%/) do
+ ENV[$1] || ''
+ end
+ # value.gsub!(/\;/,$separator) if key =~ /PATH/i then
+ case how
+ when '=', '<<' then ENV[key] = value
+ when '?', '??' then ENV[key] = ENV[key] || value
+ when '<', '+=' then ENV[key] = (ENV[key] || '') + $separator + value
+ when '>', '=+' then ENV[key] = value + $separator + (ENV[key] ||'')
+ end
+ rescue
+ report("user set failed : #{key} (#{$!})")
+ else
+ report("user set : #{key} => #{ENV[key]}")
+ end
+ end
+ end
+ rescue
+ report("error in reading file '#{filename}'")
+ end
+end
+
+def loadtree(tree)
+ begin
+ unless tree.empty? then
+ if File.directory?(tree) then
+ setuptex = File.join(tree,'setuptex.tmf')
+ else
+ setuptex = tree.dup
+ end
+ if FileTest.file?(setuptex) then
+ report("tex tree definition: #{setuptex}")
+ checkenvironment(File.dirname(setuptex))
+ loadfile(setuptex)
+ else
+ report("no setup file '#{setuptex}'")
+ end
+ end
+ rescue
+ # maybe tree is empty or boolean (no arg given)
+ end
+end
+
+def loadenvironment(environment)
+ begin
+ unless environment.empty? then
+ filename = if $path.empty? then environment else File.expand_path(File.join($path,environment)) end
+ if FileTest.file?(filename) then
+ report("environment : #{environment}")
+ loadfile(filename)
+ else
+ report("no environment file '#{environment}'")
+ end
+ end
+ rescue
+ report("problem while loading '#{environment}'")
+ end
+end
+
+def show_environment
+ if $showenv then
+ keys = ENV.keys.sort
+ size = 0
+ keys.each do |k|
+ size = k.size if k.size > size
+ end
+ report('')
+ keys.each do |k|
+ report("#{k.rjust(size)} => #{ENV[k]}")
+ end
+ report('')
+ end
+end
+
+def execute(arguments)
+
+ arguments = arguments.split(/\s+/) if arguments.class == String
+
+ $directives = hashed(arguments)
+
+ $help = $directives['help'] || false
+ $batch = $directives['batch'] || false
+ $filename = $directives['file'] || ''
+ $program = $directives['program'] || 'context'
+ $direct = $directives['direct'] || false
+ $edit = $directives['edit'] || false
+ $page = $directives['page'] || 1
+ $browser = $directives['browser'] || false
+ $report = $directives['report'] || false
+ $verbose = $directives['verbose'] || false
+ $arguments = $directives['arguments'] || ''
+ $execute = $directives['execute'] || $directives['exec'] || false
+ $locate = $directives['locate'] || false
+
+ $autotree = if $directives['autotree'] then (ENV['TEXMFSTART_TREE'] || ENV['TEXMFSTARTTREE'] || '') else '' end
+
+ $path = $directives['path'] || ''
+ $tree = $directives['tree'] || $autotree || ''
+ $environment = $directives['environment'] || ''
+
+ $make = $directives['make'] || false
+ $remove = $directives['remove'] || $directives['delete'] || false
+ $unix = $directives['unix'] || false
+ $windows = $directives['windows'] || $directives['mswin'] || false
+ $stubpath = $directives['stubpath'] || ''
+ $indirect = $directives['indirect'] || false
+
+ $before = $directives['before'] || ''
+ $after = $directives['after'] || ''
+
+ $iftouched = $directives['iftouched'] || false
+ $ifchanged = $directives['ifchanged'] || false
+
+ $openoffice = $directives['oo'] || false
+
+ $crossover = false if $directives['clear']
+
+ $showenv = $directives['showenv'] || false
+ $verbose = true if $showenv
+
+ $serve = $directives['serve'] || false
+
+ $verbose = true if (ENV['_CTX_VERBOSE_'] =~ /(y|yes|t|true|on)/io) && ! $locate && ! $report
+
+ set_applications($page)
+
+ # private:
+
+ $selfmerge = $directives['selfmerge'] || false
+ $selfcleanup = $directives['selfclean'] || $directives['selfcleanup'] || false
+
+ ENV['_CTX_VERBOSE_'] = 'yes' if $verbose
+
+ if $openoffice then
+ if ENV['OOPATH'] then
+ if FileTest.directory?(ENV['OOPATH']) then
+ report("using open office python")
+ if $mswindows then
+ $applications['python'] = $applications['py'] = "\"#{File.join(ENV['OOPATH'],'program','python.bat')}\""
+ else
+ $applications['python'] = $applications['py'] = File.join(ENV['OOPATH'],'python')
+ end
+ report("python path #{$applications['python']}")
+ else
+ report("environment variable 'OOPATH' does not exist")
+ end
+ else
+ report("environment variable 'OOPATH' is not set")
+ end
+ end
+
+ if $selfmerge then
+ output("ruby libraries are cleaned up") if SelfMerge::cleanup
+ output("ruby libraries are merged") if SelfMerge::merge
+ elsif $selfcleanup then
+ output("ruby libraries are cleaned up") if SelfMerge::cleanup
+ elsif $serve then
+ if ENV['KPSEMETHOD'] && ENV['KPSEPORT'] then
+ # # kpse_merge_done: require 'base/kpseremote'
+ begin
+ KpseRemote::start_server
+ rescue
+ end
+ else
+ usage
+ puts("")
+ puts("message : set 'KPSEMETHOD' and 'KPSEPORT' variables")
+ end
+ elsif $help || ! $filename || $filename.empty? then
+ usage
+ loadtree($tree)
+ loadenvironment($environment)
+ show_environment()
+ elsif $batch && $filename && ! $filename.empty? then
+ # todo, take commands from file and avoid multiple starts and checks
+ else
+ report("texmfstart version #{$version}")
+ loadtree($tree)
+ loadenvironment($environment)
+ show_environment()
+ if $make || $remove then
+ if $filename == 'all' then
+ makelist = $makelist
+ else
+ makelist = [$filename]
+ end
+ makelist.each do |filename|
+ if $windows then
+ make(filename,true,false,$remove)
+ elsif $unix then
+ make(filename,false,true,$remove)
+ else
+ make(filename,$mswindows,!$mswindows,$remove)
+ end
+ end
+ elsif $browser && $filename =~ /^http\:\/\// then
+ launch($filename)
+ else
+ begin
+ process do
+ if $direct || $filename =~ /^bin\:/ then
+ direct($filename)
+ elsif $edit && ! $editor.empty? then
+ edit($filename)
+ else # script: or no prefix
+ command = find(shortpathname($filename),$program)
+ if command then
+ register("THREAD",File.dirname(File.expand_path(command)))
+ run(command)
+ else
+ report('unable to locate program')
+ end
+ end
+ end
+ rescue
+ report('fatal error in starting process')
+ end
+ end
+ end
+
+end
+
+execute(ARGV)
+
+exit (if ($?.to_i rescue 0) > 0 then 1 else 0 end)
diff --git a/Master/bin/i386-freebsd/texsis b/Master/bin/i386-freebsd/texsis
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/texsis
+++ b/Master/bin/i386-freebsd/texsis
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/textools b/Master/bin/i386-freebsd/textools
new file mode 100755
index 00000000000..7445eac371c
--- /dev/null
+++ b/Master/bin/i386-freebsd/textools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart textools.rb "$@"
diff --git a/Master/bin/i386-freebsd/texutil b/Master/bin/i386-freebsd/texutil
index afced152700..607154af059 120000..100755
--- a/Master/bin/i386-freebsd/texutil
+++ b/Master/bin/i386-freebsd/texutil
@@ -1 +1,2 @@
-texexec \ No newline at end of file
+#!/bin/sh
+texmfstart texutil.rb "$@"
diff --git a/Master/bin/i386-freebsd/tftopl b/Master/bin/i386-freebsd/tftopl
index 4ceb4c32582..2838a37a63c 100755
--- a/Master/bin/i386-freebsd/tftopl
+++ b/Master/bin/i386-freebsd/tftopl
Binary files differ
diff --git a/Master/bin/i386-freebsd/tie b/Master/bin/i386-freebsd/tie
index 10d055e9e6e..037780f1f30 100755
--- a/Master/bin/i386-freebsd/tie
+++ b/Master/bin/i386-freebsd/tie
Binary files differ
diff --git a/Master/bin/i386-freebsd/tmftools b/Master/bin/i386-freebsd/tmftools
new file mode 100755
index 00000000000..7531a966390
--- /dev/null
+++ b/Master/bin/i386-freebsd/tmftools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart tmftools.rb "$@"
diff --git a/Master/bin/i386-freebsd/ttf2afm b/Master/bin/i386-freebsd/ttf2afm
index f7c99a3f01f..203b66a61de 100755
--- a/Master/bin/i386-freebsd/ttf2afm
+++ b/Master/bin/i386-freebsd/ttf2afm
Binary files differ
diff --git a/Master/bin/i386-freebsd/ttf2pk b/Master/bin/i386-freebsd/ttf2pk
index cd2d197452b..b77709489bc 100755
--- a/Master/bin/i386-freebsd/ttf2pk
+++ b/Master/bin/i386-freebsd/ttf2pk
Binary files differ
diff --git a/Master/bin/i386-freebsd/ttf2tfm b/Master/bin/i386-freebsd/ttf2tfm
index 8abfbd7eaf8..142b2376395 100755
--- a/Master/bin/i386-freebsd/ttf2tfm
+++ b/Master/bin/i386-freebsd/ttf2tfm
Binary files differ
diff --git a/Master/bin/i386-freebsd/ttftotype42 b/Master/bin/i386-freebsd/ttftotype42
new file mode 100755
index 00000000000..0c065ad0d7e
--- /dev/null
+++ b/Master/bin/i386-freebsd/ttftotype42
Binary files differ
diff --git a/Master/bin/i386-freebsd/uniqleaf b/Master/bin/i386-freebsd/uniqleaf
deleted file mode 120000
index afced152700..00000000000
--- a/Master/bin/i386-freebsd/uniqleaf
+++ /dev/null
@@ -1 +0,0 @@
-texexec \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/updmap b/Master/bin/i386-freebsd/updmap
index c66303fdeee..0f8cc469a83 100755
--- a/Master/bin/i386-freebsd/updmap
+++ b/Master/bin/i386-freebsd/updmap
@@ -122,7 +122,7 @@ export PATH
test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
# the version string
-version=1122009795 # seconds since `00:00:00 1970-01-01 UTC'
+version=1167072206 # seconds since `00:00:00 1970-01-01 UTC'
# date '+%s' (with GNU date)
###############################################################################
@@ -1052,7 +1052,8 @@ syncWithTrees()
###############################################################################
# normalizeLines()
# remove comments, whitespace is exactly one space, no empty lines,
-# no whitespace at end of line, one space before and after "
+# no whitespace at end of line, one space before and after ",
+# no CR's (as in skaknew).
###############################################################################
normalizeLines()
{
@@ -1062,7 +1063,9 @@ normalizeLines()
-e '/^ *$/d' \
-e 's@ $@@' \
-e 's@ *" *@ " @g' \
- -e 's@" \([^"]*\) "@"\1"@g' | sort | uniq
+ -e 's@" \([^"]*\) "@"\1"@g' \
+ | tr -d '\r' \
+ | sort | uniq
}
###############################################################################
diff --git a/Master/bin/i386-freebsd/utf8mex b/Master/bin/i386-freebsd/utf8mex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/utf8mex
+++ b/Master/bin/i386-freebsd/utf8mex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/vftovp b/Master/bin/i386-freebsd/vftovp
index a29b439585f..9ee684599e9 100755
--- a/Master/bin/i386-freebsd/vftovp
+++ b/Master/bin/i386-freebsd/vftovp
Binary files differ
diff --git a/Master/bin/i386-freebsd/vpe b/Master/bin/i386-freebsd/vpe
new file mode 100755
index 00000000000..9eb52b69e3c
--- /dev/null
+++ b/Master/bin/i386-freebsd/vpe
@@ -0,0 +1,421 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
+ if 0;
+use strict;
+#
+# vpe.pl
+#
+# Copyright (C) 2000 Heiko Oberdiek.
+#
+# This program may be distributed and/or modified under the
+# conditions of the LaTeX Project Public License, either version 1.2
+# of this license or (at your option) any later version.
+# The latest version of this license is in
+# http://www.latex-project.org/lppl.txt
+# and version 1.2 or later is part of all distributions of LaTeX
+# version 1999/12/01 or later.
+#
+# See file "vpe.txt" for a list of files that belong to this project.
+#
+# This file "vpe.pl" may be renamed to "vpe"
+# for installation purposes.
+#
+my $file = "vpe.pl";
+my $program = uc($&) if $file =~ /^\w+/;
+my $version = "0.1";
+my $date = "2000/09/15";
+my $author = "Heiko Oberdiek";
+my $copyright = "Copyright (c) 2000 by $author.";
+#
+# History:
+# 2000/09/15 v0.1: First release.
+#
+
+### program identification
+my $title = "$program $version, $date - $copyright\n";
+
+### editor call
+# %F: file name
+# %L: line number
+my $EditorCall = "xterm -e joe +%d %s";
+$EditorCall = $ENV{TEXEDIT} if $ENV{TEXEDIT};
+$EditorCall = $ENV{VPE} if $ENV{VPE};
+
+### error strings
+my $Error = "!!! Error:"; # error prefix
+
+my $usage = <<"END_OF_USAGE";
+${title}
+Depending on the name of the script `vpe' works in four modes:
+
+* [vpe] Syntax: vpe <pdf file>[.pdf]
+ The pdf file is scanned for actions created by VTeX,
+ that start an editor with the source file at the
+ specified line under Windows.
+ A symbol link is made from the source file name
+ extended by the extension `.vpe' to this script.
+ The line number is encoded in the path and the
+ action is changed to start this script.
+
+* [sty] Internal for vpe.sty:
+ Syntax: vpe --sty [--progname=...] <latex file> <vpe file>
+
+* [system] Internal for vpe.sty:
+ Syntax: vpe --system <vpe file>
+
+* [launch] Syntax: <source file name>.vpe
+ The script decodes the line number in the path of
+ the source file name and starts an editor with
+ this file at that line number.
+
+Options:
+ --help: print usage.
+ --verbose: print additional informations during running.
+ --force: force symbol links
+ --delete: delete symbol links
+ --sty: internal for `vpe.sty' (get absolute file name and lines)
+ --system: internal for `vpe.sty' (get system info linux or win)
+ --progname: latex, pdflatex, elatex, pdfelatex
+END_OF_USAGE
+
+### options
+$::opt_verbose = 0;
+$::opt_help = 0;
+$::opt_force = 0;
+$::opt_delete = 0;
+$::opt_sty = 0;
+$::opt_system = 0;
+$::opt_progname = "latex";
+use Getopt::Long;
+GetOptions(
+ "help!",
+ "verbose!",
+ "force!",
+ "delete!",
+ "sty!",
+ "system!",
+ "progname=s",
+) or die $usage;
+if ($::opt_help) {
+ die $usage;
+}
+
+if ($::opt_sty and $::opt_system) {
+ die "$usage" .
+ "$Error Options --sty and --system cannot used together!\n";
+}
+
+###################
+### launch mode ###
+###################
+if ($0 =~ /\.vpe/) {
+
+ @ARGV == 0 or
+ die "$usage$Error Too many arguments [launch mode]!\n";
+
+ my $file = "";
+ $0 =~ m|(^[\./]+\./)(.+)\.vpe$| or
+ die "$Error Cannot extract line number ($0)!\n";
+ my $str = $1;
+ $file = "/$2";
+
+ my $line = "";
+ while ($str ne "") {
+ $str =~ m|^(/*)(\.?)\./(.*)$| or
+ die "$Error Parse error!\n";
+ $line .= length($1) + (($2 eq ".") ? 5 : 0);
+ $str = $3;
+ }
+
+ my $callstr = $EditorCall;
+ $EditorCall =~ s/%s/$file/;
+ $EditorCall =~ s/%d/$line/;
+ print "File: $file, line: $line\n" if $::opt_verbose;
+ exec($EditorCall);
+ exit 1;
+}
+
+###
+### used by both sty and system mode:
+###
+my $system = "linux";
+$system = "" if $^O =~ /os2/i;
+$system = "" if $^O =~ /mac/i;
+$system = "win" if $^O =~ /dos/i;
+$system = "win" if $^O =~ /win/i;
+
+################
+### sty mode ###
+################
+if ($::opt_sty) {
+
+ @ARGV == 2 or
+ die "$usage$Error Wrong arguments [sty mode]!\n";
+
+ my $vpefile = $ARGV[1];
+ print "VPE file: $vpefile\n" if $::opt_verbose;
+
+ my $file = `kpsewhich -progname=$::opt_progname $ARGV[0]`;
+ chomp $file;
+ if (!($file =~ m|^/| or $file =~ m|^\w:|)) {
+ use Cwd;
+ $file = cwd() . "/" . $file;
+ $file =~ s|/[^/]+/\.\./|/|g;
+ $file =~ s|/\./|/|g;
+ }
+ -f $file or
+ die "$Error Cannot find file `$file' [sty mode]!\n";
+ print "File: $file\n" if $::opt_verbose;
+
+ my $last = 0;
+ if (open(IN, $file)) {
+ while (<IN>) {
+ $last++;
+ }
+ }
+ if ($last == 0) {
+ $last = 10000;
+ }
+ print "Last line: $last\n" if $::opt_verbose;
+
+ open(OUT, ">>$vpefile") or
+ die "$Error Cannot open file `$vpefile`!\n";
+ print OUT "\\vpeentry{$file}{$last}\n";
+
+ exit 1;
+}
+
+###################
+### system mode ###
+###################
+if ($::opt_system) {
+
+ @ARGV == 1 or
+ die "$usage$Error Wrong arguments [system mode]!\n";
+
+ my $vpefile = $ARGV[0];
+ print "VPE file: $vpefile\n" if $::opt_verbose;
+
+ open(OUT, ">>$vpefile") or
+ die "$Error Cannot open file `$vpefile`!\n";
+ print OUT "\\vpesystem{$system}\n";
+
+ exit 1;
+}
+
+################
+### vpe mode ###
+################
+if (@ARGV < 1) {
+ die "$usage$Error Missing pdf file [vpe mode]!\n";
+}
+if (@ARGV > 2) {
+ die "$usage$Error Too many arguments [vpe mode]!\n";
+}
+
+my $pdffile = $ARGV[0];
+if (!-f $pdffile) {
+ my $name = $pdffile;
+ $pdffile .= ".pdf";
+ -f $pdffile or
+ die "$Error File `$name' not found [vpe mode]!\n";
+}
+
+open(IN, "+<$pdffile") or
+ die "$Error Cannot open `$pdffile' [vpe mode]!\n";
+binmode(IN);
+my %symlinks = ();
+while (<IN>) {
+
+ if (m|/F\([\./]*(/.*)\.vpe\)|) {
+ $symlinks{$1} = 1;
+ next;
+ }
+
+ my $do = 0;
+ my ($action, $file, $line, $type);
+ # my $color; # only for debugging
+
+ if (m|^
+ /A \s* << \s*
+ /Type \s* /Action \s*
+ /S \s* /Launch \s*
+ /Win \s* << \s*
+ /F \s* \(aftcomp.exe\) \s*
+ /P \s* \("(.*)\" \s+ \d+\-(\d+)\) \s*
+ >> \s*
+ >> \s*
+ $
+ |x
+ ) {
+ $action = $_;
+ $file = $1;
+ $line = $2;
+ # $color = "/C[0 0 1]"; # only for debugging
+ $type = "aftcomp";
+ $do = 1;
+ }
+
+ if (m|^
+ /A \s* << \s*
+ /Type \s* /Action \s*
+ /S \s* /Launch \s*
+ /Win \s* << \s*
+ /F \s* \(repos.exe\) \s*
+ /P \s* \(
+ "(.*)" \s*
+ "(\d+)" \s*
+ "(.*)" \s*
+ "(\d+)"
+ \) \s*
+ >> \s*
+ >> \s*
+ $
+ |x
+ ) {
+ $action = $_;
+ if ($3 eq "") {
+ $file = $1;
+ $line = $2;
+ }
+ else {
+ # ???
+ $file = $1;
+ $line = $2;
+ }
+ # $color = "/C[1 0 0]"; # only for debugging
+ $type = "repos";
+ $do = 1;
+ }
+
+ if ($do) {
+ my $length = length($action);
+ print "* File: $file, line: $line, type: $type\n" if $::opt_verbose;
+
+ if (!($file =~ m|^/|)) {
+ print STDERR "$Error File `$file' lacks of absolute path!\n";
+ next;
+ }
+
+ if (!$::opt_delete) {
+ if ($line <= 0) {
+ $line = 1;
+ }
+
+ my $newaction = "";
+ {
+ my $digit = substr($line, 0, 1);
+ if ($digit <= 5) {
+ $newaction .= "/" x $digit;
+ }
+ else {
+ $newaction .= "/" x ($digit - 5) . ".";
+ }
+ $newaction .= "./";
+ my $rest = $line;
+ while (($rest = substr($rest, 1)) ne "") {
+ $digit = substr($rest, 0, 1);
+ if ($digit < 5) {
+ $newaction .= "/" x $digit;
+ }
+ else {
+ $newaction .= "/" x ($digit - 5) . ".";
+ }
+ $newaction .= "./";
+ }
+ }
+ $newaction .= substr($file, 1) . ".vpe";
+ $newaction = # $color . # only for debugging
+ "/A<</Type/Action/S/Launch/F($newaction)>>";
+ $newaction .= " " x ($length - length($newaction) - 1);
+ if (length($newaction) > $length) {
+ print STDERR "$Error Action too long!\n";
+ next;
+ }
+
+ seek(IN, -length($action), 1);
+ print IN $newaction;
+ }
+
+ $symlinks{$file} = 1;
+ }
+}
+
+if (keys(%symlinks)) {
+
+ my $this = $0;
+ if (!$::opt_delete) {
+ if (!-f $0 or !-x $0) {
+ $this = `which $0`;
+ ($this ne "") or die "$Error Cannot find this script!\n";
+ }
+ if (!($this =~ m|^/|)) {
+ use Cwd;
+ $this = cwd() . "/" . $this;
+ }
+ $this =~ s|/[^/]+/\.\./|/|g;
+ $this =~ s|/\./|/|g;
+ }
+
+ if ($::opt_delete) {
+ print "Delete symlinks:\n";
+ }
+ else {
+ if ($::opt_force) {
+ print "Forced symlinks to $this:\n";
+ }
+ else {
+ print "Symlinks to $this:\n";
+ }
+ }
+
+ foreach (keys(%symlinks)) {
+ my $sym = $_ . ".vpe";
+ print " $sym [";
+
+ if ($::opt_delete) {
+ if (!-l $sym) {
+ print "ok, not existing]\n";
+ next;
+ }
+ unlink($sym);
+ if (!-l $sym) {
+ print "ok, deleted]\n";
+ next;
+ }
+ print "failed]\n";
+ next;
+ }
+ if ($::opt_force) {
+ if (-l $sym) {
+ unlink($sym);
+ if (-l $sym) {
+ print "deletion failed]\n";
+ next;
+ }
+ if (symlink($this, $sym)) {
+ print "ok, deleted and created]\n";
+ next;
+ }
+ print "deleted, creation failed]\n";
+ next;
+ }
+ if (symlink($this, $sym)) {
+ print "ok, created]\n";
+ next;
+ }
+ print "creation failed]\n";
+ next;
+ }
+ if (-f $sym) {
+ print "exists]\n";
+ next;
+ }
+ if (symlink($this, $sym)) {
+ print "ok, created]\n";
+ next;
+ }
+ print "failed]\n";
+ next;
+ }
+}
+__END__
diff --git a/Master/bin/i386-freebsd/vptovf b/Master/bin/i386-freebsd/vptovf
index 217fa044e45..85ae9d9f912 100755
--- a/Master/bin/i386-freebsd/vptovf
+++ b/Master/bin/i386-freebsd/vptovf
Binary files differ
diff --git a/Master/bin/i386-freebsd/weave b/Master/bin/i386-freebsd/weave
index 17ed25d8a6e..633271748ef 100755
--- a/Master/bin/i386-freebsd/weave
+++ b/Master/bin/i386-freebsd/weave
Binary files differ
diff --git a/Master/bin/i386-freebsd/xdvi-xaw.bin b/Master/bin/i386-freebsd/xdvi-xaw.bin
index 942bae4e7e2..97b17cba497 100755
--- a/Master/bin/i386-freebsd/xdvi-xaw.bin
+++ b/Master/bin/i386-freebsd/xdvi-xaw.bin
Binary files differ
diff --git a/Master/bin/i386-freebsd/xdvipdfmx b/Master/bin/i386-freebsd/xdvipdfmx
new file mode 100755
index 00000000000..efe7c1dd4cb
--- /dev/null
+++ b/Master/bin/i386-freebsd/xdvipdfmx
Binary files differ
diff --git a/Master/bin/i386-freebsd/xelatex b/Master/bin/i386-freebsd/xelatex
new file mode 120000
index 00000000000..ef9fe406fd6
--- /dev/null
+++ b/Master/bin/i386-freebsd/xelatex
@@ -0,0 +1 @@
+xetex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/xeplain b/Master/bin/i386-freebsd/xeplain
new file mode 120000
index 00000000000..ef9fe406fd6
--- /dev/null
+++ b/Master/bin/i386-freebsd/xeplain
@@ -0,0 +1 @@
+xetex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/xetex b/Master/bin/i386-freebsd/xetex
new file mode 100755
index 00000000000..e7926b10209
--- /dev/null
+++ b/Master/bin/i386-freebsd/xetex
Binary files differ
diff --git a/Master/bin/i386-freebsd/xmltex b/Master/bin/i386-freebsd/xmltex
index eb4e1e5aff7..f68cc91498e 120000
--- a/Master/bin/i386-freebsd/xmltex
+++ b/Master/bin/i386-freebsd/xmltex
@@ -1 +1 @@
-pdfetex \ No newline at end of file
+pdftex \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/xmltools b/Master/bin/i386-freebsd/xmltools
new file mode 100755
index 00000000000..03086d0436b
--- /dev/null
+++ b/Master/bin/i386-freebsd/xmltools
@@ -0,0 +1,2 @@
+#!/bin/sh
+texmfstart xmltools.rb "$@"