OSDN Git Service

Fix Testing\EditorTest build problem
authorsdottaka <none@none>
Sat, 22 May 2010 05:38:41 +0000 (14:38 +0900)
committersdottaka <none@none>
Sat, 22 May 2010 05:38:41 +0000 (14:38 +0900)
Src/editlib/ccrystaltextbuffer.cpp
Src/editlib/ccrystaltextbuffer.h
Testing/EditorTest/Sample.rc
Testing/EditorTest/SampleDoc.h
Testing/EditorTest/SampleStatic.dsp
Testing/EditorTest/StdAfx.cpp
Testing/EditorTest/StdAfx.h
Testing/EditorTest/resource.h

index cf49380..774a8a7 100644 (file)
@@ -358,7 +358,7 @@ static LPCTSTR crlfs[] =
   };
 
 BOOL CCrystalTextBuffer::
-LoadFromFile (LPCTSTR pszFileName, int nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/ )
+LoadFromFile (LPCTSTR pszFileName, CRLFSTYLE nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/ )
 {
   ASSERT (!m_bInit);
   ASSERT (m_aLines.size() == 0);
@@ -398,7 +398,8 @@ LoadFromFile (LPCTSTR pszFileName, int nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/ )
       if (nCrlfStyle == CRLF_STYLE_AUTOMATIC)
         {
           //  Try to determine current CRLF mode based on first line
-          for (DWORD I = 0; I < dwCurSize; I++)
+          DWORD I;
+          for (I = 0; I < dwCurSize; I++)
             {
               if ((pcBuf[I] == _T('\x0d')) || (pcBuf[I] == _T('\x0a')))
                 break;
@@ -428,7 +429,7 @@ LoadFromFile (LPCTSTR pszFileName, int nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/ )
       ASSERT (nCrlfStyle >= 0 && nCrlfStyle <= 2);
       m_nCRLFMode = nCrlfStyle;
 
-      m_aLines.setsize(4096);
+      m_aLines.reserve(4096);
 
       DWORD dwBufPtr = 0;
       while (dwBufPtr < dwCurSize)
@@ -463,12 +464,12 @@ LoadFromFile (LPCTSTR pszFileName, int nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/ )
               nCurrentLength = 0;
               if (m_nSourceEncoding >= 0)
                 iconvert (pcLineBuf, m_nSourceEncoding, 1, m_nSourceEncoding == 15);
-              InsertLine (pcLineBuf);
+              InsertLine (pcLineBuf, lstrlen(pcLineBuf));
             }
         }
 
       pcLineBuf[nCurrentLength] = 0;
-      InsertLine (pcLineBuf);
+      InsertLine (pcLineBuf, nCurrentLength);
 
       ASSERT (m_aLines.size() > 0);   //  At least one empty line must present
 
@@ -476,7 +477,6 @@ LoadFromFile (LPCTSTR pszFileName, int nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/ )
       m_bReadOnly = (dwFileAttributes & FILE_ATTRIBUTE_READONLY) != 0;
       m_bModified = FALSE;
       m_bUndoGroup = m_bUndoBeginGroup = FALSE;
-      m_nUndoBufSize = UNDO_BUF_SIZE;
       m_nSyncPosition = m_nUndoPosition = 0;
       ASSERT (m_aUndoBuf.size () == 0);
       bSuccess = TRUE;
@@ -501,7 +501,7 @@ LoadFromFile (LPCTSTR pszFileName, int nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/ )
 // WinMerge has own routine for saving
 #ifdef CRYSTALEDIT_ENABLESAVER
 BOOL CCrystalTextBuffer::SaveToFile(LPCTSTR pszFileName,
-                  int nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/,
+                  CRLFSTYLE nCrlfStyle /*= CRLF_STYLE_AUTOMATIC*/,
                   BOOL bClearModifiedFlag /*= TRUE*/)
 {
   ASSERT (nCrlfStyle == CRLF_STYLE_AUTOMATIC || nCrlfStyle == CRLF_STYLE_DOS ||
@@ -544,15 +544,15 @@ BOOL CCrystalTextBuffer::SaveToFile(LPCTSTR pszFileName,
           int nLineCount = m_aLines.size();
           for (int nLine = 0; nLine < nLineCount; nLine++)
             {
-              int nLength = m_aLines[nLine].m_nLength;
+              int nLength = m_aLines[nLine].Length();
               DWORD dwWrittenBytes;
               if (nLength > 0)
                 {
-                  LPCTSTR pszLine = m_aLines[nLine].m_pcLine;
+                  LPCTSTR pszLine = m_aLines[nLine].GetLine(0);
                   if (m_nSourceEncoding >= 0)
                     {
                       LPTSTR pszBuf;
-                      iconvert_new (m_aLines[nLine].m_pcLine, &pszBuf, 1, m_nSourceEncoding, m_nSourceEncoding == 15);
+                      iconvert_new (m_aLines[nLine].GetLine(0), &pszBuf, 1, m_nSourceEncoding, m_nSourceEncoding == 15);
                       if (!::WriteFile (hTempFile, pszBuf, nLength, &dwWrittenBytes, NULL))
                         {
                           free (pszBuf);
@@ -857,8 +857,7 @@ void CCrystalTextBuffer::GetTextWithoutEmptys(int nStartLine, int nStartChar,
                  CString &text, CRLFSTYLE nCrlfStyle /* CRLF_STYLE_AUTOMATIC */,
                  BOOL bExcludeInvisibleLines/*=TRUE*/) const
 {
-  LPCTSTR sEol = GetStringEol (nCrlfStyle);
-  GetText(nStartLine, nStartChar, nEndLine, nEndChar, text, sEol, bExcludeInvisibleLines);
+  GetText(nStartLine, nStartChar, nEndLine, nEndChar, text, (nCrlfStyle == CRLF_STYLE_AUTOMATIC) ? NULL : GetStringEol (nCrlfStyle), bExcludeInvisibleLines);
 }
 
 
@@ -878,15 +877,15 @@ GetText (int nStartLine, int nStartChar, int nEndLine, int nEndChar,
   // assert to be sure to catch these 'do nothing' cases.
   ASSERT (nStartLine != nEndLine || nStartChar != nEndChar);
 
-  if (pszCRLF == NULL)
-    pszCRLF = crlf;
-  int nCRLFLength = (int) _tcslen (pszCRLF);
-  ASSERT (nCRLFLength > 0);
+  int nCRLFLength;
+  LPCTSTR pszCurCRLF;
 
   int nBufSize = 0;
   for (int L = nStartLine; L <= nEndLine; L++)
     {
       nBufSize += m_aLines[L].Length();
+      pszCurCRLF = pszCRLF ? pszCRLF : m_aLines[L].GetEol();
+      nCRLFLength = lstrlen(pszCurCRLF);
       nBufSize += nCRLFLength;
     }
 
@@ -901,7 +900,9 @@ GetText (int nStartLine, int nStartChar, int nEndLine, int nEndChar,
           memcpy (pszBuf, startLine.GetLine(nStartChar), sizeof (TCHAR) * nCount);
           pszBuf += nCount;
         }
-      memcpy (pszBuf, pszCRLF, sizeof (TCHAR) * nCRLFLength);
+      pszCurCRLF = pszCRLF ? pszCRLF : startLine.GetEol();
+         nCRLFLength = lstrlen(pszCurCRLF);
+      memcpy (pszBuf, pszCurCRLF, sizeof (TCHAR) * nCRLFLength);
       pszBuf += nCRLFLength;
       for (int I = nStartLine + 1; I < nEndLine; I++)
         {
@@ -914,7 +915,9 @@ GetText (int nStartLine, int nStartChar, int nEndLine, int nEndChar,
               memcpy (pszBuf, li.GetLine(), sizeof (TCHAR) * nCount);
               pszBuf += nCount;
             }
-          memcpy (pszBuf, pszCRLF, sizeof (TCHAR) * nCRLFLength);
+          pszCurCRLF = pszCRLF ? pszCRLF : startLine.GetEol();
+             nCRLFLength = lstrlen(pszCurCRLF);
+          memcpy (pszBuf, pszCurCRLF, sizeof (TCHAR) * nCRLFLength);
           pszBuf += nCRLFLength;
         }
       if (nEndChar > 0)
@@ -1380,7 +1383,7 @@ Undo (CCrystalTextView * pSource, CPoint & ptCursorPos)
               (apparent_ptEndPos.x <= m_aLines[apparent_ptEndPos.y].Length()))
             {
               GetTextWithoutEmptys (apparent_ptStartPos.y, apparent_ptStartPos.x, apparent_ptEndPos.y, apparent_ptEndPos.x, text, CRLF_STYLE_AUTOMATIC, FALSE);
-              if (_tcscmp(text, ur.GetText()) == 0)
+              if (text.GetLength() == ur.GetTextLength() && memcmp(text, ur.GetText(), text.GetLength() * sizeof(TCHAR)) == 0)
                 {
                   VERIFY (InternalDeleteText (pSource, apparent_ptStartPos.y, apparent_ptStartPos.x, apparent_ptEndPos.y, apparent_ptEndPos.x));
                   ptCursorPos = apparent_ptStartPos;
@@ -1465,7 +1468,7 @@ Redo (CCrystalTextView * pSource, CPoint & ptCursorPos)
 #ifdef _ADVANCED_BUGCHECK
           CString text;
           GetTextWithoutEmptys (apparent_ptStartPos.y, apparent_ptStartPos.x, apparent_ptEndPos.y, apparent_ptEndPos.x, text, CRLF_STYLE_AUTOMATIC, FALSE);
-          ASSERT (lstrcmp (text, ur.GetText ()) == 0);
+          ASSERT (text.GetLength() == ur.GetTextLength() && memcmp (text, ur.GetText (), text.GetLength() * sizeof(TCHAR)) == 0);
 #endif
           VERIFY(DeleteText(pSource, apparent_ptStartPos.y, apparent_ptStartPos.x, 
             apparent_ptEndPos.y, apparent_ptEndPos.x, 0, FALSE, FALSE));
index 1f1dd9f..bb8c95d 100644 (file)
@@ -199,10 +199,10 @@ public :
 
 // WinMerge has own routines for loading and saving
 #ifdef CRYSTALEDIT_ENABLELOADER
-    BOOL LoadFromFile (LPCTSTR pszFileName, int nCrlfStyle = CRLF_STYLE_AUTOMATIC);
+    BOOL LoadFromFile (LPCTSTR pszFileName, CRLFSTYLE nCrlfStyle = CRLF_STYLE_AUTOMATIC);
 #endif
 #ifdef CRYSTALEDIT_ENABLESAVER
-    BOOL SaveToFile(LPCTSTR pszFileName, int nCrlfStyle = CRLF_STYLE_AUTOMATIC, 
+    BOOL SaveToFile(LPCTSTR pszFileName, CRLFSTYLE nCrlfStyle = CRLF_STYLE_AUTOMATIC, 
     BOOL bClearModifiedFlag = TRUE);
 #endif
 
index c82d611..1d526d8 100755 (executable)
@@ -571,6 +571,20 @@ BEGIN
     ID_INDICATOR_ENCODING   "Unicode"
 END
 
+// EOL types shown in folder compare EOL type column and in file compare statusbar\r
+STRINGTABLE\r
+BEGIN\r
+    IDS_EOL_DOS             "Win"\r
+    IDS_EOL_MAC             "Mac"\r
+    IDS_EOL_UNIX            "Unix"\r
+    IDS_EOL_MIXED           "Mixed"\r
+    IDS_EOL_BIN             "Binary"\r
+    IDS_EOL_LF              "LF"\r
+    IDS_EOL_CR              "CR"\r
+    IDS_EOL_CRLF            "CRLF"\r
+    IDS_EOL_NONE            "None"\r
+END\r
+
 #endif    // English (U.S.) resources
 /////////////////////////////////////////////////////////////////////////////
 
index 99d7639..48c155f 100755 (executable)
@@ -11,7 +11,7 @@
 
 #include "CCrystalTextBuffer.h"
 #include "SyntaxColors.h"
-#include "OptionsMgr.h"
+#include "RegOptionsMgr.h"
 
 class CSampleDoc : public CDocument
 {
index fe666a6..c10716e 100755 (executable)
@@ -45,7 +45,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\Src" /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\Src" /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /I "..\..\Externals\pcre\Win32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /Yu"stdafx.h" /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
 # ADD BASE RSC /l 0x419 /d "NDEBUG" /d "_AFXDLL"
@@ -55,7 +55,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
-# ADD LINK32 imm32.lib shlwapi.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\output"
+# ADD LINK32 imm32.lib shlwapi.lib ..\..\Build\pcre\minsizerel\pcre.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\output"
 
 !ELSEIF  "$(CFG)" == "SampleStatic - Win32 Debug"
 
@@ -71,7 +71,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\Src" /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /FR /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".\Src" /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /I "..\..\Externals\pcre\Win32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /FR /Yu"stdafx.h" /FD /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
 # ADD BASE RSC /l 0x419 /d "_DEBUG" /d "_AFXDLL"
@@ -81,7 +81,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 imm32.lib shlwapi.lib /nologo /subsystem:windows /profile /debug /machine:I386 /libpath:"..\output"
+# ADD LINK32 imm32.lib shlwapi.lib ..\..\Build\pcre\minsizerel\pcre.lib /nologo /subsystem:windows /profile /debug /machine:I386 /libpath:"..\output"
 
 !ELSEIF  "$(CFG)" == "SampleStatic - Win32 Unicode Release"
 
@@ -98,7 +98,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\Src" /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /D "NDEBUG" /D "_UNICODE" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\Src" /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /I "..\..\Externals\pcre\Win32" /D "NDEBUG" /D "_UNICODE" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /Yu"stdafx.h" /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
 # ADD BASE RSC /l 0x419 /d "NDEBUG" /d "_AFXDLL"
@@ -108,7 +108,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 /out:"Release/crysedit_demo.exe"
-# ADD LINK32 imm32.lib shlwapi.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /libpath:"..\output"
+# ADD LINK32 imm32.lib shlwapi.lib ..\..\Build\pcre\minsizerel\pcre.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /machine:I386 /libpath:"..\output"
 
 !ELSEIF  "$(CFG)" == "SampleStatic - Win32 Unicode Debug"
 
@@ -125,7 +125,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /D "_DEBUG" /D "_UNICODE" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /Yu"stdafx.h" /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "..\..\Src\editlib" /I "..\..\Src\Common" /I "..\..\Src" /I "..\..\Externals\pcre\Win32" /D "_DEBUG" /D "_UNICODE" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D EDITPADC_CLASS= /D "CRYSTALEDIT_ENABLELOADER" /D "CRYSTALEDIT_ENABLESAVER" /Yu"stdafx.h" /FD /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
 # ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
@@ -135,7 +135,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 imm32.lib shlwapi.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\output"
+# ADD LINK32 imm32.lib shlwapi.lib ..\..\Build\pcre\minsizerel\pcre.lib /nologo /entry:"wWinMainCRTStartup" /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\output"
 
 !ENDIF 
 
@@ -363,6 +363,10 @@ SOURCE=..\..\Src\editlib\csharp.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Src\editlib\css.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Src\editlib\dcl.cpp
 # End Source File
 # Begin Source File
@@ -435,6 +439,14 @@ SOURCE=..\..\Src\editlib\java.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Src\editlib\LineInfo.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Src\editlib\LineInfo.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Src\editlib\lisp.cpp
 # End Source File
 # Begin Source File
@@ -467,6 +479,14 @@ SOURCE=..\..\Src\editlib\php.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Src\editlib\po.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Src\editlib\powershell.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Src\editlib\python.cpp
 # End Source File
 # Begin Source File
@@ -531,6 +551,18 @@ SOURCE=..\..\Src\editlib\tex.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Src\editlib\UndoRecord.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Src\editlib\UndoRecord.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Src\editlib\verilog.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Src\editlib\wispelld.h
 # End Source File
 # Begin Source File
@@ -552,6 +584,7 @@ SOURCE=.\isx.h
 # Begin Source File
 
 SOURCE=..\..\Src\Common\OptionsMgr.cpp
+# SUBTRACT CPP /YX /Yc /Yu
 # End Source File
 # Begin Source File
 
@@ -559,6 +592,15 @@ SOURCE=..\..\Src\Common\OptionsMgr.h
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Src\Common\RegOptionsMgr.cpp
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Src\Common\RegOptionsMgr.h
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Src\Common\SuperComboBox.cpp
 # End Source File
 # Begin Source File
@@ -576,6 +618,7 @@ SOURCE=..\..\Src\SyntaxColors.h
 # Begin Source File
 
 SOURCE=..\..\Src\Common\varprop.cpp
+# SUBTRACT CPP /YX /Yc /Yu
 # End Source File
 # Begin Source File
 
index 71c68fe..2eec123 100755 (executable)
@@ -4,3 +4,52 @@
 
 #include "stdafx.h"
 
+
+/**
+ * @brief Load string resource and return as CString.
+ * @param [in] id Resource string ID.
+ * @return Resource string as CString.
+ */
+String LoadResString(UINT id)
+{
+       TCHAR szBuf[512];
+       LoadString(NULL, id, szBuf, sizeof(szBuf));
+       return String(szBuf);
+}
+
+/**
+ * @brief Wrapper around CMergeApp::TranslateDialog()
+ */
+void NTAPI LangTranslateDialog(HWND h)
+{
+}
+
+/**
+ * @brief Lang aware version of AfxFormatStrings()
+ */
+void NTAPI LangFormatStrings(CString &rString, UINT id, LPCTSTR const *rglpsz, int nString)
+{
+       String fmt = LoadResString(id);
+       AfxFormatStrings(rString, fmt.c_str(), rglpsz, nString);
+}
+
+/**
+ * @brief Lang aware version of AfxFormatString1()
+ */
+void NTAPI LangFormatString1(CString &rString, UINT id, LPCTSTR lpsz1)
+{
+       LangFormatStrings(rString, id, &lpsz1, 1);
+}
+
+// Make a CString from printf-style args (single call version of CString::Format)
+CString Fmt(LPCTSTR fmt, ...)
+{
+       CString str;
+       va_list args;
+       va_start(args, fmt);
+       str.FormatV(fmt, args);
+       va_end(args);
+       return str;
+}
+
+
index b78716b..de1aca5 100755 (executable)
 #pragma warning(disable:4786)
 
 #include "isx.h"
+
+#include "UnicodeString.h"
+
+       /** @brief Load string from string resources; shortcut for CString::LoadString */
+String LoadResString(UINT id);
+
+       /** @brief Wrapper around CMergeApp::TranslateDialog() */
+void NTAPI LangTranslateDialog(HWND);
+
+       /** @brief Lang aware version of AfxFormatString1() */
+void NTAPI LangFormatString1(CString &, UINT, LPCTSTR);
+
+       /** @brief Inline sprintf-style format; shortcut for CString::Format */
+CString Fmt(LPCTSTR fmt, ...);
+
+       /** @brief include for the custom dialog boxes, with do not ask/display again */
 #include "MessageBoxDialog.h"
 
+
 //{{AFX_INSERT_LOCATION}}
 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
 
index 41b93ec..2079048 100755 (executable)
 #define IDS_MESSAGEBOX_DONT_ASK_AGAIN   9016
 #define IDS_NUM_REPLACED                18032
 #define IDS_EDIT_TEXT_NOT_FOUND         18033
+#define IDS_EOL_DOS                     30400\r
+#define IDS_EOL_MAC                     30401\r
+#define IDS_EOL_UNIX                    30402\r
+#define IDS_EOL_MIXED                   30403\r
+#define IDS_EOL_BIN                     30404\r
+#define IDS_EOL_LF                      30405\r
+#define IDS_EOL_CR                      30406\r
+#define IDS_EOL_CRLF                    30407\r
+#define IDS_EOL_NONE                    30408\r
 #define ID_EDIT_DISABLEBSATSOL          32796
 #define ID_EDIT_DISABLEDRAGANDDROP      32797
 #define ID_EDIT_FIND_PREVIOUS           32799
 #define ID_VIEW_WORDWRAP                32824
+#define ID_EDIT_LOWERCASE               33185\r
+#define ID_EDIT_UPPERCASE               33186\r
 #define ID_EDIT_INDICATOR_COL           37900
 #define ID_INDICATOR_ENCODING           37905
 #define IDS_OLE_INIT_FAILED             57608