From d2d81935309e9eb1b24cd9d13dfcc2ae1d985eb4 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 27 Jul 2007 14:29:23 +0000 Subject: Upgrading to Lua-5.1 --- lib/luacd.cpp | 100 ++++++++++++++++++++++++++++----------------------------- lib/luapsx.cpp | 8 ++--- 2 files changed, 54 insertions(+), 54 deletions(-) (limited to 'lib') diff --git a/lib/luacd.cpp b/lib/luacd.cpp index 6f79a16..091fd68 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.23 2007-05-30 06:36:23 pixel Exp $ */ +/* $Id: luacd.cpp,v 1.24 2007-07-27 14:29:23 pixel Exp $ */ #include "luacd.h" @@ -65,36 +65,36 @@ enum cdutils_functions_t { }; struct lua_functypes_t cdutils_methods[] = { - { CDUTILS_SETISOW, "set_iso_w", 1, 1, {LUA_OBJECT} }, - { CDUTILS_GUESSTYPE, "guessmode", 0, 1, {LUA_NUMBER} }, - { CDUTILS_SECTORSEEK, "sectorseek", 1, 1, {LUA_NUMBER} }, - { CDUTILS_READSECTOR, "readsector", 0, 2, {LUA_NUMBER, LUA_NUMBER} }, - { 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_WRITEFILE, "writefile", 1, 4, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, + { CDUTILS_SETISOW, "set_iso_w", 1, 1, { BLUA_OBJECT } }, + { CDUTILS_GUESSTYPE, "guessmode", 0, 1, { BLUA_NUMBER } }, + { CDUTILS_SECTORSEEK, "sectorseek", 1, 1, { BLUA_NUMBER } }, + { CDUTILS_READSECTOR, "readsector", 0, 2, { BLUA_NUMBER, BLUA_NUMBER } }, + { CDUTILS_READdata, "readdata", 1, 3, { BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, + { CDUTILS_READFILE, "readfile", 2, 4, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, + { CDUTILS_WRITESECTOR, "writesector", 1, 3, { BLUA_TABLE, BLUA_NUMBER, BLUA_NUMBER } }, + { CDUTILS_WRITEDATA, "writedata", 2, 4, { BLUA_TABLE, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, + { CDUTILS_WRITEFILE, "writefile", 1, 4, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, { CDUTILS_GETISOINFOS, "getisoinfos", 0, 0, 0 }, { CDUTILS_GETPTINFOS, "getptinfos", 0, 0, 0 }, - { CDUTILS_FINDPATH, "findpath", 1, 1, {LUA_STRING} }, - { CDUTILS_FINDPARENT, "findparent", 1, 1, {LUA_STRING} }, - { CDUTILS_FINDDIRENTRY, "finddirentry", 2, 2, {LUA_OBJECT, LUA_STRING} }, - { CDUTILS_NEWCDFILE, "cdfile", 1, 3, {LUA_ANY, LUA_NUMBER, LUA_NUMBER} }, - { CDUTILS_UPDATESIZE, "updatesize", 2, 2, {LUA_STRING, LUA_NUMBER} }, - { CDUTILS_UPDATESECTOR, "updatesector", 2, 2, {LUA_STRING, LUA_NUMBER} }, - { CDUTILS_CREATESECTOR, "createsector", 2, 3, {LUA_NUMBER, LUA_NUMBER, LUA_BOOLEAN} }, + { CDUTILS_FINDPATH, "findpath", 1, 1, { BLUA_STRING } }, + { CDUTILS_FINDPARENT, "findparent", 1, 1, { BLUA_STRING } }, + { CDUTILS_FINDDIRENTRY, "finddirentry", 2, 2, { BLUA_OBJECT, BLUA_STRING } }, + { CDUTILS_NEWCDFILE, "cdfile", 1, 3, { BLUA_ANY, BLUA_NUMBER, BLUA_NUMBER } }, + { CDUTILS_UPDATESIZE, "updatesize", 2, 2, { BLUA_STRING, BLUA_NUMBER } }, + { CDUTILS_UPDATESECTOR, "updatesector", 2, 2, { BLUA_STRING, BLUA_NUMBER } }, + { CDUTILS_CREATESECTOR, "createsector", 2, 3, { BLUA_NUMBER, BLUA_NUMBER, BLUA_BOOLEAN } }, { -1, 0, 0, 0, 0 } }; struct lua_functypes_t cdutils_functions[] = { - { CDUTILS_NEWCDUTILS, "cdutils" , 1, 2, {LUA_OBJECT, LUA_OBJECT} }, - { CDUTILS_SWAPWORD, "swapword", 1, 1, {LUA_NUMBER} }, - { CDUTILS_SWAPDWORD, "swapdword", 1, 1, {LUA_NUMBER} }, - { CDUTILS_FROM_BCD, "from_BCD", 1, 1, {LUA_NUMBER} }, - { CDUTILS_TO_BCD, "to_BCD", 1, 1, {LUA_NUMBER} }, - { CDUTILS_IS_VALID_BCD, "is_valid_BCD", 1, 1, {LUA_NUMBER} }, - { CDUTILS_FROM_MSF, "from_MSF", 1, 4, {LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, - { CDUTILS_TO_MSF, "to_MSF", 1, 2, {LUA_NUMBER, LUA_NUMBER} }, + { CDUTILS_NEWCDUTILS, "cdutils" , 1, 2, { BLUA_OBJECT, BLUA_OBJECT } }, + { CDUTILS_SWAPWORD, "swapword", 1, 1, { BLUA_NUMBER } }, + { CDUTILS_SWAPDWORD, "swapdword", 1, 1, { BLUA_NUMBER } }, + { CDUTILS_FROM_BCD, "from_BCD", 1, 1, { BLUA_NUMBER } }, + { CDUTILS_TO_BCD, "to_BCD", 1, 1, { BLUA_NUMBER } }, + { CDUTILS_IS_VALID_BCD, "is_valid_BCD", 1, 1, { BLUA_NUMBER } }, + { CDUTILS_FROM_MSF, "from_MSF", 1, 4, { BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, + { CDUTILS_TO_MSF, "to_MSF", 1, 2, { BLUA_NUMBER, BLUA_NUMBER } }, { -1, 0, 0, 0, 0 } }; @@ -556,7 +556,7 @@ enum direntry_methods_t { }; struct lua_functypes_t direntry_methods[] = { - { DIRENTRY_INDEX, "index", 1, 1, {LUA_STRING} }, + { DIRENTRY_INDEX, "index", 1, 1, { BLUA_STRING } }, { DIRENTRY_ISHIDDEN, "ishidden", 0, 0, 0 }, { DIRENTRY_ISDIR, "isdir", 0, 0, 0 }, { DIRENTRY_HASXA, "hasxa", 0, 0, 0 }, @@ -719,8 +719,8 @@ enum cddate_functions_t { }; struct lua_functypes_t cddate_methods[] = { - { CDDATE_INDEX, "index", 1, 1, {LUA_STRING} }, - { CDDATE_NEWINDEX, "newindex", 2, 2, {LUA_STRING, LUA_NUMBER} }, + { CDDATE_INDEX, "index", 1, 1, { BLUA_STRING } }, + { CDDATE_NEWINDEX, "newindex", 2, 2, { BLUA_STRING, BLUA_NUMBER } }, { -1, 0, 0, 0, 0 } }; @@ -842,8 +842,8 @@ enum PVD_functions_t { }; struct lua_functypes_t PVD_methods[] = { - { PVD_INDEX, "index", 1, 1, {LUA_ANY} }, - { PVD_NEWINDEX, "newindex", 2, 2, {LUA_ANY, LUA_ANY} }, + { PVD_INDEX, "index", 1, 1, { BLUA_ANY } }, + { PVD_NEWINDEX, "newindex", 2, 2, { BLUA_ANY, BLUA_ANY } }, { -1, 0, 0, 0, 0 } }; @@ -1088,16 +1088,16 @@ enum DirTree_functions_t { }; struct lua_functypes_t DirTree_methods[] = { - { DIRTREE_INDEX, "index", 1, 1, {LUA_STRING} }, - { DIRTREE_NEWINDEX, "newindex", 2, 2, {LUA_STRING, LUA_ANY} }, - { DIRTREE_FROMDIR, "fromdir", 1, 1, {LUA_OBJECT} }, + { DIRTREE_INDEX, "index", 1, 1, { BLUA_STRING } }, + { DIRTREE_NEWINDEX, "newindex", 2, 2, { BLUA_STRING, BLUA_ANY } }, + { DIRTREE_FROMDIR, "fromdir", 1, 1, { BLUA_OBJECT } }, { DIRTREE_SETBASICSXA, "setbasicsxa", 0, 0, 0 }, - { DIRTREE_FIND, "find", 1, 1, {LUA_STRING} }, + { DIRTREE_FIND, "find", 1, 1, { BLUA_STRING } }, { -1, 0, 0, 0, 0 } }; struct lua_functypes_t DirTree_functions[] = { - { DIRTREE_NEWDIRTREE, "DirTree", 1, 2, {LUA_OBJECT, LUA_BOOLEAN} }, + { DIRTREE_NEWDIRTREE, "DirTree", 1, 2, { BLUA_OBJECT, BLUA_BOOLEAN } }, { -1, 0, 0, 0, 0 } }; @@ -1363,28 +1363,28 @@ enum isobuilder_functions_t { }; struct lua_functypes_t isobuilder_methods[] = { - { ISOBUILDER_FOREWORD, "foreword", 1, 1, {LUA_OBJECT} }, - { ISOBUILDER_FOREWORD_HANDLE, "foreword_handle", 1, 2, {LUA_OBJECT, LUA_NUMBER} }, - { ISOBUILDER_FOREWORD_ARRAY, "foreword_array", 1, 2, {LUA_TABLE, LUA_NUMBER} }, + { ISOBUILDER_FOREWORD, "foreword", 1, 1, { BLUA_OBJECT } }, + { ISOBUILDER_FOREWORD_HANDLE, "foreword_handle", 1, 2, { BLUA_OBJECT, BLUA_NUMBER } }, + { ISOBUILDER_FOREWORD_ARRAY, "foreword_array", 1, 2, { BLUA_TABLE, BLUA_NUMBER } }, { ISOBUILDER_GETDISPSECT, "getdispsect", 0, 0, 0}, - { ISOBUILDER_PUTFILE, "putfile", 1, 3, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER} }, - { ISOBUILDER_PUTDATA, "putdata", 2, 4, {LUA_TABLE, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, - { ISOBUILDER_CREATESECTOR, "createsector", 1, 7, {LUA_TABLE | LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, + { ISOBUILDER_PUTFILE, "putfile", 1, 3, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER } }, + { ISOBUILDER_PUTDATA, "putdata", 2, 4, { BLUA_TABLE, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, + { ISOBUILDER_CREATESECTOR, "createsector", 1, 7, { BLUA_TABLE | BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, { ISOBUILDER_SETEOF, "setEOF", 0, 0, 0 }, { ISOBUILDER_CLEAREOF, "clearEOF", 0, 0, 0 }, - { ISOBUILDER_SETBASICS, "setbasics", 1, 5, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, - { ISOBUILDER_CREATEDIR, "createdir", 2, 5, {LUA_OBJECT, LUA_STRING, LUA_NUMBER, LUA_OBJECT, LUA_NUMBER} }, - { ISOBUILDER_CREATEFILE, "createfile", 3, 5, {LUA_OBJECT, LUA_STRING, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} }, - { ISOBUILDER_COPYDIR, "copydir", 3, 4, {LUA_OBJECT, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} }, - { ISOBUILDER_CLOSE, "close", 0, 3, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER} }, + { ISOBUILDER_SETBASICS, "setbasics", 1, 5, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, + { ISOBUILDER_CREATEDIR, "createdir", 2, 5, { BLUA_OBJECT, BLUA_STRING, BLUA_NUMBER, BLUA_OBJECT, BLUA_NUMBER } }, + { ISOBUILDER_CREATEFILE, "createfile", 3, 5, { BLUA_OBJECT, BLUA_STRING, BLUA_OBJECT, BLUA_OBJECT, BLUA_NUMBER } }, + { ISOBUILDER_COPYDIR, "copydir", 3, 4, { BLUA_OBJECT, BLUA_OBJECT, BLUA_OBJECT, BLUA_NUMBER } }, + { ISOBUILDER_CLOSE, "close", 0, 3, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER } }, { -1, 0, 0, 0, 0 } }; struct lua_functypes_t isobuilder_functions[] = { - { ISOBUILDER_NEWISOBUILDER, "isobuilder", 1, 2, {LUA_OBJECT, LUA_NUMBER} }, - { ISOBUILDER_CREATEPVD_HANDLE, "createpvd_handle", 1, 1, {LUA_OBJECT} }, - { ISOBUILDER_CREATEPVD, "createpvd", 1, 1, {LUA_OBJECT} }, - { ISOBUILDER_CREATEPVD_ARRAY, "createpvd_array", 1, 1, {LUA_TABLE} }, + { ISOBUILDER_NEWISOBUILDER, "isobuilder", 1, 2, { BLUA_OBJECT, BLUA_NUMBER } }, + { ISOBUILDER_CREATEPVD_HANDLE, "createpvd_handle", 1, 1, { BLUA_OBJECT } }, + { ISOBUILDER_CREATEPVD, "createpvd", 1, 1, { BLUA_OBJECT } }, + { ISOBUILDER_CREATEPVD_ARRAY, "createpvd_array", 1, 1, { BLUA_TABLE } }, { -1, 0, 0, 0, 0 } }; diff --git a/lib/luapsx.cpp b/lib/luapsx.cpp index 986bd62..3c1b508 100644 --- a/lib/luapsx.cpp +++ b/lib/luapsx.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: luapsx.cpp,v 1.10 2004-12-17 11:49:27 pixel Exp $ */ +/* $Id: luapsx.cpp,v 1.11 2007-07-27 14:29:23 pixel Exp $ */ #include #include "luapsx.h" @@ -83,9 +83,9 @@ enum psx_functions_t { }; struct lua_functypes_t psx_functions[] = { - { PSX_BSDECODE, "bsdecode", 3, 3, { LUA_OBJECT, LUA_NUMBER, LUA_NUMBER } }, - { PSX_BSENCODE, "bsencode", 3, 5, { LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER } }, - { PSX_BLIT, "blit", 9, 10, { LUA_OBJECT, LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER } }, + { PSX_BSDECODE, "bsdecode", 3, 3, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER } }, + { PSX_BSENCODE, "bsencode", 3, 5, { BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, + { PSX_BLIT, "blit", 9, 10, { BLUA_OBJECT, BLUA_OBJECT, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER, BLUA_NUMBER } }, { -1, 0, 0, 0, 0 } }; -- cgit v1.2.3