aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-05-28 07:47:41 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-05-28 07:47:41 +0000
commit6c565dd7c06c96fd9b3394ade61f46da59590d30 (patch)
treef303c1a94627e002fa4dd73d2f2641596b8b1420 /etc
parent84f03fda7c2be57e14f937e295710b5e883fedc6 (diff)
downloadluasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.gz
luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.bz2
luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.zip
Almost there.
Diffstat (limited to 'etc')
-rw-r--r--etc/check-links.lua1
-rw-r--r--etc/eol.lua5
-rw-r--r--etc/get.lua4
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
8require"luasocket"
9require"http" 8require"http"
10 9
11socket.http.TIMEOUT = 10 10socket.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 @@
1require"mime.lua"
2require"ltn12.lua"
3
1local marker = '\n' 4local marker = '\n'
2if arg and arg[1] == '-d' then marker = '\r\n' end 5if arg and arg[1] == '-d' then marker = '\r\n' end
3local filter = mime.normalize(marker) 6local filter = mime.normalize(marker)
4local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter) 7local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter)
5local sink = ltn12.sink.file(io.stdout) 8local sink = ltn12.sink.file(io.stdout)
6ltn12.pump(source, sink) 9ltn12.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-----------------------------------------------------------------------------
7require"http"
8require"ftp"
9require"url"
10
7-- formats a number of seconds into human readable form 11-- formats a number of seconds into human readable form
8function nicetime(s) 12function nicetime(s)
9 local l = "s" 13 local l = "s"