MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / Log

Function Log

Libraries/unrar/log.cpp:15–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14#ifndef SILENT
15void Log(const wchar *ArcName,const wchar *fmt,...)
16{
17 // Preserve the error code for possible following system error message.
18 int Code=ErrHandler.GetSystemErrorCode();
19
20 uiAlarm(UIALARM_ERROR);
21
22 // This buffer is for format string only, not for entire output,
23 // so it can be short enough.
24 wchar fmtw[1024];
25 PrintfPrepareFmt(fmt,fmtw,ASIZE(fmtw));
26
27 safebuf wchar Msg[2*NM+1024];
28 va_list arglist;
29 va_start(arglist,fmt);
30 vswprintf(Msg,ASIZE(Msg),fmtw,arglist);
31 va_end(arglist);
32 eprintf(L"%ls",Msg);
33 ErrHandler.SetSystemErrorCode(Code);
34}
35#endif
36
37

Callers 3

MsgMethod · 0.70
uiAskRepeatReadFunction · 0.70
uiAskRepeatWriteFunction · 0.70

Calls 5

PrintfPrepareFmtFunction · 0.85
GetSystemErrorCodeMethod · 0.80
SetSystemErrorCodeMethod · 0.80
uiAlarmFunction · 0.70
eprintfFunction · 0.70

Tested by

no test coverage detected