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 | |
parent | 84f03fda7c2be57e14f937e295710b5e883fedc6 (diff) | |
download | luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.gz luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.bz2 luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.zip |
Almost there.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/check-links.lua | 1 | ||||
-rw-r--r-- | etc/eol.lua | 5 | ||||
-rw-r--r-- | etc/get.lua | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/etc/check-links.lua b/etc/check-links.lua index c200dfb..898ed4b 100644 --- a/etc/check-links.lua +++ b/etc/check-links.lua | |||
@@ -5,7 +5,6 @@ | |||
5 | -- RCS ID: $Id$ | 5 | -- RCS ID: $Id$ |
6 | ----------------------------------------------------------------------------- | 6 | ----------------------------------------------------------------------------- |
7 | 7 | ||
8 | require"luasocket" | ||
9 | require"http" | 8 | require"http" |
10 | 9 | ||
11 | socket.http.TIMEOUT = 10 | 10 | socket.http.TIMEOUT = 10 |
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) |
diff --git a/etc/get.lua b/etc/get.lua index aa29ec2..cc270e8 100644 --- a/etc/get.lua +++ b/etc/get.lua | |||
@@ -4,6 +4,10 @@ | |||
4 | -- Author: Diego Nehab | 4 | -- Author: Diego Nehab |
5 | -- RCS ID: $Id$ | 5 | -- RCS ID: $Id$ |
6 | ----------------------------------------------------------------------------- | 6 | ----------------------------------------------------------------------------- |
7 | require"http" | ||
8 | require"ftp" | ||
9 | require"url" | ||
10 | |||
7 | -- formats a number of seconds into human readable form | 11 | -- formats a number of seconds into human readable form |
8 | function nicetime(s) | 12 | function nicetime(s) |
9 | local l = "s" | 13 | local l = "s" |