From ccd7be19848cecd099a6747faf392e33d37e45c0 Mon Sep 17 00:00:00 2001 From: tomas Date: Wed, 3 Nov 2004 10:11:18 +0000 Subject: Acrescimo das variaveis de informacao. --- src/lfs.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lfs.c b/src/lfs.c index 01f4076..f5ec7ab 100644 --- a/src/lfs.c +++ b/src/lfs.c @@ -9,7 +9,7 @@ ** lfs.lock (fh, mode) ** lfs.unlock (fh) ** -** $Id: lfs.c,v 1.8 2004/11/01 15:27:13 tomas Exp $ +** $Id: lfs.c,v 1.9 2004/11/03 10:11:18 tomas Exp $ */ #include @@ -444,6 +444,25 @@ static int file_info (lua_State *L) { } +/* +** Assumes the table is on top of the stack. +*/ +static void set_info (lua_State *L) { + lua_pushliteral (L, "_COPYRIGHT"); + lua_pushliteral (L, "Copyright (C) 2004 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, "_NAME"); + lua_pushliteral (L, "LuaFileSystem"); + lua_settable (L, -3); + lua_pushliteral (L, "_VERSION"); + lua_pushliteral (L, "1.0a"); + lua_settable (L, -3); +} + + static const struct luaL_reg fslib[] = { {"attributes", file_info}, {"chdir", change_dir}, @@ -458,5 +477,6 @@ static const struct luaL_reg fslib[] = { int luaopen_lfs (lua_State *L) { dir_create_meta (L); luaL_openlib (L, "lfs", fslib, 0); + set_info (L); return 1; } -- cgit v1.2.3-55-g6feb