本文整理汇总了C++中LogEntry::GetMessageRoom方法的典型用法代码示例。如果您正苦于以下问题:C++ LogEntry::GetMessageRoom方法的具体用法?C++ LogEntry::GetMessageRoom怎么用?C++ LogEntry::GetMessageRoom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LogEntry
的用法示例。
在下文中一共展示了LogEntry::GetMessageRoom方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resizelogfile
void resizelogfile(void)
{
#ifdef WINCIT
LogEntry *CurrentUser = new LogEntry(cfg.maxrooms, cfg.maxgroups, cfg.maxjumpback);
l_slot *LogOrder = new l_slot[cfg.MAXLOGTAB];
if (!LogOrder || !CurrentUser)
{
illegal("no memory");
}
for (l_slot slot = 0; slot < cfg.MAXLOGTAB; slot++)
{
LogOrder[slot] = slot;
}
LogTab.Sort(&LogOrder);
#endif
chdir(cfg.homepath);
// get rid of any log?.tmp files
unlink(getcfgmsg(156));
unlink(getcfgmsg(157));
unlink(getcfgmsg(158));
unlink(getcfgmsg(159));
unlink(getcfgmsg(160));
unlink(getcfgmsg(161));
// and the LE*.TMP files
changedir(cfg.logextdir);
ambigUnlink(getcfgmsg(215));
changedir(cfg.homepath);
// create new log?.tmp files with new size
l_slot i = cfg.MAXLOGTAB;
cfg.MAXLOGTAB = newmaxlogtab;
zapLogFile(TRUE, TRUE);
cfg.MAXLOGTAB = i;
for (i = 0; (i < cfg.MAXLOGTAB) && (i < newmaxlogtab); i++)
{
msgDisp(getcfgmsg(183), ltoac(LTab(i).GetLogIndex()));
#ifndef WINCIT
cPrintf(getcfgmsg(282), br);
#endif
// Load from old files (the .DAT ones)
CurrentUser->LogEntry1::ResetFileName();
CurrentUser->LogEntry2::ResetFileName();
CurrentUser->LogEntry3::ResetFileName();
CurrentUser->LogEntry4::ResetFileName();
CurrentUser->LogEntry5::ResetFileName();
CurrentUser->LogEntry6::ResetFileName();
CurrentUser->LogExtensions::ResetFileExtension();
if (!CurrentUser->Load(LTab(i).GetLogIndex()))
{
crashout(getcfgmsg(281), getcfgmsg(155));
}
// And save to the new files (the .TMP ones)
CurrentUser->LogEntry1::SetFileName(getcfgmsg(156));
CurrentUser->LogEntry2::SetFileName(getcfgmsg(157));
CurrentUser->LogEntry3::SetFileName(getcfgmsg(158));
CurrentUser->LogEntry4::SetFileName(getcfgmsg(159));
CurrentUser->LogEntry5::SetFileName(getcfgmsg(160));
CurrentUser->LogEntry6::SetFileName(getcfgmsg(161));
CurrentUser->LogExtensions::SetFileExtension(getcfgmsg(230));
if (!CurrentUser->Save(i, CurrentUser->GetMessageRoom()))
{
crashout(getcfgmsg(283), getcfgmsg(155));
}
}
doccr();
doccr();
// Back to using the .DAT files
CurrentUser->LogEntry1::ResetFileName();
CurrentUser->LogEntry2::ResetFileName();
CurrentUser->LogEntry3::ResetFileName();
CurrentUser->LogEntry4::ResetFileName();
CurrentUser->LogEntry5::ResetFileName();
CurrentUser->LogEntry6::ResetFileName();
CurrentUser->LogExtensions::ResetFileExtension();
// clear RAM buffer out
CurrentUser->Clear();
// Then clean up - .TMP to .DAT
unlink(logDat);
unlink(log2Dat);
unlink(log3Dat);
unlink(log4Dat);
unlink(log5Dat);
unlink(log6Dat);
rename(getcfgmsg(156), logDat);
//.........这里部分代码省略.........