aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/ULuaLog.pas
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-05-03 23:59:44 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-05-03 23:59:44 +0000
commit045ec753fb97b0ab6d239c06caa0f2285c72afd7 (patch)
tree72620d0b8039f06aa07d7023871e45f083f23b44 /src/lua/ULuaLog.pas
parent330ca90b8af24c1fdc56aab80809d0992c53a181 (diff)
downloadusdx-045ec753fb97b0ab6d239c06caa0f2285c72afd7.tar.gz
usdx-045ec753fb97b0ab6d239c06caa0f2285c72afd7.tar.xz
usdx-045ec753fb97b0ab6d239c06caa0f2285c72afd7.zip
mainly source code formatting
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2982 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/lua/ULuaLog.pas')
-rw-r--r--src/lua/ULuaLog.pas91
1 files changed, 46 insertions, 45 deletions
diff --git a/src/lua/ULuaLog.pas b/src/lua/ULuaLog.pas
index 95efaa19..561a9bae 100644
--- a/src/lua/ULuaLog.pas
+++ b/src/lua/ULuaLog.pas
@@ -57,111 +57,112 @@ function ULuaLog_SetLogLevel(L: Plua_State): Integer; cdecl;
const
ULuaLog_Lib_f: array [0..13] of lual_reg = (
- (name:'LogError';func:ULuaLog_LogError),
- (name:'LogMsg';func:ULuaLog_LogMsg),
- (name:'BenchmarkStart';func:ULuaLog_BenchmarkStart),
- (name:'BenchmarkEnd';func:ULuaLog_BenchmarkEnd),
- (name:'LogBenchmark';func:ULuaLog_LogBenchmark),
- (name:'LogDebug';func:ULuaLog_LogDebug),
- (name:'LogInfo';func:ULuaLog_LogInfo),
- (name:'LogStatus';func:ULuaLog_LogStatus),
- (name:'LogWarn';func:ULuaLog_LogWarn),
- (name:'LogCritical';func:ULuaLog_LogCritical),
- (name:'CriticalError';func:ULuaLog_CriticalError),
- (name:'SetLogLevel';func:ULuaLog_GetLogLevel),
- (name:'GetLogLevel';func:ULuaLog_SetLogLevel),
- (name:nil;func:nil)
- );
+ (name:'LogError';func:ULuaLog_LogError),
+ (name:'LogMsg';func:ULuaLog_LogMsg),
+ (name:'BenchmarkStart';func:ULuaLog_BenchmarkStart),
+ (name:'BenchmarkEnd';func:ULuaLog_BenchmarkEnd),
+ (name:'LogBenchmark';func:ULuaLog_LogBenchmark),
+ (name:'LogDebug';func:ULuaLog_LogDebug),
+ (name:'LogInfo';func:ULuaLog_LogInfo),
+ (name:'LogStatus';func:ULuaLog_LogStatus),
+ (name:'LogWarn';func:ULuaLog_LogWarn),
+ (name:'LogCritical';func:ULuaLog_LogCritical),
+ (name:'CriticalError';func:ULuaLog_CriticalError),
+ (name:'SetLogLevel';func:ULuaLog_GetLogLevel),
+ (name:'GetLogLevel';func:ULuaLog_SetLogLevel),
+ (name:nil;func:nil)
+ );
implementation
function ULuaLog_LogError(L: Plua_State): Integer; cdecl;
begin
if (lua_gettop(L) > 1) then
- Log.LogError(luaL_checkstring(L,-2),luaL_checkstring(L,-1))
+ Log.LogError(luaL_checkstring(L, -2), luaL_checkstring(L, -1))
else
- Log.LogError(luaL_checkstring(L,-1));
- result:=0; // number of results
+ Log.LogError(luaL_checkstring(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_LogMsg(L: Plua_State): Integer; cdecl;
begin
if (lua_gettop(L) > 2) then
- Log.LogMsg(luaL_checkstring(L,-3),luaL_checkstring(L,-1),luaL_checkinteger(L,-2))
+ Log.LogMsg(luaL_checkstring(L, -3), luaL_checkstring(L, -1), luaL_checkinteger(L, -2))
else
- Log.LogMsg(luaL_checkstring(L,-2),luaL_checkinteger(L,-1));
- result:=0; // number of results
+ Log.LogMsg(luaL_checkstring(L, -2), luaL_checkinteger(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_BenchmarkStart(L: Plua_State): Integer; cdecl;
begin
- Log.BenchmarkStart(luaL_checkinteger(L,-1));
- result:=0; // number of results
+ Log.BenchmarkStart(luaL_checkinteger(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_BenchmarkEnd(L: Plua_State): Integer; cdecl;
begin
- Log.BenchmarkEnd(luaL_checkinteger(L,-1));
- result:=0; // number of results
+ Log.BenchmarkEnd(luaL_checkinteger(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_LogBenchmark(L: Plua_State): Integer; cdecl;
begin
- Log.LogBenchmark(luaL_checkstring(L,-2),luaL_checkinteger(L,-1));
- result:=0; // number of results
+ Log.LogBenchmark(luaL_checkstring(L, -2), luaL_checkinteger(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_LogDebug(L: Plua_State): Integer; cdecl;
begin
- Log.LogDebug(luaL_checkstring(L,-2),luaL_checkstring(L,-1));
- result:=0; // number of results
+ Log.LogDebug(luaL_checkstring(L, -2), luaL_checkstring(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_LogInfo(L: Plua_State): Integer; cdecl;
begin
- Log.LogInfo(luaL_checkstring(L,-2),luaL_checkstring(L,-1));
- result:=0; // number of results
+ Log.LogInfo(luaL_checkstring(L, -2), luaL_checkstring(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_LogStatus(L: Plua_State): Integer; cdecl;
begin
- Log.LogStatus(luaL_checkstring(L,-2),luaL_checkstring(L,-1));
- result:=0; // number of results
+ Log.LogStatus(luaL_checkstring(L, -2), luaL_checkstring(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_LogWarn(L: Plua_State): Integer; cdecl;
begin
- Log.LogWarn(luaL_checkstring(L,-2),luaL_checkstring(L,-1));
- result:=0; // number of results
+ Log.LogWarn(luaL_checkstring(L, -2), luaL_checkstring(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_LogCritical(L: Plua_State): Integer; cdecl;
begin
- Log.LogCritical(luaL_checkstring(L,-2),luaL_checkstring(L,-1));
- result:=0; // number of results
+ Log.LogCritical(luaL_checkstring(L, -2), luaL_checkstring(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_CriticalError(L: Plua_State): Integer; cdecl;
begin
- Log.CriticalError(luaL_checkstring(L,-1));
- result:=0; // number of results
+ Log.CriticalError(luaL_checkstring(L, -1));
+ result := 0; // number of results
end;
function ULuaLog_GetLogLevel(L: Plua_State): Integer; cdecl;
begin
- lua_pushinteger(L,Log.GetLogLevel());
- result:=1; // number of results
+ lua_pushinteger(L, Log.GetLogLevel());
+ result := 1; // number of results
end;
function ULuaLog_SetLogLevel(L: Plua_State): Integer; cdecl;
begin
- Log.SetLogLevel(luaL_checkinteger(L,-1));
- result:=0; // number of results
+ Log.SetLogLevel(luaL_checkinteger(L, -1));
+ result := 0; // number of results
end;
function luaopen_Log (L: Plua_State): Integer; cdecl;
begin
- luaL_register(L,'Log',@ULuaLog_Lib_f[0]);
- result:=1;
+ luaL_register(L, 'Log', @ULuaLog_Lib_f[0]);
+ result := 1;
end;
+
end.