diff options
Diffstat (limited to 'lib/luacd.cpp')
-rw-r--r-- | lib/luacd.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/luacd.cpp b/lib/luacd.cpp index 56ffe73..b1838fb 100644 --- a/lib/luacd.cpp +++ b/lib/luacd.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: luacd.cpp,v 1.20 2005-11-13 13:41:20 pixel Exp $ */ +/* $Id: luacd.cpp,v 1.21 2006-02-02 14:09:49 pixel Exp $ */ #include "luacd.h" @@ -40,7 +40,7 @@ enum cdutils_methods_t { CDUTILS_READdata, CDUTILS_READFILE, CDUTILS_WRITESECTOR, - CDUTILS_WRITEdata, + CDUTILS_WRITEDATA, CDUTILS_WRITEFILE, CDUTILS_GETISOINFOS, CDUTILS_GETPTINFOS, @@ -72,7 +72,7 @@ struct lua_functypes_t cdutils_methods[] = { { CDUTILS_READdata, "readdata", 1, 3, {LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, { CDUTILS_READFILE, "readfile", 2, 4, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, { CDUTILS_WRITESECTOR, "writesector", 1, 3, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER} }, - { CDUTILS_WRITEdata, "writedata", 2, 4, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, + { CDUTILS_WRITEDATA, "writedata", 2, 4, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, { CDUTILS_WRITEFILE, "writefile", 1, 4, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, { CDUTILS_GETISOINFOS, "getisoinfos", 0, 0, 0 }, { CDUTILS_GETPTINFOS, "getptinfos", 0, 0, 0 }, @@ -107,7 +107,7 @@ class sLua_cdutils : public Base { DECLARE_METHOD(cdutils, CDUTILS_READdata); DECLARE_METHOD(cdutils, CDUTILS_READFILE); DECLARE_METHOD(cdutils, CDUTILS_WRITESECTOR); - DECLARE_METHOD(cdutils, CDUTILS_WRITEdata); + DECLARE_METHOD(cdutils, CDUTILS_WRITEDATA); DECLARE_METHOD(cdutils, CDUTILS_WRITEFILE); DECLARE_METHOD(cdutils, CDUTILS_GETISOINFOS); DECLARE_METHOD(cdutils, CDUTILS_GETPTINFOS); @@ -143,7 +143,7 @@ void Luacdutils::pushmembers(Lua * L) { PUSH_METHOD(cdutils, CDUTILS_READdata); PUSH_METHOD(cdutils, CDUTILS_READFILE); PUSH_METHOD(cdutils, CDUTILS_WRITESECTOR); - PUSH_METHOD(cdutils, CDUTILS_WRITEdata); + PUSH_METHOD(cdutils, CDUTILS_WRITEDATA); PUSH_METHOD(cdutils, CDUTILS_WRITEFILE); PUSH_METHOD(cdutils, CDUTILS_GETISOINFOS); PUSH_METHOD(cdutils, CDUTILS_GETPTINFOS); @@ -304,9 +304,9 @@ int sLua_cdutils::cdutils_proceed(Lua * L, int n, cdutils * cd, int caller) { sdata[i] = L->tonumber(); L->pop(); } - cd->write_sector(data, mode, sect); + cd->write_sector(sdata, mode, sect); break; - case CDUTILS_WRITEdata: + case CDUTILS_WRITEDATA: size = L->tonumber(3); if (n >= 3) sect = L->tonumber(4); @@ -317,7 +317,7 @@ int sLua_cdutils::cdutils_proceed(Lua * L, int n, cdutils * cd, int caller) { for (i = 0; i < size; i++) { L->push((lua_Number) i); L->gettable(2); - sdata[i] = L->tonumber(); + data[i] = L->tonumber(); L->pop(); } cd->write_data(data, size, mode, sect); @@ -879,7 +879,7 @@ void LuaPVD::pushstatics(Lua * L) throw (GeneralException) { } int sLua_PVD::PVD_proceed(Lua * L, int n, PVD * pvd, int caller) { - int r = 0, key_i = 0, value_i; + int r = 0, key_i = 0; String key_s, value_s; cddate * value_date; bool invalid = false, keyisstring; @@ -1311,13 +1311,14 @@ int sLua_DirTree::DirTree_proceed(Lua * L, int n, DirTree * dir, int caller) { } int sLua_DirTree::DirTree_proceed_statics(Lua * L, int n, int caller) { - int r; + int r = 0; DirTree * father; bool dir = true; switch (caller) { case DIRTREE_NEWDIRTREE: father = (DirTree *) LuaObject::getme(L, 1); + r = 1; if (n == 2) dir = L->toboolean(2); { |