Added ltn12 module. Modified mime to be stand alone.

Still crashes on invalid input. Dunno why.
This commit is contained in:
Diego Nehab 2004-02-11 03:31:53 +00:00
parent 0b2542d1a6
commit 390846b640
12 changed files with 292 additions and 162 deletions

View file

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