Revision: 5795
http://winmerge.svn.sourceforge.net/winmerge/?rev=5795&view=rev
Author: marcelgosselin
Date: 2008-08-13 04:12:20 +0000 (Wed, 13 Aug 2008)
Log Message:
-----------
Use bool/true/false instead of BOOL/TRUE/FALSE in some classes.
Modified Paths:
--------------
trunk/Src/DiffList.cpp
trunk/Src/DiffList.h
trunk/Src/DiffWrapper.cpp
trunk/Src/DiffWrapper.h
trunk/Src/LocationView.cpp
trunk/Src/LocationView.h
trunk/Src/MergeDoc.cpp
trunk/Src/MergeDoc.h
trunk/Src/MergeEditView.cpp
trunk/Src/MergeEditView.h
Modified: trunk/Src/DiffList.cpp
===================================================================
--- trunk/Src/DiffList.cpp 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/DiffList.cpp 2008-08-13 04:12:20 UTC (rev 5795)
@@ -115,13 +115,13 @@
* @param [in] nDiff Index of DIFFRANGE to check.
* @return TRUE if diff is significant, FALSE if not.
*/
-BOOL DiffList::IsDiffSignificant(int nDiff) const
+bool DiffList::IsDiffSignificant(int nDiff) const
{
const DIFFRANGE * dfi = DiffRangeAt(nDiff);
if (dfi->op != OP_TRIVIAL)
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
/**
@@ -130,17 +130,17 @@
* @param [out] di DIFFRANGE returned (empty if error)
* @return TRUE if DIFFRANGE found from given index.
*/
-BOOL DiffList::GetDiff(int nDiff, DIFFRANGE & di) const
+bool DiffList::GetDiff(int nDiff, DIFFRANGE & di) const
{
const DIFFRANGE * dfi = DiffRangeAt(nDiff);
if (!dfi)
{
DIFFRANGE empty;
di = empty;
- return FALSE;
+ return false;
}
di = *dfi;
- return TRUE;
+ return true;
}
/**
@@ -168,15 +168,15 @@
* @param [in] di Diff to put in list.
* @return TRUE if index was valid and diff put to list.
*/
-BOOL DiffList::SetDiff(int nDiff, const DIFFRANGE & di)
+bool DiffList::SetDiff(int nDiff, const DIFFRANGE & di)
{
if (nDiff < m_diffs.size())
{
m_diffs[nDiff] = di;
- return TRUE;
+ return true;
}
else
- return FALSE;
+ return false;
}
/**
@@ -203,13 +203,13 @@
* @param [in] nDiff Index to diff table
* @return TRUE if line is inside given difference.
*/
-BOOL DiffList::LineInDiff(UINT nLine, UINT nDiff) const
+bool DiffList::LineInDiff(UINT nLine, UINT nDiff) const
{
const DIFFRANGE * dfi = DiffRangeAt(nDiff);
if (nLine >= dfi->dbegin0 && nLine <= dfi->dend0)
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
/**
@@ -264,15 +264,15 @@
* @param [out] nDiff Index of diff found.
* @return TRUE if line is inside diff, FALSE otherwise.
*/
-BOOL DiffList::GetPrevDiff(int nLine, int & nDiff) const
+bool DiffList::GetPrevDiff(int nLine, int & nDiff) const
{
- BOOL bInDiff = TRUE;
+ bool bInDiff = true;
int numDiff = LineToDiff(nLine);
// Line not inside diff
if (nDiff == -1)
{
- bInDiff = FALSE;
+ bInDiff = false;
for (int i = (int) m_diffs.size() - 1; i >= 0 ; i--)
{
if ((int)DiffRangeAt(i)->dend0 <= nLine)
@@ -295,15 +295,15 @@
* @param [out] nDiff Index of diff found.
* @return TRUE if line is inside diff, FALSE otherwise.
*/
-BOOL DiffList::GetNextDiff(int nLine, int & nDiff) const
+bool DiffList::GetNextDiff(int nLine, int & nDiff) const
{
- BOOL bInDiff = TRUE;
+ bool bInDiff = true;
int numDiff = LineToDiff(nLine);
// Line not inside diff
if (numDiff == -1)
{
- bInDiff = FALSE;
+ bInDiff = false;
const int nDiffCount = m_diffs.size();
for (int i = 0; i < nDiffCount; i++)
{
@@ -322,11 +322,11 @@
* @brief Check if diff-list contains significant diffs.
* @return TRUE if list has significant diffs, FALSE otherwise.
*/
-BOOL DiffList::HasSignificantDiffs() const
+bool DiffList::HasSignificantDiffs() const
{
if (m_firstSignificant == -1)
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
/**
Modified: trunk/Src/DiffList.h
===================================================================
--- trunk/Src/DiffList.h 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/DiffList.h 2008-08-13 04:12:20 UTC (rev 5795)
@@ -136,15 +136,15 @@
int GetSize() const;
int GetSignificantDiffs() const;
void AddDiff(const DIFFRANGE & di);
- BOOL IsDiffSignificant(int nDiff) const;
- BOOL GetDiff(int nDiff, DIFFRANGE & di) const;
- BOOL SetDiff(int nDiff, const DIFFRANGE & di);
+ bool IsDiffSignificant(int nDiff) const;
+ bool GetDiff(int nDiff, DIFFRANGE & di) const;
+ bool SetDiff(int nDiff, const DIFFRANGE & di);
int LineRelDiff(UINT nLine, UINT nDiff) const;
- BOOL LineInDiff(UINT nLine, UINT nDiff) const;
+ bool LineInDiff(UINT nLine, UINT nDiff) const;
int LineToDiff(UINT nLine) const;
- BOOL GetPrevDiff(int nLine, int & nDiff) const;
- BOOL GetNextDiff(int nLine, int & nDiff) const;
- BOOL HasSignificantDiffs() const;
+ bool GetPrevDiff(int nLine, int & nDiff) const;
+ bool GetNextDiff(int nLine, int & nDiff) const;
+ bool HasSignificantDiffs() const;
int PrevSignificantDiffFromLine(UINT nLine) const;
int NextSignificantDiffFromLine(UINT nLine) const;
int FirstSignificantDiff() const;
Modified: trunk/Src/DiffWrapper.cpp
===================================================================
--- trunk/Src/DiffWrapper.cpp 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/DiffWrapper.cpp 2008-08-13 04:12:20 UTC (rev 5795)
@@ -24,18 +24,18 @@
// ID line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <string>
#include <map>
#include <shlwapi.h>
#include "Ucs2Utf8.h"
#include "coretools.h"
-#include "diffcontext.h"
+#include "DiffContext.h"
#include "DiffList.h"
#include "MovedLines.h"
#include "FilterList.h"
-#include "diffwrapper.h"
-#include "diff.h"
+#include "DiffWrapper.h"
+#include "DIFF.H"
#include "FileTransform.h"
#include "LogFile.h"
#include "paths.h"
@@ -242,7 +242,7 @@
* @brief Enables/disables moved block detection.
* @param [in] bDetectMovedBlocks If TRUE moved blocks are detected.
*/
-void CDiffWrapper::SetDetectMovedBlocks(BOOL bDetectMovedBlocks)
+void CDiffWrapper::SetDetectMovedBlocks(bool bDetectMovedBlocks)
{
if (bDetectMovedBlocks)
{
Modified: trunk/Src/DiffWrapper.h
===================================================================
--- trunk/Src/DiffWrapper.h 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/DiffWrapper.h 2008-08-13 04:12:20 UTC (rev 5795)
@@ -155,8 +155,8 @@
void SetPrediffer(PrediffingInfo * prediffer =NULL);
void GetPrediffer(PrediffingInfo * prediffer);
void SetPatchOptions(const PATCHOPTIONS *options);
- void SetDetectMovedBlocks(BOOL bDetectMovedBlocks);
- BOOL GetDetectMovedBlocks() { return (m_pMovedLines != NULL); }
+ void SetDetectMovedBlocks(bool bDetectMovedBlocks);
+ bool GetDetectMovedBlocks() { return (m_pMovedLines != NULL); }
BOOL SetAppendFiles(BOOL bAppendFiles);
void SetPaths(const String &filepath1, const String &filepath2, BOOL tempPaths);
void SetAlternativePaths(const String &altPath1, const String &altPath2);
Modified: trunk/Src/LocationView.cpp
===================================================================
--- trunk/Src/LocationView.cpp 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/LocationView.cpp 2008-08-13 04:12:20 UTC (rev 5795)
@@ -475,7 +475,7 @@
{
SetCapture();
- if (!GotoLocation(point, FALSE))
+ if (!GotoLocation(point, false))
CView::OnLButtonDown(nFlags, point);
}
@@ -535,7 +535,7 @@
*/
void CLocationView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
- if (!GotoLocation(point, FALSE))
+ if (!GotoLocation(point, false))
CView::OnLButtonDblClk(nFlags, point);
}
@@ -553,7 +553,7 @@
* FALSE if view linenumbers are OK.
* @return TRUE if succeeds, FALSE if point not inside bars.
*/
-BOOL CLocationView::GotoLocation(const CPoint& point, BOOL bRealLine)
+bool CLocationView::GotoLocation(const CPoint& point, bool bRealLine)
{
CRect rc;
GetClientRect(rc);
@@ -572,13 +572,13 @@
line = GetLineFromYPos(point.y, bar, FALSE);
}
else
- return FALSE;
+ return false;
m_view[MERGE_VIEW_LEFT]->GotoLine(line, bRealLine, bar);
if (bar == BAR_LEFT || bar == BAR_RIGHT)
m_view[bar]->SetFocus();
- return TRUE;
+ return true;
}
/**
@@ -674,7 +674,7 @@
switch (command)
{
case ID_LOCBAR_GOTODIFF:
- m_view[MERGE_VIEW_LEFT]->GotoLine(nLine, TRUE, bar);
+ m_view[MERGE_VIEW_LEFT]->GotoLine(nLine, true, bar);
if (bar == BAR_LEFT || bar == BAR_RIGHT)
m_view[bar]->SetFocus();
break;
Modified: trunk/Src/LocationView.h
===================================================================
--- trunk/Src/LocationView.h 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/LocationView.h 2008-08-13 04:12:20 UTC (rev 5795)
@@ -84,7 +84,7 @@
protected:
CMergeDoc* GetDocument();
void DrawRect(CDC* pDC, const CRect& r, COLORREF cr, BOOL bSelected = FALSE);
- BOOL GotoLocation(const CPoint& point, BOOL bRealLine = TRUE);
+ bool GotoLocation(const CPoint& point, bool bRealLine = true);
int GetLineFromYPos(int nYCoord, int bar, BOOL bRealLine = TRUE);
int IsInsideBar(const CRect& rc, const POINT& pt);
void DrawVisibleAreaRect(CDC* pDC, int nTopLine = -1, int nBottomLine = -1);
Modified: trunk/Src/MergeDoc.cpp
===================================================================
--- trunk/Src/MergeDoc.cpp 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/MergeDoc.cpp 2008-08-13 04:12:20 UTC (rev 5795)
@@ -113,7 +113,7 @@
* @brief Constructor.
*/
CMergeDoc::CMergeDoc()
-: m_bEnableRescan(TRUE)
+: m_bEnableRescan(true)
, m_nCurDiff(-1)
, m_pDirDoc(NULL)
, m_bMixedEol(false)
@@ -130,8 +130,8 @@
m_nBufferType[0] = BUFFER_NORMAL;
m_nBufferType[1] = BUFFER_NORMAL;
m_bMergingMode = GetOptionsMgr()->GetBool(OPT_MERGE_MODE);
- m_bEditAfterRescan[0] = FALSE;
- m_bEditAfterRescan[1] = FALSE;
+ m_bEditAfterRescan[0] = false;
+ m_bEditAfterRescan[1] = false;
m_ptBuf[0] = new CDiffTextBuffer(this, 0);
m_ptBuf[1] = new CDiffTextBuffer(this, 1);
m_pSaveFileInfo[0] = new DiffFileInfo();
@@ -384,8 +384,8 @@
DiffFileInfo fileInfo;
BOOL diffSuccess;
int nResult = RESCAN_OK;
- BOOL bLeftFileChanged = FALSE;
- BOOL bRightFileChanged = FALSE;
+ bool bLeftFileChanged = false;
+ bool bRightFileChanged = false;
if (!bForced)
{
@@ -404,9 +404,9 @@
}
bLeftFileChanged = IsFileChangedOnDisk(m_filePaths.GetLeft().c_str(), fileInfo,
- FALSE, 0);
+ false, 0);
bRightFileChanged = IsFileChangedOnDisk(m_filePaths.GetRight().c_str(), fileInfo,
- FALSE, 1);
+ false, 1);
m_LastRescan = COleDateTime::GetCurrentTime();
String temp1 = m_tempFiles[0].GetPath();
@@ -530,8 +530,8 @@
m_pDetailView[0]->ReAttachToBuffer();
m_pDetailView[1]->ReAttachToBuffer();
- m_bEditAfterRescan[0] = FALSE;
- m_bEditAfterRescan[1] = FALSE;
+ m_bEditAfterRescan[0] = false;
+ m_bEditAfterRescan[1] = false;
}
GetParentFrame()->SetLastCompareResult(m_diffList.GetSignificantDiffs());
@@ -658,9 +658,9 @@
}
}
-BOOL CMergeDoc::Undo()
+bool CMergeDoc::Undo()
{
- return FALSE;
+ return false;
}
/**
@@ -672,15 +672,15 @@
public:
RescanSuppress(CMergeDoc & doc) : m_doc(doc)
{
- m_bSuppress = TRUE;
+ m_bSuppress = true;
m_bPrev = doc.m_bEnableRescan;
- doc.m_bEnableRescan = FALSE;
+ m_doc.m_bEnableRescan = false;
}
void Clear()
{
if (m_bSuppress)
{
- m_bSuppress = FALSE;
+ m_bSuppress = false;
m_doc.m_bEnableRescan = m_bPrev;
}
}
@@ -690,8 +690,8 @@
}
private:
CMergeDoc & m_doc;
- BOOL m_bPrev;
- BOOL m_bSuppress;
+ bool m_bPrev;
+ bool m_bSuppress;
};
/**
@@ -766,19 +766,19 @@
* @param [in] dr Difference to check.
* @return TRUE if difference lines match, FALSE otherwise.
*/
-BOOL CMergeDoc::SanityCheckDiff(DIFFRANGE dr)
+bool CMergeDoc::SanityCheckDiff(DIFFRANGE dr)
{
int cd_dbegin = dr.dbegin0;
int cd_dend = dr.dend0;
// Must ensure line number is in range before getting line flags
if (cd_dend >= m_ptBuf[0]->GetLineCount())
- return FALSE;
+ return false;
DWORD dwLeftFlags = m_ptBuf[0]->GetLineFlags(cd_dend);
// Must ensure line number is in range before getting line flags
if (cd_dend >= m_ptBuf[1]->GetLineCount())
- return FALSE;
+ return false;
DWORD dwRightFlags = m_ptBuf[1]->GetLineFlags(cd_dend);
// Optimization - check last line first so we don't need to
@@ -786,7 +786,7 @@
if (!(dwLeftFlags & LF_WINMERGE_FLAGS) ||
!(dwRightFlags & LF_WINMERGE_FLAGS))
{
- return FALSE;
+ return false;
}
for (int line = cd_dbegin; line < cd_dend; line++)
@@ -796,10 +796,10 @@
if (!(dwLeftFlags & LF_WINMERGE_FLAGS) ||
!(dwRightFlags & LF_WINMERGE_FLAGS))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
/**
@@ -852,9 +852,9 @@
int cd_dbegin = srcPane == 0 ? cd.dbegin0 : cd.dbegin1;
int cd_dend = srcPane == 0 ? cd.dend0 : cd.dend1;
int cd_blank = srcPane == 0 ? cd.blank0 : cd.blank1;
- BOOL bInSync = SanityCheckDiff(cd);
+ bool bInSync = SanityCheckDiff(cd);
- if (bInSync == FALSE)
+ if (!bInSync)
{
LangMessageBox(IDS_VIEWS_OUTOFSYNC, MB_ICONSTOP);
return false; // abort copying
@@ -950,13 +950,13 @@
* @sa CMergeDoc::DoSaveAs()
* @sa CMergeDoc::CDiffTextBuffer::SaveToFile()
*/
-BOOL CMergeDoc::TrySaveAs(CString &strPath, int &nSaveResult, String & sError,
+bool CMergeDoc::TrySaveAs(CString &strPath, int &nSaveResult, String & sError,
int nBuffer, PackingInfo * pInfoTempUnpacker)
{
CString s;
CString strSavePath; // New path for next saving try
UINT titleid = 0;
- BOOL result = TRUE;
+ bool result = true;
int answer = IDOK; // Set default we use for scratchpads
int nActiveViewIndexType = GetActiveMergeViewIndexType();
@@ -1021,7 +1021,7 @@
UpdateHeaderPath(nBuffer);
}
else
- result = FALSE;
+ result = false;
}
else
nSaveResult = SAVE_CANCELLED;
@@ -1055,15 +1055,15 @@
* @sa CMainFrame::CheckSavePath()
* @sa CMergeDoc::CDiffTextBuffer::SaveToFile()
*/
-BOOL CMergeDoc::DoSave(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer)
+bool CMergeDoc::DoSave(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer)
{
DiffFileInfo fileInfo;
CString strSavePath(szPath);
- BOOL bFileChanged = FALSE;
+ bool bFileChanged = false;
BOOL bApplyToAll = FALSE;
int nRetVal = -1;
- bFileChanged = IsFileChangedOnDisk(szPath, fileInfo, TRUE, nBuffer);
+ bFileChanged = IsFileChangedOnDisk(szPath, fileInfo, true, nBuffer);
if (bFileChanged)
{
CString msg;
@@ -1071,7 +1071,7 @@
if (AfxMessageBox(msg, MB_ICONWARNING | MB_YESNO) == IDNO)
{
bSaveSuccess = SAVE_CANCELLED;
- return TRUE;
+ return true;
}
}
@@ -1101,14 +1101,14 @@
nRetVal = GetMainFrame()->HandleReadonlySave(strSavePath, FALSE, bApplyToAll);
if (nRetVal == IDCANCEL)
- return FALSE;
+ return false;
if (!GetMainFrame()->CreateBackup(FALSE, strSavePath))
- return FALSE;
+ return false;
// FALSE as long as the user is not satisfied
// TRUE if saving succeeds, even with another filename, or if the user cancels
- BOOL result = FALSE;
+ bool result = false;
// the error code from the latest save operation,
// or SAVE_DONE when the save succeeds
// TODO: Shall we return this code in addition to bSaveSuccess ?
@@ -1154,12 +1154,12 @@
m_filePaths.SetPath(nBuffer, strSavePath);
UpdateHeaderPath(nBuffer);
bSaveSuccess = TRUE;
- result = TRUE;
+ result = true;
}
else if (nSaveErrorCode == SAVE_CANCELLED)
{
// User cancelled current operation, lets do what user wanted to do
- result = FALSE;
+ result = false;
}
return result;
}
@@ -1181,7 +1181,7 @@
* @sa CMainFrame::CheckSavePath()
* @sa CMergeDoc::CDiffTextBuffer::SaveToFile()
*/
-BOOL CMergeDoc::DoSaveAs(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer)
+bool CMergeDoc::DoSaveAs(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer)
{
CString strSavePath(szPath);
@@ -1193,7 +1193,7 @@
bSaveSuccess = FALSE;
// FALSE as long as the user is not satisfied
// TRUE if saving succeeds, even with another filename, or if the user cancels
- BOOL result = FALSE;
+ bool result = false;
// the error code from the latest save operation,
// or SAVE_DONE when the save succeeds
// TODO: Shall we return this code in addition to bSaveSuccess ?
@@ -1216,7 +1216,7 @@
m_filePaths.SetPath(nBuffer, strSavePath);
UpdateHeaderPath(nBuffer);
bSaveSuccess = TRUE;
- result = TRUE;
+ result = true;
}
return result;
}
@@ -1407,8 +1407,8 @@
{
// We will need to know if either of the originals actually changed
// so we know whether to update the diff status
- BOOL bLChangedOriginal = FALSE;
- BOOL bRChangedOriginal = FALSE;
+ bool bLChangedOriginal = false;
+ bool bRChangedOriginal = false;
if (m_ptBuf[0]->IsModified() && !m_ptBuf[0]->GetReadOnly())
{
@@ -1418,7 +1418,7 @@
BOOL bSaveOriginal = FALSE;
DoSave(m_filePaths.GetLeft().c_str(), bSaveOriginal, 0);
if (bSaveOriginal)
- bLChangedOriginal = TRUE;
+ bLChangedOriginal = true;
}
if (m_ptBuf[1]->IsModified() && !m_ptBuf[1]->GetReadOnly())
@@ -1427,7 +1427,7 @@
BOOL bSaveOriginal = FALSE;
DoSave(m_filePaths.GetRight().c_str(), bSaveOriginal, 1);
if (bSaveOriginal)
- bRChangedOriginal = TRUE;
+ bRChangedOriginal = true;
}
// If either of the actual source files being compared was changed
@@ -1440,7 +1440,7 @@
if (m_bEditAfterRescan[0] || m_bEditAfterRescan[1])
FlushAndRescan(FALSE);
- BOOL bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
+ bool bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
m_pDirDoc->UpdateChangedItem(m_filePaths, m_diffList.GetSignificantDiffs(),
m_nTrivialDiffs, bIdentical);
}
@@ -1471,7 +1471,7 @@
if (m_bEditAfterRescan[0] || m_bEditAfterRescan[1])
FlushAndRescan(FALSE);
- BOOL bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
+ bool bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
m_pDirDoc->UpdateChangedItem(m_filePaths, m_diffList.GetSignificantDiffs(),
m_nTrivialDiffs, bIdentical);
}
@@ -1500,9 +1500,9 @@
if (m_pDirDoc->HasDiffs())
{
if (m_bEditAfterRescan[0] || m_bEditAfterRescan[1])
- FlushAndRescan(FALSE);
+ FlushAndRescan(false);
- BOOL bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
+ bool bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
m_pDirDoc->UpdateChangedItem(m_filePaths, m_diffList.GetSignificantDiffs(),
m_nTrivialDiffs, bIdentical);
}
@@ -1777,12 +1777,12 @@
* @param [in] nBuffer Index (0-based) of buffer
* @return TRUE if file is changed.
*/
-BOOL CMergeDoc::IsFileChangedOnDisk(LPCTSTR szPath, DiffFileInfo &dfi,
- BOOL bSave, int nBuffer)
+bool CMergeDoc::IsFileChangedOnDisk(LPCTSTR szPath, DiffFileInfo &dfi,
+ bool bSave, int nBuffer)
{
DiffFileInfo *fileInfo = NULL;
- BOOL bFileChanged = FALSE;
- BOOL bIgnoreSmallDiff = GetOptionsMgr()->GetBool(OPT_IGNORE_SMALL_FILETIME);
+ bool bFileChanged = false;
+ bool bIgnoreSmallDiff = GetOptionsMgr()->GetBool(OPT_IGNORE_SMALL_FILETIME);
int tolerance = 0;
if (bIgnoreSmallDiff)
tolerance = SmallTimeDiff; // From MainFrm.h
@@ -1798,7 +1798,7 @@
timeDiff = _abs64(timeDiff);
if ((timeDiff > tolerance) || (dfi.size != fileInfo->size))
{
- bFileChanged = TRUE;
+ bFileChanged = true;
}
return bFileChanged;
@@ -1820,16 +1820,16 @@
* we do after saving to different filename? Empty description?
* @todo Parameter @p bAllowCancel is always true in callers - can be removed.
*/
-BOOL CMergeDoc::PromptAndSaveIfNeeded(BOOL bAllowCancel)
+bool CMergeDoc::PromptAndSaveIfNeeded(BOOL bAllowCancel)
{
const BOOL bLModified = m_ptBuf[0]->IsModified();
const BOOL bRModified = m_ptBuf[1]->IsModified();
- BOOL result = TRUE;
+ bool result = true;
BOOL bLSaveSuccess = FALSE;
BOOL bRSaveSuccess = FALSE;
if (!bLModified && !bRModified) //Both files unmodified
- return TRUE;
+ return true;
SaveClosingDlg dlg;
dlg.DoAskFor(bLModified, bRModified);
@@ -1849,18 +1849,18 @@
if (bLModified && dlg.m_leftSave == SaveClosingDlg::SAVECLOSING_SAVE)
{
if (!DoSave(m_filePaths.GetLeft().c_str(), bLSaveSuccess, 0))
- result = FALSE;
+ result = false;
}
if (bRModified && dlg.m_rightSave == SaveClosingDlg::SAVECLOSING_SAVE)
{
if (!DoSave(m_filePaths.GetRight().c_str(), bRSaveSuccess, 1))
- result = FALSE;
+ result = false;
}
}
else
{
- result = FALSE;
+ result = false;
}
// If file were modified and saving was successfull,
@@ -1872,9 +1872,9 @@
if (m_pDirDoc->HasDiffs())
{
if (m_bEditAfterRescan[0] || m_bEditAfterRescan[1])
- FlushAndRescan(FALSE);
+ FlushAndRescan(false);
- BOOL bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
+ bool bIdentical = !m_diffList.HasSignificantDiffs(); // True if status should be set to identical
m_pDirDoc->UpdateChangedItem(m_filePaths, m_diffList.GetSignificantDiffs(),
m_nTrivialDiffs, bIdentical);
}
@@ -1991,7 +1991,7 @@
// If mixed EOLs are not enabled, enable them for this doc.
if (!GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL))
{
- m_bMixedEol = TRUE;
+ m_bMixedEol = true;
}
}
@@ -2302,7 +2302,7 @@
m_diffList.HasSignificantDiffs())
{
int nDiff = m_diffList.FirstSignificantDiff();
- pLeft->SelectDiff(nDiff, TRUE, FALSE);
+ pLeft->SelectDiff(nDiff, true, false);
}
// Exit if files are identical should only work for the first
@@ -2393,7 +2393,7 @@
/**
* @brief Paint differently the headerbar of the active view
*/
-void CMergeDoc::UpdateHeaderActivity(int pane, BOOL bActivate)
+void CMergeDoc::UpdateHeaderActivity(int pane, bool bActivate)
{
CChildFrame *pf = GetParentFrame();
ASSERT(pf);
@@ -2403,7 +2403,7 @@
/**
* @brief Return if doc is in Merging/Editing mode
*/
-BOOL CMergeDoc::GetMergingMode() const
+bool CMergeDoc::GetMergingMode() const
{
return m_bMergingMode;
}
@@ -2411,28 +2411,28 @@
/**
* @brief Set doc to Merging/Editing mode
*/
-void CMergeDoc::SetMergingMode(BOOL bMergingMode)
+void CMergeDoc::SetMergingMode(bool bMergingMode)
{
m_bMergingMode = bMergingMode;
- GetOptionsMgr()->SaveOption(OPT_MERGE_MODE, m_bMergingMode == TRUE);
+ GetOptionsMgr()->SaveOption(OPT_MERGE_MODE, m_bMergingMode);
}
/**
* @brief Set detect/not detect Moved Blocks
*/
-void CMergeDoc::SetDetectMovedBlocks(BOOL bDetectMovedBlocks)
+void CMergeDoc::SetDetectMovedBlocks(bool bDetectMovedBlocks)
{
if (bDetectMovedBlocks == m_diffWrapper.GetDetectMovedBlocks())
return;
- GetOptionsMgr()->SaveOption(OPT_CMP_MOVED_BLOCKS, bDetectMovedBlocks == TRUE);
+ GetOptionsMgr()->SaveOption(OPT_CMP_MOVED_BLOCKS, bDetectMovedBlocks);
m_diffWrapper.SetDetectMovedBlocks(bDetectMovedBlocks);
FlushAndRescan();
}
void CMergeDoc::SetEditedAfterRescan(int nBuffer)
{
- m_bEditAfterRescan[nBuffer] = TRUE;
+ m_bEditAfterRescan[nBuffer] = true;
}
/**
Modified: trunk/Src/MergeDoc.h
===================================================================
--- trunk/Src/MergeDoc.h 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/MergeDoc.h 2008-08-13 04:12:20 UTC (rev 5795)
@@ -141,7 +141,7 @@
int GetActiveMergeViewIndexType() const;
CMergeEditView * GetActiveMergeView();
void UpdateHeaderPath(int pane);
- void UpdateHeaderActivity(int pane, BOOL bActivate);
+ void UpdateHeaderActivity(int pane, bool bActivate);
void RefreshOptions();
void UpdateResources();
OPENRESULTS_TYPE OpenDocs(FileLocation filelocLeft, FileLocation filelocRight,
@@ -150,15 +150,15 @@
int Rescan(BOOL &bBinary, BOOL &bIdentical, BOOL bForced = FALSE);
void ShowRescanError(int nRescanResult, BOOL bIdentical);
void AddUndoAction(UINT nBegin, UINT nEnd, UINT nDiff, int nBlanks, BOOL bInsert, CMergeEditView *pList);
- BOOL Undo();
+ bool Undo();
void CopyAllList(int srcPane, int dstPane);
void CopyMultipleList(int srcPane, int dstPane, int firstDiff, int lastDiff);
- BOOL SanityCheckDiff(DIFFRANGE dr);
+ bool SanityCheckDiff(DIFFRANGE dr);
bool ListCopy(int srcPane, int dstPane, int nDiff = -1, bool bGroupWithPrevious = false);
- BOOL TrySaveAs(CString &strPath, int &nLastErrorCode, String & sError,
+ bool TrySaveAs(CString &strPath, int &nLastErrorCode, String & sError,
int nBuffer, PackingInfo * pInfoTempUnpacker);
- BOOL DoSave(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer);
- BOOL DoSaveAs(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer);
+ bool DoSave(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer);
+ bool DoSaveAs(LPCTSTR szPath, BOOL &bSaveSuccess, int nBuffer);
int RightLineInMovedBlock(int leftLine);
int LeftLineInMovedBlock(int rightLine);
void SetEditedAfterRescan(int nBuffer);
@@ -211,9 +211,9 @@
// Implementation
public:
- BOOL IsFileChangedOnDisk(LPCTSTR szPath, DiffFileInfo &dfi,
- BOOL bSave, int nBuffer);
- BOOL PromptAndSaveIfNeeded(BOOL bAllowCancel);
+ bool IsFileChangedOnDisk(LPCTSTR szPath, DiffFileInfo &dfi,
+ bool bSave, int nBuffer);
+ bool PromptAndSaveIfNeeded(BOOL bAllowCancel);
std::vector<CMergeEditView*> undoTgt;
std::vector<CMergeEditView*>::iterator curUndo;
void FlushAndRescan(BOOL bForced = FALSE);
@@ -221,10 +221,10 @@
int GetCurrentDiff() { return m_nCurDiff; }
virtual ~CMergeDoc();
virtual void OnFileEvent (WPARAM wEvent, LPCTSTR pszPathName);
- BOOL GetMergingMode() const;
- void SetMergingMode(BOOL bMergingMode);
- void SetDetectMovedBlocks(BOOL bDetectMovedBlocks);
- BOOL IsMixedEOL() const { return m_bMixedEol; }
+ bool GetMergingMode() const;
+ void SetMergingMode(bool bMergingMode);
+ void SetDetectMovedBlocks(bool bDetectMovedBlocks);
+ bool IsMixedEOL() const { return m_bMixedEol; }
// implementation methods
private:
@@ -241,17 +241,17 @@
CMergeEditView * m_pView[MERGE_VIEW_COUNT]; /**< Pointer to left/right view */
CMergeDiffDetailView * m_pDetailView[2];
CDirDoc * m_pDirDoc;
- BOOL m_bEnableRescan; /**< Automatic rescan enabled/disabled */
+ bool m_bEnableRescan; /**< Automatic rescan enabled/disabled */
COleDateTime m_LastRescan; /**< Time of last rescan (for delaying) */
CDiffWrapper m_diffWrapper;
/// information about the file packer/unpacker
PackingInfo * m_pInfoUnpacker;
String m_strDesc[2]; /**< Left/right side description text */
BUFFERTYPE m_nBufferType[2];
- BOOL m_bMergingMode; /**< Merging or Edit mode */
- BOOL m_bEditAfterRescan[2]; /**< Left/right doc edited after rescanning */
+ bool m_bMergingMode; /**< Merging or Edit mode */
+ bool m_bEditAfterRescan[2]; /**< Left/right doc edited after rescanning */
TempFile m_tempFiles[2]; /**< Temp files for compared files */
- BOOL m_bMixedEol; /**< Does this document have mixed EOL style? */
+ bool m_bMixedEol; /**< Does this document have mixed EOL style? */
// friend access
friend class RescanSuppress;
Modified: trunk/Src/MergeEditView.cpp
===================================================================
--- trunk/Src/MergeEditView.cpp 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/MergeEditView.cpp 2008-08-13 04:12:20 UTC (rev 5795)
@@ -69,11 +69,11 @@
IMPLEMENT_DYNCREATE(CMergeEditView, CCrystalEditViewEx)
CMergeEditView::CMergeEditView()
-: m_bCurrentLineIsDiff(FALSE)
+: m_bCurrentLineIsDiff(false)
, m_pLocationView(NULL)
, m_nThisPane(0)
, m_piMergeEditStatus(0)
-, m_bAutomaticRescan(FALSE)
+, m_bAutomaticRescan(false)
, fTimerWaitingForIdle(0)
{
SetParser(&m_xParser);
@@ -236,14 +236,12 @@
{
}
-BOOL CMergeEditView::PrimeListWithFile()
+void CMergeEditView::PrimeListWithFile()
{
// Set the tab size now, just in case the options change...
// We don't update it at the end of OnOptions,
// we can update it safely now
SetTabSize(GetOptionsMgr()->GetInt(OPT_TAB_SIZE));
-
- return TRUE;
}
/**
* @brief Return text from line given
@@ -331,7 +329,7 @@
CCrystalEditViewEx::OnActivateView(bActivate, pActivateView, pDeactiveView);
CMergeDoc* pDoc = GetDocument();
- pDoc->UpdateHeaderActivity(m_nThisPane, bActivate);
+ pDoc->UpdateHeaderActivity(m_nThisPane, bActivate != FALSE);
}
int CMergeEditView::GetAdditionalTextBlocks (int nLineIndex, TEXTBLOCK *pBuf)
@@ -358,7 +356,7 @@
return 0;
}
- BOOL lineInCurrentDiff = IsLineInCurrentDiff(nLineIndex);
+ bool lineInCurrentDiff = IsLineInCurrentDiff(nLineIndex);
int nWordDiffs = worddiffs.size();
pBuf[0].m_nCharPos = 0;
@@ -442,8 +440,8 @@
if (dwLineFlags & LF_WINMERGE_FLAGS)
{
crText = m_cachedColors.clrDiffText;
- bDrawWhitespace = TRUE;
- BOOL lineInCurrentDiff = IsLineInCurrentDiff(nLineIndex);
+ bDrawWhitespace = true;
+ bool lineInCurrentDiff = IsLineInCurrentDiff(nLineIndex);
if (dwLineFlags & LF_DIFF)
{
@@ -510,7 +508,7 @@
// If no syntax hilighting, get windows default colors
crBkgnd = GetSysColor (COLOR_WINDOW);
crText = GetSysColor (COLOR_WINDOWTEXT);
- bDrawWhitespace = FALSE;
+ bDrawWhitespace = false;
}
else
// Syntax highlighting, get colors from CrystalEditor
@@ -524,7 +522,7 @@
*/
void CMergeEditView::UpdateSiblingScrollPos (BOOL bHorz)
{
- CSplitterWnd *pSplitterWnd = GetParentSplitter (this, FALSE);
+ CSplitterWnd *pSplitterWnd = GetParentSplitter (this, false);
if (pSplitterWnd != NULL)
{
// See CSplitterWnd::IdFromRowCol() implementation for details
@@ -585,9 +583,9 @@
// ASSERT (pSrcView->m_nTopLine < GetLineCount ());
if (pSrcView->m_nTopSubLine != m_nTopSubLine)
{
- ScrollToSubLine (pSrcView->m_nTopSubLine, TRUE, FALSE);
+ ScrollToSubLine (pSrcView->m_nTopSubLine, true, false);
UpdateCaret ();
- RecalcVertScrollBar(TRUE);
+ RecalcVertScrollBar(true);
}
}
else
@@ -599,9 +597,9 @@
// ASSERT (pSrcView->m_nOffsetChar < GetMaxLineLength ());
if (pSrcView->m_nOffsetChar != m_nOffsetChar)
{
- ScrollToChar (pSrcView->m_nOffsetChar, TRUE, FALSE);
+ ScrollToChar (pSrcView->m_nOffsetChar, true, false);
UpdateCaret ();
- RecalcHorzScrollBar(TRUE);
+ RecalcHorzScrollBar(true);
}
}
}
@@ -616,7 +614,7 @@
* @sa CMergeDoc::SetCurrentDiff()
* @todo Parameter bSelectText is never used?
*/
-void CMergeEditView::SelectDiff(int nDiff, BOOL bScroll /*=TRUE*/, BOOL bSelectText /*=TRUE*/)
+void CMergeEditView::SelectDiff(int nDiff, bool bScroll /*=true*/, bool bSelectText /*=true*/)
{
CMergeDoc *pd = GetDocument();
@@ -631,7 +629,7 @@
pd->SetCurrentDiff(nDiff);
ShowDiff(bScroll, bSelectText);
pd->UpdateAllViews(this);
- UpdateSiblingScrollPos(FALSE);
+ UpdateSiblingScrollPos(false);
// notify either side, as it will notify the other one
pd->GetLeftDetailView()->OnDisplayDiff(nDiff);
@@ -657,7 +655,7 @@
if (nDiff != -1)
{
// Scroll to the first line of the currently selected diff
- SelectDiff(nDiff, TRUE, FALSE);
+ SelectDiff(nDiff, true, false);
}
else
{
@@ -665,7 +663,7 @@
CPoint pos = GetCursorPos();
nDiff = pd->m_diffList.LineToDiff(pos.y);
if (nDiff != -1 && pd->m_diffList.IsDiffSignificant(nDiff))
- SelectDiff(nDiff, TRUE, FALSE);
+ SelectDiff(nDiff, true, false);
}
}
@@ -681,12 +679,12 @@
{
int nNewDiff = pd->m_diffList.LineToDiff(pos.y);
if (nNewDiff != -1 && pd->m_diffList.IsDiffSignificant(nNewDiff))
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
else
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
}
/**
@@ -752,7 +750,7 @@
pDoc->m_ptBuf[m_nThisPane]->DeleteText(this, ptSelStart.y, ptSelStart.x, ptSelEnd.y,
ptSelEnd.x, CE_ACTION_CUT);
- m_pTextBuffer->SetModified(TRUE);
+ m_pTextBuffer->SetModified(true);
}
/**
@@ -763,7 +761,7 @@
if (!IsReadOnly(m_nThisPane))
CCrystalEditViewEx::OnUpdateEditCut(pCmdUI);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -775,7 +773,7 @@
return;
CCrystalEditViewEx::Paste();
- m_pTextBuffer->SetModified(TRUE);
+ m_pTextBuffer->SetModified(true);
}
/**
@@ -786,7 +784,7 @@
if (!IsReadOnly(m_nThisPane))
CCrystalEditViewEx::OnUpdateEditPaste(pCmdUI);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -802,7 +800,7 @@
if (IsReadOnly(m_nThisPane))
return;
- GetParentFrame()->SetActiveView(this, TRUE);
+ GetParentFrame()->SetActiveView(this, true);
if(CCrystalEditViewEx::DoEditUndo())
{
--pDoc->curUndo;
@@ -834,7 +832,7 @@
pCmdUI->Enable( !IsReadOnly(tgt->m_nThisPane));
}
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -849,7 +847,7 @@
if (pd->m_diffList.HasSignificantDiffs())
{
int nDiff = pd->m_diffList.FirstSignificantDiff();
- SelectDiff(nDiff, TRUE, FALSE);
+ SelectDiff(nDiff, true, false);
}
}
@@ -870,7 +868,7 @@
if (pd->m_diffList.HasSignificantDiffs())
{
int nDiff = pd->m_diffList.LastSignificantDiff();
- SelectDiff(nDiff, TRUE, FALSE);
+ SelectDiff(nDiff, true, false);
}
}
@@ -930,7 +928,7 @@
nextDiff = curDiff;
// nextDiff is the next one if there is one, else it is the one we're on
- SelectDiff(nextDiff, TRUE, FALSE);
+ SelectDiff(nextDiff, true, false);
}
else
{
@@ -941,7 +939,7 @@
line = m_nTopLine;
curDiff = pd->m_diffList.NextSignificantDiffFromLine(line);
if (curDiff >= 0)
- SelectDiff(curDiff, TRUE, FALSE);
+ SelectDiff(curDiff, true, false);
}
}
@@ -956,7 +954,7 @@
if (!dfi)
{
// There aren't any significant differences
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
else
{
@@ -1014,7 +1012,7 @@
prevDiff = curDiff;
// prevDiff is the preceding one if there is one, else it is the one we're on
- SelectDiff(prevDiff, TRUE, FALSE);
+ SelectDiff(prevDiff, true, false);
}
else
{
@@ -1025,7 +1023,7 @@
line = m_nTopLine;
curDiff = pd->m_diffList.PrevSignificantDiffFromLine(line);
if (curDiff >= 0)
- SelectDiff(curDiff, TRUE, FALSE);
+ SelectDiff(curDiff, true, false);
}
}
@@ -1040,7 +1038,7 @@
if (!dfi)
{
// There aren't any significant differences
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
else
{
@@ -1065,7 +1063,7 @@
* @sa CMergeDoc::GetCurrentDiff()
* @sa CMergeDoc::LineInDiff()
*/
-BOOL CMergeEditView::IsLineInCurrentDiff(int nLine)
+bool CMergeEditView::IsLineInCurrentDiff(int nLine)
{
// Check validity of nLine
#ifdef _DEBUG
@@ -1079,7 +1077,7 @@
CMergeDoc *pd = GetDocument();
int curDiff = pd->GetCurrentDiff();
if (curDiff == -1)
- return FALSE;
+ return false;
return pd->m_diffList.LineInDiff(nLine, curDiff);
}
@@ -1095,7 +1093,7 @@
int diff = pd->m_diffList.LineToDiff(pos.y);
if (diff != -1 && pd->m_diffList.IsDiffSignificant(diff))
- SelectDiff(diff, FALSE, FALSE);
+ SelectDiff(diff, false, false);
CCrystalEditViewEx::OnLButtonDblClk(nFlags, point);
}
@@ -1198,18 +1196,18 @@
// there is an active diff OR
// cursor is inside diff
if (firstDiff != -1 && lastDiff != -1 && (lastDiff >= firstDiff))
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
{
const int currDiff = GetDocument()->GetCurrentDiff();
if (currDiff != -1 && GetDocument()->m_diffList.IsDiffSignificant(currDiff))
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
pCmdUI->Enable(m_bCurrentLineIsDiff);
}
}
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -1276,18 +1274,18 @@
// there is an active diff OR
// cursor is inside diff
if (firstDiff != -1 && lastDiff != -1 && (lastDiff >= firstDiff))
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
{
const int currDiff = GetDocument()->GetCurrentDiff();
if (currDiff != -1 && GetDocument()->m_diffList.IsDiffSignificant(currDiff))
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
pCmdUI->Enable(m_bCurrentLineIsDiff);
}
}
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -1312,7 +1310,7 @@
if (!IsReadOnly(0))
pCmdUI->Enable(GetDocument()->m_diffList.HasSignificantDiffs());
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -1338,7 +1336,7 @@
if (!IsReadOnly(1))
pCmdUI->Enable(GetDocument()->m_diffList.HasSignificantDiffs());
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -1424,7 +1422,7 @@
if (IsReadOnly(m_nThisPane))
return;
- GetParentFrame()->SetActiveView(this, TRUE);
+ GetParentFrame()->SetActiveView(this, true);
if(CCrystalEditViewEx::DoEditRedo())
{
++pDoc->curUndo;
@@ -1450,7 +1448,7 @@
pCmdUI->Enable( !IsReadOnly(tgt->m_nThisPane));
}
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
void CMergeEditView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
@@ -1466,7 +1464,7 @@
* @todo This shouldn't be called when no diff is selected, so
* somebody could try to ASSERT(nDiff > -1)...
*/
-void CMergeEditView::ShowDiff(BOOL bScroll, BOOL bSelectText)
+void CMergeEditView::ShowDiff(bool bScroll, bool bSelectText)
{
CMergeDoc *pd = GetDocument();
CMergeEditView *pCurrentView = NULL;
@@ -1494,7 +1492,7 @@
if (bScroll)
{
- if (IsDiffVisible(curDiff, CONTEXT_LINES_BELOW) == FALSE)
+ if (!IsDiffVisible(curDiff, CONTEXT_LINES_BELOW))
{
// Difference is not visible, scroll it so that max amount of
// scrolling is done while keeping the diff in screen. So if
@@ -1568,9 +1566,9 @@
* @brief Returns if buffer is read-only
* @note This has no any relation to file being read-only!
*/
-BOOL CMergeEditView::IsReadOnly(int pane)
+bool CMergeEditView::IsReadOnly(int pane)
{
- return GetDocument()->m_ptBuf[pane]->GetReadOnly();
+ return GetDocument()->m_ptBuf[pane]->GetReadOnly() != FALSE;
}
/**
@@ -1581,9 +1579,9 @@
CMergeDoc *pd = GetDocument();
if (!IsReadOnly(0) && pd->m_ptBuf[0]->IsModified())
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -1594,9 +1592,9 @@
CMergeDoc *pd = GetDocument();
if (!IsReadOnly(1) && pd->m_ptBuf[1]->IsModified())
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -1607,15 +1605,15 @@
{
CMergeDoc *pd = GetDocument();
ASSERT(pd);
- pd->FlushAndRescan(TRUE);
+ pd->FlushAndRescan(true);
}
/**
* @brief Enable/Disable automatic rescanning
*/
-BOOL CMergeEditView::EnableRescan(BOOL bEnable)
+bool CMergeEditView::EnableRescan(bool bEnable)
{
- BOOL bOldValue = m_bAutomaticRescan;
+ bool bOldValue = m_bAutomaticRescan;
m_bAutomaticRescan = bEnable;
return bOldValue;
}
@@ -1623,17 +1621,17 @@
/**
* @brief Handle some keys when in merging mode
*/
-BOOL CMergeEditView::MergeModeKeyDown(MSG* pMsg)
+bool CMergeEditView::MergeModeKeyDown(MSG* pMsg)
{
- BOOL bHandled = FALSE;
+ bool bHandled = false;
// Allow default text selection when SHIFT pressed
if (::GetAsyncKeyState(VK_SHIFT))
- return FALSE;
+ return false;
// Allow default editor functions when CTRL pressed
if (::GetAsyncKeyState(VK_CONTROL))
- return FALSE;
+ return false;
// If we are in merging mode (merge with cursor keys)
// handle some keys here
@@ -1641,29 +1639,26 @@
{
case VK_LEFT:
OnR2l();
- bHandled = TRUE;
+ bHandled = true;
break;
case VK_RIGHT:
OnL2r();
- bHandled = TRUE;
+ bHandled = true;
break;
case VK_UP:
OnPrevdiff();
- bHandled = TRUE;
+ bHandled = true;
break;
case VK_DOWN:
OnNextdiff();
- bHandled = TRUE;
+ bHandled = true;
break;
}
- if (bHandled)
- return TRUE;
-
- return FALSE;
+ return bHandled;
}
/**
@@ -1676,7 +1671,7 @@
{
if (pMsg->message == WM_KEYDOWN)
{
- BOOL bHandled = FALSE;
+ bool bHandled = false;
// If we are in merging mode (merge with cursor keys)
// handle some keys here
@@ -1688,7 +1683,7 @@
}
// Close window if user has allowed it from options
- BOOL bCloseWithEsc = GetOptionsMgr()->GetBool(OPT_CLOSE_WITH_ESC);
+ bool bCloseWithEsc = GetOptionsMgr()->GetBool(OPT_CLOSE_WITH_ESC);
if (pMsg->wParam == VK_ESCAPE && bCloseWithEsc)
{
GetParentFrame()->PostMessage(WM_CLOSE, 0, 0);
@@ -1706,9 +1701,9 @@
CMergeDoc *pd = GetDocument();
if (pd->m_ptBuf[0]->IsModified() || pd->m_ptBuf[1]->IsModified())
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -1728,7 +1723,7 @@
{
CMergeDoc *pd = GetDocument();
BOOL bReadOnly = pd->m_ptBuf[0]->GetReadOnly();
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
pCmdUI->SetCheck(bReadOnly);
}
@@ -1749,7 +1744,7 @@
{
CMergeDoc *pd = GetDocument();
BOOL bReadOnly = pd->m_ptBuf[1]->GetReadOnly();
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
pCmdUI->SetCheck(bReadOnly);
}
@@ -1796,8 +1791,8 @@
sLine.Format(_T("%d"), nRealLine+1);
curChar = cursorPos.x + 1;
chars = GetLineLength(nScreenLine);
- column = CalculateActualOffset(nScreenLine, cursorPos.x, TRUE) + 1;
- columns = CalculateActualOffset(nScreenLine, chars, TRUE) + 1;
+ column = CalculateActualOffset(nScreenLine, cursorPos.x, true) + 1;
+ columns = CalculateActualOffset(nScreenLine, chars, true) + 1;
chars++;
if (GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL) ||
GetDocument()->IsMixedEOL())
@@ -1812,9 +1807,9 @@
// Is cursor inside difference?
if (dwLineFlags & LF_NONTRIVIAL_DIFF)
- m_bCurrentLineIsDiff = TRUE;
+ m_bCurrentLineIsDiff = true;
else
- m_bCurrentLineIsDiff = FALSE;
+ m_bCurrentLineIsDiff = false;
UpdateLocationViewPosition(m_nTopSubLine, m_nTopSubLine + GetScreenLines());
}
@@ -1838,7 +1833,7 @@
void CMergeEditView::OnUpdateSelectLineDiff(CCmdUI* pCmdUI)
{
int line = GetCursorPos().y;
- BOOL enable = (GetLineFlags(line) & LF_DIFF) != 0;
+ bool enable = (GetLineFlags(line) & LF_DIFF) != 0;
pCmdUI->Enable(enable);
}
@@ -1876,9 +1871,9 @@
*
* This only provides functionality for debugging.
*/
-static BOOL DoAppendMenu(HMENU hMenu, UINT uFlags, UINT_PTR uIDNewItem, LPCTSTR lpNewItem)
+static bool DoAppendMenu(HMENU hMenu, UINT uFlags, UINT_PTR uIDNewItem, LPCTSTR lpNewItem)
{
- BOOL ok = ::AppendMenu(hMenu, uFlags, uIDNewItem, lpNewItem);
+ bool ok = ::AppendMenu(hMenu, uFlags, uIDNewItem, lpNewItem) != FALSE;
if (!ok)
{
int nerr = GetLastError();
@@ -1987,7 +1982,7 @@
for (iScript = 0 ; iScript < piScriptArray->GetSize() ; iScript++, ID ++)
{
PluginInfo & plugin = piScriptArray->ElementAt(iScript);
- if (plugin.TestAgainstRegList(pd->m_strBothFilenames.c_str()) == TRUE)
+ if (plugin.TestAgainstRegList(pd->m_strBothFilenames.c_str()) != FALSE)
continue;
DoAppendMenu(hMenu, MF_STRING, ID, plugin.m_name.c_str());
@@ -1995,7 +1990,7 @@
for (iScript = 0 ; iScript < piScriptArray2->GetSize() ; iScript++, ID ++)
{
PluginInfo & plugin = piScriptArray2->ElementAt(iScript);
- if (plugin.TestAgainstRegList(pd->m_strBothFilenames.c_str()) == TRUE)
+ if (plugin.TestAgainstRegList(pd->m_strBothFilenames.c_str()) != FALSE)
continue;
DoAppendMenu(hMenu, MF_STRING, ID, plugin.m_name.c_str());
@@ -2120,7 +2115,7 @@
CMergeDoc *pd = GetDocument();
ASSERT(pd);
pd->UpdateHeaderPath(m_nThisPane);
- pd->FlushAndRescan(TRUE);
+ pd->FlushAndRescan(true);
}
}
@@ -2151,14 +2146,14 @@
GetDocument()->IsMixedEOL() ||
nStyle != m_pTextBuffer->GetCRLFMode())
{
- pCmdUI->SetRadio(FALSE);
+ pCmdUI->SetRadio(false);
// Don't allow selecting other EOL style for protected pane
if (IsReadOnly(m_nThisPane))
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
else
- pCmdUI->SetRadio(TRUE);
+ pCmdUI->SetRadio(true);
}
/**
@@ -2183,7 +2178,7 @@
if (!IsReadOnly(1))
pCmdUI->Enable(GetDocument()->GetCurrentDiff()!=-1);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -2208,7 +2203,7 @@
if (!IsReadOnly(0))
pCmdUI->Enable(GetDocument()->GetCurrentDiff()!=-1);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
@@ -2220,7 +2215,7 @@
*/
void CMergeEditView::OnChangePane()
{
- CSplitterWnd *pSplitterWnd = GetParentSplitter(this, FALSE);
+ CSplitterWnd *pSplitterWnd = GetParentSplitter(this, false);
CMergeEditView *pWnd = static_cast<CMergeEditView*>(pSplitterWnd->GetActivePane());
CPoint ptCursor = pWnd->GetCursorPos();
pSplitterWnd->ActivateNext();
@@ -2238,7 +2233,7 @@
*/
void CMergeEditView::OnUpdateChangePane(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
}
/**
@@ -2281,7 +2276,7 @@
if (nRealLine > nLastLine)
nRealLine = nLastLine;
- GotoLine(nRealLine, TRUE, dlg.m_nFile);
+ GotoLine(nRealLine, true, dlg.m_nFile);
}
else
{
@@ -2291,7 +2286,7 @@
if (diff >= pDoc->m_diffList.GetSize())
diff = pDoc->m_diffList.GetSize();
- pCurrentView->SelectDiff(diff, TRUE, FALSE);
+ pCurrentView->SelectDiff(diff, true, false);
}
}
}
@@ -2301,7 +2296,7 @@
*/
void CMergeEditView::OnUpdateWMGoto(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
}
/**
@@ -2312,9 +2307,9 @@
m_bAutomaticRescan = GetOptionsMgr()->GetBool(OPT_AUTOMATIC_RESCAN);
if (GetOptionsMgr()->GetInt(OPT_TAB_TYPE) == 0)
- SetInsertTabs(TRUE);
+ SetInsertTabs(true);
else
- SetInsertTabs(FALSE);
+ SetInsertTabs(false);
SetSelectionMargin(GetOptionsMgr()->GetBool(OPT_VIEW_FILEMARGIN));
@@ -2349,7 +2344,7 @@
*/
void CMergeEditView::OnUpdateScripts(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
}
void CMergeEditView::OnScripts(UINT nID )
@@ -2374,7 +2369,7 @@
if (scriptsSubmenu != NULL)
createScriptsSubmenu(scriptsSubmenu);
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
}
/**
@@ -2382,7 +2377,7 @@
*/
void CMergeEditView::OnUpdatePrediffer(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
CMergeDoc *pd = GetDocument();
ASSERT(pd);
@@ -2391,7 +2386,7 @@
if (prediffer.bToBeScanned)
{
- pCmdUI->SetRadio(FALSE);
+ pCmdUI->SetRadio(false);
return;
}
@@ -2425,7 +2420,7 @@
ASSERT(pd);
SetPredifferByMenu(nID);
- pd->FlushAndRescan(TRUE);
+ pd->FlushAndRescan(true);
}
/**
@@ -2440,7 +2435,7 @@
{
m_CurrentPredifferID = nID;
pd->SetPrediffer(NULL);
- pd->FlushAndRescan(TRUE);
+ pd->FlushAndRescan(true);
return;
}
@@ -2452,12 +2447,12 @@
// build a PrediffingInfo structure fom the ID
PrediffingInfo prediffer;
- prediffer.bToBeScanned = FALSE;
+ prediffer.bToBeScanned = false;
int pluginNumber = nID - ID_PREDIFFERS_FIRST;
if (pluginNumber < piScriptArray->GetSize())
{
- prediffer.bWithFile = TRUE;
+ prediffer.bWithFile = true;
PluginInfo & plugin = piScriptArray->ElementAt(pluginNumber);
prediffer.pluginName = plugin.m_name;
}
@@ -2466,7 +2461,7 @@
pluginNumber -= piScriptArray->GetSize();
if (pluginNumber >= piScriptArray2->GetSize())
return;
- prediffer.bWithFile = FALSE;
+ prediffer.bWithFile = false;
PluginInfo & plugin = piScriptArray2->ElementAt(pluginNumber);
prediffer.pluginName = plugin.m_name;
}
@@ -2527,7 +2522,7 @@
void CMergeEditView::OnMergingMode()
{
CMergeDoc *pDoc = GetDocument();
- BOOL bMergingMode = pDoc->GetMergingMode();
+ bool bMergingMode = pDoc->GetMergingMode();
pDoc->SetMergingMode(!bMergingMode);
}
@@ -2537,7 +2532,7 @@
*/
void CMergeEditView::OnUpdateMergingMode(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
pCmdUI->SetCheck(GetDocument()->GetMergingMode());
}
@@ -2558,10 +2553,10 @@
* it is apparent line (including deleted lines)
* @param [in] pane Pane index of goto target pane (0 = left, 1 = right).
*/
-void CMergeEditView::GotoLine(UINT nLine, BOOL bRealLine, int pane)
+void CMergeEditView::GotoLine(UINT nLine, bool bRealLine, int pane)
{
CMergeDoc *pDoc = GetDocument();
- CSplitterWnd *pSplitterWnd = GetParentSplitter(this, FALSE);
+ CSplitterWnd *pSplitterWnd = GetParentSplitter(this, false);
CMergeEditView *pLeftView = pDoc->GetLeftView();
CMergeEditView *pRightView = pDoc->GetRightView();
CMergeEditView *pCurrentView = static_cast<CMergeEditView*>
@@ -2615,7 +2610,7 @@
// and send the message to the splitter window instead
// The event should eventually come back here but with a valid scrollbar
// Along the way it will be propagated to other windows that need it
- CSplitterWnd *pSplitterWnd = GetParentSplitter(this, FALSE);
+ CSplitterWnd *pSplitterWnd = GetParentSplitter(this, false);
CScrollBar* curBar = this->GetScrollBarCtrl(SB_HORZ);
pSplitterWnd->SendMessage(WM_HSCROLL,
MAKELONG(nSBCode, nPos), (LPARAM)curBar->m_hWnd);
@@ -2636,7 +2631,7 @@
// and send the message to the splitter window instead
// The event should eventually come back here but with a valid scrollbar
// Along the way it will be propagated to other windows that need it
- CSplitterWnd *pSplitterWnd = GetParentSplitter(this, FALSE);
+ CSplitterWnd *pSplitterWnd = GetParentSplitter(this, false);
CScrollBar* curBar = this->GetScrollBarCtrl(SB_VERT);
pSplitterWnd->SendMessage(WM_VSCROLL,
MAKELONG(nSBCode, nPos), (LPARAM)curBar->m_hWnd);
@@ -2780,18 +2775,18 @@
*/
void CMergeEditView::OnViewLineDiffs()
{
- BOOL bWordDiffHighlight = GetOptionsMgr()->GetBool(OPT_WORDDIFF_HIGHLIGHT);
+ bool bWordDiffHighlight = GetOptionsMgr()->GetBool(OPT_WORDDIFF_HIGHLIGHT);
GetOptionsMgr()->SaveOption(OPT_WORDDIFF_HIGHLIGHT, !bWordDiffHighlight);
// Call CMergeDoc RefreshOptions() to refresh *both* views
CMergeDoc *pDoc = GetDocument();
pDoc->RefreshOptions();
- pDoc->FlushAndRescan(TRUE);
+ pDoc->FlushAndRescan(true);
}
void CMergeEditView::OnUpdateViewLineDiffs(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
pCmdUI->SetCheck(GetOptionsMgr()->GetBool(OPT_WORDDIFF_HIGHLIGHT));
}
@@ -2809,7 +2804,7 @@
void CMergeEditView::OnUpdateViewLineNumbers(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
pCmdUI->SetCheck(GetViewLineNumbers());
}
@@ -2830,7 +2825,7 @@
void CMergeEditView::OnUpdateViewWordWrap(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
pCmdUI->SetCheck(m_bWordWrap);
}
@@ -2873,8 +2868,8 @@
for (int pane = 0; pane < 2; pane++)
{
CMergeEditView *pView = GetDocument()->GetView(pane);
- pView->m_bPrintHeader = TRUE;
- pView->m_bPrintFooter = TRUE;
+ pView->m_bPrintHeader = true;
+ pView->m_bPrintFooter = true;
pView->CGhostTextView::OnBeginPrinting(pDC, pInfo);
}
}
@@ -3028,14 +3023,14 @@
*/
void CMergeEditView::OnUpdateViewSwapPanes(CCmdUI* pCmdUI)
{
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
}
/**
* @brief Check if cursor is inside difference.
* @return TRUE if cursor is inside difference.
*/
-BOOL CMergeEditView::IsCursorInDiff() const
+bool CMergeEditView::IsCursorInDiff() const
{
return m_bCurrentLineIsDiff;
}
@@ -3045,7 +3040,7 @@
* @param [in] nDiff Number of diff to check.
* @return TRUE if difference is visible.
*/
-BOOL CMergeEditView::IsDiffVisible(int nDiff)
+bool CMergeEditView::IsDiffVisible(int nDiff)
{
CMergeDoc *pd = GetDocument();
@@ -3061,7 +3056,7 @@
* @param [in] nLinesBelow Allow "minimizing" the number of visible lines.
* @return TRUE if difference is visible, FALSE otherwise.
*/
-BOOL CMergeEditView::IsDiffVisible(const DIFFRANGE& diff, int nLinesBelow /*=0*/)
+bool CMergeEditView::IsDiffVisible(const DIFFRANGE& diff, int nLinesBelow /*=0*/)
{
const int nDiffStart = GetSubLineIndex(diff.dbegin0);
const int nDiffEnd = GetSubLineIndex(diff.dend0);
@@ -3075,11 +3070,11 @@
(nDiffEnd >= m_nTopSubLine + GetScreenLines() - nLinesBelow) ||
(nDiffHeight >= GetScreenLines()))
{
- return FALSE;
+ return false;
}
else
{
- return TRUE;
+ return true;
}
}
@@ -3102,7 +3097,7 @@
// SetTextType will revert to language dependent defaults for tab
SetTabSize(GetOptionsMgr()->GetInt(OPT_TAB_SIZE));
SetViewTabs(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE));
- BOOL mixedEOLs = GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL) ||
+ bool mixedEOLs = GetOptionsMgr()->GetBool(OPT_ALLOW_MIXED_EOL) ||
GetDocument()->IsMixedEOL();
SetViewEols(GetOptionsMgr()->GetBool(OPT_VIEW_WHITESPACE), mixedEOLs);
SetWordWrapping(GetOptionsMgr()->GetBool(OPT_WORDWRAP));
@@ -3110,10 +3105,10 @@
SetSelectionMargin(GetOptionsMgr()->GetBool(OPT_VIEW_FILEMARGIN));
// Enable Backspace at beginning of line
- SetDisableBSAtSOL(FALSE);
+ SetDisableBSAtSOL(false);
// Set tab type (tabs/spaces)
- BOOL bInsertTabs = (GetOptionsMgr()->GetInt(OPT_TAB_TYPE) == 0);
+ bool bInsertTabs = (GetOptionsMgr()->GetInt(OPT_TAB_TYPE) == 0);
SetInsertTabs(bInsertTabs);
// Sometimes WinMerge doesn't update scrollbars correctly (they remain
@@ -3163,7 +3158,7 @@
*/
void CMergeEditView::OnViewMargin()
{
- BOOL bViewMargin = GetOptionsMgr()->GetBool(OPT_VIEW_FILEMARGIN);
+ bool bViewMargin = GetOptionsMgr()->GetBool(OPT_VIEW_FILEMARGIN);
GetOptionsMgr()->SaveOption(OPT_VIEW_FILEMARGIN, !bViewMargin);
SetSelectionMargin(!bViewMargin);
@@ -3178,8 +3173,8 @@
*/
void CMergeEditView::OnUpdateViewMargin(CCmdUI* pCmdUI)
{
- BOOL bViewMargin = GetOptionsMgr()->GetBool(OPT_VIEW_FILEMARGIN);
- pCmdUI->Enable(TRUE);
+ bool bViewMargin = GetOptionsMgr()->GetBool(OPT_VIEW_FILEMARGIN);
+ pCmdUI->Enable(true);
pCmdUI->SetCheck(bViewMargin);
}
@@ -3204,7 +3199,7 @@
DoAppendMenu(hSubMenu, MF_STRING, i, name.c_str());
}
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
}
/**
@@ -3224,7 +3219,7 @@
if (pView != NULL)
{
pView->SetTextType(CCrystalTextView::TextType(nID - ID_COLORSCHEME_FIRST));
- pView->SetDisableBSAtSOL(FALSE);
+ pView->SetDisableBSAtSOL(false);
}
}
@@ -3240,11 +3235,11 @@
const bool bIsCurrentScheme = (m_CurSourceDef->type == (pCmdUI->m_nID - ID_COLORSCHEME_FIRST));
pCmdUI->SetRadio(bIsCurrentScheme);
- BOOL syntaxHLEnabled = GetOptionsMgr()->GetBool(OPT_SYNTAX_HIGHLIGHT);
+ bool syntaxHLEnabled = GetOptionsMgr()->GetBool(OPT_SYNTAX_HIGHLIGHT);
if (syntaxHLEnabled)
- pCmdUI->Enable(TRUE);
+ pCmdUI->Enable(true);
else
- pCmdUI->Enable(FALSE);
+ pCmdUI->Enable(false);
}
/**
Modified: trunk/Src/MergeEditView.h
===================================================================
--- trunk/Src/MergeEditView.h 2008-08-12 21:06:27 UTC (rev 5794)
+++ trunk/Src/MergeEditView.h 2008-08-13 04:12:20 UTC (rev 5795)
@@ -117,7 +117,7 @@
* events, unless timer suppresses rescan. We suppress rescans within
* certain time from previous rescan.
*/
- BOOL m_bAutomaticRescan;
+ bool m_bAutomaticRescan;
private:
/**
@@ -130,20 +130,20 @@
/// active prediffer ID : helper to check the radio button
int m_CurrentPredifferID;
- BOOL m_bCurrentLineIsDiff; /**< TRUE if cursor is in diff line */
+ bool m_bCurrentLineIsDiff; /**< TRUE if cursor is in diff line */
CLocationView * m_pLocationView; /**< Pointer to locationview */
// Operations
public:
void RefreshOptions();
- BOOL EnableRescan(BOOL bEnable);
- BOOL IsReadOnly(int pane);
- void ShowDiff(BOOL bScroll, BOOL bSelectText);
+ bool EnableRescan(bool bEnable);
+ bool IsReadOnly(int pane);
+ void ShowDiff(bool bScroll, bool bSelectText);
virtual void OnEditOperation(int nAction, LPCTSTR pszText);
void UpdateLineLengths();
- BOOL IsLineInCurrentDiff(int nLine);
+ bool IsLineInCurrentDiff(int nLine);
void SelectNone();
- void SelectDiff(int nDiff, BOOL bScroll =TRUE, BOOL bSelectText =TRUE);
+ void SelectDiff(int nDiff, bool bScroll = true, bool bSelectText = true);
virtual CCrystalTextBuffer *LocateTextBuffer ();
void GetFullySelectedDiffs(int & firstDiff, int & lastDiff);
CString GetSelectedText();
@@ -151,7 +151,7 @@
CMergeDoc* GetDocument();
void UpdateResources();
BOOL IsModified() { return (LocateTextBuffer()->IsModified()); }
- BOOL PrimeListWithFile();
+ void PrimeListWithFile();
void SetStatusInterface(IMergeEditStatus * piMergeEditStatus);
void SelectArea(const CPoint & ptStart, const CPoint & ptEnd) { SetSelection(ptStart, ptEnd); } // make public
virtual void UpdateSiblingScrollPos (BOOL bHorz);
@@ -162,7 +162,7 @@
virtual void GetLineColors2 (int nLineIndex, DWORD ignoreFlags
, COLORREF & crBkgnd, COLORREF & crText, BOOL & bDrawWhitespace);
void WMGoto() { OnWMGoto(); };
- void GotoLine(UINT nLine, BOOL bRealLine, int pane);
+ void GotoLine(UINT nLine, bool bRealLine, int pane);
int GetTopLine() { return m_nTopLine; }
int GetScreenLines() { return CCrystalTextView::GetScreenLines(); }
int GetTopSubLine() { return m_nTopSubLine; }
@@ -190,8 +190,8 @@
HMENU createPrediffersSubmenu(HMENU hMenu);
bool IsInitialized() const;
- BOOL IsCursorInDiff() const;
- BOOL IsDiffVisible(int nDiff);
+ bool IsCursorInDiff() const;
+ bool IsDiffVisible(int nDiff);
void ZoomText(short amount);
// Overrides
@@ -213,9 +213,9 @@
virtual ~CMergeEditView();
virtual void OnUpdateSibling (CCrystalTextView * pUpdateSource, BOOL bHorz);
virtual void OnUpdateCaret();
- BOOL MergeModeKeyDown(MSG* pMsg);
+ bool MergeModeKeyDown(MSG* pMsg);
int FindPrediffer(LPCTSTR prediffer) const;
- BOOL IsDiffVisible(const DIFFRANGE& diff, int nLinesBelow = 0);
+ bool IsDiffVisible(const DIFFRANGE& diff, int nLinesBelow = 0);
// Generated message map functions
protected:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|