diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-05-28 07:47:41 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-05-28 07:47:41 +0000 |
commit | 6c565dd7c06c96fd9b3394ade61f46da59590d30 (patch) | |
tree | f303c1a94627e002fa4dd73d2f2641596b8b1420 /etc/eol.lua | |
parent | 84f03fda7c2be57e14f937e295710b5e883fedc6 (diff) | |
download | luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.gz luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.bz2 luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.zip |
Almost there.
Diffstat (limited to 'etc/eol.lua')
-rw-r--r-- | etc/eol.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/eol.lua b/etc/eol.lua index aa43596..b13684b 100644 --- a/etc/eol.lua +++ b/etc/eol.lua | |||
@@ -1,6 +1,9 @@ | |||
1 | require"mime.lua" | ||
2 | require"ltn12.lua" | ||
3 | |||
1 | local marker = '\n' | 4 | local marker = '\n' |
2 | if arg and arg[1] == '-d' then marker = '\r\n' end | 5 | if arg and arg[1] == '-d' then marker = '\r\n' end |
3 | local filter = mime.normalize(marker) | 6 | local filter = mime.normalize(marker) |
4 | local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter) | 7 | local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter) |
5 | local sink = ltn12.sink.file(io.stdout) | 8 | local sink = ltn12.sink.file(io.stdout) |
6 | ltn12.pump(source, sink) | 9 | ltn12.pump.all(source, sink) |