1 Star 0 Fork 0

linuxmail/unrar-nonfree

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
log.cpp 814 Bytes
一键复制 编辑 原始数据 按行查看 历史
Norbert Preining 提交于 2018-10-24 17:44 +08:00 . Import Upstream version 5.2.7
#include "rar.hpp"
static wchar LogName[NM];
static RAR_CHARSET LogCharset=RCH_DEFAULT;
void InitLogOptions(const wchar *LogFileName,RAR_CHARSET CSet)
{
wcsncpyz(LogName,LogFileName,ASIZE(LogName));
LogCharset=CSet;
}
#ifndef SILENT
void Log(const wchar *ArcName,const wchar *fmt,...)
{
// Preserve the error code for possible following system error message.
int Code=ErrHandler.GetSystemErrorCode();
uiAlarm(UIALARM_ERROR);
// This buffer is for format string only, not for entire output,
// so it can be short enough.
wchar fmtw[1024];
PrintfPrepareFmt(fmt,fmtw,ASIZE(fmtw));
safebuf wchar Msg[2*NM+1024];
va_list arglist;
va_start(arglist,fmt);
vswprintf(Msg,ASIZE(Msg),fmtw,arglist);
va_end(arglist);
eprintf(L"%ls",Msg);
ErrHandler.SetSystemErrorCode(Code);
}
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/linuxmail/unrar-nonfree.git
git@gitee.com:linuxmail/unrar-nonfree.git
linuxmail
unrar-nonfree
unrar-nonfree
master

搜索帮助