Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master:
  Fix warnings: unused variable
  Fix warning: C++ style comments are not allowed in ISO C90
  Set global "lfs" when opening module
  Bump version to 1.6.2 and set version via define in src/lfs.c to make it better visible
  Full Lua 5.2 compatibility and adherance to modules-create-no-globals
  fix build for Lua 5.2; version 1.6.1
  lfs.c: use Lua 5.2's own luaL_register
  luafilesystem 1.6.0
  Due to Android (and apparently Sun) not supporting getcwd(NULL, 0), I've changed to call to getcwd to specify a buffer and explicit size which successfully works around the problem. One minor performance advantage is that one less malloc/free is needed since the buffer is now created on the stack. Apparently, this was already changed in a prior commit I didn't see initially, but I think the use of an invented/arbitrary PATH_MAX is incorrect. Platforms should generally provide a constant for this and PATH_MAX itself is already defined on some systems like Linux which can cause collisions. This commit improves on those changes by leveraging the constants provided by the compiler/system.
  implements fake luaL_register in Lua 5.2+
  • Loading branch information
drahosp committed Oct 29, 2012
2 parents 806ca2c + 9c2679f commit c2c6992
Show file tree
Hide file tree
Showing 8 changed files with 524 additions and 365 deletions.
12 changes: 12 additions & 0 deletions README
Expand Up @@ -22,6 +22,18 @@ Please check the documentation at doc/us/ for more information.
History
-------

Version 1.6.2 [??/Oct/2012]
* Full Lua 5.2 compatibility (with Lua 5.1 fallbacks)

Version 1.6.1 [01/Oct/2012]
* fix build for Lua 5.2

Version 1.6.0 [26/Sep/2012]
* getcwd fix for Android
* support for Lua 5.2
* add lfs.link
* other bug fixes

Version 1.5.0 [20/Oct/2009]
* added explicit next and close methods to second return value of lfs.dir (the directory object), for explicit iteration or explicit closing.
* added directory locking via lfs.lock_dir function (see the manual).
Expand Down
2 changes: 1 addition & 1 deletion doc/us/examples.html
Expand Up @@ -65,7 +65,7 @@ <h3>Directory iterator</h3>
attributes for each file inside it.</p>

<pre class="example">
require"lfs"
local lfs = require"lfs"

function attrdir (path)
for file in lfs.dir(path) do
Expand Down
23 changes: 22 additions & 1 deletion doc/us/index.html
Expand Up @@ -71,7 +71,8 @@ <h2><a name="overview"></a>Overview</h2>

<h2><a name="status"></a>Status</h2>

<p>Current version is 1.5.0. It was developed for Lua 5.1.</p>
<p>Current version is 1.6.2. It was developed for Lua 5.1 but also
works with Lua 5.2.</p>

<h2><a name="download"></a>Download</h2>

Expand All @@ -82,10 +83,30 @@ <h2><a name="download"></a>Download</h2>
<h2><a name="history"></a>History</h2>

<dl class="history">
<dt><strong>Version 1.6.2</strong> [??/Oct/2012]</dt>
<dd><ul>
<li>Full Lua 5.2 compatibility (with Lua 5.1 fallbacks)</li>
</ul></dd>

<dt><strong>Version 1.6.1</strong> [01/Oct/2012]</dt>
<dd><ul>
<li>fix build for Lua 5.2</li>
</ul></dd>

<dt><strong>Version 1.6.0</strong> [26/Sep/2012]</dt>
<dd><ul>
<li>getcwd fix for Android</li>
<li>support for Lua 5.2</li>
<li>add lfs.link</li>
<li>other bug fixes</li>
</ul></dd>

<dt><strong>Version 1.5.0</strong> [20/Oct/2009]</dt>
<dd><ul>
<li>Added explicit next and close methods to second return value of lfs.dir
(the directory object), for explicit iteration or explicit closing.</li>
<li>Added directory locking via lfs.lock_dir function (see the <a href="manual.html">manual</a>).</li>
</ul></dd>
<dt><strong>Version 1.4.2</strong> [03/Feb/2009]</dt>
<dd>
<ul>
Expand Down
27 changes: 27 additions & 0 deletions rockspecs/luafilesystem-1.6.0-1.rockspec
@@ -0,0 +1,27 @@
package = "LuaFileSystem"

version = "1.6.0-1"

source = {
url = "https://github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.6.0.tar.gz",
}

description = {
summary = "File System Library for the Lua Programming Language",
detailed = [[
LuaFileSystem is a Lua library developed to complement the set of
functions related to file systems offered by the standard Lua
distribution. LuaFileSystem offers a portable way to access the
underlying directory structure and file attributes.
]]
}

dependencies = {
"lua >= 5.1"
}

build = {
type = "builtin",
modules = { lfs = "src/lfs.c" },
copy_directories = { "doc", "tests" }
}
27 changes: 27 additions & 0 deletions rockspecs/luafilesystem-1.6.1-1.rockspec
@@ -0,0 +1,27 @@
package = "LuaFileSystem"

version = "1.6.1-1"

source = {
url = "https://github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.6.1.tar.gz",
}

description = {
summary = "File System Library for the Lua Programming Language",
detailed = [[
LuaFileSystem is a Lua library developed to complement the set of
functions related to file systems offered by the standard Lua
distribution. LuaFileSystem offers a portable way to access the
underlying directory structure and file attributes.
]]
}

dependencies = {
"lua >= 5.1"
}

build = {
type = "builtin",
modules = { lfs = "src/lfs.c" },
copy_directories = { "doc", "tests" }
}
27 changes: 27 additions & 0 deletions rockspecs/luafilesystem-1.6.2-1.rockspec
@@ -0,0 +1,27 @@
package = "LuaFileSystem"

version = "1.6.2-1"

source = {
url = "https://github.com/downloads/keplerproject/luafilesystem/luafilesystem-1.6.2.tar.gz",
}

description = {
summary = "File System Library for the Lua Programming Language",
detailed = [[
LuaFileSystem is a Lua library developed to complement the set of
functions related to file systems offered by the standard Lua
distribution. LuaFileSystem offers a portable way to access the
underlying directory structure and file attributes.
]]
}

dependencies = {
"lua >= 5.1"
}

build = {
type = "builtin",
modules = { lfs = "src/lfs.c" },
copy_directories = { "doc", "tests" }
}

0 comments on commit c2c6992

Please sign in to comment.