From 1ad461c0bb7d687fb604d40456a0aea336c9e6bd Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 14 Mar 2011 09:48:07 +0000 Subject: Add missing newlines in debug output. --- client/lua.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/client/lua.cc b/client/lua.cc index 320d91a..8c4fa55 100644 --- a/client/lua.cc +++ b/client/lua.cc @@ -63,11 +63,11 @@ static int get_widget(lua_State *L) if(widget) { wdg_make_widget(L, widget); - DEBUG(lua, "get_widget found widget %s", + DEBUG(lua, "get_widget found widget %s\n", name.toStdString().c_str()); } else { lua_pushnil(L); - WARN(lua, "get_widget could not find widget %s", + WARN(lua, "get_widget could not find widget %s\n", name.toStdString().c_str()); } @@ -85,7 +85,7 @@ static int debug(lua_State *L) return 1; } - DEBUG(lua, "%s", lua_tostring(L, lua_gettop(L))); + DEBUG(lua, "%s\n", lua_tostring(L, lua_gettop(L))); return 0; } @@ -217,7 +217,7 @@ void LUA::clear() L = luaL_newstate(); if(L == NULL) { - ERROR(lua, "Could not create LUA state."); + ERROR(lua, "Could not create LUA state.\n"); return; } @@ -240,7 +240,7 @@ void LUA::clear() QString LUA::runScriptS(QString script, Widget *widget, QString name) { if(L == NULL) { - ERROR(lua, "LUA state not initialized!"); + ERROR(lua, "LUA state not initialized!\n"); return ""; } @@ -260,13 +260,13 @@ QString LUA::runScriptS(QString script, Widget *widget, QString name) script.toStdString().c_str(), script.size(), name.toStdString().c_str())) { - ERROR(lua, "%s", lua_tostring(L, lua_gettop(L))); + ERROR(lua, "%s\n", lua_tostring(L, lua_gettop(L))); return ""; } // Run the loaded code if(lua_pcall(L, 0, LUA_MULTRET, 0)) { - ERROR(lua, "%s", lua_tostring(L, lua_gettop(L))); + ERROR(lua, "%s\n", lua_tostring(L, lua_gettop(L))); return ""; } @@ -289,7 +289,7 @@ QString LUA::runScriptS(QString script, Widget *widget, QString name) bool LUA::runScript(QString script, Widget *widget, QString name) { if(L == NULL) { - ERROR(lua, "LUA state not initialized!"); + ERROR(lua, "LUA state not initialized!\n"); return false; } @@ -307,13 +307,13 @@ bool LUA::runScript(QString script, Widget *widget, QString name) script.toStdString().c_str(), script.size(), name.toStdString().c_str())) { - ERROR(lua, "%s", lua_tostring(L, lua_gettop(L))); + ERROR(lua, "%s\n", lua_tostring(L, lua_gettop(L))); return false; } // Run the loaded code if(lua_pcall(L, 0, LUA_MULTRET, 0)) { - ERROR(lua, "%s", lua_tostring(L, lua_gettop(L))); + ERROR(lua, "%s\n", lua_tostring(L, lua_gettop(L))); return false; } @@ -324,7 +324,7 @@ Widget *LUA::getWidget(QString name) { if(*rootwidget) return (*rootwidget)->findWidget(name, true); else { - WARN(lua, "Could not find widget '%s'", name.toStdString().c_str()); + WARN(lua, "Could not find widget '%s'\n", name.toStdString().c_str()); return NULL; } } -- cgit v1.2.3