Added new filter to code.c, to convert between line conventions.
This commit is contained in:
parent
50ce143725
commit
3ea9271126
4 changed files with 14 additions and 5 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue