change white space to tabs instead of spaces

This commit is contained in:
payonel 2015-09-01 00:17:46 -07:00
parent 1b83c83d6d
commit 7e7851f0de
2 changed files with 203 additions and 198 deletions

View File

@ -107,7 +107,6 @@ end
-- backend private methods, these are not pushed to user machine environments -- backend private methods, these are not pushed to user machine environments
function modem_host.pushMessage(target, datagram) function modem_host.pushMessage(target, datagram)
if not modem_host.validTarget(target) then if not modem_host.validTarget(target) then
return false, "invalid target, no such client listening" --ignored return false, "invalid target, no such client listening" --ignored
end end
@ -154,7 +153,6 @@ function modem_host.processPendingMessages()
else else
table.remove(modem_host.messages, i) table.remove(modem_host.messages, i)
end end
end end
end end
@ -219,7 +217,6 @@ function modem_host.joinExistingMessageBoard()
end end
function modem_host.connectMessageBoard() function modem_host.connectMessageBoard()
if modem_host.connected then if modem_host.connected then
return true return true
end end
@ -276,11 +273,13 @@ function obj.getWakeMessage() -- Get the current wake-up message.
cprint("modem.getWakeMessage") cprint("modem.getWakeMessage")
return wakeMessage return wakeMessage
end end
function obj.setWakeMessage(message) -- Set the wake-up message. function obj.setWakeMessage(message) -- Set the wake-up message.
cprint("modem.setWakeMessage",message) cprint("modem.setWakeMessage",message)
compCheckArg(1,message,"string","nil") compCheckArg(1,message,"string","nil")
wakeMessage = message wakeMessage = message
end end
function obj.close(port) -- Closes the specified port (default: all ports). Returns true if ports were closed. function obj.close(port) -- Closes the specified port (default: all ports). Returns true if ports were closed.
cprint("modem.close",port) cprint("modem.close",port)
compCheckArg(1,port,"number","nil") compCheckArg(1,port,"number","nil")
@ -295,10 +294,12 @@ function obj.close(port) -- Closes the specified port (default: all ports). Retu
modem_host.open_ports[port] = nil modem_host.open_ports[port] = nil
return true return true
end end
function obj.maxPacketSize() -- Gets the maximum packet size (config setting). function obj.maxPacketSize() -- Gets the maximum packet size (config setting).
cprint("modem.maxPacketSize") cprint("modem.maxPacketSize")
return settings.maxNetworkPacketSize return settings.maxNetworkPacketSize
end end
if wireless then if wireless then
function obj.getStrength() -- Get the signal strength (range) used when sending messages. function obj.getStrength() -- Get the signal strength (range) used when sending messages.
cprint("modem.getStrength") cprint("modem.getStrength")
@ -310,11 +311,13 @@ if wireless then
strength = newstrength strength = newstrength
end end
end end
function obj.isOpen(port) -- Whether the specified port is open. function obj.isOpen(port) -- Whether the specified port is open.
cprint("modem.isOpen",port) cprint("modem.isOpen",port)
compCheckArg(1,port,"number") compCheckArg(1,port,"number")
return modem_host.open_ports[port] ~= nil return modem_host.open_ports[port] ~= nil
end end
function obj.open(port) -- Opens the specified port. Returns true if the port was opened. function obj.open(port) -- Opens the specified port. Returns true if the port was opened.
cprint("modem.open",port) cprint("modem.open",port)
compCheckArg(1,port,"number") compCheckArg(1,port,"number")
@ -332,10 +335,12 @@ function obj.open(port) -- Opens the specified port. Returns true if the port wa
modem_host.open_ports[port] = true modem_host.open_ports[port] = true
return true return true
end end
function obj.isWireless() -- Whether this is a wireless network card. function obj.isWireless() -- Whether this is a wireless network card.
cprint("modem.isWireless") cprint("modem.isWireless")
return wireless return wireless
end end
function obj.broadcast(port, ...) -- Broadcasts the specified data on the specified port. function obj.broadcast(port, ...) -- Broadcasts the specified data on the specified port.
cprint("modem.broadcast",port, ...) cprint("modem.broadcast",port, ...)
compCheckArg(1,port,"number") compCheckArg(1,port,"number")