summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/syst-lua.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/syst-lua.lmt')
-rw-r--r--tex/context/base/mkiv/syst-lua.lmt39
1 files changed, 26 insertions, 13 deletions
diff --git a/tex/context/base/mkiv/syst-lua.lmt b/tex/context/base/mkiv/syst-lua.lmt
index 29f91ae75..effba14d9 100644
--- a/tex/context/base/mkiv/syst-lua.lmt
+++ b/tex/context/base/mkiv/syst-lua.lmt
@@ -334,10 +334,11 @@ do
local setmacro = tokens.setters.macro
local vrbcatcodes = tex.vrbcatcodes
- interfaces.implement {
+ implement {
name = "openin",
public = true,
- protected = true,
+ -- protected = true,
+ value = true,
actions = function()
local n = scaninteger()
scankeyword("=")
@@ -355,11 +356,11 @@ do
end,
}
- interfaces.implement {
+ implement {
name = "closein",
public = true,
- protected = true,
- value = "none",
+ -- protected = true,
+ value = true,
actions = function()
local n = scaninteger()
local c = channels[n]
@@ -370,11 +371,11 @@ do
end,
}
- interfaces.implement {
+ implement {
name = "read",
public = true,
- protected = true,
- value = "none",
+ -- protected = true,
+ value = true,
actions = function(prefix)
local n = scaninteger()
scankeyword("to")
@@ -389,10 +390,11 @@ do
end,
}
- interfaces.implement {
+ implement {
name = "readline",
public = true,
- protected = true,
+ -- protected = true,
+ value = true,
actions = function(prefix)
local n = scaninteger()
scankeyword("to")
@@ -407,8 +409,19 @@ do
end,
}
- callback.register("if_end_of_file", function(n)
- return not channels[n]
- end)
+ -- callback.register("if_end_of_file", function(n)
+ -- return not channels[n]
+ -- end)
+
+ implement {
+ name = "ifeof",
+ public = true,
+ -- protected = true,
+ condition = true,
+ actions = function(prefix)
+ local n = scaninteger()
+ return tokens.values.boolean, not channels[n]
+ end,
+ }
end