a bunch of random bugfixes
This commit is contained in:
parent
6879c22e13
commit
593f6c40c0
@ -1,2 +1,3 @@
|
||||
#!/bin/bash
|
||||
./genkernel.lua build.cfg "$(git rev-parse --short HEAD)" > kernel.lua
|
||||
lua strip.lua kernel.lua skernel.lua
|
||||
|
@ -4,12 +4,14 @@ function skex2(fp)
|
||||
if not fp then return end
|
||||
if not rp then ft = {} end
|
||||
local f=io.open(fp,"rb")
|
||||
if f then
|
||||
C=f:read("*a")
|
||||
f:close()
|
||||
for l in C:gmatch("[^\n]+") do
|
||||
ft[#ft+1] = l
|
||||
end
|
||||
end
|
||||
end
|
||||
function ct.writefile(nfp)
|
||||
if not nfp then nfp = fp end
|
||||
print(nfp)
|
||||
@ -30,7 +32,7 @@ function skex2(fp)
|
||||
end
|
||||
end
|
||||
function ct.sp(np)
|
||||
if np then p=tonumber(np)%#ft end
|
||||
if np then p=(tonumber(np)%#ft)+1 end
|
||||
end
|
||||
function ct.pointer(np)
|
||||
ct.sp(np)
|
||||
|
@ -9,7 +9,7 @@ do -- so local works
|
||||
-- ["ep"]= event queue pointer
|
||||
-- }
|
||||
local tT,nP,rg,eq,p = {},1,_G,{},1 -- taskTable,nextPid,real _G,event queue
|
||||
_G.cT,sbt,C,T = 0,{},coroutine,table -- currentTask,sandboxTable
|
||||
_G.cT,sbt,C,T,io = 0,{},coroutine,table,io -- currentTask,sandboxTable
|
||||
function _G.spawn(n,f,e)
|
||||
tT[nP] = {}
|
||||
sbt[nP] = {}
|
||||
|
@ -8,3 +8,4 @@ function print(...)
|
||||
write(tostring(v).."\n")
|
||||
end
|
||||
end
|
||||
io.write = write
|
||||
|
Loading…
Reference in New Issue
Block a user