Thread: [Winmerge-svn] SF.net SVN: winmerge:[6089] trunk/Src (Page 3)
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: <jt...@us...> - 2008-11-16 15:27:13
|
Revision: 6089 http://winmerge.svn.sourceforge.net/winmerge/?rev=6089&view=rev Author: jtuc Date: 2008-11-16 15:27:10 +0000 (Sun, 16 Nov 2008) Log Message: ----------- Make Compare Special > XML operational for UCS2 files Modified Paths: -------------- trunk/Src/UniMarkdownFile.cpp trunk/Src/UniMarkdownFile.h trunk/Src/markdown.cpp trunk/Src/markdown.h Modified: trunk/Src/UniMarkdownFile.cpp =================================================================== --- trunk/Src/UniMarkdownFile.cpp 2008-11-15 09:50:24 UTC (rev 6088) +++ trunk/Src/UniMarkdownFile.cpp 2008-11-16 15:27:10 UTC (rev 6089) @@ -41,7 +41,21 @@ dwOpenCreationDispostion, dwMappingProtect, dwMapViewAccess); if (bOpen) { - m_pMarkdown = new CMarkdown((const char *)m_current, (const char *)m_base + m_filesize); + // CMarkdown wants octets, so we may need to transcode to UTF8. + // As transcoding strips the BOM, we must check for it in advance. + if (IsUnicode()) + m_codepage = CP_UTF8; + // The CMarkdown::File constructor cares about transcoding. + CMarkdown::File f( + reinterpret_cast<LPCTSTR>(m_base), + static_cast<DWORD>(m_filesize), + CMarkdown::File::Mapping | CMarkdown::File::Octets); + // The file mapping may have been recreated due to transcoding. + m_data = m_current = m_base = reinterpret_cast<LPBYTE>(f.pImage); + m_filesize = f.cbImage; + // Prevent the CMarkdown::File destructor from unmapping the view. + f.pImage = NULL; + m_pMarkdown = new CMarkdown(f); Move(); } return bOpen; @@ -58,18 +72,6 @@ } /** - * @brief Read BOM bytes from the file (if they exist). - * @return true if BOM bytes were found, false otherwise. - */ -bool UniMarkdownFile::ReadBom() -{ - bool bReadBom = UniMemFile::ReadBom(); - if (bReadBom && m_unicoding == ucr::UTF8) - m_codepage = CP_UTF8; - return bReadBom; -} - -/** * @brief Collapse whitespace characters from the given line. * @param [in, out] Line to handle. */ @@ -133,16 +135,25 @@ } } +String UniMarkdownFile::maketstring(LPCSTR lpd, UINT len) +{ + bool lossy = false; + String s = ucr::maketstring(lpd, len, m_codepage, &lossy); + if (lossy) + ++m_txtstats.nlosses; + return s; +} + bool UniMarkdownFile::ReadString(String &line, String &eol, bool *lossy) { line.erase(); eol.erase(); + int nlosses = m_txtstats.nlosses; int nDepth = 0; bool bDone = false; if (m_current < (LPBYTE)m_pMarkdown->lower) { - line = ucr::maketstring((const char *)m_current, m_pMarkdown->lower - - (const char *)m_current, m_codepage, lossy); + line = maketstring((const char *)m_current, m_pMarkdown->lower - (const char *)m_current); CollapseWhitespace(line); bDone = !line.empty(); m_current = (LPBYTE)m_pMarkdown->lower; @@ -161,7 +172,7 @@ { ++m_current; } - line = ucr::maketstring((const char *)current, m_current - current, m_codepage, lossy); + line = maketstring((const char *)current, m_current - current); if (m_current < m_transparent) { current = m_current; @@ -215,16 +226,14 @@ } if (bDone) { - line = ucr::maketstring((const char *)m_current, m_pMarkdown->first - - (const char *)m_current, m_codepage, lossy); + line = maketstring((const char *)m_current, m_pMarkdown->first - (const char *)m_current); CollapseWhitespace(line); m_current = (LPBYTE)m_pMarkdown->first; } else if (m_current < m_base + m_filesize) { bDone = true; - line = ucr::maketstring((const char *)m_current, m_base + m_filesize - - m_current, m_codepage, lossy); + line = maketstring((const char *)m_current, m_base + m_filesize - m_current); CollapseWhitespace(line); m_current = m_base + m_filesize; } @@ -236,5 +245,7 @@ line.insert(0U, nDepth, _T('\t')); if (bDone) eol = _T("\n"); + if (lossy) + *lossy = nlosses != m_txtstats.nlosses; return bDone; } Modified: trunk/Src/UniMarkdownFile.h =================================================================== --- trunk/Src/UniMarkdownFile.h 2008-11-15 09:50:24 UTC (rev 6088) +++ trunk/Src/UniMarkdownFile.h 2008-11-16 15:27:10 UTC (rev 6089) @@ -6,7 +6,7 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "UniFile.h" +#include "Common/UniFile.h" class CMarkdown; @@ -19,7 +19,6 @@ UniMarkdownFile(); virtual bool ReadString(String & line, String & eol, bool * lossy); virtual void Close(); - virtual bool ReadBom(); protected: virtual bool DoOpen(LPCTSTR filename, DWORD dwOpenAccess, @@ -28,6 +27,7 @@ private: void Move(); + String maketstring(LPCSTR lpd, UINT len); int m_depth; bool m_bMove; Modified: trunk/Src/markdown.cpp =================================================================== --- trunk/Src/markdown.cpp 2008-11-15 09:50:24 UTC (rev 6088) +++ trunk/Src/markdown.cpp 2008-11-16 15:27:10 UTC (rev 6089) @@ -897,111 +897,116 @@ } CMarkdown::FileImage::FileImage(LPCTSTR path, DWORD trunc, int flags) -: pImage(NULL), nByteOrder(0) +: pImage(NULL), cbImage(0), nByteOrder(0) { - HANDLE hFile - ( - flags & Handle - ? HANDLE(path) - : CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0) - ); - if (hFile != INVALID_HANDLE_VALUE) + HANDLE hFile = 0; + if (flags & Mapping) { - cbImage = GetFileSize(hFile, 0); - if (cbImage != INVALID_FILE_SIZE) + pImage = LPVOID(path); + cbImage = trunc; + } + else + { + hFile = flags & Handle ? HANDLE(path) : + CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); + if (hFile != INVALID_HANDLE_VALUE) { - if (trunc && cbImage > trunc) + cbImage = GetFileSize(hFile, 0); + if (cbImage != INVALID_FILE_SIZE) { - cbImage = trunc; - } - pImage = MapFile(hFile, cbImage); - if (pImage && cbImage >= 4 && (flags & Octets & (nByteOrder = GuessByteOrder(*(LPDWORD)pImage)))) - { - LPVOID pCopy; - switch (nByteOrder) + if (trunc && cbImage > trunc) { - case 2 + 1: - case 2 + 1 + 8: - // big endian: swab first - cbImage &= ~1UL; - pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); - if (pCopy) - { - _swab((char *)pImage, (char *)pCopy, cbImage); - } - UnmapViewOfFile(pImage); - pImage = pCopy; - if (pImage) - { - case 2 + 0: - case 2 + 0 + 8: - // little endian - int cchImage = cbImage / 2; - LPWCH pchImage = (LPWCH)pImage; - if (nByteOrder & 8) - { - ++pchImage; - --cchImage; - } - cbImage = WideCharToMultiByte(CP_UTF8, 0, pchImage, cchImage, 0, 0, 0, 0); - pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); - if (pCopy) - { - WideCharToMultiByte(CP_UTF8, 0, pchImage, cchImage, (LPCH)pCopy, cbImage, 0, 0); - } - UnmapViewOfFile(pImage); - pImage = pCopy; - } - break; - case 4 + 1: - case 4 + 1 + 8: - case 4 + 2: - case 4 + 2 + 8: - // odd word endianness: swab first - cbImage &= ~3UL; - pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); - if (pCopy) - { - _swab((char *)pImage, (char *)pCopy, cbImage); - } - UnmapViewOfFile(pImage); - pImage = pCopy; - if (pImage) - { - case 4 + 0: - case 4 + 0 + 8: - case 4 + 3: - case 4 + 3 + 8: - int cchImage = cbImage; - LPCH pchImage = (LPCH)pImage; - if (nByteOrder & 8) - { - pchImage += 4; - cchImage -= 4; - } - Converter converter("utf-8", nByteOrder & 2 ? "ucs-4be" : "ucs-4le"); - cbImage = converter.Convert(pchImage, cchImage, 0, 0); - pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); - if (pCopy) - { - converter.Convert(pchImage, cchImage, (LPCH)pCopy, cbImage); - } - UnmapViewOfFile(pImage); - pImage = pCopy; - } - break; + cbImage = trunc; } + pImage = MapFile(hFile, cbImage); + if (!(flags & Handle)) + { + CloseHandle(hFile); + } } } - if (!(flags & Handle)) - { - CloseHandle(hFile); - } } if (pImage == NULL) { cbImage = 0; } + else if (cbImage >= 4 && (flags & Octets & (nByteOrder = GuessByteOrder(*(LPDWORD)pImage)))) + { + LPVOID pCopy; + switch (nByteOrder) + { + case 2 + 1: + case 2 + 1 + 8: + // big endian: swab first + cbImage &= ~1UL; + pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); + if (pCopy) + { + _swab((char *)pImage, (char *)pCopy, cbImage); + } + UnmapViewOfFile(pImage); + pImage = pCopy; + if (pImage) + { + case 2 + 0: + case 2 + 0 + 8: + // little endian + int cchImage = cbImage / 2; + LPWCH pchImage = (LPWCH)pImage; + if (nByteOrder & 8) + { + ++pchImage; + --cchImage; + } + cbImage = WideCharToMultiByte(CP_UTF8, 0, pchImage, cchImage, 0, 0, 0, 0); + pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); + if (pCopy) + { + WideCharToMultiByte(CP_UTF8, 0, pchImage, cchImage, (LPCH)pCopy, cbImage, 0, 0); + } + UnmapViewOfFile(pImage); + pImage = pCopy; + } + break; + case 4 + 1: + case 4 + 1 + 8: + case 4 + 2: + case 4 + 2 + 8: + // odd word endianness: swab first + cbImage &= ~3UL; + pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); + if (pCopy) + { + _swab((char *)pImage, (char *)pCopy, cbImage); + } + UnmapViewOfFile(pImage); + pImage = pCopy; + if (pImage) + { + case 4 + 0: + case 4 + 0 + 8: + case 4 + 3: + case 4 + 3 + 8: + int cchImage = cbImage; + LPCH pchImage = (LPCH)pImage; + if (nByteOrder & 8) + { + pchImage += 4; + cchImage -= 4; + } + Converter converter("utf-8", nByteOrder & 2 ? "ucs-4be" : "ucs-4le"); + cbImage = converter.Convert(pchImage, cchImage, 0, 0); + pCopy = MapFile(INVALID_HANDLE_VALUE, cbImage); + if (pCopy) + { + converter.Convert(pchImage, cchImage, (LPCH)pCopy, cbImage); + } + UnmapViewOfFile(pImage); + pImage = pCopy; + } + break; + } + } } CMarkdown::FileImage::~FileImage() Modified: trunk/Src/markdown.h =================================================================== --- trunk/Src/markdown.h 2008-11-15 09:50:24 UTC (rev 6088) +++ trunk/Src/markdown.h 2008-11-16 15:27:10 UTC (rev 6089) @@ -179,8 +179,9 @@ LPVOID pImage; enum { - Handle = 1, - Octets = 2 + 4, + Handle = 0x01, + Octets = 0x02 + 0x04, + Mapping = 0x40 }; int nByteOrder; FileImage(LPCTSTR, DWORD trunc = 0, int flags = 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2008-11-19 18:57:26
|
Revision: 6100 http://winmerge.svn.sourceforge.net/winmerge/?rev=6100&view=rev Author: kimmov Date: 2008-11-19 18:57:18 +0000 (Wed, 19 Nov 2008) Log Message: ----------- PATCH: [ 2189315 ] Shell Context Menu in Folder Compare view Tweak context menu item texts. Modified Paths: -------------- trunk/Src/Languages/English.pot trunk/Src/Merge.rc Modified: trunk/Src/Languages/English.pot =================================================================== --- trunk/Src/Languages/English.pot 2008-11-19 18:47:21 UTC (rev 6099) +++ trunk/Src/Languages/English.pot 2008-11-19 18:57:18 UTC (rev 6100) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: WinMerge\n" "Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?group_id=13216&atid=113216\n" -"POT-Creation-Date: 2008-10-20 21:03+0000\n" +"POT-Creation-Date: 2008-11-19 20:55+0000\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: English <win...@li...>\n" @@ -385,7 +385,7 @@ #: Merge.rc:175 #: Merge.rc:296 #: Merge.rc:484 -#: Merge.rc:1921 +#: Merge.rc:1923 #, c-format msgid "&Help" msgstr "" @@ -716,7 +716,7 @@ msgstr "" #: Merge.rc:370 -#: Merge.rc:2767 +#: Merge.rc:2776 #, c-format msgid "< Empty >" msgstr "" @@ -918,15 +918,15 @@ msgstr "" #: Merge.rc:523 -#: Merge.rc:1141 -#: Merge.rc:1523 +#: Merge.rc:1143 +#: Merge.rc:1525 #, c-format msgid "&Left" msgstr "" #: Merge.rc:524 -#: Merge.rc:1143 -#: Merge.rc:1526 +#: Merge.rc:1145 +#: Merge.rc:1528 #, c-format msgid "&Right" msgstr "" @@ -1078,17 +1078,17 @@ #: Merge.rc:674 #: Merge.rc:706 -#: Merge.rc:796 -#: Merge.rc:982 -#: Merge.rc:1060 -#: Merge.rc:1089 -#: Merge.rc:1099 -#: Merge.rc:1265 -#: Merge.rc:1329 -#: Merge.rc:1342 -#: Merge.rc:1434 -#: Merge.rc:1449 -#: Merge.rc:1671 +#: Merge.rc:798 +#: Merge.rc:984 +#: Merge.rc:1062 +#: Merge.rc:1091 +#: Merge.rc:1101 +#: Merge.rc:1267 +#: Merge.rc:1331 +#: Merge.rc:1344 +#: Merge.rc:1436 +#: Merge.rc:1451 +#: Merge.rc:1673 #, c-format msgid "OK" msgstr "" @@ -1104,39 +1104,39 @@ msgstr "" #: Merge.rc:685 -#: Merge.rc:1600 +#: Merge.rc:1602 #, c-format msgid "&Left:" msgstr "" #: Merge.rc:689 #: Merge.rc:750 -#: Merge.rc:1003 -#: Merge.rc:1025 +#: Merge.rc:1005 +#: Merge.rc:1027 #, c-format msgid "&Browse..." msgstr "" #: Merge.rc:690 -#: Merge.rc:1604 +#: Merge.rc:1606 #, c-format msgid "&Right:" msgstr "" #: Merge.rc:694 -#: Merge.rc:1036 +#: Merge.rc:1038 #, c-format msgid "Bro&wse..." msgstr "" #: Merge.rc:695 -#: Merge.rc:1608 +#: Merge.rc:1610 #, c-format msgid "&Filter:" msgstr "" #: Merge.rc:698 -#: Merge.rc:1610 +#: Merge.rc:1612 #, c-format msgid "Select..." msgstr "" @@ -1152,7 +1152,7 @@ msgstr "" #: Merge.rc:703 -#: Merge.rc:1611 +#: Merge.rc:1613 #, c-format msgid "&Include Subfolders" msgstr "" @@ -1164,25 +1164,25 @@ #: Merge.rc:707 #: Merge.rc:737 -#: Merge.rc:797 -#: Merge.rc:827 -#: Merge.rc:859 -#: Merge.rc:869 -#: Merge.rc:1061 -#: Merge.rc:1090 -#: Merge.rc:1100 -#: Merge.rc:1151 -#: Merge.rc:1266 -#: Merge.rc:1343 -#: Merge.rc:1435 -#: Merge.rc:1450 -#: Merge.rc:1672 +#: Merge.rc:799 +#: Merge.rc:829 +#: Merge.rc:861 +#: Merge.rc:871 +#: Merge.rc:1063 +#: Merge.rc:1092 +#: Merge.rc:1102 +#: Merge.rc:1153 +#: Merge.rc:1268 +#: Merge.rc:1345 +#: Merge.rc:1437 +#: Merge.rc:1452 +#: Merge.rc:1674 #, c-format msgid "Cancel" msgstr "" #: Merge.rc:708 -#: Merge.rc:1344 +#: Merge.rc:1346 #, c-format msgid "Help" msgstr "" @@ -1223,7 +1223,7 @@ msgstr "" #: Merge.rc:733 -#: Merge.rc:874 +#: Merge.rc:876 #, c-format msgid "Apply to all items" msgstr "" @@ -1234,7 +1234,7 @@ msgstr "" #: Merge.rc:736 -#: Merge.rc:870 +#: Merge.rc:872 #, c-format msgid "Save As..." msgstr "" @@ -1250,13 +1250,13 @@ msgstr "" #: Merge.rc:748 -#: Merge.rc:2051 +#: Merge.rc:2053 #, c-format msgid "&Path to cleartool.exe:" msgstr "" #: Merge.rc:755 -#: Merge.rc:1929 +#: Merge.rc:1931 #, c-format msgid "General" msgstr "" @@ -1298,1456 +1298,1459 @@ #: Merge.rc:775 #, c-format -msgid "O&pen-dialog Auto-Completion:" +msgid "Enable Shell &Context Menu" msgstr "" -#: Merge.rc:778 +#: Merge.rc:777 #, c-format -msgid "Enable multiple compare windows for" +msgid "O&pen-dialog Auto-Completion:" msgstr "" #: Merge.rc:780 -#: Merge.rc:1623 #, c-format -msgid "&Folder compare" +msgid "Enable multiple compare windows for" msgstr "" #: Merge.rc:782 #: Merge.rc:1625 #, c-format -msgid "Fil&e compare" +msgid "&Folder compare" msgstr "" #: Merge.rc:784 +#: Merge.rc:1627 #, c-format -msgid "WinMerge allows hiding some common messageboxes. Press the Reset button to make all messageboxes visible again." +msgid "Fil&e compare" msgstr "" #: Merge.rc:786 #, c-format +msgid "WinMerge allows hiding some common messageboxes. Press the Reset button to make all messageboxes visible again." +msgstr "" + +#: Merge.rc:788 +#, c-format msgid "Reset" msgstr "" -#: Merge.rc:793 +#: Merge.rc:795 #, c-format msgid "Language" msgstr "" -#: Merge.rc:800 +#: Merge.rc:802 #, c-format msgid "Available languages:" msgstr "" -#: Merge.rc:806 +#: Merge.rc:808 #, c-format msgid "Find" msgstr "" -#: Merge.rc:809 -#: Merge.rc:836 +#: Merge.rc:811 +#: Merge.rc:838 #, c-format msgid "Fi&nd what:" msgstr "" -#: Merge.rc:812 -#: Merge.rc:842 +#: Merge.rc:814 +#: Merge.rc:844 #, c-format msgid "Match &whole word only" msgstr "" -#: Merge.rc:814 -#: Merge.rc:844 +#: Merge.rc:816 +#: Merge.rc:846 #, c-format msgid "Match &case" msgstr "" -#: Merge.rc:816 -#: Merge.rc:846 +#: Merge.rc:818 +#: Merge.rc:848 #, c-format msgid "Regular &expression" msgstr "" -#: Merge.rc:818 +#: Merge.rc:820 #, c-format msgid "D&on't wrap end of file" msgstr "" -#: Merge.rc:821 +#: Merge.rc:823 #, c-format msgid "Direction" msgstr "" -#: Merge.rc:822 +#: Merge.rc:824 #, c-format msgid "&Up" msgstr "" -#: Merge.rc:824 +#: Merge.rc:826 #, c-format msgid "&Down" msgstr "" -#: Merge.rc:826 -#: Merge.rc:856 +#: Merge.rc:828 +#: Merge.rc:858 #, c-format msgid "&Find Next" msgstr "" -#: Merge.rc:833 +#: Merge.rc:835 #, c-format msgid "Replace" msgstr "" -#: Merge.rc:839 +#: Merge.rc:841 #, c-format msgid "Re&place with:" msgstr "" -#: Merge.rc:848 +#: Merge.rc:850 #, c-format msgid "&Don't wrap end of file" msgstr "" -#: Merge.rc:851 +#: Merge.rc:853 #, c-format msgid "Replace in" msgstr "" -#: Merge.rc:852 +#: Merge.rc:854 #, c-format msgid "&Selection" msgstr "" -#: Merge.rc:854 +#: Merge.rc:856 #, c-format msgid "Wh&ole file" msgstr "" -#: Merge.rc:857 +#: Merge.rc:859 #, c-format msgid "&Replace" msgstr "" -#: Merge.rc:858 +#: Merge.rc:860 #, c-format msgid "Replace &All" msgstr "" -#: Merge.rc:865 -#: Merge.rc:2172 +#: Merge.rc:867 +#: Merge.rc:2174 #, c-format msgid "Rational ClearCase" msgstr "" -#: Merge.rc:868 +#: Merge.rc:870 #, c-format msgid "CheckOut" msgstr "" -#: Merge.rc:873 -#: Merge.rc:1185 +#: Merge.rc:875 +#: Merge.rc:1187 #, c-format msgid "Comments" msgstr "" -#: Merge.rc:876 +#: Merge.rc:878 #, c-format msgid "CheckIn after checkout" msgstr "" -#: Merge.rc:882 +#: Merge.rc:884 #, c-format msgid "Linefilters" msgstr "" -#: Merge.rc:885 +#: Merge.rc:887 #, c-format msgid "Enable Line Filters" msgstr "" -#: Merge.rc:888 +#: Merge.rc:890 #, c-format msgid "Regular Expressions (one per line):" msgstr "" -#: Merge.rc:895 +#: Merge.rc:897 #, c-format msgid "Save" msgstr "" -#: Merge.rc:896 +#: Merge.rc:898 #, c-format msgid "New" msgstr "" -#: Merge.rc:897 +#: Merge.rc:899 #, c-format msgid "Edit" msgstr "" -#: Merge.rc:898 +#: Merge.rc:900 #, c-format msgid "Remove" msgstr "" -#: Merge.rc:903 -#: Merge.rc:1932 +#: Merge.rc:905 +#: Merge.rc:1934 #, c-format msgid "Colors" msgstr "" -#: Merge.rc:906 +#: Merge.rc:908 #, c-format msgid "Difference:" msgstr "" -#: Merge.rc:910 +#: Merge.rc:912 #, c-format msgid "Selected Difference:" msgstr "" -#: Merge.rc:914 -#: Merge.rc:1575 +#: Merge.rc:916 +#: Merge.rc:1577 #, c-format msgid "Background" msgstr "" -#: Merge.rc:915 +#: Merge.rc:917 #, c-format msgid "Deleted" msgstr "" -#: Merge.rc:928 -#: Merge.rc:1370 -#: Merge.rc:1576 +#: Merge.rc:930 +#: Merge.rc:1372 +#: Merge.rc:1578 #, c-format msgid "Text" msgstr "" -#: Merge.rc:932 +#: Merge.rc:934 #, c-format msgid "Ignored Difference:" msgstr "" -#: Merge.rc:942 +#: Merge.rc:944 #, c-format msgid "Moved:" msgstr "" -#: Merge.rc:952 +#: Merge.rc:954 #, c-format msgid "Selected Moved:" msgstr "" -#: Merge.rc:959 +#: Merge.rc:961 #, c-format msgid "Word Difference:" msgstr "" -#: Merge.rc:966 +#: Merge.rc:968 #, c-format msgid "Selected Word Diff:" msgstr "" -#: Merge.rc:973 -#: Merge.rc:1059 -#: Merge.rc:1088 -#: Merge.rc:1188 -#: Merge.rc:1416 +#: Merge.rc:975 +#: Merge.rc:1061 +#: Merge.rc:1090 +#: Merge.rc:1190 +#: Merge.rc:1418 #, c-format msgid "Defaults" msgstr "" -#: Merge.rc:979 -#: Merge.rc:1358 -#: Merge.rc:1564 +#: Merge.rc:981 +#: Merge.rc:1360 +#: Merge.rc:1566 #, c-format msgid "Dialog" msgstr "" -#: Merge.rc:989 -#: Merge.rc:1935 +#: Merge.rc:991 +#: Merge.rc:1937 #, c-format msgid "System" msgstr "" -#: Merge.rc:992 +#: Merge.rc:994 #, c-format msgid "&Send deleted files to Recycle Bin" msgstr "" -#: Merge.rc:994 +#: Merge.rc:996 #, c-format msgid "Integration" msgstr "" -#: Merge.rc:995 +#: Merge.rc:997 #, c-format msgid "&Add to explorer context menu" msgstr "" -#: Merge.rc:997 +#: Merge.rc:999 #, c-format msgid "E&nable advanced menu" msgstr "" -#: Merge.rc:999 +#: Merge.rc:1001 #, c-format msgid "In&clude subfolders by default" msgstr "" -#: Merge.rc:1001 +#: Merge.rc:1003 #, c-format msgid "&External editor:" msgstr "" -#: Merge.rc:1004 +#: Merge.rc:1006 #, c-format msgid "&Filter folder:" msgstr "" -#: Merge.rc:1006 +#: Merge.rc:1008 #, c-format msgid "B&rowse..." msgstr "" -#: Merge.rc:1007 +#: Merge.rc:1009 #, c-format msgid "Temporary files folder" msgstr "" -#: Merge.rc:1008 +#: Merge.rc:1010 #, c-format msgid "S&ystem's temp folder" msgstr "" -#: Merge.rc:1010 +#: Merge.rc:1012 #, c-format msgid "C&ustom folder:" msgstr "" -#: Merge.rc:1013 -#: Merge.rc:1029 +#: Merge.rc:1015 +#: Merge.rc:1031 #, c-format msgid "Br&owse..." msgstr "" -#: Merge.rc:1019 +#: Merge.rc:1021 #, c-format msgid "Patch Generator" msgstr "" -#: Merge.rc:1022 +#: Merge.rc:1024 #, c-format msgid "File&1:" msgstr "" -#: Merge.rc:1026 +#: Merge.rc:1028 #, c-format msgid "File&2:" msgstr "" -#: Merge.rc:1030 +#: Merge.rc:1032 #, c-format msgid "&Swap" msgstr "" -#: Merge.rc:1031 +#: Merge.rc:1033 #, c-format msgid "&Append to existing file" msgstr "" -#: Merge.rc:1033 +#: Merge.rc:1035 #, c-format msgid "&Result:" msgstr "" -#: Merge.rc:1037 +#: Merge.rc:1039 #, c-format msgid "&Format" msgstr "" -#: Merge.rc:1038 +#: Merge.rc:1040 #, c-format msgid "St&yle:" msgstr "" -#: Merge.rc:1041 +#: Merge.rc:1043 #, c-format msgid "&Context:" msgstr "" -#: Merge.rc:1044 +#: Merge.rc:1046 #, c-format msgid "W&hitespaces" msgstr "" -#: Merge.rc:1045 +#: Merge.rc:1047 #, c-format msgid "Com&pare" msgstr "" -#: Merge.rc:1047 +#: Merge.rc:1049 #, c-format msgid "I&gnore changes" msgstr "" -#: Merge.rc:1049 +#: Merge.rc:1051 #, c-format msgid "Ig&nore all" msgstr "" -#: Merge.rc:1051 +#: Merge.rc:1053 #, c-format msgid "Ignor&e blank lines" msgstr "" -#: Merge.rc:1053 +#: Merge.rc:1055 #, c-format msgid "Case sensi&tive" msgstr "" -#: Merge.rc:1055 +#: Merge.rc:1057 #, c-format msgid "Inclu&de command line" msgstr "" -#: Merge.rc:1057 +#: Merge.rc:1059 #, c-format msgid "Open to e&xternal editor" msgstr "" -#: Merge.rc:1079 +#: Merge.rc:1081 #, c-format msgid "Display Columns" msgstr "" -#: Merge.rc:1085 +#: Merge.rc:1087 #, c-format msgid "Move &Up" msgstr "" -#: Merge.rc:1086 +#: Merge.rc:1088 #, c-format msgid "Move &Down" msgstr "" -#: Merge.rc:1096 +#: Merge.rc:1098 #, c-format msgid "Select Unpacker" msgstr "" -#: Merge.rc:1101 +#: Merge.rc:1103 #, c-format msgid "File unpacker:" msgstr "" -#: Merge.rc:1104 +#: Merge.rc:1106 #, c-format msgid "Display all unpackers, don't check the extension" msgstr "" -#: Merge.rc:1107 +#: Merge.rc:1109 #, c-format msgid "Extensions list:" msgstr "" -#: Merge.rc:1108 +#: Merge.rc:1110 #, c-format msgid "Description:" msgstr "" -#: Merge.rc:1119 +#: Merge.rc:1121 #, c-format msgid " Folder Compare Progress" msgstr "" -#: Merge.rc:1122 -#: Merge.rc:1882 +#: Merge.rc:1124 +#: Merge.rc:1884 #, c-format msgid "Stop" msgstr "" -#: Merge.rc:1127 +#: Merge.rc:1129 #, c-format msgid "Comparing items..." msgstr "" -#: Merge.rc:1128 +#: Merge.rc:1130 #, c-format msgid "Items compared:" msgstr "" -#: Merge.rc:1129 +#: Merge.rc:1131 #, c-format msgid "Items total:" msgstr "" -#: Merge.rc:1135 +#: Merge.rc:1137 #, c-format msgid "Go To" msgstr "" -#: Merge.rc:1138 +#: Merge.rc:1140 #, c-format msgid "G&oto:" msgstr "" -#: Merge.rc:1140 +#: Merge.rc:1142 #, c-format msgid "File" msgstr "" -#: Merge.rc:1145 +#: Merge.rc:1147 #, c-format msgid "Goto what" msgstr "" -#: Merge.rc:1146 +#: Merge.rc:1148 #, c-format msgid "Li&ne" msgstr "" -#: Merge.rc:1148 +#: Merge.rc:1150 #, c-format msgid "&Difference" msgstr "" -#: Merge.rc:1150 +#: Merge.rc:1152 #, c-format msgid "&Go To" msgstr "" -#: Merge.rc:1156 -#: Merge.rc:1930 +#: Merge.rc:1158 +#: Merge.rc:1932 #, c-format msgid "Compare" msgstr "" -#: Merge.rc:1159 +#: Merge.rc:1161 #, c-format msgid "Whitespace" msgstr "" -#: Merge.rc:1160 +#: Merge.rc:1162 #, c-format msgid "&Compare" msgstr "" -#: Merge.rc:1162 +#: Merge.rc:1164 #, c-format msgid "&Ignore change" msgstr "" -#: Merge.rc:1164 +#: Merge.rc:1166 #, c-format msgid "I&gnore all" msgstr "" -#: Merge.rc:1166 +#: Merge.rc:1168 #, c-format msgid "Ignore blan&k lines" msgstr "" -#: Merge.rc:1168 +#: Merge.rc:1170 #, c-format msgid "Ignore &case" msgstr "" -#: Merge.rc:1170 +#: Merge.rc:1172 #, c-format msgid "Igno&re carriage return differences (Windows/Unix/Mac)" msgstr "" -#: Merge.rc:1173 +#: Merge.rc:1175 #, c-format msgid "E&nable moved block detection" msgstr "" -#: Merge.rc:1175 +#: Merge.rc:1177 #, c-format msgid "&Match similar lines" msgstr "" -#: Merge.rc:1177 +#: Merge.rc:1179 #, c-format msgid "Ign&ore time differences less than 3 seconds" msgstr "" -#: Merge.rc:1180 +#: Merge.rc:1182 #, c-format msgid "&File Compare method:" msgstr "" -#: Merge.rc:1183 +#: Merge.rc:1185 #, c-format msgid "S&top after first difference" msgstr "" -#: Merge.rc:1186 +#: Merge.rc:1188 #, c-format msgid "Filter Comments" msgstr "" -#: Merge.rc:1193 -#: Merge.rc:1931 +#: Merge.rc:1195 +#: Merge.rc:1933 #, c-format msgid "Editor" msgstr "" -#: Merge.rc:1196 +#: Merge.rc:1198 #, c-format msgid "&Highlight syntax" msgstr "" -#: Merge.rc:1198 +#: Merge.rc:1200 #, c-format msgid "&Automatic rescan" msgstr "" -#: Merge.rc:1200 +#: Merge.rc:1202 #, c-format msgid "&Preserve original EOL chars" msgstr "" -#: Merge.rc:1202 +#: Merge.rc:1204 #, c-format msgid "Tabs" msgstr "" -#: Merge.rc:1203 +#: Merge.rc:1205 #, c-format msgid "&Tab size:" msgstr "" -#: Merge.rc:1206 +#: Merge.rc:1208 #, c-format msgid "&Insert Tabs" msgstr "" -#: Merge.rc:1208 +#: Merge.rc:1210 #, c-format msgid "Insert &Spaces" msgstr "" -#: Merge.rc:1210 +#: Merge.rc:1212 #, c-format msgid "Line Difference Coloring" msgstr "" -#: Merge.rc:1212 +#: Merge.rc:1214 #, c-format msgid "View line differences" msgstr "" -#: Merge.rc:1214 +#: Merge.rc:1216 #, c-format msgid "&Character level" msgstr "" -#: Merge.rc:1216 +#: Merge.rc:1218 #, c-format msgid "&Word-level:" msgstr "" -#: Merge.rc:1231 +#: Merge.rc:1233 #, c-format msgid "Filefilters" msgstr "" -#: Merge.rc:1237 +#: Merge.rc:1239 #, c-format msgid "Test" msgstr "" -#: Merge.rc:1238 +#: Merge.rc:1240 #, c-format msgid "Install..." msgstr "" -#: Merge.rc:1239 +#: Merge.rc:1241 #, c-format msgid "New..." msgstr "" -#: Merge.rc:1240 +#: Merge.rc:1242 #, c-format msgid "Edit..." msgstr "" -#: Merge.rc:1241 +#: Merge.rc:1243 #, c-format msgid "Delete..." msgstr "" -#: Merge.rc:1247 +#: Merge.rc:1249 #, c-format msgid "Save modified files?" msgstr "" -#: Merge.rc:1250 +#: Merge.rc:1252 #, c-format msgid "Left side file" msgstr "" -#: Merge.rc:1253 +#: Merge.rc:1255 #, c-format msgid "&Save changes" msgstr "" -#: Merge.rc:1255 +#: Merge.rc:1257 #, c-format msgid "&Discard changes" msgstr "" -#: Merge.rc:1257 +#: Merge.rc:1259 #, c-format msgid "Right side file" msgstr "" -#: Merge.rc:1260 +#: Merge.rc:1262 #, c-format msgid "S&ave changes" msgstr "" -#: Merge.rc:1262 +#: Merge.rc:1264 #, c-format msgid "Dis&card changes" msgstr "" -#: Merge.rc:1264 +#: Merge.rc:1266 #, c-format msgid "Discard All" msgstr "" -#: Merge.rc:1271 -#: Merge.rc:1519 -#: Merge.rc:1937 +#: Merge.rc:1273 +#: Merge.rc:1521 +#: Merge.rc:1939 #, c-format msgid "Codepage" msgstr "" -#: Merge.rc:1274 +#: Merge.rc:1276 #, c-format msgid "Default Codepage" msgstr "" -#: Merge.rc:1275 +#: Merge.rc:1277 #, c-format msgid "Select the default codepage assumed when loading non-Unicode files:" msgstr "" -#: Merge.rc:1277 +#: Merge.rc:1279 #, c-format msgid "Detect codepage info for these files: .html, .rc, .xml \nneed to restart session" msgstr "" -#: Merge.rc:1280 +#: Merge.rc:1282 #, c-format msgid "System codepage" msgstr "" -#: Merge.rc:1282 +#: Merge.rc:1284 #, c-format msgid "According to WinMerge User Interface" msgstr "" -#: Merge.rc:1284 +#: Merge.rc:1286 #, c-format msgid "Custom codepage:" msgstr "" -#: Merge.rc:1292 +#: Merge.rc:1294 #, c-format msgid "WinMerge - Archive support disabled" msgstr "" -#: Merge.rc:1295 +#: Merge.rc:1297 #, c-format msgid "Unable to detect 7-Zip version (not installed?)" msgstr "" -#: Merge.rc:1298 +#: Merge.rc:1300 #, c-format msgid "Archive support requires 7-Zip 3.11 or later to be installed on your computer, or its\nessential components to be copied to the program directory for standalone operation." msgstr "" -#: Merge.rc:1300 +#: Merge.rc:1302 #, c-format msgid "There must also be an appropriate interface plugin (Merge7z*.dll) on the path." msgstr "" -#: Merge.rc:1302 +#: Merge.rc:1304 #, c-format msgid "Please use the version of 7-Zip recommended below until interface plugins for later\nversions become available." msgstr "" -#: Merge.rc:1304 +#: Merge.rc:1306 #, c-format msgid "Version" msgstr "" -#: Merge.rc:1306 +#: Merge.rc:1308 #, c-format msgid "Plugin required\n(dllbuild %04u)" msgstr "" -#: Merge.rc:1308 +#: Merge.rc:1310 #, c-format msgid "Recommended version of 7-Zip:" msgstr "" -#: Merge.rc:1311 -#: Merge.rc:1314 +#: Merge.rc:1313 +#: Merge.rc:1316 #, c-format msgid "present" msgstr "" -#: Merge.rc:1312 +#: Merge.rc:1314 #, c-format msgid "Merge7z000U.dll" msgstr "" -#: Merge.rc:1315 +#: Merge.rc:1317 #, c-format msgid "7-Zip software installed on your computer:" msgstr "" -#: Merge.rc:1317 -#: Merge.rc:1322 +#: Merge.rc:1319 +#: Merge.rc:1324 #, c-format msgid "none" msgstr "" -#: Merge.rc:1319 +#: Merge.rc:1321 #, c-format msgid "missing" msgstr "" -#: Merge.rc:1320 +#: Merge.rc:1322 #, c-format msgid "7-Zip components for standalone operation:" msgstr "" -#: Merge.rc:1324 +#: Merge.rc:1326 #, c-format msgid "outdated" msgstr "" -#: Merge.rc:1325 +#: Merge.rc:1327 #, c-format msgid "Plugins on path:" msgstr "" -#: Merge.rc:1326 +#: Merge.rc:1328 #, c-format msgid "Don't display this &message again.\n(You can always recall this message from the Help menu.)" msgstr "" -#: Merge.rc:1330 +#: Merge.rc:1332 #, c-format msgid "Plugin Download" msgstr "" -#: Merge.rc:1339 +#: Merge.rc:1341 #, c-format msgid "Options" msgstr "" -#: Merge.rc:1350 +#: Merge.rc:1352 #, c-format msgid " Categories" msgstr "" -#: Merge.rc:1352 +#: Merge.rc:1354 #, c-format msgid "Import..." msgstr "" -#: Merge.rc:1353 +#: Merge.rc:1355 #, c-format msgid "Export..." msgstr "" -#: Merge.rc:1361 +#: Merge.rc:1363 #, c-format msgid "Keywords:" msgstr "" -#: Merge.rc:1362 +#: Merge.rc:1364 #, c-format msgid "Function names:" msgstr "" -#: Merge.rc:1363 +#: Merge.rc:1365 #, c-format msgid "Comments:" msgstr "" -#: Merge.rc:1364 +#: Merge.rc:1366 #, c-format msgid "Numbers:" msgstr "" -#: Merge.rc:1365 +#: Merge.rc:1367 #, c-format msgid "Operators:" msgstr "" -#: Merge.rc:1366 +#: Merge.rc:1368 #, c-format msgid "Strings:" msgstr "" -#: Merge.rc:1367 +#: Merge.rc:1369 #, c-format msgid "Preprocessor:" msgstr "" -#: Merge.rc:1368 +#: Merge.rc:1370 #, c-format msgid "User 1:" msgstr "" -#: Merge.rc:1369 +#: Merge.rc:1371 #, c-format msgid "User 2:" msgstr "" -#: Merge.rc:1374 -#: Merge.rc:1379 -#: Merge.rc:1384 -#: Merge.rc:1389 -#: Merge.rc:1394 -#: Merge.rc:1399 -#: Merge.rc:1404 -#: Merge.rc:1409 -#: Merge.rc:1414 +#: Merge.rc:1376 +#: Merge.rc:1381 +#: Merge.rc:1386 +#: Merge.rc:1391 +#: Merge.rc:1396 +#: Merge.rc:1401 +#: Merge.rc:1406 +#: Merge.rc:1411 +#: Merge.rc:1416 #, c-format msgid "Bold" msgstr "" -#: Merge.rc:1422 +#: Merge.rc:1424 #, c-format msgid "Folder Compare Report" msgstr "" -#: Merge.rc:1425 +#: Merge.rc:1427 #, c-format msgid "Report &File:" msgstr "" -#: Merge.rc:1428 -#: Merge.rc:1602 -#: Merge.rc:1606 -#: Merge.rc:1633 +#: Merge.rc:1430 +#: Merge.rc:1604 +#: Merge.rc:1608 +#: Merge.rc:1635 #, c-format msgid "Browse..." msgstr "" -#: Merge.rc:1429 +#: Merge.rc:1431 #, c-format msgid "&Style:" msgstr "" -#: Merge.rc:1432 +#: Merge.rc:1434 #, c-format msgid "&Copy to Clipboard" msgstr "" -#: Merge.rc:1440 +#: Merge.rc:1442 #, c-format msgid "Shared or Private Filter" msgstr "" -#: Merge.rc:1443 +#: Merge.rc:1445 #, c-format msgid "Which type of filter do you want to create?" msgstr "" -#: Merge.rc:1445 +#: Merge.rc:1447 #, c-format msgid "Shared Filter (for all users on this machine)" msgstr "" -#: Merge.rc:1447 +#: Merge.rc:1449 #, c-format msgid "Private Filter (only for current user)" msgstr "" -#: Merge.rc:1455 -#: Merge.rc:1938 +#: Merge.rc:1457 +#: Merge.rc:1940 #, c-format msgid "Archive Support" msgstr "" -#: Merge.rc:1458 +#: Merge.rc:1460 #, c-format msgid "Archive support requires 7-Zip plugin installed:" msgstr "" -#: Merge.rc:1460 +#: Merge.rc:1462 #, c-format msgid "Download 7-zip Plugin" msgstr "" -#: Merge.rc:1461 +#: Merge.rc:1463 #, c-format msgid "&Enable archive file support" msgstr "" -#: Merge.rc:1463 +#: Merge.rc:1465 #, c-format msgid "&Use stand-alone 7-Zip if available" msgstr "" -#: Merge.rc:1466 +#: Merge.rc:1468 #, c-format msgid "U&se local 7-Zip from WinMerge folder" msgstr "" -#: Merge.rc:1468 +#: Merge.rc:1470 #, c-format msgid "&Detect archive type from file signature" msgstr "" -#: Merge.rc:1476 +#: Merge.rc:1478 #, c-format msgid "Compare Statistics" msgstr "" -#: Merge.rc:1479 +#: Merge.rc:1481 #, c-format msgid "Folders:" msgstr "" -#: Merge.rc:1480 +#: Merge.rc:1482 #, c-format msgid "Files:" msgstr "" -#: Merge.rc:1481 -#: Merge.rc:2319 +#: Merge.rc:1483 +#: Merge.rc:2328 #, c-format msgid "Different" msgstr "" -#: Merge.rc:1482 +#: Merge.rc:1484 #, c-format msgid "Text:" msgstr "" -#: Merge.rc:1485 -#: Merge.rc:1504 +#: Merge.rc:1487 +#: Merge.rc:1506 #, c-format msgid "Binary:" msgstr "" -#: Merge.rc:1488 +#: Merge.rc:1490 #, c-format msgid "Unique" msgstr "" -#: Merge.rc:1489 +#: Merge.rc:1491 #, c-format msgid "Left:" msgstr "" -#: Merge.rc:1494 +#: Merge.rc:1496 #, c-format msgid "Right:" msgstr "" -#: Merge.rc:1499 -#: Merge.rc:2313 +#: Merge.rc:1501 +#: Merge.rc:2322 #, c-format msgid "Identical" msgstr "" -#: Merge.rc:1508 +#: Merge.rc:1510 #, c-format msgid "Total:" msgstr "" -#: Merge.rc:1513 +#: Merge.rc:1515 #, c-format msgid "Close" msgstr "" -#: Merge.rc:1522 +#: Merge.rc:1524 #, c-format msgid "Affects" msgstr "" -#: Merge.rc:1525 -#: Merge.rc:1528 +#: Merge.rc:1527 +#: Merge.rc:1530 #, c-format msgid "(Affects)" msgstr "" -#: Merge.rc:1529 +#: Merge.rc:1531 #, c-format msgid "Select Codepage for" msgstr "" -#: Merge.rc:1530 +#: Merge.rc:1532 #, c-format msgid "&File Loading:" msgstr "" -#: Merge.rc:1532 -#: Merge.rc:1535 +#: Merge.rc:1534 +#: Merge.rc:1537 #, c-format msgid "..." msgstr "" -#: Merge.rc:1533 +#: Merge.rc:1535 #, c-format msgid "File &Saving:" msgstr "" -#: Merge.rc:1536 +#: Merge.rc:1538 #, c-format msgid "&Use same codepage for both" msgstr "" -#: Merge.rc:1539 +#: Merge.rc:1541 #, c-format msgid "&Apply" msgstr "" -#: Merge.rc:1540 -#: Merge.rc:1904 +#: Merge.rc:1542 +#: Merge.rc:1906 #, c-format msgid "&Cancel" msgstr "" -#: Merge.rc:1545 +#: Merge.rc:1547 #, c-format msgid "Test Filter" msgstr "" -#: Merge.rc:1548 +#: Merge.rc:1550 #, c-format msgid "Testing filter ..." msgstr "" -#: Merge.rc:1550 +#: Merge.rc:1552 #, c-format msgid "&Enter text to test:" msgstr "" -#: Merge.rc:1552 +#: Merge.rc:1554 #, c-format msgid "&Folder Name" msgstr "" -#: Merge.rc:1554 +#: Merge.rc:1556 #, c-format msgid "Result:" msgstr "" -#: Merge.rc:1558 +#: Merge.rc:1560 #, c-format msgid "&Test" msgstr "" -#: Merge.rc:1559 +#: Merge.rc:1561 #, c-format msgid "&Close" msgstr "" -#: Merge.rc:1567 +#: Merge.rc:1569 #, c-format msgid "&Use customized text colors" msgstr "" -#: Merge.rc:1570 +#: Merge.rc:1572 #, c-format msgid "Custom text colors" msgstr "" -#: Merge.rc:1572 +#: Merge.rc:1574 #, c-format msgid "Whitespace:" msgstr "" -#: Merge.rc:1573 +#: Merge.rc:1575 #, c-format msgid "Regular text:" msgstr "" -#: Merge.rc:1574 +#: Merge.rc:1576 #, c-format msgid "Selection:" msgstr "" -#: Merge.rc:1597 +#: Merge.rc:1599 #, c-format msgid "Paths" msgstr "" -#: Merge.rc:1603 +#: Merge.rc:1605 #, c-format msgid "R&ead-only" msgstr "" -#: Merge.rc:1607 +#: Merge.rc:1609 #, c-format msgid "Re&ad-only" msgstr "" -#: Merge.rc:1613 +#: Merge.rc:1615 #, c-format msgid "Open..." msgstr "" -#: Merge.rc:1614 +#: Merge.rc:1616 #, c-format msgid "Save..." msgstr "" -#: Merge.rc:1619 -#: Merge.rc:1939 +#: Merge.rc:1621 +#: Merge.rc:1941 #, c-format msgid "Backup Files" msgstr "" -#: Merge.rc:1622 +#: Merge.rc:1624 #, c-format msgid "Create backup files in:" msgstr "" -#: Merge.rc:1627 +#: Merge.rc:1629 #, c-format msgid "Create backup files into:" msgstr "" -#: Merge.rc:1628 +#: Merge.rc:1630 #, c-format msgid "&Original file's folder" msgstr "" -#: Merge.rc:1630 +#: Merge.rc:1632 #, c-format msgid "&Global backup folder:" msgstr "" -#: Merge.rc:1634 +#: Merge.rc:1636 #, c-format msgid "Backup filename:" msgstr "" -#: Merge.rc:1635 +#: Merge.rc:1637 #, c-format msgid "&Append .bak -extension" msgstr "" -#: Merge.rc:1637 +#: Merge.rc:1639 #, c-format msgid "A&ppend timestamp" msgstr "" -#: Merge.rc:1644 -#: Merge.rc:2228 +#: Merge.rc:1646 +#: Merge.rc:2230 #, c-format msgid "Confirm Copy" msgstr "" -#: Merge.rc:1648 +#: Merge.rc:1650 #, c-format msgid "Are you sure you want to copy XXX items?" msgstr "" -#: Merge.rc:1650 +#: Merge.rc:1652 #, c-format msgid "From left" msgstr "" -#: Merge.rc:1653 +#: Merge.rc:1655 #, c-format msgid "To right" msgstr "" -#: Merge.rc:1656 +#: Merge.rc:1658 #, c-format msgid "Yes" msgstr "" -#: Merge.rc:1657 +#: Merge.rc:1659 #, c-format msgid "No" msgstr "" -#: Merge.rc:1663 +#: Merge.rc:1665 #, c-format msgid "Plugins" msgstr "" -#: Merge.rc:1666 +#: Merge.rc:1668 #, c-format msgid "&Enable plugins" msgstr "" #. StringFileInfo.Block -#: Merge.rc:1696 +#: Merge.rc:1698 #, c-format msgid "040904e4" msgstr "" #. VarFileInfo.Translation -#: Merge.rc:1712 +#: Merge.rc:1714 #, c-format msgid "0x409, 1252" msgstr "" -#: Merge.rc:1727 +#: Merge.rc:1729 #, c-format msgid "Ready" msgstr "" -#: Merge.rc:1733 +#: Merge.rc:1735 #, c-format msgid "EXT" msgstr "" -#: Merge.rc:1734 +#: Merge.rc:1736 #, c-format msgid "CAP" msgstr "" -#: Merge.rc:1735 +#: Merge.rc:1737 #, c-format msgid "NUM" msgstr "" -#: Merge.rc:1736 +#: Merge.rc:1738 #, c-format msgid "SCRL" msgstr "" -#: Merge.rc:1737 +#: Merge.rc:1739 #, c-format msgid "OVR" msgstr "" -#: Merge.rc:1738 +#: Merge.rc:1740 #, c-format msgid "REC" msgstr "" -#: Merge.rc:1744 +#: Merge.rc:1746 #, c-format msgid "Create empty documents\nNew Documents (Ctrl+N)" msgstr "" -#: Merge.rc:1745 +#: Merge.rc:1747 #, c-format msgid "Open an existing document\nOpen (Ctrl+O)" msgstr "" -#: Merge.rc:1746 +#: Merge.rc:1748 #, c-format msgid "Close the active document\nClose" msgstr "" -#: Merge.rc:1747 +#: Merge.rc:1749 #, c-format msgid "Save the active document\nSave (Ctrl+S)" msgstr "" -#: Merge.rc:1748 +#: Merge.rc:1750 #, c-format msgid "Save the active document with a new name\nSave As" msgstr "" -#: Merge.rc:1749 +#: Merge.rc:1751 #, c-format msgid "Change the printing options\nPage Setup" msgstr "" -#: Merge.rc:1750 +#: Merge.rc:1752 #, c-format msgid "Change the printer and printing options\nPrint Setup" msgstr "" -#: Merge.rc:1751 +#: Merge.rc:1753 #, c-format msgid "Print the active document\nPrint" msgstr "" -#: Merge.rc:1752 +#: Merge.rc:1754 #, c-format msgid "Display full pages\nPrint Preview" msgstr "" -#: Merge.rc:1757 +#: Merge.rc:1759 #, c-format msgid "Make all hidden items visible again" msgstr "" -#: Merge.rc:1758 +#: Merge.rc:1760 #, c-format msgid "Toggle tree mode" msgstr "" -#: Merge.rc:1759 +#: Merge.rc:1761 #, c-format msgid "Expand all subfolders" msgstr "" -#: Merge.rc:1760 +#: Merge.rc:1762 #, c-format msgid "Collapse all subfolders" msgstr "" -#: Merge.rc:1766 +#: Merge.rc:1768 #, c-format msgid "Open project file\nProject file (Ctrl+J)" msgstr "" -#: Merge.rc:1767 +#: Merge.rc:1769 #, c-format msgid "Unknown error attempting to open project file" msgstr "" -#: Merge.rc:1768 +#: Merge.rc:1770 #, c-format msgid "Unknown error attempting to save project file" msgstr "" -#: Merge.rc:1769 +#: Merge.rc:1771 #, c-format msgid "Project File" msgstr "" -#: Merge.rc:1770 +#: Merge.rc:1772 #, c-format msgid "Project file successfully loaded." msgstr "" -#: Merge.rc:1771 +#: Merge.rc:1773 #, c-format msgid "Project file successfully saved." msgstr "" -#: Merge.rc:1772 +#: Merge.rc:1774 #, c-format msgid "Save current paths and options to project file\nSave Project File" msgstr "" -#: Merge.rc:1777 +#: Merge.rc:1779 #, c-format msgid "Display program information, version number and copyright\nAbout" msgstr "" -#: Merge.rc:1778 +#: Merge.rc:1780 #, c-format msgid "Quit the application; prompts to save documents\nExit" msgstr "" -#: Merge.rc:1784 -#: Merge.rc:1785 #: Merge.rc:1786 #: Merge.rc:1787 #: Merge.rc:1788 @@ -2762,2834 +2765,2851 @@ #: Merge.rc:1797 #: Merge.rc:1798 #: Merge.rc:1799 +#: Merge.rc:1800 +#: Merge.rc:1801 #, c-format msgid "Open this document" msgstr "" -#: Merge.rc:1804 +#: Merge.rc:1806 #, c-format msgid "Switch to the next window pane\nNext Pane" msgstr "" -#: Merge.rc:1805 +#: Merge.rc:1807 #, c-format msgid "Switch back to the previous window pane\nPrevious Pane" msgstr "" -#: Merge.rc:1811 +#: Merge.rc:1813 #, c-format msgid "Arrange windows so they overlap\nCascade Windows" msgstr "" -#: Merge.rc:1812 +#: Merge.rc:1814 #, c-format msgid "Arrange windows as non-overlapping tiles horizontally\nTile Windows Horizontally" msgstr "" -#: Merge.rc:1813 +#: Merge.rc:1815 #, c-format msgid "Arrange windows as non-overlapping tiles vertically\nTile Windows Vertically" msgstr "" -#: Merge.rc:1819 +#: Merge.rc:1821 #, c-format msgid "Copy the selection and put it on the Clipboard\nCopy" msgstr "" -#: Merge.rc:1820 +#: Merge.rc:1822 #, c-format msgid "Cut the selection and put it on the Clipboard\nCut" msgstr "" -#: Merge.rc:1821 +#: Merge.rc:1823 #, c-format msgid "Find the specified text\nFind" msgstr "" -#: Merge.rc:1822 +#: Merge.rc:1824 #, c-format msgid "Insert Clipboard contents\nPaste" msgstr "" -#: Merge.rc:1823 +#: Merge.rc:1825 #, c-format msgid "Repeat the last action\nRepeat" msgstr "" -#: Merge.rc:1824 +#: Merge.rc:1826 #, c-format msgid "Replace specific text with different text\nReplace" msgstr "" -#: Merge.rc:1825 +#: Merge.rc:1827 #, c-format msgid "Select the entire document\nSelect All" msgstr "" -#: Merge.rc:1826 +#: Merge.rc:1828 #, c-format msgid "Undo the last action\nUndo (Ctrl+Z)" msgstr "" -#: Merge.rc:1827 +#: Merge.rc:1829 #, c-format msgid "Redo the previously undone action\nRedo (Ctrl+Y)" msgstr "" -#: Merge.rc:1833 +#: Merge.rc:1835 #, c-format msgid "Show or hide the toolbar\nToggle ToolBar" msgstr "" -#: Merge.rc:1834 +#: Merge.rc:1836 #, c-format msgid "Show or hide the status bar\nToggle StatusBar" msgstr "" -#: Merge.rc:1835 +#: Merge.rc:1837 #, c-format msgid "Show or hide the tab bar\nToggle TabBar" msgstr "" -#: Merge.rc:1836 +#: Merge.rc:1838 #, c-format msgid "Automatically resize panes\nLock Panes" msgstr "" -#: Merge.rc:1842 +#: Merge.rc:1844 #, c-format msgid "Change the window size" msgstr "" -#: Merge.rc:1843 +#: Merge.rc:1845 #, c-format msgid "Change the window position" msgstr "" -#: Merge.rc:1844 +#: Merge.rc:1846 #, c-format msgid "Reduce the window to an icon" msgstr "" -#: Merge.rc:1845 +#: Merge.rc:1847 #, c-format msgid "Enlarge the window to full size" msgstr "" -#: Merge.rc:1846 +#: Merge.rc:1848 #, c-format msgid "Switch to the next document window" msgstr "" -#: Merge.rc:1847 +#: Merge.rc:1849 #, c-format msgid "Switch to the previous document window" msgstr "" -#: Merge.rc:1848 +#: Merge.rc:1850 #, c-format msgid "Close the active window and prompts to save the documents" msgstr "" -#: Merge.rc:1853 +#: Merge.rc:1855 #, c-format msgid "Restore the window to normal size" msgstr "" -#: Merge.rc:1854 +#: Merge.rc:1856 #, c-format msgid "Activate Task List" msgstr "" -#: Merge.rc:1855 +#: Merge.rc:1857 #, c-format msgid "Activate this window" msgstr "" -#: Merge.rc:1861 +#: Merge.rc:1863 #, c-format msgid "Close print preview mode\nCancel Preview" msgstr "" -#: Merge.rc:1868 +#: Merge.rc:1870 #, c-format msgid "\nFileCompare\n\n\n\nWinMerge.FileCompare\nWinMerge File Compare" msgstr "" -#: Merge.rc:1869 +#: Merge.rc:1871 #, c-format msgid "\nFolderCompare\n\n\n\nWinMerge.FolderCompare\nWinMerge Folder Compare" msgstr "" -#: Merge.rc:1876 +#: Merge.rc:1878 #, c-format msgid "Preserve original EOL chars" msgstr "" -#: Merge.rc:1883 +#: Merge.rc:1885 #, c-format msgid "Press any key" msgstr "" -#: Merge.rc:1889 -#: Merge.rc:1890 +#: Merge.rc:1891 +#: Merge.rc:1892 #, c-format msgid "Right click on the path to copy" msgstr "" -#: Merge.rc:1896 +#: Merge.rc:1898 #, c-format msgid "Developers:\nDean Grimm, Christian List, Kimmo Varis, Jochen Tucht, Tim Gerundt, Takashi Sawanaki, Gal Hammer, Alexander Skinner" msgstr "" -#: Merge.rc:1897 +#: Merge.rc:1899 #, c-format msgid "WinMerge comes with ABSOLUTELY NO WARRANTY. This is free software and you are welcome to redistribute it under certain circumstances; see the GNU General Public License in the Help menu for details." msgstr "" -#: Merge.rc:1903 +#: Merge.rc:1905 #, c-format msgid "&Ok" msgstr "" -#: Merge.rc:1905 +#: Merge.rc:1907 #, c-format msgid "&Abort" msgstr "" -#: Merge.rc:1906 +#: Merge.rc:1908 #, c-format msgid "&Retry" msgstr "" -#: Merge.rc:1907 +#: Merge.rc:1909 #, c-format msgid "&Ignore" msgstr "" -#: Merge.rc:1908 +#: Merge.rc:1910 #, c-format msgid "Ignore &all" msgstr "" -#: Merge.rc:1909 +#: Merge.rc:1911 #, c-format msgid "&Yes" msgstr "" -#: Merge.rc:1915 +#: Merge.rc:1917 #, c-format msgid "Yes to &all" msgstr "" -#: Merge.rc:1916 +#: Merge.rc:1918 #, c-format msgid "&No" msgstr "" -#: Merge.rc:1917 +#: Merge.rc:1919 #, c-format msgid "No to a&ll" msgstr "" -#: Merge.rc:1918 +#: Merge.rc:1920 #, c-format msgid "&Continue" msgstr "" -#: Merge.rc:1919 +#: Merge.rc:1921 #, c-format msgid "&Skip" msgstr "" -#: Merge.rc:1920 +#: Merge.rc:1922 #, c-format msgid "Skip &all" msgstr "" -#: Merge.rc:1922 +#: Merge.rc:1924 #, c-format msgid "Don't display this &message again." msgstr "" -#: Merge.rc:1923 +#: Merge.rc:1925 #, c-format msgid "Don't ask this &question again." msgstr "" -#: Merge.rc:1933 +#: Merge.rc:1935 #, c-format msgid "Syntax colors" msgstr "" -#: Merge.rc:1934 +#: Merge.rc:1936 #, c-format msgid "Text Colors" msgstr "" -#: Merge.rc:1936 +#: Merge.rc:1938 #, c-format msgid "Version Control" msgstr "" -#: Merge.rc:1946 +#: Merge.rc:1948 #, c-format msgid "To:" msgstr "" -#: Merge.rc:1947 +#: Merge.rc:1949 #, c-format msgid "From left:" msgstr "" -#: Merge.rc:1948 +#: Merge.rc:1950 #, c-format msgid "To left:" msgstr "" -#: Merge.rc:1949 +#: Merge.rc:1951 #, c-format msgid "From right:" msgstr "" -#: Merge.rc:1950 +#: Merge.rc:1952 #, c-format msgid "To right:" msgstr "" -#: Merge.rc:1956 +#: Merge.rc:1958 #, c-format msgid "Version %1" msgstr "" -#: Merge.rc:1957 +#: Merge.rc:1959 #, c-format msgid "Unicode" msgstr "" -#: Merge.rc:1963 +#: Merge.rc:1965 #, c-format msgid "Options (%1)" msgstr "" -#: Merge.rc:1964 +#: Merge.rc:1966 #, c-format msgid "All message boxes are now displayed again." msgstr "" -#: Merge.rc:1965 +#: Merge.rc:1967 #, c-format msgid "Modifications have been made to the current file comparison session. Some settings may not take place until the current file comparison is restarted." msgstr "" -#: Merge.rc:1966 +#: Merge.rc:1968 #, c-format msgid "The selected font change will not be applied to any currently visible difference windows." msgstr "" -#: Merge.rc:1968 +#: Merge.rc:1970 #, c-format msgid "Value in Tab size -field is not in range WinMerge accepts.\n\nPlease use values 1 - %1." msgstr "" -#: Merge.rc:1970 +#: Merge.rc:1972 #, c-format msgid "Are you sure you want to reset all WinMerge options to default values?\n\nPlease re-start WinMerge after the reset." msgstr "" -#: Merge.rc:1976 +#: Merge.rc:1978 #, c-format msgid "Open" msgstr "" -#: Merge.rc:1977 +#: Merge.rc:1979 #, c-format msgid "Programs|*.exe;*.bat;*.cmd|All Files (*.*)|*.*||" msgstr "" -#: Merge.rc:1978 +#: Merge.rc:1980 #, c-format msgid "All Files (*.*)|*.*||" msgstr "" -#: Merge.rc:1979 +#: Merge.rc:1981 #, c-format msgid "WinMerge Project Files (*.WinMerge)|*.WinMerge||" msgstr "" -#: Merge.rc:1981 +#: Merge.rc:1983 #, c-format msgid "Options files (*.ini)|*.ini|All Files (*.*)|*.*||" msgstr "" -#: Merge.rc:1987 +#: Merge.rc:1989 #, c-format msgid "Text Files (*.csv;*.asc;*.rpt;*.txt)|*.csv;*.asc;*.rpt;*.txt|All Files (*.*)|*.*||" msgstr "" -#: Merge.rc:1988 +#: Merge.rc:1990 #, c-format msgid "HTML Files (*.htm,*.html)|*.htm;*.html|All Files (*.*)|*.*||" msgstr "" -#: Merge.rc:1989 +#: Merge.rc:1991 #, c-format msgid "XML Files (*.xml)|*.xml|All Files (*.*)|*.*||" msgstr "" -#: Merge.rc:1995 +#: Merge.rc:1997 #, c-format msgid "UTF-8" msgstr "" -#: Merge.rc:1996 +#: Merge.rc:1998 #, c-format msgid "UTF-8 (B)" msgstr "" -#: Merge.rc:1997 +#: Merge.rc:1999 #, c-format msgid "UCS-2 LE" msgstr "" -#: Merge.rc:1998 +#: Merge.rc:2000 #, c-format msgid "UCS-2 BE" msgstr "" -#: Merge.rc:2004 +#: Merge.rc:2006 #, c-format msgid "Full Contents" msgstr "" -#: Merge.rc:2005 +#: Merge.rc:2007 #, c-format msgid "Quick Contents" msgstr "" -#: Merge.rc:2006 +#: Merge.rc:2008 #, c-format msgid "Modified Date" msgstr "" -#: Merge.rc:2007 +#: Merge.rc:2009 #, c-format msgid "Modified Date and Size" msgstr "" -#: Merge.rc:2008 +#: Merge.rc:2010 #, c-format msgid "Size" msgstr "" -#: Merge.rc:2014 -#: Merge.rc:2631 +#: Merge.rc:2016 +#: Merge.rc:2640 #, c-format msgid "Name" msgstr "" -#: Merge.rc:2015 +#: Merge.rc:2017 #, c-format msgid "Location" msgstr "" -#: Merge.rc:2016 +#: Merge.rc:2018 #, c-format msgid "Filters" msgstr "" -#: Merge.rc:2017 +#: Merge.rc:2019 #, c-format msgid "[F] " msgstr "" -#: Merge.rc:2018 -#: Merge.rc:2633 +#: Merge.rc:2020 +#: Merge.rc:2642 #, c-format msgid "Description" msgstr "" -#: Merge.rc:2019 +#: Merge.rc:2021 #, c-format msgid "Select filename for new filter" msgstr "" -#: Merge.rc:2020 +#: Merge.rc:2022 #, c-format msgid "File Filters (*.flt)|*.flt|All Files (*.*)|*.*||" msgstr "" -#: Merge.rc:2022 +#: Merge.rc:2024 #, c-format msgid "Cannot find file filter template file!\n\nPlease copy file %1 to WinMerge/Filters -folder:\n%2." msgstr "" -#: Merge.rc:2024 +#: Merge.rc:2026 #, c-format msgid "Cannot copy filter template file to filter folder:\n%1\n\nPlease make sure the folder exists and is writable." msgstr "" -#: Merge.rc:2026 +#: Merge.rc:2028 #, c-format msgid "User's filter file folder is not defined!\n\nPlease select filter folder in Options/System." msgstr "" -#: Merge.rc:2028 +#: Merge.rc:2030 #, c-format msgid "Failed to delete the filter file:\n%1\n\nMaybe the file is read-only?" msgstr "" -#: Merge.rc:2029 +#: Merge.rc:2031 #, c-format msgid "Locate filter file to install" msgstr "" -#: Merge.rc:2031 +#: Merge.rc:2033 #, c-format msgid "Installing filter file failed.\n\nCould not copy new filter file to filter folder." msgstr "" -#: Merge.rc:2033 +#: Merge.rc:2035 #, c-format msgid "Filter file already exists. Overwrite existing filter?" msgstr "" -#: Merge.rc:2039 +#: Merge.rc:2041 #, c-format msgid "Regular expression" msgstr "" -#: Merge.rc:2045 +#: Merge.rc:2047 #, c-format msgid "Filters were updated. Do you want to refresh all open folder compares?\n\nIf you do not want to refresh all compares now you can select No and refresh compares later." msgstr "" -#: Merge.rc:2052 +#: Merge.rc:2054 #, c-format msgid "&Path to SS.EXE:" msgstr "" -#: Merge.rc:2058 +#: Merge.rc:2060 #, c-format msgid "Folder Comparison Results" msgstr "" -#: Merge.rc:2059 +#: Merge.rc:2061 #, c-format msgid "File Comparison" msgstr "" -#: Merge.rc:2060 +#: Merge.rc:2062 #, c-format msgid "Untitled left" msgstr "" -#: Merge.rc:2061 +#: Merge.rc:2063 #, c-format msgid "Untitled right" msgstr "" -#: Merge.rc:2062 +#: Merge.rc:2064 #, c-format msgid "Theirs File" msgstr "" -#: Merge.rc:2063 +#: Merge.rc:2065 #, c-format msgid "Mine File" msgstr "" -#: Merge.rc:2069 +#: Merge.rc:2071 #, c-format msgid "Scanning files..." msgstr "" -#: Merge.rc:2070 +#: Merge.rc:2072 #, c-format msgid "Opening selection" msgstr "" -#: Merge.rc:2071 +#: Merge.rc:2073 #, c-format msgid "Copying Left to Right" msgstr "" -#: Merge.rc:2072 +#: Merge.rc:2074 #, c-format msgid "Copying Right to Left" msgstr "" -#: Merge.rc:2073 +#: Merge.rc:2075 #, c-format msgid "Copying All to Left" msgstr "" -#: Merge.rc:2074 +#: Merge.rc:2076 #, c-format msgid "Copying All to Right" msgstr "" -#: Merge.rc:2075 +#: Merge.rc:2077 #, c-format msgid "Copying files..." msgstr "" -#: Merge.rc:2076 +#: Merge.rc:2078 #, c-format msgid "Deleting files..." msgstr "" -#: Merge.rc:2077 +#: Merge.rc:2079 #, c-format msgid "Moving files..." msgstr "" -#: Merge.rc:2078 +#: Merge.rc:2080 #, c-format msgid "Creating the report..." msgstr "" -#: Merge.rc:2079 +#: Merge.rc:2081 #, c-format msgid "Undoing the last operation..." msgstr "" -#: Merge.rc:2080 +#: Merge.rc:2082 #, c-format msgid "Redoing the previous operation..." msgstr "" -#: Merge.rc:2086 +#: Merge.rc:2088 #, c-format msgid "Ln: %s Col: %d/%d Ch: %d/%d EOL: %s" msgstr "" -#: Merge.rc:2087 +#: Merge.rc:2089 #, c-format msgid "Line: %s" msgstr "" -#: Merge.rc:2088 +#: Merge.rc:2090 #, c-format msgid "Ln: %s Col: %d/%d Ch: %d/%d" msgstr "" -#: Merge.rc:2089 +#: Merge.rc:2091 #, c-format msgid "Merge" msgstr "" -#: Merge.rc:2090 +#: Merge.rc:2092 #, c-format msgid "Difference %1 of %2" msgstr "" -#: Merge.rc:2091 +#: Merge.rc:2093 #, c-format msgid "%1 Differences Found" msgstr "" -#: Merge.rc:2092 +#: Merge.rc:2094 #, c-format msgid "1 Difference Found" msgstr "" #. Abbreviation from "Read Only" -#: Merge.rc:2093 +#: Merge.rc:2095 #, c-format msgid "RO" msgstr "" -#: Merge.rc:2099 +#: Merge.rc:2101 #, c-format msgid "Item %1 of %2" msgstr "" -#: Merge.rc:2100 +#: Merge.rc:2102 #, c-format msgid "Items: %1" msgstr "" -#: Merge.rc:2106 +#: Merge.rc:2108 #, c-format msgid "Select two existing folders or files to compare" msgstr "" -#: Merge.rc:2107 +#: Merge.rc:2109 #, c-format msgid "Folder Selection" msgstr "" -#: Merge.rc:2108 +#: Merge.rc:2110 #, c-format msgid "Select two folders or two files to compare." msgstr "" -#: Merge.rc:2109 +#: Merge.rc:2111 #, c-format msgid "Left path is invalid!" msgstr "" -#: Merge.rc:2110 +#: Merge.rc:2112 #, c-format msgid "Right path is invalid!" msgstr "" -#: Merge.rc:2111 +#: Merge.rc:2113 #, c-format msgid "Both paths are invalid!" msgstr "" -#: Merge.rc:2112 +#: Merge.rc:2114 #, c-format msgid "Choose two files to enable unpacker selection." msgstr "" -#: Merge.rc:2113 +#: Merge.rc:2115 #, c-format msgid "Cannot compare file and folder!" msgstr "" -#: Merge.rc:2119 +#: Merge.rc:2121 #, c-format msgid "File not found: %1" msgstr "" -#: Merge.rc:2120 +#: Merge.rc:2122 #, c-format msgid "File not unpacked: %1" msgstr "" -#: Merge.rc:2121 +#: Merge.rc:2123 #, c-format msgid "Cannot open file\n%1\n\n%2" msgstr "" -#: Merge.rc:2122 +#: Merge.rc:2124 #, c-format msgid "Failed to parse conflict file." msgstr "" -#: Merge.rc:2123 +#: Merge.rc:2125 #, c-format msgid "The file\n%1\nis not a conflict file." msgstr "" -#: Merge.rc:2129 +#: Merge.rc:2131 #, c-format msgid "Save As" msgstr "" -#: Merge.rc:2130 +#: Merge.rc:2132 #, c-format msgid "Save changes to %1?" msgstr "" -#: Merge.rc:2131 +#: Merge.rc:2133 #, c-format msgid "%1 is marked read-only. Would you like to override the read-only file ? (No to save as new filename.)" msgstr "" -#: Merge.rc:2132 +#: Merge.rc:2134 #, c-format msgid "Error checking destination writeability" msgstr "" -#: Merge.rc:2133 +#: Merge.rc:2135 #, c-format msgid "Error backing up file" msgstr "" -#: Merge.rc:2135 +#: Merge.rc:2137 #, c-format msgid "Unable to backup original file:\n%1\n\nContinue anyway?" msgstr "" -#: Merge.rc:2136 +#: Merge.rc:2138 #, c-format msgid "Saving file failed.\n%1\n%2\nDo you want to:\n\t-use a different filename (Press Ok)\n\t-abort the current operation (Press Cancel)?" msgstr "" -#: Merge.rc:2137 +#: Merge.rc:2139 #, c-format msgid "Plugin '%2' cannot pack your changes to the left file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?" msgstr "" -#: Merge.rc:2138 +#: Merge.rc:2140 #, c-format msgid "Plugin '%2' cannot pack your changes to the right file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?" msgstr "" -#: Merge.rc:2139 +#: Merge.rc:2141 #, c-format msgid "Another application has updated file\n%1\nsince WinMerge loaded it.\n\nOverwrite changed file?" msgstr "" -#: Merge.rc:2140 +#: Merge.rc:2142 #, c-format msgid "%1\nis marked read-only. Would you like to override the read-only item?" msgstr "" -#: Merge.rc:2141 +#: Merge.rc:2143 #, c-format msgid "Another application has updated file\n%1\nsince WinMerge scanned it last time.\n\nIf you want to refresh files close current file compare and load files again." msgstr "" -#: Merge.rc:2142 +#: Merge.rc:2144 #, c-format msgid "Save Left File As" msgstr "" -#: Merge.rc:2143 +#: Merge.rc:2145 #, c-format msgid "Save Right File As" msgstr "" -#: Merge.rc:2149 +#: Merge.rc:2151 #, c-format msgid "Cannot merge differences when documents are not in synch.\n\nRefresh documents before continuing." msgstr "" -#: Merge.rc:2155 +#: Merge.rc:2157 #, c-format msgid "You must specify a SourceSafe project path in order to continue (ie: $/MyProject)" msgstr "" -#: Merge.rc:2156 +#: Merge.rc:2158 #, c-format msgid "Checkout files from VSS..." msgstr "" -#: Merge.rc:2157 +#: Merge.rc:2159 #, c-format msgid "Versioning System returned an error while attempting to check out the file. Unable to continue..." msgstr "" -#: Merge.rc:2158 +#: Merge.rc:2160 #, c-format msgid "Error executing versioning system command." msgstr "" -#: Merge.rc:2159 +#: Merge.rc:2161 #, c-format msgid "The VSS Working Folder and the location of the current file do not match. Continue?" msgstr "" -#: Merge.rc:2160 +#: Merge.rc:2162 #, c-format msgid "No VSS database(s) found!" msgstr "" -#: Merge.rc:2161 +#: Merge.rc:2163 #, c-format msgid "Error from VSS:" msgstr "" -#: Merge.rc:2162 +#: Merge.rc:2164 #, c-format msgid "Versioning System returned an error while attempting to check in the file.\n Please, check config spec of used view.\n Undo checkout operation?" msgstr "" -#: Merge.rc:2163 +#: Merge.rc:2165 #, c-format msgid "Versioning System returned an error while attempting to undo checkout the file.\n Please, check config spec of used view. " msgstr "" -#: Merge.rc:2169 -#: Merge.rc:2615 +#: Merge.rc:2171 +#: Merge.rc:2624 #, c-format msgid "None" msgstr "" -#: Merge.rc:2170 +#: Merge.rc:2172 #, c-format msgid "Visual SourceSafe (less than 5.0)" msgstr "" -#: Merge.rc:2171 +#: Merge.rc:2173 #, c-format msgid "Visual SourceSafe (5.0 and above)" msgstr "" -#: Merge.rc:2173 +#: Merge.rc:2175 #, c-format msgid "Break at whitespace" msgstr "" -#: Merge.rc:2174 +#: Merge.rc:2176 #, c-format msgid "Break at whitespace or punctuation" msgstr "" -#: Merge.rc:2180 #: Merge.rc:2182 +#: Merge.rc:2184 #, c-format msgid "Copy selected item to named directory" msgstr "" -#: Merge.rc:2181 #: Merge.rc:2183 +#: Merge.rc:2185 #, c-format msgid "Copy selected item to custom directory" msgstr "" -#: Merge.rc:2184 +#: Merge.rc:2186 #, c-format msgid "Delete selected item on left" msgstr "" -#: Merge.rc:2185 +#: Merge.rc:2187 #, c-format msgid "Delete selected item on right" msgstr "" -#: Merge.rc:2186 +#: Merge.rc:2188 #, c-format msgid "Delete selected item(s) on both sides" msgstr "" -#: Merge.rc:2187 +#: Merge.rc:2189 #, c-format msgid "Hide selected item(s) (on the fly filter)" msgstr "" -#: Merge.rc:2188 +#: Merge.rc:2190 #, c-format msgid "Rename selected item on both sides" msgstr "" -#: Merge.rc:2189 +#: Merge.rc:2191 #, c-format msgid "Right to Left (%1)" msgstr "" -#: Merge.rc:2190 +#: Merge.rc:2192 #, c-format msgid "Left to Right (%1)" msgstr "" -#: Merge.rc:2191 +#: Merge.rc:2193 #, c-format msgid "Right to Left (%1 of %2)" msgstr "" -#: Merge.rc:2192 +#: Merge.rc:2194 #, c-format msgid "Left to Right (%1 of %2)" msgstr "" -#: Merge.rc:2193 -#: Merge.rc:2209 +#: Merge.rc:2195 +#: Merge.rc:2211 #, c-format msgid "Left to... (%1)" msgstr "" -#: Merge.rc:2194 -#: Merge.rc:2210 +#: Merge.rc:2196 +#: Merge.rc:2212 #, c-format msgid "Right to... (%1)" msgstr "" -#: Merge.rc:2195 -#: Merge.rc:2211 +#: Merge.rc:2197 +#: Merge.rc:2213 #, c-format msgid "Left to... (%1 of %2)" msgstr "" -#: Merge.rc:2196 -#: Merge.rc:2212 +#: Merge.rc:2198 +#: Merge.rc:2214 #, c-format msgid "Right to... (%1 of %2)" msgstr "" -#: Merge.rc:2202 +#: Merge.rc:2204 #, c-format msgid "Left (%1)" msgstr "" -#: Merge.rc:2203 +#: Merge.rc:2205 #, c-format msgid "Right (%1)" msgstr "" -#: Merge.rc:2204 +#: Merge.rc:2206 #, c-format msgid "Both (%1)" msgstr "" -#: Merge.rc:2205 +#: Merge.rc:2207 #, c-format msgid "Left (%1 of %2)" msgstr "" -#: Merge.rc:2206 +#: Merge.rc:2208 #, c-format msgid "Right (%1 of %2)" msgstr "" -#: Merge.rc:2207 +#: Merge.rc:2209 #, c-format msgid "Both (%1 of %2)" msgstr "" -#: Merge.rc:2208 +#: Merge.rc:2210 #, c-format msgid "Select destination folder" msgstr "" -#: Merge.rc:2213 +#: Merge.rc:2215 #, c-format msgid "Left side - select destination folder:" msgstr "" -#: Merge.rc:2214 +#: Merge.rc:2216 #, c-format msgid "Right side - select destination folder:" msgstr "" -#: Merge.rc:2215 +#: Merge.rc:2217 #, c-format msgid "(%1 Files Affected)" msgstr "" -#: Merge.rc:2216 +#: Merge.rc:2218 #, c-format msgid "(%1 of %2 Files Affected)" msgstr "" -#: Merge.rc:2222 +#: Merge.rc:2224 #, c-format msgid "Are you sure you want to delete\n\n%1 ?" msgstr "" -#: Merge.rc:2223 +#: Merge.rc:2225 #, c-format msgid "Are you sure you want to copy:" msgstr "" -#: Merge.rc:2224 +#: Merge.rc:2226 #, c-format msgid "Are you sure you want to copy %d items:" msgstr "" -#: Merge.rc:2225 +#: Merge.rc:2227 #, c-format msgid "Operation aborted!\n\nFolder contents at disks has changed, path\n%1\nwas not found.\n\nPlease refresh the compare." msgstr "" -#: Merge.rc:2226 +#: Merge.rc:2228 #, c-format msgid "Are you sure you want to move:" msgstr "" -#: Merge.rc:2227 +#: Merge.rc:2229 #, c-format msgid "Are you sure you want to move %d items:" msgstr "" -#: Merge.rc:2229 +#: Merge.rc:2231 #, c-format msgid "Confirm Move" msgstr "" -#: Merge.rc:2235 +#: Merge.rc:2237 #, c-format msgid "Open left file" msgstr "" -#: Merge.rc:2236 +#: Merge.rc:2238 #, c-format msgid "Open the left file to external editor" msgstr "" -#: Merge.rc:2237 +#: Merge.rc:2239 #, c-format msgid "Open left file with ..." msgstr "" -#: Merge.rc:2238 +#: Merge.rc:2240 #, c-format msgid "Open right file" msgstr "" -#: Merge.rc:2239 +#: Merge.rc:2241 #, c-format msgid "Open the right file to external editor" msgstr "" -#: Merge.rc:2240 +#: Merge.rc:2242 #, c-format msgid "Open right file with..." msgstr "" -#: Merge.rc:2241 +#: Merge.rc:2243 #, c-format msgid "Failed to execute external editor: %1" msgstr "" -#: Merge.rc:2242 +#: Merge.rc:2244 #, c-format msgid "Unknown extension on external editor: %1" msgstr "" -#: Merge.rc:2243 +#: Merge.rc:2245 #, c-format msgid "Copy filenames to clipboard" msgstr "" -#: Merge.rc:2244 +#: Merge.rc:2246 #, c-format msgid "Copy left side pathnames to clipboard" msgstr "" -#: Merge.rc:2245 +#: Merge.rc:2247 #, c-format msgid "Copy right side pathnames to clipboard" msgstr "" -#: Merge.rc:2246 +#: Merge.rc:2248 #, c-format msgid "Copy both sides pathnames to clipboard" msgstr "" -#: Merge.rc:2252 +#: Merge.rc:2254 #, c-format +msgid "Left Shell menu" +msgstr "" + +#: Merge.rc:2255 +#, c-format +msgid "Right Shell menu" +msgstr "" + +#: Merge.rc:2261 +#, c-format msgid "Unknown archive format" msgstr "" -#: Merge.rc:2253 +#: Merge.rc:2262 #, c-format msgid "Add items from left side to archive" msgstr "" -#: Merge.rc:2254 +#: Merge.rc:2263 #, c-format msgid "Add items from right side to archive" msgstr "" -#: Merge.rc:2255 +#: Merge.rc:2264 #, c-format msgid "Add items from both sides to archive" msgstr "" -#: Merge.rc:2256 +#: Merge.rc:2265 #, c-format msgid "Add different items to archive (both sides)" msgstr "" -#: Merge.rc:2258 +#: Merge.rc:2267 #, c-format msgid "Move selected file on left to custom directory" msgstr "" -#: Merge.rc:2260 +#: Merge.rc:2269 #, c-format msgid "Move selected file on right to custom directory" msgstr "" -#: Merge.rc:2266 +#: Merge.rc:2275 #, c-format msgid "Filename" msgstr "" -#: Merge.rc:2267 +#: Merge.rc:2276 #, c-format msgid "Folder" msgstr "" -#: Merge.rc:2268 +#: Merge.rc:2277 #, c-format msgid "Comparison result" msgstr "" -#: Merge.rc:2269 +#: Merge.rc:2278 #, c-format msgid "Left Date" msgstr "" -#: Merge.rc:2270 +#: Merge.rc:2279 #, c-format msgid "Right Date" msgstr "" -#: Merge.rc:2271 +#: Merge.rc:2280 #, c-format msgid "Extension" msgstr "" -#: Merge.rc:2272 +#: Merge.rc:2281 #, c-format msgid "Left Size" msgstr "" -#: Merge.rc:2273 +#: Merge.rc:2282 #, c-format msgid "Right Size" msgstr "" -#: Merge.rc:2274 +#: Merge.rc:2283 #, c-format msgid "Right Size (Short)" msgstr "" -#: Merge.rc:2275 +#: Merge.rc:2284 #, c-format msgid "Left Size (Short)" msgstr "" -#: Merge.rc:2281 +#: Merge.rc:2290 #, c-format msgid "Left Creation Time" msgstr "" -#: Merge.rc:2282 +#: Merge.rc:2291 #, c-format msgid "Right Creation Time" msgstr "" -#: Merge.rc:2283 +#: Merge.rc:2292 #, c-format msgid "Newer File" msgstr "" -#: Merge.rc:2284 +#: Merge.rc:2293 #, c-format msgid "Left File Version" msgstr "" -#: Merge.rc:2285 +#: Merge.rc:2294 #, c-format msgid "Right File Version" msgstr "" -#: Merge.rc:2286 +#: Merge.rc:2295 #, c-format msgid "Short Result" msgstr "" -#: Merge.rc:2287 +#: Merge.rc:2296 #, c-format msgid "Left Attributes" msgstr "" -#: Merge.rc:2288 +#: Merge.rc:2297 #, c-format msgid "Right Attributes" msgstr "" -#: Merge.rc:2289 +#: Merge.rc:2298 #, c-format msgid "Left EOL" msgstr "" -#: Merge.rc:2290 +#: Merge.rc:2299 #, c-format msgid "Right EOL" msgstr "" -#: Merge.rc:2296 +#: Merge.rc:2305 #, c-format msgid "Left Encoding" msgstr "" -#: Merge.rc:2297 +#: Merge.rc:2306 #, c-format msgid "Right Encoding" msgstr "" -#: Merge.rc:2298 +#: Merge.rc:2307 #, c-format msgid "Ignored Diff." msgstr "" -#: Merge.rc:2299 +#: Merge.rc:2308 #, c-format msgid "Differences" msgstr "" -#: Merge.rc:2300 -#: Merge.rc:2611 +#: Merge.rc:2309 +#: Merge.rc:2620 #, c-format msgid "Binary" msgstr "" -#: Merge.rc:2306 +#: Merge.rc:2315 #, c-format msgid "Unable to compare files" msgstr "" -#: Merge.rc:2307 +#: Merge.rc:2316 #, c-format msgid "Item aborted" msgstr "" -#: Merge.rc:2308 +#: Merge.rc:2317 #, c-format msgid "File skipped" msgstr "" -#: Merge.rc:2309 +#: Merge.rc:2318 #, c-format msgid "Folder skipped" msgstr "" -#: Merge.rc:2310 +#: Merge.rc:2319 #, c-format msgid "Left only: %1" msgstr "" -#: Merge.rc:2311 +#: Merge.rc:2320 #, c-format msgid "Right only: %1" msgstr "" -#: Merge.rc:2312 +#: Merge.rc:2321 #, c-format msgid "Binary files are identical" msgstr "" -#: Merge.rc:2314 +#: Merge.rc:2323 #, c-format msgid "Binary files are different" msgstr "" -#: Merge.rc:2315 +#: Merge.rc:2324 #, c-format msgid "Files are different" msgstr "" -#: Merge.rc:2316 +#: Merge.rc:2325 #, c-format msgid "Folders are different" msgstr "" -#: Merge.rc:2317 +#: Merge.rc:2326 #, c-format msgid "Left Only" msgstr "" -#: Merge.rc:2318 +#: Merge.rc:2327 #, c-format msgid "Right Only" msgstr "" -#: Merge.rc:2320 +#: Merge.rc:2329 #, c-format msgid "Error" msgstr "" -#: Merge.rc:2321 +#: Merge.rc:2330 #, c-format msgid "Text files are identical" msgstr "" -#: Merge.rc:2326 +#: Merge.rc:2335 #, c-format msgid "Text files are different" msgstr "" -#: Merge.rc:2332 +#: Merge.rc:2341 #, c-format msgid "Elapsed time: %ld ms" msgstr "" -#: Merge.rc:2333 +#: Merge.rc:2342 #, c-format msgid "1 item selected" msgstr "" -#: Merge.rc:2334 +#: Merge.rc:2343 #, c-format msgid "%1 items selected" msgstr "" -#: Merge.rc:2340 +#: Merge.rc:2349 #, c-format msgid "Filename or folder name." msgstr "" -#: Merge.rc:2341 +#: Merge.rc:2350 #, c-format msgid "Subfolder name when subfolders are included." msgstr "" -#: Merge.rc:2342 +#: Merge.rc:2351 #, c-format msgid "Comparison result, long form." msgstr "" -#: Merge.rc:2343 +#: Merge.rc:2352 #, c-format msgid "Left side modification date." msgstr "" -#: Merge.rc:2344 +#: Merge.rc:2353 #, c-format msgid "Right side modification date." msgstr "" -#: Merge.rc:2345 +#: Merge.rc:2354 #, c-format msgid "File's extension." msgstr "" -#: Merge.rc:2346 +#: Merge.rc:2355 #, c-format msgid "Left file size in bytes." msgstr "" -#: Merge.rc:2347 +#: Merge.rc:2356 #, c-format msgid "Right file size in bytes." msgstr "" -#: Merge.rc:2348 +#: Merge.rc:2357 #, c-format... [truncated message content] |
From: <ki...@us...> - 2008-12-01 17:04:32
|
Revision: 6136 http://winmerge.svn.sourceforge.net/winmerge/?rev=6136&view=rev Author: kimmov Date: 2008-12-01 17:04:25 +0000 (Mon, 01 Dec 2008) Log Message: ----------- Use UINT_PTR type instead of POSITION type when referring to items in DiffItem List. POSITION is a MFC-only typefef, while UINT_PTR is Windows type, so we get rid of some MFC dependencies and get a bit cleaner code too. Modified Paths: -------------- trunk/Src/DiffContext.cpp trunk/Src/DiffContext.h trunk/Src/DiffItemList.cpp trunk/Src/DiffItemList.h trunk/Src/DirActions.cpp trunk/Src/DirDoc.cpp trunk/Src/DirDoc.h trunk/Src/DirScan.cpp trunk/Src/DirScan.h trunk/Src/DirView.cpp trunk/Src/DirView.h trunk/Src/DirViewColHandler.cpp trunk/Src/HexMergeDoc.cpp Modified: trunk/Src/DiffContext.cpp =================================================================== --- trunk/Src/DiffContext.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DiffContext.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -94,7 +94,7 @@ * @param [in] bLeft Update left-side info. * @param [in] bRight Update right-side info. */ -void CDiffContext::UpdateStatusFromDisk(POSITION diffpos, BOOL bLeft, BOOL bRight) +void CDiffContext::UpdateStatusFromDisk(UINT_PTR diffpos, BOOL bLeft, BOOL bRight) { DIFFITEM &di = GetDiffRefAt(diffpos); if (bLeft) Modified: trunk/Src/DiffContext.h =================================================================== --- trunk/Src/DiffContext.h 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DiffContext.h 2008-12-01 17:04:25 UTC (rev 6136) @@ -91,7 +91,7 @@ // change an existing difference BOOL UpdateInfoFromDiskHalf(DIFFITEM & di, BOOL bLeft); - void UpdateStatusFromDisk(POSITION diffpos, BOOL bLeft, BOOL bRight); + void UpdateStatusFromDisk(UINT_PTR diffpos, BOOL bLeft, BOOL bRight); BOOL CreateCompareOptions(int compareMethod, const DIFFOPTIONS & options); CompareOptions * GetCompareOptions(int compareMethod); Modified: trunk/Src/DiffItemList.cpp =================================================================== --- trunk/Src/DiffItemList.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DiffItemList.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -3,7 +3,7 @@ * * @brief Implementation of DiffItemList */ -// RCS ID line follows -- this is updated by CVS +// ID line follows -- this is updated by SVN // $Id$ #include "stdafx.h" @@ -48,7 +48,7 @@ * @brief Remove diffitem from structured DIFFITEM tree * @param diffpos position of item to remove */ -void DiffItemList::RemoveDiff(POSITION diffpos) +void DiffItemList::RemoveDiff(UINT_PTR diffpos) { DIFFITEM *p = (DIFFITEM *)diffpos; p->RemoveSelf(); @@ -61,15 +61,15 @@ void DiffItemList::RemoveAll() { while (m_root.IsSibling(m_root.Flink)) - RemoveDiff((POSITION)m_root.Flink); + RemoveDiff((UINT_PTR)m_root.Flink); } /** * @brief Get position of first item in structured DIFFITEM tree */ -POSITION DiffItemList::GetFirstDiffPosition() const +UINT_PTR DiffItemList::GetFirstDiffPosition() const { - return (POSITION)m_root.IsSibling(m_root.Flink); + return (UINT_PTR)m_root.IsSibling(m_root.Flink); } /** @@ -77,13 +77,13 @@ * @param parentdiffpos [in] Position of parent diff item * @return Position of first child item */ -POSITION DiffItemList::GetFirstChildDiffPosition(POSITION parentdiffpos) const +UINT_PTR DiffItemList::GetFirstChildDiffPosition(UINT_PTR parentdiffpos) const { DIFFITEM *parent = (DIFFITEM *)parentdiffpos; if (parent) - return (POSITION)parent->children.IsSibling(parent->children.Flink); + return (UINT_PTR)parent->children.IsSibling(parent->children.Flink); else - return (POSITION)m_root.IsSibling(m_root.Flink); + return (UINT_PTR)m_root.IsSibling(m_root.Flink); } /** @@ -91,7 +91,7 @@ * @param diffpos position of current item, updated to next item position * @return Diff Item in current position */ -const DIFFITEM &DiffItemList::GetNextDiffPosition(POSITION & diffpos) const +const DIFFITEM &DiffItemList::GetNextDiffPosition(UINT_PTR & diffpos) const { DIFFITEM *p = (DIFFITEM *)diffpos; if (p->HasChildren()) @@ -104,9 +104,9 @@ do { if (cur->parent) - diffpos = (POSITION)cur->parent->children.IsSibling(cur->Flink); + diffpos = (UINT_PTR)cur->parent->children.IsSibling(cur->Flink); else - diffpos = (POSITION)m_root.IsSibling(cur->Flink); + diffpos = (UINT_PTR)m_root.IsSibling(cur->Flink); cur = cur->parent; } while (!diffpos && cur); } @@ -118,7 +118,7 @@ * @param diffpos position of current item, updated to next item position * @return Diff Item (by reference) in current position */ -DIFFITEM &DiffItemList::GetNextDiffRefPosition(POSITION & diffpos) +DIFFITEM &DiffItemList::GetNextDiffRefPosition(UINT_PTR & diffpos) { return (DIFFITEM &)GetNextDiffPosition(diffpos); } @@ -128,13 +128,13 @@ * @param diffpos position of current item, updated to next sibling item position * @return Diff Item in current position */ -const DIFFITEM &DiffItemList::GetNextSiblingDiffPosition(POSITION & diffpos) const +const DIFFITEM &DiffItemList::GetNextSiblingDiffPosition(UINT_PTR & diffpos) const { DIFFITEM *p = (DIFFITEM *)diffpos; if (p->parent) - diffpos = (POSITION)p->parent->children.IsSibling(p->Flink); + diffpos = (UINT_PTR)p->parent->children.IsSibling(p->Flink); else - diffpos = (POSITION)m_root.IsSibling(p->Flink); + diffpos = (UINT_PTR)m_root.IsSibling(p->Flink); return *p; } @@ -143,7 +143,7 @@ * @param diffpos position of current item, updated to next sibling item position * @return Diff Item (by reference) in current position */ -DIFFITEM &DiffItemList::GetNextSiblingDiffRefPosition(POSITION & diffpos) +DIFFITEM &DiffItemList::GetNextSiblingDiffRefPosition(UINT_PTR & diffpos) { return (DIFFITEM &)GetNextSiblingDiffPosition(diffpos); } @@ -161,7 +161,7 @@ * SetDiffStatusCode(pos, DIFFCODE::SAME+DIFFCODE::BOTH, DIFFCODE::COMPAREFLAGS+DIFFCODE::SIDEFLAG); * changes the comparison result to be the same and the side status to be both */ -void DiffItemList::SetDiffStatusCode(POSITION diffpos, UINT diffcode, UINT mask) +void DiffItemList::SetDiffStatusCode(UINT_PTR diffpos, UINT diffcode, UINT mask) { ASSERT(diffpos); DIFFITEM & di = GetDiffRefAt(diffpos); @@ -173,7 +173,7 @@ /** * @brief Update difference counts. */ -void DiffItemList::SetDiffCounts(POSITION diffpos, UINT diffs, UINT ignored) +void DiffItemList::SetDiffCounts(UINT_PTR diffpos, UINT diffs, UINT ignored) { ASSERT(diffpos); DIFFITEM & di = GetDiffRefAt(diffpos); @@ -186,7 +186,7 @@ * @param [in] diffpos Position of item. * @return Custom flags from item. */ -UINT DiffItemList::GetCustomFlags1(POSITION diffpos) const +UINT DiffItemList::GetCustomFlags1(UINT_PTR diffpos) const { ASSERT(diffpos); const DIFFITEM & di = GetDiffAt(diffpos); @@ -198,7 +198,7 @@ * @param [in] diffpos Position of item. * @param [in] flag Value of flag to set. */ -void DiffItemList::SetCustomFlags1(POSITION diffpos, UINT flag) +void DiffItemList::SetCustomFlags1(UINT_PTR diffpos, UINT flag) { ASSERT(diffpos); DIFFITEM & di = GetDiffRefAt(diffpos); Modified: trunk/Src/DiffItemList.h =================================================================== --- trunk/Src/DiffItemList.h 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DiffItemList.h 2008-12-01 17:04:25 UTC (rev 6136) @@ -12,7 +12,11 @@ #include "DiffItem.h" /** - * @brief List of DiffItems + * @brief List of DIFFITEMs in folder compare. + * This class holds a list of items we have in the folder compare. Basically + * we have a linked list of DIFFITEMs. But there is a structure that follows + * the actual folder structure. Each DIFFITEM can have a parent folder and + * another list of child items. Parent DIFFITEM is always a folder item. */ class DiffItemList { @@ -21,42 +25,42 @@ ~DiffItemList(); // add & remove differences DIFFITEM &AddDiff(DIFFITEM *parent); - void RemoveDiff(POSITION diffpos); + void RemoveDiff(UINT_PTR diffpos); void RemoveAll(); // to iterate over all differences on list - POSITION GetFirstDiffPosition() const; - POSITION GetFirstChildDiffPosition(POSITION parentdiffpos) const; - const DIFFITEM & GetNextDiffPosition(POSITION & diffpos) const; - DIFFITEM & GetNextDiffRefPosition(POSITION & diffpos); - const DIFFITEM & GetNextSiblingDiffPosition(POSITION & diffpos) const; - DIFFITEM &GetNextSiblingDiffRefPosition(POSITION & diffpos); - const DIFFITEM & GetDiffAt(POSITION diffpos) const; - DIFFITEM & GetDiffRefAt(POSITION diffpos); + UINT_PTR GetFirstDiffPosition() const; + UINT_PTR GetFirstChildDiffPosition(UINT_PTR parentdiffpos) const; + const DIFFITEM & GetNextDiffPosition(UINT_PTR & diffpos) const; + DIFFITEM & GetNextDiffRefPosition(UINT_PTR & diffpos); + const DIFFITEM & GetNextSiblingDiffPosition(UINT_PTR & diffpos) const; + DIFFITEM &GetNextSiblingDiffRefPosition(UINT_PTR & diffpos); + const DIFFITEM & GetDiffAt(UINT_PTR diffpos) const; + DIFFITEM & GetDiffRefAt(UINT_PTR diffpos); - void SetDiffStatusCode(POSITION diffpos, UINT diffcode, UINT mask); - void SetDiffCounts(POSITION diffpos, UINT diffs, UINT ignored); - UINT GetCustomFlags1(POSITION diffpos) const; - void SetCustomFlags1(POSITION diffpos, UINT flag); + void SetDiffStatusCode(UINT_PTR diffpos, UINT diffcode, UINT mask); + void SetDiffCounts(UINT_PTR diffpos, UINT diffs, UINT ignored); + UINT GetCustomFlags1(UINT_PTR diffpos) const; + void SetCustomFlags1(UINT_PTR diffpos, UINT flag); protected: ListEntry m_root; /**< Root of list of diffitems */ }; /** - * @brief Get copy of Diff Item at given position of CDiffContext array + * @brief Get copy of Diff Item at given position in difflist. * @param diffpos position of item to return */ -inline const DIFFITEM & DiffItemList::GetDiffAt(POSITION diffpos) const +inline const DIFFITEM & DiffItemList::GetDiffAt(UINT_PTR diffpos) const { return *reinterpret_cast<DIFFITEM *>(diffpos); } /** - * @brief Get Diff Item (by reference) at given position of CDiffContext array + * @brief Get Diff Item (by reference) at given position in difflist. * @param diffpos position of item to return */ -inline DIFFITEM & DiffItemList::GetDiffRefAt(POSITION diffpos) +inline DIFFITEM & DiffItemList::GetDiffRefAt(UINT_PTR diffpos) { return *reinterpret_cast<DIFFITEM *>(diffpos); } Modified: trunk/Src/DirActions.cpp =================================================================== --- trunk/Src/DirActions.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirActions.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -997,7 +997,7 @@ // Start handling from tail of list, so removing items // doesn't invalidate our item indexes. FileActionItem act = actionList.RemoveTailActionItem(); - POSITION diffpos = GetItemKey(act.context); + UINT_PTR diffpos = GetItemKey(act.context); DIFFCODE diffcode = pDoc->GetDiffByKey(diffpos).diffcode; BOOL bUpdateLeft = FALSE; BOOL bUpdateRight = FALSE; @@ -1272,8 +1272,8 @@ */ void CDirView::GetItemFileNames(int sel, String& strLeft, String& strRight) const { - POSITION diffpos = GetItemKey(sel); - if (diffpos == (POSITION)SPECIAL_ITEM_POS) + UINT_PTR diffpos = GetItemKey(sel); + if (diffpos == (UINT_PTR)SPECIAL_ITEM_POS) { strLeft.empty(); strRight.empty(); @@ -1589,7 +1589,7 @@ return FALSE; } - POSITION key = GetItemKey(nSelItem); + UINT_PTR key = GetItemKey(nSelItem); ASSERT(key != SPECIAL_ITEM_POS); ASSERT(&di == &GetDocument()->GetDiffRefByKey(key)); Modified: trunk/Src/DirDoc.cpp =================================================================== --- trunk/Src/DirDoc.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirDoc.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -473,7 +473,7 @@ * @param [in] bLeft If TRUE left-side item is updated. * @param [in] bRight If TRUE right-side item is updated. */ -void CDirDoc::UpdateStatusFromDisk(POSITION diffPos, BOOL bLeft, BOOL bRight) +void CDirDoc::UpdateStatusFromDisk(UINT_PTR diffPos, BOOL bLeft, BOOL bRight) { m_pCtxt->UpdateStatusFromDisk(diffPos, bLeft, bRight); } @@ -490,7 +490,7 @@ void CDirDoc::ReloadItemStatus(UINT nIdx, BOOL bLeft, BOOL bRight) { // Get position of item in DiffContext - POSITION diffpos = m_pDirView->GetItemKey(nIdx); + UINT_PTR diffpos = m_pDirView->GetItemKey(nIdx); // in case just copied (into existence) or modified UpdateStatusFromDisk(diffpos, bLeft, bRight); @@ -522,7 +522,7 @@ * @return POSITION to item, NULL if not found. * @note Filenames must be same, if they differ NULL is returned. */ -POSITION CDirDoc::FindItemFromPaths(LPCTSTR pathLeft, LPCTSTR pathRight) +UINT_PTR CDirDoc::FindItemFromPaths(LPCTSTR pathLeft, LPCTSTR pathRight) { LPCTSTR file1 = paths_FindFileName(pathLeft); LPCTSTR file2 = paths_FindFileName(pathRight); @@ -553,8 +553,8 @@ if (String::size_type length = path2.length()) path2.resize(length - 1); // remove trailing backslash - POSITION pos = m_pCtxt->GetFirstDiffPosition(); - while (POSITION currentPos = pos) // Save our current pos before getting next + UINT_PTR pos = m_pCtxt->GetFirstDiffPosition(); + while (UINT_PTR currentPos = pos) // Save our current pos before getting next { const DIFFITEM &di = m_pCtxt->GetNextDiffPosition(pos); if (di.left.path == path1 && @@ -565,7 +565,7 @@ return currentPos; } } - return NULL; + return 0; } /** @@ -750,7 +750,7 @@ void CDirDoc::UpdateChangedItem(PathContext &paths, UINT nDiffs, UINT nTrivialDiffs, BOOL bIdentical) { - POSITION pos = FindItemFromPaths(paths.GetLeft().c_str(), paths.GetRight().c_str()); + UINT_PTR pos = FindItemFromPaths(paths.GetLeft().c_str(), paths.GetRight().c_str()); // If we failed files could have been swapped so lets try again if (!pos) pos = FindItemFromPaths(paths.GetRight().c_str(), paths.GetLeft().c_str()); @@ -854,7 +854,7 @@ void CDirDoc::SetDiffStatus(UINT diffcode, UINT mask, int idx) { // Get position of item in DiffContext - POSITION diffpos = m_pDirView->GetItemKey(idx); + UINT_PTR diffpos = m_pDirView->GetItemKey(idx); // TODO: Why is the update broken into these pieces ? // Someone could figure out these pieces and probably simplify this. @@ -1008,7 +1008,7 @@ void CDirDoc::SetDiffCounts(UINT diffs, UINT ignored, int idx) { // Get position of item in DiffContext - POSITION diffpos = m_pDirView->GetItemKey(idx); + UINT_PTR diffpos = m_pDirView->GetItemKey(idx); // Update diff counts m_pCtxt->SetDiffCounts(diffpos, diffs, ignored); @@ -1020,7 +1020,7 @@ * @param [in] act Action that was done. * @param [in] pos List position for DIFFITEM affected. */ -void CDirDoc::UpdateDiffAfterOperation(const FileActionItem & act, POSITION pos) +void CDirDoc::UpdateDiffAfterOperation(const FileActionItem & act, UINT_PTR pos) { ASSERT(pos != NULL); const DIFFITEM &di = GetDiffByKey(pos); @@ -1112,7 +1112,7 @@ * @param [in] flag Flag value to set. * @param [in] mask Mask for possible flag values. */ -void CDirDoc::SetItemViewFlag(POSITION key, UINT flag, UINT mask) +void CDirDoc::SetItemViewFlag(UINT_PTR key, UINT flag, UINT mask) { UINT curFlags = m_pCtxt->GetCustomFlags1(key); curFlags &= ~mask; // Zero bits masked @@ -1127,7 +1127,7 @@ */ void CDirDoc::SetItemViewFlag(UINT flag, UINT mask) { - POSITION pos = m_pCtxt->GetFirstDiffPosition(); + UINT_PTR pos = m_pCtxt->GetFirstDiffPosition(); while (pos != NULL) { Modified: trunk/Src/DirDoc.h =================================================================== --- trunk/Src/DirDoc.h 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirDoc.h 2008-12-01 17:04:25 UTC (rev 6136) @@ -95,12 +95,12 @@ void CompareReady(); void UpdateChangedItem(PathContext & paths, UINT nDiffs, UINT nTrivialDiffs, BOOL bIdentical); - POSITION FindItemFromPaths(LPCTSTR pathLeft, LPCTSTR pathRight); + UINT_PTR FindItemFromPaths(LPCTSTR pathLeft, LPCTSTR pathRight); void SetDiffSide(UINT diffcode, int idx); void SetDiffCompare(UINT diffcode, int idx); void UpdateResources(); void InitStatusStrings(); - void UpdateStatusFromDisk(POSITION diffPos, BOOL bLeft, BOOL bRight); + void UpdateStatusFromDisk(UINT_PTR diffPos, BOOL bLeft, BOOL bRight); void ReloadItemStatus(UINT nIdx, BOOL bLeft, BOOL bRight); void Redisplay(); virtual ~CDirDoc(); @@ -111,7 +111,7 @@ CDiffThread m_diffThread; void SetDiffStatus(UINT diffcode, UINT mask, int idx); void SetDiffCounts(UINT diffs, UINT ignored, int idx); - void UpdateDiffAfterOperation(const FileActionItem & act, POSITION pos); + void UpdateDiffAfterOperation(const FileActionItem & act, UINT_PTR pos); void UpdateHeaderPath(BOOL bLeft); void AbortCurrentScan(); bool IsCurrentScanAbortable() const; @@ -127,11 +127,11 @@ BOOL HasDiffs() const { return m_pCtxt != NULL; } const CDiffContext & GetDiffContext() const { return *m_pCtxt; } - const DIFFITEM & GetDiffByKey(POSITION key) const { return m_pCtxt->GetDiffAt(key); } - DIFFITEM & GetDiffRefByKey(POSITION key) { return m_pCtxt->GetDiffRefAt(key); } + const DIFFITEM & GetDiffByKey(UINT_PTR key) const { return m_pCtxt->GetDiffAt(key); } + DIFFITEM & GetDiffRefByKey(UINT_PTR key) { return m_pCtxt->GetDiffRefAt(key); } String GetLeftBasePath() const { return m_pCtxt->GetNormalizedLeft(); } String GetRightBasePath() const { return m_pCtxt->GetNormalizedRight(); } - void RemoveDiffByKey(POSITION key) { m_pCtxt->RemoveDiff(key); } + void RemoveDiffByKey(UINT_PTR key) { m_pCtxt->RemoveDiff(key); } void SetMarkedRescan() {m_bMarkedRescan = TRUE; } struct AllowUpwardDirectory { @@ -144,7 +144,7 @@ }; }; AllowUpwardDirectory::ReturnCode AllowUpwardDirectory(String &leftParent, String &rightParent); - void SetItemViewFlag(POSITION key, UINT flag, UINT mask); + void SetItemViewFlag(UINT_PTR key, UINT flag, UINT mask); void SetItemViewFlag(UINT flag, UINT mask); const CompareStats * GetCompareStats() const { return m_pCompareStats; }; bool IsArchiveFolders(); Modified: trunk/Src/DirScan.cpp =================================================================== --- trunk/Src/DirScan.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirScan.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -315,13 +315,13 @@ * @param parentdiffpos [in] Position of parent diff item * @return >= 0 number of diff items, -1 if compare was aborted */ -int DirScan_CompareItems(DiffFuncStruct *myStruct, POSITION parentdiffpos) +int DirScan_CompareItems(DiffFuncStruct *myStruct, UINT_PTR parentdiffpos) { CDiffContext *pCtxt = myStruct->context; int res = 0; if (!parentdiffpos) WaitForSingleObject(myStruct->hSemaphore, INFINITE); - POSITION pos = pCtxt->GetFirstChildDiffPosition(parentdiffpos); + UINT_PTR pos = pCtxt->GetFirstChildDiffPosition(parentdiffpos); while (pos) { if (pCtxt->ShouldAbort()) @@ -330,7 +330,7 @@ break; } WaitForSingleObject(myStruct->hSemaphore, INFINITE); - POSITION curpos = pos; + UINT_PTR curpos = pos; DIFFITEM &di = pCtxt->GetNextSiblingDiffRefPosition(pos); if (di.diffcode.isDirectory() && myStruct->bRecursive) { @@ -368,11 +368,11 @@ * @param parentdiffpos [in] Position of parent diff item * @return >= 0 number of diff items, -1 if compare was aborted */ -int DirScan_CompareRequestedItems(DiffFuncStruct *myStruct, POSITION parentdiffpos) +int DirScan_CompareRequestedItems(DiffFuncStruct *myStruct, UINT_PTR parentdiffpos) { CDiffContext *pCtxt = myStruct->context; int res = 0; - POSITION pos = pCtxt->GetFirstChildDiffPosition(parentdiffpos); + UINT_PTR pos = pCtxt->GetFirstChildDiffPosition(parentdiffpos); while (pos != NULL) { @@ -382,7 +382,7 @@ break; } - POSITION curpos = pos; + UINT_PTR curpos = pos; DIFFITEM &di = pCtxt->GetNextSiblingDiffRefPosition(pos); if (di.diffcode.isDirectory() && myStruct->bRecursive) { Modified: trunk/Src/DirScan.h =================================================================== --- trunk/Src/DirScan.h 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirScan.h 2008-12-01 17:04:25 UTC (rev 6136) @@ -20,8 +20,8 @@ bool bLeftUniq, const String &rightsubdir, bool bRightUniq, DiffFuncStruct *myStruct, bool casesensitive, int depth, DIFFITEM *parent, bool bUniques); -int DirScan_CompareItems(DiffFuncStruct *, POSITION parentdiffpos); -int DirScan_CompareRequestedItems(DiffFuncStruct *, POSITION parentdiffpos); +int DirScan_CompareItems(DiffFuncStruct *, UINT_PTR parentdiffpos); +int DirScan_CompareRequestedItems(DiffFuncStruct *, UINT_PTR parentdiffpos); void DirScan_InitializeDefaultCodepage(); Modified: trunk/Src/DirView.cpp =================================================================== --- trunk/Src/DirView.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirView.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -465,13 +465,13 @@ * @param [in,out] index Index of the item to be inserted. * @param [in,out] alldiffs Number of different items */ -void CDirView::RedisplayChildren(POSITION diffpos, int level, UINT &index, int &alldiffs) +void CDirView::RedisplayChildren(UINT_PTR diffpos, int level, UINT &index, int &alldiffs) { CDirDoc *pDoc = GetDocument(); const CDiffContext &ctxt = pDoc->GetDiffContext(); while (diffpos) { - POSITION curdiffpos = diffpos; + UINT_PTR curdiffpos = diffpos; const DIFFITEM &di = ctxt.GetNextSiblingDiffPosition(diffpos); if (!di.diffcode.isResultSame()) @@ -535,7 +535,7 @@ int alldiffs = 0; int level = 0; - POSITION diffpos = ctxt.GetFirstDiffPosition(); + UINT_PTR diffpos = ctxt.GetFirstDiffPosition(); RedisplayChildren(diffpos, 0, cnt, alldiffs); theApp.SetLastCompareResult(alldiffs); SortColumnsAppropriately(); @@ -1146,7 +1146,7 @@ CDirDoc *pDoc = GetDocument(); const CDiffContext &ctxt = pDoc->GetDiffContext(); - POSITION diffpos = ctxt.GetFirstChildDiffPosition(GetItemKey(sel)); + UINT_PTR diffpos = ctxt.GetFirstChildDiffPosition(GetItemKey(sel)); UINT indext = sel + 1; int alldiffs; RedisplayChildren(diffpos, dip.GetDepth() + 1, indext, alldiffs); @@ -1216,7 +1216,7 @@ * @param [in] pos1 First item position. * @param [in] pos2 Second item position. */ -void CDirView::OpenSpecialItems(POSITION pos1, POSITION pos2) +void CDirView::OpenSpecialItems(UINT_PTR pos1, UINT_PTR pos2) { if (!pos2) { @@ -1284,7 +1284,7 @@ * @param [in,out] isDir Is item folder? * return false if there was error or item was completely processed. */ -bool CDirView::OpenOneItem(POSITION pos1, DIFFITEM **di1, DIFFITEM **di2, +bool CDirView::OpenOneItem(UINT_PTR pos1, DIFFITEM **di1, DIFFITEM **di2, String &path1, String &path2, int & sel1, bool & isDir) { CDirDoc * pDoc = GetDocument(); @@ -1360,7 +1360,7 @@ * @param [in,out] isDir Is item folder? * return false if there was error or item was completely processed. */ -bool CDirView::OpenTwoItems(POSITION pos1, POSITION pos2, DIFFITEM **di1, DIFFITEM **di2, +bool CDirView::OpenTwoItems(UINT_PTR pos1, UINT_PTR pos2, DIFFITEM **di1, DIFFITEM **di2, String &path1, String &path2, int & sel1, int & sel2, bool & isDir) { CDirDoc * pDoc = GetDocument(); @@ -1417,7 +1417,7 @@ CDirDoc * pDoc = GetDocument(); // First, figure out what was selected (store into pos1 & pos2) - POSITION pos1 = NULL, pos2 = NULL; + UINT_PTR pos1 = NULL, pos2 = NULL; int sel1=-1, sel2=-1; if (!GetSelectedItems(&sel1, &sel2)) { @@ -1513,7 +1513,7 @@ CDirDoc * pDoc = GetDocument(); // First, figure out what was selected (store into pos1 & pos2) - POSITION pos1 = NULL, pos2 = NULL; + UINT_PTR pos1 = NULL, pos2 = NULL; int sel1=-1, sel2=-1; if (!GetSelectedItems(&sel1, &sel2)) { @@ -1806,7 +1806,7 @@ * @param [in] idx Item's index to list in UI. * @return Key for item in given index. */ -POSITION CDirView::GetItemKey(int idx) const +UINT_PTR CDirView::GetItemKey(int idx) const { return GetItemKeyFromData(m_pList->GetItemData(idx)); } @@ -1820,9 +1820,9 @@ * @param [in] dw Item's data. * @return Item's key. */ -POSITION CDirView::GetItemKeyFromData(DWORD_PTR dw) const +UINT_PTR CDirView::GetItemKeyFromData(UINT_PTR dw) const { - return (POSITION)dw; + return (UINT_PTR)dw; } /** @@ -1842,7 +1842,7 @@ */ DIFFITEM & CDirView::GetDiffItemRef(int sel) { - POSITION diffpos = GetItemKey(sel); + UINT_PTR diffpos = GetItemKey(sel); // If it is special item, return empty DIFFITEM if (diffpos == SPECIAL_ITEM_POS) @@ -1867,7 +1867,7 @@ * @brief Given key, get index of item which has it stored. * This function searches from list in UI. */ -int CDirView::GetItemIndex(POSITION key) +int CDirView::GetItemIndex(UINT_PTR key) { LVFINDINFO findInfo; @@ -2981,7 +2981,7 @@ for (int i = 0; i < selCount; i++) { // Don't select special items (SPECIAL_ITEM_POS) - POSITION diffpos = GetItemKey(i); + UINT_PTR diffpos = GetItemKey(i); if (diffpos != SPECIAL_ITEM_POS) m_pList->SetItemState(i, LVIS_SELECTED, LVIS_SELECTED); } @@ -3196,8 +3196,8 @@ m_pList->SetRedraw(FALSE); // Turn off updating (better performance) while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1) { - POSITION pos = GetItemKey(sel); - if (pos == (POSITION) SPECIAL_ITEM_POS) + UINT_PTR pos = GetItemKey(sel); + if (pos == (UINT_PTR) SPECIAL_ITEM_POS) continue; pDoc->SetItemViewFlag(pos, ViewCustomFlags::HIDDEN, ViewCustomFlags::VISIBILITY); const DIFFITEM &di = GetDiffItem(sel); @@ -3419,7 +3419,7 @@ // An item has focus CString sIdx, sCnt; // Don't show number to special items - POSITION pos = GetItemKey(focusItem); + UINT_PTR pos = GetItemKey(focusItem); if (pos != SPECIAL_ITEM_POS) { // If compare is non-recursive reduce special items count @@ -3482,7 +3482,7 @@ { CDirDoc *pDoc = GetDocument(); CDiffContext &ctxt = (CDiffContext &)pDoc->GetDiffContext(); - POSITION diffpos = ctxt.GetFirstDiffPosition(); + UINT_PTR diffpos = ctxt.GetFirstDiffPosition(); while (diffpos) { DIFFITEM &di = ctxt.GetNextDiffRefPosition(diffpos); @@ -3506,7 +3506,7 @@ { CDirDoc *pDoc = GetDocument(); CDiffContext &ctxt = (CDiffContext &)pDoc->GetDiffContext(); - POSITION diffpos = ctxt.GetFirstDiffPosition(); + UINT_PTR diffpos = ctxt.GetFirstDiffPosition(); while (diffpos) { DIFFITEM &di = ctxt.GetNextDiffRefPosition(diffpos); Modified: trunk/Src/DirView.h =================================================================== --- trunk/Src/DirView.h 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirView.h 2008-12-01 17:04:25 UTC (rev 6136) @@ -68,7 +68,7 @@ /** * @brief Position value for special items (..) in directory compare view. */ -const POSITION SPECIAL_ITEM_POS = (POSITION)-1L; +const UINT_PTR SPECIAL_ITEM_POS = (UINT_PTR)-1L; /** Default column width in directory compare */ const UINT DefColumnWidth = 150; @@ -105,11 +105,11 @@ void StartCompare(CompareStats *pCompareStats); void Redisplay(); - void RedisplayChildren(POSITION diffpos, int level, UINT &index, int &alldiffs); + void RedisplayChildren(UINT_PTR diffpos, int level, UINT &index, int &alldiffs); void UpdateResources(); void LoadColumnHeaderItems(); - POSITION GetItemKey(int idx) const; - int GetItemIndex(POSITION key); + UINT_PTR GetItemKey(int idx) const; + int GetItemIndex(UINT_PTR key); // for populating list void DeleteAllDisplayItems(); void SetColumnWidths(); @@ -198,7 +198,7 @@ private: void InitiateSort(); void NameColumn(int id, int subitem); - int AddNewItem(int i, POSITION diffpos, int iImage, int iIndent); + int AddNewItem(int i, UINT_PTR diffpos, int iImage, int iIndent); bool IsDefaultSortAscending(int col) const; int ColPhysToLog(int i) const { return m_invcolorder[i]; } int ColLogToPhys(int i) const { return m_colorder[i]; } /**< -1 if not displayed */ @@ -249,10 +249,10 @@ int AddSpecialItems(); void GetCurrentColRegKeys(CStringArray & colKeys); void WarnContentsChanged(const CString & failedPath); - void OpenSpecialItems(POSITION pos1, POSITION pos2); - bool OpenOneItem(POSITION pos1, DIFFITEM **di1, DIFFITEM **di2, + void OpenSpecialItems(UINT_PTR pos1, UINT_PTR pos2); + bool OpenOneItem(UINT_PTR pos1, DIFFITEM **di1, DIFFITEM **di2, String &path1, String &path2, int & sel1, bool & isDir); - bool OpenTwoItems(POSITION pos1, POSITION pos2, DIFFITEM **di1, DIFFITEM **di2, + bool OpenTwoItems(UINT_PTR pos1, UINT_PTR pos2, DIFFITEM **di1, DIFFITEM **di2, String &path1, String &path2, int & sel1, int & sel2, bool & isDir); bool CreateFoldersPair(DIFFITEM & di, bool side1); @@ -423,7 +423,7 @@ void DoUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI); void DoUpdateCtxtDirMoveLeftTo(CCmdUI* pCmdUI); void DoUpdateCtxtDirMoveRightTo(CCmdUI* pCmdUI); - POSITION GetItemKeyFromData(DWORD_PTR dw) const; + UINT_PTR GetItemKeyFromData(UINT_PTR dw) const; const DIFFITEM & GetDiffItem(int sel) const; DIFFITEM & GetDiffItemRef(int sel); int GetSingleSelectedItem() const; Modified: trunk/Src/DirViewColHandler.cpp =================================================================== --- trunk/Src/DirViewColHandler.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/DirViewColHandler.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -189,8 +189,8 @@ if (lParam2 == -1) return 1; - POSITION diffposl = pThis->pView->GetItemKeyFromData(lParam1); - POSITION diffposr = pThis->pView->GetItemKeyFromData(lParam2); + UINT_PTR diffposl = pThis->pView->GetItemKeyFromData(lParam1); + UINT_PTR diffposr = pThis->pView->GetItemKeyFromData(lParam2); const DIFFITEM &ldi = pThis->pCtxt->GetDiffAt(diffposl); const DIFFITEM &rdi = pThis->pCtxt->GetDiffAt(diffposr); // compare 'left' and 'right' parameters as appropriate @@ -200,7 +200,7 @@ } /// Add new item to list view -int CDirView::AddNewItem(int i, POSITION diffpos, int iImage, int iIndent) +int CDirView::AddNewItem(int i, UINT_PTR diffpos, int iImage, int iIndent) { LV_ITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE | LVIF_INDENT; @@ -248,7 +248,7 @@ { int nIdx = pParam->item.iItem; int i = ColPhysToLog(pParam->item.iSubItem); - POSITION key = GetItemKey(nIdx); + UINT_PTR key = GetItemKey(nIdx); if (key == SPECIAL_ITEM_POS) { if (IsColName(i)) Modified: trunk/Src/HexMergeDoc.cpp =================================================================== --- trunk/Src/HexMergeDoc.cpp 2008-11-28 22:43:22 UTC (rev 6135) +++ trunk/Src/HexMergeDoc.cpp 2008-12-01 17:04:25 UTC (rev 6136) @@ -167,7 +167,7 @@ const String &pathLeft = m_filePaths.GetLeft(); const String &pathRight = m_filePaths.GetRight(); CDiffContext &ctxt = const_cast<CDiffContext &>(pDirDoc->GetDiffContext()); - if (POSITION pos = pDirDoc->FindItemFromPaths(pathLeft.c_str(), pathRight.c_str())) + if (UINT_PTR pos = pDirDoc->FindItemFromPaths(pathLeft.c_str(), pathRight.c_str())) { DIFFITEM &di = pDirDoc->GetDiffRefByKey(pos); ::UpdateDiffItem(di, &ctxt); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2008-12-01 17:15:11
|
Revision: 6137 http://winmerge.svn.sourceforge.net/winmerge/?rev=6137&view=rev Author: kimmov Date: 2008-12-01 17:14:54 +0000 (Mon, 01 Dec 2008) Log Message: ----------- Make DiffItemList MFC free class. Modified Paths: -------------- trunk/Src/DiffItemList.cpp trunk/Src/Merge.vcproj Modified: trunk/Src/DiffItemList.cpp =================================================================== --- trunk/Src/DiffItemList.cpp 2008-12-01 17:04:25 UTC (rev 6136) +++ trunk/Src/DiffItemList.cpp 2008-12-01 17:14:54 UTC (rev 6137) @@ -6,15 +6,10 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "stdafx.h" +#include <windows.h> +#include <assert.h> #include "DiffItemList.h" -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#define new DEBUG_NEW -#endif - /** * @brief Constructor */ @@ -163,9 +158,9 @@ */ void DiffItemList::SetDiffStatusCode(UINT_PTR diffpos, UINT diffcode, UINT mask) { - ASSERT(diffpos); + assert(diffpos); DIFFITEM & di = GetDiffRefAt(diffpos); - ASSERT(! ((~mask) & diffcode) ); // make sure they only set flags in their mask + assert(! ((~mask) & diffcode) ); // make sure they only set flags in their mask di.diffcode.diffcode &= (~mask); // remove current data di.diffcode.diffcode |= diffcode; // add new data } @@ -175,7 +170,7 @@ */ void DiffItemList::SetDiffCounts(UINT_PTR diffpos, UINT diffs, UINT ignored) { - ASSERT(diffpos); + assert(diffpos); DIFFITEM & di = GetDiffRefAt(diffpos); di.nidiffs = ignored; // see StoreDiffResult() in DirScan.cpp di.nsdiffs = diffs; @@ -188,7 +183,7 @@ */ UINT DiffItemList::GetCustomFlags1(UINT_PTR diffpos) const { - ASSERT(diffpos); + assert(diffpos); const DIFFITEM & di = GetDiffAt(diffpos); return di.customFlags1; } @@ -200,7 +195,7 @@ */ void DiffItemList::SetCustomFlags1(UINT_PTR diffpos, UINT flag) { - ASSERT(diffpos); + assert(diffpos); DIFFITEM & di = GetDiffRefAt(diffpos); di.customFlags1 = flag; } Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2008-12-01 17:04:25 UTC (rev 6136) +++ trunk/Src/Merge.vcproj 2008-12-01 17:14:54 UTC (rev 6137) @@ -1274,6 +1274,7 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2008-12-01 17:24:04
|
Revision: 6138 http://winmerge.svn.sourceforge.net/winmerge/?rev=6138&view=rev Author: kimmov Date: 2008-12-01 17:24:02 +0000 (Mon, 01 Dec 2008) Log Message: ----------- Remove useless and pointless conversion method. Just simply cast without any additional hazzle. Modified Paths: -------------- trunk/Src/DirView.cpp trunk/Src/DirView.h trunk/Src/DirViewColHandler.cpp Modified: trunk/Src/DirView.cpp =================================================================== --- trunk/Src/DirView.cpp 2008-12-01 17:14:54 UTC (rev 6137) +++ trunk/Src/DirView.cpp 2008-12-01 17:24:02 UTC (rev 6138) @@ -1808,24 +1808,13 @@ */ UINT_PTR CDirView::GetItemKey(int idx) const { - return GetItemKeyFromData(m_pList->GetItemData(idx)); + return (UINT_PTR) m_pList->GetItemData(idx); } // SetItemKey & GetItemKey encapsulate how the display list items // are mapped to DiffItems, which in turn are DiffContext keys to the actual DIFFITEM data /** - * @brief Convert item's data to item's key. - * Use this function to get item's key when item's data is known. - * @param [in] dw Item's data. - * @return Item's key. - */ -UINT_PTR CDirView::GetItemKeyFromData(UINT_PTR dw) const -{ - return (UINT_PTR)dw; -} - -/** * @brief Get DIFFITEM data for item. * This function returns DIFFITEM data for item in given index in GUI. * @param [in] sel Item's index in folder compare GUI list. Modified: trunk/Src/DirView.h =================================================================== --- trunk/Src/DirView.h 2008-12-01 17:14:54 UTC (rev 6137) +++ trunk/Src/DirView.h 2008-12-01 17:24:02 UTC (rev 6138) @@ -423,7 +423,6 @@ void DoUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI); void DoUpdateCtxtDirMoveLeftTo(CCmdUI* pCmdUI); void DoUpdateCtxtDirMoveRightTo(CCmdUI* pCmdUI); - UINT_PTR GetItemKeyFromData(UINT_PTR dw) const; const DIFFITEM & GetDiffItem(int sel) const; DIFFITEM & GetDiffItemRef(int sel); int GetSingleSelectedItem() const; Modified: trunk/Src/DirViewColHandler.cpp =================================================================== --- trunk/Src/DirViewColHandler.cpp 2008-12-01 17:14:54 UTC (rev 6137) +++ trunk/Src/DirViewColHandler.cpp 2008-12-01 17:24:02 UTC (rev 6138) @@ -189,8 +189,8 @@ if (lParam2 == -1) return 1; - UINT_PTR diffposl = pThis->pView->GetItemKeyFromData(lParam1); - UINT_PTR diffposr = pThis->pView->GetItemKeyFromData(lParam2); + UINT_PTR diffposl = (UINT_PTR)lParam1; + UINT_PTR diffposr = (UINT_PTR)lParam2; const DIFFITEM &ldi = pThis->pCtxt->GetDiffAt(diffposl); const DIFFITEM &rdi = pThis->pCtxt->GetDiffAt(diffposr); // compare 'left' and 'right' parameters as appropriate This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jt...@us...> - 2008-12-14 18:25:14
|
Revision: 6166 http://winmerge.svn.sourceforge.net/winmerge/?rev=6166&view=rev Author: jtuc Date: 2008-12-14 18:25:09 +0000 (Sun, 14 Dec 2008) Log Message: ----------- Patch #2036603 - Adapt to heksedit changes Modified Paths: -------------- trunk/Src/HexMergeDoc.cpp trunk/Src/HexMergeDoc.h trunk/Src/HexMergeView.cpp trunk/Src/HexMergeView.h Modified: trunk/Src/HexMergeDoc.cpp =================================================================== --- trunk/Src/HexMergeDoc.cpp 2008-12-14 18:16:24 UTC (rev 6165) +++ trunk/Src/HexMergeDoc.cpp 2008-12-14 18:25:09 UTC (rev 6166) @@ -129,6 +129,9 @@ ON_COMMAND(ID_R2L, OnR2l) ON_COMMAND(ID_ALL_LEFT, OnAllLeft) ON_COMMAND(ID_ALL_RIGHT, OnAllRight) + ON_COMMAND(ID_VIEW_ZOOMIN, OnViewZoomIn) + ON_COMMAND(ID_VIEW_ZOOMOUT, OnViewZoomOut) + ON_COMMAND(ID_VIEW_ZOOMNORMAL, OnViewZoomNormal) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -634,3 +637,30 @@ { CopyAll(m_pView[MERGE_VIEW_RIGHT], m_pView[MERGE_VIEW_LEFT]); } + +/** + * @brief Called when user selects View/Zoom In from menu. + */ +void CHexMergeDoc::OnViewZoomIn() +{ + m_pView[MERGE_VIEW_LEFT]->ZoomText(1); + m_pView[MERGE_VIEW_RIGHT]->ZoomText(1); +} + +/** + * @brief Called when user selects View/Zoom Out from menu. + */ +void CHexMergeDoc::OnViewZoomOut() +{ + m_pView[MERGE_VIEW_LEFT]->ZoomText(-1); + m_pView[MERGE_VIEW_RIGHT]->ZoomText(-1); +} + +/** + * @brief Called when user selects View/Zoom Normal from menu. + */ +void CHexMergeDoc::OnViewZoomNormal() +{ + m_pView[MERGE_VIEW_LEFT]->ZoomText(0); + m_pView[MERGE_VIEW_RIGHT]->ZoomText(0); +} Modified: trunk/Src/HexMergeDoc.h =================================================================== --- trunk/Src/HexMergeDoc.h 2008-12-14 18:16:24 UTC (rev 6165) +++ trunk/Src/HexMergeDoc.h 2008-12-14 18:25:09 UTC (rev 6166) @@ -99,6 +99,9 @@ afx_msg void OnR2l(); afx_msg void OnAllRight(); afx_msg void OnAllLeft(); + afx_msg void OnViewZoomIn(); + afx_msg void OnViewZoomOut(); + afx_msg void OnViewZoomNormal(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Modified: trunk/Src/HexMergeView.cpp =================================================================== --- trunk/Src/HexMergeView.cpp 2008-12-14 18:16:24 UTC (rev 6165) +++ trunk/Src/HexMergeView.cpp 2008-12-14 18:25:09 UTC (rev 6166) @@ -34,6 +34,7 @@ #include "HexMergeView.h" #include "OptionsDef.h" #include "Environment.h" +#include "../externals/heksedit/version.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -42,13 +43,6 @@ #endif /** - * @brief Macros to help build version dependent window class names - */ -#define SHARPEN_A(X) #X -#define SHARPEN_W(X) L#X -#define SHARPEN(T,X) SHARPEN_##T(X) - -/** * @brief Turn bool api result into success/error code */ static HRESULT NTAPI SE(BOOL f) @@ -92,6 +86,7 @@ ON_COMMAND(ID_EDIT_COPY, OnEditCopy) ON_COMMAND(ID_EDIT_PASTE, OnEditPaste) ON_COMMAND(ID_EDIT_CLEAR, OnEditClear) + ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll) ON_COMMAND(ID_FIRSTDIFF, OnFirstdiff) ON_COMMAND(ID_LASTDIFF, OnLastdiff) ON_COMMAND(ID_NEXTDIFF, OnNextdiff) @@ -127,26 +122,14 @@ */ BOOL CHexMergeView::PreCreateWindow(CREATESTRUCT& cs) { - static const TCHAR szFileName[] = _T("heksedit.dll"); -#ifdef _UNICODE - static const TCHAR szClassName[] = L"hekseditW_" - SHARPEN(W,FRHED_MAJOR_VERSION) L"." - SHARPEN(W,FRHED_MINOR_VERSION) L"." - SHARPEN(W,FRHED_SUB_RELEASE_NO) L"." - SHARPEN(W,FRHED_BUILD_NO); -#else - static const TCHAR szClassName[] = "hekseditA_" - SHARPEN(A,FRHED_MAJOR_VERSION) "." - SHARPEN(A,FRHED_MINOR_VERSION) "." - SHARPEN(A,FRHED_SUB_RELEASE_NO) "." - SHARPEN(A,FRHED_BUILD_NO); -#endif - if ((cs.hInstance = ::GetModuleHandle(szFileName)) == 0 && - (cs.hInstance = ::LoadLibrary(szFileName)) == 0) + static const TCHAR pe[] = PE_HEKSEDIT; + static const TCHAR wc[] = WC_HEKSEDIT; + if ((cs.hInstance = ::GetModuleHandle(pe)) == 0 && + (cs.hInstance = ::LoadLibrary(pe)) == 0) { return FALSE; } - cs.lpszClass = szClassName; + cs.lpszClass = wc; cs.style |= WS_HSCROLL | WS_VSCROLL; return TRUE; } @@ -468,6 +451,14 @@ } /** + * @brief Select entire content + */ +void CHexMergeView::OnEditSelectAll() +{ + m_pif->CMD_select_all(); +} + +/** * @brief Clear selected content */ void CHexMergeView::OnEditClear() @@ -525,3 +516,8 @@ { m_pif->select_prev_diff(FALSE); } + +void CHexMergeView::ZoomText(int amount) +{ + m_pif->CMD_zoom(amount); +} Modified: trunk/Src/HexMergeView.h =================================================================== --- trunk/Src/HexMergeView.h 2008-12-14 18:16:24 UTC (rev 6165) +++ trunk/Src/HexMergeView.h 2008-12-14 18:25:09 UTC (rev 6166) @@ -57,6 +57,7 @@ void ResizeWindow(); void RepaintRange(int, int); BOOL IsFileChangedOnDisk(LPCTSTR); + void ZoomText(int amount); // Overrides protected: virtual void OnDraw(CDC*); @@ -86,6 +87,7 @@ afx_msg void OnEditCopy(); afx_msg void OnEditPaste(); afx_msg void OnEditClear(); + afx_msg void OnEditSelectAll(); afx_msg void OnFirstdiff(); afx_msg void OnLastdiff(); afx_msg void OnNextdiff(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-02 11:55:48
|
Revision: 6272 http://winmerge.svn.sourceforge.net/winmerge/?rev=6272&view=rev Author: kimmov Date: 2009-01-02 11:54:07 +0000 (Fri, 02 Jan 2009) Log Message: ----------- Fix some doxygen warnings from doxygen comments. Modified Paths: -------------- trunk/Src/DiffThread.cpp trunk/Src/DiffWrapper.cpp trunk/Src/DirScan.cpp trunk/Src/DirViewColItems.cpp trunk/Src/FileOrFolderSelect.cpp trunk/Src/OptionsInit.cpp trunk/Src/editlib/ccrystaltextview.cpp trunk/Src/stringdiffs.cpp Modified: trunk/Src/DiffThread.cpp =================================================================== --- trunk/Src/DiffThread.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/DiffThread.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -200,7 +200,7 @@ * * This thread is responsible for finding and collecting all items to compare * to the item list. - * @param [in] lParam Pointer to parameter structure. + * @param [in] lpParam Pointer to parameter structure. * @return Thread's return value. */ UINT DiffThreadCollect(LPVOID lpParam) @@ -250,7 +250,7 @@ * * Compares items in item list. After compare is ready * sends message to UI so UI can update itself. - * @param [in] lParam Pointer to parameter structure. + * @param [in] lpParam Pointer to parameter structure. * @return Thread's return value. */ UINT DiffThreadCompare(LPVOID lpParam) Modified: trunk/Src/DiffWrapper.cpp =================================================================== --- trunk/Src/DiffWrapper.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/DiffWrapper.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -322,13 +322,13 @@ /** @brief Performs post-filtering, by setting comment blocks to trivial - @param[in] StartPos - First line number to read - @param[in] EndPos - The line number PASS the last line number to read - @param[in] QtyLinesInBlock - Number of lines in diff block. Not needed in backward direction. - @param[in] Direction - This should be 1 or -1, to indicate which direction to read (backward or forward) - @param[in/out] Op - This variable is set to trivial if block should be ignored. - @param[in] FileNo - Should be 0 or 1, to indicate left or right file. - @param[in] filtercommentsset - Comment marker set used to indicate comment blocks. + @param [in] StartPos - First line number to read + @param [in] EndPos - The line number PASS the last line number to read + @param [in] QtyLinesInBlock - Number of lines in diff block. Not needed in backward direction. + @param [in] Direction - This should be 1 or -1, to indicate which direction to read (backward or forward) + @param [in,out] Op - This variable is set to trivial if block should be ignored. + @param [in] FileNo - Should be 0 or 1, to indicate left or right file. + @param [in] filtercommentsset - Comment marker set used to indicate comment blocks. @return Always returns true in reverse direction. In forward direction, returns false if none trivial data is found within QtyLinesInBlock */ @@ -454,10 +454,10 @@ /** @brief Performs post-filtering on single line comments, by setting comment blocks to trivial -@param[in] LineStr - Line of string to check that must be NULL terminated. -@param[in/out] Op - This variable is set to trivial if block should be ignored. -@param[in] filtercommentsset - Comment marker set used to indicate comment blocks. -@param[in] PartOfMultiLineCheck- Set to true, if this block is a multiple line block +@param [in] LineStr - Line of string to check that must be NULL terminated. +@param [in,out] Op - This variable is set to trivial if block should be ignored. +@param [in] filtercommentsset - Comment marker set used to indicate comment blocks. +@param [in] PartOfMultiLineCheck- Set to true, if this block is a multiple line block */ static void PostFilterSingleLine(const char* LineStr, int &Op, const FilterCommentsSet& filtercommentsset, bool PartOfMultiLineCheck) @@ -493,13 +493,13 @@ /** @brief The main entry for post filtering. Performs post-filtering, by setting comment blocks to trivial -@param[in] LineNumberLeft - First line number to read from left file -@param[in] QtyLinesLeft - Number of lines in the block for left file -@param[in] LineNumberRight - First line number to read from right file -@param[in] QtyLinesRight - Number of lines in the block for right file -@param[in/out] Op - This variable is set to trivial if block should be ignored. -@param[in] filtercommentsset - Comment marker set used to indicate comment blocks. -@param[in] FileNameExt - The file name extension. Needs to be lower case string ("cpp", "java", "c") +@param [in] LineNumberLeft - First line number to read from left file +@param [in] QtyLinesLeft - Number of lines in the block for left file +@param [in] LineNumberRight - First line number to read from right file +@param [in] QtyLinesRight - Number of lines in the block for right file +@param [in,out] Op - This variable is set to trivial if block should be ignored. +@param [in] filtercommentsset - Comment marker set used to indicate comment blocks. +@param [in] FileNameExt - The file name extension. Needs to be lower case string ("cpp", "java", "c") */ static void PostFilter(int LineNumberLeft, int QtyLinesLeft, int LineNumberRight, int QtyLinesRight, int &Op, const FilterCommentsManager &filtercommentsmanager, Modified: trunk/Src/DirScan.cpp =================================================================== --- trunk/Src/DirScan.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/DirScan.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -310,8 +310,7 @@ /** * @brief Compare DiffItems in list and add results to compare context. * - * @param list [in] List of items to compare - * @param pCtxt [in,out] Compare context: contains list where results are added. + * @param myStruct [in] A structure containing compare-related data. * @param parentdiffpos [in] Position of parent diff item * @return >= 0 number of diff items, -1 if compare was aborted */ @@ -364,7 +363,7 @@ /** * @brief Compare DiffItems in context marked for rescan. * - * @param pCtxt [in,out] Compare context: contains list of items. + * @param myStruct [in,out] A structure containing compare-related data. * @param parentdiffpos [in] Position of parent diff item * @return >= 0 number of diff items, -1 if compare was aborted */ Modified: trunk/Src/DirViewColItems.cpp =================================================================== --- trunk/Src/DirViewColItems.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/DirViewColItems.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -663,7 +663,6 @@ /** * @brief Compare compare results. - * @param [in] pCtxt Pointer to compare context. * @param [in] p Pointer to DIFFITEM having first result to compare. * @param [in] q Pointer to DIFFITEM having second result to compare. * @return Compare result. @@ -677,7 +676,6 @@ /** * @brief Compare file times. - * @param [in] pCtxt Pointer to compare context. * @param [in] p First time to compare. * @param [in] q Second time to compare. * @return Compare result. @@ -691,7 +689,6 @@ /** * @brief Compare file sizes. - * @param [in] pCtxt Pointer to compare context. * @param [in] p First size to compare. * @param [in] q Second size to compare. * @return Compare result. @@ -705,7 +702,6 @@ /** * @brief Compare difference counts. - * @param [in] pCtxt Pointer to compare context. * @param [in] p First count to compare. * @param [in] q Second count to compare. * @return Compare result. @@ -756,7 +752,6 @@ /** * @brief Compare binary statuses. * This function returns a comparison of binary results. - * @param [in] pCtxt Pointer to compare context. * @param [in] p Pointer to DIFFITEM having first status to compare. * @param [in] q Pointer to DIFFITEM having second status to compare. * @return Compare result: @@ -783,7 +778,6 @@ /** * @brief Compare file flags. - * @param [in] pCtxt Pointer to compare context. * @param [in] p Pointer to first flag structure to compare. * @param [in] q Pointer to second flag structure to compare. * @return Compare result. @@ -797,7 +791,6 @@ /** * @brief Compare file encodings. - * @param [in] pCtxt Pointer to compare context. * @param [in] p Pointer to first structure to compare. * @param [in] q Pointer to second structure to compare. * @return Compare result. Modified: trunk/Src/FileOrFolderSelect.cpp =================================================================== --- trunk/Src/FileOrFolderSelect.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/FileOrFolderSelect.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -60,7 +60,7 @@ * CMainFrame is used which can cause modality problems. * @param [out] path Selected path is returned in this string * @param [in] initialPath Initial path (and file) shown when dialog is opened - * @param [in] title Title for path selection dialog + * @param [in] titleid Resource string ID for dialog title. * @param [in] filterid 0 or STRING ID for filter string * - 0 means "All files (*.*)". Note the string formatting! * @param [in] is_open Selects Open/Save -dialog (mode). @@ -140,7 +140,7 @@ * @brief Helper function for selecting directory * @param [out] path Selected path is returned in this string * @param [in] root_path Initial path shown when dialog is opened - * @param [in] title Title for path selection dialog + * @param [in] titleid Resource string ID for dialog title. * @param [in] hwndOwner Handle to owner window or NULL * @return TRUE if valid folder selected (not cancelled) */ Modified: trunk/Src/OptionsInit.cpp =================================================================== --- trunk/Src/OptionsInit.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/OptionsInit.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -255,7 +255,7 @@ /** * @brief Open HKLM registry key. * @param [out] key Pointer to open HKLM key. - * @param [in] relative registry path to open. + * @param [in] relpath Relative registry path (to WinMerge reg path) to open, or NULL. * @return true if opening succeeded. */ static bool OpenHKLM(HKEY *key, LPCTSTR relpath) @@ -276,7 +276,7 @@ * @brief Open HKCU registry key. * Opens the HKCU key for WinMerge. If the key does not exist, creates one. * @param [out] key Pointer to open HKCU key. - * @param [in] relative registry path to open. + * @param [in] relpath Relative registry path (to WinMerge reg path) to open, or NULL. * @return true if opening succeeded. */ static bool OpenHKCU(HKEY *key, LPCTSTR relpath) Modified: trunk/Src/editlib/ccrystaltextview.cpp =================================================================== --- trunk/Src/editlib/ccrystaltextview.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/editlib/ccrystaltextview.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -1616,7 +1616,7 @@ * @brief Escape special characters * @param [in] strText The text to escape * @param [in, out] bLastCharSpace Whether last char processed was white space - * @param [in, out] nNonBreakChars The number of non-break characters in the text + * @param [in, out] nNonbreakChars The number of non-break characters in the text * @param [in] nScreenChars The maximum number of characters to display per line * @return The escaped text */ Modified: trunk/Src/stringdiffs.cpp =================================================================== --- trunk/Src/stringdiffs.cpp 2009-01-02 08:18:11 UTC (rev 6271) +++ trunk/Src/stringdiffs.cpp 2009-01-02 11:54:07 UTC (rev 6272) @@ -63,8 +63,8 @@ } /** - * @bried Destructor. - * The desctuctor frees all diffs added to the vectors. + * @brief Destructor. + * The destructor frees all diffs added to the vectors. */ stringdiffs::~stringdiffs() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-14 18:42:26
|
Revision: 6325 http://winmerge.svn.sourceforge.net/winmerge/?rev=6325&view=rev Author: kimmov Date: 2009-01-14 18:42:16 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Add tree-view option to config log. Modified Paths: -------------- trunk/Src/ConfigLog.cpp trunk/Src/ConfigLog.h trunk/Src/MainFrm.cpp Modified: trunk/Src/ConfigLog.cpp =================================================================== --- trunk/Src/ConfigLog.cpp 2009-01-14 09:44:26 UTC (rev 6324) +++ trunk/Src/ConfigLog.cpp 2009-01-14 18:42:16 UTC (rev 6325) @@ -482,13 +482,14 @@ WriteItemYesNo(2, _T("Automatic scroll to 1st difference"), &m_miscSettings.bScrollToFirst); WriteItemYesNo(2, _T("Backup original file"), &m_miscSettings.bBackup); - FileWriteString(_T("\n Show:\n")); + FileWriteString(_T("\n Folder compare:\n")); WriteItemYesNo(2, _T("Identical files"), &m_viewSettings.bShowIdent); WriteItemYesNo(2, _T("Different files"), &m_viewSettings.bShowDiff); WriteItemYesNo(2, _T("Left Unique files"), &m_viewSettings.bShowUniqueLeft); WriteItemYesNo(2, _T("Right Unique files"), &m_viewSettings.bShowUniqueRight); WriteItemYesNo(2, _T("Binary files"), &m_viewSettings.bShowBinaries); WriteItemYesNo(2, _T("Skipped files"), &m_viewSettings.bShowSkipped); + WriteItemYesNo(2, _T("Tree-mode enabled"), &m_viewSettings.bTreeView); FileWriteString(_T("\n Editor settings:\n")); WriteItemYesNo(2, _T("View Whitespace"), &m_miscSettings.bViewWhitespace); Modified: trunk/Src/ConfigLog.h =================================================================== --- trunk/Src/ConfigLog.h 2009-01-14 09:44:26 UTC (rev 6324) +++ trunk/Src/ConfigLog.h 2009-01-14 18:42:16 UTC (rev 6325) @@ -47,6 +47,7 @@ bool bShowUniqueRight; bool bShowBinaries; bool bShowSkipped; + bool bTreeView; }; /** Modified: trunk/Src/MainFrm.cpp =================================================================== --- trunk/Src/MainFrm.cpp 2009-01-14 09:44:26 UTC (rev 6324) +++ trunk/Src/MainFrm.cpp 2009-01-14 18:42:16 UTC (rev 6325) @@ -2412,6 +2412,7 @@ LoadConfigBoolSetting(&configLog.m_viewSettings.bShowUniqueRight, options, OPT_SHOW_UNIQUE_RIGHT, cfgdir); LoadConfigBoolSetting(&configLog.m_viewSettings.bShowBinaries, options, OPT_SHOW_BINARIES, cfgdir); LoadConfigBoolSetting(&configLog.m_viewSettings.bShowSkipped, options, OPT_SHOW_SKIPPED, cfgdir); + LoadConfigBoolSetting(&configLog.m_viewSettings.bTreeView, options, OPT_TREE_MODE, cfgdir); LoadConfigBoolSetting(&configLog.m_miscSettings.bAutomaticRescan, options, OPT_AUTOMATIC_RESCAN, cfgdir); LoadConfigBoolSetting(&configLog.m_miscSettings.bAllowMixedEol, options, OPT_ALLOW_MIXED_EOL, cfgdir); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-22 21:15:45
|
Revision: 6362 http://winmerge.svn.sourceforge.net/winmerge/?rev=6362&view=rev Author: kimmov Date: 2009-01-22 21:15:43 +0000 (Thu, 22 Jan 2009) Log Message: ----------- Remove MFC dependency from FileVersion(.cpp). Modified Paths: -------------- trunk/Src/FileVersion.cpp trunk/Src/Merge.vcproj Modified: trunk/Src/FileVersion.cpp =================================================================== --- trunk/Src/FileVersion.cpp 2009-01-22 19:24:13 UTC (rev 6361) +++ trunk/Src/FileVersion.cpp 2009-01-22 21:15:43 UTC (rev 6362) @@ -6,7 +6,9 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "stdafx.h" +#include <windows.h> +#include <tchar.h> +#include "coretypes.h" #include "UnicodeString.h" #include "FileVersion.h" Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-01-22 19:24:13 UTC (rev 6361) +++ trunk/Src/Merge.vcproj 2009-01-22 21:15:43 UTC (rev 6362) @@ -2498,7 +2498,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -2507,6 +2510,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2516,6 +2522,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2524,7 +2533,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-22 22:18:00
|
Revision: 6366 http://winmerge.svn.sourceforge.net/winmerge/?rev=6366&view=rev Author: kimmov Date: 2009-01-22 22:10:53 +0000 (Thu, 22 Jan 2009) Log Message: ----------- Remove MFC dependency from FilterList class. Modified Paths: -------------- trunk/Src/FilterList.cpp trunk/Src/Merge.vcproj Modified: trunk/Src/FilterList.cpp =================================================================== --- trunk/Src/FilterList.cpp 2009-01-22 21:59:11 UTC (rev 6365) +++ trunk/Src/FilterList.cpp 2009-01-22 22:10:53 UTC (rev 6366) @@ -6,8 +6,9 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "stdafx.h" +#include <windows.h> #include <vector> +#include <crtdbg.h> #include "FilterList.h" #include "pcre.h" #include "unicoder.h" Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-01-22 21:59:11 UTC (rev 6365) +++ trunk/Src/Merge.vcproj 2009-01-22 22:10:53 UTC (rev 6366) @@ -2584,7 +2584,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -2593,6 +2596,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2602,6 +2608,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -2610,7 +2619,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-23 22:37:46
|
Revision: 6372 http://winmerge.svn.sourceforge.net/winmerge/?rev=6372&view=rev Author: kimmov Date: 2009-01-23 21:58:24 +0000 (Fri, 23 Jan 2009) Log Message: ----------- Use std::map instead of CArray in DiffMap. Modified Paths: -------------- trunk/Src/DiffList.h trunk/Src/MergeDocDiffSync.cpp Modified: trunk/Src/DiffList.h =================================================================== --- trunk/Src/DiffList.h 2009-01-23 21:24:21 UTC (rev 6371) +++ trunk/Src/DiffList.h 2009-01-23 21:58:24 UTC (rev 6372) @@ -25,6 +25,7 @@ #ifndef _DIFFLIST_H_ #define _DIFFLIST_H_ +#include <map> #include <vector> /** @@ -60,31 +61,30 @@ * * Map lines from file1 to file2 */ -struct DiffMap : public CArray<int, int> +class DiffMap { - enum { BAD_MAP_ENTRY = -999999999, GHOST_MAP_ENTRY = 888888888 }; +public: + enum + { + BAD_MAP_ENTRY = -999999999, + GHOST_MAP_ENTRY = 888888888 + }; + std::map<int, int> m_map; + // boilerplate ctr, copy ctr DiffMap() { } - DiffMap(const DiffMap & src) { *this = src; } - // Simple copy assignment - DiffMap & operator=(const DiffMap & src) - { - this->SetSize(src.GetSize()); - for (int i=0; i<this->GetSize(); ++i) - this->SetAt(i, src.GetAt(i)); - return *this; - } + DiffMap(const DiffMap & src) { m_map = src.m_map; } + /** * @brief Put DiffMap into known. starting, unfilled state */ void InitDiffMap(int nlines) { - SetSize(nlines); - for (int i=0; i<nlines; ++i) + for (int i = 0; i < nlines; ++i) { // sentry value so we can check later that we set them all - SetAt(i, BAD_MAP_ENTRY); + m_map[i] = BAD_MAP_ENTRY; } } }; Modified: trunk/Src/MergeDocDiffSync.cpp =================================================================== --- trunk/Src/MergeDocDiffSync.cpp 2009-01-23 21:24:21 UTC (rev 6371) +++ trunk/Src/MergeDocDiffSync.cpp 2009-01-23 21:58:24 UTC (rev 6372) @@ -52,10 +52,11 @@ #ifdef _DEBUG int i; - for (i = 0; i < diffmap.GetSize(); i++) + for (i = 0; i < diffmap.m_map.size(); i++) { TCHAR buf[256]; - wsprintf(buf, _T("begin0=%d begin1=%d diffmap[%d]=%d\n"), diffrange.begin0, diffrange.begin1, i, diffmap[i]); + wsprintf(buf, _T("begin0=%d begin1=%d diffmap[%d]=%d\n"), + diffrange.begin0, diffrange.begin1, i, diffmap.m_map[i]); OutputDebugString(buf); } #endif @@ -65,11 +66,14 @@ int line0, line1, lineend0; for (line0 = 0, line1 = 0; line0 < nlines0;) { - if (diffmap[line0] == DiffMap::GHOST_MAP_ENTRY || diffmap[line0] == DiffMap::BAD_MAP_ENTRY) + const int map_line0 = diffmap.m_map[line0]; + if (map_line0 == DiffMap::GHOST_MAP_ENTRY || + map_line0 == DiffMap::BAD_MAP_ENTRY) { for (lineend0 = line0; lineend0 < nlines0; lineend0++) { - if (diffmap[lineend0] != DiffMap::GHOST_MAP_ENTRY && diffmap[lineend0] != DiffMap::BAD_MAP_ENTRY) + if (map_line0 != DiffMap::GHOST_MAP_ENTRY && + map_line0 != DiffMap::BAD_MAP_ENTRY) break; } dr.begin0 = diffrange.begin0 + line0; @@ -83,32 +87,32 @@ } else { - if (diffmap[line0] > line1) + if (map_line0 > line1) { dr.begin0 = diffrange.begin0 + line0; dr.begin1 = diffrange.begin1 + line1; dr.end0 = dr.begin0 - 1; - dr.end1 = diffrange.begin1 + diffmap[line0] - 1; + dr.end1 = diffrange.begin1 + map_line0 - 1; dr.blank0 = dr.blank1 = -1; dr.op = OP_DIFF; newDiffList.AddDiff(dr); - line1 = diffmap[line0]; + line1 = map_line0; } for (lineend0 = line0 + 1; lineend0 < nlines0; lineend0++) { - if (diffmap[lineend0] != diffmap[lineend0 - 1] + 1) + if (map_line0 != diffmap.m_map[lineend0 - 1] + 1) break; } dr.begin0 = diffrange.begin0 + line0; dr.begin1 = diffrange.begin1 + line1; dr.end0 = diffrange.begin0 + lineend0 - 1; - dr.end1 = diffrange.begin1 + diffmap[lineend0 - 1]; + dr.end1 = diffrange.begin1 + diffmap.m_map[lineend0 - 1]; dr.blank0 = dr.blank1 = -1; dr.op = diffrange.op == OP_TRIVIAL ? OP_TRIVIAL : OP_DIFF; newDiffList.AddDiff(dr); line0 = lineend0; - line1 = diffmap[lineend0 - 1] + 1; + line1 = diffmap.m_map[lineend0 - 1] + 1; } } if (line1 <= hi1) @@ -136,7 +140,8 @@ #ifdef _DEBUG TCHAR buf[256]; DIFFRANGE di = *newDiffList.DiffRangeAt(nDiff); - wsprintf(buf, _T("%d: begin0=%d end0=%d begin1=%d end1=%d\n"), nDiff, di.begin0, di.end0, di.begin1, di.end1); + wsprintf(buf, _T("%d: begin0=%d end0=%d begin1=%d end1=%d\n"), nDiff, + di.begin0, di.end0, di.begin1, di.end1); OutputDebugString(buf); #endif m_diffList.AddDiff(*newDiffList.DiffRangeAt(nDiff)); @@ -208,7 +213,7 @@ // shortcut special case if (lines0 == 1 && lines1 == 1) { - diffMap[lo0] = hi1; + diffMap.m_map[lo0] = hi1; return; } @@ -236,9 +241,9 @@ for (int w=0; w<lines0; ++w) { if (w < lines1) - diffMap.SetAt(w, w+tlo); + diffMap.m_map[w] = w + tlo; else - diffMap.SetAt(w, DiffMap::GHOST_MAP_ENTRY); + diffMap.m_map[w] = DiffMap::GHOST_MAP_ENTRY; } return; } @@ -269,9 +274,9 @@ // so cost is always nonnegative ASSERT(ibest >= 0); - ASSERT(diffMap[ibest] == DiffMap::BAD_MAP_ENTRY); + ASSERT(diffMap.m_map[ibest] == DiffMap::BAD_MAP_ENTRY); - diffMap[ibest] = itarget; + diffMap.m_map[ibest] = itarget; // Half of the remaining problem is below our match if (lo0 < ibest) @@ -283,9 +288,9 @@ else { // No target space for the ones below our match - for (int x=lo0; x<ibest; ++x) + for (int x = lo0; x < ibest; ++x) { - diffMap[x] = DiffMap::GHOST_MAP_ENTRY; + diffMap.m_map[x] = DiffMap::GHOST_MAP_ENTRY; } } } @@ -295,16 +300,16 @@ { if (itarget < hi1) { - AdjustDiffBlock(diffMap, diffrange, ibest+1, hi0, itarget+1, hi1); + AdjustDiffBlock(diffMap, diffrange, ibest + 1, hi0, + itarget + 1, hi1); } else { // No target space for the ones above our match - for (int x=ibest+1; x<=hi0; ++x) + for (int x = ibest + 1; x <= hi0; ++x) { - diffMap[x] = DiffMap::GHOST_MAP_ENTRY; + diffMap.m_map[x] = DiffMap::GHOST_MAP_ENTRY; } } } - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-24 00:54:58
|
Revision: 6373 http://winmerge.svn.sourceforge.net/winmerge/?rev=6373&view=rev Author: kimmov Date: 2009-01-24 00:54:46 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Use std::vector in DiffMap. Modified Paths: -------------- trunk/Src/DiffList.h trunk/Src/MergeDocDiffSync.cpp Modified: trunk/Src/DiffList.h =================================================================== --- trunk/Src/DiffList.h 2009-01-23 21:58:24 UTC (rev 6372) +++ trunk/Src/DiffList.h 2009-01-24 00:54:46 UTC (rev 6373) @@ -70,7 +70,7 @@ GHOST_MAP_ENTRY = 888888888 }; - std::map<int, int> m_map; + std::vector<int> m_map; // boilerplate ctr, copy ctr DiffMap() { } @@ -81,10 +81,14 @@ */ void InitDiffMap(int nlines) { - for (int i = 0; i < nlines; ++i) + m_map.reserve(nlines); + + // sentry value so we can check later that we set them all + std::vector<int>::iterator iter = m_map.begin(); + while (iter != m_map.end()) { - // sentry value so we can check later that we set them all - m_map[i] = BAD_MAP_ENTRY; + *iter = BAD_MAP_ENTRY; + iter++; } } }; Modified: trunk/Src/MergeDocDiffSync.cpp =================================================================== --- trunk/Src/MergeDocDiffSync.cpp 2009-01-23 21:58:24 UTC (rev 6372) +++ trunk/Src/MergeDocDiffSync.cpp 2009-01-24 00:54:46 UTC (rev 6373) @@ -51,13 +51,16 @@ AdjustDiffBlock(diffmap, diffrange, lo0, hi0, lo1, hi1); #ifdef _DEBUG - int i; - for (i = 0; i < diffmap.m_map.size(); i++) + std::vector<int>::const_iterator iter = diffmap.m_map.begin(); + int i = 0; + while (iter != diffmap.m_map.end()) { TCHAR buf[256]; wsprintf(buf, _T("begin0=%d begin1=%d diffmap[%d]=%d\n"), - diffrange.begin0, diffrange.begin1, i, diffmap.m_map[i]); + diffrange.begin0, diffrange.begin1, i, iter); OutputDebugString(buf); + iter++; + i++; } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-24 13:37:50
|
Revision: 6375 http://winmerge.svn.sourceforge.net/winmerge/?rev=6375&view=rev Author: kimmov Date: 2009-01-24 13:37:45 +0000 (Sat, 24 Jan 2009) Log Message: ----------- Remove MFC dependency from CompareOptions class. Modified Paths: -------------- trunk/Src/CompareOptions.cpp trunk/Src/Merge.vcproj Modified: trunk/Src/CompareOptions.cpp =================================================================== --- trunk/Src/CompareOptions.cpp 2009-01-24 11:18:52 UTC (rev 6374) +++ trunk/Src/CompareOptions.cpp 2009-01-24 13:37:45 UTC (rev 6375) @@ -6,7 +6,8 @@ // ID line follows -- this is updated by SVN // $Id: ByteComparator.h 3397 2006-07-27 10:41:24Z kimmov $ -#include "StdAfx.h" +#include <windows.h> +#include <crtdbg.h> #include "DIFF.H" #include "CompareOptions.h" Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-01-24 11:18:52 UTC (rev 6374) +++ trunk/Src/Merge.vcproj 2009-01-24 13:37:45 UTC (rev 6375) @@ -780,7 +780,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -789,6 +792,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -798,6 +804,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -806,7 +815,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-25 20:50:46
|
Revision: 6378 http://winmerge.svn.sourceforge.net/winmerge/?rev=6378&view=rev Author: kimmov Date: 2009-01-25 20:50:42 +0000 (Sun, 25 Jan 2009) Log Message: ----------- Remove MFC dependency from DiffItem. Modified Paths: -------------- trunk/Src/DiffItem.cpp trunk/Src/Merge.vcproj Modified: trunk/Src/DiffItem.cpp =================================================================== --- trunk/Src/DiffItem.cpp 2009-01-25 20:40:50 UTC (rev 6377) +++ trunk/Src/DiffItem.cpp 2009-01-25 20:50:42 UTC (rev 6378) @@ -6,16 +6,10 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "stdafx.h" +#include <windows.h> #include "DiffItem.h" #include "paths.h" -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#define new DEBUG_NEW -#endif - DIFFITEM DIFFITEM::emptyitem; /** @brief DIFFITEM's destructor */ Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-01-25 20:40:50 UTC (rev 6377) +++ trunk/Src/Merge.vcproj 2009-01-25 20:50:42 UTC (rev 6378) @@ -1240,7 +1240,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -1249,6 +1252,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -1258,6 +1264,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -1266,7 +1275,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-25 21:05:26
|
Revision: 6379 http://winmerge.svn.sourceforge.net/winmerge/?rev=6379&view=rev Author: kimmov Date: 2009-01-25 21:05:24 +0000 (Sun, 25 Jan 2009) Log Message: ----------- Remove MFC dependency from DiffList. Modified Paths: -------------- trunk/Src/DiffList.cpp trunk/Src/Merge.vcproj Modified: trunk/Src/DiffList.cpp =================================================================== --- trunk/Src/DiffList.cpp 2009-01-25 20:50:42 UTC (rev 6378) +++ trunk/Src/DiffList.cpp 2009-01-25 21:05:24 UTC (rev 6379) @@ -22,9 +22,10 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "StdAfx.h" +#include <windows.h> +#include <crtdbg.h> +#include <assert.h> #include "DiffList.h" -#include "DiffWrapper.h" #include "coretools.h" using std::swap; @@ -179,7 +180,7 @@ } else { - ASSERT(0); + assert(0); return NULL; } } @@ -508,10 +509,10 @@ for (int nDiff = 0; nDiff < nDiffCount; ++nDiff) { DIFFRANGE curDiff; - VERIFY(GetDiff(nDiff, curDiff)); + GetDiff(nDiff, curDiff); // this guarantees that all the diffs are synchronized - ASSERT(curDiff.begin0 + nLeftLines == curDiff.begin1 + nRightLines); + assert(curDiff.begin0 + nLeftLines == curDiff.begin1 + nRightLines); int nline0 = curDiff.end0 - curDiff.begin0 + 1; int nline1 = curDiff.end1 - curDiff.begin1 + 1; int nextra = nline0 - nline1; Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-01-25 20:50:42 UTC (rev 6378) +++ trunk/Src/Merge.vcproj 2009-01-25 21:05:24 UTC (rev 6379) @@ -1330,7 +1330,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -1339,6 +1342,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -1348,6 +1354,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -1356,7 +1365,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-25 22:13:41
|
Revision: 6380 http://winmerge.svn.sourceforge.net/winmerge/?rev=6380&view=rev Author: kimmov Date: 2009-01-25 22:13:36 +0000 (Sun, 25 Jan 2009) Log Message: ----------- Remove MFC dependency from Version class. Modified Paths: -------------- trunk/Src/AboutDlg.cpp trunk/Src/Common/version.cpp trunk/Src/Common/version.h trunk/Src/ConfigLog.cpp trunk/Src/Merge.vcproj trunk/Src/Splash.cpp Modified: trunk/Src/AboutDlg.cpp =================================================================== --- trunk/Src/AboutDlg.cpp 2009-01-25 21:05:24 UTC (rev 6379) +++ trunk/Src/AboutDlg.cpp 2009-01-25 22:13:36 UTC (rev 6380) @@ -69,8 +69,8 @@ } CVersionInfo version(AfxGetResourceHandle()); - CString sVersion = version.GetFixedProductVersion(); - LangFormatString1(m_strVersion, IDS_VERSION_FMT, sVersion); + String sVersion = version.GetFixedProductVersion(); + LangFormatString1(m_strVersion, IDS_VERSION_FMT, sVersion.c_str()); #ifdef _UNICODE m_strVersion += _T(" "); @@ -82,14 +82,15 @@ m_strVersion += theApp.LoadString(IDS_WINX64).c_str(); #endif - CString sPrivateBuild = version.GetPrivateBuild(); - if (!sPrivateBuild.IsEmpty()) + String sPrivateBuild = version.GetPrivateBuild(); + if (!sPrivateBuild.empty()) { - LangFormatString1(m_strPrivateBuild, IDS_PRIVATEBUILD_FMT, sPrivateBuild); + LangFormatString1(m_strPrivateBuild, IDS_PRIVATEBUILD_FMT, + sPrivateBuild.c_str()); } - CString copyright = version.GetLegalCopyright(); - m_ctlCompany.SetWindowText(copyright); + String copyright = version.GetLegalCopyright(); + m_ctlCompany.SetWindowText(copyright.c_str()); m_ctlWWW.m_link = WinMergeURL; UpdateData(FALSE); Modified: trunk/Src/Common/version.cpp =================================================================== --- trunk/Src/Common/version.cpp 2009-01-25 21:05:24 UTC (rev 6379) +++ trunk/Src/Common/version.cpp 2009-01-25 22:13:36 UTC (rev 6380) @@ -6,8 +6,10 @@ // ID line follows -- this is updated by SVN // $Id$ - -#include "StdAfx.h" +#include <windows.h> +#include <tchar.h> +#include <assert.h> +#include "coretypes.h" #include "version.h" /** @@ -103,7 +105,7 @@ * @brief Return file version string. * @return File version as string. */ -CString CVersionInfo::GetFileVersion() const +String CVersionInfo::GetFileVersion() const { return m_strFileVersion; } @@ -112,7 +114,7 @@ * @brief Return private build number. * @return Private build number as string. */ -CString CVersionInfo::GetPrivateBuild() const +String CVersionInfo::GetPrivateBuild() const { return m_strPrivateBuild; } @@ -121,7 +123,7 @@ * @brief Return special build number. * @return Special build number as string. */ -CString CVersionInfo::GetSpecialBuild() const +String CVersionInfo::GetSpecialBuild() const { return m_strSpecialBuild; } @@ -130,7 +132,7 @@ * @brief Return company name. * @return Company name. */ -CString CVersionInfo::GetCompanyName() const +String CVersionInfo::GetCompanyName() const { return m_strCompanyName; } @@ -139,7 +141,7 @@ * @brief Return file description string. * @return File description string. */ -CString CVersionInfo::GetFileDescription() const +String CVersionInfo::GetFileDescription() const { return m_strFileDescription; } @@ -148,7 +150,7 @@ * @brief Return internal name. * @return Internal name. */ -CString CVersionInfo::GetInternalName() const +String CVersionInfo::GetInternalName() const { return m_strInternalName; } @@ -157,7 +159,7 @@ * @brief Return copyright info. * @return Copyright info. */ -CString CVersionInfo::GetLegalCopyright() const +String CVersionInfo::GetLegalCopyright() const { return m_strLegalCopyright; } @@ -166,7 +168,7 @@ * @brief Return original filename. * @return Original filename. */ -CString CVersionInfo::GetOriginalFilename() const +String CVersionInfo::GetOriginalFilename() const { return m_strOriginalFilename; } @@ -175,7 +177,7 @@ * @brief Return product's version number. * @return Product's version number as string. */ -CString CVersionInfo::GetProductVersion() const +String CVersionInfo::GetProductVersion() const { return m_strProductVersion; } @@ -189,10 +191,12 @@ * @param [in] Last two numbers for version number. * @return Formatted version string. */ -static CString MakeVersionString(DWORD hi, DWORD lo) +static String MakeVersionString(DWORD hi, DWORD lo) { - CString sver; - sver.Format(_T("%d.%d.%d.%d"), HIWORD(hi), LOWORD(hi), HIWORD(lo), LOWORD(lo)); + TCHAR ver[50]; + _sntprintf(ver, countof(ver) - 1, _T("%d.%d.%d.%d"), HIWORD(hi), + LOWORD(hi), HIWORD(lo), LOWORD(lo)); + String sver(ver); return sver; } @@ -201,7 +205,7 @@ * This function returns version number given as a number in version info. * @return Product's version number as string. */ -CString CVersionInfo::GetFixedProductVersion() +String CVersionInfo::GetFixedProductVersion() { if (!m_bVersionFound) return _T(""); @@ -214,7 +218,7 @@ * This function returns version number given as a number in version info. * @return File's version number as string. */ -CString CVersionInfo::GetFixedFileVersion() +String CVersionInfo::GetFixedFileVersion() { if (!m_bVersionFound) return _T(""); @@ -244,7 +248,7 @@ * @brief Return comment string. * @return Comment string. */ -CString CVersionInfo::GetComments() const +String CVersionInfo::GetComments() const { return m_strComments; } @@ -263,10 +267,10 @@ DWORD dwVerHnd = 0; // An 'ignored' parameter, always '0' TCHAR szFileName[MAX_PATH]; - if (m_strFileName.IsEmpty()) + if (m_strFileName.empty()) GetModuleFileName(NULL, szFileName, MAX_PATH); else - _tcsncpy(szFileName, m_strFileName, MAX_PATH - 1); + _tcsncpy(szFileName, m_strFileName.c_str(), MAX_PATH - 1); DWORD dwVerInfoSize = GetFileVersionInfoSize(szFileName, &dwVerHnd); if (dwVerInfoSize) @@ -311,20 +315,28 @@ { WORD codepage; GetCodepageForLanguage(m_wLanguage, codepage); - m_strLanguage.Format(_T("%04x"), m_wLanguage); - m_strCodepage.Format(_T("%04x"), codepage); + TCHAR temp[20]; + _sntprintf(temp, countof(temp) - 1, _T("%04x"), m_wLanguage); + m_strLanguage = temp; + _sntprintf(temp, countof(temp) - 1, _T("%04x"), codepage); + m_strCodepage = temp; } - else if (m_strLanguage.IsEmpty() - || m_strCodepage.IsEmpty()) + else if (m_strLanguage.empty() + || m_strCodepage.empty()) { LANGUAGEANDCODEPAGE *lpTranslate; DWORD langLen; if (VerQueryValue((LPVOID)m_pVffInfo, - _T("\\VarFileInfo\\Translation"), - (LPVOID *)&lpTranslate, (UINT *)&langLen)) + _T("\\VarFileInfo\\Translation"), + (LPVOID *)&lpTranslate, (UINT *)&langLen)) { - m_strLanguage.Format(_T("%4.4X"), lpTranslate[0].wLanguage); - m_strCodepage.Format(_T("%4.4X"), lpTranslate[0].wCodePage); + TCHAR temp[20]; + _sntprintf(temp, countof(temp) - 1, _T("%4.4X"), + lpTranslate[0].wLanguage); + m_strLanguage = temp; + _sntprintf(temp, countof(temp) - 1, _T("%4.4X"), + lpTranslate[0].wCodePage); + m_strCodepage = temp; } } QueryValue(_T("CompanyName"), m_strCompanyName); @@ -345,15 +357,16 @@ * @param [in] szId Name of value/string to read. * @param [out] Value read. */ -void CVersionInfo::QueryValue(LPCTSTR szId, CString& s) +void CVersionInfo::QueryValue(LPCTSTR szId, String& s) { - ASSERT(m_pVffInfo != NULL); + assert(m_pVffInfo != NULL); LPTSTR lpVersion; // String pointer to 'version' text UINT uVersionLen; BOOL bRetCode; TCHAR szSelector[256]; - _sntprintf(szSelector, countof(szSelector), _T("\\StringFileInfo\\%s%s\\%s"), + _sntprintf(szSelector, countof(szSelector) - 1, + _T("\\StringFileInfo\\%s%s\\%s"), m_strLanguage, m_strCodepage, szId); bRetCode = VerQueryValue((LPVOID)m_pVffInfo, szSelector, @@ -363,11 +376,10 @@ if (bRetCode) { s = lpVersion; - s.TrimLeft(); - s.TrimRight(); + s = string_trim_ws(s); } else - s.Empty(); + s.clear(); } /** Modified: trunk/Src/Common/version.h =================================================================== --- trunk/Src/Common/version.h 2009-01-25 21:05:24 UTC (rev 6379) +++ trunk/Src/Common/version.h 2009-01-25 22:13:36 UTC (rev 6380) @@ -10,6 +10,7 @@ #define VERSIONTOOLS_H #include <shlwapi.h> +#include "UnicodeString.h" /** * @brief Class providing access to version information of a file. @@ -29,20 +30,20 @@ WORD m_wLanguage; /**< Language-ID to use (if given) */ BOOL m_bVersionFound; /**< Was version info found from file? */ - CString m_strFileName; - CString m_strLanguage; - CString m_strCodepage; - CString m_strCompanyName; - CString m_strFileDescription; - CString m_strFileVersion; - CString m_strInternalName; - CString m_strLegalCopyright; - CString m_strOriginalFilename; - CString m_strProductName; - CString m_strProductVersion; - CString m_strComments; - CString m_strSpecialBuild; - CString m_strPrivateBuild; + String m_strFileName; + String m_strLanguage; + String m_strCodepage; + String m_strCompanyName; + String m_strFileDescription; + String m_strFileVersion; + String m_strInternalName; + String m_strLegalCopyright; + String m_strOriginalFilename; + String m_strProductName; + String m_strProductVersion; + String m_strComments; + String m_strSpecialBuild; + String m_strPrivateBuild; public: CVersionInfo(BOOL bVersionOnly); @@ -53,18 +54,18 @@ LPCTSTR szLanguage = NULL, LPCTSTR szCodepage = NULL); CVersionInfo(HINSTANCE hModule); - CString GetFileVersion() const; - CString GetCompanyName() const; - CString GetFileDescription() const; - CString GetInternalName() const; - CString GetLegalCopyright() const; - CString GetOriginalFilename() const; - CString GetProductVersion() const; - CString GetComments() const; - CString GetSpecialBuild() const; - CString GetPrivateBuild() const; - CString GetFixedProductVersion(); - CString GetFixedFileVersion(); + String GetFileVersion() const; + String GetCompanyName() const; + String GetFileDescription() const; + String GetInternalName() const; + String GetLegalCopyright() const; + String GetOriginalFilename() const; + String GetProductVersion() const; + String GetComments() const; + String GetSpecialBuild() const; + String GetPrivateBuild() const; + String GetFixedProductVersion(); + String GetFixedFileVersion(); DLLVERSIONINFO m_dvi; BOOL GetFixedFileVersion(DWORD &versionMS, DWORD &versionLS); @@ -72,7 +73,7 @@ void GetVersionInfo(); void GetFixedVersionInfo(); void QueryStrings(); - void QueryValue(LPCTSTR szId, CString& s); + void QueryValue(LPCTSTR szId, String& s); BOOL GetCodepageForLanguage(WORD wLanguage, WORD & wCodePage); }; Modified: trunk/Src/ConfigLog.cpp =================================================================== --- trunk/Src/ConfigLog.cpp 2009-01-25 21:05:24 UTC (rev 6379) +++ trunk/Src/ConfigLog.cpp 2009-01-25 22:13:36 UTC (rev 6380) @@ -409,13 +409,13 @@ // Platform stuff FileWriteString(_T("\n\nVersion information:\n")); FileWriteString(_T(" WinMerge.exe: ")); - FileWriteString(version.GetFixedProductVersion()); + FileWriteString(version.GetFixedProductVersion().c_str()); - CString privBuild = version.GetPrivateBuild(); - if (!privBuild.IsEmpty()) + String privBuild = version.GetPrivateBuild(); + if (!privBuild.empty()) { FileWriteString(_T(" - Private build: ")); - FileWriteString(privBuild); + FileWriteString(privBuild.c_str()); } text = GetBuildFlags(); Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-01-25 21:05:24 UTC (rev 6379) +++ trunk/Src/Merge.vcproj 2009-01-25 22:13:36 UTC (rev 6380) @@ -5770,7 +5770,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -5779,6 +5782,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -5788,6 +5794,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -5796,7 +5805,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File Modified: trunk/Src/Splash.cpp =================================================================== --- trunk/Src/Splash.cpp 2009-01-25 21:05:24 UTC (rev 6379) +++ trunk/Src/Splash.cpp 2009-01-25 22:13:36 UTC (rev 6380) @@ -236,7 +236,7 @@ if (fontSuccess) oldfont = dc.SelectObject(&versionFont); - CString sVersion = version.GetFixedProductVersion(); + CString sVersion = version.GetFixedProductVersion().c_str(); LangFormatString1(s, IDS_VERSION_FMT, sVersion); dc.SetBkMode(TRANSPARENT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-26 17:58:26
|
Revision: 6381 http://winmerge.svn.sourceforge.net/winmerge/?rev=6381&view=rev Author: kimmov Date: 2009-01-26 17:58:15 +0000 (Mon, 26 Jan 2009) Log Message: ----------- BUG: [ 2536207 ] MergeDocDiffSync.cpp Fix the crash by using resize() instead of reserve() to initialize std::vector. Modified Paths: -------------- trunk/Src/DiffList.cpp trunk/Src/DiffList.h Modified: trunk/Src/DiffList.cpp =================================================================== --- trunk/Src/DiffList.cpp 2009-01-25 22:13:36 UTC (rev 6380) +++ trunk/Src/DiffList.cpp 2009-01-26 17:58:15 UTC (rev 6381) @@ -44,6 +44,24 @@ } /** + * @brief Initialize DiffMap. + * @param [in] nlines Lines to add to the list. + */ +void DiffMap::InitDiffMap(int nlines) +{ + m_map.resize(nlines); + + // sentry value so we can check later that we set them all + std::vector<int>::iterator iter = m_map.begin(); + while (iter != m_map.end()) + { + *iter = BAD_MAP_ENTRY; + iter++; + } +} + + +/** * @brief Default constructor, initialises difflist to 64 items. */ DiffList::DiffList() Modified: trunk/Src/DiffList.h =================================================================== --- trunk/Src/DiffList.h 2009-01-25 22:13:36 UTC (rev 6380) +++ trunk/Src/DiffList.h 2009-01-26 17:58:15 UTC (rev 6381) @@ -75,22 +75,7 @@ // boilerplate ctr, copy ctr DiffMap() { } DiffMap(const DiffMap & src) { m_map = src.m_map; } - - /** - * @brief Put DiffMap into known. starting, unfilled state - */ - void InitDiffMap(int nlines) - { - m_map.reserve(nlines); - - // sentry value so we can check later that we set them all - std::vector<int>::iterator iter = m_map.begin(); - while (iter != m_map.end()) - { - *iter = BAD_MAP_ENTRY; - iter++; - } - } + void InitDiffMap(int nlines); }; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-27 22:50:31
|
Revision: 6392 http://winmerge.svn.sourceforge.net/winmerge/?rev=6392&view=rev Author: kimmov Date: 2009-01-27 21:50:22 +0000 (Tue, 27 Jan 2009) Log Message: ----------- Convert ProjectFile class to use String instead of CString. Modified Paths: -------------- trunk/Src/Merge.cpp trunk/Src/OpenDlg.cpp trunk/Src/ProjectFile.cpp trunk/Src/ProjectFile.h trunk/Src/ProjectFilePathsDlg.cpp Modified: trunk/Src/Merge.cpp =================================================================== --- trunk/Src/Merge.cpp 2009-01-27 19:51:50 UTC (rev 6391) +++ trunk/Src/Merge.cpp 2009-01-27 21:50:22 UTC (rev 6392) @@ -666,7 +666,7 @@ AfxMessageBox(msg, MB_ICONSTOP); return false; } - CString sLeft, sRight; + String sLeft, sRight; BOOL bLeftReadOnly = FALSE; BOOL bRightReadOnly = FALSE; BOOL bRecursive = FALSE; @@ -674,7 +674,7 @@ sRight = project.GetRight(&bRightReadOnly); if (project.HasFilter()) { - String filter = (LPCTSTR)project.GetFilter(); + String filter = project.GetFilter(); filter = string_trim_ws(filter); m_globalFileFilter.SetFilter(filter); } @@ -683,13 +683,13 @@ DWORD dwLeftFlags = FFILEOPEN_NONE; DWORD dwRightFlags = FFILEOPEN_NONE; - if (!sLeft.IsEmpty()) + if (!sLeft.empty()) { dwLeftFlags = FFILEOPEN_PROJECT; if (bLeftReadOnly) dwLeftFlags |= FFILEOPEN_READONLY; } - if (!sRight.IsEmpty()) + if (!sRight.empty()) { dwRightFlags = FFILEOPEN_PROJECT; if (bRightReadOnly) @@ -698,7 +698,8 @@ WriteProfileInt(_T("Settings"), _T("Recurse"), bRecursive); - BOOL rtn = GetMainFrame()->DoFileOpen(sLeft, sRight, dwLeftFlags, dwRightFlags, bRecursive); + BOOL rtn = GetMainFrame()->DoFileOpen(sLeft.c_str(), sRight.c_str(), + dwLeftFlags, dwRightFlags, bRecursive); AddToRecentProjectsMRU(sProject); return !!rtn; Modified: trunk/Src/OpenDlg.cpp =================================================================== --- trunk/Src/OpenDlg.cpp 2009-01-27 19:51:50 UTC (rev 6391) +++ trunk/Src/OpenDlg.cpp 2009-01-27 21:50:22 UTC (rev 6392) @@ -610,10 +610,12 @@ } else { - m_pProjectFile->GetPaths(m_strLeft, m_strRight, m_bRecurse); + m_strLeft = m_pProjectFile->GetLeft().c_str(); + m_strRight = m_pProjectFile->GetRight().c_str(); + m_bRecurse = m_pProjectFile->GetSubfolders(); if (m_pProjectFile->HasFilter()) { - m_strExt = m_pProjectFile->GetFilter(); + m_strExt = m_pProjectFile->GetFilter().c_str(); m_strExt.TrimLeft(); m_strExt.TrimRight(); if (m_strExt[0] != '*') Modified: trunk/Src/ProjectFile.cpp =================================================================== --- trunk/Src/ProjectFile.cpp 2009-01-27 19:51:50 UTC (rev 6391) +++ trunk/Src/ProjectFile.cpp 2009-01-27 21:50:22 UTC (rev 6392) @@ -19,12 +19,12 @@ * * @brief Implementation file for ProjectFile class. */ -// RCS ID line follows -- this is updated by CVS +// ID line follows -- this is updated by CVS // $Id$ #include "stdafx.h" #include <scew/scew.h> - +#include "UnicodeString.h" #include "ProjectFile.h" #include "Merge.h" @@ -312,21 +312,21 @@ USES_CONVERSION; scew_element* element = NULL; - if (!m_leftFile.IsEmpty()) + if (!m_leftFile.empty()) { element = scew_element_add(parent, Left_element_name); String path = m_leftFile; scew_element_set_contents(element, T2UTF8(EscapeXML(path).c_str())); } - if (!m_rightFile.IsEmpty()) + if (!m_rightFile.empty()) { element = scew_element_add(parent, Right_element_name); String path = m_rightFile; scew_element_set_contents(element, T2UTF8(EscapeXML(path).c_str())); } - if (!m_filter.IsEmpty()) + if (!m_filter.empty()) { element = scew_element_add(parent, Filter_element_name); String filter = m_filter; @@ -393,8 +393,9 @@ /** * @brief Returns left path. * @param [out] pReadOnly TRUE if readonly was specified for path. + * @return Left path. */ -CString ProjectFile::GetLeft(BOOL * pReadOnly /*=NULL*/) const +String ProjectFile::GetLeft(BOOL * pReadOnly /*=NULL*/) const { if (pReadOnly) *pReadOnly = m_bLeftReadOnly; @@ -403,6 +404,7 @@ /** * @brief Returns if left path is specified read-only. + * @return TRUE if left path is read-only, FALSE otherwise. */ BOOL ProjectFile::GetLeftReadOnly() const { @@ -414,21 +416,19 @@ * @param [in] sLeft Left path. * @param [in] bReadOnly Will path be recorded read-only? */ -CString ProjectFile::SetLeft(const CString& sLeft, const BOOL * pReadOnly /*=NULL*/) +void ProjectFile::SetLeft(const String& sLeft, const BOOL * pReadOnly /*=NULL*/) { - CString sLeftOld = GetLeft(); m_leftFile = sLeft; if (pReadOnly) m_bLeftReadOnly = *pReadOnly; - - return sLeftOld; } /** * @brief Returns right path. * @param [out] pReadOnly TRUE if readonly was specified for path. + * @return Right path. */ -CString ProjectFile::GetRight(BOOL * pReadOnly /*=NULL*/) const +String ProjectFile::GetRight(BOOL * pReadOnly /*=NULL*/) const { if (pReadOnly) *pReadOnly = m_bRightReadOnly; @@ -437,6 +437,7 @@ /** * @brief Returns if right path is specified read-only. + * @return TRUE if right path is read-only, FALSE otherwise. */ BOOL ProjectFile::GetRightReadOnly() const { @@ -448,37 +449,34 @@ * @param [in] sRight Right path. * @param [in] bReadOnly Will path be recorded read-only? */ -CString ProjectFile::SetRight(const CString& sRight, const BOOL * pReadOnly /*=NULL*/) +void ProjectFile::SetRight(const String& sRight, const BOOL * pReadOnly /*=NULL*/) { - CString sRightOld = GetRight(); m_rightFile = sRight; if (pReadOnly) m_bRightReadOnly = *pReadOnly; - - return sRightOld; } /** * @brief Returns filter. + * @return Filter string. */ -CString ProjectFile::GetFilter() const +String ProjectFile::GetFilter() const { return m_filter; } /** - * @brief Set filter, returns old filter. + * @brief Set filter. + * @param [in] sFilter New filter string to set. */ -CString ProjectFile::SetFilter(const CString& sFilter) +void ProjectFile::SetFilter(const String& sFilter) { - CString sFilterOld = GetFilter(); m_filter = sFilter; - - return sFilterOld; } /** * @brief Returns subfolder included -setting. + * @return != 0 if subfolders are included. */ int ProjectFile::GetSubfolders() const { @@ -486,30 +484,10 @@ } /** - * @brief set subfolder, returns old subfolder value. + * @brief set subfolder. + * @param [in] iSubfolder New value for subfolder inclusion. */ -int ProjectFile::SetSubfolders(const int iSubfolder) +void ProjectFile::SetSubfolders(int iSubfolder) { - int iSubfoldersOld = GetSubfolders(); m_subfolders = iSubfolder ? 1 : 0; - - return iSubfoldersOld; } - -/** - * @brief Returns left and right paths and recursive from project file - * - * @param [out] sLeft Left path - * @param [out] sRight Right path - * @param [out] bSubFolders If TRUE subfolders included (recursive compare) - */ -void ProjectFile::GetPaths(CString & sLeft, CString & sRight, - BOOL & bSubfolders) const -{ - if (HasLeft()) - sLeft = GetLeft(); - if (HasRight()) - sRight = GetRight(); - if (HasSubfolders()) - bSubfolders = (GetSubfolders() == 1); -} Modified: trunk/Src/ProjectFile.h =================================================================== --- trunk/Src/ProjectFile.h 2009-01-27 19:51:50 UTC (rev 6391) +++ trunk/Src/ProjectFile.h 2009-01-27 21:50:22 UTC (rev 6392) @@ -19,9 +19,12 @@ * * @brief Declaration file ProjectFile class */ -// RCS ID line follows -- this is updated by CVS +// ID line follows -- this is updated by CVS // $Id$ +#ifndef _PROJECT_FILE_H_ +#define _PROJECT_FILE_H_ + #include <scew/scew.h> /** @brief File extension for path files */ @@ -46,20 +49,18 @@ BOOL HasFilter() const; BOOL HasSubfolders() const; - CString GetLeft(BOOL * pReadOnly = NULL) const; + String GetLeft(BOOL * pReadOnly = NULL) const; BOOL GetLeftReadOnly() const; - CString GetRight(BOOL * pReadOnly = NULL) const; + String GetRight(BOOL * pReadOnly = NULL) const; BOOL GetRightReadOnly() const; - CString GetFilter() const; + String GetFilter() const; int GetSubfolders() const; - CString SetLeft(const CString& sLeft, const BOOL * pReadOnly = NULL); - CString SetRight(const CString& sRight, const BOOL * pReadOnly = NULL); - CString SetFilter(const CString& sFilter); - int SetSubfolders(int iSubfolder); + void SetLeft(const String& sLeft, const BOOL * pReadOnly = NULL); + void SetRight(const String& sRight, const BOOL * pReadOnly = NULL); + void SetFilter(const String& sFilter); + void SetSubfolders(int iSubfolder); - void GetPaths(CString & sLeft, CString & sRight, BOOL & bSubFolders) const; - protected: scew_element* GetRootElement(scew_tree * tree); BOOL GetPathsData(scew_element * parent); @@ -69,13 +70,15 @@ private: BOOL m_bHasLeft; /**< Has left path? */ - CString m_leftFile; /**< Left path */ + String m_leftFile; /**< Left path */ BOOL m_bHasRight; /**< Has right path? */ - CString m_rightFile; /**< Right path */ + String m_rightFile; /**< Right path */ BOOL m_bHasFilter; /**< Has filter? */ - CString m_filter; /**< Filter name or mask */ + String m_filter; /**< Filter name or mask */ BOOL m_bHasSubfolders; /**< Has subfolders? */ int m_subfolders; /**< Are subfolders included (recursive scan) */ BOOL m_bLeftReadOnly; /**< Is left path opened as read-only */ BOOL m_bRightReadOnly; /**< Is right path opened as read-only */ }; + +#endif // #ifdef _PROJECT_FILE_H_ Modified: trunk/Src/ProjectFilePathsDlg.cpp =================================================================== --- trunk/Src/ProjectFilePathsDlg.cpp 2009-01-27 19:51:50 UTC (rev 6391) +++ trunk/Src/ProjectFilePathsDlg.cpp 2009-01-27 21:50:22 UTC (rev 6392) @@ -146,9 +146,9 @@ } else { - m_sLeftFile = project.GetLeft(&m_bLeftPathReadOnly); - m_sRightFile = project.GetRight(&m_bRightPathReadOnly); - m_sFilter = project.GetFilter(); + m_sLeftFile = project.GetLeft(&m_bLeftPathReadOnly).c_str(); + m_sRightFile = project.GetRight(&m_bRightPathReadOnly).c_str(); + m_sFilter = project.GetFilter().c_str(); m_bIncludeSubfolders = project.GetSubfolders(); UpdateData(FALSE); @@ -177,9 +177,9 @@ ProjectFile project; if (!m_sLeftFile.IsEmpty()) - project.SetLeft(m_sLeftFile, &m_bLeftPathReadOnly); + project.SetLeft((LPCTSTR)m_sLeftFile, &m_bLeftPathReadOnly); if (!m_sRightFile.IsEmpty()) - project.SetRight(m_sRightFile, &m_bRightPathReadOnly); + project.SetRight((LPCTSTR)m_sRightFile, &m_bRightPathReadOnly); if (!m_sFilter.IsEmpty()) { // Remove possbile prefix from the filter name @@ -190,7 +190,7 @@ m_sFilter.Delete(0, prefix.length()); } m_sFilter.TrimLeft(); - project.SetFilter(m_sFilter); + project.SetFilter((LPCTSTR)m_sFilter); } project.SetSubfolders(m_bIncludeSubfolders); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-01-28 21:04:53
|
Revision: 6396 http://winmerge.svn.sourceforge.net/winmerge/?rev=6396&view=rev Author: kimmov Date: 2009-01-28 21:04:47 +0000 (Wed, 28 Jan 2009) Log Message: ----------- Code cleanup. Don't return reference to pointer but the pointer itself. cppcheck also gave a memory leak error from this code: [DiffItemList.cpp:39]: Memory leak: p Modified Paths: -------------- trunk/Src/DiffItemList.cpp trunk/Src/DiffItemList.h trunk/Src/DirScan.cpp Modified: trunk/Src/DiffItemList.cpp =================================================================== --- trunk/Src/DiffItemList.cpp 2009-01-28 17:27:43 UTC (rev 6395) +++ trunk/Src/DiffItemList.cpp 2009-01-28 21:04:47 UTC (rev 6396) @@ -26,9 +26,11 @@ } /** - * @brief Add new diffitem to structured DIFFITEM tree + * @brief Add new diffitem to structured DIFFITEM tree. + * @param [in] parent Parent item, or NULL if no parent. + * @return Pointer to the added item. */ -DIFFITEM &DiffItemList::AddDiff(DIFFITEM *parent) +DIFFITEM* DiffItemList::AddDiff(DIFFITEM *parent) { DIFFITEM *p = new DIFFITEM; if (parent) @@ -36,7 +38,7 @@ else m_root.Append(p); p->parent = parent; - return *p; + return p; } /** Modified: trunk/Src/DiffItemList.h =================================================================== --- trunk/Src/DiffItemList.h 2009-01-28 17:27:43 UTC (rev 6395) +++ trunk/Src/DiffItemList.h 2009-01-28 21:04:47 UTC (rev 6396) @@ -24,7 +24,7 @@ DiffItemList(); ~DiffItemList(); // add & remove differences - DIFFITEM &AddDiff(DIFFITEM *parent); + DIFFITEM *AddDiff(DIFFITEM *parent); void RemoveDiff(UINT_PTR diffpos); void RemoveAll(); Modified: trunk/Src/DirScan.cpp =================================================================== --- trunk/Src/DirScan.cpp 2009-01-28 17:27:43 UTC (rev 6395) +++ trunk/Src/DirScan.cpp 2009-01-28 21:04:47 UTC (rev 6396) @@ -587,54 +587,54 @@ // We must store both paths - we cannot get paths later // and we need unique item paths for example when items // change to identical - DIFFITEM &di = myStruct->context->AddDiff(parent); + DIFFITEM *di = myStruct->context->AddDiff(parent); if (!sLeftDir.empty()) - di.left.path = sLeftDir; + di->left.path = sLeftDir; if (!sRightDir.empty()) - di.right.path = sRightDir; + di->right.path = sRightDir; if (lent) { - di.left.filename = lent->filename; - di.left.mtime = lent->mtime; - di.left.ctime = lent->ctime; - di.left.size = lent->size; - di.left.flags.attributes = lent->flags.attributes; + di->left.filename = lent->filename; + di->left.mtime = lent->mtime; + di->left.ctime = lent->ctime; + di->left.size = lent->size; + di->left.flags.attributes = lent->flags.attributes; } else { // Don't break CDirView::DoCopyRightToLeft() - di.left.filename = rent->filename; + di->left.filename = rent->filename; } if (rent) { - di.right.filename = OPTIMIZE_SHARE_CSTRINGDATA + di->right.filename = OPTIMIZE_SHARE_CSTRINGDATA ( - di.left.filename.c_str() == rent->filename.c_str() ? di.left.filename : + di->left.filename.c_str() == rent->filename.c_str() ? di->left.filename : ) rent->filename; - di.right.mtime = rent->mtime; - di.right.ctime = rent->ctime; - di.right.size = rent->size; - di.right.flags.attributes = rent->flags.attributes; + di->right.mtime = rent->mtime; + di->right.ctime = rent->ctime; + di->right.size = rent->size; + di->right.flags.attributes = rent->flags.attributes; } else { // Don't break CDirView::DoCopyLeftToRight() - di.right.filename = lent->filename; + di->right.filename = lent->filename; } - di.diffcode = code; + di->diffcode = code; GetLog()->Write ( CLogFile::LCOMPAREDATA, _T("name=<%s>, leftdir=<%s>, rightdir=<%s>, code=%d"), - di.left.filename.c_str(), di.left.path.c_str(), di.right.path.c_str(), code + di->left.filename.c_str(), di->left.path.c_str(), di->right.path.c_str(), code ); myStruct->context->m_pCompareStats->IncreaseTotalItems(); ReleaseSemaphore(myStruct->hSemaphore, 1, 0); - return &di; + return di; } void // static This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2009-01-31 04:20:57
|
Revision: 6399 http://winmerge.svn.sourceforge.net/winmerge/?rev=6399&view=rev Author: marcelgosselin Date: 2009-01-31 04:20:50 +0000 (Sat, 31 Jan 2009) Log Message: ----------- - Move #include statement to header file to make it self-contained - Change CString to String Modified Paths: -------------- trunk/Src/stringdiffs.cpp trunk/Src/stringdiffs.h Modified: trunk/Src/stringdiffs.cpp =================================================================== --- trunk/Src/stringdiffs.cpp 2009-01-31 04:06:39 UTC (rev 6398) +++ trunk/Src/stringdiffs.cpp 2009-01-31 04:20:50 UTC (rev 6399) @@ -8,9 +8,8 @@ // $Id$ #include "StdAfx.h" -#include <vector> #include <mbctype.h> -#include "UnicodeString.h" + #include "stringdiffs.h" #include "CompareOptions.h" #include "stringdiffsi.h" Modified: trunk/Src/stringdiffs.h =================================================================== --- trunk/Src/stringdiffs.h 2009-01-31 04:06:39 UTC (rev 6398) +++ trunk/Src/stringdiffs.h 2009-01-31 04:20:50 UTC (rev 6399) @@ -10,6 +10,7 @@ #ifndef stringdiffs_h_included #define stringdiffs_h_included +#include "UnicodeString.h" #include <vector> /** @brief One difference between two strings */ @@ -39,7 +40,7 @@ bool case_sensitive, int whitespace, int breakType, bool byte_level, std::vector<wdiff*> * pDiffs); -void sd_ComputeByteDiff(String & str1, CString & str2, +void sd_ComputeByteDiff(String & str1, String & str2, bool casitive, int xwhite, int &begin1, int &begin2, int &end1, int &end2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-02-10 19:00:39
|
Revision: 6433 http://winmerge.svn.sourceforge.net/winmerge/?rev=6433&view=rev Author: kimmov Date: 2009-02-10 19:00:27 +0000 (Tue, 10 Feb 2009) Log Message: ----------- PATCH: [ 2477680 ] unicodefile to compare Submitted by Matthias Mayer Modified Paths: -------------- trunk/Src/Common/multiformatText.cpp trunk/Src/Common/multiformatText.h trunk/Src/Common/unicoder.cpp trunk/Src/Common/unicoder.h trunk/Src/DiffFileData.cpp trunk/Src/DiffWrapper.cpp trunk/Src/FileTransform.cpp trunk/Src/FileTransform.h Modified: trunk/Src/Common/multiformatText.cpp =================================================================== --- trunk/Src/Common/multiformatText.cpp 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/Common/multiformatText.cpp 2009-02-10 19:00:27 UTC (rev 6433) @@ -686,29 +686,36 @@ } /** - * @brief If file is OLECHAR, then convert it to UTF-8 + * @brief If file is Ansi, then convert it to UTF8 * - * If file has UCS-2LE BOM (is Olechar), then convert it to UTF-8. - * (No other file conversions are done here; nothing is done to UCS-2BE files) + * If file has Ansi (is ascii), then convert it to UTF8. + * (No other file conversions are done here; * (UCS-2LE is the Windows standard Unicode encoding) * * Returns FALSE if file is Unicode but opening it fails. - * Returns FALSE if file has Unicode BOM but is not UCS-2LE. + * Returns FALSE if file has Unicode BOM but is not Ansi. * Returns TRUE if file is not Unicode, or if converted file successfully. */ -BOOL OlecharToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM) +BOOL AnsiToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM) { UniMemFile ufile; - if (!ufile.OpenReadOnly(filepath) || !ufile.IsUnicode()) - return TRUE; // not unicode file, nothing to do - ucr::UNICODESET unicoding = ufile.GetUnicoding(); + if (!ufile.OpenReadOnly(filepath)) + return FALSE; // error + if (ufile.IsUnicode()) + { + // Finished with examing file contents + ufile.Close(); + return FALSE; // no ansi file + } + + ucr::UNICODESET unicoding = ufile.GetUnicoding(); //ucr::UCS2LE // Finished with examing file contents ufile.Close(); - // OlecharToUTF8 only converts UCS-2LE files to UTF-8 - if (unicoding != ucr::UCS2LE) + // AnsiToUTF16 only converts Ascii files to UTF-16 + if (unicoding != ucr::NONE) return FALSE; - + // Init filedataIn struct and open file as memory mapped (input) BOOL bSuccess; MAPPEDFILEDATA fileDataIn = {0}; @@ -723,12 +730,20 @@ UINT nBufSize = fileDataIn.dwSize; // first pass : get the size of the destination file - UINT nSizeOldBOM = 2; - UINT nchars = (nBufSize - nSizeOldBOM)/sizeof(WCHAR); + UINT nSizeOldBOM = 0; + UINT nchars = (nBufSize - nSizeOldBOM)/sizeof(CHAR); UINT nSizeBOM = (bWriteBOM) ? 3 : 0; - UINT nDstSize = TransformUcs2ToUtf8((WCHAR*)(pszBuf + nSizeOldBOM), nchars, NULL, 0); + DWORD flags =0; + UINT nDstSize; + //First convert to unicode UCS16 + nDstSize = MultiByteToWideChar(CP_ACP, flags, (const char*)(pszBuf + nSizeOldBOM),nchars,0,0); + wchar_t *szTemp = new wchar_t[nDstSize]; + nDstSize = MultiByteToWideChar(CP_ACP, flags, (const char*)(pszBuf + nSizeOldBOM),nchars,szTemp,nDstSize); + //now convert to unicode UTF8 + nDstSize = WideCharToMultiByte(CP_UTF8, flags, szTemp, nDstSize, NULL, 0, NULL, NULL); + // create the destination file MAPPEDFILEDATA fileDataOut = {0}; _tcsncpy(fileDataOut.fileName, filepathDst, lstrlen(filepathDst)+1); @@ -745,15 +760,181 @@ ucr::writeBom(fileDataOut.pMapBase, ucr::UTF8); // write data - TransformUcs2ToUtf8((WCHAR*)(pszBuf + nSizeOldBOM), nchars, (char *)fileDataOut.pMapBase+nSizeBOM, nDstSize); + WideCharToMultiByte(CP_UTF8, flags, szTemp, nDstSize, + ((char*)fileDataOut.pMapBase+nSizeBOM), fileDataOut.dwSize-nSizeBOM, NULL, NULL); + files_closeFileMapped(&fileDataOut, fileDataOut.dwSize, FALSE); + } + delete [] szTemp; + files_closeFileMapped(&fileDataIn, 0xFFFFFFFF, FALSE); - files_closeFileMapped(&fileDataOut, nDstSize + nSizeBOM, FALSE); + nFileChanged ++; + return bSuccess; +} +/** + * @brief From UCS-2LE to 8-bit (or UTF-8) + * + * (No other file conversions are done here; + * (UCS-2LE is the Windows standard Unicode encoding) + * + * Returns FALSE if file is Unicode but opening it fails. + * Returns FALSE if file has Unicode BOM but is not Ansi. + * Returns TRUE if file is not Unicode, or if converted file successfully. + */ +BOOL UCS2LEToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM) +{ + UniMemFile ufile; + if (!ufile.OpenReadOnly(filepath)) + return FALSE; // error + if (!ufile.IsUnicode()) + { + // Finished with examing file contents + ufile.Close(); + return FALSE; // no ansi file } + ucr::UNICODESET unicoding = ufile.GetUnicoding(); //ucr::UCS2LE + // Finished with examing file contents + ufile.Close(); + + // UCS-2LE to 8-bit (or UTF-8) + if (unicoding != ucr::UCS2LE) + return FALSE; + + // Init filedataIn struct and open file as memory mapped (input) + BOOL bSuccess; + MAPPEDFILEDATA fileDataIn = {0}; + _tcsncpy(fileDataIn.fileName, filepath, MAX_PATH); + fileDataIn.bWritable = FALSE; + fileDataIn.dwOpenFlags = OPEN_EXISTING; + bSuccess = files_openFileMapped(&fileDataIn); + if (!bSuccess) + return FALSE; + + wchar_t * pszBuf = (wchar_t *)fileDataIn.pMapBase; + UINT nBufSize = fileDataIn.dwSize; + + // first pass : get the size of the destination file + UINT nSizeOldBOM = 1; + UINT nchars = (nBufSize - nSizeOldBOM) / sizeof(wchar_t); + + UINT nSizeBOM = (bWriteBOM) ? 3 : 0; + DWORD flags =0; + UINT nDstSize; + + //now convert to unicode UTF8 + nDstSize = WideCharToMultiByte(CP_UTF8, flags, (pszBuf + nSizeOldBOM), nchars, NULL, 0, NULL, NULL); + + // create the destination file + MAPPEDFILEDATA fileDataOut = {0}; + _tcsncpy(fileDataOut.fileName, filepathDst, lstrlen(filepathDst) + 1); + fileDataOut.bWritable = TRUE; + fileDataOut.dwOpenFlags = CREATE_ALWAYS; + fileDataOut.dwSize = nDstSize + nSizeBOM; + bSuccess = files_openFileMapped(&fileDataOut); + + // second pass : write the file + if (bSuccess) + { + // write BOM + if (bWriteBOM) + ucr::writeBom(fileDataOut.pMapBase, ucr::UTF8); + + // write data + WideCharToMultiByte(CP_UTF8, flags, (pszBuf + nSizeOldBOM), nchars, + ((char*)fileDataOut.pMapBase+nSizeBOM), fileDataOut.dwSize-nSizeBOM, NULL, NULL); + files_closeFileMapped(&fileDataOut, fileDataOut.dwSize, FALSE); + } files_closeFileMapped(&fileDataIn, 0xFFFFFFFF, FALSE); nFileChanged ++; return bSuccess; } +/** + * @brief From UCS-2BE to 8-bit (or UTF-8) + * + * (No other file conversions are done here; + * (UCS-2LE is the Windows standard Unicode encoding) + * + * Returns FALSE if file is Unicode but opening it fails. + * Returns FALSE if file has Unicode BOM but is not Ansi. + * Returns TRUE if file is not Unicode, or if converted file successfully. + */ +BOOL UCS2BEToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM) +{ + UniMemFile ufile; + if (!ufile.OpenReadOnly(filepath)) + return FALSE; // error + if (!ufile.IsUnicode()) + { + // Finished with examing file contents + ufile.Close(); + return FALSE; // no ansi file + } + ucr::UNICODESET unicoding = ufile.GetUnicoding(); //ucr::UCS2LE + // Finished with examing file contents + ufile.Close(); + // UCS-2BE to 8-bit (or UTF-8) + if (unicoding != ucr::UCS2BE) + return FALSE; + + // Init filedataIn struct and open file as memory mapped (input) + BOOL bSuccess; + MAPPEDFILEDATA fileDataIn = {0}; + _tcsncpy(fileDataIn.fileName, filepath, MAX_PATH); + fileDataIn.bWritable = FALSE; + fileDataIn.dwOpenFlags = OPEN_EXISTING; + bSuccess = files_openFileMapped(&fileDataIn); + if (!bSuccess) + return FALSE; + + char * pszBuf = (char *)fileDataIn.pMapBase; + UINT nBufSize = fileDataIn.dwSize; + + // first pass : get the size of the destination file + UINT nSizeOldBOM = 2; + UINT nchars = (nBufSize - nSizeOldBOM) / sizeof(wchar_t); + + UINT nSizeBOM = (bWriteBOM) ? 3 : 0; + DWORD flags =0; + UINT nDstSize; + char *szTemp = new char[nDstSize]; + + // simple byte swap BE->LE + for (int i = 0; i < nDstSize * 2; i += 2) + { + // Byte-swap into destination + szTemp[i] = pszBuf[i + 1]; + szTemp[i + 1] = pszBuf[i]; + } + + //now convert to unicode UTF8 + nDstSize = WideCharToMultiByte(CP_UTF8, flags,(wchar_t *)(szTemp + nSizeOldBOM), nchars, NULL, 0, NULL, NULL); + + // create the destination file + MAPPEDFILEDATA fileDataOut = {0}; + _tcsncpy(fileDataOut.fileName, filepathDst, lstrlen(filepathDst) + 1); + fileDataOut.bWritable = TRUE; + fileDataOut.dwOpenFlags = CREATE_ALWAYS; + fileDataOut.dwSize = nDstSize + nSizeBOM; + bSuccess = files_openFileMapped(&fileDataOut); + + // second pass : write the file + if (bSuccess) + { + // write BOM + if (bWriteBOM) + ucr::writeBom(fileDataOut.pMapBase, ucr::UTF8); + + // write data + WideCharToMultiByte(CP_UTF8, flags,(wchar_t *)(szTemp + nSizeOldBOM), nchars, + ((char*)fileDataOut.pMapBase+nSizeBOM), fileDataOut.dwSize-nSizeBOM, NULL, NULL); + files_closeFileMapped(&fileDataOut, fileDataOut.dwSize, FALSE); + } + delete [] szTemp; + files_closeFileMapped(&fileDataIn, 0xFFFFFFFF, FALSE); + + nFileChanged++; + return bSuccess; +} Modified: trunk/Src/Common/multiformatText.h =================================================================== --- trunk/Src/Common/multiformatText.h 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/Common/multiformatText.h 2009-02-10 19:00:27 UTC (rev 6433) @@ -132,7 +132,12 @@ /// Convert any unicode file to UCS-2LE BOOL UnicodeFileToOlechar(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged); /// Convert UCS-2LE file to UTF-8 (for diffutils) -BOOL OlecharToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM); +BOOL UCS2LEToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM); +/// Convert UCS-2BE file to UTF-8 (for diffutils) +BOOL UCS2BEToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM); +/// Convert Ansi file to UTF-8 (for diffutils) +BOOL AnsiToUTF8(LPCTSTR filepath, LPCTSTR filepathDst, int & nFileChanged, BOOL bWriteBOM); + #endif //__MULTIFORMATTEXT_H__ \ No newline at end of file Modified: trunk/Src/Common/unicoder.cpp =================================================================== --- trunk/Src/Common/unicoder.cpp 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/Common/unicoder.cpp 2009-02-10 19:00:27 UTC (rev 6433) @@ -697,6 +697,11 @@ * @param [in] size Size of the buffer. * @param [out] pBom Returns true if buffer had BOM bytes, false otherwise. * @return One of UNICODESET values as encoding. + * EF BB BF UTF-8 + * FF FE UTF-16, little endian + * FE FF UTF-16, big endian + * FF FE 00 00 UTF-32, little endian + * 00 00 FE FF UTF-32, big-endian */ UNICODESET DetermineEncoding(unsigned char* pBuffer, int size, bool * pBom) { @@ -707,12 +712,12 @@ { if (pBuffer[0] == 0xFF && pBuffer[1] == 0xFE) { - unicoding = ucr::UCS2LE; + unicoding = ucr::UCS2LE; //UNI little endian *pBom = true; } else if (pBuffer[0] == 0xFE && pBuffer[1] == 0xFF) { - unicoding = ucr::UCS2BE; + unicoding = ucr::UCS2BE; //UNI big endian *pBom = true; } } @@ -724,6 +729,21 @@ *pBom = true; } } + if (size >= 4) + { + if (pBuffer[0] == 0xFF && pBuffer[1] == 0xFE && + pBuffer[2] == 0x00 && pBuffer[3] == 0x00) + { + unicoding = ucr::UCS4LE; //UTF-32, little endian + *pBom = true; + } + else if (pBuffer[0] == 0x00 && pBuffer[1] == 0x00 && + pBuffer[2] == 0xFE && pBuffer[3] == 0xFF) + { + unicoding = ucr::UCS4BE; //UTF-32, big endian + *pBom = true; + } + } // If not any of the above, check if it is UTF-8 without BOM? if (unicoding == ucr::NONE) Modified: trunk/Src/Common/unicoder.h =================================================================== --- trunk/Src/Common/unicoder.h 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/Common/unicoder.h 2009-02-10 19:00:27 UTC (rev 6433) @@ -33,9 +33,11 @@ enum UNICODESET { NONE = 0, /**< No unicode. */ - UCS2LE, /**< UCS-2 little endian. */ - UCS2BE, /**< UCS-2 big endian. */ + UCS2LE, /**< UCS-2 / UTF-16 little endian. */ + UCS2BE, /**< UCS-2 / UTF-16 big endian. */ UTF8, /**< UTF-8. */ + UCS4LE, /**< UTF-32 little endian */ + UCS4BE, /**< UTF-32 big-endian */ }; int Ucs4_to_Utf8(unsigned int unich, unsigned char * utf8); Modified: trunk/Src/DiffFileData.cpp =================================================================== --- trunk/Src/DiffFileData.cpp 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/DiffFileData.cpp 2009-02-10 19:00:27 UTC (rev 6433) @@ -232,7 +232,7 @@ // fourth step : prepare for diffing // may overwrite if we've already copied to temp file BOOL bMayOverwrite = 0 != lstrcmpi(filepathTransformed.c_str(), filepath.c_str()); - if (!FileTransform_UCS2ToUTF8(filepathTransformed, bMayOverwrite)) + if (!FileTransform_ToUTF8(filepathTransformed, bMayOverwrite)) return false; } return true; Modified: trunk/Src/DiffWrapper.cpp =================================================================== --- trunk/Src/DiffWrapper.cpp 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/DiffWrapper.cpp 2009-02-10 19:00:27 UTC (rev 6433) @@ -684,7 +684,7 @@ if (m_bPluginsEnabled) { // Do the preprocessing now, overwrite the temp files - // NOTE: FileTransform_UCS2ToUTF8() may create new temp + // NOTE: FileTransform_ToUTF8() may create new temp // files and return new names, those created temp files // are deleted in end of function. if (m_infoPrediffer->bToBeScanned) @@ -728,12 +728,11 @@ } } - // Comparing UTF-8 files seems to require this conversion? - // I'm still very confused about why, as what the functions - // document doing is UCS2 to UTF-8 conversion, nothing else. - // Something is wrong here. - Kimmo - FileTransform_UCS2ToUTF8(strFile1Temp, m_bPathsAreTemp); - FileTransform_UCS2ToUTF8(strFile2Temp, m_bPathsAreTemp); + // check for both are same (Ansi or UTF8) + // otherwise convert both to UTF8 + // WM is using inside UCS2LE + // Analyze is using UTF8, other unicodes are marked as binary + Transform2FilesToUTF8(strFile1Temp, strFile2Temp, m_bPathsAreTemp); DiffFileData diffdata; diffdata.SetDisplayFilepaths(filepath1.c_str(), filepath2.c_str()); // store true names for diff utils patch file Modified: trunk/Src/FileTransform.cpp =================================================================== --- trunk/Src/FileTransform.cpp 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/FileTransform.cpp 2009-02-10 19:00:27 UTC (rev 6433) @@ -483,7 +483,7 @@ // TODO : is it better with the BOM or without (just change the last argument) int nFileChanged = 0; - BOOL bSuccess = OlecharToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, FALSE); + BOOL bSuccess = UCS2BEToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, FALSE); if (!bSuccess) return FALSE; @@ -579,4 +579,163 @@ return bChanged; } +//////////////////////////////////////////////////////////////////////////////// +// for OLECHAR files, transform to UTF8 for diffutils +// convert all Ansi or unicode-files to UTF8 +// if other file is unicode or uses a different codepage +BOOL FileTransform_ToUTF8(String & filepath, BOOL bMayOverwrite) +{ + BOOL bSuccess = false; + String tempDir = env_GetTempPath(); + if (tempDir.empty()) + return FALSE; + String tempFilepath = env_GetTempFileName(tempDir.c_str(), _T("_WM")); + if (tempFilepath.empty()) + return FALSE; + + int nFileChanged = 0; + + UniMemFile ufile; + if (!ufile.OpenReadOnly(filepath.c_str())) + return FALSE; // error + ufile.IsUnicode(); + ucr::UNICODESET unicoding = ufile.GetUnicoding(); + // Finished with examing file contents + ufile.Close(); + + // TODO : is it better with the BOM or without (just change the last argument) + + switch (unicoding) + { + // AnsiToUTF16 only converts Ascii files to UTF-16 + case ( ucr::NONE): + bSuccess = AnsiToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, false); + break; + case (ucr::UCS2LE): + bSuccess = UCS2LEToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, false); + break; + case (ucr::UCS2BE): + bSuccess = UCS2BEToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, false); + break; + case (ucr::UCS4LE): + bSuccess = FALSE; + break; + case (ucr::UCS4BE): + bSuccess = FALSE; + break; + + } + + if (!bSuccess) + return FALSE; + + if (nFileChanged) + { + // we do not overwrite so we delete the old file + if (bMayOverwrite) + { + if (!::DeleteFile(filepath.c_str())) + { + LogErrorString(Fmt(_T("DeleteFile(%s) failed: %s"), + filepath.c_str(), GetSysError(GetLastError()))); + } + } + // and change the filepath if everything works + filepath = tempFilepath; + } + else + { + if (!::DeleteFile(tempFilepath.c_str())) + { + LogErrorString(Fmt(_T("DeleteFile(%s) failed: %s"), + tempFilepath.c_str(), GetSysError(GetLastError()))); + } + } + return TRUE; +} + +/** + * @brief check for both are same (Ansi or UTF8) + * otherwise convert both to UTF8 + * @param [in,out] filepath Most plugins change this filename + */ +BOOL Transform2FilesToUTF8(String &strFile1Temp, String &strFile2Temp,BOOL m_bPathsAreTemp) +{ + BOOL bSuccess = false; + int nFileChanged = 0; + //check first file for unicodeing + UniMemFile ufile; + if (!ufile.OpenReadOnly(strFile1Temp.c_str())) + return FALSE; // error + ufile.IsUnicode(); + ucr::UNICODESET unicoding1 = ufile.GetUnicoding(); + // Finished with examing file contents + ufile.Close(); + + //check second file for unicodeing + if (!ufile.OpenReadOnly(strFile2Temp.c_str())) + return FALSE; // error + ufile.IsUnicode(); + + ucr::UNICODESET unicoding2 = ufile.GetUnicoding(); + ufile.Close(); + + if ((unicoding1==ucr::NONE)&&(unicoding2==ucr::NONE)) + return TRUE; //OK do nothing both are ansi + if ((unicoding1==ucr::UTF8)&&(unicoding2==ucr::UTF8)) + return TRUE; //OK do nothing both are UTF16 + // now both are different, convert to UTF8 + if (unicoding1!=ucr::UTF8) + FileTransform_ToUTF8(strFile1Temp, m_bPathsAreTemp); + if (unicoding2!=ucr::UTF8) + FileTransform_ToUTF8(strFile2Temp, m_bPathsAreTemp); + return TRUE; + } + +//////////////////////////////////////////////////////////////////////////////// + +// for OLECHAR files, transform to UTF8 for diffutils +// TODO : convert Ansi to UTF8 if other file is unicode or uses a different codepage +BOOL copyToUTF8(String & filepath, String &tempFilepath ,BOOL bMayOverwrite) +{ + BOOL bSuccess = false; + + UniMemFile ufile; + if (!ufile.OpenReadOnly(filepath.c_str())) + return FALSE; // error + ufile.IsUnicode(); + ucr::UNICODESET unicoding = ufile.GetUnicoding(); + // Finished with examing file contents + ufile.Close(); + + int nFileChanged = 0; + + // TODO : is it better with the BOM or without (just change the last argument) + + switch (unicoding) + { + // AnsiToUTF16 only converts Ascii files to UTF-16 + case ( ucr::NONE): + bSuccess = AnsiToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, false); + break; + case (ucr::UCS2LE): + bSuccess = UCS2LEToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, false); + break; + case (ucr::UCS2BE): + bSuccess = UCS2BEToUTF8(filepath.c_str(), tempFilepath.c_str(), nFileChanged, false); + break; + case (ucr::UCS4LE): + bSuccess = FALSE; + break; + case (ucr::UCS4BE): + bSuccess = FALSE; + break; + + } + + if (!bSuccess) + return FALSE; + + return TRUE; +} Modified: trunk/Src/FileTransform.h =================================================================== --- trunk/Src/FileTransform.h 2009-02-08 14:34:23 UTC (rev 6432) +++ trunk/Src/FileTransform.h 2009-02-10 19:00:27 UTC (rev 6433) @@ -82,6 +82,7 @@ // init functions as a valid "do nothing" unpacker bWithFile = FALSE; // and init bAutomatic flag and name according to global variable + bMode = 1; //allways on if (bMode != PLUGIN_AUTO) { pluginName.erase(); @@ -213,23 +214,31 @@ * @param filepath : [in, out] Most plugins change this filename */ BOOL FileTransform_Prediffing(String & filepath, PrediffingInfo handler, BOOL bMayOverwrite); +/** + * @brief check for both are same (Ansi or UTF8) + * otherwise convert both to UTF8 + * @param [in,out] filepath Most plugins change this filename + */ +BOOL Transform2FilesToUTF8(String &strFile1Temp, String &strFile2Temp,BOOL m_bPathsAreTemp); +/** + * @brief Copy a Ansi or UCS2LE to UTF8) + */ +BOOL copyToUTF8(String & filepath, String &tempFilepath ,BOOL bMayOverwrite); /** - * @brief Transform OLECHAR files to UTF8 + * @brief Transform all files to UTF8 aslong possible * * @param filepath : [in,out] path of file to be prepared. This filename is updated if bMayOverwrite is FALSE * @param bMayOverwrite : [in] True only if the filepath points out a temp file * * @return Tells if we can go on with diffutils - * - * @todo Convert Ansi files to UTF8 if other file is unicode or uses a different codepage + * convert all Ansi or unicode-files to UTF8 + * if other file is unicode or uses a different codepage */ -BOOL FileTransform_UCS2ToUTF8(String & filepath, BOOL bMayOverwrite); +BOOL FileTransform_ToUTF8(String & filepath, BOOL bMayOverwrite); - - /** * @brief Get the list of all the free functions in all the scripts for this event : * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-02-10 20:11:11
|
Revision: 6434 http://winmerge.svn.sourceforge.net/winmerge/?rev=6434&view=rev Author: kimmov Date: 2009-02-10 20:11:05 +0000 (Tue, 10 Feb 2009) Log Message: ----------- Improve English in one message as suggested by Hans Eriksson in patch item #2586274. Modified Paths: -------------- trunk/Src/Languages/English.pot trunk/Src/Merge.rc Modified: trunk/Src/Languages/English.pot =================================================================== --- trunk/Src/Languages/English.pot 2009-02-10 19:00:27 UTC (rev 6433) +++ trunk/Src/Languages/English.pot 2009-02-10 20:11:05 UTC (rev 6434) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: WinMerge\n" "Report-Msgid-Bugs-To: http://sourceforge.net/tracker/?group_id=13216&atid=113216\n" -"POT-Creation-Date: 2009-01-15 20:39+0000\n" +"POT-Creation-Date: 2009-02-10 22:08+0000\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: English <win...@li...>\n" @@ -3573,7 +3573,7 @@ #: Merge.rc:2159 #, c-format -msgid "The file\n%1\ndisappeared. Please save a copy of the file to continue." +msgid "The file\n%1\nhas disappeared. Please save a copy of the file to continue." msgstr "" #: Merge.rc:2165 Modified: trunk/Src/Merge.rc =================================================================== --- trunk/Src/Merge.rc 2009-02-10 19:00:27 UTC (rev 6433) +++ trunk/Src/Merge.rc 2009-02-10 20:11:05 UTC (rev 6434) @@ -2156,7 +2156,7 @@ IDS_FILECHANGED_RESCAN "Another application has updated file\n%1\nsince WinMerge scanned it last time.\n\nDo you want to reload the file?" IDS_SAVE_LEFT_AS "Save Left File As" IDS_SAVE_RIGHT_AS "Save Right File As" - IDS_FILE_DISAPPEARED "The file\n%1\ndisappeared. Please save a copy of the file to continue." + IDS_FILE_DISAPPEARED "The file\n%1\nhas disappeared. Please save a copy of the file to continue." END // Editing/Merging file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-02-13 18:02:21
|
Revision: 6450 http://winmerge.svn.sourceforge.net/winmerge/?rev=6450&view=rev Author: kimmov Date: 2009-02-13 18:02:12 +0000 (Fri, 13 Feb 2009) Log Message: ----------- Remove the MFC dependency from DirItem.cpp. Modified Paths: -------------- trunk/Src/DirItem.cpp trunk/Src/Merge.vcproj Modified: trunk/Src/DirItem.cpp =================================================================== --- trunk/Src/DirItem.cpp 2009-02-12 18:20:28 UTC (rev 6449) +++ trunk/Src/DirItem.cpp 2009-02-13 18:02:12 UTC (rev 6450) @@ -22,9 +22,10 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "stdafx.h" +#include <windows.h> #include <sys/types.h> #include <sys/stat.h> +#include <tchar.h> #include "UnicodeString.h" #include "coretools.h" #include "DirItem.h" Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-02-12 18:20:28 UTC (rev 6449) +++ trunk/Src/Merge.vcproj 2009-02-13 18:02:12 UTC (rev 6450) @@ -1786,7 +1786,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -1795,6 +1798,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -1804,6 +1810,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -1812,7 +1821,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-02-15 14:08:56
|
Revision: 6457 http://winmerge.svn.sourceforge.net/winmerge/?rev=6457&view=rev Author: kimmov Date: 2009-02-15 14:08:50 +0000 (Sun, 15 Feb 2009) Log Message: ----------- Move some string/char functions from StdAfx.cpp to new string_utils.cpp file. This allows using those functions from non-MFC code. Modified Paths: -------------- trunk/Src/Merge.vcproj trunk/Src/StdAfx.cpp trunk/Src/StdAfx.h trunk/Src/editlib/asp.cpp trunk/Src/editlib/basic.cpp trunk/Src/editlib/batch.cpp trunk/Src/editlib/ccrystaleditview.cpp trunk/Src/editlib/ccrystaltextview.cpp trunk/Src/editlib/ccrystaltextview2.cpp trunk/Src/editlib/cplusplus.cpp trunk/Src/editlib/csharp.cpp trunk/Src/editlib/css.cpp trunk/Src/editlib/dcl.cpp trunk/Src/editlib/fortran.cpp trunk/Src/editlib/html.cpp trunk/Src/editlib/ini.cpp trunk/Src/editlib/innosetup.cpp trunk/Src/editlib/is.cpp trunk/Src/editlib/java.cpp trunk/Src/editlib/lisp.cpp trunk/Src/editlib/nsis.cpp trunk/Src/editlib/pascal.cpp trunk/Src/editlib/perl.cpp trunk/Src/editlib/php.cpp trunk/Src/editlib/po.cpp trunk/Src/editlib/powershell.cpp trunk/Src/editlib/python.cpp trunk/Src/editlib/rexx.cpp trunk/Src/editlib/rsrc.cpp trunk/Src/editlib/ruby.cpp trunk/Src/editlib/sgml.cpp trunk/Src/editlib/sh.cpp trunk/Src/editlib/siod.cpp trunk/Src/editlib/sql.cpp trunk/Src/editlib/tcl.cpp trunk/Src/editlib/tex.cpp trunk/Src/editlib/verilog.cpp trunk/Src/editlib/xml.cpp trunk/Src/stringdiffs.cpp Added Paths: ----------- trunk/Src/Common/string_util.cpp trunk/Src/Common/string_util.h Added: trunk/Src/Common/string_util.cpp =================================================================== --- trunk/Src/Common/string_util.cpp (rev 0) +++ trunk/Src/Common/string_util.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -0,0 +1,61 @@ +/** + * @file string_util.cpp + * + * @brief Char classification routines implementations. + */ +// ID line follows -- this is updated by SVN +// $Id$ + +#include <windows.h> +#include <tchar.h> +#include "string_util.h" + +static wint_t normch(wint_t c); + +// Convert any negative inputs to negative char equivalents +// This is aimed at correcting any chars mistakenly +// sign-extended to negative ints. +// This is ok for the UNICODE build because UCS-2LE code bytes +// do not extend as high as 2Gig (actually even full Unicode +// codepoints don't extend that high). +static wint_t normch(wint_t c) +{ +#ifdef _UNICODE + return (unsigned short)(short)c; +#else + return (unsigned char)(char)c; +#endif +} + +/** @brief Return nonzero if input is outside ASCII or is underline. */ +int xisspecial(wint_t c) +{ + return normch(c) > (unsigned) _T('\x7f') || c == _T('_'); +} + +/** + * @brief Return non-zero if input is alphabetic or "special" (see xisspecial). + * Also converts any negative inputs to negative char equivalents (see normch). + */ +int xisalpha(wint_t c) +{ + return _istalpha(normch(c)) || xisspecial(normch(c)); +} + +/** + * @brief Return non-zero if input is alphanumeric or "special" (see xisspecial). + * Also converts any negative inputs to negative char equivalents (see normch). + */ +int xisalnum(wint_t c) +{ + return _istalnum(normch(c)) || xisspecial(normch(c)); +} + +/** + * @brief Return non-zero if input character is a space. + * Also converts any negative inputs to negative char equivalents (see normch). + */ +int xisspace(wint_t c) +{ + return _istspace(normch(c)); +} Property changes on: trunk/Src/Common/string_util.cpp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/Src/Common/string_util.h =================================================================== --- trunk/Src/Common/string_util.h (rev 0) +++ trunk/Src/Common/string_util.h 2009-02-15 14:08:50 UTC (rev 6457) @@ -0,0 +1,18 @@ +/** + * @file string_util.h + * + * @brief Char classification routines declarations. + */ +// ID line follows -- this is updated by SVN +// $Id$ + +#ifndef _STRING_UTIL_H_ +#define _STRING_UTIL_H_ + +int xisalnum(wint_t c); +int xisspecial(wint_t c); +int xisalpha(wint_t c); +int xisalnum(wint_t c); +int xisspace(wint_t c); + +#endif // _STRING_UTIL_H_ Property changes on: trunk/Src/Common/string_util.h ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/Merge.vcproj 2009-02-15 14:08:50 UTC (rev 6457) @@ -5282,6 +5282,41 @@ </FileConfiguration> </File> <File + RelativePath="Common\string_util.cpp"> + <FileConfiguration + Name="UnicodeRelease|Win32"> + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> + </FileConfiguration> + <FileConfiguration + Name="UnicodeDebug|Win32"> + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> + </FileConfiguration> + </File> + <File RelativePath="stringdiffs.cpp"> <FileConfiguration Name="UnicodeRelease|Win32"> @@ -6485,6 +6520,9 @@ RelativePath="StdAfx.h"> </File> <File + RelativePath="Common\string_util.h"> + </File> + <File RelativePath="stringdiffs.h"> </File> <File Modified: trunk/Src/StdAfx.cpp =================================================================== --- trunk/Src/StdAfx.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/StdAfx.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -29,55 +29,8 @@ #include "LogFile.h" #include "Merge.h" -// Convert any negative inputs to negative char equivalents -// This is aimed at correcting any chars mistakenly -// sign-extended to negative ints. -// This is ok for the UNICODE build because UCS-2LE code bytes -// do not extend as high as 2Gig (actually even full Unicode -// codepoints don't extend that high). -static wint_t normch(wint_t c) -{ -#ifdef _UNICODE - return (unsigned short)(short)c; -#else - return (unsigned char)(char)c; -#endif -} -/** @brief Return nonzero if input is outside ASCII or is underline. */ -int xisspecial (wint_t c) -{ - return normch(c) > (unsigned) _T ('\x7f') || c == _T ('_'); -} - /** - * @brief Return non-zero if input is alphabetic or "special" (see xisspecial). - * Also converts any negative inputs to negative char equivalents (see normch). - */ -int xisalpha (wint_t c) -{ - return _istalpha (normch(c)) || xisspecial (normch(c)); -} - -/** - * @brief Return non-zero if input is alphanumeric or "special" (see xisspecial). - * Also converts any negative inputs to negative char equivalents (see normch). - */ -int xisalnum (wint_t c) -{ - return _istalnum (normch(c)) || xisspecial (normch(c)); -} - -/** - * @brief Return non-zero if input character is a space. - * Also converts any negative inputs to negative char equivalents (see normch). - */ -int xisspace (wint_t c) -{ - return _istspace (normch(c)); -} - -/** * @brief Load string resource and return as CString. * @param [in] id Resource string ID. * @return Resource string as CString. Modified: trunk/Src/StdAfx.h =================================================================== --- trunk/Src/StdAfx.h 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/StdAfx.h 2009-02-15 14:08:50 UTC (rev 6457) @@ -107,13 +107,6 @@ /// Seconds ignored in filetime differences if option enabled static const UINT SmallTimeDiff = 2; -// Miscellaneous functions defined in StdAfx.cpp - -int xisspecial (wint_t c); -int xisalpha (wint_t c); -int xisalnum (wint_t c); -int xisspace (wint_t c); - #include "UnicodeString.h" /** @brief Load string from string resources; shortcut for CString::LoadString */ Modified: trunk/Src/editlib/asp.cpp =================================================================== --- trunk/Src/editlib/asp.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/asp.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/basic.cpp =================================================================== --- trunk/Src/editlib/basic.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/basic.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/batch.cpp =================================================================== --- trunk/Src/editlib/batch.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/batch.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/ccrystaleditview.cpp =================================================================== --- trunk/Src/editlib/ccrystaleditview.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/ccrystaleditview.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -76,6 +76,7 @@ #include "registry.h" #include "cs2cs.h" #include "chcondlg.h" +#include "string_util.h" #ifndef __AFXPRIV_H__ #pragma message("Include <afxpriv.h> in your stdafx.h to avoid this message") Modified: trunk/Src/editlib/ccrystaltextview.cpp =================================================================== --- trunk/Src/editlib/ccrystaltextview.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/ccrystaltextview.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -105,6 +105,7 @@ #include "SyntaxColors.h" #include "Ucs2Utf8.h" #include "unicoder.h" +#include "string_util.h" #include "pcre.h" // Escaped character constants in range 0x80-0xFF are interpreted in current codepage Modified: trunk/Src/editlib/ccrystaltextview2.cpp =================================================================== --- trunk/Src/editlib/ccrystaltextview2.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/ccrystaltextview2.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -49,6 +49,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include <malloc.h> +#include "string_util.h" #ifndef __AFXPRIV_H__ #pragma message("Include <afxpriv.h> in your stdafx.h to avoid this message") Modified: trunk/Src/editlib/cplusplus.cpp =================================================================== --- trunk/Src/editlib/cplusplus.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/cplusplus.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -29,6 +29,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/csharp.cpp =================================================================== --- trunk/Src/editlib/csharp.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/csharp.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -29,6 +29,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/css.cpp =================================================================== --- trunk/Src/editlib/css.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/css.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/dcl.cpp =================================================================== --- trunk/Src/editlib/dcl.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/dcl.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/fortran.cpp =================================================================== --- trunk/Src/editlib/fortran.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/fortran.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/html.cpp =================================================================== --- trunk/Src/editlib/html.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/html.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/ini.cpp =================================================================== --- trunk/Src/editlib/ini.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/ini.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -19,6 +19,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/innosetup.cpp =================================================================== --- trunk/Src/editlib/innosetup.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/innosetup.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/is.cpp =================================================================== --- trunk/Src/editlib/is.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/is.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -29,6 +29,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/java.cpp =================================================================== --- trunk/Src/editlib/java.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/java.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/lisp.cpp =================================================================== --- trunk/Src/editlib/lisp.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/lisp.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/nsis.cpp =================================================================== --- trunk/Src/editlib/nsis.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/nsis.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -29,6 +29,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/pascal.cpp =================================================================== --- trunk/Src/editlib/pascal.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/pascal.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/perl.cpp =================================================================== --- trunk/Src/editlib/perl.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/perl.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/php.cpp =================================================================== --- trunk/Src/editlib/php.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/php.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/po.cpp =================================================================== --- trunk/Src/editlib/po.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/po.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -19,6 +19,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/powershell.cpp =================================================================== --- trunk/Src/editlib/powershell.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/powershell.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/python.cpp =================================================================== --- trunk/Src/editlib/python.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/python.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/rexx.cpp =================================================================== --- trunk/Src/editlib/rexx.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/rexx.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/rsrc.cpp =================================================================== --- trunk/Src/editlib/rsrc.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/rsrc.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/ruby.cpp =================================================================== --- trunk/Src/editlib/ruby.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/ruby.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/sgml.cpp =================================================================== --- trunk/Src/editlib/sgml.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/sgml.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/sh.cpp =================================================================== --- trunk/Src/editlib/sh.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/sh.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/siod.cpp =================================================================== --- trunk/Src/editlib/siod.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/siod.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/sql.cpp =================================================================== --- trunk/Src/editlib/sql.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/sql.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/tcl.cpp =================================================================== --- trunk/Src/editlib/tcl.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/tcl.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/tex.cpp =================================================================== --- trunk/Src/editlib/tex.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/tex.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/verilog.cpp =================================================================== --- trunk/Src/editlib/verilog.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/verilog.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -18,6 +18,7 @@ #include "ccrystaltextview.h" #include "ccrystaltextbuffer.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/editlib/xml.cpp =================================================================== --- trunk/Src/editlib/xml.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/editlib/xml.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -17,6 +17,7 @@ #include "StdAfx.h" #include "ccrystaltextview.h" #include "SyntaxColors.h" +#include "string_util.h" #ifdef _DEBUG #define new DEBUG_NEW Modified: trunk/Src/stringdiffs.cpp =================================================================== --- trunk/Src/stringdiffs.cpp 2009-02-15 13:08:28 UTC (rev 6456) +++ trunk/Src/stringdiffs.cpp 2009-02-15 14:08:50 UTC (rev 6457) @@ -9,7 +9,7 @@ #include "StdAfx.h" #include <mbctype.h> - +#include "string_util.h" #include "stringdiffs.h" #include "CompareOptions.h" #include "stringdiffsi.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ki...@us...> - 2009-02-15 14:29:05
|
Revision: 6458 http://winmerge.svn.sourceforge.net/winmerge/?rev=6458&view=rev Author: kimmov Date: 2009-02-15 14:29:04 +0000 (Sun, 15 Feb 2009) Log Message: ----------- Remove MFC dependency from stringdiffs. Modified Paths: -------------- trunk/Src/Merge.vcproj trunk/Src/stringdiffs.cpp Modified: trunk/Src/Merge.vcproj =================================================================== --- trunk/Src/Merge.vcproj 2009-02-15 14:08:50 UTC (rev 6457) +++ trunk/Src/Merge.vcproj 2009-02-15 14:29:04 UTC (rev 6458) @@ -5324,7 +5324,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> <FileConfiguration Name="UnicodeDebug|Win32"> @@ -5333,6 +5336,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -5342,6 +5348,9 @@ Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile="" BrowseInformation="1"/> </FileConfiguration> <FileConfiguration @@ -5350,7 +5359,10 @@ Name="VCCLCompilerTool" Optimization="1" AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> + PreprocessorDefinitions="" + UsePrecompiledHeader="0" + PrecompiledHeaderThrough="" + PrecompiledHeaderFile=""/> </FileConfiguration> </File> <File Modified: trunk/Src/stringdiffs.cpp =================================================================== --- trunk/Src/stringdiffs.cpp 2009-02-15 14:08:50 UTC (rev 6457) +++ trunk/Src/stringdiffs.cpp 2009-02-15 14:29:04 UTC (rev 6458) @@ -7,19 +7,15 @@ // ID line follows -- this is updated by SVN // $Id$ -#include "StdAfx.h" +#include <windows.h> +#include <tchar.h> +#include <assert.h> #include <mbctype.h> #include "string_util.h" #include "stringdiffs.h" #include "CompareOptions.h" #include "stringdiffsi.h" -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - using std::vector; static bool isSafeWhitespace(TCHAR ch); @@ -407,7 +403,7 @@ if (!skipIt) { // Should never have a pair where both are missing - ASSERT(m_wdiffs[i]->start[0]>=0 || m_wdiffs[i]->start[1]>=0); + assert(m_wdiffs[i]->start[0]>=0 || m_wdiffs[i]->start[1]>=0); // Store the diff[i] in the caller list (m_pDiffs) wdiff *dr = new wdiff(*m_wdiffs[i]); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |