summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-01-12 07:38:12 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-01-12 07:38:12 +0000
commitd491195130658a9a332bf79d49dcc40a5af6244f (patch)
tree54ae3f1d1744402cf9d8e46859637f1a0d1685ff
parent5cb06055479d9bec7529d480c5f65132ea180264 (diff)
texk/web2c: OFM2OPL & Co (Web and C): Non-zero return code in case of problems
git-svn-id: svn://tug.org/texlive/trunk@36035 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/omegafonts/ChangeLog10
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.am11
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.in56
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/bad.test26
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/check.test8
-rw-r--r--Build/source/texk/web2c/omegafonts/error_routines.c3
-rw-r--r--Build/source/texk/web2c/omegafonts/error_routines.h2
-rw-r--r--Build/source/texk/web2c/omegafonts/omfonts.c2
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/selectfont.test4
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/badofm.ofmbin0 -> 144 bytes
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/badopl.opl1
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/badovf.ofmbin0 -> 144 bytes
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/badovf.ovfbin0 -> 24 bytes
-rw-r--r--Build/source/texk/web2c/omegafonts/tests/badovp.ovp1
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/version.test20
-rw-r--r--Build/source/texk/web2c/omegaware/ChangeLog13
-rw-r--r--Build/source/texk/web2c/omegaware/am/omegaware.am24
-rwxr-xr-xBuild/source/texk/web2c/omegaware/bad.test27
-rwxr-xr-xBuild/source/texk/web2c/omegaware/check.test6
-rw-r--r--Build/source/texk/web2c/omegaware/ofm2opl.ch73
-rw-r--r--Build/source/texk/web2c/omegaware/opl2ofm.ch40
-rw-r--r--Build/source/texk/web2c/omegaware/ovf2ovp.ch9
-rw-r--r--Build/source/texk/web2c/omegaware/ovp2ovf.ch52
-rwxr-xr-xBuild/source/texk/web2c/omegaware/selectfont.test4
-rw-r--r--Build/source/texk/web2c/omegaware/tests/badofm.ofmbin0 -> 144 bytes
-rw-r--r--Build/source/texk/web2c/omegaware/tests/badopl.opl1
-rw-r--r--Build/source/texk/web2c/omegaware/tests/badovf.ofmbin0 -> 144 bytes
-rw-r--r--Build/source/texk/web2c/omegaware/tests/badovf.ovfbin0 -> 24 bytes
-rw-r--r--Build/source/texk/web2c/omegaware/tests/badovp.ovp1
-rwxr-xr-xBuild/source/texk/web2c/omegaware/version.test17
30 files changed, 335 insertions, 76 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog
index 247d9d3d23e..b9adfacefff 100644
--- a/Build/source/texk/web2c/omegafonts/ChangeLog
+++ b/Build/source/texk/web2c/omegafonts/ChangeLog
@@ -1,3 +1,13 @@
+2015-01-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * error_routines.[ch], omfonts.c: Non-zero error return code.
+ * check.test: Also test writung OPL file to stdout.
+ * selectfont.test: Also test writung OVP file to stdout.
+ * bad.test, version.test: Shell scripts for new tests.
+ * tests/badofm.ofm, tests/badopl.opl, tests/badovf.{ofm,ovf},
+ tests/badovp.ovp: New test input files.
+ * Makefile.am: Add new test shell scripts and input files.
+
2014-11-08 Peter Breitenlohner <peb@mppmu.mpg.de>
* omfonts.c: Help texts for C and Web2C versions differ.
diff --git a/Build/source/texk/web2c/omegafonts/Makefile.am b/Build/source/texk/web2c/omegafonts/Makefile.am
index 4ac33f4eced..59b5c88753b 100644
--- a/Build/source/texk/web2c/omegafonts/Makefile.am
+++ b/Build/source/texk/web2c/omegafonts/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am for the TeX Live subdirectory texk/web2c/omegafonts/
##
-## Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir) $(KPATHSEA_INCLUDES) -DNOT_WEB2C
@@ -96,15 +96,20 @@ endif OTANGLE
## Tests
##
-OMFONTS_tests = charwd.test check.test help.test level1.test ligkern.test \
+OMFONTS_tests = bad.test charwd.test check.test help.test level1.test ligkern.test \
ofonts.test omfonts.test overbmp.test realnum.test repeat.test \
- selectfont.test shorten.test specialhex.test yannis.test
+ selectfont.test shorten.test specialhex.test version.test yannis.test
if OTANGLE
TESTS = $(OMFONTS_tests)
endif OTANGLE
EXTRA_DIST = $(OMFONTS_tests)
+## bad.test
+EXTRA_DIST += \
+ tests/badofm.ofm tests/badopl.opl \
+ tests/badovf.ofm tests/badovf.ovf tests/badovp.ovp
+DISTCLEANFILES += bad*.*
## charwd.test
EXTRA_DIST += tests/charwd-r.pl tests/charwd-v.vpl
DISTCLEANFILES += tests/charwdr.* tests/charwdv.*
diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in
index f3fb4ebf2aa..ee9fb264626 100644
--- a/Build/source/texk/web2c/omegafonts/Makefile.in
+++ b/Build/source/texk/web2c/omegafonts/Makefile.in
@@ -716,15 +716,15 @@ omfonts_DEPENDENCIES = $(proglib) $(KPATHSEA_DEPEND)
call_omfonts_CPPFLAGS = -DEXEPROG=\"omfonts.exe\"
nodist_call_omfonts_SOURCES = ../callexe.c
call_omfonts_LDADD =
-DISTCLEANFILES = pl-parser.output tests/charwdr.* tests/charwdv.* \
- tests/xcheck* tests/xlevel1.* tests/xlig*.* tests/xofont* \
- tests/Cherokee.tfm tests/OCherokee.ofm tests/OCherokee.opl \
- tests/OCherokee.ovf tests/xCherokee.* tests/xOCherokee.* \
- tests/xinbmp* tests/xoverbmp* tests/realnum.* \
- tests/xrepeated.* tests/sample*.ofm tests/sample*.ovf \
- tests/sample1-h.opl tests/xsample*.out tests/shortend.* \
- tests/specialhex.ofm tests/specialhex.opl tests/specialhex.ovf \
- tests/xspecialhex.* tests/*yarabic*
+DISTCLEANFILES = pl-parser.output bad*.* tests/charwdr.* \
+ tests/charwdv.* tests/xcheck* tests/xlevel1.* tests/xlig*.* \
+ tests/xofont* tests/Cherokee.tfm tests/OCherokee.ofm \
+ tests/OCherokee.opl tests/OCherokee.ovf tests/xCherokee.* \
+ tests/xOCherokee.* tests/xinbmp* tests/xoverbmp* \
+ tests/realnum.* tests/xrepeated.* tests/sample*.ofm \
+ tests/sample*.ovf tests/sample1-h.opl tests/xsample*.out \
+ tests/shortend.* tests/specialhex.ofm tests/specialhex.opl \
+ tests/specialhex.ovf tests/xspecialhex.* tests/*yarabic*
linked_programs = ofm2opl opl2ofm ovf2ovp ovp2ovf
bin_links = \
omfonts$(EXEEXT):ofm2opl \
@@ -732,27 +732,29 @@ bin_links = \
omfonts$(EXEEXT):ovf2ovp \
omfonts$(EXEEXT):ovp2ovf
-OMFONTS_tests = charwd.test check.test help.test level1.test ligkern.test \
+OMFONTS_tests = bad.test charwd.test check.test help.test level1.test ligkern.test \
ofonts.test omfonts.test overbmp.test realnum.test repeat.test \
- selectfont.test shorten.test specialhex.test yannis.test
+ selectfont.test shorten.test specialhex.test version.test yannis.test
@OTANGLE_TRUE@TESTS = $(OMFONTS_tests)
-EXTRA_DIST = $(OMFONTS_tests) tests/charwd-r.pl tests/charwd-v.vpl \
- tests/check.ofm tests/check.opl tests/checked.opl \
- tests/level1.opl tests/ligall.opl tests/ligbch.opl \
- tests/ligbdy.opl tests/ligblb.opl tests/ligblv.opl \
- tests/ligblv.ovp tests/ligloop1.ofm tests/ligloop1.opl \
- tests/ligloop2.opl tests/liguse.opl tests/liguse1.opl \
- tests/liguse2.opl tests/ofontr0.pl tests/ofontr1.pl \
- tests/ofontr1.vpl tests/ofontr2.opl tests/ofontr2.ovp \
- tests/ofontr3.opl tests/ofontr3.ovp tests/ofontv4.pl \
- tests/ofontv4.vpl tests/ofontv5.opl tests/ofontv5.ovp \
- tests/ofontv6.opl tests/ofontv6.ovp tests/Cherokee.pl \
- tests/OCherokee.ovp tests/inbmp.opl tests/overbmp.opl \
- tests/overbmp.ovp tests/realnum.opl tests/realnum.out \
- tests/repeat.opl tests/repeated.opl tests/sample.out \
- tests/sample.ovp tests/sample0-h.opl tests/shorten.opl \
- tests/specialhex.ovp tests/arabicr.pl tests/arabic.ovp
+EXTRA_DIST = $(OMFONTS_tests) tests/badofm.ofm tests/badopl.opl \
+ tests/badovf.ofm tests/badovf.ovf tests/badovp.ovp \
+ tests/charwd-r.pl tests/charwd-v.vpl tests/check.ofm \
+ tests/check.opl tests/checked.opl tests/level1.opl \
+ tests/ligall.opl tests/ligbch.opl tests/ligbdy.opl \
+ tests/ligblb.opl tests/ligblv.opl tests/ligblv.ovp \
+ tests/ligloop1.ofm tests/ligloop1.opl tests/ligloop2.opl \
+ tests/liguse.opl tests/liguse1.opl tests/liguse2.opl \
+ tests/ofontr0.pl tests/ofontr1.pl tests/ofontr1.vpl \
+ tests/ofontr2.opl tests/ofontr2.ovp tests/ofontr3.opl \
+ tests/ofontr3.ovp tests/ofontv4.pl tests/ofontv4.vpl \
+ tests/ofontv5.opl tests/ofontv5.ovp tests/ofontv6.opl \
+ tests/ofontv6.ovp tests/Cherokee.pl tests/OCherokee.ovp \
+ tests/inbmp.opl tests/overbmp.opl tests/overbmp.ovp \
+ tests/realnum.opl tests/realnum.out tests/repeat.opl \
+ tests/repeated.opl tests/sample.out tests/sample.ovp \
+ tests/sample0-h.opl tests/shorten.opl tests/specialhex.ovp \
+ tests/arabicr.pl tests/arabic.ovp
all: all-am
.SUFFIXES:
diff --git a/Build/source/texk/web2c/omegafonts/bad.test b/Build/source/texk/web2c/omegafonts/bad.test
new file mode 100755
index 00000000000..92baa688567
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/bad.test
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+TEXMFCNF=$srcdir/../../kpathsea
+OFMFONTS=$srcdir/tests
+export TEXMFCNF OFMFONTS
+
+echo && echo "*** ./omfonts"
+./omfonts && exit 1
+
+echo && echo "*** ofm2opl badofm badofm"
+./omfonts -ofm2opl $srcdir/tests/badofm badofm && exit 1
+
+echo && echo "*** opl2ofm badopl badopl"
+./omfonts -opl2ofm $srcdir/tests/badopl badopl && exit 1
+
+echo && echo "*** ovf2ovp badovf badovf badovf"
+./omfonts -ovf2ovp $srcdir/tests/badovf $srcdir/tests/badovf badovf && exit 1
+
+echo && echo "*** ovp2ovf badovp badovp"
+./omfonts -ovp2ovf $srcdir/tests/badovp badovp && exit 1
+
+exit 0
+
diff --git a/Build/source/texk/web2c/omegafonts/check.test b/Build/source/texk/web2c/omegafonts/check.test
index 288cb9411ef..6ca13f7d1c9 100755
--- a/Build/source/texk/web2c/omegafonts/check.test
+++ b/Build/source/texk/web2c/omegafonts/check.test
@@ -1,10 +1,8 @@
#! /bin/sh
-# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2014, 2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
-tests=tests
-
test -d tests || mkdir -p tests
TEXMFCNF=$srcdir/../../kpathsea
@@ -20,8 +18,8 @@ diff $srcdir/tests/check.opl tests/xcheck.opl || exit 1
echo && echo "*** opl2ofm xcheck xchecked"
./omfonts -opl2ofm tests/xcheck tests/xchecked || exit 1
-echo && echo "*** ofm2opl xchecked xchecked"
-./omfonts -ofm2opl tests/xchecked tests/xchecked || exit 1
+echo && echo "*** ofm2opl xchecked stdout (xchecked.opl)"
+./omfonts -ofm2opl tests/xchecked >tests/xchecked.opl || exit 1
echo && echo "*** diff checked.opl xchecked.opl"
diff $srcdir/tests/checked.opl tests/xchecked.opl || exit 1
diff --git a/Build/source/texk/web2c/omegafonts/error_routines.c b/Build/source/texk/web2c/omegafonts/error_routines.c
index f3d23bfe1a3..ec7979860bf 100644
--- a/Build/source/texk/web2c/omegafonts/error_routines.c
+++ b/Build/source/texk/web2c/omegafonts/error_routines.c
@@ -25,6 +25,8 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
#include "parser.h"
#include "error_routines.h"
+int num_errors = 0;
+
/* Error routines:
All of the routines in this file have the same general format.
@@ -62,6 +64,7 @@ yyerror(const_string fmt)
fprintf(stderr, "line %d (parsing): ", line_number);
fprintf(stderr, fmt);
fprintf(stderr, "\n");
+ num_errors++;
}
diff --git a/Build/source/texk/web2c/omegafonts/error_routines.h b/Build/source/texk/web2c/omegafonts/error_routines.h
index 6a707c77aa6..c27d1cd9f01 100644
--- a/Build/source/texk/web2c/omegafonts/error_routines.h
+++ b/Build/source/texk/web2c/omegafonts/error_routines.h
@@ -21,6 +21,8 @@ along with Omega; if not, write to the Free Software Foundation, Inc.,
*/
+extern int num_errors;
+
extern void lex_error_1(const_string, int);
extern void lex_error_s(const_string, const_string);
extern void lex_error_s_1(const_string, const_string, int);
diff --git a/Build/source/texk/web2c/omegafonts/omfonts.c b/Build/source/texk/web2c/omegafonts/omfonts.c
index 0b9f9c3e5c4..2df884388b9 100644
--- a/Build/source/texk/web2c/omegafonts/omfonts.c
+++ b/Build/source/texk/web2c/omegafonts/omfonts.c
@@ -293,6 +293,7 @@ main (int argc, string *argv)
(void)yyparse();
output_ofm_file();
(void)fclose(file_ofm);
+ if (num_errors > 0) exit(1);
break;
}
case PROG_OVP2OVF: {
@@ -306,6 +307,7 @@ main (int argc, string *argv)
(void)fclose(file_ofm);
output_ovf_file();
(void)fclose(file_ovf);
+ if (num_errors > 0) exit(1);
break;
}
default: {exit(1);}
diff --git a/Build/source/texk/web2c/omegafonts/selectfont.test b/Build/source/texk/web2c/omegafonts/selectfont.test
index d6024571107..ea038ff404a 100755
--- a/Build/source/texk/web2c/omegafonts/selectfont.test
+++ b/Build/source/texk/web2c/omegafonts/selectfont.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2011-2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
test -d tests || mkdir -p tests
@@ -25,7 +25,7 @@ diff $srcdir/tests/sample.out tests/xsample.out || exit 1
./omfonts -ovp2ovf -verbose $srcdir/tests/sample.ovp tests/sample2.ovf || exit 1
-./omfonts -ovf2ovp -verbose tests/sample2 sample2 tests/xsample2.out || exit 1
+./omfonts -ovf2ovp -verbose tests/sample2 sample2 >tests/xsample2.out || exit 1
diff $srcdir/tests/sample.out tests/xsample2.out || exit 1
diff --git a/Build/source/texk/web2c/omegafonts/tests/badofm.ofm b/Build/source/texk/web2c/omegafonts/tests/badofm.ofm
new file mode 100644
index 00000000000..69bbde45383
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/badofm.ofm
Binary files differ
diff --git a/Build/source/texk/web2c/omegafonts/tests/badopl.opl b/Build/source/texk/web2c/omegafonts/tests/badopl.opl
new file mode 100644
index 00000000000..d8a0885e0a5
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/badopl.opl
@@ -0,0 +1 @@
+(Not an OPL file.
diff --git a/Build/source/texk/web2c/omegafonts/tests/badovf.ofm b/Build/source/texk/web2c/omegafonts/tests/badovf.ofm
new file mode 100644
index 00000000000..988dbbe6e47
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/badovf.ofm
Binary files differ
diff --git a/Build/source/texk/web2c/omegafonts/tests/badovf.ovf b/Build/source/texk/web2c/omegafonts/tests/badovf.ovf
new file mode 100644
index 00000000000..cdea3200598
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/badovf.ovf
Binary files differ
diff --git a/Build/source/texk/web2c/omegafonts/tests/badovp.ovp b/Build/source/texk/web2c/omegafonts/tests/badovp.ovp
new file mode 100644
index 00000000000..11c1823086d
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/tests/badovp.ovp
@@ -0,0 +1 @@
+(Not an OVP file.
diff --git a/Build/source/texk/web2c/omegafonts/version.test b/Build/source/texk/web2c/omegafonts/version.test
new file mode 100755
index 00000000000..18121ee536a
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/version.test
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+echo && echo "*** omfonts -version"
+./omfonts -version || exit 1
+
+echo && echo "*** ofm2opl -version"
+./omfonts -ofm2opl -version || exit 1
+
+echo && echo "*** opl2ofm -version"
+./omfonts -opl2ofm -version || exit 1
+
+echo && echo "*** ovf2ovp -version"
+./omfonts -ovf2ovp -version || exit 1
+
+echo && echo "*** ovp2ovf -version"
+./omfonts -ovp2ovf -version || exit 1
+
diff --git a/Build/source/texk/web2c/omegaware/ChangeLog b/Build/source/texk/web2c/omegaware/ChangeLog
index f51f54e1f12..3a0dd8fa86e 100644
--- a/Build/source/texk/web2c/omegaware/ChangeLog
+++ b/Build/source/texk/web2c/omegaware/ChangeLog
@@ -1,3 +1,16 @@
+2015-01-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ovf2ovp.ch: Send diagnostic messages to stderr.
+ * ofm2opl.ch, opl2ofm.ch, ovp2ovf.ch:
+ Send diagnostic messages to stderr.
+ Non-zero return code in case of problems.
+ * check.test: Also test writung OPL file to stdout.
+ * selectfont.test: Also test writung OVP file to stdout.
+ * bad.test, version.test: Shell scripts for new tests.
+ * tests/badofm.ofm, tests/badopl.opl, tests/badovf.{ofm,ovf},
+ tests/badovp.ovp: New test input files.
+ * am/omegaware.am: Add new test shell scripts and input files.
+
2014-11-07 Peter Breitenlohner <peb@mppmu.mpg.de>
* ofm2opl.ch, ovf2ovp.ch: Add missing space to message.
diff --git a/Build/source/texk/web2c/omegaware/am/omegaware.am b/Build/source/texk/web2c/omegaware/am/omegaware.am
index 342f973fb86..ab72856fe4f 100644
--- a/Build/source/texk/web2c/omegaware/am/omegaware.am
+++ b/Build/source/texk/web2c/omegaware/am/omegaware.am
@@ -99,13 +99,14 @@ DISTCLEANFILES += ovp2ovf.web
##
OTANGLE_tests = omegaware/odvicopy.test omegaware/odvitype.test \
omegaware/otangle.test
-OMFONTS_tests = omegaware/charwd.test omegaware/check.test \
- omegaware/help.test omegaware/level1.test \
- omegaware/ligkern.test omegaware/ofonts.test \
- omegaware/omfonts.test omegaware/overbmp.test \
- omegaware/realnum.test omegaware/repeat.test \
- omegaware/selectfont.test omegaware/shorten.test \
- omegaware/specialhex.test omegaware/vrepeat.test \
+OMFONTS_tests = omegaware/bad.test omegaware/charwd.test \
+ omegaware/check.test omegaware/help.test \
+ omegaware/level1.test omegaware/ligkern.test \
+ omegaware/ofonts.test omegaware/omfonts.test \
+ omegaware/overbmp.test omegaware/realnum.test \
+ omegaware/repeat.test omegaware/selectfont.test \
+ omegaware/shorten.test omegaware/specialhex.test \
+ omegaware/version.test omegaware/vrepeat.test \
omegaware/yannis.test
EXTRA_DIST += $(OTANGLE_tests) $(OMFONTS_tests)
@@ -113,6 +114,11 @@ if OTANGLE
TESTS += $(OTANGLE_tests) $(OMFONTS_tests)
endif OTANGLE
+## omegaware/bad.test
+EXTRA_DIST += \
+ omegaware/tests/badofm.ofm omegaware/tests/badopl.opl \
+ omegaware/tests/badovf.ofm omegaware/tests/badovf.ovf omegaware/tests/badovp.ovp
+DISTCLEANFILES += omegaware/bad*.*
## omegaware/charwd.test
EXTRA_DIST += omegaware/tests/charwd-r.pl omegaware/tests/charwd-v.vpl
DISTCLEANFILES += omegaware/tests/charwdr.* omegaware/tests/charwdv.*
@@ -159,12 +165,12 @@ EXTRA_DIST += omegaware/tests/Cherokee.pl omegaware/tests/OCherokee.ovp
DISTCLEANFILES += omegaware/tests/Cherokee.tfm omegaware/tests/OCherokee.ofm \
omegaware/tests/OCherokee.opl omegaware/tests/OCherokee.ovf \
omegaware/tests/xCherokee.* omegaware/tests/xOCherokee.*
+## omegaware/otangle.test
+DISTCLEANFILES += ocftest.*
## omegaware/overbmp.test
EXTRA_DIST += omegaware/tests/inbmp.opl omegaware/tests/overbmp.opl \
omegaware/tests/overbmp.ovp
DISTCLEANFILES += omegaware/tests/xinbmp* omegaware/tests/xoverbmp*
-## omegaware/otangle.test
-DISTCLEANFILES += ocftest.*
## omegaware/realnum.test
EXTRA_DIST += omegaware/tests/realnum.opl omegaware/tests/realnum.out
DISTCLEANFILES += omegaware/tests/xrealnum.*
diff --git a/Build/source/texk/web2c/omegaware/bad.test b/Build/source/texk/web2c/omegaware/bad.test
new file mode 100755
index 00000000000..3e8f2a57c06
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/bad.test
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+tests=omegaware/tests
+
+test -d $tests || mkdir -p $tests
+
+TEXMFCNF=$srcdir/../kpathsea
+OFMFONTS=$srcdir/$tests
+export TEXMFCNF OFMFONTS
+
+echo && echo "*** ofm2opl badofm badofm"
+./wofm2opl $srcdir/$tests/badofm omegaware/badofm && exit 1
+
+echo && echo "*** opl2ofm badopl badopl"
+./wopl2ofm $srcdir/$tests/badopl omegaware/badopl && exit 1
+
+echo && echo "*** ovf2ovp badovf badovf badovf"
+./wovf2ovp $srcdir/$tests/badovf $srcdir/$tests/badovf omegaware/badovf && exit 1
+
+echo && echo "*** ovp2ovf badovp badovp"
+./wovp2ovf $srcdir/$tests/badovp omegaware/badovp && exit 1
+
+exit 0
+
diff --git a/Build/source/texk/web2c/omegaware/check.test b/Build/source/texk/web2c/omegaware/check.test
index 461a4a25046..2f75ab324a1 100755
--- a/Build/source/texk/web2c/omegaware/check.test
+++ b/Build/source/texk/web2c/omegaware/check.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2014, 2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
tests=omegaware/tests
@@ -20,8 +20,8 @@ diff $srcdir/$tests/check.opl $tests/xcheck.opl || exit 1
echo && echo "*** opl2ofm xcheck xchecked"
./wopl2ofm $tests/xcheck $tests/xchecked || exit 1
-echo && echo "*** ofm2opl xchecked xchecked"
-./wofm2opl $tests/xchecked $tests/xchecked || exit 1
+echo && echo "*** ofm2opl xchecked stdout (xchecked.opl)"
+./wofm2opl $tests/xchecked >$tests/xchecked.opl || exit 1
echo && echo "*** diff checked.opl xchecked.opl"
diff $srcdir/$tests/checked.opl $tests/xchecked.opl || exit 1
diff --git a/Build/source/texk/web2c/omegaware/ofm2opl.ch b/Build/source/texk/web2c/omegaware/ofm2opl.ch
index bbbbce8898e..87aa1eee957 100644
--- a/Build/source/texk/web2c/omegaware/ofm2opl.ch
+++ b/Build/source/texk/web2c/omegaware/ofm2opl.ch
@@ -37,6 +37,14 @@
@d banner=='This is OFM2OPL, Version 1.13' {printed when the program starts}
@z
+@x [2] Print all terminal output on stderr, so the pl can be sent to stdout.
+@d print(#)==write(#)
+@d print_ln(#)==write_ln(#)
+@y
+@d print(#)==write(stderr,#)
+@d print_ln(#)==write_ln(stderr,#)
+@z
+
% [2] Fix files in program statement. We need to tell web2c about one
% special variable. Perhaps it would be better to allow @define's
% anywhere in a source file, but that seemed just as painful as this.
@@ -131,15 +139,20 @@ end;
@!tfm_file_array: pointer_to_byte; {the input data all goes here}
@z
-@x [20] Send error output to stderr.
+% [21] abort() should cause a bad exit code.
+@x
@d abort(#)==begin print_ln(#);
print_ln('Sorry, but I can''t go on; are you sure this is a OFM?');
+ goto final_end;
+ end
@y
-@d abort(#)==begin write_ln(stderr, #);
+@d abort(#)==begin print_ln(#);
write_ln(stderr, 'Sorry, but I can''t go on; are you sure this is a OFM?');
+ uexit(1);
+ end
@z
-@x [20] Allow arbitrarily large input files.
+@x [21] Allow arbitrarily large input files.
if 4*lf-1>tfm_size then abort('The file is bigger than I can handle!');
@.The file is bigger...@>
@y
@@ -147,7 +160,7 @@ tfm_file_array
:= cast_to_byte_pointer (xrealloc (tfm_file_array, 4 * lf - 1 + 1002));
@z
-% [27, 28] Change strings to C char pointers. The Pascal strings are
+% [28, 29] Change strings to C char pointers. The Pascal strings are
% indexed starting at 1, so we pad with a blank.
@x
@!ASCII_04,@!ASCII_10,@!ASCII_14: packed array [1..32] of char;
@@ -163,7 +176,6 @@ tfm_file_array
{handy string constants for |face| codes}
@!HEX: const_c_string;
@z
-
@x
ASCII_04:=' !"#$%&''()*+,-./0123456789:;<=>?';@/
ASCII_10:='@@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_';@/
@@ -181,7 +193,7 @@ MBL_string:=' MBL'; RI_string:=' RI '; RCE_string:=' RCE';
HEX:=' 0123456789ABCDEF';@/
@z
-% [38] How we output the character code depends on |charcode_format|.
+% [39] How we output the character code depends on |charcode_format|.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
begin if font_type>vanilla then
@@ -203,7 +215,7 @@ else if (charcode_format = charcode_ascii) and (c > " ") and (c <= "~")
else out_hex_char(c);
@z
-% [39] Don't output the face code as an integer.
+% [40] Don't output the face code as an integer.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
out(MBL_string[1+(b mod 3)]);
@@ -215,13 +227,13 @@ else out_hex_char(c);
put_byte(RCE_string[1+(b div 3)], pl_file);
@z
-@x [40] Force 32-bit constant arithmetic for 16-bit machines.
+@x [41] Force 32-bit constant arithmetic for 16-bit machines.
f:=((tfm[k+1] mod 16)*@'400+tfm[k+2])*@'400+tfm[k+3];
@y
f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3];
@z
-% [78] No progress reports unless verbose.
+% [95] No progress reports unless verbose.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
incr(chars_on_line);
@@ -249,7 +261,7 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3];
end;
@z
-% [89] Change the name of the variable `class', since AIX 3.1's <math.h>
+% [107] Change the name of the variable `class', since AIX 3.1's <math.h>
% defines a function by that name.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
@@ -260,7 +272,13 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3];
@d class == class_var
@z
-% [90] Change name of the function `f'.
+@x [108]
+ goto final_end;
+@y
+ uexit(1);
+@z
+
+% [108] Change name of the function `f'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
r:=f(r,(hash[r]-1)div xmax_char,(hash[r]-1)mod xmax_char);
@@ -268,7 +286,7 @@ f:=((tfm[k+1] mod 16)*intcast(@'400)+tfm[k+2])*@'400+tfm[k+3];
r:=f_fn(r,(hash[r]-1)div xmax_char,(hash[r]-1)mod xmax_char);
@z
-% [94] web2c can't handle these mutually recursive procedures.
+% [112] web2c can't handle these mutually recursive procedures.
% But let's do a fake definition of f here, so that it gets into web2c's
% symbol table. We also have to change the name, because there is also a
% variable named `f', and some C compilers can't deal with that.
@@ -288,7 +306,7 @@ else eval:=f(h,x,y);
else eval:=f_fn(h,x,y);
@z
-% [95] The real definition of f.
+% [113] The real definition of f.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
@p function f;
@@ -301,7 +319,26 @@ f:=lig_z[h];
f_fn:=lig_z[h];
@z
-% [99] No final newline unless verbose.
+@x [114] Eliminate the |final_end| and |exit| labels.
+label final_end, 30;
+@y
+@z
+@x
+organize:=true; goto 30;
+final_end: organize:=false;
+30: end;
+@y
+organize:=true
+end;
+@z
+
+@x [117]
+if not organize then goto final_end;
+@y
+if not organize then uexit(1);
+@z
+
+% [117] No final newline unless verbose.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
do_characters; print_ln('.');@/
@@ -309,7 +346,13 @@ do_characters; print_ln('.');@/
do_characters; if verbose then print_ln('.');@/
@z
-@x [100] System-dependent changes.
+@x [117]
+final_end:end.
+@y
+end.
+@z
+
+@x [118] System-dependent changes.
This section should be replaced, if necessary, by changes to the program
that are necessary to make \.{TFtoPL} work at a particular installation.
It is usually best to design your change file so that all changes to
diff --git a/Build/source/texk/web2c/omegaware/opl2ofm.ch b/Build/source/texk/web2c/omegaware/opl2ofm.ch
index 019f6217d30..a6b3896648a 100644
--- a/Build/source/texk/web2c/omegaware/opl2ofm.ch
+++ b/Build/source/texk/web2c/omegaware/opl2ofm.ch
@@ -33,6 +33,14 @@
@d banner=='This is OPL2OFM, Version 1.13' {printed when the program starts}
@z
+@x [2] Print all terminal output on stderr.
+@d print(#)==write(#)
+@d print_ln(#)==write_ln(#)
+@y
+@d print(#)==write(stderr,#)
+@d print_ln(#)==write_ln(stderr,#)
+@z
+
@x [still 2] No banner unless verbose.
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
@@ -94,6 +102,27 @@ correspond to one-character constants like \.{"A"} in \.{WEB} language.
@d first_ord=0 {ordinal number of the smallest element of |char|}
@z
+@x [25] Non-zero return code in case of problems.
+@!chars_on_line:0..9; {the number of characters printed on the current line}
+@y
+@!chars_on_line:0..9; {the number of characters printed on the current line}
+@!perfect:boolean; {was the file free of errors?}
+@z
+
+@x [26] Non-zero return code in case of problems.
+chars_on_line:=0;
+@y
+chars_on_line:=0;
+perfect:=true; {innocent until proved guilty}
+@z
+
+@x [27] Non-zero return code in case of problems.
+chars_on_line:=0;
+@y
+chars_on_line:=0;
+perfect:=false;
+@z
+
@x [31] (get_keyword_char) Unnecessary due to previous change.
begin while (loc=limit)and(not right_ln) do fill_buffer;
if loc=limit then cur_char:=" " {end-of-line counts as a delimiter}
@@ -235,14 +264,21 @@ var @!krn_ptr:0..max_kerns; {an index into |kern|}
@y
@z
-@x [147?] Be quiet unless verbose.
+@x [172] Be quiet unless verbose.
read_input; print('.');@/
@y
read_input;
if verbose then print_ln('.');
@z
-@x [148] System-dependent changes.
+@x [172] Non-zero return code in case of problems,
+end.
+@y
+if not perfect then uexit(1);
+end.
+@z
+
+@x [253] System-dependent changes.
This section should be replaced, if necessary, by changes to the program
that are necessary to make \.{PLtoTF} work at a particular installation.
It is usually best to design your change file so that all changes to
diff --git a/Build/source/texk/web2c/omegaware/ovf2ovp.ch b/Build/source/texk/web2c/omegaware/ovf2ovp.ch
index 575f6a43a86..888fe27ce01 100644
--- a/Build/source/texk/web2c/omegaware/ovf2ovp.ch
+++ b/Build/source/texk/web2c/omegaware/ovf2ovp.ch
@@ -24,6 +24,15 @@
@d banner=='This is OVF2OVP, Version 1.13' {printed when the program starts}
@z
+@x [2] All terminal output goes to stderr, so we can dump the vpl on stdout.
+@d print(#)==write(#)
+@d print_ln(#)==write_ln(#)
+@y
+@d print(#)==write(stderr,#)
+@d print_ln(#)==write_ln(stderr,#)
+@d print_real(#)==fprint_real(stderr,#)
+@z
+
% [2] We need to tell web2c about one special variable.
% Perhaps it would be better to allow @define's
% anywhere in a source file, but that seemed just as painful as this.
diff --git a/Build/source/texk/web2c/omegaware/ovp2ovf.ch b/Build/source/texk/web2c/omegaware/ovp2ovf.ch
index 78fa86cc6ce..d2b310cc980 100644
--- a/Build/source/texk/web2c/omegaware/ovp2ovf.ch
+++ b/Build/source/texk/web2c/omegaware/ovp2ovf.ch
@@ -22,6 +22,14 @@
@d banner=='This is OVP2OVF, Version 1.13' {printed when the program starts}
@z
+@x [2] Print all terminal output on stderr.
+@d print(#)==write(#)
+@d print_ln(#)==write_ln(#)
+@y
+@d print(#)==write(stderr,#)
+@d print_ln(#)==write_ln(stderr,#)
+@z
+
@x [2] Print the banner later.
procedure initialize; {this procedure gets things started properly}
var @<Local variables for initialization@>@/
@@ -84,6 +92,27 @@ correspond to one-character constants like \.{"A"} in \.{WEB} language.
@d first_ord=0 {ordinal number of the smallest element of |char|}
@z
+@x [31] Non-zero return code in case of problems.
+@!chars_on_line:0..9; {the number of characters printed on the current line}
+@y
+@!chars_on_line:0..9; {the number of characters printed on the current line}
+@!perfect:boolean; {was the file free of errors?}
+@z
+
+@x [32] Non-zero return code in case of problems.
+chars_on_line:=0;
+@y
+chars_on_line:=0;
+perfect:=true; {innocent until proved guilty}
+@z
+
+@x [33] Non-zero return code in case of problems.
+chars_on_line:=0;
+@y
+chars_on_line:=0;
+perfect:=false;
+@z
+
@x [37] (get_keyword_char) Unnecessary due to previous change.
begin while (loc=limit)and(not right_ln) do fill_buffer;
if loc=limit then cur_char:=" " {end-of-line counts as a delimiter}
@@ -118,19 +147,19 @@ if verbose then @<Print |c| in hex notation@>;
@z
@x
print('-'); print_hex(c+crange); incr(chars_on_line);
-@y
+@y [133]
if verbose then begin
print('-'); print_hex(c+crange); incr(chars_on_line);
end;
@z
-@x
+@x [140]
@!HEX: packed array [1..16] of char;
@y
@!HEX: const_c_string;
@z
-@x
+@x [141]
HEX:='0123456789ABCDEF';@/
@y
HEX:=' 0123456789ABCDEF';@/
@@ -197,7 +226,7 @@ begin if fabs(x/design_units)>=16.0 then
end;
@z
-% [141] char_remainder[c] is unsigned, and label_table[sort_ptr].rr
+% [194] char_remainder[c] is unsigned, and label_table[sort_ptr].rr
% might be -1, and if -1 is coerced to being unsigned, it will be bigger
% than anything else.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -207,26 +236,33 @@ begin if fabs(x/design_units)>=16.0 then
while label_table[sort_ptr].rr>intcast(char_remainder[c]) do
@z
-@x [175] Change VF-byte output to fix ranges.
+@x [200] Change VF-byte output to fix ranges.
@d vout(#)==write(vf_file,#)
@y
@d vout(#)==putbyte(#,vf_file)
@z
-@x [204] Eliminate unused variables.
+@x [205] Eliminate unused variables.
var @!krn_ptr:0..max_kerns; {an index into |kern|}
@!c:byte; {runs through all character codes}
@y
@z
-@x [181?] Be quiet unless verbose.
+@x [206] Be quiet unless verbose.
read_input; print_ln('.');@/
@y
read_input;
if verbose then print_ln('.');
@z
-@x [182] System-dependent changes.
+@x [206] Non-zero return code in case of problems,
+end.
+@y
+if not perfect then uexit(1);
+end.
+@z
+
+@x [287] System-dependent changes.
This section should be replaced, if necessary, by changes to the program
that are necessary to make \.{VPtoVF} work at a particular installation.
It is usually best to design your change file so that all changes to
diff --git a/Build/source/texk/web2c/omegaware/selectfont.test b/Build/source/texk/web2c/omegaware/selectfont.test
index e753e746df5..a1884af1173 100755
--- a/Build/source/texk/web2c/omegaware/selectfont.test
+++ b/Build/source/texk/web2c/omegaware/selectfont.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2011-2014 Peter Breitenlohner <tex-live@tug.org>
+# Copyright (C) 2011-2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
tests=omegaware/tests
@@ -27,7 +27,7 @@ diff $srcdir/$tests/sample.out $tests/xsample.out || exit 1
./wovp2ovf -verbose $srcdir/$tests/sample.ovp $tests/sample2.ovf || exit 1
-./wovf2ovp -verbose $tests/sample2 sample2 $tests/xsample2.out || exit 1
+./wovf2ovp -verbose $tests/sample2 sample2 >$tests/xsample2.out || exit 1
diff $srcdir/$tests/sample.out $tests/xsample2.out || exit 1
diff --git a/Build/source/texk/web2c/omegaware/tests/badofm.ofm b/Build/source/texk/web2c/omegaware/tests/badofm.ofm
new file mode 100644
index 00000000000..69bbde45383
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/tests/badofm.ofm
Binary files differ
diff --git a/Build/source/texk/web2c/omegaware/tests/badopl.opl b/Build/source/texk/web2c/omegaware/tests/badopl.opl
new file mode 100644
index 00000000000..39a0633e46e
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/tests/badopl.opl
@@ -0,0 +1 @@
+Not an OPL file.
diff --git a/Build/source/texk/web2c/omegaware/tests/badovf.ofm b/Build/source/texk/web2c/omegaware/tests/badovf.ofm
new file mode 100644
index 00000000000..988dbbe6e47
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/tests/badovf.ofm
Binary files differ
diff --git a/Build/source/texk/web2c/omegaware/tests/badovf.ovf b/Build/source/texk/web2c/omegaware/tests/badovf.ovf
new file mode 100644
index 00000000000..cdea3200598
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/tests/badovf.ovf
Binary files differ
diff --git a/Build/source/texk/web2c/omegaware/tests/badovp.ovp b/Build/source/texk/web2c/omegaware/tests/badovp.ovp
new file mode 100644
index 00000000000..3b930b8a9d8
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/tests/badovp.ovp
@@ -0,0 +1 @@
+Not an OVP file.
diff --git a/Build/source/texk/web2c/omegaware/version.test b/Build/source/texk/web2c/omegaware/version.test
new file mode 100755
index 00000000000..256a3269985
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/version.test
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+# Copyright (C) 2015 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+echo && echo "*** ofm2opl -version"
+./wofm2opl -version || exit 1
+
+echo && echo "*** opl2ofm -version"
+./wopl2ofm -version || exit 1
+
+echo && echo "*** ovf2ovp -version"
+./wovf2ovp -version || exit 1
+
+echo && echo "*** ovp2ovf -version"
+./wovp2ovf -version || exit 1
+