summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/syst-lua.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-08-09 20:27:33 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-08-09 20:27:33 +0200
commit88dab5316e045e6bc15826f6b791b24abaf93d35 (patch)
tree306f6a6f19e6ee044d645fe8de7732f3db7267bc /tex/context/base/mkiv/syst-lua.lmt
parent30c6dc99b093fcf351f64974778d40c69aba08af (diff)
downloadcontext-88dab5316e045e6bc15826f6b791b24abaf93d35.tar.gz
2020-08-09 19:54:00
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