*/
void CDiffContext::AddDiff(LPCTSTR pszFilename, LPCTSTR szSubdir
, LPCTSTR pszLeftDir, LPCTSTR pszRightDir
- , long lmtime, long rmtime
- , long lctime, long rctime
+ , __int64 lmtime, __int64 rmtime
+ , __int64 lctime, __int64 rctime
, __int64 lsize, __int64 rsize
, BYTE code
)
}
m_pList->AddTail(di);
+ // ignore return value
SendMessage(m_hMainFrame, m_msgUpdateStatus, di.code, NULL);
}
/**
* @brief Convert a FILETIME to a long (standard time)
*/
-static long FileTimeToLong(FILETIME & ft)
+static __int64 FileTimeToInt64(FILETIME & ft)
{
return CTime(ft).GetTime();
}
HANDLE h = FindFirstFile(filepath, &wfd);
if (h != INVALID_HANDLE_VALUE)
{
- dfi.mtime = FileTimeToLong(wfd.ftLastWriteTime);
+ dfi.mtime = FileTimeToInt64(wfd.ftLastWriteTime);
dfi.flags.reset();
if (wfd.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
dfi.flags.flags += FileFlags::RO;
*/
struct DiffFileInfo
{
- long mtime; /**< time of last modification */
- long ctime; /**< time of creation */
+ // storing __time_t if MSVC6 (__MSC_VER<1300)
+ // storing __time64_t if MSVC7 (VC.NET)
+ __int64 mtime; /**< time of last modification */
+ __int64 ctime; /**< time of creation */
__int64 size; /**< file size in bytes */
CString version; /**< string of fixed file version, eg, 1.2.3.4 */
CString spath; /**< fully qualified directory of file */
// add & remove differences
void AddDiff(LPCTSTR pszFilename, LPCTSTR szSubdir, LPCTSTR pszLeftDir, LPCTSTR pszRightDir
- , long lmtime, long rmtime, long lctime, long rctime
+ , __int64 lmtime, __int64 rmtime, __int64 lctime, __int64 rctime
, __int64 lsize, __int64 rsize, BYTE code);
void AddDiff(DIFFITEM di);
void RemoveDiff(POSITION diffpos);
struct fentry
{
CString name;
- long mtime;
- long ctime;
+ // storing __time_t if MSVC6 (__MSC_VER<1300)
+ // storing __time64_t if MSVC7 (VC.NET)
+ __int64 mtime;
+ __int64 ctime;
_int64 size;
};
typedef CArray<fentry, fentry&> fentryArray;;
finder.GetCreationTime(ctim);
ent.mtime = mtim.GetTime();
ent.ctime = ctim.GetTime();
- ent.size = finder.GetLength64();
+#if _MSC_VER < 1300
+ // MSVC6
+ ent.size = finder.GetLength64(); // __int64
+#else
+ // MSVC7 (VC.NET)
+ ent.size = finder.GetLength(); // ULONGLONG
+#endif
ent.name = finder.GetFileName();
if (finder.IsDirectory())
dirs->Add(ent);
static void FilterAdd(const CString & sDir, const fentry * lent, const fentry * rent, int code, CDiffContext * pCtxt)
{
CString name, leftdir, rightdir;
- long rmtime=0, lmtime=0, rctime=0, lctime=0;
+ _int64 rmtime=0, lmtime=0, rctime=0, lctime=0;
_int64 lsize=0, rsize=0;
if (lent)
{
* @brief Called when compare thread asks UI update
* @note Currently thread asks update after compare is ready
*/
-void CDirView::OnUpdateUIMessage(WPARAM wParam, LPARAM lParam)
+LRESULT CDirView::OnUpdateUIMessage(WPARAM wParam, LPARAM lParam)
{
CDirDoc * pDoc = GetDocument();
ASSERT(pDoc);
if (mf->m_bScrollToFirst)
OnFirstdiff();
+ return 0; // return value unused
}
BOOL CDirView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
afx_msg void OnCurdiff();
afx_msg void OnUpdateCurdiff(CCmdUI* pCmdUI);
afx_msg void OnUpdateSave(CCmdUI* pCmdUI);
- afx_msg void OnUpdateUIMessage(WPARAM wParam, LPARAM lParam);
+ afx_msg LRESULT OnUpdateUIMessage(WPARAM wParam, LPARAM lParam);
afx_msg void OnRefresh();
afx_msg void OnUpdateRefresh(CCmdUI* pCmdUI);
afx_msg void OnTimer(UINT nIDEvent);
* @brief Return time displayed appropriately, as string
*/
static CString
-TimeString(const time_t * tim)
+TimeString(const __int64 * tim)
{
if (!tim) return _T("---");
// _tcsftime does not respect user date customizations from
// Regional Options/Configuration Regional; COleDateTime::Format does so.
+#if _MSC_VER < 1300
+ // MSVC6
+ COleDateTime odt = (time_t)*tim;
+#else
+ // MSVC7 (VC.NET)
COleDateTime odt = *tim;
+#endif
return odt.Format();
}
+/**
+ * @brief Function to compare two __int64s for a sort
+ */
+static int cmp64(__int64 i1, __int64 i2)
+{
+ if (i1==i2) return 0;
+ return i1>i2 ? 1 : -1;
+}
/**
* @{ Functions to display each type of column info
}
static int ColLmtimeSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
- return rdi.left.mtime-ldi.left.mtime;
+ return cmp64(rdi.left.mtime, ldi.left.mtime);
}
static int ColRmtimeSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
- return rdi.right.mtime-ldi.right.mtime;
+ return cmp64(rdi.right.mtime, ldi.right.mtime);
}
static int ColLctimeSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
- return rdi.left.ctime-ldi.left.ctime;
+ return cmp64(rdi.left.ctime, ldi.left.ctime);
}
static int ColRctimeSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
- return rdi.right.ctime-ldi.right.ctime;
+ return cmp64(rdi.right.ctime, ldi.right.ctime);
}
static int ColExtSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
}
static int ColLsizeSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
- return rdi.left.size - ldi.left.size;
+ return cmp64(rdi.left.size, ldi.left.size);
}
static int ColRsizeSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
- return rdi.right.size - ldi.right.size;
+ return cmp64(rdi.right.size, ldi.right.size);
}
static int ColNewerSort(const DIFFITEM & ldi, const DIFFITEM &rdi)
{
// compute max width : 97% of application width or 80% or full screen width
CRect rect;
GetWindowRect(rect);
- int maxWidth = rect.Width() * .97;
+ int maxWidth = (int)(rect.Width() * .97);
CRect rectScreen;
SystemParametersInfo(SPI_GETWORKAREA, 0, rectScreen, 0);
if (rectScreen.Width() * .8 > maxWidth)
- maxWidth = rectScreen.Width() * .8;
+ maxWidth = (int)(rectScreen.Width() * .8);
// use the tooltip font
HANDLE hFont = (HANDLE) ::SendMessage(pTTTStruct->hwndFrom, WM_GETFONT, 0, 0);
DoFileOpen(files[0], files[1], FFILEOPEN_NONE, FFILEOPEN_NONE, ctrlKey);
}
-void CMainFrame::OnUpdateStatusMessage(WPARAM wParam, LPARAM lParam)
+LRESULT CMainFrame::OnUpdateStatusMessage(WPARAM wParam, LPARAM lParam)
{
if (wParam == 0xFF)
clearStatus();
else
rptStatus(wParam);
+ return 0; // return value not meaningful
}
afx_msg void OnViewWhitespace();
afx_msg void OnUpdateViewWhitespace(CCmdUI* pCmdUI);
afx_msg void OnDropFiles(HDROP dropInfo);
- afx_msg void OnUpdateStatusMessage(WPARAM wParam, LPARAM lParam);
+ afx_msg LRESULT OnUpdateStatusMessage(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
return;
GetParentFrame()->SetActiveView(this, TRUE);
- if(CCrystalEditViewEx::OnEditUndo())
+ if(CCrystalEditViewEx::DoEditUndo())
{
--pDoc->curUndo;
pDoc->FlushAndRescan();
return;
GetParentFrame()->SetActiveView(this, TRUE);
- if(CCrystalEditViewEx::OnEditRedo())
+ if(CCrystalEditViewEx::DoEditRedo())
{
++pDoc->curUndo;
pDoc->FlushAndRescan();
}
}
-BOOL CCrystalEditView::
+void CCrystalEditView::
OnEditUndo ()
{
+ DoEditUndo();
+}
+
+BOOL CCrystalEditView::
+DoEditUndo ()
+{
if (m_pTextBuffer != NULL && m_pTextBuffer->CanUndo ())
{
CPoint ptCursorPos;
m_bDisableBSAtSOL = bDisableBSAtSOL;
}
-BOOL CCrystalEditView::
+void CCrystalEditView::
OnEditRedo ()
{
+ DoEditRedo();
+}
+
+BOOL CCrystalEditView::
+DoEditRedo ()
+{
if (m_pTextBuffer != NULL && m_pTextBuffer->CanRedo ())
{
CPoint ptCursorPos;
afx_msg void OnDestroy ();
afx_msg void OnEditReplace ();
afx_msg void OnUpdateEditUndo (CCmdUI * pCmdUI);
- afx_msg BOOL OnEditUndo ();
+ afx_msg void OnEditUndo ();
afx_msg void OnUpdateEditRedo (CCmdUI * pCmdUI);
- afx_msg BOOL OnEditRedo ();
+ afx_msg void OnEditRedo ();
afx_msg void OnUpdateEditAutoComplete (CCmdUI * pCmdUI);
afx_msg void OnEditAutoComplete ();
afx_msg void OnUpdateEditAutoExpand (CCmdUI * pCmdUI);
afx_msg void OnExtTextEnd();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
+ BOOL DoEditUndo();
+ BOOL DoEditRedo();
DECLARE_MESSAGE_MAP ()
};
Widen label IDC_PRIVATEBUILD on about box.
WinMerge: Merge.rc
Languages: *.rc
+ PATCH: [ 802120 ] Fix for VC.NET
+ WinMerge: DiffContext.cpp DiffContext.h DirScan.cpp DirView.cpp
+ DirView.h DirViewColItems.cpp EditorFilepathBar.cpp MainFrm.cpp
+ MainFrm.h MergeEditView.cpp
+ editlib: ccrystaleditview.cpp ccrystaleditview.h
2003-09-13 WinMerge experimental release 2.1.1.5 (patch demos)
2003-09-13 WinMerge experimental release 2.1.1.4 (cvs)