luat-ini.lua /size: 1500 b    last modification: 2021-10-28 13:50
1
if
not
modules
then
modules
=
{
}
end
modules
[
'
luat-ini
'
]
=
{
2
version
=
1
.
001
,
3
comment
=
"
companion to luat-lib.mkiv
"
,
4
author
=
"
Hans Hagen, PRAGMA-ADE, Hasselt NL
"
,
5
copyright
=
"
PRAGMA ADE / ConTeXt Development Team
"
,
6
license
=
"
see context related readme files
"
7
}
8 9
--[[ldx-- 10<p>We cannot load anything yet. However what we will do us reserve a few tables. 11These can be used for runtime user data or third party modules and will not be 12cluttered by macro package code.</p> 13--ldx]]
--
14 15
userdata
=
userdata
or
{
}
-- for users (e.g. functions etc)
16
thirddata
=
thirddata
or
{
}
-- only for third party modules
17
moduledata
=
moduledata
or
{
}
-- only for development team
18
documentdata
=
documentdata
or
{
}
-- for users (e.g. raw data)
19
parametersets
=
parametersets
or
{
}
-- for special purposes
20 21
table
.
setmetatableindex
(
moduledata
,
"
table
"
)
22
table
.
setmetatableindex
(
thirddata
,
"
table
"
)
23 24
if
not
global
then
25
global
=
_G
26
end
27 28
LUATEXVERSION
=
status
.
luatex_version
/
100
+
tonumber
(
status
.
luatex_revision
)
/
10000
29
LUATEXENGINE
=
status
.
luatex_engine
and
string
.
lower
(
status
.
luatex_engine
)
or
"
luametatex
"
30
LUATEXFUNCTIONALITY
=
status
.
development_id
or
6346
31
LUATEXFORMATID
=
status
.
format_id
or
0
32
JITSUPPORTED
=
false
33
INITEXMODE
=
status
.
run_state
=
=
0
-- initializing updating production
34
CONTEXTLMTXMODE
=
0
35 36
status
.
ini_version
=
INITEXMODE
-- for a while
37 38
function
os
.
setlocale
(
)
39
-- no need for a message
40
end
41