aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lfs.c22
1 files changed, 21 insertions, 1 deletions
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 @@
9** lfs.lock (fh, mode) 9** lfs.lock (fh, mode)
10** lfs.unlock (fh) 10** lfs.unlock (fh)
11** 11**
12** $Id: lfs.c,v 1.8 2004/11/01 15:27:13 tomas Exp $ 12** $Id: lfs.c,v 1.9 2004/11/03 10:11:18 tomas Exp $
13*/ 13*/
14 14
15#include <errno.h> 15#include <errno.h>
@@ -444,6 +444,25 @@ static int file_info (lua_State *L) {
444} 444}
445 445
446 446
447/*
448** Assumes the table is on top of the stack.
449*/
450static void set_info (lua_State *L) {
451 lua_pushliteral (L, "_COPYRIGHT");
452 lua_pushliteral (L, "Copyright (C) 2004 Kepler Project");
453 lua_settable (L, -3);
454 lua_pushliteral (L, "_DESCRIPTION");
455 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");
456 lua_settable (L, -3);
457 lua_pushliteral (L, "_NAME");
458 lua_pushliteral (L, "LuaFileSystem");
459 lua_settable (L, -3);
460 lua_pushliteral (L, "_VERSION");
461 lua_pushliteral (L, "1.0a");
462 lua_settable (L, -3);
463}
464
465
447static const struct luaL_reg fslib[] = { 466static const struct luaL_reg fslib[] = {
448 {"attributes", file_info}, 467 {"attributes", file_info},
449 {"chdir", change_dir}, 468 {"chdir", change_dir},
@@ -458,5 +477,6 @@ static const struct luaL_reg fslib[] = {
458int luaopen_lfs (lua_State *L) { 477int luaopen_lfs (lua_State *L) {
459 dir_create_meta (L); 478 dir_create_meta (L);
460 luaL_openlib (L, "lfs", fslib, 0); 479 luaL_openlib (L, "lfs", fslib, 0);
480 set_info (L);
461 return 1; 481 return 1;
462} 482}