summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-09 10:31:23 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-09 10:31:23 +0000
commite890df6dcc6e4f636e4183ff984b57deb8f26d14 (patch)
tree14b623aed7783950ae3545097347c683c37137a1 /Build
parent83ce83099932cd306181cae5ac417de1d5a54902 (diff)
texk/web2c/omegafonts: Fixed a bug in checking for infinite ligature loops
git-svn-id: svn://tug.org/texlive/trunk@34883 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/omegafonts/ChangeLog5
-rw-r--r--Build/source/texk/web2c/omegafonts/ligkern_routines.c11
-rwxr-xr-xBuild/source/texk/web2c/omegafonts/yannis.test37
-rwxr-xr-xBuild/source/texk/web2c/omegaware/yannis.test4
4 files changed, 33 insertions, 24 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog
index f1294c2b21b..766fa07a17d 100644
--- a/Build/source/texk/web2c/omegafonts/ChangeLog
+++ b/Build/source/texk/web2c/omegafonts/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ligkern_routines.c (l_hash_lookup): Fixed a bug in checking
+ for infinite ligature loops.
+
2014-08-08 Peter Breitenlohner <peb@mppmu.mpg.de>
* char_routines.c: Compute checksum as in Web2C version.
diff --git a/Build/source/texk/web2c/omegafonts/ligkern_routines.c b/Build/source/texk/web2c/omegafonts/ligkern_routines.c
index 6da01bf8dcf..6ae730c4024 100644
--- a/Build/source/texk/web2c/omegafonts/ligkern_routines.c
+++ b/Build/source/texk/web2c/omegafonts/ligkern_routines.c
@@ -110,7 +110,7 @@ void
set_skip_command(unsigned val)
{
if (lk_step_ended == TRUE) {
- if (val>128) {
+ if (val>127) {
warning_0("Maximum SKIP amount is 127; ignored");
} else {
lig_kern_table[nl-1].entries[0] = val;
@@ -382,11 +382,10 @@ l_hash_lookup(unsigned x, unsigned y)
unsigned key = (x & 0x7fff)*(y & 0x7fff) % PRIME;
hash_list L = hash_table[key];
- if (L==NULL) return NULL;
- while (L->x < x) L = L->ptr;
- if (L->x != x) return NULL;
- while ((L->x == x) && (L->y < y)) L = L->ptr;
- if (L->y != y) return NULL;
+ while ((L != NULL) && ((x > L->x) || ((x == L->x) && (y > L->y))))
+ L = L->ptr;
+ if ((L == NULL) || (x < L->x) || ((x == L->x) && (y < L->y)))
+ return NULL;
return L;
}
diff --git a/Build/source/texk/web2c/omegafonts/yannis.test b/Build/source/texk/web2c/omegafonts/yannis.test
index 7a0cf3716ad..81ad2639f57 100755
--- a/Build/source/texk/web2c/omegafonts/yannis.test
+++ b/Build/source/texk/web2c/omegafonts/yannis.test
@@ -15,9 +15,6 @@ echo && echo "*** pltotf arabicr yarabicr"
echo && echo "*** opl2ofm arabicr.pl zyarabicr"
./omfonts -opl2ofm -verbose $srcdir/tests/arabicr.pl tests/zyarabicr || exit 1
-echo && echo "*** cmp yarabicr.tfm zyarabicr.ofm"
-cmp tests/yarabicr.tfm tests/zyarabicr.ofm || exit 1
-
echo && echo "*** ofm2opl yarabicr.tfm xyarabicr"
./omfonts -ofm2opl -verbose tests/yarabicr.tfm tests/xyarabicr || exit 1
@@ -28,27 +25,35 @@ echo && echo "*** diff xyarabicr.opl zyarabicr.opl"
diff tests/xyarabicr.opl tests/zyarabicr.opl || exit 1
echo && echo "*** ovp2ovf arabic yarabic yarabic"
-./omfonts -ovp2ovf -verbose $srcdir/tests/arabic tests/yarabic tests/yarabic || exit 77
+./omfonts -ovp2ovf -verbose $srcdir/tests/arabic tests/yarabic tests/yarabic || exit 1
-echo && echo "*** ofm2opl yarabic.tfm xyarabic"
-./omfonts -ofm2opl -verbose tests/yarabic tests/xyarabic || exit 77
+echo && echo "*** ofm2opl yarabic xyarabic"
+./omfonts -ofm2opl -verbose tests/yarabic tests/xyarabic || exit 1
-exit 0
-#***************************
+echo && echo "*** opl2ofm xyarabic xyarabic"
+./omfonts -opl2ofm -verbose tests/xyarabic tests/xyarabic || exit 1
-diff $srcdir/tests/Cherokee.pl tests/xCherokee.pl || exit 1
+echo && echo "*** ofm2opl xyarabic yyarabic"
+./omfonts -ofm2opl -verbose tests/xyarabic tests/yyarabic || exit 1
- ./omfonts -ovp2ovf -verbose $srcdir/tests/OCherokee tests/OCherokee tests/OCherokee || exit 1
+echo && echo "*** diff xyarabicr.opl yyarabicr.opl"
+diff tests/xyarabic.opl tests/yyarabic.opl || exit 1
- ./omfonts -ofm2opl -verbose tests/OCherokee tests/OCherokee || exit 1
+echo && echo "*** ovf2ovp yarabic yarabic yyarabic"
+./omfonts -ovf2ovp -verbose tests/yarabic tests/yarabic tests/yyarabic || exit 1
- ./omfonts -opl2ofm -verbose tests/OCherokee tests/xOCherokee || exit 1
+echo && echo "*** ovp2ovf yyarabic yyarabic yyarabic"
+./omfonts -ovp2ovf -verbose tests/yyarabic tests/yyarabic tests/yyarabic || exit 1
- ./omfonts -ofm2opl -verbose tests/xOCherokee tests/xOCherokee || exit 1
+echo && echo "*** ofm2opl yyarabic xyarabic"
+./omfonts -ofm2opl -verbose tests/yyarabic tests/zyarabic || exit 1
-diff tests/OCherokee.opl tests/xOCherokee.opl || exit 1
+echo && echo "*** diff xyarabicr.opl zyarabicr.opl"
+diff tests/xyarabic.opl tests/zyarabic.opl || exit 1
- ./omfonts -ovf2ovp -verbose tests/OCherokee tests/OCherokee tests/xOCherokee || exit 1
+echo && echo "*** ovf2ovp yyarabic yyarabic zyarabic"
+./omfonts -ovf2ovp -verbose tests/yyarabic tests/yyarabic tests/zyarabic || exit 1
-diff $srcdir/tests/OCherokee.ovp tests/xOCherokee.ovp || exit 1
+echo && echo "*** diff yyarabicr.ovp yyarabicr.ovp"
+diff tests/yyarabic.ovp tests/zyarabic.ovp || exit 1
diff --git a/Build/source/texk/web2c/omegaware/yannis.test b/Build/source/texk/web2c/omegaware/yannis.test
index a00220bc2e1..21a521b15bb 100755
--- a/Build/source/texk/web2c/omegaware/yannis.test
+++ b/Build/source/texk/web2c/omegaware/yannis.test
@@ -32,10 +32,10 @@ diff $tests/xyarabicr.opl $tests/zyarabicr.opl || exit 1
echo && echo "*** ovp2ovf arabic yarabic yarabic"
./wovp2ovf $srcdir/$tests/arabic $tests/yarabic $tests/yarabic || exit 1
-echo && echo "*** ofm2opl yarabic.tfm xyarabic"
+echo && echo "*** ofm2opl yarabic xyarabic"
omegafonts/omfonts -ofm2opl $tests/yarabic $tests/xyarabic || exit 1
-echo && echo "*** ofm2opl yarabic.tfm xyarabic"
+echo && echo "*** ofm2opl yarabic xyarabic"
./wofm2opl $tests/yarabic $tests/xyarabic || exit 77
exit 0