From b66ab2cae9f03c7b3ff75c97a4a5fc59df442fc0 Mon Sep 17 00:00:00 2001 From: carregal Date: Mon, 11 Feb 2008 22:42:21 +0000 Subject: Preparing the 1.4.0 release. Added documentation for lfs.setmode --- src/lfs.c | 14 ++++++++------ src/lfs.def | 10 +++++----- src/lfs.h | 32 ++++++++++++++++---------------- 3 files changed, 29 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/lfs.c b/src/lfs.c index f52fecc..a4dd830 100644 --- a/src/lfs.c +++ b/src/lfs.c @@ -1,6 +1,6 @@ /* ** LuaFileSystem -** Copyright Kepler Project 2004-2007 (http://www.keplerproject.org/luafilesystem) +** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) ** ** File system manipulation library. ** This library offers these functions: @@ -11,11 +11,12 @@ ** lfs.lock (fh, mode) ** lfs.mkdir (path) ** lfs.rmdir (path) +** lfs.setmode (filepath, mode) ** lfs.symlinkattributes (filepath [, attributename]) -- thanks to Sam Roberts ** lfs.touch (filepath [, atime [, mtime]]) ** lfs.unlock (fh) ** -** $Id: lfs.c,v 1.46 2008/01/25 17:09:56 mascarenhas Exp $ +** $Id: lfs.c,v 1.47 2008/02/11 22:42:21 carregal Exp $ */ #include @@ -75,7 +76,7 @@ typedef struct dir_data { #define _O_TEXT 0 #define _O_BINARY 0 #define lfs_setmode(L,file,m) ((void)((void)file,m), \ - luaL_error(L, LUA_QL("setmode") " not supported"), -1) + luaL_error(L, LUA_QL("setmode") " not supported on non Windows platforms"), -1) #endif /* @@ -619,13 +620,13 @@ static int link_info (lua_State *L) { */ static void set_info (lua_State *L) { lua_pushliteral (L, "_COPYRIGHT"); - lua_pushliteral (L, "Copyright (C) 2003-2007 Kepler Project"); + lua_pushliteral (L, "Copyright (C) 2003 Kepler Project"); lua_settable (L, -3); lua_pushliteral (L, "_DESCRIPTION"); lua_pushliteral (L, "LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution"); lua_settable (L, -3); lua_pushliteral (L, "_VERSION"); - lua_pushliteral (L, "LuaFileSystem 1.3.0"); + lua_pushliteral (L, "LuaFileSystem 1.4.0"); lua_settable (L, -3); } @@ -636,11 +637,12 @@ static const struct luaL_reg fslib[] = { {"currentdir", get_dir}, {"dir", dir_iter_factory}, {"lock", file_lock}, - {"setmode", lfs_f_setmode}, {"mkdir", make_dir}, {"rmdir", remove_dir}, #ifndef _WIN32 {"symlinkattributes", link_info}, +#else + {"setmode", lfs_f_setmode}, #endif {"touch", file_utime}, {"unlock", file_unlock}, diff --git a/src/lfs.def b/src/lfs.def index dfe5c59..a0483c7 100644 --- a/src/lfs.def +++ b/src/lfs.def @@ -1,5 +1,5 @@ -LIBRARY lfs.dll -DESCRIPTION "LuaFileSystem" -VERSION 1.2.1 -EXPORTS -luaopen_lfs +LIBRARY lfs.dll +DESCRIPTION "LuaFileSystem" +VERSION 1.4.0 +EXPORTS +luaopen_lfs diff --git a/src/lfs.h b/src/lfs.h index 62ae79f..05a9571 100644 --- a/src/lfs.h +++ b/src/lfs.h @@ -1,16 +1,16 @@ -/* -** LuaFileSystem -** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/luafilesystem) -** -** $Id: lfs.h,v 1.3 2006/03/10 23:37:32 carregal Exp $ -*/ - -/* Define 'chdir' for systems that do not implement it */ -#ifdef NO_CHDIR -#define chdir(p) (-1) -#define chdir_error "Function 'chdir' not provided by system" -#else -#define chdir_error strerror(errno) -#endif - -int luaopen_lfs (lua_State *L); +/* +** LuaFileSystem +** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem) +** +** $Id: lfs.h,v 1.4 2008/02/11 22:42:21 carregal Exp $ +*/ + +/* Define 'chdir' for systems that do not implement it */ +#ifdef NO_CHDIR +#define chdir(p) (-1) +#define chdir_error "Function 'chdir' not provided by system" +#else +#define chdir_error strerror(errno) +#endif + +int luaopen_lfs (lua_State *L); -- cgit v1.2.3-55-g6feb