From 9e2c13b12ff90635be145c6c02e21d6e9583037f Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 19 Oct 2016 23:19:58 +0200 Subject: 2016-10-19 22:59:00 --- tex/generic/context/luatex/luatex-fonts-merged.lua | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'tex/generic') diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 907e4e19a..a0b906d0a 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 10/14/16 17:19:03 +-- merge date : 10/19/16 22:51:32 do -- begin closure to overcome local limits and interference @@ -4166,7 +4166,7 @@ if not modules then modules={} end modules ['util-fil']={ } local byte=string.byte local char=string.char -local extract=bit32.extract +local extract=bit32 and bit32.extract local floor=math.floor utilities=utilities or {} local files={} @@ -4328,16 +4328,18 @@ function files.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function files.read2dot14(f) - local a,b=byte(f:read(2),1,2) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function files.read2dot14(f) + local a,b=byte(f:read(2),1,2) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function files.skipshort(f,n) -- cgit v1.2.3