data-bin.lua /size: 926 b    last modification: 2020-07-01 14:35
1
if
not
modules
then
modules
=
{
}
end
modules
[
'
data-bin
'
]
=
{
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
local
resolvers
=
resolvers
10
local
methodhandler
=
resolvers
.
methodhandler
11
local
notfound
=
resolvers
.
loaders
.
notfound
12 13
function
resolvers
.
findbinfile
(
filename
,
filetype
)
14
return
methodhandler
(
'
finders
'
,
filename
,
filetype
)
15
end
16 17
local
function
openbinfile
(
filename
)
18
return
methodhandler
(
'
loaders
'
,
filename
)
-- a bit weird: load
19
end
20 21
resolvers
.
openbinfile
=
openbinfile
22 23
function
resolvers
.
loadbinfile
(
filename
,
filetype
)
24
local
fname
=
methodhandler
(
'
finders
'
,
filename
,
filetype
)
25
if
fname
and
fname
~
=
"
"
then
26
return
openbinfile
(
fname
)
-- a bit weird: open
27
else
28
return
notfound
(
)
29
end
30
end
31