X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FErrorReporting.c;h=05487a9d77f23dfa9cdf4bf7fbc1502a6180b24f;hb=ce0bba1a070e5e64939491eb68087f68ef8fe870;hp=8cd7457d5de95fd298037631a61351dc02008a98;hpb=5ba7f2d9a3f07f342afdf215a3307d5487cb6d43;p=rocksndiamonds.git diff --git a/src/game_sp/ErrorReporting.c b/src/game_sp/ErrorReporting.c index 8cd7457d..05487a9d 100644 --- a/src/game_sp/ErrorReporting.c +++ b/src/game_sp/ErrorReporting.c @@ -4,10 +4,13 @@ #include "ErrorReporting.h" + + static char * GetErrLogPath(); static char * GetTraceLogPath(); -static char *VB_Name = "modErrorReporting"; +// static char *VB_Name = "modErrorReporting"; + // --- Option Explicit static char *GetErrLogPath() @@ -29,50 +32,3 @@ static char *GetTraceLogPath() return GetTraceLogPath; } - -void Trace(char *Source, char *Message) -{ - // Dim Path$, FNum%, bIsOpen As Boolean - // Path = GetTraceLogPath() - // FNum = FreeFile - // bIsOpen = False - // On Error GoTo TraceEH - // Open Path For Append Access Write As FNum - // bIsOpen = True - // ' --- Print #FNum, Now & " " & Source & " : " & Message - // On Error GoTo 0 - // TraceEH: - // If bIsOpen Then Close FNum -} - -void ReportError(char *Source, char *Message) -{ - char *Path; - int FNum; - boolean bIsOpen; - - Path = GetErrLogPath(); - // FNum = FreeFile(); - bIsOpen = False; - - // --- On Error GoTo ReportErrorEH - FNum = fopen(Path, "ab"); - bIsOpen = True; - // --- Print #FNum, Now & " SOURCE = " & Source & " ErrMessage = " & Message - // --- On Error GoTo 0 - - -ReportErrorEH: - if (bIsOpen) - fclose(FNum); -} - -void InitErrorReporting() -{ - char *Path; - - Path = GetErrLogPath(); - MayKill(Path); - Path = GetTraceLogPath(); - MayKill(Path); -}