From c35dc83455456e072b46a7de47ca6ac4d81ae37b Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 12 Dec 2004 23:01:08 +0000 Subject: Fixing ldirlib for compilation --- lib/Exceptions.cc | 4 ++-- lib/Main.cc | 5 ++++- lib/lua/src/LuaLib/ldirlib.c | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index 2633902..39869db 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Exceptions.cc,v 1.35 2004-11-27 21:46:04 pixel Exp $ */ +/* $Id: Exceptions.cc,v 1.36 2004-12-12 23:01:08 pixel Exp $ */ #include #include @@ -129,7 +129,7 @@ void * xmalloc(size_t s) throw (GeneralException) { } if (!(r = (char *) ::malloc(s))) { - throw MemoryException(s); + throw MemoryException(s); } #ifdef DEBUG // Base::printm(M_BARE, String(_("Allocating %i bytes of memory, got it at %p\n")), s, r); diff --git a/lib/Main.cc b/lib/Main.cc index b690532..d5048ba 100644 --- a/lib/Main.cc +++ b/lib/Main.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Main.cc,v 1.12 2004-11-27 21:46:04 pixel Exp $ */ +/* $Id: Main.cc,v 1.13 2004-12-12 23:01:08 pixel Exp $ */ #ifdef _WIN32 #include @@ -67,9 +67,12 @@ int Main::truemain(Main * Application, int argc, char ** argv, char ** enve) { Base::printm(M_ERROR, _("The application caused an exception: %s\n"), e.GetMsg()); return -1; } +#define LET_EXCEPTIONS_GO +#ifndef LET_EXCEPTIONS_GO catch (...) { Base::printm(M_ERROR, _("The application caused an unknow exception\n")); return -1; } +#endif return r; } diff --git a/lib/lua/src/LuaLib/ldirlib.c b/lib/lua/src/LuaLib/ldirlib.c index 8997eb6..d12f1ab 100644 --- a/lib/lua/src/LuaLib/ldirlib.c +++ b/lib/lua/src/LuaLib/ldirlib.c @@ -104,5 +104,7 @@ int luaopen_dir (lua_State *L) { lua_pushnumber(L, 2); lua_setglobal(L, "FLAG_FILE"); + lua_pop(L, 1); + return 0; } -- cgit v1.2.3