summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/trac-deb.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/trac-deb.lua')
-rw-r--r--tex/context/base/mkiv/trac-deb.lua48
1 files changed, 48 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua
index c219b3cbd..c5d0183ff 100644
--- a/tex/context/base/mkiv/trac-deb.lua
+++ b/tex/context/base/mkiv/trac-deb.lua
@@ -25,6 +25,8 @@ local report_str = logs.writer
tracers = tracers or { }
local tracers = tracers
+-- this is old tracing stuff ... will go to its own module
+
tracers.lists = { }
local lists = tracers.lists
@@ -108,6 +110,52 @@ function tracers.knownlist(name)
return l and #l > 0
end
+-- till here
+
+-- for now here
+
+if CONTEXTLMTXMODE > 0 then
+
+ local ioflush = io.flush
+ local ioread = io.read
+ local writenl = texio.write_nl
+ local write = texio.write
+
+ local runtoks = tex.runtoks
+ local terminaldata = false
+ local context = context
+
+ interfaces.implement {
+ name = "fetchterminaldata",
+ actions = function()
+ context(terminaldata)
+ end,
+ }
+
+ function texio.terminal()
+ writenl("\n" .. "entering interactive mode, use \\quit to abort reading" .."\n\n")
+ while true do
+ write(">")
+ ioflush()
+ terminaldata = ioread()
+ if terminaldata == "\\quit" then
+ terminaldata = false
+ break
+ else
+ runtoks("t_syst_terminal_data",nil,nil,true) -- obeymode
+ end
+ end
+ end
+
+ interfaces.implement {
+ name = "readfromterminal",
+ public = true,
+ protected = true,
+ actions = texio.terminal,
+ }
+
+end
+
local savedluaerror = nil
local usescitelexer = nil
local quitonerror = true