OSDN Git Service

PATCH: [ 805888 ] Unicode compile of WinMerge
authorPerry Rapp <elsapo@users.sourceforge.net>
Mon, 15 Sep 2003 01:06:37 +0000 (01:06 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Mon, 15 Sep 2003 01:06:37 +0000 (01:06 +0000)
32 files changed:
Src/ChildFrm.cpp
Src/Common/LanguageSelect.cpp
Src/Common/LanguageSelect.h
Src/Common/LogFile.cpp
Src/Common/RegExp.cpp
Src/Common/StatLink.cpp
Src/Common/SuperComboBox.cpp
Src/Common/SuperComboBox.h
Src/Common/coretools.cpp
Src/Common/dllproxy.c
Src/Common/lwdisp.c
Src/Common/lwdisp.h
Src/Diff.cpp
Src/DiffWrapper.cpp
Src/DirDoc.cpp
Src/DirFrame.cpp
Src/DirView.cpp
Src/DirViewColHandler.cpp
Src/EditorFilepathBar.cpp
Src/FilepathEdit.cpp
Src/MainFrm.cpp
Src/MainFrm.h
Src/Merge.cpp
Src/Merge.dsp
Src/MergeDoc.cpp
Src/MergeEditView.cpp
Src/OpenDlg.cpp
Src/PropColors.cpp
Src/diffutils/src/DIRENT.C
Src/editlib/ceditreplacedlg.cpp
Src/paths.cpp
Src/readme.txt

index 11ba06e..1dd5db4 100644 (file)
@@ -130,7 +130,7 @@ BOOL CChildFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/,
        // Merge frame has also a dockable bar at the very bottom
        // This is not the client area, but we create it now because we want
        // to use the CCreateContext
-       if (!m_wndDetailBar.Create(this, "", WS_CHILD | WS_VISIBLE, ID_VIEW_DETAIL_BAR))
+       if (!m_wndDetailBar.Create(this, _T(""), WS_CHILD | WS_VISIBLE, ID_VIEW_DETAIL_BAR))
        {
                TRACE0("Failed to create DiffViewBar\n");
                return FALSE;
index f23a2dd..6d98815 100644 (file)
@@ -231,7 +231,7 @@ BOOL  CLanguageSelect::SetLanguage(WORD wLangId)
                if (idx != -1
                        && *lang_map[idx].pszLocale != _T('\0'))
                {
-                       setlocale(LC_ALL, lang_map[idx].pszLocale);
+                       _tsetlocale(LC_ALL, lang_map[idx].pszLocale);
                }
        }
        
@@ -413,7 +413,7 @@ CString CLanguageSelect::GetPath( LPCTSTR FileName)
        TCHAR fname[_MAX_FNAME];
        TCHAR ext[_MAX_EXT];
        
-       _splitpath( FileName, drive, dir, fname, ext );
+       _tsplitpath( FileName, drive, dir, fname, ext );
        CString Path = drive;
        Path += dir;
 
@@ -428,7 +428,7 @@ void CLanguageSelect::GetAvailLangs( CWordArray& wLanguageAry,
                                                                        CStringArray& DllFileNames ) 
 {
        CString strPath;
-       char filespec[MAX_PATH+1];
+       TCHAR filespec[MAX_PATH+1];
        WORD wLanguage;
        
        if ( GetModuleFileName(m_hModule, filespec, _MAX_PATH ))
index c86b86b..0218f29 100644 (file)
@@ -10,8 +10,8 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CLanguageSelect dialog
-#define LANGUAGE_SECTION  "Locale"
-#define COUNTRY_ENTRY   "LanguageId"
+#define LANGUAGE_SECTION  _T("Locale")
+#define COUNTRY_ENTRY     _T("LanguageId")
 
 
 class CLanguageSelect : public CDialog
index ba6cc4a..633ee91 100644 (file)
@@ -45,10 +45,10 @@ CLogFile::CLogFile(LPCTSTR szLogName, LPCTSTR szLogPath /*= NULL*/, BOOL bDelete
        // write start banner
        CTime t = CTime::GetCurrentTime();
        CString s = t.Format(_T("Begin Log: %A, %B %d, %Y    %H:%M:%S"));
-    Write(_T("\n\n==========================================================================\n"
-               "==========================================================================\n"
-               "%s\n==========================================================================\n"
-               "==========================================================================\n"), s);
+       Write(_T("\n\n==========================================================================\n")
+               _T("==========================================================================\n")
+               _T("%s\n==========================================================================\n")
+               _T("==========================================================================\n"), s);
        Write(m_strLogPath);
 }
 
@@ -68,15 +68,11 @@ void CLogFile::Write(LPCTSTR pszFormat, ...)
        if (pszFormat != NULL)
                _vstprintf(buf, pszFormat, arglist);
        va_end(arglist);
-    _tcscat(buf, _T("\n"));
+       _tcscat(buf, _T("\n"));
        //TRACE(buf);
 
        FILE *f;
-#ifndef _UNICODE
-       if ((f=fopen(m_strLogPath, _T("a"))) != NULL)
-#else
-       if ((f=wfopen(m_strLogPath, L"a")) != NULL)
-#endif
+       if ((f=_tfopen(m_strLogPath, _T("a"))) != NULL)
        {
                _fputts(buf, f);
 
@@ -100,7 +96,7 @@ void CLogFile::Write(DWORD idFormatString, ...)
        {
                va_list arglist;
                va_start(arglist, idFormatString);
-               vsprintf(buf, strFormat, arglist);
+               _vstprintf(buf, strFormat, arglist);
                va_end(arglist);
                _tcscat(buf, _T("\n"));
 
@@ -130,7 +126,7 @@ void CLogFile::WriteError(CString JobID, CString ProcessID, CString Event, long
        
        CString sWriteString;
        
-       sWriteString.Format("%s %s %s %ld %s",JobID, ProcessID, Event, ecode, CIndex);
+       sWriteString.Format(_T("%s %s %s %ld %s"),JobID, ProcessID, Event, ecode, CIndex);
        Write(sWriteString);
 
 }
@@ -143,11 +139,7 @@ void CLogFile::Prune(FILE *f)
        FILE *tf;
        GetTempFileName(_T("."),_T("LOG"),0,tempfile);
        DeleteFile(tempfile);
-#ifndef _UNICODE
-       if ((tf=fopen(tempfile,"w")) != NULL)
-#else
-       if ((tf=wfopen(tempfile,L"w")) != NULL)
-#endif
+       if ((tf=_tfopen(tempfile,_T("w"))) != NULL)
        {
                fseek(f, ftell(f)/4, SEEK_SET);
                _fputts(_T("#### The log has been truncated due to size limits ####\n"), tf);
index a70eed7..f68f17f 100644 (file)
@@ -27,7 +27,7 @@
  
 #define        FAIL(m)         { regerror(m); return(NULL); }
 #define        ISREPN(c)       ((c) == _T('*') || (c) == _T('+') || (c) == _T('?'))
-#define        META            "^$.[()|?+*\\"
+#define        META            _T("^$.[()|?+*\\")
 
 // Flags to be passed up and down.
  
@@ -120,7 +120,7 @@ CRegExp* CRegExp::RegComp(const TCHAR *exp)
                 
                if (flags&SPSTART) 
                {
-                       char *longest = NULL;
+                       LPTSTR longest = NULL;
                        size_t len = 0;
 
                        for (; scan != NULL; scan = regnext(scan))
@@ -149,9 +149,9 @@ CRegExp* CRegExp::RegComp(const TCHAR *exp)
 
 TCHAR *CRegExp::reg(int paren, int *flagp)
 {
-       char *ret;
-       char *br;
-       char *ender;
+       TCHAR *ret;
+       TCHAR *br;
+       TCHAR *ender;
        int parno;
        int flags;
 
index ef8eba0..2c5a23b 100644 (file)
@@ -81,7 +81,7 @@ void CStaticLink::OnClicked()
        // Call ShellExecute to run the file.
        // For an URL, this means opening it in the browser.
        //
-       HINSTANCE h = ShellExecute(NULL, "open", m_link, NULL, NULL, SW_SHOWNORMAL);
+       HINSTANCE h = ShellExecute(NULL, _T("open"), m_link, NULL, NULL, SW_SHOWNORMAL);
        if ((UINT)h > 32) {
                m_bVisited = TRUE;      // (not really--might not have found link)
                Invalidate();                   // repaint to show visited color
index 0ff3f44..a0dd921 100644 (file)
@@ -83,13 +83,13 @@ END_MESSAGE_MAP()
 /////////////////////////////////////////////////////////////////////////////
 // CSuperComboBox message handlers
 
-void CSuperComboBox::LoadState(LPCSTR szRegSubKey, UINT nMaxItems)
+void CSuperComboBox::LoadState(LPCTSTR szRegSubKey, UINT nMaxItems)
 {
        CString s,s2;
-       UINT cnt = AfxGetApp()->GetProfileInt(szRegSubKey, "Count", 0);
+       UINT cnt = AfxGetApp()->GetProfileInt(szRegSubKey, _T("Count"), 0);
        for (UINT i=0; i < cnt && i < nMaxItems; i++)
        {
-               s2.Format("Item_%d", i);
+               s2.Format(_T("Item_%d"), i);
                s = AfxGetApp()->GetProfileString(szRegSubKey, s2);
                if (i==0)
                        SetWindowText(s);
@@ -99,7 +99,7 @@ void CSuperComboBox::LoadState(LPCSTR szRegSubKey, UINT nMaxItems)
        }
 }
 
-void CSuperComboBox::SaveState(LPCSTR szRegSubKey, UINT nMaxItems)
+void CSuperComboBox::SaveState(LPCTSTR szRegSubKey, UINT nMaxItems)
 {
        CString strItem,s,s2;
        int i,idx,cnt = GetCount();
@@ -107,7 +107,7 @@ void CSuperComboBox::SaveState(LPCSTR szRegSubKey, UINT nMaxItems)
        GetWindowText(strItem);
        if (!strItem.IsEmpty())
        {
-               AfxGetApp()->WriteProfileString(szRegSubKey, "Item_0", strItem);
+               AfxGetApp()->WriteProfileString(szRegSubKey, _T("Item_0"), strItem);
                idx=1;
        }
        else
@@ -118,12 +118,12 @@ void CSuperComboBox::SaveState(LPCSTR szRegSubKey, UINT nMaxItems)
                if (s != strItem
                        && !s.IsEmpty())
                {
-                       s2.Format("Item_%d", idx);
+                       s2.Format(_T("Item_%d"), idx);
                        AfxGetApp()->WriteProfileString(szRegSubKey, s2, s);
                        idx++;
                }
        }
-       AfxGetApp()->WriteProfileInt(szRegSubKey, "Count", idx);
+       AfxGetApp()->WriteProfileInt(szRegSubKey, _T("Count"), idx);
 }
 
 
@@ -355,7 +355,11 @@ CString CSuperComboBox::ExpandShortcut(CString &inFile)
         {
             // Make sure it's ANSI
             WORD wsz[MAX_PATH];
+#ifdef _UNICODE
+            wcsncpy(wsz, lpsz, sizeof(wsz));
+#else
             ::MultiByteToWideChar(CP_ACP, 0, lpsz, -1, wsz, MAX_PATH);
+#endif
 
             // Load shortcut
             hres = ppf->Load(wsz, STGM_READ);
index c5f7a96..4384640 100644 (file)
@@ -41,8 +41,8 @@ public:
 public:
        void ResetContent();
        void SetAutoAdd(BOOL bAdd = TRUE, UINT idstrAddText = 0);
-       void SaveState(LPCSTR szRegSubKey, UINT nMaxItems = 20);
-       void LoadState(LPCSTR szRegSubKey, UINT nMaxItems = 20);
+       void SaveState(LPCTSTR szRegSubKey, UINT nMaxItems = 20);
+       void LoadState(LPCTSTR szRegSubKey, UINT nMaxItems = 20);
        virtual ~CSuperComboBox();
 
        // Generated message map functions
index 36757a8..5d6cd1b 100644 (file)
@@ -52,9 +52,9 @@ BOOL GetFileTimes(LPCTSTR szFilename,
 long GetFileModTime(LPCTSTR szPath)
 {
        if (!szPath || !szPath[0]) return 0;
-       struct stat mystats;
+       struct _stat mystats;
        memset(&mystats, 0, sizeof(mystats));
-       int stat_result = stat(szPath, &mystats);
+       int stat_result = _tstat(szPath, &mystats);
        if (stat_result!=0)
                return 0;
        return mystats.st_mtime;
@@ -252,7 +252,7 @@ CString ConvertPath2PS(LPCTSTR szPath)
        TCHAR path[_MAX_PATH] = {0};
        _tcscpy(path,szPath);
 
-       replace_char(path, _T('\\'), _T('//'));
+       replace_char(path, _T('\\'), _T('/'));
        if (_tcslen(path)>2
                && path[1] == _T(':')
                && path[2] == _T('/'))
@@ -293,7 +293,7 @@ FileExtMatches(LPCTSTR filename, LPCTSTR ext)
 //   - extension (pExt), with no leading dot
 void SplitFilename(LPCTSTR pathLeft, CString* pPath, CString* pFile, CString* pExt)
 {
-       LPCTSTR pszChar = pathLeft + strlen(pathLeft);
+       LPCTSTR pszChar = pathLeft + _tcslen(pathLeft);
        LPCTSTR pend=pszChar, extptr=0;
        bool ext=false;
        while (pathLeft < --pszChar) 
@@ -321,7 +321,7 @@ void SplitFilename(LPCTSTR pathLeft, CString* pPath, CString* pFile, CString* pE
                                int len = pszChar - pathLeft;
                                if (*pszChar == ':') ++len; // Keep trailing colon ( eg, C:filename.txt)
                                TCHAR* pszDir = pPath->GetBufferSetLength(len);
-                               strncpy(pszDir, pathLeft, len);
+                               _tcsncpy(pszDir, pathLeft, len);
                                pszDir[len] = '\0'; // strncpy doesn't always zero-terminate
                                pPath->ReleaseBuffer();
                        }
index 342ff73..2a7605f 100644 (file)
@@ -177,7 +177,7 @@ static VOID NTAPI Load(HMODULE *phModule)
                        }
                        *ppfn++ = pfn;
                }
-               *phModule = GetModuleHandle(cPath);
+               *phModule = GetModuleHandleA(cPath);
        }
 }
 
index 075873c..0129229 100644 (file)
@@ -43,6 +43,7 @@ struct _RPC_ASYNC_STATE;      // avoid MSC warning C4115
 
 #include <shlobj.h>
 #include <shlwapi.h>
+#include <tchar.h>
 #include "lwdisp.h"
 #include "dllproxy.h"
 
@@ -76,7 +77,25 @@ LPSTR NTAPI ReportError(HRESULT sc, UINT style)
        return pc;
 }
 
-LPDISPATCH NTAPI CreateDispatchBySource(LPCCH source, LPCCH progid)
+void mycpyt2w(LPCTSTR tsz, wchar_t * wdest, int limit)
+{
+#ifdef _UNICODE
+       wcsncpy(wdest, tsz, limit);
+#else
+       MultiByteToWideChar(CP_ACP, 0, tsz, -1, wdest, limit);
+#endif
+}
+
+void mycpyt2a(LPCTSTR tsz, char * adest, int limit)
+{
+#ifdef _UNICODE
+       WideCharToMultiByte(CP_ACP, 0, tsz, -1, adest, limit, 0, 0);
+#else
+       strncpy(adest, tsz, limit);
+#endif
+}
+
+LPDISPATCH NTAPI CreateDispatchBySource(LPCTSTR source, LPCTSTR progid)
 {
        void *pv = 0;
        SCODE sc;
@@ -84,16 +103,16 @@ LPDISPATCH NTAPI CreateDispatchBySource(LPCCH source, LPCCH progid)
        if (source == 0)
        {
                CLSID clsid;
-               MultiByteToWideChar(CP_ACP, 0, progid, -1, wc, DIMOF(wc));
+               mycpyt2w(source, wc, DIMOF(wc));
                if SUCCEEDED(sc=CLSIDFromProgID(wc, &clsid))
                {
                        sc=CoCreateInstance(&clsid, 0, CLSCTX_ALL, &IID_IDispatch, &pv);
                }
        }
-       else if (PathMatchSpecA(source, "*.ocx"))
+       else if (PathMatchSpec(source, _T("*.ocx")))
        {
                ITypeLib *piTypeLib;
-               MultiByteToWideChar(CP_ACP, 0, source, -1, wc, DIMOF(wc));
+               mycpyt2w(source, wc, DIMOF(wc));
                if SUCCEEDED(sc=LoadTypeLib(wc, &piTypeLib))
                {
                        UINT count = piTypeLib->lpVtbl->GetTypeInfoCount(piTypeLib);
@@ -108,8 +127,8 @@ LPDISPATCH NTAPI CreateDispatchBySource(LPCCH source, LPCCH progid)
                                                BSTR bstrName = 0;
                                                if SUCCEEDED(sc=piTypeInfo->lpVtbl->GetDocumentation(piTypeInfo, MEMBERID_NIL, &bstrName, 0, 0, 0))
                                                {
-                                                       LPCCH name = B2A(bstrName);
-                                                       if (pTypeAttr->typekind == TKIND_COCLASS && lstrcmpA(name, progid) == 0)
+                                                       LPCTSTR name = B2T(bstrName);
+                                                       if (pTypeAttr->typekind == TKIND_COCLASS && lstrcmp(name, progid) == 0)
                                                        {
                                                                IClassFactory *piClassFactory;
                                                                EXPORT_DLLPROXY
@@ -117,7 +136,7 @@ LPDISPATCH NTAPI CreateDispatchBySource(LPCCH source, LPCCH progid)
                                                                        Dll, "",
                                                                        HRESULT(NTAPI*DllGetClassObject)(REFCLSID,REFIID,IClassFactory**);
                                                                );
-                                                               lstrcatA(Dll.SIG, source);
+                                                               mycpyt2a(source, Dll.SIG, sizeof(Dll.SIG));
                                                                if SUCCEEDED(sc=DLLPROXY(Dll)->DllGetClassObject(&pTypeAttr->guid, &IID_IClassFactory, &piClassFactory))
                                                                {
                                                                        sc=piClassFactory->lpVtbl->CreateInstance(piClassFactory, 0, &IID_IDispatch, &pv);
@@ -142,13 +161,16 @@ LPDISPATCH NTAPI CreateDispatchBySource(LPCCH source, LPCCH progid)
                bind_opts.grfMode = STGM_READWRITE;
                bind_opts.dwTickCountDeadline = 0;
                // prepend appropriate moniker:
-               if (PathMatchSpecA(source, "*.sct"))
+               if (PathMatchSpec(source, _T("*.sct")))
                {
                        MultiByteToWideChar(CP_ACP, 0, "script:", -1, wc, DIMOF(wc));
-                       MultiByteToWideChar(CP_ACP, 0, source, -1, wc+wcslen(wc), DIMOF(wc));
+
+                       mycpyt2w(source, wc+wcslen(wc), DIMOF(wc)-wcslen(wc));
                }
                else
-                       MultiByteToWideChar(CP_ACP, 0, source, -1, wc, DIMOF(wc));
+               {
+                       mycpyt2w(source, wc, DIMOF(wc));
+               }
                wc[DIMOF(wc)-1] = 0;
 
                // I observed that CoGetObject() may internally provoke an access
@@ -162,10 +184,10 @@ LPDISPATCH NTAPI CreateDispatchBySource(LPCCH source, LPCCH progid)
                        sein.hwnd = 0;
                        // SEE_MASK_FLAG_DDEWAIT: wait until application is ready to listen
                        sein.fMask = SEE_MASK_FLAG_DDEWAIT;
-                       sein.lpVerb = "open";
+                       sein.lpVerb = _T("open");
                        sein.lpFile = source;
                        sein.lpParameters = 0;
-                       sein.lpDirectory = ".";
+                       sein.lpDirectory = _T(".");
                        sein.nShow = SW_SHOWNORMAL;
                        if (ShellExecuteEx(&sein))
                        {
@@ -325,6 +347,15 @@ PCH NTAPI B2A(BSTR bcVal)
        return pcVal;
 }
 
+LPCTSTR NTAPI B2T(BSTR bcVal)
+{
+#ifdef _UNICODE
+       return bcVal;
+#else
+       return B2A(bcVal);
+#endif
+}
+
 STDAPI LWDefProc(PVOID UNUSED_ARG(target), HRESULT UNUSED_ARG(sc),
        VARIANT *UNUSED_ARG(ret), VARIANT *UNUSED_ARG(argv), UINT UNUSED_ARG(argc),
        EXCEPINFO *UNUSED_ARG(e))
index 4cddef6..4a45591 100644 (file)
@@ -88,7 +88,7 @@ LPSTR NTAPI ReportError(HRESULT, UINT style);
 // if source == 0, create an object of the class registered as *progid*
 // if progid == 0, create an object from file *source*
 // if neither of the above, ask *source* to create an object of class *progid*
-LPDISPATCH NTAPI CreateDispatchBySource(LPCCH source, LPCCH progid);
+LPDISPATCH NTAPI CreateDispatchBySource(LPCTSTR source, LPCTSTR progid);
 
 // invoke helpers
 STDAPI invokeV(LPDISPATCH, VARIANT *, DISPID, LPCCH, VARIANT *);
@@ -110,6 +110,7 @@ STDAPI ValidateArgs(VARIANT *argv, UINT argc, LPCCH pvt);
 
 // in place conversion of BSTR to LPCCH
 PCH NTAPI B2A(BSTR);
+LPCTSTR NTAPI B2T(BSTR);
 
 // callback interface related declarations
 
index 00cf967..3cb080e 100644 (file)
@@ -69,8 +69,9 @@ just_compare_files (LPCTSTR filepath1, LPCTSTR filepath2, int depth)
        ZeroMemory(&inf[0], sizeof(inf[0]));
        ZeroMemory(&inf[1], sizeof(inf[1]));
 
-       inf[0].name = filepath1;
-       inf[1].name = filepath2;
+       USES_CONVERSION;
+       inf[0].name = T2CA(filepath1);
+       inf[1].name = T2CA(filepath2);
 
        inf[0].desc = open(inf[0].name, O_RDONLY|O_BINARY, 0);
        if (inf[0].desc < 0)
index 3d3411b..6163eb2 100644 (file)
@@ -144,6 +144,8 @@ BOOL CDiffWrapper::SetCreatePatchFile(BOOL bCreatePatchFile)
  */
 BOOL CDiffWrapper::RunFileDiff()
 {
+       USES_CONVERSION;
+
        BOOL bRetStatus = FALSE;
        SwapToInternalSettings();
 
@@ -169,14 +171,14 @@ BOOL CDiffWrapper::RunFileDiff()
 
        /* Open the files and record their descriptors.  */
        if (sdir0.IsEmpty())
-               inf[0].name = sname0;
+               inf[0].name = T2CA(sname0);
        else
-               inf[0].name = free0 = dir_file_pathname (sdir0, sname0);
+               inf[0].name = free0 = dir_file_pathname (T2CA(sdir0), T2CA(sname0));
        inf[0].desc = -2;
        if (sdir1.IsEmpty())
-               inf[1].name = sname1;
+               inf[1].name = T2CA(sname1);
        else
-               inf[1].name = free1 = dir_file_pathname (sdir1, sname1);
+               inf[1].name = free1 = dir_file_pathname (T2CA(sdir1), T2CA(sname1));
        inf[1].desc = -2;
        if (inf[0].desc == -2)
        {
@@ -208,11 +210,11 @@ BOOL CDiffWrapper::RunFileDiff()
                        // what differences diff-engine sees!
 #ifdef _DEBUG
                        // throw the diff into a temp file
-                       char lpBuffer[MAX_PATH] = {0};       // path buffer
+                       TCHAR lpBuffer[MAX_PATH] = {0};       // path buffer
                        GetTempPath(MAX_PATH,lpBuffer);         // get path to Temp folder
                        CString path = CString(lpBuffer) + _T("Diff.txt");
 
-                       outfile = fopen(path, "w+");
+                       outfile = _tfopen(path, _T("w+"));
                        if (outfile != NULL)
                        {
                                print_normal_script(script);
@@ -223,7 +225,7 @@ BOOL CDiffWrapper::RunFileDiff()
                        // Create patch file
                        if (m_bCreatePatchFile)
                        {
-                               outfile = fopen(m_sPatchFile, "w+");
+                               outfile = _tfopen(m_sPatchFile, _T("w+"));
 
                                if (outfile != NULL)
                                {
@@ -320,7 +322,8 @@ BOOL CDiffWrapper::RunFileDiff()
                                                        translate_range (&inf[0], first0, last0, &trans_a0, &trans_b0);
                                                        translate_range (&inf[1], first1, last1, &trans_a1, &trans_b1);
                                                        AddDiffRange(trans_a0-1, trans_b0-1, trans_a1-1, trans_b1-1, (BYTE)op);
-                                                       TRACE("left=%d,%d   right=%d,%d   op=%d\n",trans_a0-1, trans_b0-1, trans_a1-1, trans_b1-1, op);
+                                                       TRACE(_T("left=%d,%d   right=%d,%d   op=%d\n"),
+                                                               trans_a0-1, trans_b0-1, trans_a1-1, trans_b1-1, op);
                                                }
                                        }
                                        
index fb998c4..43bc663 100644 (file)
@@ -347,11 +347,14 @@ CDirView * CDirDoc::GetMainView()
        return (CDirView*)GetNextView(ps2);
 }
 
+/**
+ * @brief Get modification time of specified file
+ */
 static long GetModTime(LPCTSTR szPath)
 {
-       struct stat mystats;
+       struct _stat mystats;
        bzero(&mystats, sizeof(mystats));
-       int stat_result = stat(szPath, &mystats);
+       int stat_result = _tstat(szPath, &mystats);
        if (stat_result!=0)
                return 0;
        return mystats.st_mtime;
@@ -416,7 +419,7 @@ CString GetPathOnly( const CString& sString )
                        if (nIdx > 1)
                        {
                                LPTSTR pszRet = sReturn.GetBufferSetLength(nIdx + 1);
-                               strncpy(pszRet, sString, nIdx);
+                               _tcsncpy(pszRet, sString, nIdx);
                                sReturn.ReleaseBuffer(nIdx);
                        }
                }
index f9080e1..bc78ca6 100644 (file)
@@ -132,7 +132,7 @@ void CDirFrame::ActivateFrame(int nCmdShow)
 
 void CDirFrame::OnUpdateStatusNum(CCmdUI* pCmdUI) 
 {
-       pCmdUI->SetText("");
+       pCmdUI->SetText(_T(""));
 }
 
 // Store callback which we check to see if we're allowed to close
index 1f5f850..a8a8e03 100644 (file)
@@ -332,7 +332,7 @@ void CDirView::OnContextMenu(CWnd*, CPoint point)
                ScreenToClient(&insidePt);
                lhti.pt = insidePt;
                i = GetListCtrl().HitTest(insidePt);
-               TRACE("i=%d\n", i);
+               TRACE(_T("i=%d\n"), i);
                if (i<0)
                        return;
        }
index d24cb22..be43b0d 100644 (file)
@@ -211,11 +211,6 @@ void CDirView::LoadColumnOrders()
  */
 void CDirView::ValidateColumnOrdering()
 {
-TRACE(" <%s>\n", COleDateTime::GetCurrentTime().Format());
-for (int k=0; k<m_invcolorder.GetSize();++k)
-       TRACE("invcolorder[%d]=%d\n", k, m_invcolorder[k]);
-for (k=0; k<m_colorder.GetSize();++k)
-       TRACE("colorder[%d]=%d\n", k, m_colorder[k]);
 
 #if _DEBUG
        ASSERT(m_invcolorder[0]>=0);
index b16bfe0..224ad21 100644 (file)
@@ -136,7 +136,7 @@ BOOL CEditorFilePathBar::OnToolTipNotify(UINT id, NMHDR * pTTTStruct, LRESULT *
 
                        // fill in the returned structure
                        CFilepathEdit * pItem = (CFilepathEdit*) GetDlgItem(nID);
-                       pTTT->lpszText = (char*) pItem->GetUpdatedTipText(&tempDC, maxWidth);
+                       pTTT->lpszText = (TCHAR*) pItem->GetUpdatedTipText(&tempDC, maxWidth);
 
                        // set old font back
                        if (hOldFont)
index 12f7405..2c85875 100644 (file)
@@ -122,7 +122,7 @@ int FormatFilePathForDisplayWidth(CDC * pDC, int maxWidth, CString & sFilepath)
                if (lastSlash >= 0)
                        iEndMin = lastSlash+1;
 
-               sFilepath.Insert(iBegin+iEndMin, "\n");
+               sFilepath.Insert(iBegin+iEndMin, _T("\n"));
                iBegin += iEndMin+2;
                nLines ++;
        }
index efed4fc..d925239 100644 (file)
@@ -521,7 +521,7 @@ BOOL CMainFrame::SaveToVersionControl(CString& strSavePath)
                        if (!spath.IsEmpty())
                        {
                                _chdrive(toupper(spath[0])-'A'+1);
-                               _chdir(spath);
+                               _tchdir(spath);
                        }
                        CString args;
                        args.Format(_T("checkout %s/%s"), m_strVssProject, sname);
@@ -571,10 +571,10 @@ BOOL CMainFrame::SaveToVersionControl(CString& strSavePath)
                        IVSSItems               m_vssis;
                        IVSSItem                m_vssi;
 
-            COleException *eOleException = new COleException;
+                       COleException *eOleException = new COleException;
                                
                        // BSP - Create the COM interface pointer to VSS
-                       if (FAILED(vssdb.CreateDispatch("SourceSafe", eOleException)))
+                       if (FAILED(vssdb.CreateDispatch(_T("SourceSafe"), eOleException)))
                        {
                                throw eOleException;    // catch block deletes.
                        }
@@ -602,14 +602,14 @@ BOOL CMainFrame::SaveToVersionControl(CString& strSavePath)
                        if (strLocalSpec.CompareNoCase(strSavePath))
                        {
                           // BSP - if the directories are different, let the user confirm the CheckOut
-                               int iRes = AfxMessageBox("The VSS Working Folder and the location of the current file do not match.  Continue?", MB_YESNO);
+                               int iRes = AfxMessageBox(_T("The VSS Working Folder and the location of the current file do not match.  Continue?"), MB_YESNO);
 
                                if (iRes != IDYES)
                                        return FALSE;   // BSP - if not Yes, bail.
                        }
 
             // BSP - Finally! Check out the file!
-                       m_vssi.Checkout("", strSavePath, 0);
+                       m_vssi.Checkout(_T(""), strSavePath, 0);
                }
        }
        break;
@@ -627,7 +627,7 @@ BOOL CMainFrame::SaveToVersionControl(CString& strSavePath)
                        if (!spath.IsEmpty())
                        {
                                _chdrive(toupper(spath[0])-'A'+1);
-                               _chdir(spath);
+                               _tchdir(spath);
                        }
                        DWORD code;
                        CString args;
@@ -990,7 +990,12 @@ BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*
                                pDirDoc->SetReadOnly(FALSE, FALSE);
                                pDirDoc->SetRecursive(bRecurse);
                                pDirDoc->SetDiffContext(pCtxt);
+#ifdef _UNICODE
+       // TODO
+       // regexp has some problem in Unicode ? 2003-09-14
+#else
                                pCtxt->SetRegExp(strExt);
+#endif
                                pDirDoc->Rescan();
                                if (m_bScrollToFirst)
                                {
@@ -1382,9 +1387,11 @@ void CMainFrame::FreeRegExpList()
 
 void CMainFrame::RebuildRegExpList()
 {
+       USES_CONVERSION;
+
        _TCHAR tmp[_MAX_PATH] = {0};
        _TCHAR* token;
-       _TCHAR sep[] = "\r\n";
+       _TCHAR sep[] = _T("\r\n");
        
        // destroy the old list if the it is not NULL
        FreeRegExpList();
@@ -1399,7 +1406,7 @@ void CMainFrame::RebuildRegExpList()
                token = _tcstok(tmp, sep);
                while (token)
                {
-                       add_regexp(&ignore_regexp_list, token);
+                       add_regexp(&ignore_regexp_list, T2A(token));
                        token = _tcstok(NULL, sep);
                }
        }
@@ -1430,11 +1437,13 @@ add_regexp(struct regexp_list **reglist,
   *reglist = r;
 }
 
-/// Utility function to update CSuperComboBox format MRU
-void CMainFrame::addToMru(LPCSTR szItem, LPCSTR szRegSubKey, UINT nMaxItems)
+/**
+ * @brief Utility function to update CSuperComboBox format MRU
+ */
+void CMainFrame::addToMru(LPCTSTR szItem, LPCTSTR szRegSubKey, UINT nMaxItems)
 {
        CString s,s2;
-       UINT cnt = AfxGetApp()->GetProfileInt(szRegSubKey, "Count", 0);
+       UINT cnt = AfxGetApp()->GetProfileInt(szRegSubKey, _T("Count"), 0);
        ++cnt;  // add new string
        if(cnt>nMaxItems)
        {
@@ -1443,15 +1452,15 @@ void CMainFrame::addToMru(LPCSTR szItem, LPCSTR szRegSubKey, UINT nMaxItems)
        // move items down a step
        for (UINT i=cnt ; i!=0; --i)
        {
-               s2.Format("Item_%d", i-1);
+               s2.Format(_T("Item_%d"), i-1);
                s = AfxGetApp()->GetProfileString(szRegSubKey, s2);
-               s2.Format("Item_%d", i);
+               s2.Format(_T("Item_%d"), i);
                AfxGetApp()->WriteProfileString(szRegSubKey, s2, s);
        }
        // add most recent item
-       AfxGetApp()->WriteProfileString(szRegSubKey, "Item_0", szItem);
+       AfxGetApp()->WriteProfileString(szRegSubKey, _T("Item_0"), szItem);
        // update count
-       AfxGetApp()->WriteProfileInt(szRegSubKey, "Count", cnt);
+       AfxGetApp()->WriteProfileInt(szRegSubKey, _T("Count"), cnt);
 }
 
 void CMainFrame::OnViewWhitespace() 
index af17235..759da8d 100644 (file)
@@ -189,7 +189,7 @@ protected:
        DECLARE_MESSAGE_MAP()
 
 private:
-       void addToMru(LPCSTR szItem, LPCSTR szRegSubKey, UINT nMaxItems = 20);
+       void addToMru(LPCTSTR szItem, LPCTSTR szRegSubKey, UINT nMaxItems = 20);
        // builds the regular expression list if the
        // user choose to ignore Ignore changes affecting only lines 
        // that match the specified regexp. 
index be8ea0d..5ed042c 100644 (file)
@@ -244,7 +244,7 @@ BOOL CMergeApp::InitInstance()
        else if (nFiles>0)
        {
                pMainFrame->m_strSaveAsPath = _T("");
-               pMainFrame->DoFileOpen(files[0], "",
+               pMainFrame->DoFileOpen(files[0], _T(""),
                        dwLeftFlags, dwRightFlags, recurse);
        }
        return TRUE;
index 29ff088..6d5443f 100644 (file)
@@ -4,7 +4,7 @@
 
 # TARGTYPE "Win32 (x86) Application" 0x0101
 
-CFG=Merge - Win32 Debug
+CFG=Merge - Win32 UnicodeDebug
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,
 !MESSAGE use the Export Makefile command and run
 !MESSAGE 
@@ -13,12 +13,14 @@ CFG=Merge - Win32 Debug
 !MESSAGE You can specify a configuration when running NMAKE
 !MESSAGE by defining the macro CFG on the command line. For example:
 !MESSAGE 
-!MESSAGE NMAKE /f "Merge.mak" CFG="Merge - Win32 Debug"
+!MESSAGE NMAKE /f "Merge.mak" CFG="Merge - Win32 UnicodeDebug"
 !MESSAGE 
 !MESSAGE Possible choices for configuration are:
 !MESSAGE 
 !MESSAGE "Merge - Win32 Release" (based on "Win32 (x86) Application")
 !MESSAGE "Merge - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "Merge - Win32 UnicodeRelease" (based on "Win32 (x86) Application")
+!MESSAGE "Merge - Win32 UnicodeDebug" (based on "Win32 (x86) Application")
 !MESSAGE 
 
 # Begin Project
@@ -87,12 +89,75 @@ LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
 # ADD LINK32 version.lib shlwapi.lib /nologo /subsystem:windows /debug /machine:I386 /out:"..\Build\MergeDebug/WinMerge.exe" /pdbtype:sept
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Merge___Win32_UnicodeRelease"
+# PROP BASE Intermediate_Dir "Merge___Win32_UnicodeRelease"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\Build\MergeUnicodeRelease"
+# PROP Intermediate_Dir "..\Build\MergeUnicodeRelease"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W4 /GR /GX /Zi /Od /I "." /I "..\common" /I ".\editlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1 /D EDITPADC_CLASS= /D "COMPILE_MULTIMON_STUBS" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W4 /GR /GX /Zi /Od /I "." /I "..\common" /I ".\editlib" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1 /D EDITPADC_CLASS= /D "COMPILE_MULTIMON_STUBS" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 version.lib shlwapi.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"..\Build\MergeRelease/WinMerge.exe" /verbose:lib
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 version.lib shlwapi.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"..\Build\MergeUnicodeRelease/WinMergeU.exe" /verbose:lib
+# SUBTRACT LINK32 /pdb:none
+# Begin Special Build Tool
+TargetPath=\dev\sf\wm\cvsver\Build\MergeUnicodeRelease\WinMergeU.exe
+SOURCE="$(InputPath)"
+PostBuild_Cmds=StampVer -vstampver.inf -i4 -j4 -o2 $(TargetPath)
+# End Special Build Tool
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# PROP BASE Use_MFC 6
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Merge___Win32_UnicodeDebug"
+# PROP BASE Intermediate_Dir "Merge___Win32_UnicodeDebug"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 6
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\Build\MergeUnicodeDebug"
+# PROP Intermediate_Dir "..\Build\MergeUnicodeDebug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "..\common" /I ".\editlib" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1 /D EDITPADC_CLASS= /D "COMPILE_MULTIMON_STUBS" /FR /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "..\common" /I ".\editlib" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1 /D EDITPADC_CLASS= /D "COMPILE_MULTIMON_STUBS" /D "UNICODE" /D "_UNICODE" /FR /Yu"stdafx.h" /FD /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 version.lib shlwapi.lib /nologo /subsystem:windows /debug /machine:I386 /out:"..\Build\MergeUnicodeDebug/WinMerge.exe" /pdbtype:sept
+# ADD LINK32 version.lib shlwapi.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /out:"..\Build\MergeUnicodeDebug/WinMergeU.exe" /pdbtype:sept
+
 !ENDIF 
 
 # Begin Target
 
 # Name "Merge - Win32 Release"
 # Name "Merge - Win32 Debug"
+# Name "Merge - Win32 UnicodeRelease"
+# Name "Merge - Win32 UnicodeDebug"
 # Begin Group "Source Files"
 
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -109,6 +174,18 @@ SOURCE=.\ANALYZE.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -130,6 +207,13 @@ SOURCE=.\ChildFrm.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -146,6 +230,18 @@ SOURCE=.\CMPBUF.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -166,6 +262,18 @@ SOURCE=.\CONTEXT.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -183,6 +291,13 @@ SOURCE=.\Diff.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# ADD CPP /O2
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -220,6 +335,13 @@ SOURCE=.\DirDoc.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -236,6 +358,18 @@ SOURCE=.\DIRENT.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -249,6 +383,13 @@ SOURCE=.\DirFrame.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -266,6 +407,13 @@ SOURCE=.\DirView.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -299,6 +447,18 @@ SOURCE=.\ED.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -331,6 +491,18 @@ SOURCE=.\FNMATCH.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -360,6 +532,18 @@ SOURCE=.\IFDEF.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -376,6 +560,18 @@ SOURCE=.\IO.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -410,6 +606,13 @@ SOURCE=.\MainFrm.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -423,6 +626,13 @@ SOURCE=.\Merge.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -444,6 +654,13 @@ SOURCE=.\MergeDoc.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -464,6 +681,18 @@ SOURCE=.\NORMAL.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -477,6 +706,13 @@ SOURCE=.\OpenDlg.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -506,6 +742,13 @@ SOURCE=.\PropGeneral.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -527,6 +770,13 @@ SOURCE=.\PropVss.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -543,6 +793,18 @@ SOURCE=.\REGEX.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -567,6 +829,18 @@ SOURCE=.\SIDE.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -592,6 +866,13 @@ SOURCE=.\Splash.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -620,6 +901,18 @@ SOURCE=.\StdAfx.cpp
 
 # ADD CPP /Yc"stdafx.h"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /Yc"stdafx.h"
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# ADD CPP /Yc"stdafx.h"
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# ADD BASE CPP /Yc"stdafx.h"
+# ADD CPP /Yc"stdafx.h"
+
 !ENDIF 
 
 # End Source File
@@ -644,6 +937,18 @@ SOURCE=.\UTIL.C
 
 # SUBTRACT CPP /YX /Yc /Yu
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# ADD BASE CPP /O2
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
+# SUBTRACT BASE CPP /YX /Yc /Yu
+# SUBTRACT CPP /YX /Yc /Yu
+
 !ENDIF 
 
 # End Source File
@@ -661,6 +966,13 @@ SOURCE=.\VssPrompt.cpp
 
 !ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
 
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeRelease"
+
+# SUBTRACT BASE CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+# SUBTRACT CPP /D "HAVE_STDLIB_H" /D "STDC_HEADERS" /D HAVE_STRING_H=1 /D PR_FILE_NAME=\"pr\" /D DIFF_PROGRAM=\"diff\" /D "REGEX_MALLOC" /D "__MSC__" /D "__NT__" /D USG=1
+
+!ELSEIF  "$(CFG)" == "Merge - Win32 UnicodeDebug"
+
 !ENDIF 
 
 # End Source File
@@ -1027,262 +1339,82 @@ SOURCE=.\res\winmerge.bmp
 # Begin Source File
 
 SOURCE=.\editlib\asp.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\basic.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\batch.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaleditview.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaleditview.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaleditview.inl
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaltextbuffer.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaltextbuffer.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaltextbuffer.inl
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
+# End Source File
+# Begin Source File
 
 SOURCE=.\editlib\ccrystaltextview.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaltextview.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaltextview.inl
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ccrystaltextview2.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ceditreplacedlg.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\ceditreplacedlg.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\cfindtextdlg.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\cfindtextdlg.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\chcondlg.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\chcondlg.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\cplusplus.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
@@ -1295,457 +1427,142 @@ SOURCE=.\editlib\cregexp.h
 # Begin Source File
 
 SOURCE=.\editlib\crystaleditviewex.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\crystaleditviewex.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\crystalparser.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\crystalparser.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\crystaltextblock.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\crystaltextblock.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\cs2cs.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\cs2cs.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\dcl.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\editcmd.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\editreg.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\edtlib.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\filesup.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\filesup.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\filesup.inl
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\fortran.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\fpattern.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\fpattern.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\gotodlg.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\gotodlg.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\html.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\is.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\java.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\lisp.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\memcombo.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\memcombo.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\memcombo.inl
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\pascal.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\perl.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\php.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\python.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\registry.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\registry.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\resource.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\rexx.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
@@ -1754,119 +1571,38 @@ SOURCE=.\editlib\rsrc.cpp
 # Begin Source File
 
 SOURCE=.\editlib\sgml.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\sh.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\siod.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\sql.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\statbar.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\statbar.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\tcl.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\tex.cpp
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=.\editlib\wispelld.h
-
-!IF  "$(CFG)" == "Merge - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "Merge - Win32 Debug"
-
-# PROP Intermediate_Dir "..\Build\MergeDebug"
-
-!ENDIF 
-
 # End Source File
 # End Group
 # Begin Source File
index 2c7ab28..d074259 100644 (file)
@@ -964,7 +964,7 @@ int CMergeDoc::CDiffTextBuffer::LoadFromFile(LPCTSTR pszFileName,
                m_nSourceEncoding = def->encoding;
        
        // Init filedata struct and open file as memory mapped 
-       _tcsncpy(fileData.fileName, pszFileName, sizeof(fileData.fileName));
+       _tcsncpy(fileData.fileName, pszFileName, countof(fileData.fileName));
        fileData.bWritable = FALSE;
        fileData.dwOpenFlags = OPEN_EXISTING;
        bSuccess = files_openFileMapped(&fileData);
@@ -1103,7 +1103,7 @@ BOOL CMergeDoc::CDiffTextBuffer::SaveToFile (LPCTSTR pszFileName,
                if (nCrlfStyle == CRLF_STYLE_MAC || nCrlfStyle == CRLF_STYLE_AUTOMATIC)
                {
                        // in place replace
-                       LPSTR pbuffer = text.GetBuffer(0);
+                       LPTSTR pbuffer = text.GetBuffer(0);
                        TCHAR tchEolMac = * GetStringEol(CRLF_STYLE_MAC);
                        TCHAR tchEolUnix = * GetStringEol(CRLF_STYLE_UNIX);
                        UINT i;
@@ -1126,9 +1126,9 @@ BOOL CMergeDoc::CDiffTextBuffer::SaveToFile (LPCTSTR pszFileName,
 
        // Init filedata struct and open file as memory mapped 
        if (bTempFile)
-               _tcsncpy(fileData.fileName, pszFileName, sizeof(fileData.fileName));
+               _tcsncpy(fileData.fileName, pszFileName, countof(fileData.fileName));
        else
-               _tcsncpy(fileData.fileName, szTempFileName, sizeof(fileData.fileName));
+               _tcsncpy(fileData.fileName, szTempFileName, countof(fileData.fileName));
 
        fileData.bWritable = TRUE;
        fileData.dwOpenFlags = CREATE_ALWAYS;
index b806b38..f9c5af2 100644 (file)
@@ -1168,7 +1168,7 @@ static UINT NTAPI PopulateMenu(HMENU hMenu, UINT uID, LPDISPATCH piDispatch)
                                                        if SUCCEEDED(piTypeInfo->GetNames(pFuncDesc->memid,
                                                                &bstrName, 1, &cNames))
                                                        {
-                                                               PCH pchName = B2A(bstrName);
+                                                               LPCTSTR pchName = B2T(bstrName);
                                                                AppendMenu(hMenu, MF_STRING, uID++, pchName);
                                                                SysFreeString(bstrName);
                                                        }
@@ -1196,11 +1196,11 @@ void CMergeEditView::OnContextMenu(CWnd* pWnd, CPoint point)
 
        if (piScript == 0)
        {
-               char path[MAX_PATH];
-               ::GetModuleFileNameA(0, path, sizeof path);
-               ::PathRemoveFileSpecA(path);
-               ::PathAppendA(path, "contextmenu.sct");
-               piScript = ::CreateDispatchBySource(path, "Scriptlet");
+               TCHAR path[MAX_PATH];
+               ::GetModuleFileName(0, path, sizeof path);
+               ::PathRemoveFileSpec(path);
+               ::PathAppend(path, _T("contextmenu.sct"));
+               piScript = ::CreateDispatchBySource(path, _T("Scriptlet"));
        }
 
        if (piScript == 0)
@@ -1209,7 +1209,7 @@ void CMergeEditView::OnContextMenu(CWnd* pWnd, CPoint point)
        HMENU hMenu = ::CreatePopupMenu();
        ::PopulateMenu(hMenu, 101, piScript);
        ::AppendMenu(hMenu, MF_SEPARATOR, -1, 0);
-       ::AppendMenu(hMenu, MF_STRING, 100, "Unload script");
+       ::AppendMenu(hMenu, MF_STRING, 100, _T("Unload script"));
 
        if (short response = ::TrackPopupMenu(hMenu, TPM_RETURNCMD, point.x, point.y, 0, m_hWnd, 0))
        {
index da931f0..d29d9d9 100644 (file)
@@ -234,8 +234,8 @@ BOOL COpenDlg::SelectFile(CString& path, LPCTSTR pszFolder)
        CFileDialog pdlg(TRUE, NULL, DIRSEL_TAG, flags, s);
        CString title;
        VERIFY(title.LoadString(IDS_OPEN_TITLE));
-       pdlg.m_ofn.lpstrTitle = (LPCTSTR)title;
-       pdlg.m_ofn.lpstrInitialDir = (LPSTR)pszFolder;
+       pdlg.m_ofn.lpstrTitle = title;
+       pdlg.m_ofn.lpstrInitialDir = pszFolder;
 
        if (pdlg.DoModal()==IDOK)
        {
index 2fcebb2..212bef9 100644 (file)
@@ -145,7 +145,7 @@ void CPropColors::LoadCustomColors()
        for (int i = 0; i < CustomColorsAmount; i++)
        {
                CString sEntry;
-               sEntry.Format("%d", i);
+               sEntry.Format(_T("%d"), i);
                m_cCustColors[i] = ::AfxGetApp()->GetProfileInt(Section,
                        sEntry, RGB(255, 255, 255));
        }
@@ -156,7 +156,7 @@ void CPropColors::SaveCustomColors()
        for (int i = 0; i < CustomColorsAmount; i++)
        {
                CString sEntry;
-               sEntry.Format("%d", i);
+               sEntry.Format(_T("%d"), i);
                if (m_cCustColors[i] == RGB(255, 255, 255))
                        ::AfxGetApp()->WriteProfileString(Section, sEntry, NULL);
                else 
index 9914c3d..4b35f90 100644 (file)
@@ -295,7 +295,7 @@ loadDir(DIRENT *dir)
        if ( DosQFileMode(dir->path, &mode, 0L) ||
 #endif /*__OS2__*/
 #ifdef __NT__
-       if ( ((mode = GetFileAttributes(dir->path)) == 0xFFFFFFFF) ||
+       if ( ((mode = GetFileAttributesA(dir->path)) == 0xFFFFFFFF) ||
 #endif /*__NT__*/
             !(mode & FA_DIREC) )
        {
index bc903a5..34ab35a 100644 (file)
@@ -442,7 +442,7 @@ OnEditReplaceAll ()
   // Let user know how many strings were replaced
   CString strMessage;
   CString strNumber;
-  strNumber.Format( "%d", nNumReplaced );
+  strNumber.Format( _T("%d"), nNumReplaced );
   AfxFormatString1(strMessage, IDS_NUM_REPLACED, strNumber);
 
   AfxMessageBox( strMessage );
index cd7025e..166dbb4 100644 (file)
@@ -289,12 +289,11 @@ CString ExpandShortcut(CString &inFile)
         hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*) &ppf);
         if (SUCCEEDED(hres))
         {
-            // Make sure it's ANSI
-            WORD wsz[MAX_PATH];
-            ::MultiByteToWideChar(CP_ACP, 0, inFile, -1, wsz, MAX_PATH);
-
+            USES_CONVERSION;
+            LPCTSTR szFile = inFile;
             // Load shortcut
-            hres = ppf->Load(wsz, STGM_READ);
+            hres = ppf->Load(T2CW(szFile), STGM_READ);
+
             if (SUCCEEDED(hres)) {
                                WIN32_FIND_DATA wfd;
                                // find the path from that
index ef9fe4d..4528089 100644 (file)
@@ -5,6 +5,14 @@
    MainFrm.cpp MainFrm.h
  PATCH: [ 805427 ] Delete unused CStdioFile variable in PrimeTextBuffers
   WinMerge: MergeDoc.cpp
+ PATCH: [ 805888 ] Unicode compile of WinMerge
+  common: coretools.cpp dllproxy.c LanguageSelect.cpp LanguageSelect.h
+   LogFile.cpp lwdisp.c lwdisp.h RegExp.cpp RegExp.h StatLink.cpp
+   SuperComboBox.cpp SuperComboBox.h
+  WinMerge: ChildFrm.cpp Diff.cpp DiffWrapper.cpp DirDoc.cpp DIRENT.C DirFrame.cpp
+   DirView.cpp DirViewColHandler.cpp EditorFilepathBar.cpp FilepathEdit.cpp
+   MainFrm.cpp MainFrm.h Merge.cpp Merge.dsp MergeDoc.cpp MergeEditView.cpp
+   OpenDlg.cpp paths.cpp PropColors.cpp
 
 2003-09-13 Perry
  Widen label IDC_PRIVATEBUILD on about box.