summaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-07 01:13:57 +0100
committerubq323 <ubq323@ubq323.website>2022-08-07 01:13:57 +0100
commitc76740968cda659e4a0e1b57c814c08019d4dcfb (patch)
treebdb7edcc6aa4c9eedaaadbb2a624dfb22e7728c0 /img
parent944a85641c69b8428d08927ce18919e00aa7d885 (diff)
img
Diffstat (limited to 'img')
-rw-r--r--img/driver.lua18
1 files changed, 10 insertions, 8 deletions
diff --git a/img/driver.lua b/img/driver.lua
index eeb8f21..618c9bd 100644
--- a/img/driver.lua
+++ b/img/driver.lua
@@ -1,16 +1,18 @@
package.path = "/?;/?.lua;"..package.path
_G.ERRLOG = {}
-_G.oldprint = print
-_G.print = function(...)
- o = {}
- for ix = 1,select('#',...) do
- o[ix] = tostring(select(ix,...))
+if not _G.oldprint then
+ _G.oldprint = print
+ _G.print = function(...)
+ o = {}
+ for ix = 1,select('#',...) do
+ o[ix] = tostring(select(ix,...))
+ end
+ table.insert(_G.ERRLOG,table.concat(o,"\t"))
+ _G.oldprint(...)
end
- table.insert(_G.ERRLOG,table.concat(o,"\t"))
- _G.oldprint(...)
+ _G.rpr = function() _G.print = _G.oldprint _G.oldprint = nil end
end
-_G.rpr = function() _G.print = _G.oldprint end
print("uu")
local load_pnm = require("load_pnm").load