/*--------------------------------------------------------------------------*/ BOOL HistoryManager::reset(void) { char* pstCommentBeginSession = NULL; m_Commands.clear(); m_HF.reset(); m_HF.setDefaultFilename(); m_HS.reset(); m_bAllowConsecutiveCommand = FALSE; m_iSaveLimit = 0; m_iSavedLines = 0; CommandHistoryReset(); /* Add date & time begin session */ pstCommentBeginSession = getCommentDateSession(FALSE); if (pstCommentBeginSession) { appendLine(pstCommentBeginSession); FREE(pstCommentBeginSession); pstCommentBeginSession = NULL; return TRUE; } return FALSE; }
/*--------------------------------------------------------------------------*/ void HistoryManager::reset(void) { char *commentbeginsession = NULL; CommandsList.clear(); my_file.reset(); my_file.setDefaultFilename(); my_search.reset(); saveconsecutiveduplicatelines = FALSE; afterhowmanylineshistoryissaved = 0; numberoflinesbeforehistoryissaved = 0; CommandHistoryReset(); /* Add date & time begin session */ commentbeginsession = getCommentDateSession(FALSE); if (commentbeginsession) { appendLine(commentbeginsession); FREE(commentbeginsession); commentbeginsession = NULL; } }