Substituicao nos nomes dos arquivos.

This commit is contained in:
tomas
2004-07-29 14:26:33 +00:00
parent 8addf14a39
commit 70052678b1
8 changed files with 30 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
# $Id: Makefile,v 1.1 2004/07/27 14:15:24 tomas Exp $
# $Id: Makefile,v 1.2 2004/07/29 14:26:33 tomas Exp $
T= luafilesystem
T= lfs
include ./config

4
config
View File

@@ -1,6 +1,7 @@
# Installation directories
# System's libraries directory (where Lua libraries are installed)
# System's libraries directory (where binary libraries are installed)
LIB_DIR= /usr/local/lib
# System's lua directory (where Lua libraries are installed)
LUA_DIR= /usr/local/lua
# OS dependent
@@ -10,7 +11,6 @@ LIB_OPTION= -dynamiclib #for MacOS X
#LIB_OPTION= -shared #for Linux
# Compilation directives
# pre-compile and include mod2.lua into mod_lua.c
# On FreeBSD systems, the following line should be commented
DLLIB= -ldl
WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings

View File

@@ -1,5 +0,0 @@
LIBRARY luafilesystem.dll
DESCRIPTION "LuaFilesystem"
VERSION 1.0
EXPORTS
luaopen_luafilesystem

View File

@@ -1,15 +1,15 @@
/*
** File system manipulation library.
** This library offers these functions:
** luafilesystem.attributes (filepath [, attributename])
** luafilesystem.chdir (path)
** luafilesystem.currentdir ()
** luafilesystem.dir (path)
** luafilesystem.mkdir (path)
** luafilesystem.lock (fh, mode)
** luafilesystem.unlock (fh)
** lfs.attributes (filepath [, attributename])
** lfs.chdir (path)
** lfs.currentdir ()
** lfs.dir (path)
** lfs.mkdir (path)
** lfs.lock (fh, mode)
** lfs.unlock (fh)
**
** $Id: luafilesystem.c,v 1.1 2004/07/27 14:15:24 tomas Exp $
** $Id: lfs.c,v 1.1 2004/07/29 14:26:33 tomas Exp $
*/
#include <errno.h>
@@ -33,7 +33,7 @@
#include <lauxlib.h>
#include <lualib.h>
#include "luafilesystem.h"
#include "lfs.h"
/* Define 'strerror' for systems that do not implement it */
#ifdef NO_STRERROR
@@ -344,8 +344,8 @@ static const struct luaL_reg fslib[] = {
{NULL, NULL},
};
int luaopen_luafilesystem (lua_State *L) {
int luaopen_lfs (lua_State *L) {
dir_create_meta (L);
luaL_openlib (L, "luafilesystem", fslib, 0);
luaL_openlib (L, "lfs", fslib, 0);
return 1;
}

View File

@@ -1,5 +1,5 @@
/* Define 'chdir' for systems that do not implement it */
/* $Id: luafilesystem.h,v 1.1 2004/07/27 14:15:24 tomas Exp $ */
/* $Id: lfs.h,v 1.1 2004/07/29 14:26:33 tomas Exp $ */
#ifdef NO_CHDIR
#define chdir(p) (-1)
#define chdir_error "Function 'chdir' not provided by system"
@@ -7,4 +7,4 @@
#define chdir_error strerror(errno)
#endif
int luaopen_filesystem (lua_State *L);
int luaopen_lfs (lua_State *L);

8
t_lfs.lua Normal file
View File

@@ -0,0 +1,8 @@
-- $Id: t_lfs.lua,v 1.1 2004/07/29 14:26:33 tomas Exp $
if not lfs and loadlib then
local libname = "LIB_NAME"
local libopen = "luaopen_lfs"
local init, err1, err2 = loadlib (libname, libopen)
assert (init, (err1 or '')..(err2 or ''))
init ()
end

View File

@@ -1,8 +0,0 @@
-- $Id: t_luafilesystem.lua,v 1.1 2004/07/27 14:15:24 tomas Exp $
if not luafilesystem and loadlib then
local libname = "LIB_NAME"
local libopen = "luaopen_luafilesystem"
local init, err1, err2 = loadlib (libname, libopen)
assert (init, (err1 or '')..(err2 or ''))
init ()
end

5
vc6/lfs.def Normal file
View File

@@ -0,0 +1,5 @@
LIBRARY lfs.dll
DESCRIPTION "LuaFileSystem"
VERSION 1.0
EXPORTS
luaopen_lfs