diff options
author | pixel <pixel> | 2004-12-12 23:01:08 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-12-12 23:01:08 +0000 |
commit | c35dc83455456e072b46a7de47ca6ac4d81ae37b (patch) | |
tree | 8e1959e0ddb21d664b53537df0d04e3daf97c631 | |
parent | 343b79939ec69483a478ace5ab402463523f8e83 (diff) |
Fixing ldirlib for compilation
-rw-r--r-- | lib/Exceptions.cc | 4 | ||||
-rw-r--r-- | lib/Main.cc | 5 | ||||
-rw-r--r-- | 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 <string.h> #include <errno.h> @@ -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 <windows.h> @@ -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; } |