Commit 39ddd4de authored by Pierre Ynard's avatar Pierre Ynard

lua: cosmetics

parent 525e092d
...@@ -114,11 +114,12 @@ function host() ...@@ -114,11 +114,12 @@ function host()
end end
end end
local function write_console( client, data ) local function write_console( client, data )
-- FIXME: this method shouldn't be needed. vlc.net.write should just work -- FIXME: this method shouldn't be needed. vlc.net.write should
io.write(data or client.buffer) -- just work
return string.len(data or client.buffer) io.write(data or client.buffer)
end return string.len(data or client.buffer)
end
local function read_console( client, len ) local function read_console( client, len )
-- Read stdin from a windows console (beware: select/poll doesn't work!) -- Read stdin from a windows console (beware: select/poll doesn't work!)
...@@ -164,18 +165,18 @@ function host() ...@@ -164,18 +165,18 @@ function host()
if t == client_type.net or t == client_type.telnet then if t == client_type.net or t == client_type.telnet then
w = send w = send
r = recv r = recv
else if t == client_type.stdio or t == client_type.fifo then elseif t == client_type.stdio or t == client_type.fifo then
if vlc.win and t == client_type.stdio then if vlc.win and t == client_type.stdio then
vlc.win.console_init() vlc.win.console_init()
w = write_console w = write_console
r = read_console r = read_console
else else
w = write w = write
r = read r = read
end end
else else
error("Unknown client type", t ) error("Unknown client type", t )
end end end
local client = { -- data local client = { -- data
rfd = fd, rfd = fd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment