summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-11-07 12:49:36 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-11-07 12:49:36 +0100
commit75fbb107b15d01179a4b772844144e0661240e77 (patch)
treec5210f4f9ade25c89a540f755912a52966404792 /tex/generic
parent7830451577b876020de2a26bbfbf069625ab4d6f (diff)
downloadcontext-75fbb107b15d01179a4b772844144e0661240e77.tar.gz
2017-11-07 11:43:00
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-core.lua8
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua11
2 files changed, 14 insertions, 5 deletions
diff --git a/tex/generic/context/luatex/luatex-core.lua b/tex/generic/context/luatex/luatex-core.lua
index 2d6f6a73d..c13d81257 100644
--- a/tex/generic/context/luatex/luatex-core.lua
+++ b/tex/generic/context/luatex/luatex-core.lua
@@ -182,7 +182,7 @@ if md5 then
end
--- compatibility
+-- compatibility: this might go away
if not unpack then
unpack = table.unpack
@@ -192,6 +192,12 @@ if not package.loaders then
package.loaders = package.searchers
end
+if not loadstring then
+ loadstring = load
+end
+
+-- compatibility: this might stay
+
if bit32 then
-- lua 5.2: we're okay
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index a04b47d3c..100bd770e 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 : 11/01/17 15:59:00
+-- merge date : 11/07/17 11:37:34
do -- begin closure to overcome local limits and interference
@@ -1035,9 +1035,9 @@ function string.tformat(fmt,...)
end
string.quote=string.quoted
string.unquote=string.unquoted
-if not string.bytetable then
+if not string.bytetable then
local limit=5000
- function string.bytetable(str)
+ function string.bytetable(str)
local n=#str
if n>limit then
local t={ byte(str,1,limit) }
@@ -2505,6 +2505,9 @@ end
function lfs.isfile(name)
return attributes(name,"mode")=="file"
end
+function lfs.isfound(name)
+ return attributes(name,"mode")=="file" and name or nil
+end
local colon=P(":")
local period=P(".")
local periods=P("..")
@@ -10537,7 +10540,7 @@ formatreaders[4]=function(f,fontdata,offset)
for i=1,nofsegments do
offsets[i]=readushort(f)
end
- local size=(length-2*2-5*2-4*nofsegments*2)/2
+ local size=(length-2*2-5*2-4*2*nofsegments)/2
for i=1,size-1 do
indices[i]=readushort(f)
end