This commit is contained in:
2026-07-28 20:13:50 -04:00
parent 49c9e5e37c
commit 56646625c0
71 changed files with 638 additions and 103 deletions
@@ -19,4 +19,25 @@ function printInline(...)
for i = 1, #args do output = output .. tostring(args[i]) .. "\t" end
output = output:sub(1, -2)
syscall.write(1, output)
end
function userinput(fd, helpstr, replacestr, fdo)
local str = ""
if helpstr then print(helpstr) end
while true do
local inp = syscall.read(fd)
if inp~="" and inp~=nil then
if inp~="\n" then
if replacestr then
syscall.write(fdo, replacestr)
else
syscall.write(fdo, inp)
end
str = inp
else
break
end
end
end
return str
end