Bugs sent by David.

This commit is contained in:
Diego Nehab 2005-10-05 03:16:17 +00:00
parent a65c599fc5
commit 72eceedc62
16 changed files with 12 additions and 21 deletions

2
TODO
View File

@ -1,4 +1,4 @@
fix unix.c to return just a function
get rid of setmetatable(, nil) since packages don't need this anymore in get rid of setmetatable(, nil) since packages don't need this anymore in
5.1 5.1

View File

@ -140,7 +140,7 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> <a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
pump step function used to pass data from the pump step function used to pass data from the
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function; server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;
<li><tt>accept</tt>: An optional function to be used instead of <li><tt>create</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created. <a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul> </ul>
@ -225,7 +225,7 @@ authentication. Defaults to "<tt>ftp:anonymous@anonymous.org</tt>";
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> <a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
pump step function used to pass data from the pump step function used to pass data from the
server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function; server to the sink. Defaults to the LTN12 <tt>pump.step</tt> function;
<li><tt>accept</tt>: An optional function to be used instead of <li><tt>create</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created. <a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul> </ul>

View File

@ -180,7 +180,7 @@ Defaults to the LTN12 <tt>pump.step</tt> function.
<li><tt>proxy</tt>: The URL of a proxy server to use. Defaults to no proxy; <li><tt>proxy</tt>: The URL of a proxy server to use. Defaults to no proxy;
<li><tt>redirect</tt>: Set to <tt><b>false</b></tt> to prevent the <li><tt>redirect</tt>: Set to <tt><b>false</b></tt> to prevent the
function from automatically following 301 or 302 server redirect messages; function from automatically following 301 or 302 server redirect messages;
<li><tt>accept</tt>: An optional function to be used instead of <li><tt>create</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created. <a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul> </ul>

View File

@ -76,9 +76,9 @@ distribution directory structure:</p>
<pre class=example> <pre class=example>
&lt;SHARE&gt;/compat-5.1.lua &lt;SHARE&gt;/compat-5.1.lua
&lt;SHARE&gt;/ltn12.lua &lt;SHARE&gt;/ltn12.lua
&lt;SHARE&gt;/mime/init.lua &lt;SHARE&gt;/mime/init.lua (originally mime.lua)
&lt;LIB&gt;/mime/core.dll &lt;LIB&gt;/mime/core.dll
&lt;SHARE&gt;/socket/init.lua &lt;SHARE&gt;/socket/init.lua (originally socket.lua)
&lt;LIB&gt;/socket/core.dll &lt;LIB&gt;/socket/core.dll
&lt;SHARE&gt;/socket/http.lua &lt;SHARE&gt;/socket/http.lua
&lt;SHARE&gt;/socket/tp.lua &lt;SHARE&gt;/socket/tp.lua
@ -88,7 +88,10 @@ distribution directory structure:</p>
</pre> </pre>
<p> Naturally, on Unix systems, <tt>core.dll</tt> <p> Naturally, on Unix systems, <tt>core.dll</tt>
would be replaced by <tt>core.so</tt>. would be replaced by <tt>core.so</tt>. Notice that in the instalation,
<tt>socket.lua</tt> becomes <tt>socket/init.lua</tt>, and the same happens
with <tt>mime.lua</tt>, which becomes <tt>mime/init.lua</tt>.
</p>
<p> In order for the interpreter to find all LuaSocket components, three <p> In order for the interpreter to find all LuaSocket components, three
environment variables need to be set. The first environment variable tells environment variables need to be set. The first environment variable tells
@ -110,7 +113,7 @@ LUA_CPATH=&lt;LIB&gt;/?.dll;?.dll
</pre> </pre>
<p> Again, naturally, on Unix systmems the shared library extension would be <p> Again, naturally, on Unix systmems the shared library extension would be
<tt>.so</tt> instead of <tt>.dll</tt></p> <tt>.so</tt> instead of <tt>.dll</tt>.</p>
<h3>Using LuaSocket</h3> <h3>Using LuaSocket</h3>

View File

@ -161,7 +161,7 @@ local machine host name;
<a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a> <a href="http://lua-users.org/wiki/FiltersSourcesAndSinks">LTN12</a>
pump step function used to pass data from the pump step function used to pass data from the
source to the server. Defaults to the LTN12 <tt>pump.step</tt> function; source to the server. Defaults to the LTN12 <tt>pump.step</tt> function;
<li><tt>accept</tt>: An optional function to be used instead of <li><tt>create</tt>: An optional function to be used instead of
<a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created. <a href=tcp.html#socket.tcp><tt>socket.tcp</tt></a> when the communications socket is created.
</ul> </ul>

View File

@ -14,9 +14,7 @@ local table = require("table")
local socket = require("socket") local socket = require("socket")
local url = require("socket.url") local url = require("socket.url")
local tp = require("socket.tp") local tp = require("socket.tp")
module("socket.dict") module("socket.dict")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Globals -- Globals

View File

@ -15,7 +15,6 @@ local string = require("string")
local socket = require("socket") local socket = require("socket")
local ltn12 = require("ltn12") local ltn12 = require("ltn12")
module("socket.lp") module("socket.lp")
getmetatable(_M).__index = nil
-- default port -- default port
PORT = 515 PORT = 515

View File

@ -16,7 +16,6 @@ local socket = require("socket")
local ltn12 = require("ltn12") local ltn12 = require("ltn12")
local url = require("socket.url") local url = require("socket.url")
module("socket.tftp") module("socket.tftp")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Program constants -- Program constants

View File

@ -17,7 +17,6 @@ local url = require("socket.url")
local tp = require("socket.tp") local tp = require("socket.tp")
local ltn12 = require("ltn12") local ltn12 = require("ltn12")
module("socket.ftp") module("socket.ftp")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Program constants -- Program constants

View File

@ -16,7 +16,6 @@ local string = require("string")
local base = _G local base = _G
local table = require("table") local table = require("table")
module("socket.http") module("socket.http")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Program constants -- Program constants

View File

@ -12,7 +12,6 @@ local string = require("string")
local table = require("table") local table = require("table")
local base = _G local base = _G
module("ltn12") module("ltn12")
getmetatable(_M).__index = nil
filter = {} filter = {}
source = {} source = {}

View File

@ -14,7 +14,6 @@ local mime = require("mime.core")
local io = require("io") local io = require("io")
local string = require("string") local string = require("string")
module("mime") module("mime")
getmetatable(_M).__index = nil
-- encode, decode and wrap algorithm tables -- encode, decode and wrap algorithm tables
encodet = {} encodet = {}

View File

@ -18,7 +18,6 @@ local tp = require("socket.tp")
local ltn12 = require("ltn12") local ltn12 = require("ltn12")
local mime = require("mime") local mime = require("mime")
module("socket.smtp") module("socket.smtp")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Program constants -- Program constants

View File

@ -12,7 +12,6 @@ local string = require("string")
local math = require("math") local math = require("math")
local socket = require("socket.core") local socket = require("socket.core")
module("socket") module("socket")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Exported auxiliar functions -- Exported auxiliar functions

View File

@ -13,7 +13,6 @@ local string = require("string")
local socket = require("socket") local socket = require("socket")
local ltn12 = require("ltn12") local ltn12 = require("ltn12")
module("socket.tp") module("socket.tp")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Program constants -- Program constants

View File

@ -12,7 +12,6 @@ local string = require("string")
local base = _G local base = _G
local table = require("table") local table = require("table")
module("socket.url") module("socket.url")
getmetatable(_M).__index = nil
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Module version -- Module version