Added new filter to code.c, to convert between line conventions.

This commit is contained in:
Diego Nehab 2004-01-18 08:59:21 +00:00
parent 50ce143725
commit 3ea9271126
4 changed files with 14 additions and 5 deletions

9
etc/eol.lua Normal file
View 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