summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
committerKarl Berry <karl@freefriends.org>2017-04-19 23:04:15 +0000
commitf74161ca4e7eb3c5af9afcbe92522ae3b58987c1 (patch)
tree3c30a13df5ac7968195c85070a2b074578e669d2 /Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
parent1d5a55ac8f5506a7ae9cfca52f4b588182e199d4 (diff)
context beta/cont-tmf.zip (Apr 16 12:55)
git-svn-id: svn://tug.org/texlive/trunk@43931 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua26
1 files changed, 24 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
index f62396a8e10..31860db7813 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/luat-cod.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['luat-cod'] = {
license = "see context related readme files"
}
-local type, loadfile = type, loadfile
+local type, loadfile, tonumber = type, loadfile, tonumber
local match, gsub, find, format = string.match, string.gsub, string.find, string.format
local texconfig, lua = texconfig, lua
@@ -96,7 +96,29 @@ local targetpath = "."
-- environment.jobname = tex.jobname
-- environment.version = tostring(tex.toks.contextversiontoks)
-environment.initex = tex.formatname == ""
+if LUATEXVERION == nil then
+ LUATEXVERSION = status.luatex_version/100
+ + tonumber(status.luatex_revision)/1000
+end
+
+if LUATEXENGINE == nil then
+ LUATEXENGINE = status.luatex_engine and string.lower(status.luatex_engine)
+ or (find(status.banner,"LuajitTeX") and "luajittex" or "luatex")
+end
+
+if JITSUPPORTED == nil then
+ JITSUPPORTED = LUATEXENGINE == "luajittex" or jit
+end
+
+if INITEXMODE == nil then
+ INITEXMODE = status.ini_version
+end
+
+environment.initex = INITEXMODE
+environment.initexmode = INITEXMODE
+environment.luatexversion = LUATEXVERSION
+environment.luatexengine = LUATEXENGINE
+environment.jitsupported = JITSUPPORTED
if not environment.luafilechunk then