X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fengine%2Fe_log.pas;h=629eed68cb8845a11bd954b4eb2d9002828ce7f4;hb=315aac20797d3060960df924fad4b7c98f970b34;hp=e717595c64d6ba710778c7951bce2ca3e1883690;hpb=987c4a835a103345b59937e8e1be8524a6228712;p=d2df-sdl.git diff --git a/src/engine/e_log.pas b/src/engine/e_log.pas index e717595..629eed6 100644 --- a/src/engine/e_log.pas +++ b/src/engine/e_log.pas @@ -19,13 +19,14 @@ unit e_log; interface -uses - SysUtils; + uses SysUtils; -type - TWriteMode = (WM_NEWFILE, WM_OLDFILE); - TMsgType = (Fatal, Warning, Notify); + type + TWriteMode = (WM_NEWFILE, WM_OLDFILE); + TMsgType = (Fatal, Warning, Notify); + procedure e_Log_Initialize; + procedure e_Log_Finalize; procedure e_InitLog (fFileName: String; fWriteMode: TWriteMode); procedure e_DeinitLog (); @@ -42,14 +43,8 @@ procedure e_InitWritelnDriver (); procedure e_LogWritefln (const fmt: AnsiString; args: array of const; category: TMsgType=TMsgType.Notify; writeTime: Boolean=true; writeConsole: Boolean=true); procedure e_LogWriteln (const s: AnsiString; category: TMsgType=TMsgType.Notify; writeTime: Boolean=true); - procedure e_WriteStackTrace (const msg: AnsiString); - -var - e_WriteToStdOut: Boolean = False; - - implementation uses @@ -64,9 +59,23 @@ var driverInited: Boolean = false; + procedure e_Log_Initialize; + begin + end; + + procedure e_Log_Finalize; + begin + e_DeinitLog + end; + + function DecodeIPV4 (ip: LongWord): string; begin +{$IFDEF FPC_LITTLE_ENDIAN} Result := Format('%d.%d.%d.%d', [ip and $FF, (ip shr 8) and $FF, (ip shr 16) and $FF, (ip shr 24)]); +{$ELSE} + Result := Format('%d.%d.%d.%d', [(ip shr 24), (ip shr 16) and $FF, (ip shr 8) and $FF, ip and $FF]); +{$ENDIF} end;