Merge pull request #27 from catwell/pull-noarg

fix more uses of arg
This commit is contained in:
Diego Nehab 2013-04-17 19:38:21 -07:00
commit c28fa1d309
4 changed files with 13 additions and 12 deletions

View file

@ -4,24 +4,24 @@ local socket = require"socket.unix"
host = "luasocket"
function pass(...)
local s = string.format(unpack(arg))
local s = string.format(...)
io.stderr:write(s, "\n")
end
function fail(...)
local s = string.format(unpack(arg))
local s = string.format(...)
io.stderr:write("ERROR: ", s, "!\n")
socket.sleep(3)
os.exit()
end
function warn(...)
local s = string.format(unpack(arg))
local s = string.format(...)
io.stderr:write("WARNING: ", s, "\n")
end
function remote(...)
local s = string.format(unpack(arg))
local s = string.format(...)
s = string.gsub(s, "\n", ";")
s = string.gsub(s, "%s+", " ")
s = string.gsub(s, "^%s*", "")