mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 14:14:30 +02:00
Added new filter to code.c, to convert between line conventions.
This commit is contained in:
9
etc/eol.lua
Normal file
9
etc/eol.lua
Normal file
@ -0,0 +1,9 @@
|
||||
marker = {['-u'] = '\10', ['-d'] = '\13\10'}
|
||||
arg = arg or {'-u'}
|
||||
marker = marker[arg[1]] or marker['-u']
|
||||
local convert = socket.code.canonic(marker)
|
||||
while 1 do
|
||||
local chunk = io.read(4096)
|
||||
io.write(convert(chunk))
|
||||
if not chunk then break end
|
||||
end
|
Reference in New Issue
Block a user