luasocket/etc/eol.lua
Diego Nehab 5b8d7dec54 Updated some of the callbacks in callback.lua.
Update get.lua to use the new callbacks.
The old "code" module is now the "mime" module.
Updated all modules that depended on it.
Updated url.lua to use the new namespace scheme, and moved the
    escape and unescape functions that used to be in the code.lua module
    to it, since these are specific to urls.
Updated the callback entries in the manual.
2004-01-19 05:41:30 +00:00

10 lines
257 B
Lua

marker = {['-u'] = '\10', ['-d'] = '\13\10'}
arg = arg or {'-u'}
marker = marker[arg[1]] or marker['-u']
local convert = socket.mime.canonic(marker)
while 1 do
local chunk = io.read(4096)
io.write(convert(chunk))
if not chunk then break end
end