From e652b30e0c0f8a9a3e9266a8b466625f13930e30 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Wed, 11 Dec 2024 08:58:20 +0900 Subject: [PATCH 01/23] WIP --- Src/CompareOptions.cpp | 2 + Src/CompareOptions.h | 2 + Src/MainFrm.cpp | 14 ++ Src/MainFrm.h | 2 + Src/Merge.rc | 18 +- Src/OpenView.cpp | 23 +++ Src/OpenView.h | 3 + Src/OptionsDef.h | 1 + Src/OptionsDiffOptions.cpp | 3 + Src/ProjectFile.cpp | 135 +++++-------- Src/ProjectFile.h | 179 ++++++++++-------- Src/PropCompare.cpp | 5 + Src/PropCompare.h | 1 + Src/resource.h | 29 +-- .../Dir1/ignore_eof_1crlf_2crlf_3crlf.txt | 2 + .../Dir1/ignore_eof_1crlf_2crlf_3lf.txt | 2 + .../Dir1/ignore_eof_1crlf_2crlf_3noeol.txt | 2 + .../Dir1/ignore_eof_1crlf_2lf_3crlf.txt | 2 + .../Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt | 2 + .../Dir1/ignore_eof_1crlf_2lf_3noeol.txt | 2 + .../Dir1/ignore_eof_1crlf_2noeol_3crlf.txt | 2 + .../Dir1/ignore_eof_1crlf_2noeol_3lf.txt | 2 + .../Dir1/ignore_eof_1crlf_2noeol_3noeol.txt | 2 + .../Dir1/ignore_eof_1lf_2crlf_3crlf.txt | 2 + .../Compare/Dir1/ignore_eof_1lf_2crlf_3lf.txt | 2 + .../Dir1/ignore_eof_1lf_2crlf_3noeol.txt | 2 + .../Compare/Dir1/ignore_eof_1lf_2lf_3crlf.txt | 2 + .../Compare/Dir1/ignore_eof_1lf_2lf_3lf.txt | 2 + .../Dir1/ignore_eof_1lf_2lf_3noeol.txt | 2 + .../Dir1/ignore_eof_1lf_2noeol_3crlf.txt | 2 + .../Dir1/ignore_eof_1lf_2noeol_3lf.txt | 2 + .../Dir1/ignore_eof_1lf_2noeol_3noeol.txt | 2 + .../Dir1/ignore_eof_1noeol_2crlf_3crlf.txt | 2 + .../Dir1/ignore_eof_1noeol_2crlf_3lf.txt | 2 + .../Dir1/ignore_eof_1noeol_2crlf_3noeol.txt | 2 + .../Dir1/ignore_eof_1noeol_2lf_3crlf.txt | 2 + .../Dir1/ignore_eof_1noeol_2lf_3lf.txt | 2 + .../Dir1/ignore_eof_1noeol_2lf_3noeol.txt | 2 + .../Dir1/ignore_eof_1noeol_2noeol_3crlf.txt | 2 + .../Dir1/ignore_eof_1noeol_2noeol_3lf.txt | 2 + .../Dir1/ignore_eof_1noeol_2noeol_3noeol.txt | 2 + .../Dir2/ignore_eof_1crlf_2crlf_3crlf.txt | 2 + .../Dir2/ignore_eof_1crlf_2crlf_3lf.txt | 2 + .../Dir2/ignore_eof_1crlf_2crlf_3noeol.txt | 2 + .../Dir2/ignore_eof_1crlf_2lf_3crlf.txt | 2 + .../Compare/Dir2/ignore_eof_1crlf_2lf_3lf.txt | 2 + .../Dir2/ignore_eof_1crlf_2lf_3noeol.txt | 2 + .../Dir2/ignore_eof_1crlf_2noeol_3crlf.txt | 2 + .../Dir2/ignore_eof_1crlf_2noeol_3lf.txt | 2 + .../Dir2/ignore_eof_1crlf_2noeol_3noeol.txt | 2 + .../Dir2/ignore_eof_1lf_2crlf_3crlf.txt | 2 + .../Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt | 2 + .../Dir2/ignore_eof_1lf_2crlf_3noeol.txt | 2 + .../Compare/Dir2/ignore_eof_1lf_2lf_3crlf.txt | 2 + .../Compare/Dir2/ignore_eof_1lf_2lf_3lf.txt | 2 + .../Dir2/ignore_eof_1lf_2lf_3noeol.txt | 2 + .../Dir2/ignore_eof_1lf_2noeol_3crlf.txt | 2 + .../Dir2/ignore_eof_1lf_2noeol_3lf.txt | 2 + .../Dir2/ignore_eof_1lf_2noeol_3noeol.txt | 2 + .../Dir2/ignore_eof_1noeol_2crlf_3crlf.txt | 2 + .../Dir2/ignore_eof_1noeol_2crlf_3lf.txt | 2 + .../Dir2/ignore_eof_1noeol_2crlf_3noeol.txt | 2 + .../Dir2/ignore_eof_1noeol_2lf_3crlf.txt | 2 + .../Dir2/ignore_eof_1noeol_2lf_3lf.txt | 2 + .../Dir2/ignore_eof_1noeol_2lf_3noeol.txt | 2 + .../Dir2/ignore_eof_1noeol_2noeol_3crlf.txt | 2 + .../Dir2/ignore_eof_1noeol_2noeol_3lf.txt | 2 + .../Dir2/ignore_eof_1noeol_2noeol_3noeol.txt | 2 + .../Dir3/ignore_eof_1crlf_2crlf_3crlf.txt | 2 + .../Dir3/ignore_eof_1crlf_2crlf_3lf.txt | 2 + .../Dir3/ignore_eof_1crlf_2crlf_3noeol.txt | 2 + .../Dir3/ignore_eof_1crlf_2lf_3crlf.txt | 2 + .../Compare/Dir3/ignore_eof_1crlf_2lf_3lf.txt | 2 + .../Dir3/ignore_eof_1crlf_2lf_3noeol.txt | 2 + .../Dir3/ignore_eof_1crlf_2noeol_3crlf.txt | 2 + .../Dir3/ignore_eof_1crlf_2noeol_3lf.txt | 2 + .../Dir3/ignore_eof_1crlf_2noeol_3noeol.txt | 2 + .../Dir3/ignore_eof_1lf_2crlf_3crlf.txt | 2 + .../Compare/Dir3/ignore_eof_1lf_2crlf_3lf.txt | 2 + .../Dir3/ignore_eof_1lf_2crlf_3noeol.txt | 2 + .../Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt | 2 + .../Compare/Dir3/ignore_eof_1lf_2lf_3lf.txt | 2 + .../Dir3/ignore_eof_1lf_2lf_3noeol.txt | 2 + .../Dir3/ignore_eof_1lf_2noeol_3crlf.txt | 2 + .../Dir3/ignore_eof_1lf_2noeol_3lf.txt | 2 + .../Dir3/ignore_eof_1lf_2noeol_3noeol.txt | 2 + .../Dir3/ignore_eof_1noeol_2crlf_3crlf.txt | 2 + .../Dir3/ignore_eof_1noeol_2crlf_3lf.txt | 2 + .../Dir3/ignore_eof_1noeol_2crlf_3noeol.txt | 2 + .../Dir3/ignore_eof_1noeol_2lf_3crlf.txt | 2 + .../Dir3/ignore_eof_1noeol_2lf_3lf.txt | 2 + .../Dir3/ignore_eof_1noeol_2lf_3noeol.txt | 2 + .../Dir3/ignore_eof_1noeol_2noeol_3crlf.txt | 2 + .../Dir3/ignore_eof_1noeol_2noeol_3lf.txt | 2 + .../Dir3/ignore_eof_1noeol_2noeol_3noeol.txt | 2 + Translations/WinMerge/Arabic.po | 3 + Translations/WinMerge/Basque.po | 3 + Translations/WinMerge/Brazilian.po | 3 + Translations/WinMerge/Bulgarian.po | 3 + Translations/WinMerge/Catalan.po | 3 + Translations/WinMerge/ChineseSimplified.po | 3 + Translations/WinMerge/ChineseTraditional.po | 3 + Translations/WinMerge/Corsican.po | 3 + Translations/WinMerge/Croatian.po | 3 + Translations/WinMerge/Czech.po | 3 + Translations/WinMerge/Danish.po | 3 + Translations/WinMerge/Dutch.po | 3 + Translations/WinMerge/English.pot | 5 +- Translations/WinMerge/Finnish.po | 3 + Translations/WinMerge/French.po | 3 + Translations/WinMerge/Galician.po | 3 + Translations/WinMerge/German.po | 3 + Translations/WinMerge/Greek.po | 3 + Translations/WinMerge/Hungarian.po | 3 + Translations/WinMerge/Italian.po | 3 + Translations/WinMerge/Japanese.po | 3 + Translations/WinMerge/Korean.po | 3 + Translations/WinMerge/Lithuanian.po | 3 + Translations/WinMerge/Norwegian.po | 3 + Translations/WinMerge/Persian.po | 3 + Translations/WinMerge/Polish.po | 3 + Translations/WinMerge/Portuguese.po | 3 + Translations/WinMerge/Romanian.po | 3 + Translations/WinMerge/Russian.po | 3 + Translations/WinMerge/Serbian.po | 3 + Translations/WinMerge/Sinhala.po | 3 + Translations/WinMerge/Slovak.po | 3 + Translations/WinMerge/Slovenian.po | 3 + Translations/WinMerge/Spanish.po | 3 + Translations/WinMerge/Swedish.po | 3 + Translations/WinMerge/Tamil.po | 3 + Translations/WinMerge/Turkish.po | 3 + Translations/WinMerge/Ukrainian.po | 3 + 133 files changed, 507 insertions(+), 188 deletions(-) create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt diff --git a/Src/CompareOptions.cpp b/Src/CompareOptions.cpp index 879ded5136e..a218c442acb 100644 --- a/Src/CompareOptions.cpp +++ b/Src/CompareOptions.cpp @@ -20,6 +20,7 @@ CompareOptions::CompareOptions() , m_bIgnoreCase(false) , m_bIgnoreEOLDifference(false) , m_bIgnoreNumbers(false) +, m_bIgnoreEofNewlinePresence(false) { } @@ -95,6 +96,7 @@ void DiffutilsOptions::SetFromDiffOptions(const DIFFOPTIONS & options) CompareOptions::SetFromDiffOptions(options); m_bCompletelyBlankOutIgnoredDiffereneces = options.bCompletelyBlankOutIgnoredChanges; m_filterCommentsLines = options.bFilterCommentsLines; + m_bIgnoreEofNewlinePresence = options.bIgnoreEofNewlinePresence; m_bIndentHeuristic = options.bIndentHeuristic; switch (options.nDiffAlgorithm) { diff --git a/Src/CompareOptions.h b/Src/CompareOptions.h index d35ddc216d2..771f4ff8d12 100644 --- a/Src/CompareOptions.h +++ b/Src/CompareOptions.h @@ -87,6 +87,7 @@ struct DIFFOPTIONS bool bFilterCommentsLines; /**< Ignore Multiline comments differences -option. */ bool bIndentHeuristic; /**< Ident heuristic -option */ bool bCompletelyBlankOutIgnoredChanges; + bool bIgnoreEofNewlinePresence; /**< Ignore EOF newline presence -option. */ }; /** @@ -105,6 +106,7 @@ class CompareOptions bool m_bIgnoreCase; /**< Ignore case differences? */ bool m_bIgnoreNumbers; /**< Ignore number differences? */ bool m_bIgnoreEOLDifference; /**< Ignore EOL style differences? */ + bool m_bIgnoreEofNewlinePresence; /**< Ignore EOF newline presence */ }; /** diff --git a/Src/MainFrm.cpp b/Src/MainFrm.cpp index 656aa52d5cb..a4b7ac41247 100644 --- a/Src/MainFrm.cpp +++ b/Src/MainFrm.cpp @@ -317,6 +317,8 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_IGNORE_CODEPAGE, OnUpdateDiffIgnoreCP) ON_COMMAND(ID_DIFF_OPTIONS_IGNORE_COMMENTS, OnDiffIgnoreComments) ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_IGNORE_COMMENTS, OnUpdateDiffIgnoreComments) + ON_COMMAND(ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnDiffIgnoreEofNewlinePresence) + ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnUpdateDiffIgnoreEofNewlinePresence) ON_COMMAND(ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS, OnIncludeSubfolders) ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS, OnUpdateIncludeSubfolders) ON_COMMAND_RANGE(ID_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS, ID_DIFF_OPTIONS_COMPMETHOD_SIZE, OnCompareMethod) @@ -3217,6 +3219,18 @@ void CMainFrame::OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI) pCmdUI->Enable(); } +void CMainFrame::OnDiffIgnoreEofNewlinePresence() +{ + GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, !GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE)); + ApplyDiffOptions(); +} + +void CMainFrame::OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI) +{ + pCmdUI->SetCheck(GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE)); + pCmdUI->Enable(); +} + void CMainFrame::OnIncludeSubfolders() { GetOptionsMgr()->SaveOption(OPT_CMP_INCLUDE_SUBDIRS, !GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS)); diff --git a/Src/MainFrm.h b/Src/MainFrm.h index 48fca407459..982aed30d64 100644 --- a/Src/MainFrm.h +++ b/Src/MainFrm.h @@ -413,6 +413,8 @@ class CMainFrame : public CMDIFrameWnd afx_msg void OnUpdateDiffIgnoreCP(CCmdUI* pCmdUI); afx_msg void OnDiffIgnoreComments(); afx_msg void OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI); + afx_msg void OnDiffIgnoreEofNewlinePresence(); + afx_msg void OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI); afx_msg void OnIncludeSubfolders(); afx_msg void OnUpdateIncludeSubfolders(CCmdUI* pCmdUI); afx_msg void OnCompareMethod(UINT nID); diff --git a/Src/Merge.rc b/Src/Merge.rc index d31125f4ec0..1d07e49a7f1 100644 --- a/Src/Merge.rc +++ b/Src/Merge.rc @@ -1093,6 +1093,7 @@ BEGIN MENUITEM "Ignore codepage &differences", ID_DIFF_OPTIONS_IGNORE_CODEPAGE MENUITEM "Ignore num&bers", IDC_DIFF_IGNORENUMBERS MENUITEM "Ignore c&omment differences", ID_DIFF_OPTIONS_IGNORE_COMMENTS + MENUITEM "Ignore &end-of-file newline presence", ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE MENUITEM SEPARATOR MENUITEM "&Include subfolders", ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS POPUP "&Compare method:" @@ -1123,6 +1124,7 @@ BEGIN MENUITEM "Ignore codepage &differences", ID_PROJECT_DIFF_OPTIONS_IGNORE_CODEPAGE MENUITEM "Ignore num&bers", ID_PROJECT_DIFF_OPTIONS_IGNORE_NUMBERS MENUITEM "Ignore c&omment differences", ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS + MENUITEM "Ignore &end-of-file newline presence", ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE MENUITEM SEPARATOR POPUP "&Compare method:" BEGIN @@ -1952,14 +1954,16 @@ BEGIN CONTROL "Ignore codepage &differences",IDC_CP_SENSITIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,108,269,10 CONTROL "Ignore c&omment differences",IDC_FILTERCOMMENTS_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,120,239,10 - CONTROL "E&nable moved block detection",IDC_MOVED_BLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,132,269,10 - CONTROL "Align &similar lines",IDC_ALIGN_SIMILAR_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,144,269,10 - LTEXT "Diff &algorithm:",IDC_STATIC,7,156,269,10 - COMBOBOX IDC_DIFF_ALGORITHM,6,168,270,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Enable indent &heuristic",IDC_INDENT_HEURISTIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,186,269,10 + CONTROL "Ignore &end-of-file newline presence",IDC_IGNEOFEOL_CHECK, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,132,239,10 + CONTROL "E&nable moved block detection",IDC_MOVED_BLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,144,269,10 + CONTROL "Align &similar lines",IDC_ALIGN_SIMILAR_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,156,269,10 + LTEXT "Diff &algorithm:",IDC_STATIC,7,168,269,10 + COMBOBOX IDC_DIFF_ALGORITHM,6,180,270,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Enable indent &heuristic",IDC_INDENT_HEURISTIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,198,269,10 CONTROL "Completely unhighlight the ignored differences",IDC_COMPLETELY_BLANK_OUT_IGNORED_DIFFERENCES, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,198,269,10 - PUSHBUTTON "Defaults",IDC_COMPARE_DEFAULTS,191,228,88,14 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,210,269,10 + PUSHBUTTON "Defaults",IDC_COMPARE_DEFAULTS,191,240,88,14 END IDD_PROPPAGE_EDITOR DIALOGEX 0, 0, 285, 242 diff --git a/Src/OpenView.cpp b/Src/OpenView.cpp index 752aaa639e2..4b09a8ca46a 100644 --- a/Src/OpenView.cpp +++ b/Src/OpenView.cpp @@ -86,6 +86,8 @@ BEGIN_MESSAGE_MAP(COpenView, CFormView) ON_UPDATE_COMMAND_UI(ID_PROJECT_DIFF_OPTIONS_IGNORE_CODEPAGE, OnUpdateDiffIgnoreCP) ON_COMMAND(ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS, OnDiffIgnoreComments) ON_UPDATE_COMMAND_UI(ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS, OnUpdateDiffIgnoreComments) + ON_COMMAND(ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnDiffIgnoreEofNewlinePresence) + ON_UPDATE_COMMAND_UI(ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnUpdateDiffIgnoreEofNewlinePresence) ON_COMMAND_RANGE(ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS, ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_SIZE, OnCompareMethod) ON_UPDATE_COMMAND_UI_RANGE(ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS, ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_SIZE, OnUpdateCompareMethod) ON_WM_ACTIVATE() @@ -876,6 +878,8 @@ void COpenView::OnLoadProject() m_bIgnoreNumbers = projItem.GetIgnoreNumbers(); if (projItem.HasIgnoreCodepage()) m_bIgnoreCodepage = projItem.GetIgnoreCodepage(); + if (projItem.HasIgnoreEofNewlinePresence()) + m_bIgnoreEofNewlinePresence = projItem.GetIgnoreEofNewlinePresence(); if (projItem.HasFilterCommentsLines()) m_bFilterCommentsLines = projItem.GetFilterCommentsLines(); if (projItem.HasCompareMethod()) @@ -921,6 +925,7 @@ void COpenView::OnSaveProject() projItem.SetSaveIgnoreEol(bSaveCompareOptions); projItem.SetSaveIgnoreNumbers(bSaveCompareOptions); projItem.SetSaveIgnoreCodepage(bSaveCompareOptions); + projItem.SetSaveIgnoreEofNewlinePresence(bSaveCompareOptions); projItem.SetSaveFilterCommentsLines(bSaveCompareOptions); projItem.SetSaveCompareMethod(bSaveCompareOptions); projItem.SetSaveHiddenItems(bSaveHiddenItems); @@ -986,6 +991,7 @@ void COpenView::OnSaveProject() projItem.SetIgnoreEol(m_bIgnoreEol); projItem.SetIgnoreNumbers(m_bIgnoreNumbers); projItem.SetIgnoreCodepage(m_bIgnoreCodepage); + projItem.SetIgnoreEofNewlinePresence(m_bIgnoreEofNewlinePresence); projItem.SetFilterCommentsLines(m_bFilterCommentsLines); projItem.SetCompareMethod(m_nCompareMethod); } @@ -1614,6 +1620,23 @@ void COpenView::OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI) pCmdUI->SetCheck(m_bFilterCommentsLines); } +/** + * @brief Toggle "Ignore EOF newline presence" setting. + */ +void COpenView::OnDiffIgnoreEofNewlinePresence() +{ + m_bIgnoreEofNewlinePresence = !m_bIgnoreEofNewlinePresence; +} + +/** + * @brief Update "Ignore EOF newline presence" state. + * @param [in] pCmdUI UI component to update. + */ +void COpenView::OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI) +{ + pCmdUI->SetCheck(m_bIgnoreEofNewlinePresence); +} + /** * @brief Set "Compare method" setting. * @param [in] nID Menu ID of the selected item diff --git a/Src/OpenView.h b/Src/OpenView.h index d0f1a15444c..455e9d0b229 100644 --- a/Src/OpenView.h +++ b/Src/OpenView.h @@ -90,6 +90,7 @@ class COpenView : public CFormView, public DlgUtils bool m_bIgnoreNumbers; /**< The value of the "Ignore numbers" setting */ bool m_bIgnoreCodepage; /**< The value of the "Ignore codepage differences" setting */ bool m_bFilterCommentsLines; /**< The value of the "Ignore comment differences" setting */ + bool m_bIgnoreEofNewlinePresence; /**< The value of the "Ignore EOF newline presence" setting */ int m_nCompareMethod; /**< The value of the "Compare method" setting */ // Overrides public: @@ -149,6 +150,8 @@ virtual BOOL PreCreateWindow(CREATESTRUCT& cs); afx_msg void OnUpdateDiffIgnoreCP(CCmdUI* pCmdUI); afx_msg void OnDiffIgnoreComments(); afx_msg void OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI); + afx_msg void OnDiffIgnoreEofNewlinePresence(); + afx_msg void OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI); afx_msg void OnCompareMethod(UINT nID); afx_msg void OnUpdateCompareMethod(CCmdUI* pCmdUI); afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); diff --git a/Src/OptionsDef.h b/Src/OptionsDef.h index 45d82cb5018..39af4f28400 100644 --- a/Src/OptionsDef.h +++ b/Src/OptionsDef.h @@ -212,6 +212,7 @@ inline const String OPT_CMP_IGNORE_CASE {_T("Settings/IgnoreCase"s)}; inline const String OPT_CMP_IGNORE_NUMBERS {_T("Settings/IgnoreNumbers"s)}; inline const String OPT_CMP_IGNORE_EOL {_T("Settings/IgnoreEol"s)}; inline const String OPT_CMP_IGNORE_CODEPAGE {_T("Settings/IgnoreCodepage"s)}; +inline const String OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE {_T("Settings/IgnoreEOFNewlinePresence"s)}; inline const String OPT_CMP_METHOD {_T("Settings/CompMethod2"s)}; inline const String OPT_CMP_MOVED_BLOCKS {_T("Settings/MovedBlocks"s)}; inline const String OPT_CMP_ALIGN_SIMILAR_LINES {_T("Settings/MatchSimilarLines"s)}; diff --git a/Src/OptionsDiffOptions.cpp b/Src/OptionsDiffOptions.cpp index bf18f8eb953..e109e307cdc 100644 --- a/Src/OptionsDiffOptions.cpp +++ b/Src/OptionsDiffOptions.cpp @@ -25,6 +25,7 @@ void Init(COptionsMgr *pOptionsMgr) pOptionsMgr->InitOption(OPT_CMP_DIFF_ALGORITHM, (int)0, 0, 4); pOptionsMgr->InitOption(OPT_CMP_INDENT_HEURISTIC, true); pOptionsMgr->InitOption(OPT_CMP_COMPLETELY_BLANK_OUT_IGNORED_CHANGES, false); + pOptionsMgr->InitOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, false); } void Load(const COptionsMgr *pOptionsMgr, DIFFOPTIONS& options) @@ -36,6 +37,7 @@ void Load(const COptionsMgr *pOptionsMgr, DIFFOPTIONS& options) options.bIgnoreCase = pOptionsMgr->GetBool(OPT_CMP_IGNORE_CASE); options.bIgnoreNumbers = pOptionsMgr->GetBool(OPT_CMP_IGNORE_NUMBERS); options.bIgnoreEol = pOptionsMgr->GetBool(OPT_CMP_IGNORE_EOL); + options.bIgnoreEofNewlinePresence = pOptionsMgr->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE); options.bIndentHeuristic = pOptionsMgr->GetBool(OPT_CMP_INDENT_HEURISTIC); options.bCompletelyBlankOutIgnoredChanges = pOptionsMgr->GetBool(OPT_CMP_COMPLETELY_BLANK_OUT_IGNORED_CHANGES); } @@ -49,6 +51,7 @@ void Save(COptionsMgr *pOptionsMgr, const DIFFOPTIONS& options) pOptionsMgr->SaveOption(OPT_CMP_IGNORE_CASE, options.bIgnoreCase); pOptionsMgr->SaveOption(OPT_CMP_IGNORE_NUMBERS, options.bIgnoreNumbers); pOptionsMgr->SaveOption(OPT_CMP_IGNORE_EOL, options.bIgnoreEol); + pOptionsMgr->SaveOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, options.bIgnoreEofNewlinePresence); pOptionsMgr->SaveOption(OPT_CMP_INDENT_HEURISTIC, options.bIndentHeuristic); pOptionsMgr->SaveOption(OPT_CMP_COMPLETELY_BLANK_OUT_IGNORED_CHANGES, options.bCompletelyBlankOutIgnoredChanges); } diff --git a/Src/ProjectFile.cpp b/Src/ProjectFile.cpp index 8a96be5cc97..d13730ead0e 100755 --- a/Src/ProjectFile.cpp +++ b/Src/ProjectFile.cpp @@ -56,6 +56,7 @@ const char Ignore_cr_diff_element_name[] = "ignore-carriage-return-diff"; const char Ignore_numbers_element_name[] = "ignore-numbers"; const char Ignore_codepage_diff_element_name[] = "ignore-codepage-diff"; const char Ignore_comment_diff_element_name[] = "ignore-comment-diff"; +const char Ignore_eof_newline_presence_element_name[] = "ignore-eof-newline-presence"; const char Compare_method_element_name[] = "compare-method"; const char Hidden_list_element_name[] = "hidden-list"; const char Hidden_items_element_name[] = "hidden-item"; @@ -132,28 +133,23 @@ class ProjectFileHandler: public ContentHandler } else if (nodename == Left_desc_element_name) { - currentItem.m_leftDesc += xmlch2tstr(ch + start, length); - currentItem.m_bHasLeftDesc = true; + currentItem.m_leftDesc = currentItem.GetLeftDesc() + xmlch2tstr(ch + start, length); } else if (nodename == Middle_desc_element_name) { - currentItem.m_middleDesc += xmlch2tstr(ch + start, length); - currentItem.m_bHasMiddleDesc = true; + currentItem.m_middleDesc = currentItem.GetMiddleDesc() + xmlch2tstr(ch + start, length); } else if (nodename == Right_desc_element_name) { - currentItem.m_rightDesc += xmlch2tstr(ch + start, length); - currentItem.m_bHasRightDesc = true; + currentItem.m_rightDesc = currentItem.GetRightDesc() + xmlch2tstr(ch + start, length); } else if (nodename == Filter_element_name) { - currentItem.m_filter += xmlch2tstr(ch + start, length); - currentItem.m_bHasFilter = true; + currentItem.m_filter = currentItem.GetFilter() + xmlch2tstr(ch + start, length); } else if (nodename == Subfolders_element_name) { currentItem.m_subfolders = atoi(token.c_str()); - currentItem.m_bHasSubfolders = true; } else if (nodename == Left_ro_element_name) { @@ -169,79 +165,68 @@ class ProjectFileHandler: public ContentHandler } else if (nodename == Unpacker_element_name) { - currentItem.m_unpacker += xmlch2tstr(ch + start, length); - currentItem.m_bHasUnpacker = true; + currentItem.m_unpacker = currentItem.GetUnpacker() + xmlch2tstr(ch + start, length); } else if (nodename == Prediffer_element_name) { - currentItem.m_prediffer += xmlch2tstr(ch + start, length); - currentItem.m_bHasPrediffer = true; + currentItem.m_prediffer = currentItem.GetPrediffer() + xmlch2tstr(ch + start, length); } else if (nodename == Window_type_element_name) { currentItem.m_nWindowType = atoi(token.c_str()); - currentItem.m_bHasWindowType = true; } else if (nodename == Table_delimiter_element_name) { currentItem.m_cTableDelimiter = token.c_str()[0]; - currentItem.m_bHasTableDelimiter = true; } else if (nodename == Table_quote_element_name) { currentItem.m_cTableQuote = token.c_str()[0]; - currentItem.m_bHasTableQuote = true; } else if (nodename == Table_allownewlinesinquotes_element_name) { currentItem.m_bTableAllowNewLinesInQuotes = atoi(token.c_str()); - currentItem.m_bHasTableAllowNewLinesInQuotes = true; } else if (nodename == White_spaces_element_name) { currentItem.m_nIgnoreWhite = atoi(token.c_str()); - currentItem.m_bHasIgnoreWhite = true; } else if (nodename == Ignore_blank_lines_element_name) { currentItem.m_bIgnoreBlankLines = atoi(token.c_str()) != 0; - currentItem.m_bHasIgnoreBlankLines = true; } else if (nodename == Ignore_case_element_name) { currentItem.m_bIgnoreCase = atoi(token.c_str()) != 0; - currentItem.m_bHasIgnoreCase = true; } else if (nodename == Ignore_cr_diff_element_name) { currentItem.m_bIgnoreEol = atoi(token.c_str()) != 0; - currentItem.m_bHasIgnoreEol = true; } else if (nodename == Ignore_numbers_element_name) { currentItem.m_bIgnoreNumbers = atoi(token.c_str()) != 0; - currentItem.m_bHasIgnoreNumbers = true; } else if (nodename == Ignore_codepage_diff_element_name) { currentItem.m_bIgnoreCodepage = atoi(token.c_str()) != 0; - currentItem.m_bHasIgnoreCodepage = true; + } + else if (nodename == Ignore_eof_newline_presence_element_name) + { + currentItem.m_bIgnoreEofNewlinePresence = atoi(token.c_str()) != 0; } else if (nodename == Ignore_comment_diff_element_name) { currentItem.m_bFilterCommentsLines = atoi(token.c_str()) != 0; - currentItem.m_bHasFilterCommentsLines = true; } else if (nodename == Compare_method_element_name) { currentItem.m_nCompareMethod = atoi(token.c_str()); - currentItem.m_bHasCompareMethod = true; } //This nodes are under Hidden_list_element_name else if (nodename == Hidden_items_element_name) { currentItem.m_vSavedHiddenItems.push_back(toTString(token)); - currentItem.m_bHasHiddenItems = true; } } void ignorableWhitespace(const XMLChar ch[], int start, int length) {} @@ -265,42 +250,9 @@ const String ProjectFile::PROJECTFILE_EXT = toTString("WinMerge"); : m_bHasLeft(false) , m_bHasMiddle(false) , m_bHasRight(false) -, m_bHasLeftDesc(false) -, m_bHasMiddleDesc(false) -, m_bHasRightDesc(false) -, m_bHasFilter(false) -, m_bHasSubfolders(false) -, m_bHasUnpacker(false) -, m_bHasPrediffer(false) -, m_subfolders(-1) , m_bLeftReadOnly(false) , m_bMiddleReadOnly(false) , m_bRightReadOnly(false) -, m_bHasWindowType(false) -, m_nWindowType(-1) -, m_bHasTableDelimiter(false) -, m_cTableDelimiter(',') -, m_bHasTableQuote(false) -, m_cTableQuote('\"') -, m_bHasTableAllowNewLinesInQuotes(false) -, m_bTableAllowNewLinesInQuotes(true) -, m_bHasIgnoreWhite(false) -, m_nIgnoreWhite(0) -, m_bHasIgnoreBlankLines(false) -, m_bIgnoreBlankLines(false) -, m_bHasIgnoreCase(false) -, m_bIgnoreCase(false) -, m_bHasIgnoreEol(false) -, m_bIgnoreEol(false) -, m_bHasIgnoreNumbers(false) -, m_bIgnoreNumbers(false) -, m_bHasIgnoreCodepage(false) -, m_bIgnoreCodepage(false) -, m_bHasFilterCommentsLines(false) -, m_bFilterCommentsLines(false) -, m_bHasCompareMethod(false) -, m_nCompareMethod(0) -, m_bHasHiddenItems(false) , m_bSaveFilter(true) , m_bSaveSubfolders(true) , m_bSaveUnpacker(true) @@ -311,6 +263,7 @@ const String ProjectFile::PROJECTFILE_EXT = toTString("WinMerge"); , m_bSaveIgnoreEol(true) , m_bSaveIgnoreNumbers(true) , m_bSaveIgnoreCodepage(true) +, m_bSaveIgnoreEofNewlinePresence(true) , m_bSaveFilterCommentsLines(true) , m_bSaveCompareMethod(true) , m_bSaveHiddenItems(true) @@ -443,48 +396,52 @@ bool ProjectFile::Save(const String& path) const writeElement(writer, Middle_element_name, toUTF8(item.m_paths.GetMiddle())); if (!item.m_paths.GetRight().empty()) writeElement(writer, Right_element_name, toUTF8(item.m_paths.GetRight())); - if (!item.m_leftDesc.empty()) - writeElement(writer, Left_desc_element_name, toUTF8(item.m_leftDesc)); - if (!item.m_middleDesc.empty()) - writeElement(writer, Middle_desc_element_name, toUTF8(item.m_middleDesc)); - if (!item.m_rightDesc.empty()) - writeElement(writer, Right_desc_element_name, toUTF8(item.m_rightDesc)); - if (item.m_bSaveFilter && !item.m_filter.empty()) - writeElement(writer, Filter_element_name, toUTF8(item.m_filter)); + if (!item.GetLeftDesc().empty()) + writeElement(writer, Left_desc_element_name, toUTF8(item.GetLeftDesc())); + if (!item.GetMiddleDesc().empty()) + writeElement(writer, Middle_desc_element_name, toUTF8(item.GetMiddleDesc())); + if (!item.GetRightDesc().empty()) + writeElement(writer, Right_desc_element_name, toUTF8(item.GetRightDesc())); + if (item.m_bSaveFilter && !item.GetFilter().empty()) + writeElement(writer, Filter_element_name, toUTF8(item.GetFilter())); if (item.m_bSaveSubfolders) - writeElement(writer, Subfolders_element_name, item.m_subfolders != 0 ? "1" : "0"); - writeElement(writer, Left_ro_element_name, item.m_bLeftReadOnly ? "1" : "0"); + writeElement(writer, Subfolders_element_name, item.GetSubfolders() != 0 ? "1" : "0"); + writeElement(writer, Left_ro_element_name, item.GetLeftReadOnly() ? "1" : "0"); if (!item.m_paths.GetMiddle().empty()) - writeElement(writer, Middle_ro_element_name, item.m_bMiddleReadOnly ? "1" : "0"); - writeElement(writer, Right_ro_element_name, item.m_bRightReadOnly ? "1" : "0"); - if (item.m_bSaveUnpacker && !item.m_unpacker.empty()) - writeElement(writer, Unpacker_element_name, toUTF8(item.m_unpacker)); - if (item.m_bSavePrediffer && !item.m_prediffer.empty()) - writeElement(writer, Prediffer_element_name, toUTF8(item.m_prediffer)); - if (item.m_nWindowType != -1) - writeElement(writer, Window_type_element_name, std::to_string(item.m_nWindowType)); - if (item.m_nWindowType == 2 /* table */) + writeElement(writer, Middle_ro_element_name, item.GetMiddleReadOnly() ? "1" : "0"); + writeElement(writer, Right_ro_element_name, item.GetRightReadOnly() ? "1" : "0"); + if (item.m_bSaveUnpacker && !item.GetUnpacker().empty()) + writeElement(writer, Unpacker_element_name, toUTF8(item.GetUnpacker())); + if (item.m_bSavePrediffer && !item.GetPrediffer().empty()) + writeElement(writer, Prediffer_element_name, toUTF8(item.GetPrediffer())); + if (item.GetWindowType() != -1) + writeElement(writer, Window_type_element_name, std::to_string(item.GetWindowType())); + if (item.GetWindowType() == 2 /* table */) { - writeElement(writer, Table_delimiter_element_name, toUTF8(String(&item.m_cTableDelimiter, 1))); - writeElement(writer, Table_quote_element_name, toUTF8(String(&item.m_cTableQuote, 1))); - writeElement(writer, Table_allownewlinesinquotes_element_name, item.m_bTableAllowNewLinesInQuotes ? "1" : "0"); + const tchar_t delim = item.GetTableDelimiter(); + const tchar_t quote = item.GetTableQuote(); + writeElement(writer, Table_delimiter_element_name, toUTF8(String(&delim, 1))); + writeElement(writer, Table_quote_element_name, toUTF8(String("e, 1))); + writeElement(writer, Table_allownewlinesinquotes_element_name, item.GetTableAllowNewLinesInQuotes() ? "1" : "0"); } if (item.m_bSaveIgnoreWhite) - writeElement(writer, White_spaces_element_name, std::to_string(item.m_nIgnoreWhite)); + writeElement(writer, White_spaces_element_name, std::to_string(item.GetIgnoreWhite())); if (item.m_bSaveIgnoreBlankLines) - writeElement(writer, Ignore_blank_lines_element_name, item.m_bIgnoreBlankLines ? "1" : "0"); + writeElement(writer, Ignore_blank_lines_element_name, item.GetIgnoreBlankLines() ? "1" : "0"); if (item.m_bSaveIgnoreCase) - writeElement(writer, Ignore_case_element_name, item.m_bIgnoreCase ? "1" : "0"); + writeElement(writer, Ignore_case_element_name, item.GetIgnoreCase() ? "1" : "0"); if (item.m_bSaveIgnoreEol) - writeElement(writer, Ignore_cr_diff_element_name, item.m_bIgnoreEol ? "1" : "0"); + writeElement(writer, Ignore_cr_diff_element_name, item.GetIgnoreEol() ? "1" : "0"); if (item.m_bSaveIgnoreNumbers) - writeElement(writer, Ignore_numbers_element_name, item.m_bIgnoreNumbers ? "1" : "0"); + writeElement(writer, Ignore_numbers_element_name, item.GetIgnoreNumbers() ? "1" : "0"); if (item.m_bSaveIgnoreCodepage) - writeElement(writer, Ignore_codepage_diff_element_name, item.m_bIgnoreCodepage ? "1" : "0"); + writeElement(writer, Ignore_codepage_diff_element_name, item.GetIgnoreCodepage() ? "1" : "0"); + if (item.m_bSaveIgnoreEofNewlinePresence) + writeElement(writer, Ignore_eof_newline_presence_element_name, item.GetIgnoreEofNewlinePresence() ? "1" : "0"); if (item.m_bSaveFilterCommentsLines) - writeElement(writer, Ignore_comment_diff_element_name, item.m_bFilterCommentsLines ? "1" : "0"); + writeElement(writer, Ignore_comment_diff_element_name, item.GetFilterCommentsLines() ? "1" : "0"); if (item.m_bSaveCompareMethod) - writeElement(writer, Compare_method_element_name, std::to_string(item.m_nCompareMethod)); + writeElement(writer, Compare_method_element_name, std::to_string(item.GetCompareMethod())); if (item.m_bSaveHiddenItems && item.m_vSavedHiddenItems.size() > 0) saveHiddenItems(writer, item.m_vSavedHiddenItems); } diff --git a/Src/ProjectFile.h b/Src/ProjectFile.h index c5fcd8781cc..8fe913dea8f 100755 --- a/Src/ProjectFile.h +++ b/Src/ProjectFile.h @@ -8,6 +8,7 @@ #include "UnicodeString.h" #include "PathContext.h" +#include class ProjectFileItem { @@ -35,6 +36,7 @@ class ProjectFileItem bool HasIgnoreEol() const; bool HasIgnoreNumbers() const; bool HasIgnoreCodepage() const; + bool HasIgnoreEofNewlinePresence() const; bool HasFilterCommentsLines() const; bool HasCompareMethod() const; bool HasHiddenItems() const; @@ -62,6 +64,7 @@ class ProjectFileItem bool GetIgnoreEol() const; bool GetIgnoreNumbers() const; bool GetIgnoreCodepage() const; + bool GetIgnoreEofNewlinePresence() const; bool GetFilterCommentsLines() const; int GetCompareMethod() const; const std::vector& GetHiddenItems() const; @@ -86,6 +89,7 @@ class ProjectFileItem void SetIgnoreEol(bool bIgnoreEol); void SetIgnoreNumbers(bool bIgnoreNumbers); void SetIgnoreCodepage(bool bIgnoreCodepage); + void SetIgnoreEofNewlinePresence(bool bIgnoreEofNewlinePresence); void SetFilterCommentsLines(bool bFilterCommentsLines); void SetCompareMethod(int nCompareMethod); void SetHiddenItems(const std::vector& hiddenItems); @@ -103,6 +107,7 @@ class ProjectFileItem void SetSaveIgnoreEol(bool bSaveIgnoreEol); void SetSaveIgnoreNumbers(bool bSaveIgnoreNumbers); void SetSaveIgnoreCodepage(bool bSaveIgnoreCodepage); + void SetSaveIgnoreEofNewlinePresence(bool bSaveIgnoreEofNewlinePresence); void SetSaveFilterCommentsLines(bool bSaveFilterCommentsLines); void SetSaveCompareMethod(bool bSaveCompareMethod); void SetSaveHiddenItems(bool bSaveHiddenItems); @@ -112,48 +117,29 @@ class ProjectFileItem bool m_bHasLeft; /**< Has left path? */ bool m_bHasMiddle; /**< Has middle path? */ bool m_bHasRight; /**< Has right path? */ - String m_leftDesc; - String m_middleDesc; - String m_rightDesc; - bool m_bHasLeftDesc; /**< Has left description? */ - bool m_bHasMiddleDesc; /**< Has middle description? */ - bool m_bHasRightDesc; /**< Has right description? */ - bool m_bHasFilter; /**< Has filter? */ - String m_filter; /**< Filter name or mask */ - bool m_bHasSubfolders; /**< Has subfolders? */ - int m_subfolders; /**< Are subfolders included (recursive scan) */ + std::optional m_leftDesc; + std::optional m_middleDesc; + std::optional m_rightDesc; + std::optional m_filter; /**< Filter name or mask */ + std::optional m_subfolders; /**< Are subfolders included (recursive scan) */ bool m_bLeftReadOnly; /**< Is left path opened as read-only */ bool m_bMiddleReadOnly; /**< Is middle path opened as read-only */ bool m_bRightReadOnly; /**< Is right path opened as read-only */ - bool m_bHasUnpacker; /**< Has unpacker? */ - String m_unpacker; /**< Unpacker name or pipeline */ - bool m_bHasPrediffer; /**< Has prediffer? */ - String m_prediffer; /**< Prediffer name or pipeline */ - bool m_bHasWindowType; /**< Has window type? */ - int m_nWindowType; /**< The value of the window type */ - tchar_t m_cTableDelimiter; - bool m_bHasTableDelimiter; /**< Has table delimiter? */ - tchar_t m_cTableQuote; - bool m_bHasTableQuote; /**< Has table quote? */ - bool m_bTableAllowNewLinesInQuotes; - bool m_bHasTableAllowNewLinesInQuotes; /**< Has table allow new lines in quotes? */ - bool m_bHasIgnoreWhite; /**< Has "Whitespaces" setting? */ - int m_nIgnoreWhite; /**< The value of the "Whitespaces" setting */ - bool m_bHasIgnoreBlankLines; /**< Has "Ignore blank lines" setting? */ - bool m_bIgnoreBlankLines; /**< The value of the "Ignore blank lines" setting */ - bool m_bHasIgnoreCase; /**< Has "Ignore case" setting? */ - bool m_bIgnoreCase; /**< The value of the "Ignore case" setting */ - bool m_bHasIgnoreEol; /**< Has "Ignore carriage return differences" setting? */ - bool m_bIgnoreEol; /**< The value of the "Ignore carriage return differences" setting */ - bool m_bHasIgnoreNumbers; /**< Has "Ignore numbers" setting? */ - bool m_bIgnoreNumbers; /**< The value of the "Ignore numbers" setting */ - bool m_bHasIgnoreCodepage; /**< Has "Ignore codepage differences" setting? */ - bool m_bIgnoreCodepage; /**< The value of the "Ignore codepage differences" setting */ - bool m_bHasFilterCommentsLines; /**< Has "Ignore comment differences" setting? */ - bool m_bFilterCommentsLines; /**< The value of the "Ignore comment differences" setting */ - bool m_bHasCompareMethod; /**< Has "Compare method" setting? */ - int m_nCompareMethod; /**< The value of the "Compare method" setting */ - bool m_bHasHiddenItems; /**< Has "Hidden items" setting? */ + std::optional m_unpacker; /**< Unpacker name or pipeline */ + std::optional m_prediffer; /**< Prediffer name or pipeline */ + std::optional m_nWindowType; /**< The value of the window type */ + std::optional m_cTableDelimiter; + std::optional m_cTableQuote; + std::optional m_bTableAllowNewLinesInQuotes; + std::optional m_nIgnoreWhite; /**< The value of the "Whitespaces" setting */ + std::optional m_bIgnoreBlankLines; /**< The value of the "Ignore blank lines" setting */ + std::optional m_bIgnoreCase; /**< The value of the "Ignore case" setting */ + std::optional m_bIgnoreEol; /**< The value of the "Ignore carriage return differences" setting */ + std::optional m_bIgnoreNumbers; /**< The value of the "Ignore numbers" setting */ + std::optional m_bIgnoreCodepage; /**< The value of the "Ignore codepage differences" setting */ + std::optional m_bIgnoreEofNewlinePresence; /**< The value of the "Ignore EOF newline presence" setting */ + std::optional m_bFilterCommentsLines; /**< The value of the "Ignore comment differences" setting */ + std::optional m_nCompareMethod; /**< The value of the "Compare method" setting */ std::vector m_vSavedHiddenItems; /**< The list of hidden items saved */ bool m_bSaveFilter; /**< Save filter? */ bool m_bSaveSubfolders; /**< Save subfolders? */ @@ -165,6 +151,7 @@ class ProjectFileItem bool m_bSaveIgnoreEol; /**< Save "Ignore carriage return differences" setting? */ bool m_bSaveIgnoreNumbers; /**< Save "Ignore numbers" setting? */ bool m_bSaveIgnoreCodepage; /**< Save "Ignore codepage differences" setting? */ + bool m_bSaveIgnoreEofNewlinePresence; /**< Save "Ignore EOF newline presence" setting? */ bool m_bSaveFilterCommentsLines; /**< Save "Ignore comment differences" setting? */ bool m_bSaveCompareMethod; /**< Save "Compare method" setting? */ bool m_bSaveHiddenItems;/* Save "Hidden item" settings?*/ @@ -221,7 +208,7 @@ inline bool ProjectFileItem::HasRight() const */ inline bool ProjectFileItem::HasLeftDesc() const { - return m_bHasLeftDesc; + return m_leftDesc.has_value(); } /** @@ -229,7 +216,7 @@ inline bool ProjectFileItem::HasLeftDesc() const */ inline bool ProjectFileItem::HasMiddleDesc() const { - return m_bHasMiddleDesc; + return m_middleDesc.has_value(); } /** @@ -238,7 +225,7 @@ inline bool ProjectFileItem::HasMiddleDesc() const */ inline bool ProjectFileItem::HasRightDesc() const { - return m_bHasRightDesc; + return m_rightDesc.has_value(); } /** @@ -247,7 +234,7 @@ inline bool ProjectFileItem::HasRightDesc() const */ inline String ProjectFileItem::GetLeftDesc() const { - return m_leftDesc; + return m_leftDesc.value_or(_T("")); } /** @@ -256,7 +243,7 @@ inline String ProjectFileItem::GetLeftDesc() const */ inline String ProjectFileItem::GetMiddleDesc() const { - return m_middleDesc; + return m_middleDesc.value_or(_T("")); } /** @@ -265,7 +252,7 @@ inline String ProjectFileItem::GetMiddleDesc() const */ inline String ProjectFileItem::GetRightDesc() const { - return m_rightDesc; + return m_rightDesc.value_or(_T("")); } /** @@ -301,7 +288,7 @@ inline void ProjectFileItem::SetRightDesc(const String& sDesc) */ inline bool ProjectFileItem::HasFilter() const { - return m_bHasFilter; + return m_filter.has_value(); } /** @@ -310,7 +297,7 @@ inline bool ProjectFileItem::HasFilter() const */ inline bool ProjectFileItem::HasSubfolders() const { - return m_bHasSubfolders; + return m_subfolders.has_value(); } /** @@ -319,7 +306,7 @@ inline bool ProjectFileItem::HasSubfolders() const */ inline bool ProjectFileItem::HasUnpacker() const { - return m_bHasUnpacker; + return m_unpacker.has_value(); } /** @@ -328,7 +315,7 @@ inline bool ProjectFileItem::HasUnpacker() const */ inline bool ProjectFileItem::HasPrediffer() const { - return m_bHasPrediffer; + return m_prediffer.has_value(); } /** @@ -337,7 +324,7 @@ inline bool ProjectFileItem::HasPrediffer() const */ inline bool ProjectFileItem::HasWindowType() const { - return m_bHasWindowType; + return m_nWindowType.has_value(); } /** @@ -346,7 +333,7 @@ inline bool ProjectFileItem::HasWindowType() const */ inline bool ProjectFileItem::HasTableDelimiter() const { - return m_bHasTableDelimiter; + return m_cTableDelimiter.has_value(); } /** @@ -355,7 +342,7 @@ inline bool ProjectFileItem::HasTableDelimiter() const */ inline bool ProjectFileItem::HasTableQuote() const { - return m_bHasTableQuote; + return m_cTableQuote.has_value(); } /** @@ -364,7 +351,7 @@ inline bool ProjectFileItem::HasTableQuote() const */ inline bool ProjectFileItem::HasTableAllowNewLinesInQuotes() const { - return m_bHasTableAllowNewLinesInQuotes; + return m_bTableAllowNewLinesInQuotes.has_value(); } /** @@ -373,7 +360,7 @@ inline bool ProjectFileItem::HasTableAllowNewLinesInQuotes() const */ inline bool ProjectFileItem::HasIgnoreWhite() const { - return m_bHasIgnoreWhite; + return m_nIgnoreWhite.has_value(); } /** @@ -382,7 +369,7 @@ inline bool ProjectFileItem::HasIgnoreWhite() const */ inline bool ProjectFileItem::HasIgnoreBlankLines() const { - return m_bHasIgnoreBlankLines; + return m_bIgnoreBlankLines.has_value(); } /** @@ -391,7 +378,7 @@ inline bool ProjectFileItem::HasIgnoreBlankLines() const */ inline bool ProjectFileItem::HasIgnoreCase() const { - return m_bHasIgnoreCase; + return m_bIgnoreCase.has_value(); } /** @@ -400,7 +387,7 @@ inline bool ProjectFileItem::HasIgnoreCase() const */ inline bool ProjectFileItem::HasIgnoreEol() const { - return m_bHasIgnoreEol; + return m_bIgnoreEol.has_value(); } /** @@ -409,7 +396,7 @@ inline bool ProjectFileItem::HasIgnoreEol() const */ inline bool ProjectFileItem::HasIgnoreNumbers() const { - return m_bHasIgnoreNumbers; + return m_bIgnoreNumbers.has_value(); } /** @@ -418,7 +405,16 @@ inline bool ProjectFileItem::HasIgnoreNumbers() const */ inline bool ProjectFileItem::HasIgnoreCodepage() const { - return m_bHasIgnoreCodepage; + return m_bIgnoreCodepage.has_value(); +} + +/** + * @brief Returns if "Ignore EOF newline presence" setting is defined in projectfile. + * @return true if project file has "Ignore EOF newline presence" setting definition. + */ +inline bool ProjectFileItem::HasIgnoreEofNewlinePresence() const +{ + return m_bIgnoreEofNewlinePresence.has_value(); } /** @@ -427,7 +423,7 @@ inline bool ProjectFileItem::HasIgnoreCodepage() const */ inline bool ProjectFileItem::HasFilterCommentsLines() const { - return m_bHasFilterCommentsLines; + return m_bFilterCommentsLines.has_value(); } /** @@ -436,7 +432,7 @@ inline bool ProjectFileItem::HasFilterCommentsLines() const */ inline bool ProjectFileItem::HasCompareMethod() const { - return m_bHasCompareMethod; + return m_nCompareMethod.has_value(); } /** @@ -445,7 +441,7 @@ inline bool ProjectFileItem::HasCompareMethod() const */ inline bool ProjectFileItem::HasHiddenItems() const { - return m_bHasHiddenItems; + return !m_vSavedHiddenItems.empty(); } /** @@ -480,7 +476,7 @@ inline bool ProjectFileItem::GetRightReadOnly() const */ inline String ProjectFileItem::GetFilter() const { - return m_filter; + return m_filter.value_or(_T("")); } /** @@ -498,7 +494,7 @@ inline void ProjectFileItem::SetFilter(const String& sFilter) */ inline int ProjectFileItem::GetSubfolders() const { - return m_subfolders; + return m_subfolders.value_or(-1); } /** @@ -516,7 +512,7 @@ inline void ProjectFileItem::SetSubfolders(bool bSubfolder) */ inline String ProjectFileItem::GetUnpacker() const { - return m_unpacker; + return m_unpacker.value_or(_T("")); } /** @@ -534,7 +530,7 @@ inline void ProjectFileItem::SetUnpacker(const String& sUnpacker) */ inline String ProjectFileItem::GetPrediffer() const { - return m_prediffer; + return m_prediffer.value_or(_T("")); } /** @@ -552,7 +548,7 @@ inline void ProjectFileItem::SetPrediffer(const String& sPrediffer) */ inline int ProjectFileItem::GetWindowType() const { - return m_nWindowType; + return m_nWindowType.value_or(-1); } /** @@ -570,7 +566,7 @@ inline void ProjectFileItem::SetWindowType(int nWindowType) */ inline tchar_t ProjectFileItem::GetTableDelimiter() const { - return m_cTableDelimiter; + return m_cTableDelimiter.value_or(','); } /** @@ -588,7 +584,7 @@ inline void ProjectFileItem::SetTableDelimiter(tchar_t cTableDelimiter) */ inline tchar_t ProjectFileItem::GetTableQuote() const { - return m_cTableQuote; + return m_cTableQuote.value_or('\"'); } /** @@ -606,7 +602,7 @@ inline void ProjectFileItem::SetTableQuote(tchar_t cTableQuote) */ inline bool ProjectFileItem::GetTableAllowNewLinesInQuotes() const { - return m_bTableAllowNewLinesInQuotes; + return m_bTableAllowNewLinesInQuotes.value_or(true); } /** @@ -624,7 +620,7 @@ inline void ProjectFileItem::SetTableAllowNewLinesInQuotes(bool bTableAllowNewLi */ inline int ProjectFileItem::GetIgnoreWhite() const { - return m_nIgnoreWhite; + return m_nIgnoreWhite.value_or(0); } /** @@ -642,7 +638,7 @@ inline void ProjectFileItem::SetIgnoreWhite(int nIgnoreWhite) */ inline bool ProjectFileItem::GetIgnoreBlankLines() const { - return m_bIgnoreBlankLines; + return m_bIgnoreBlankLines.value_or(false); } /** @@ -660,7 +656,7 @@ inline void ProjectFileItem::SetIgnoreBlankLines(bool bIgnoreBlankLines) */ inline bool ProjectFileItem::GetIgnoreCase() const { - return m_bIgnoreCase; + return m_bIgnoreCase.value_or(false); } /** @@ -678,7 +674,7 @@ inline void ProjectFileItem::SetIgnoreCase(bool bIgnoreCase) */ inline bool ProjectFileItem::GetIgnoreEol() const { - return m_bIgnoreEol; + return m_bIgnoreEol.value_or(false); } /** @@ -696,7 +692,7 @@ inline void ProjectFileItem::SetIgnoreEol(bool bIgnoreEol) */ inline bool ProjectFileItem::GetIgnoreNumbers() const { - return m_bIgnoreNumbers; + return m_bIgnoreNumbers.value_or(false); } /** @@ -714,7 +710,7 @@ inline void ProjectFileItem::SetIgnoreNumbers(bool bIgnoreNumbers) */ inline bool ProjectFileItem::GetIgnoreCodepage() const { - return m_bIgnoreCodepage; + return m_bIgnoreCodepage.value_or(false); } /** @@ -726,13 +722,31 @@ inline void ProjectFileItem::SetIgnoreCodepage(bool bIgnoreCodepage) m_bIgnoreCodepage = bIgnoreCodepage; } +/** + * @brief Returns the value of the "Ignore EOF newline presence" setting. + * @return The value of the "Ignore EOF newline presence" setting + */ +inline bool ProjectFileItem::GetIgnoreEofNewlinePresence() const +{ + return m_bIgnoreEofNewlinePresence.value_or(false); +} + +/** + * @brief Set the value of the "Ignore EOF newline presence" setting. + * @param [in] bIgnoreEofNewlinePresence New value of the "Ignore EOF newline presence" setting to set. + */ +inline void ProjectFileItem::SetIgnoreEofNewlinePresence(bool bIgnoreEofNewlinePresence) +{ + m_bIgnoreEofNewlinePresence = bIgnoreEofNewlinePresence; +} + /** * @brief Returns the value of the "Ignore comment differences" setting. * @return The value of the "Ignore comment differences" setting */ inline bool ProjectFileItem::GetFilterCommentsLines() const { - return m_bFilterCommentsLines; + return m_bFilterCommentsLines.value_or(false); } /** @@ -750,7 +764,7 @@ inline void ProjectFileItem::SetFilterCommentsLines(bool bFilterCommentsLines) */ inline int ProjectFileItem::GetCompareMethod() const { - return m_nCompareMethod; + return m_nCompareMethod.value_or(0); } /** @@ -882,6 +896,15 @@ inline void ProjectFileItem::SetSaveIgnoreCodepage(bool bSaveIgnoreCodepage) m_bSaveIgnoreCodepage = bSaveIgnoreCodepage; } +/** + * @brief Set whether to save "Ignore EOF newline presence" setting. + * @param [in] bSaveIgnoreEofNewlinePresence Whether to save "Ignore EOF newline presence" setting. + */ +inline void ProjectFileItem::SetSaveIgnoreEofNewlinePresence(bool bSaveIgnoreEofNewlinePresence) +{ + m_bSaveIgnoreEofNewlinePresence = bSaveIgnoreEofNewlinePresence; +} + /** * @brief Set whether to save "Ignore comment differences" setting. * @param [in] bSaveFilterCommentsLines Whether to save "Ignore comment differences" setting. diff --git a/Src/PropCompare.cpp b/Src/PropCompare.cpp index c751fb71a64..77ffb8abe25 100644 --- a/Src/PropCompare.cpp +++ b/Src/PropCompare.cpp @@ -25,6 +25,7 @@ PropCompare::PropCompare(COptionsMgr *optionsMgr) , m_bIgnoreBlankLines(false) , m_bIgnoreEol(true) , m_bIgnoreCodepage(true) + , m_bIgnoreEofNewlinePresence(true) , m_nIgnoreWhite(-1) , m_bMovedBlocks(false) , m_bAlignSimilarLines(false) @@ -47,6 +48,7 @@ void PropCompare::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_CP_SENSITIVE, m_bIgnoreCodepage); DDX_Check(pDX, IDC_EOL_SENSITIVE, m_bIgnoreEol); DDX_Check(pDX, IDC_IGNORE_NUMBERS, m_bIgnoreNumbers); + DDX_Check(pDX, IDC_IGNEOFEOL_CHECK, m_bIgnoreEofNewlinePresence); DDX_Radio(pDX, IDC_WHITESPACE, m_nIgnoreWhite); DDX_Check(pDX, IDC_MOVED_BLOCKS, m_bMovedBlocks); DDX_Check(pDX, IDC_ALIGN_SIMILAR_LINES, m_bAlignSimilarLines); @@ -77,6 +79,7 @@ void PropCompare::ReadOptions() m_bIgnoreNumbers = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_NUMBERS); m_bIgnoreEol = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOL); m_bIgnoreCodepage = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_CODEPAGE); + m_bIgnoreEofNewlinePresence = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE); m_bMovedBlocks = GetOptionsMgr()->GetBool(OPT_CMP_MOVED_BLOCKS); m_bAlignSimilarLines = GetOptionsMgr()->GetBool(OPT_CMP_ALIGN_SIMILAR_LINES); m_nDiffAlgorithm = GetOptionsMgr()->GetInt(OPT_CMP_DIFF_ALGORITHM); @@ -98,6 +101,7 @@ void PropCompare::WriteOptions() GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_EOL, m_bIgnoreEol); GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_CASE, m_bIgnoreCase); GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_NUMBERS, m_bIgnoreNumbers); + GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, m_bIgnoreEofNewlinePresence); GetOptionsMgr()->SaveOption(OPT_CMP_MOVED_BLOCKS, m_bMovedBlocks); GetOptionsMgr()->SaveOption(OPT_CMP_ALIGN_SIMILAR_LINES, m_bAlignSimilarLines); GetOptionsMgr()->SaveOption(OPT_CMP_DIFF_ALGORITHM, m_nDiffAlgorithm); @@ -129,6 +133,7 @@ void PropCompare::OnDefaults() m_bFilterCommentsLines = GetOptionsMgr()->GetDefault(OPT_CMP_FILTER_COMMENTLINES); m_bIgnoreCase = GetOptionsMgr()->GetDefault(OPT_CMP_IGNORE_CASE); m_bIgnoreNumbers = GetOptionsMgr()->GetDefault(OPT_CMP_IGNORE_NUMBERS); + m_bIgnoreEofNewlinePresence = GetOptionsMgr()->GetDefault(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE); m_bMovedBlocks = GetOptionsMgr()->GetDefault(OPT_CMP_MOVED_BLOCKS); m_bAlignSimilarLines = GetOptionsMgr()->GetDefault(OPT_CMP_ALIGN_SIMILAR_LINES); m_nDiffAlgorithm = GetOptionsMgr()->GetDefault(OPT_CMP_DIFF_ALGORITHM); diff --git a/Src/PropCompare.h b/Src/PropCompare.h index f4c67b78af8..d26ca6edb50 100644 --- a/Src/PropCompare.h +++ b/Src/PropCompare.h @@ -35,6 +35,7 @@ class PropCompare : public OptionsPanel bool m_bIgnoreCase; bool m_bIgnoreNumbers; bool m_bIgnoreBlankLines; + int m_bIgnoreEofNewlinePresence; int m_nIgnoreWhite; bool m_bMovedBlocks; bool m_bAlignSimilarLines; diff --git a/Src/resource.h b/Src/resource.h index 5d52556a341..c6b14de3497 100644 --- a/Src/resource.h +++ b/Src/resource.h @@ -236,6 +236,7 @@ #define IDC_CP_SENSITIVE 1033 #define IDC_IGNORE_NUMBERS 1034 #define IDC_DIFFERENCE_COLOR 1035 +#define IDC_IGNEOFEOL_CHECK 1036 #define IDC_SEL_DIFFERENCE_COLOR 1037 #define IDC_PROP_INSERT_TABS 1038 #define IDC_PROP_INSERT_SPACES 1040 @@ -681,13 +682,14 @@ #define ID_DIFF_OPTIONS_IGNORE_EOL 16428 #define ID_DIFF_OPTIONS_IGNORE_CODEPAGE 16429 #define ID_DIFF_OPTIONS_IGNORE_COMMENTS 16430 -#define ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS 16431 -#define ID_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS 16432 -#define ID_DIFF_OPTIONS_COMPMETHOD_QUICK_CONTENTS 16433 -#define ID_DIFF_OPTIONS_COMPMETHOD_BINARY_CONTENTS 16434 -#define ID_DIFF_OPTIONS_COMPMETHOD_MODDATE 16435 -#define ID_DIFF_OPTIONS_COMPMETHOD_DATESIZE 16436 -#define ID_DIFF_OPTIONS_COMPMETHOD_SIZE 16437 +#define ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE 16431 +#define ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS 16432 +#define ID_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS 16433 +#define ID_DIFF_OPTIONS_COMPMETHOD_QUICK_CONTENTS 16434 +#define ID_DIFF_OPTIONS_COMPMETHOD_BINARY_CONTENTS 16435 +#define ID_DIFF_OPTIONS_COMPMETHOD_MODDATE 16436 +#define ID_DIFF_OPTIONS_COMPMETHOD_DATESIZE 16437 +#define ID_DIFF_OPTIONS_COMPMETHOD_SIZE 16438 #define ID_DIR_COPY_LEFT_TO_RIGHT 17600 #define ID_DIR_COPY_LEFT_TO_MIDDLE 17601 #define ID_DIR_COPY_LEFT_TO_BROWSE 17602 @@ -911,12 +913,13 @@ #define ID_PROJECT_DIFF_OPTIONS_IGNORE_NUMBERS 33130 #define ID_PROJECT_DIFF_OPTIONS_IGNORE_CODEPAGE 33131 #define ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS 33132 -#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS 33133 -#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_QUICK_CONTENTS 33134 -#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_BINARY_CONTENTS 33135 -#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_MODDATE 33136 -#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_DATESIZE 33137 -#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_SIZE 33138 +#define ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE 33133 +#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS 33134 +#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_QUICK_CONTENTS 33135 +#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_BINARY_CONTENTS 33136 +#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_MODDATE 33137 +#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_DATESIZE 33138 +#define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_SIZE 33139 #define ID_FILE_OPENCLIPBOARD 33140 #define ID_EDIT_TOGGLE_BOOKMARK 33145 #define ID_EDIT_GOTO_NEXT_BOOKMARK 33146 diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Translations/WinMerge/Arabic.po b/Translations/WinMerge/Arabic.po index c7dfb069f29..f0008354d86 100644 --- a/Translations/WinMerge/Arabic.po +++ b/Translations/WinMerge/Arabic.po @@ -1104,6 +1104,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "تضمين المجلدات الفرعية" diff --git a/Translations/WinMerge/Basque.po b/Translations/WinMerge/Basque.po index d51254a05c4..07f0b840cfe 100644 --- a/Translations/WinMerge/Basque.po +++ b/Translations/WinMerge/Basque.po @@ -1323,6 +1323,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Az&piagiritegiak Barne" diff --git a/Translations/WinMerge/Brazilian.po b/Translations/WinMerge/Brazilian.po index 6d597587d29..4d6169afd87 100644 --- a/Translations/WinMerge/Brazilian.po +++ b/Translations/WinMerge/Brazilian.po @@ -1101,6 +1101,9 @@ msgstr "Ignorar números" msgid "Ignore c&omment differences" msgstr "Ignorar as d&iferenças dos comentários" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Incluir as Sub-Pastas" diff --git a/Translations/WinMerge/Bulgarian.po b/Translations/WinMerge/Bulgarian.po index 9bed465c10b..f4b36eb3e51 100644 --- a/Translations/WinMerge/Bulgarian.po +++ b/Translations/WinMerge/Bulgarian.po @@ -1098,6 +1098,9 @@ msgstr "Пренебрегване на &числа" msgid "Ignore c&omment differences" msgstr "Пренебрегване на различията в &коментари" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Включително подпапки" diff --git a/Translations/WinMerge/Catalan.po b/Translations/WinMerge/Catalan.po index 486b9813fd7..93e30495a6f 100644 --- a/Translations/WinMerge/Catalan.po +++ b/Translations/WinMerge/Catalan.po @@ -1321,6 +1321,9 @@ msgstr "Ignora els nombres" msgid "Ignore c&omment differences" msgstr "Ingora les diferències en els comentaris" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Inclou-hi les subcarpetes" diff --git a/Translations/WinMerge/ChineseSimplified.po b/Translations/WinMerge/ChineseSimplified.po index 98c5eb1f382..a7172b92d8e 100644 --- a/Translations/WinMerge/ChineseSimplified.po +++ b/Translations/WinMerge/ChineseSimplified.po @@ -1105,6 +1105,9 @@ msgstr "忽略数字(&B)" msgid "Ignore c&omment differences" msgstr "忽略注释行差异(&O)" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "包含子目录(&I)" diff --git a/Translations/WinMerge/ChineseTraditional.po b/Translations/WinMerge/ChineseTraditional.po index b8f120af65d..7d276fc5767 100644 --- a/Translations/WinMerge/ChineseTraditional.po +++ b/Translations/WinMerge/ChineseTraditional.po @@ -1327,6 +1327,9 @@ msgstr "忽略數字 (&B)" msgid "Ignore c&omment differences" msgstr "忽略註解差異 (&O)" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "包括子資料夾 (&I)" diff --git a/Translations/WinMerge/Corsican.po b/Translations/WinMerge/Corsican.po index 14d894b3c6f..2d0205cf2c1 100644 --- a/Translations/WinMerge/Corsican.po +++ b/Translations/WinMerge/Corsican.po @@ -1103,6 +1103,9 @@ msgstr "Ignurà i &numeri" msgid "Ignore c&omment differences" msgstr "Ignurà e sfarenze di c&ummentu" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Include i sottucartulari" diff --git a/Translations/WinMerge/Croatian.po b/Translations/WinMerge/Croatian.po index 42d37a9b9b9..4f9f430e567 100644 --- a/Translations/WinMerge/Croatian.po +++ b/Translations/WinMerge/Croatian.po @@ -1320,6 +1320,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "Uključi i &podmape" diff --git a/Translations/WinMerge/Czech.po b/Translations/WinMerge/Czech.po index 591f1221b00..0eecf817289 100644 --- a/Translations/WinMerge/Czech.po +++ b/Translations/WinMerge/Czech.po @@ -1320,6 +1320,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "Včetně pod&složek" diff --git a/Translations/WinMerge/Danish.po b/Translations/WinMerge/Danish.po index f20e22b7619..eb8648d48bd 100644 --- a/Translations/WinMerge/Danish.po +++ b/Translations/WinMerge/Danish.po @@ -1321,6 +1321,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Inkluder undermapper" diff --git a/Translations/WinMerge/Dutch.po b/Translations/WinMerge/Dutch.po index ca4f91c80c1..15a4dbd4b18 100644 --- a/Translations/WinMerge/Dutch.po +++ b/Translations/WinMerge/Dutch.po @@ -1099,6 +1099,9 @@ msgstr "Nummers negeren" msgid "Ignore c&omment differences" msgstr "Opmerkingsverschillen negeren" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "Submappen bijvoegen" diff --git a/Translations/WinMerge/English.pot b/Translations/WinMerge/English.pot index c4989c7449b..214dd44aaec 100644 --- a/Translations/WinMerge/English.pot +++ b/Translations/WinMerge/English.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: WinMerge\n" "Report-Msgid-Bugs-To: https://bugs.winmerge.org/\n" -"POT-Creation-Date: 2024-11-08 21:42+0000\n" +"POT-Creation-Date: 2024-12-10 09:03+0000\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: English \n" @@ -1095,6 +1095,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "" diff --git a/Translations/WinMerge/Finnish.po b/Translations/WinMerge/Finnish.po index b15f9250d13..26cd8be36aa 100644 --- a/Translations/WinMerge/Finnish.po +++ b/Translations/WinMerge/Finnish.po @@ -1101,6 +1101,9 @@ msgstr "Jätä nume&rot huomiotta" msgid "Ignore c&omment differences" msgstr "Jätä k&ommenttien erot huomiotta" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "Sisällytä alihakemistot" diff --git a/Translations/WinMerge/French.po b/Translations/WinMerge/French.po index b52eba091a1..0cc9fa54c21 100644 --- a/Translations/WinMerge/French.po +++ b/Translations/WinMerge/French.po @@ -1328,6 +1328,9 @@ msgstr "Ignorer les nom&bres" msgid "Ignore c&omment differences" msgstr "Ignorer les différences de c&ommentaire" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Inclure les sous-dossiers" diff --git a/Translations/WinMerge/Galician.po b/Translations/WinMerge/Galician.po index 0fc67456955..558f8aaf4b8 100644 --- a/Translations/WinMerge/Galician.po +++ b/Translations/WinMerge/Galician.po @@ -1102,6 +1102,9 @@ msgstr "Ignorar nú&meros" msgid "Ignore c&omment differences" msgstr "Ignorar diferenzas nos c&omentarios" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Incluír subcarpetas" diff --git a/Translations/WinMerge/German.po b/Translations/WinMerge/German.po index a565ebb7962..8fd48c55261 100644 --- a/Translations/WinMerge/German.po +++ b/Translations/WinMerge/German.po @@ -1324,6 +1324,9 @@ msgstr "&Nummern ignorieren" msgid "Ignore c&omment differences" msgstr "&Kommentarunterschiede ignorieren" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Unterordner einbeziehen" diff --git a/Translations/WinMerge/Greek.po b/Translations/WinMerge/Greek.po index 5985ba6c905..b94e92a68bd 100644 --- a/Translations/WinMerge/Greek.po +++ b/Translations/WinMerge/Greek.po @@ -1319,6 +1319,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "Οι Υποφάκελοι να &συμπεριληφθούν" diff --git a/Translations/WinMerge/Hungarian.po b/Translations/WinMerge/Hungarian.po index b0932e41196..d8d302f1b8f 100644 --- a/Translations/WinMerge/Hungarian.po +++ b/Translations/WinMerge/Hungarian.po @@ -1322,6 +1322,9 @@ msgstr "Számok mellőzése" msgid "Ignore c&omment differences" msgstr "Megjegyzés különbségek mellőzése" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Alkönyvtárakkal együtt" diff --git a/Translations/WinMerge/Italian.po b/Translations/WinMerge/Italian.po index 698a5ccb728..5d742b7e94a 100644 --- a/Translations/WinMerge/Italian.po +++ b/Translations/WinMerge/Italian.po @@ -1102,6 +1102,9 @@ msgstr "Ignora i nu&meri" msgid "Ignore c&omment differences" msgstr "Ignora le differenze nei c&ommenti" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Includi sotto cartelle" diff --git a/Translations/WinMerge/Japanese.po b/Translations/WinMerge/Japanese.po index 373705afb90..a86d7bf635a 100644 --- a/Translations/WinMerge/Japanese.po +++ b/Translations/WinMerge/Japanese.po @@ -1100,6 +1100,9 @@ msgstr "数字を無視する(&B)" msgid "Ignore c&omment differences" msgstr "コメントの違いを無視する(&O)" +msgid "Ignore &end-of-file newline presence" +msgstr "ファイル末尾の改行文字の有無を無視する(&E)" + msgid "&Include subfolders" msgstr "サブフォルダーを含める(&I)" diff --git a/Translations/WinMerge/Korean.po b/Translations/WinMerge/Korean.po index f7019079f6d..507bf39dca3 100644 --- a/Translations/WinMerge/Korean.po +++ b/Translations/WinMerge/Korean.po @@ -1329,6 +1329,9 @@ msgstr "숫자 무시(&B)" msgid "Ignore c&omment differences" msgstr "주석 차이 무시(&O)" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "하위 폴더 포함(&I)" diff --git a/Translations/WinMerge/Lithuanian.po b/Translations/WinMerge/Lithuanian.po index 0c64c8bafe1..11eb0720e9e 100644 --- a/Translations/WinMerge/Lithuanian.po +++ b/Translations/WinMerge/Lithuanian.po @@ -1101,6 +1101,9 @@ msgstr "Ignoruoti skai&čius" msgid "Ignore c&omment differences" msgstr "Nepaisyti skirtumų k&omentaruose" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "Įtraukt&i pakatalogius" diff --git a/Translations/WinMerge/Norwegian.po b/Translations/WinMerge/Norwegian.po index 30159a094ed..91fab5a5deb 100644 --- a/Translations/WinMerge/Norwegian.po +++ b/Translations/WinMerge/Norwegian.po @@ -1100,6 +1100,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Inkluder undermapper" diff --git a/Translations/WinMerge/Persian.po b/Translations/WinMerge/Persian.po index b1c218113eb..94659930061 100644 --- a/Translations/WinMerge/Persian.po +++ b/Translations/WinMerge/Persian.po @@ -1321,6 +1321,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&I شامل زيرپوشه ها " diff --git a/Translations/WinMerge/Polish.po b/Translations/WinMerge/Polish.po index 8ab2ceec328..d8683c4ea4b 100644 --- a/Translations/WinMerge/Polish.po +++ b/Translations/WinMerge/Polish.po @@ -1102,6 +1102,9 @@ msgstr "Ignoruj liczby" msgid "Ignore c&omment differences" msgstr "Ignoruj różnice w komentarzach" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "Uwzględn&ij podfoldery" diff --git a/Translations/WinMerge/Portuguese.po b/Translations/WinMerge/Portuguese.po index 3fee08334ec..917fc279897 100644 --- a/Translations/WinMerge/Portuguese.po +++ b/Translations/WinMerge/Portuguese.po @@ -1102,6 +1102,9 @@ msgstr "Ignorar números" msgid "Ignore c&omment differences" msgstr "Ignorar diferenças de c&omentários" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Incluir subpastas" diff --git a/Translations/WinMerge/Romanian.po b/Translations/WinMerge/Romanian.po index a11d3d1914b..ef6b187a857 100644 --- a/Translations/WinMerge/Romanian.po +++ b/Translations/WinMerge/Romanian.po @@ -1100,6 +1100,9 @@ msgstr "Ignoră numerele" msgid "Ignore c&omment differences" msgstr "Ignoră diferențele de c&omentarii" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Include subdirectoare" diff --git a/Translations/WinMerge/Russian.po b/Translations/WinMerge/Russian.po index 6eb91cf0521..1254d70e98c 100644 --- a/Translations/WinMerge/Russian.po +++ b/Translations/WinMerge/Russian.po @@ -1103,6 +1103,9 @@ msgstr "Игнорировать числа" msgid "Ignore c&omment differences" msgstr "Игнорировать отличия в комментариях" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Включая подпапки" diff --git a/Translations/WinMerge/Serbian.po b/Translations/WinMerge/Serbian.po index f8864234377..3e4a05c71da 100644 --- a/Translations/WinMerge/Serbian.po +++ b/Translations/WinMerge/Serbian.po @@ -1317,6 +1317,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "Укључи и потфасцикле" diff --git a/Translations/WinMerge/Sinhala.po b/Translations/WinMerge/Sinhala.po index fb4fb87f858..4c7a70851fc 100644 --- a/Translations/WinMerge/Sinhala.po +++ b/Translations/WinMerge/Sinhala.po @@ -1320,6 +1320,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Inclure les sous-répertoires" diff --git a/Translations/WinMerge/Slovak.po b/Translations/WinMerge/Slovak.po index a4ea60234a7..747dc5597ac 100644 --- a/Translations/WinMerge/Slovak.po +++ b/Translations/WinMerge/Slovak.po @@ -1101,6 +1101,9 @@ msgstr "Ignorovať čí&sla" msgid "Ignore c&omment differences" msgstr "Ignorovať rozdielne &komentáre" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Zahrnúť podpriečinky" diff --git a/Translations/WinMerge/Slovenian.po b/Translations/WinMerge/Slovenian.po index 5d0d4b38e25..4b76521e813 100644 --- a/Translations/WinMerge/Slovenian.po +++ b/Translations/WinMerge/Slovenian.po @@ -1101,6 +1101,9 @@ msgstr "Prezri š&tevilke" msgid "Ignore c&omment differences" msgstr "Prezri razlike v k&omentarjih" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Vključi podmape" diff --git a/Translations/WinMerge/Spanish.po b/Translations/WinMerge/Spanish.po index 5edcc01f16e..9fbae02405d 100644 --- a/Translations/WinMerge/Spanish.po +++ b/Translations/WinMerge/Spanish.po @@ -1104,6 +1104,9 @@ msgstr "Ignorar nú&meros" msgid "Ignore c&omment differences" msgstr "Ignorar diferencias en c&omentarios" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&Incluir subcarpetas" diff --git a/Translations/WinMerge/Swedish.po b/Translations/WinMerge/Swedish.po index fd3be679e27..80dfc94e5f1 100644 --- a/Translations/WinMerge/Swedish.po +++ b/Translations/WinMerge/Swedish.po @@ -1105,6 +1105,9 @@ msgstr "Ignorera nummer" msgid "Ignore c&omment differences" msgstr "Ignorera kommentarskillnader" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "Inkludera undermappar" diff --git a/Translations/WinMerge/Tamil.po b/Translations/WinMerge/Tamil.po index 8cbe0fb3241..e196eddfc76 100644 --- a/Translations/WinMerge/Tamil.po +++ b/Translations/WinMerge/Tamil.po @@ -1099,6 +1099,9 @@ msgstr "எண்&பெர்களை புறக்கணிக்கவு msgid "Ignore c&omment differences" msgstr "க&கருத்து வேறுபாடுகளை புறக்கணிக்கவும்" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "&உள்கோப்புகளை சேர்" diff --git a/Translations/WinMerge/Turkish.po b/Translations/WinMerge/Turkish.po index a01db309ef5..4da1e412842 100644 --- a/Translations/WinMerge/Turkish.po +++ b/Translations/WinMerge/Turkish.po @@ -1100,6 +1100,9 @@ msgstr "&Sayıları yok say" msgid "Ignore c&omment differences" msgstr "Yo&rum farklılıkları yok sayılsın" +msgid "Ignore &end-of-file newline presence" +msgstr "" + msgid "&Include subfolders" msgstr "A< klasörler katılsın" diff --git a/Translations/WinMerge/Ukrainian.po b/Translations/WinMerge/Ukrainian.po index d5017230a26..92c3a5431d2 100644 --- a/Translations/WinMerge/Ukrainian.po +++ b/Translations/WinMerge/Ukrainian.po @@ -1304,6 +1304,9 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" +msgid "Ignore &end-of-file newline presence" +msgstr "" + #, c-format msgid "&Include subfolders" msgstr "&Враховуючи підтеки" From c1cd36b750d586ca05a73df6991f96b5be7a4bc5 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Fri, 13 Dec 2024 22:23:51 +0900 Subject: [PATCH 02/23] WIP --- Src/CompareEngines/ByteComparator.cpp | 17 ++ Src/CompareEngines/ByteComparator.h | 1 + .../ByteCompare/ByteCompare_test.cpp | 206 ++++++++++++++++++ 3 files changed, 224 insertions(+) diff --git a/Src/CompareEngines/ByteComparator.cpp b/Src/CompareEngines/ByteComparator.cpp index e6d7a72ddf0..60c15efc1aa 100644 --- a/Src/CompareEngines/ByteComparator.cpp +++ b/Src/CompareEngines/ByteComparator.cpp @@ -111,6 +111,7 @@ ByteComparator::ByteComparator(const QuickCompareOptions * options) , m_ignore_eol_diff(options->m_bIgnoreEOLDifference) , m_ignore_blank_lines(options->m_bIgnoreBlankLines) , m_ignore_numbers(options->m_bIgnoreNumbers) + , m_ignore_eof_newline_presence(options->m_bIgnoreEofNewlinePresence) // state , m_wsflag(false) , m_eol0(false) @@ -353,6 +354,8 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( if ((!m_eol0 || !m_eol1) && (orig0 == end0 || orig1 == end1)) { // one side had an end-of-line, but the other didn't + if (m_ignore_eof_newline_presence) + continue; result = RESULT_DIFF; goto exit; } @@ -379,6 +382,20 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( if (ptr0 == end0 || ptr1 == end1) { + if (m_ignore_eof_newline_presence) + { + if (eof0 || eof1) + { + HandleSide0Eol((char **) &ptr0, end0, eof0); + HandleSide1Eol((char **) &ptr1, end1, eof1); + + if (m_cr0 || m_cr1) + { + // these flags mean possible split CR/LF + goto need_more; + } + } + } if (ptr0 == end0 && ptr1 == end1) { if (!eof0 || !eof1) diff --git a/Src/CompareEngines/ByteComparator.h b/Src/CompareEngines/ByteComparator.h index cf7ec209324..23c60b2c95d 100644 --- a/Src/CompareEngines/ByteComparator.h +++ b/Src/CompareEngines/ByteComparator.h @@ -54,6 +54,7 @@ class ByteComparator bool m_ignore_all_space; /**< Ignore all whitespace changes */ bool m_ignore_eol_diff; /**< Ignore differences in EOL bytes */ bool m_ignore_blank_lines; /**< Ignore blank lines */ + bool m_ignore_eof_newline_presence; /**< Ignore end-of-file newline presence */ // state bool m_wsflag; /**< ignore_space_change & in a whitespace area */ bool m_eol0; /**< 0-side has an eol */ diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 5fcc2c55bab..1c1c6b23857 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -594,4 +594,210 @@ namespace } + TEST_F(ByteCompareTest, IgnoreEofNewlinePresence) + { + CompareEngines::ByteCompare bc; + QuickCompareOptions option; + std::string filename_left = "_tmp_.txt"; + std::string filename_right = "_tmp_2.txt"; + + option.m_bIgnoreEofNewlinePresence = true; + bc.SetCompareOptions(option); + + for (int i = 0; i < 3; i++) + { + {// same left: LF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 1 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + + {// same left: no EOL - right: LF + std::vector buf_left(WMCMPBUFF * 2 - 1 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// same left: CRLF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + + {// same left: no EOL - right: CRLF + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: CR+A - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = 'A'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CR+A + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = 'A'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: LF+LF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\n'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: LF+LF + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\n'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: CR+CR - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\r'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CR+CR + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\r'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + } + + } // namespace From 2f011cfc1a1146f57c920f77db6e717ef401a029 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sun, 15 Dec 2024 09:35:42 +0900 Subject: [PATCH 03/23] WIP --- Src/CompareEngines/ByteComparator.cpp | 48 +++- .../ByteCompare/ByteCompare_test.cpp | 208 +++++++++++++++++- 2 files changed, 247 insertions(+), 9 deletions(-) diff --git a/Src/CompareEngines/ByteComparator.cpp b/Src/CompareEngines/ByteComparator.cpp index 60c15efc1aa..bcd253c0819 100644 --- a/Src/CompareEngines/ByteComparator.cpp +++ b/Src/CompareEngines/ByteComparator.cpp @@ -354,8 +354,6 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( if ((!m_eol0 || !m_eol1) && (orig0 == end0 || orig1 == end1)) { // one side had an end-of-line, but the other didn't - if (m_ignore_eof_newline_presence) - continue; result = RESULT_DIFF; goto exit; } @@ -384,16 +382,50 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( { if (m_ignore_eof_newline_presence) { - if (eof0 || eof1) + if (eof0 && eof1) { - HandleSide0Eol((char **) &ptr0, end0, eof0); - HandleSide1Eol((char **) &ptr1, end1, eof1); - - if (m_cr0 || m_cr1) + const size_t rest0 = end0 - ptr0; + const size_t rest1 = end1 - ptr1; + if ((rest0 == 0 && rest1 == 0) || + (rest0 == 1 && ((!m_cr0 && *ptr0 == '\r') || ((m_cr0 || !m_eol0) && *ptr0 == '\n'))) || + (rest0 == 2 && (!m_eol0 && (*ptr0 == '\r' && *(ptr0 + 1) == '\n'))) || + (rest1 == 1 && ((!m_cr1 && *ptr1 == '\r') || ((m_cr1 || !m_eol1) && *ptr1 == '\n'))) || + (rest1 == 2 && (!m_eol1 && (*ptr1 == '\r' && *(ptr1 + 1) == '\n')))) + { + ptr0 = end0; + ptr1 = end1; + result = RESULT_SAME; + } + else { - // these flags mean possible split CR/LF + result = RESULT_DIFF; + } + goto exit; + } + else if (eof0 || eof1) + { + const size_t rest0 = end0 - ptr0; + const size_t rest1 = end1 - ptr1; + if ((rest0 == 0 && rest1 == 0) || + (rest0 == 1 && (*ptr0 == '\r' || *ptr0 == '\n')) || + (rest0 == 2 && (*ptr0 == '\r' && *(ptr0 + 1) == '\n')) || + (rest1 == 1 && (*ptr1 == '\r' || *ptr1 == '\n')) || + (rest1 == 2 && (*ptr1 == '\r' && *(ptr1 + 1) == '\n'))) + { + if (end0 - ptr0 >= 1) + { + m_eol0 = true; + ptr0 = end0; + } + if (end1 - ptr1 >= 1) + { + m_eol1 = true; + ptr1 = end1; + } goto need_more; } + result = RESULT_DIFF; + goto exit; } } if (ptr0 == end0 && ptr1 == end1) diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 1c1c6b23857..6c53c76282d 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -796,8 +796,214 @@ namespace EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); } } - } + TEST_F(ByteCompareTest, IgnoreEofNewlinePresenceAndIgnoreEOLDifference) + { + CompareEngines::ByteCompare bc; + QuickCompareOptions option; + std::string filename_left = "_tmp_.txt"; + std::string filename_right = "_tmp_2.txt"; + + option.m_bIgnoreEofNewlinePresence = true; + option.m_bIgnoreEOLDifference = true; + bc.SetCompareOptions(option); + + for (int i = 0; i < 3; i++) + { + {// same left: LF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 1 + i); + std::vector buf_right(WMCMPBUFF * 2 - 1 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_left[buf_left.size() - 1] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + + {// same left: no EOL - right: LF + std::vector buf_left(WMCMPBUFF * 2 - 1 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// same left: CRLF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + + {// same left: no EOL - right: CRLF + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: CR+A - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = 'A'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CR+A + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = 'A'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: LF+LF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\n'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: LF+LF + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\n'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: CR+CR - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\r'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CR+CR + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\r'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + } } // namespace From 76b59482d73c3f9c6b8f09c58bf2c8936a31f5ad Mon Sep 17 00:00:00 2001 From: sdottaka Date: Mon, 16 Dec 2024 21:47:53 +0900 Subject: [PATCH 04/23] WIP --- Src/CompareEngines/ByteComparator.cpp | 4 +- .../ByteCompare/ByteCompare_test.cpp | 90 ++++++++++++++++--- 2 files changed, 80 insertions(+), 14 deletions(-) diff --git a/Src/CompareEngines/ByteComparator.cpp b/Src/CompareEngines/ByteComparator.cpp index bcd253c0819..3567c1c30fd 100644 --- a/Src/CompareEngines/ByteComparator.cpp +++ b/Src/CompareEngines/ByteComparator.cpp @@ -349,7 +349,7 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( // these flags mean possible split CR/LF goto need_more; } - if (m_eol0 || m_eol1) + if (!m_ignore_eof_newline_presence && (m_eol0 || m_eol1)) { if ((!m_eol0 || !m_eol1) && (orig0 == end0 || orig1 == end1)) { @@ -424,8 +424,6 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( } goto need_more; } - result = RESULT_DIFF; - goto exit; } } if (ptr0 == end0 && ptr1 == end1) diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 6c53c76282d..05786432de5 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -133,7 +133,6 @@ namespace } - TEST_F(ByteCompareTest, IgnoreAllSpace) { CompareEngines::ByteCompare bc; @@ -819,10 +818,11 @@ namespace memset(buf_right.data(), 'A', buf_right.size()); buf_left[10] = '\n'; - buf_left[buf_left.size() - 1] = '\n'; buf_right[10] = '\r'; buf_right[11] = '\n'; + buf_left[buf_left.size() - 1] = '\n'; + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); TempFile file_right(filename_right, buf_right.data(), buf_right.size()); @@ -833,11 +833,15 @@ namespace {// same left: no EOL - right: LF std::vector buf_left(WMCMPBUFF * 2 - 1 + i); - std::vector buf_right(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 1 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_right[10] = '\n'; + buf_left[10] = '\r'; + buf_left[11] = '\n'; + buf_right[buf_right.size() - 1] = '\n'; TempFile file_left(filename_left, buf_left.data(), buf_left.size()); @@ -852,12 +856,20 @@ namespace for (int i = 0; i < 3; i++) { {// same left: CRLF - right: no EOL - std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_left[10] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + + buf_left[19] = '\r'; + buf_right[20] = '\r'; + buf_right[21] = '\n'; + buf_left[buf_left.size() - 2] = '\r'; buf_left[buf_left.size() - 1] = '\n'; @@ -871,11 +883,19 @@ namespace {// same left: no EOL - right: CRLF std::vector buf_left(WMCMPBUFF * 2 - 2 + i); - std::vector buf_right(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_right[10] = '\n'; + buf_left[10] = '\r'; + buf_left[11] = '\n'; + + buf_right[19] = '\r'; + buf_left[20] = '\r'; + buf_left[21] = '\n'; + buf_right[buf_right.size() - 2] = '\r'; buf_right[buf_right.size() - 1] = '\n'; @@ -891,12 +911,20 @@ namespace for (int i = 0; i < 3; i++) { {// diff left: CR+A - right: no EOL - std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_left[10] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + + buf_left[19] = '\r'; + buf_right[20] = '\r'; + buf_right[21] = '\n'; + buf_left[buf_left.size() - 2] = '\r'; buf_left[buf_left.size() - 1] = 'A'; @@ -910,11 +938,19 @@ namespace {// diff left: no EOL - right: CR+A std::vector buf_left(WMCMPBUFF * 2 - 2 + i); - std::vector buf_right(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_right[10] = '\n'; + buf_left[10] = '\r'; + buf_left[11] = '\n'; + + buf_right[19] = '\r'; + buf_left[20] = '\r'; + buf_left[21] = '\n'; + buf_right[buf_right.size() - 2] = '\r'; buf_right[buf_right.size() - 1] = 'A'; @@ -930,12 +966,20 @@ namespace for (int i = 0; i < 3; i++) { {// diff left: LF+LF - right: no EOL - std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_left[10] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + + buf_left[19] = '\r'; + buf_right[20] = '\r'; + buf_right[21] = '\n'; + buf_left[buf_left.size() - 2] = '\n'; buf_left[buf_left.size() - 1] = '\n'; @@ -949,11 +993,19 @@ namespace {// diff left: no EOL - right: LF+LF std::vector buf_left(WMCMPBUFF * 2 - 2 + i); - std::vector buf_right(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_right[10] = '\n'; + buf_left[10] = '\r'; + buf_left[11] = '\n'; + + buf_right[19] = '\r'; + buf_left[20] = '\r'; + buf_left[21] = '\n'; + buf_right[buf_right.size() - 2] = '\n'; buf_right[buf_right.size() - 1] = '\n'; @@ -969,12 +1021,20 @@ namespace for (int i = 0; i < 3; i++) { {// diff left: CR+CR - right: no EOL - std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_left[10] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + + buf_left[19] = '\r'; + buf_right[20] = '\r'; + buf_right[21] = '\n'; + buf_left[buf_left.size() - 2] = '\r'; buf_left[buf_left.size() - 1] = '\r'; @@ -988,11 +1048,19 @@ namespace {// diff left: no EOL - right: CR+CR std::vector buf_left(WMCMPBUFF * 2 - 2 + i); - std::vector buf_right(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); memset(buf_left.data(), 'A', buf_left.size()); memset(buf_right.data(), 'A', buf_right.size()); + buf_right[10] = '\n'; + buf_left[10] = '\r'; + buf_left[11] = '\n'; + + buf_right[19] = '\r'; + buf_left[20] = '\r'; + buf_left[21] = '\n'; + buf_right[buf_right.size() - 2] = '\r'; buf_right[buf_right.size() - 1] = '\r'; From 852a4b1a853017000324422e7dbb9bda1c464a69 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Tue, 17 Dec 2024 07:22:11 +0900 Subject: [PATCH 05/23] WIP --- Src/CompareEngines/ByteComparator.cpp | 53 +++------------------------ Src/CompareEngines/ByteComparator.h | 1 - Src/CompareEngines/ByteCompare.cpp | 31 +++++++++++++++- 3 files changed, 35 insertions(+), 50 deletions(-) diff --git a/Src/CompareEngines/ByteComparator.cpp b/Src/CompareEngines/ByteComparator.cpp index 3567c1c30fd..03a3782b6b7 100644 --- a/Src/CompareEngines/ByteComparator.cpp +++ b/Src/CompareEngines/ByteComparator.cpp @@ -111,7 +111,6 @@ ByteComparator::ByteComparator(const QuickCompareOptions * options) , m_ignore_eol_diff(options->m_bIgnoreEOLDifference) , m_ignore_blank_lines(options->m_bIgnoreBlankLines) , m_ignore_numbers(options->m_bIgnoreNumbers) - , m_ignore_eof_newline_presence(options->m_bIgnoreEofNewlinePresence) // state , m_wsflag(false) , m_eol0(false) @@ -341,6 +340,8 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( } else // don't skip blank lines, but still ignore eol difference { + const char* ptr0b = ptr0; + const char* ptr1b = ptr1; HandleSide0Eol((char **) &ptr0, end0, eof0); HandleSide1Eol((char **) &ptr1, end1, eof1); @@ -349,11 +350,13 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( // these flags mean possible split CR/LF goto need_more; } - if (!m_ignore_eof_newline_presence && (m_eol0 || m_eol1)) + if (m_eol0 || m_eol1) { if ((!m_eol0 || !m_eol1) && (orig0 == end0 || orig1 == end1)) { // one side had an end-of-line, but the other didn't + ptr0 = ptr0b; + ptr1 = ptr1b; result = RESULT_DIFF; goto exit; } @@ -380,52 +383,6 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( if (ptr0 == end0 || ptr1 == end1) { - if (m_ignore_eof_newline_presence) - { - if (eof0 && eof1) - { - const size_t rest0 = end0 - ptr0; - const size_t rest1 = end1 - ptr1; - if ((rest0 == 0 && rest1 == 0) || - (rest0 == 1 && ((!m_cr0 && *ptr0 == '\r') || ((m_cr0 || !m_eol0) && *ptr0 == '\n'))) || - (rest0 == 2 && (!m_eol0 && (*ptr0 == '\r' && *(ptr0 + 1) == '\n'))) || - (rest1 == 1 && ((!m_cr1 && *ptr1 == '\r') || ((m_cr1 || !m_eol1) && *ptr1 == '\n'))) || - (rest1 == 2 && (!m_eol1 && (*ptr1 == '\r' && *(ptr1 + 1) == '\n')))) - { - ptr0 = end0; - ptr1 = end1; - result = RESULT_SAME; - } - else - { - result = RESULT_DIFF; - } - goto exit; - } - else if (eof0 || eof1) - { - const size_t rest0 = end0 - ptr0; - const size_t rest1 = end1 - ptr1; - if ((rest0 == 0 && rest1 == 0) || - (rest0 == 1 && (*ptr0 == '\r' || *ptr0 == '\n')) || - (rest0 == 2 && (*ptr0 == '\r' && *(ptr0 + 1) == '\n')) || - (rest1 == 1 && (*ptr1 == '\r' || *ptr1 == '\n')) || - (rest1 == 2 && (*ptr1 == '\r' && *(ptr1 + 1) == '\n'))) - { - if (end0 - ptr0 >= 1) - { - m_eol0 = true; - ptr0 = end0; - } - if (end1 - ptr1 >= 1) - { - m_eol1 = true; - ptr1 = end1; - } - goto need_more; - } - } - } if (ptr0 == end0 && ptr1 == end1) { if (!eof0 || !eof1) diff --git a/Src/CompareEngines/ByteComparator.h b/Src/CompareEngines/ByteComparator.h index 23c60b2c95d..cf7ec209324 100644 --- a/Src/CompareEngines/ByteComparator.h +++ b/Src/CompareEngines/ByteComparator.h @@ -54,7 +54,6 @@ class ByteComparator bool m_ignore_all_space; /**< Ignore all whitespace changes */ bool m_ignore_eol_diff; /**< Ignore differences in EOL bytes */ bool m_ignore_blank_lines; /**< Ignore blank lines */ - bool m_ignore_eof_newline_presence; /**< Ignore end-of-file newline presence */ // state bool m_wsflag; /**< ignore_space_change & in a whitespace area */ bool m_eol0; /**< 0-side has an eol */ diff --git a/Src/CompareEngines/ByteCompare.cpp b/Src/CompareEngines/ByteCompare.cpp index c0f2b80be54..7f8c1a2b1d8 100644 --- a/Src/CompareEngines/ByteCompare.cpp +++ b/Src/CompareEngines/ByteCompare.cpp @@ -80,6 +80,7 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) // because transform code converted any UCS-2 files to UTF-8 // We could compare directly in UCS-2LE here, as an optimization, in that case char buff[2][WMCMPBUFF]; // buffered access to files + std::string lasteol[2]; int i; unsigned diffcode = 0; @@ -126,11 +127,23 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) if (rtn < space) eof[i] = true; bfend[i] += rtn; + if (m_pOptions->m_bIgnoreEofNewlinePresence) + { + for (int j = bfstart[i]; j < bfend[i]; ++j) + { + const char c = buff[i][j]; + if (c == '\r' || c == '\n') + lasteol[i].push_back(c); + else + lasteol[i].clear(); + } + } if (diffData->m_inf[0].desc == diffData->m_inf[1].desc) { bfstart[1] = bfstart[0]; bfend[1] = bfend[0]; eof[1] = eof[0]; + lasteol[1] = lasteol[0]; diffData->m_FileLocation[1] = diffData->m_FileLocation[0]; memcpy(&buff[1][bfend[1] - rtn], &buff[0][bfend[0] - rtn], rtn); break; @@ -165,7 +178,21 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) } else { - diffcode |= DIFFCODE::DIFF; + if (m_pOptions->m_bIgnoreEofNewlinePresence) + { + if ((eof[0] || eof[1]) && + ((end0 - ptr0 <= 1 && (lasteol[0] == "\r" || lasteol[0] == "\n" || lasteol[0] == "\r\n") && (end1 == ptr1))) || + ((end0 - ptr0 == 2 && (lasteol[0] == "\r\n") && (end1 == ptr1))) || + ((end1 - ptr1 <= 1 && (lasteol[1] == "\r" || lasteol[1] == "\n" || lasteol[1] == "\r\n") && (end0 == ptr0))) || + ((end1 - ptr1 == 2 && (lasteol[1] == "\r\n") && (end0 == ptr0)))) + ; + else + diffcode |= DIFFCODE::DIFF; + } + else + { + diffcode |= DIFFCODE::DIFF; + } ptr0 = end0; ptr1 = end1; // move our current pointers over what we just compared @@ -250,7 +277,9 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) // If either unfinished, they differ if (ptr0 != end0 || ptr1 != end1) + { diffcode = (diffcode & DIFFCODE::DIFF); + } if (diffcode & DIFFCODE::DIFF) return diffcode | DIFFCODE::DIFF; else From d47f7ea22fb4e6aa4bb6e54aaced32a0193952a1 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Tue, 17 Dec 2024 08:07:37 +0900 Subject: [PATCH 06/23] WIP --- Src/CompareEngines/ByteCompare.cpp | 4 +- .../ByteCompare/ByteCompare_test.cpp | 110 ++++++++++++++++++ 2 files changed, 111 insertions(+), 3 deletions(-) diff --git a/Src/CompareEngines/ByteCompare.cpp b/Src/CompareEngines/ByteCompare.cpp index 7f8c1a2b1d8..bfbae24660b 100644 --- a/Src/CompareEngines/ByteCompare.cpp +++ b/Src/CompareEngines/ByteCompare.cpp @@ -129,7 +129,7 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) bfend[i] += rtn; if (m_pOptions->m_bIgnoreEofNewlinePresence) { - for (int j = bfstart[i]; j < bfend[i]; ++j) + for (int j = (std::max)(bfstart[i], bfend[i] - 4); j < bfend[i]; ++j) { const char c = buff[i][j]; if (c == '\r' || c == '\n') @@ -277,9 +277,7 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) // If either unfinished, they differ if (ptr0 != end0 || ptr1 != end1) - { diffcode = (diffcode & DIFFCODE::DIFF); - } if (diffcode & DIFFCODE::DIFF) return diffcode | DIFFCODE::DIFF; else diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 05786432de5..5de67084948 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -795,6 +795,49 @@ namespace EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); } } + + for (int i = 0; i < 4; i++) + { + {// diff left: CRLF+CRLF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 4 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[buf_left.size() - 4] = '\r'; + buf_left[buf_left.size() - 3] = '\n'; + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CRLF+CRLF + std::vector buf_left(WMCMPBUFF * 2 - 4 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[buf_right.size() - 4] = '\r'; + buf_right[buf_right.size() - 3] = '\n'; + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } } TEST_F(ByteCompareTest, IgnoreEofNewlinePresenceAndIgnoreEOLDifference) @@ -1072,6 +1115,73 @@ namespace EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); } } + + for (int i = 0; i < 4; i++) + { + {// diff left: CRLF+CRLF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 4 + i); + std::vector buf_right(WMCMPBUFF * 2 - 4 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + + buf_left[19] = '\r'; + buf_right[20] = '\r'; + buf_right[21] = '\n'; + + buf_left[28] = '\r'; + buf_right[30] = '\r'; + buf_right[31] = '\n'; + + buf_left[buf_left.size() - 4] = '\r'; + buf_left[buf_left.size() - 3] = '\n'; + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CRLF+CRLF + std::vector buf_left(WMCMPBUFF * 2 - 4 + i); + std::vector buf_right(WMCMPBUFF * 2 - 4 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[10] = '\n'; + buf_left[10] = '\r'; + buf_left[11] = '\n'; + + buf_right[19] = '\r'; + buf_left[20] = '\r'; + buf_left[21] = '\n'; + + buf_right[28] = '\r'; + buf_left[30] = '\r'; + buf_left[31] = '\n'; + + buf_right[buf_right.size() - 4] = '\r'; + buf_right[buf_right.size() - 3] = '\n'; + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } } } // namespace From 97d0d9c7089864709af4fd0c33fa6e52527dd7b5 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Tue, 17 Dec 2024 22:54:08 +0900 Subject: [PATCH 07/23] WIP --- Src/CompareEngines/ByteCompare.cpp | 2 +- .../ByteCompare/ByteCompare_test.cpp | 344 ++++++++++++++++++ 2 files changed, 345 insertions(+), 1 deletion(-) diff --git a/Src/CompareEngines/ByteCompare.cpp b/Src/CompareEngines/ByteCompare.cpp index bfbae24660b..0484828d683 100644 --- a/Src/CompareEngines/ByteCompare.cpp +++ b/Src/CompareEngines/ByteCompare.cpp @@ -129,7 +129,7 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) bfend[i] += rtn; if (m_pOptions->m_bIgnoreEofNewlinePresence) { - for (int j = (std::max)(bfstart[i], bfend[i] - 4); j < bfend[i]; ++j) + for (int64_t j = (std::max)(bfstart[i], bfend[i] - 4); j < bfend[i]; ++j) { const char c = buff[i][j]; if (c == '\r' || c == '\n') diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 5de67084948..6b0e7cecd23 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -1184,4 +1184,348 @@ namespace } } + TEST_F(ByteCompareTest, IgnoreEofNewlinePresenceAndIgnoreBlankLines) + { + CompareEngines::ByteCompare bc; + QuickCompareOptions option; + std::string filename_left = "_tmp_.txt"; + std::string filename_right = "_tmp_2.txt"; + + option.m_bIgnoreEofNewlinePresence = true; + option.m_bIgnoreBlankLines = true; + bc.SetCompareOptions(option); + + for (int i = 0; i < 3; i++) + { + {// same left: LF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 1 + i); + std::vector buf_right(WMCMPBUFF * 2 - 1 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\n'; + buf_right[11] = '\n'; + + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + + {// same left: no EOL - right: LF + std::vector buf_left(WMCMPBUFF * 2 - 1 + i); + std::vector buf_right(WMCMPBUFF * 2 - 1 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[10] = '\n'; + buf_left[10] = '\n'; + buf_left[11] = '\n'; + + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// same left: CRLF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\n'; + buf_right[11] = '\n'; + + buf_left[19] = '\n'; + buf_right[20] = '\n'; + buf_right[21] = '\n'; + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + + {// same left: no EOL - right: CRLF + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[10] = '\n'; + buf_left[10] = '\n'; + buf_left[11] = '\n'; + + buf_right[19] = '\n'; + buf_left[20] = '\n'; + buf_left[21] = '\n'; + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::SAME, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: CR+A - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\n'; + buf_right[11] = '\n'; + + buf_left[19] = '\n'; + buf_right[20] = '\n'; + buf_right[21] = '\n'; + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = 'A'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CR+A + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[10] = '\n'; + buf_left[10] = '\n'; + buf_left[11] = '\n'; + + buf_right[19] = '\n'; + buf_left[20] = '\n'; + buf_left[21] = '\n'; + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = 'A'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: LF+LF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\n'; + buf_right[11] = '\n'; + + buf_left[19] = '\n'; + buf_right[20] = '\n'; + buf_right[21] = '\n'; + + buf_left[buf_left.size() - 2] = '\n'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: LF+LF + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[10] = '\n'; + buf_left[10] = '\n'; + buf_left[11] = '\n'; + + buf_right[19] = '\n'; + buf_left[20] = '\n'; + buf_left[21] = '\n'; + + buf_right[buf_right.size() - 2] = '\n'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 3; i++) + { + {// diff left: CR+CR - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\n'; + buf_right[11] = '\n'; + + buf_left[19] = '\n'; + buf_right[20] = '\n'; + buf_right[21] = '\n'; + + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\r'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CR+CR + std::vector buf_left(WMCMPBUFF * 2 - 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[10] = '\n'; + buf_left[10] = '\n'; + buf_left[11] = '\n'; + + buf_right[19] = '\n'; + buf_left[20] = '\n'; + buf_left[21] = '\n'; + + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\r'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + + for (int i = 0; i < 4; i++) + { + {// diff left: CRLF+CRLF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 - 4 + i); + std::vector buf_right(WMCMPBUFF * 2 - 4 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\n'; + buf_right[11] = '\n'; + + buf_left[19] = '\n'; + buf_right[20] = '\n'; + buf_right[21] = '\n'; + + buf_left[28] = '\n'; + buf_right[30] = '\n'; + buf_right[31] = '\n'; + + buf_left[buf_left.size() - 4] = '\r'; + buf_left[buf_left.size() - 3] = '\n'; + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CRLF+CRLF + std::vector buf_left(WMCMPBUFF * 2 - 4 + i); + std::vector buf_right(WMCMPBUFF * 2 - 4 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_right[10] = '\n'; + buf_left[10] = '\n'; + buf_left[11] = '\n'; + + buf_right[19] = '\n'; + buf_left[20] = '\n'; + buf_left[21] = '\n'; + + buf_right[28] = '\n'; + buf_left[30] = '\n'; + buf_left[31] = '\n'; + + buf_right[buf_right.size() - 4] = '\r'; + buf_right[buf_right.size() - 3] = '\n'; + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + } + } // namespace From 087f8a92fb34b0fbb04066ff581878706ab10f2c Mon Sep 17 00:00:00 2001 From: sdottaka Date: Wed, 18 Dec 2024 09:04:07 +0900 Subject: [PATCH 08/23] WIP --- Src/CompareEngines/Wrap_DiffUtils.cpp | 1 + Src/CompareOptions.cpp | 3 ++- Src/DiffWrapper.cpp | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Src/CompareEngines/Wrap_DiffUtils.cpp b/Src/CompareEngines/Wrap_DiffUtils.cpp index 4ab3b1a5b8b..88b7d636ef4 100644 --- a/Src/CompareEngines/Wrap_DiffUtils.cpp +++ b/Src/CompareEngines/Wrap_DiffUtils.cpp @@ -113,6 +113,7 @@ int DiffUtils::CompareFiles(DiffFileData* diffData) if (script != nullptr) { const bool usefilters = m_pDiffWrapper->GetOptions().m_filterCommentsLines || + m_pDiffWrapper->GetOptions().m_bIgnoreEofNewlinePresence || (m_pDiffWrapper->GetFilterList() && m_pDiffWrapper->GetFilterList()->HasRegExps()) || (m_pDiffWrapper->GetSubstitutionList() && m_pDiffWrapper->GetSubstitutionList()->HasRegExps()); diff --git a/Src/CompareOptions.cpp b/Src/CompareOptions.cpp index a218c442acb..5e06b9e39b6 100644 --- a/Src/CompareOptions.cpp +++ b/Src/CompareOptions.cpp @@ -49,6 +49,7 @@ void CompareOptions::SetFromDiffOptions(const DIFFOPTIONS &options) m_bIgnoreCase = options.bIgnoreCase; m_bIgnoreEOLDifference = options.bIgnoreEol; m_bIgnoreNumbers = options.bIgnoreNumbers; + m_bIgnoreEofNewlinePresence = options.bIgnoreEofNewlinePresence; } /** @@ -96,7 +97,6 @@ void DiffutilsOptions::SetFromDiffOptions(const DIFFOPTIONS & options) CompareOptions::SetFromDiffOptions(options); m_bCompletelyBlankOutIgnoredDiffereneces = options.bCompletelyBlankOutIgnoredChanges; m_filterCommentsLines = options.bFilterCommentsLines; - m_bIgnoreEofNewlinePresence = options.bIgnoreEofNewlinePresence; m_bIndentHeuristic = options.bIndentHeuristic; switch (options.nDiffAlgorithm) { @@ -189,6 +189,7 @@ void DiffutilsOptions::GetAsDiffOptions(DIFFOPTIONS &options) const options.bIgnoreEol = m_bIgnoreEOLDifference; options.bIgnoreNumbers = m_bIgnoreNumbers; options.nDiffAlgorithm = m_diffAlgorithm; + options.bIgnoreEofNewlinePresence = m_bIgnoreEofNewlinePresence; switch (m_ignoreWhitespace) { diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 91e46e2afd1..ad590d4c6e3 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -339,6 +339,18 @@ static void ReplaceChars(std::string & str, const char* chars, const char *rep) } } +static void RemoveEOL(std::string& str) +{ + if (str.empty()) + return; + if (str.size() >= 2 && str[str.size() - 2] == '\r' && str[str.size() - 1] == '\n') + str.erase(str.size() - 2, 2); + else if (str.back() == '\n') + str.pop_back(); + else if (str.back() == '\r') + str.pop_back(); +} + /** * @brief The main entry for post filtering. Performs post-filtering, by setting comment blocks to trivial * @param [in, out] thisob Current change @@ -447,6 +459,11 @@ int CDiffWrapper::PostFilter(PostFilterContext& ctxt, change* thisob, const file Replace(lineDataRight, "\r\n", "\n"); Replace(lineDataRight, "\r", "\n"); } + if (thisob->link == nullptr && m_options.m_bIgnoreEofNewlinePresence && (file_data_ary[0].missing_newline || file_data_ary[1].missing_newline)) + { + RemoveEOL(lineDataLeft); + RemoveEOL(lineDataRight); + } // If both match after filtering, mark this diff hunk as trivial and return. if (lineDataLeft == lineDataRight) From a2c5c430867d38aacb2e69ec3744ea604bf8af5f Mon Sep 17 00:00:00 2001 From: sdottaka Date: Wed, 18 Dec 2024 09:11:23 +0900 Subject: [PATCH 09/23] WIP --- Src/DiffWrapper.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index ad590d4c6e3..07deb2f7233 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -339,6 +339,16 @@ static void ReplaceChars(std::string & str, const char* chars, const char *rep) } } +/** + * @brief Remove the end-of-line (EOL) characters (LF, CR, or CRLF) from the end of a string. + * + * This function removes any of the following EOL characters from the end of the string: + * - LF (line feed, '\n') + * - CR (carriage return, '\r') + * - CRLF (carriage return + line feed, "\r\n") + * + * @param [in,out] str - A string from which the EOL characters will be removed. + */ static void RemoveEOL(std::string& str) { if (str.empty()) From 1d46fa4cf15cefc9deb4efad33876d24ed370373 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Wed, 18 Dec 2024 22:19:30 +0900 Subject: [PATCH 10/23] WIP --- Src/DiffWrapper.cpp | 2 + .../DiffWrapper/DiffWrapper_test.cpp | 118 ++++++++++++++++++ 2 files changed, 120 insertions(+) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 07deb2f7233..fa9412a8634 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -1227,6 +1227,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript(struct change * script, const struct change *next = script; const bool usefilters = m_options.m_filterCommentsLines || + m_options.m_bIgnoreEofNewlinePresence || (m_pFilterList && m_pFilterList->HasRegExps()) || (m_pSubstitutionList && m_pSubstitutionList->HasRegExps()); @@ -1398,6 +1399,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript3( diff12.Clear(); const bool usefilters = m_options.m_filterCommentsLines || + m_options.m_bIgnoreEofNewlinePresence || (m_pFilterList && m_pFilterList->HasRegExps()) || (m_pSubstitutionList && m_pSubstitutionList->HasRegExps()); diff --git a/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp b/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp index ca3844e2496..2324eb112e3 100644 --- a/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp +++ b/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp @@ -95,6 +95,124 @@ TEST(DiffWrapper, RunFileDiff_NoEol) } } +TEST(DiffWrapper, RunFileDiff_IgnoreEofNewlinePresence) +{ + CDiffWrapper dw; + DIFFOPTIONS options{}; + DIFFRANGE dr; + + options.bIgnoreEofNewlinePresence = true; + for (auto algo : { DIFF_ALGORITHM_DEFAULT, DIFF_ALGORITHM_MINIMAL, DIFF_ALGORITHM_PATIENCE, DIFF_ALGORITHM_HISTOGRAM, DIFF_ALGORITHM_NONE }) + { + options.nDiffAlgorithm = algo; + + { + DiffList diffList; + TempFile left = WriteToTempFile(_T("a\nb\nc1")); + TempFile right = WriteToTempFile(_T("a\nb\nc2")); + dw.SetCreateDiffList(&diffList); + dw.SetPaths({ left.GetPath(), right.GetPath() }, false); + dw.SetOptions(&options); + dw.RunFileDiff(); + EXPECT_EQ(1, diffList.GetSize()); + diffList.GetDiff(0, dr); + EXPECT_EQ(2, dr.begin[0]); + EXPECT_EQ(2, dr.begin[1]); + EXPECT_EQ(2, dr.end[0]); + EXPECT_EQ(2, dr.end[1]); + EXPECT_EQ(OP_DIFF, dr.op); + } + + { + DiffList diffList; + TempFile left = WriteToTempFile(_T("a\nb\nc1\n")); + TempFile right = WriteToTempFile(_T("a\nb\nc2")); + dw.SetCreateDiffList(&diffList); + dw.SetPaths({ left.GetPath(), right.GetPath() }, false); + dw.SetOptions(&options); + dw.RunFileDiff(); + EXPECT_EQ(1, diffList.GetSize()); + diffList.GetDiff(0, dr); + EXPECT_EQ(2, dr.begin[0]); + EXPECT_EQ(2, dr.begin[1]); + EXPECT_EQ(2, dr.end[0]); + EXPECT_EQ(2, dr.end[1]); + EXPECT_EQ(OP_DIFF, dr.op); + } + + { + DiffList diffList; + TempFile left = WriteToTempFile(_T("a\nb\nc1")); + TempFile right = WriteToTempFile(_T("a\nb\nc2\n")); + dw.SetCreateDiffList(&diffList); + dw.SetPaths({ left.GetPath(), right.GetPath() }, false); + dw.SetOptions(&options); + dw.RunFileDiff(); + EXPECT_EQ(1, diffList.GetSize()); + diffList.GetDiff(0, dr); + EXPECT_EQ(2, dr.begin[0]); + EXPECT_EQ(2, dr.begin[1]); + EXPECT_EQ(2, dr.end[0]); + EXPECT_EQ(2, dr.end[1]); + EXPECT_EQ(OP_DIFF, dr.op); + } + + { + DiffList diffList; + TempFile left = WriteToTempFile(_T("a\nb1\nc")); + TempFile right = WriteToTempFile(_T("a\nb2\nc")); + dw.SetCreateDiffList(&diffList); + dw.SetPaths({ left.GetPath(), right.GetPath() }, false); + dw.SetOptions(&options); + dw.RunFileDiff(); + EXPECT_EQ(1, diffList.GetSize()); + diffList.GetDiff(0, dr); + EXPECT_EQ(1, dr.begin[0]); + EXPECT_EQ(1, dr.begin[1]); + EXPECT_EQ(1, dr.end[0]); + EXPECT_EQ(1, dr.end[1]); + EXPECT_EQ(OP_DIFF, dr.op); + } + + for (const auto& eol : { _T("\n"), _T("\r"), _T("\r\n") }) + { + DiffList diffList; + TempFile left = WriteToTempFile(_T("a\nb\nc")); + TempFile right = WriteToTempFile(_T("a\nb\nc") + String(eol)); + dw.SetCreateDiffList(&diffList); + dw.SetPaths({ left.GetPath(), right.GetPath() }, false); + dw.SetOptions(&options); + dw.RunFileDiff(); + EXPECT_EQ(1, diffList.GetSize()); + diffList.GetDiff(0, dr); + EXPECT_EQ(2, dr.begin[0]); + EXPECT_EQ(2, dr.begin[1]); + EXPECT_EQ(2, dr.end[0]); + EXPECT_EQ(2, dr.end[1]); + EXPECT_EQ(OP_TRIVIAL, dr.op); + } + + for (const auto& eol : { _T("\n"), _T("\r"), _T("\r\n") }) + { + DiffList diffList; + TempFile left = WriteToTempFile(_T("a\nb\nc") + String(eol)); + TempFile right = WriteToTempFile(_T("a\nb\nc")); + dw.SetCreateDiffList(&diffList); + dw.SetPaths({ left.GetPath(), right.GetPath() }, false); + dw.SetOptions(&options); + dw.RunFileDiff(); + EXPECT_EQ(1, diffList.GetSize()); + diffList.GetDiff(0, dr); + EXPECT_EQ(2, dr.begin[0]); + EXPECT_EQ(2, dr.begin[1]); + EXPECT_EQ(2, dr.end[0]); + EXPECT_EQ(2, dr.end[1]); + EXPECT_EQ(OP_TRIVIAL, dr.op); + } + + } +} + TEST(DiffWrapper, RunFileDiff_IgnoreComments) { CDiffWrapper dw; From 1155de310f15dd570721a0e66094bab6b5e04390 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Fri, 20 Dec 2024 09:04:30 +0900 Subject: [PATCH 11/23] WIP --- Src/CompareEngines/ByteCompare.cpp | 4 +- Src/CompareEngines/Wrap_DiffUtils.cpp | 2 +- Src/CompareOptions.cpp | 6 +-- Src/CompareOptions.h | 4 +- Src/DiffWrapper.cpp | 6 +-- Src/MainFrm.cpp | 12 ++--- Src/MainFrm.h | 4 +- Src/Merge.rc | 6 +-- Src/OpenView.cpp | 24 +++++----- Src/OpenView.h | 6 +-- Src/OptionsDef.h | 2 +- Src/OptionsDiffOptions.cpp | 6 +-- Src/ProjectFile.cpp | 12 ++--- Src/ProjectFile.h | 44 +++++++++---------- Src/PropCompare.cpp | 10 ++--- Src/PropCompare.h | 2 +- Src/resource.h | 4 +- .../ByteCompare/ByteCompare_test.cpp | 12 ++--- .../DiffWrapper/DiffWrapper_test.cpp | 4 +- .../ProjectFile_test_PathsAndFilter.cpp | 9 ++++ .../TestData/PathsAndFilter.WinMerge | 13 ++++++ Translations/WinMerge/Arabic.po | 2 +- Translations/WinMerge/Basque.po | 2 +- Translations/WinMerge/Brazilian.po | 2 +- Translations/WinMerge/Bulgarian.po | 2 +- Translations/WinMerge/Catalan.po | 2 +- Translations/WinMerge/ChineseSimplified.po | 2 +- Translations/WinMerge/ChineseTraditional.po | 2 +- Translations/WinMerge/Corsican.po | 2 +- Translations/WinMerge/Croatian.po | 2 +- Translations/WinMerge/Czech.po | 2 +- Translations/WinMerge/Danish.po | 2 +- Translations/WinMerge/Dutch.po | 2 +- Translations/WinMerge/English.pot | 2 +- Translations/WinMerge/Finnish.po | 2 +- Translations/WinMerge/French.po | 2 +- Translations/WinMerge/Galician.po | 2 +- Translations/WinMerge/German.po | 2 +- Translations/WinMerge/Greek.po | 2 +- Translations/WinMerge/Hungarian.po | 2 +- Translations/WinMerge/Italian.po | 2 +- Translations/WinMerge/Japanese.po | 2 +- Translations/WinMerge/Korean.po | 2 +- Translations/WinMerge/Lithuanian.po | 2 +- Translations/WinMerge/Norwegian.po | 2 +- Translations/WinMerge/Persian.po | 2 +- Translations/WinMerge/Polish.po | 2 +- Translations/WinMerge/Portuguese.po | 2 +- Translations/WinMerge/Romanian.po | 2 +- Translations/WinMerge/Russian.po | 2 +- Translations/WinMerge/Serbian.po | 2 +- Translations/WinMerge/Sinhala.po | 2 +- Translations/WinMerge/Slovak.po | 2 +- Translations/WinMerge/Slovenian.po | 2 +- Translations/WinMerge/Spanish.po | 2 +- Translations/WinMerge/Swedish.po | 2 +- Translations/WinMerge/Tamil.po | 2 +- Translations/WinMerge/Turkish.po | 2 +- Translations/WinMerge/Ukrainian.po | 2 +- 59 files changed, 145 insertions(+), 123 deletions(-) diff --git a/Src/CompareEngines/ByteCompare.cpp b/Src/CompareEngines/ByteCompare.cpp index 0484828d683..6700a1a1939 100644 --- a/Src/CompareEngines/ByteCompare.cpp +++ b/Src/CompareEngines/ByteCompare.cpp @@ -127,7 +127,7 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) if (rtn < space) eof[i] = true; bfend[i] += rtn; - if (m_pOptions->m_bIgnoreEofNewlinePresence) + if (m_pOptions->m_bIgnoreMissingTrailingEol) { for (int64_t j = (std::max)(bfstart[i], bfend[i] - 4); j < bfend[i]; ++j) { @@ -178,7 +178,7 @@ int ByteCompare::CompareFiles(DiffFileData* diffData) } else { - if (m_pOptions->m_bIgnoreEofNewlinePresence) + if (m_pOptions->m_bIgnoreMissingTrailingEol) { if ((eof[0] || eof[1]) && ((end0 - ptr0 <= 1 && (lasteol[0] == "\r" || lasteol[0] == "\n" || lasteol[0] == "\r\n") && (end1 == ptr1))) || diff --git a/Src/CompareEngines/Wrap_DiffUtils.cpp b/Src/CompareEngines/Wrap_DiffUtils.cpp index 88b7d636ef4..80ed99270d0 100644 --- a/Src/CompareEngines/Wrap_DiffUtils.cpp +++ b/Src/CompareEngines/Wrap_DiffUtils.cpp @@ -113,7 +113,7 @@ int DiffUtils::CompareFiles(DiffFileData* diffData) if (script != nullptr) { const bool usefilters = m_pDiffWrapper->GetOptions().m_filterCommentsLines || - m_pDiffWrapper->GetOptions().m_bIgnoreEofNewlinePresence || + m_pDiffWrapper->GetOptions().m_bIgnoreMissingTrailingEol || (m_pDiffWrapper->GetFilterList() && m_pDiffWrapper->GetFilterList()->HasRegExps()) || (m_pDiffWrapper->GetSubstitutionList() && m_pDiffWrapper->GetSubstitutionList()->HasRegExps()); diff --git a/Src/CompareOptions.cpp b/Src/CompareOptions.cpp index 5e06b9e39b6..1fe25f6deff 100644 --- a/Src/CompareOptions.cpp +++ b/Src/CompareOptions.cpp @@ -20,7 +20,7 @@ CompareOptions::CompareOptions() , m_bIgnoreCase(false) , m_bIgnoreEOLDifference(false) , m_bIgnoreNumbers(false) -, m_bIgnoreEofNewlinePresence(false) +, m_bIgnoreMissingTrailingEol(false) { } @@ -49,7 +49,7 @@ void CompareOptions::SetFromDiffOptions(const DIFFOPTIONS &options) m_bIgnoreCase = options.bIgnoreCase; m_bIgnoreEOLDifference = options.bIgnoreEol; m_bIgnoreNumbers = options.bIgnoreNumbers; - m_bIgnoreEofNewlinePresence = options.bIgnoreEofNewlinePresence; + m_bIgnoreMissingTrailingEol = options.bIgnoreMissingTrailingEol; } /** @@ -189,7 +189,7 @@ void DiffutilsOptions::GetAsDiffOptions(DIFFOPTIONS &options) const options.bIgnoreEol = m_bIgnoreEOLDifference; options.bIgnoreNumbers = m_bIgnoreNumbers; options.nDiffAlgorithm = m_diffAlgorithm; - options.bIgnoreEofNewlinePresence = m_bIgnoreEofNewlinePresence; + options.bIgnoreMissingTrailingEol = m_bIgnoreMissingTrailingEol; switch (m_ignoreWhitespace) { diff --git a/Src/CompareOptions.h b/Src/CompareOptions.h index 771f4ff8d12..f6dec07c6f5 100644 --- a/Src/CompareOptions.h +++ b/Src/CompareOptions.h @@ -87,7 +87,7 @@ struct DIFFOPTIONS bool bFilterCommentsLines; /**< Ignore Multiline comments differences -option. */ bool bIndentHeuristic; /**< Ident heuristic -option */ bool bCompletelyBlankOutIgnoredChanges; - bool bIgnoreEofNewlinePresence; /**< Ignore EOF newline presence -option. */ + bool bIgnoreMissingTrailingEol; /**< Ignore missing trailing EOL -option. */ }; /** @@ -106,7 +106,7 @@ class CompareOptions bool m_bIgnoreCase; /**< Ignore case differences? */ bool m_bIgnoreNumbers; /**< Ignore number differences? */ bool m_bIgnoreEOLDifference; /**< Ignore EOL style differences? */ - bool m_bIgnoreEofNewlinePresence; /**< Ignore EOF newline presence */ + bool m_bIgnoreMissingTrailingEol; /**< Ignore missing trailing EOL */ }; /** diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index fa9412a8634..19c52c5e488 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -469,7 +469,7 @@ int CDiffWrapper::PostFilter(PostFilterContext& ctxt, change* thisob, const file Replace(lineDataRight, "\r\n", "\n"); Replace(lineDataRight, "\r", "\n"); } - if (thisob->link == nullptr && m_options.m_bIgnoreEofNewlinePresence && (file_data_ary[0].missing_newline || file_data_ary[1].missing_newline)) + if (thisob->link == nullptr && m_options.m_bIgnoreMissingTrailingEol && (file_data_ary[0].missing_newline || file_data_ary[1].missing_newline)) { RemoveEOL(lineDataLeft); RemoveEOL(lineDataRight); @@ -1227,7 +1227,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript(struct change * script, const struct change *next = script; const bool usefilters = m_options.m_filterCommentsLines || - m_options.m_bIgnoreEofNewlinePresence || + m_options.m_bIgnoreMissingTrailingEol || (m_pFilterList && m_pFilterList->HasRegExps()) || (m_pSubstitutionList && m_pSubstitutionList->HasRegExps()); @@ -1399,7 +1399,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript3( diff12.Clear(); const bool usefilters = m_options.m_filterCommentsLines || - m_options.m_bIgnoreEofNewlinePresence || + m_options.m_bIgnoreMissingTrailingEol || (m_pFilterList && m_pFilterList->HasRegExps()) || (m_pSubstitutionList && m_pSubstitutionList->HasRegExps()); diff --git a/Src/MainFrm.cpp b/Src/MainFrm.cpp index a4b7ac41247..50737ecf4bc 100644 --- a/Src/MainFrm.cpp +++ b/Src/MainFrm.cpp @@ -317,8 +317,8 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_IGNORE_CODEPAGE, OnUpdateDiffIgnoreCP) ON_COMMAND(ID_DIFF_OPTIONS_IGNORE_COMMENTS, OnDiffIgnoreComments) ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_IGNORE_COMMENTS, OnUpdateDiffIgnoreComments) - ON_COMMAND(ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnDiffIgnoreEofNewlinePresence) - ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnUpdateDiffIgnoreEofNewlinePresence) + ON_COMMAND(ID_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL, OnDiffIgnoreMissingTrailingEol) + ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL, OnUpdateDiffIgnoreMissingTrailingEol) ON_COMMAND(ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS, OnIncludeSubfolders) ON_UPDATE_COMMAND_UI(ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS, OnUpdateIncludeSubfolders) ON_COMMAND_RANGE(ID_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS, ID_DIFF_OPTIONS_COMPMETHOD_SIZE, OnCompareMethod) @@ -3219,15 +3219,15 @@ void CMainFrame::OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI) pCmdUI->Enable(); } -void CMainFrame::OnDiffIgnoreEofNewlinePresence() +void CMainFrame::OnDiffIgnoreMissingTrailingEol() { - GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, !GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE)); + GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_MISSING_TRAILING_EOL, !GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_MISSING_TRAILING_EOL)); ApplyDiffOptions(); } -void CMainFrame::OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI) +void CMainFrame::OnUpdateDiffIgnoreMissingTrailingEol(CCmdUI* pCmdUI) { - pCmdUI->SetCheck(GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE)); + pCmdUI->SetCheck(GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_MISSING_TRAILING_EOL)); pCmdUI->Enable(); } diff --git a/Src/MainFrm.h b/Src/MainFrm.h index 982aed30d64..bfa3bbd10f3 100644 --- a/Src/MainFrm.h +++ b/Src/MainFrm.h @@ -413,8 +413,8 @@ class CMainFrame : public CMDIFrameWnd afx_msg void OnUpdateDiffIgnoreCP(CCmdUI* pCmdUI); afx_msg void OnDiffIgnoreComments(); afx_msg void OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI); - afx_msg void OnDiffIgnoreEofNewlinePresence(); - afx_msg void OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI); + afx_msg void OnDiffIgnoreMissingTrailingEol(); + afx_msg void OnUpdateDiffIgnoreMissingTrailingEol(CCmdUI* pCmdUI); afx_msg void OnIncludeSubfolders(); afx_msg void OnUpdateIncludeSubfolders(CCmdUI* pCmdUI); afx_msg void OnCompareMethod(UINT nID); diff --git a/Src/Merge.rc b/Src/Merge.rc index 1d07e49a7f1..0db9c364042 100644 --- a/Src/Merge.rc +++ b/Src/Merge.rc @@ -1093,7 +1093,7 @@ BEGIN MENUITEM "Ignore codepage &differences", ID_DIFF_OPTIONS_IGNORE_CODEPAGE MENUITEM "Ignore num&bers", IDC_DIFF_IGNORENUMBERS MENUITEM "Ignore c&omment differences", ID_DIFF_OPTIONS_IGNORE_COMMENTS - MENUITEM "Ignore &end-of-file newline presence", ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE + MENUITEM "Ignore &missing trailing EOL", ID_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL MENUITEM SEPARATOR MENUITEM "&Include subfolders", ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS POPUP "&Compare method:" @@ -1124,7 +1124,7 @@ BEGIN MENUITEM "Ignore codepage &differences", ID_PROJECT_DIFF_OPTIONS_IGNORE_CODEPAGE MENUITEM "Ignore num&bers", ID_PROJECT_DIFF_OPTIONS_IGNORE_NUMBERS MENUITEM "Ignore c&omment differences", ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS - MENUITEM "Ignore &end-of-file newline presence", ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE + MENUITEM "Ignore &missing trailing EOL", ID_PROJECT_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL MENUITEM SEPARATOR POPUP "&Compare method:" BEGIN @@ -1954,7 +1954,7 @@ BEGIN CONTROL "Ignore codepage &differences",IDC_CP_SENSITIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,108,269,10 CONTROL "Ignore c&omment differences",IDC_FILTERCOMMENTS_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,120,239,10 - CONTROL "Ignore &end-of-file newline presence",IDC_IGNEOFEOL_CHECK, + CONTROL "Ignore &missing trailing EOL",IDC_IGNEOFEOL_CHECK, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,132,239,10 CONTROL "E&nable moved block detection",IDC_MOVED_BLOCKS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,144,269,10 CONTROL "Align &similar lines",IDC_ALIGN_SIMILAR_LINES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,156,269,10 diff --git a/Src/OpenView.cpp b/Src/OpenView.cpp index 4b09a8ca46a..79dea88687f 100644 --- a/Src/OpenView.cpp +++ b/Src/OpenView.cpp @@ -86,8 +86,8 @@ BEGIN_MESSAGE_MAP(COpenView, CFormView) ON_UPDATE_COMMAND_UI(ID_PROJECT_DIFF_OPTIONS_IGNORE_CODEPAGE, OnUpdateDiffIgnoreCP) ON_COMMAND(ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS, OnDiffIgnoreComments) ON_UPDATE_COMMAND_UI(ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS, OnUpdateDiffIgnoreComments) - ON_COMMAND(ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnDiffIgnoreEofNewlinePresence) - ON_UPDATE_COMMAND_UI(ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE, OnUpdateDiffIgnoreEofNewlinePresence) + ON_COMMAND(ID_PROJECT_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL, OnDiffIgnoreMissingTrailingEol) + ON_UPDATE_COMMAND_UI(ID_PROJECT_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL, OnUpdateDiffIgnoreMissingTrailingEol) ON_COMMAND_RANGE(ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS, ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_SIZE, OnCompareMethod) ON_UPDATE_COMMAND_UI_RANGE(ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS, ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_SIZE, OnUpdateCompareMethod) ON_WM_ACTIVATE() @@ -878,8 +878,8 @@ void COpenView::OnLoadProject() m_bIgnoreNumbers = projItem.GetIgnoreNumbers(); if (projItem.HasIgnoreCodepage()) m_bIgnoreCodepage = projItem.GetIgnoreCodepage(); - if (projItem.HasIgnoreEofNewlinePresence()) - m_bIgnoreEofNewlinePresence = projItem.GetIgnoreEofNewlinePresence(); + if (projItem.HasIgnoreMissingTrailingEol()) + m_bIgnoreMissingTrailingEol = projItem.GetIgnoreMissingTrailingEol(); if (projItem.HasFilterCommentsLines()) m_bFilterCommentsLines = projItem.GetFilterCommentsLines(); if (projItem.HasCompareMethod()) @@ -925,7 +925,7 @@ void COpenView::OnSaveProject() projItem.SetSaveIgnoreEol(bSaveCompareOptions); projItem.SetSaveIgnoreNumbers(bSaveCompareOptions); projItem.SetSaveIgnoreCodepage(bSaveCompareOptions); - projItem.SetSaveIgnoreEofNewlinePresence(bSaveCompareOptions); + projItem.SetSaveIgnoreMissingTrailingEol(bSaveCompareOptions); projItem.SetSaveFilterCommentsLines(bSaveCompareOptions); projItem.SetSaveCompareMethod(bSaveCompareOptions); projItem.SetSaveHiddenItems(bSaveHiddenItems); @@ -991,7 +991,7 @@ void COpenView::OnSaveProject() projItem.SetIgnoreEol(m_bIgnoreEol); projItem.SetIgnoreNumbers(m_bIgnoreNumbers); projItem.SetIgnoreCodepage(m_bIgnoreCodepage); - projItem.SetIgnoreEofNewlinePresence(m_bIgnoreEofNewlinePresence); + projItem.SetIgnoreMissingTrailingEol(m_bIgnoreMissingTrailingEol); projItem.SetFilterCommentsLines(m_bFilterCommentsLines); projItem.SetCompareMethod(m_nCompareMethod); } @@ -1621,20 +1621,20 @@ void COpenView::OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI) } /** - * @brief Toggle "Ignore EOF newline presence" setting. + * @brief Toggle "Ignore missing trailing EOL" setting. */ -void COpenView::OnDiffIgnoreEofNewlinePresence() +void COpenView::OnDiffIgnoreMissingTrailingEol() { - m_bIgnoreEofNewlinePresence = !m_bIgnoreEofNewlinePresence; + m_bIgnoreMissingTrailingEol = !m_bIgnoreMissingTrailingEol; } /** - * @brief Update "Ignore EOF newline presence" state. + * @brief Update "Ignore missing trailing EOL" state. * @param [in] pCmdUI UI component to update. */ -void COpenView::OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI) +void COpenView::OnUpdateDiffIgnoreMissingTrailingEol(CCmdUI* pCmdUI) { - pCmdUI->SetCheck(m_bIgnoreEofNewlinePresence); + pCmdUI->SetCheck(m_bIgnoreMissingTrailingEol); } /** diff --git a/Src/OpenView.h b/Src/OpenView.h index 455e9d0b229..a1d2478982e 100644 --- a/Src/OpenView.h +++ b/Src/OpenView.h @@ -90,7 +90,7 @@ class COpenView : public CFormView, public DlgUtils bool m_bIgnoreNumbers; /**< The value of the "Ignore numbers" setting */ bool m_bIgnoreCodepage; /**< The value of the "Ignore codepage differences" setting */ bool m_bFilterCommentsLines; /**< The value of the "Ignore comment differences" setting */ - bool m_bIgnoreEofNewlinePresence; /**< The value of the "Ignore EOF newline presence" setting */ + bool m_bIgnoreMissingTrailingEol; /**< The value of the "Ignore missing trailing EOL" setting */ int m_nCompareMethod; /**< The value of the "Compare method" setting */ // Overrides public: @@ -150,8 +150,8 @@ virtual BOOL PreCreateWindow(CREATESTRUCT& cs); afx_msg void OnUpdateDiffIgnoreCP(CCmdUI* pCmdUI); afx_msg void OnDiffIgnoreComments(); afx_msg void OnUpdateDiffIgnoreComments(CCmdUI* pCmdUI); - afx_msg void OnDiffIgnoreEofNewlinePresence(); - afx_msg void OnUpdateDiffIgnoreEofNewlinePresence(CCmdUI* pCmdUI); + afx_msg void OnDiffIgnoreMissingTrailingEol(); + afx_msg void OnUpdateDiffIgnoreMissingTrailingEol(CCmdUI* pCmdUI); afx_msg void OnCompareMethod(UINT nID); afx_msg void OnUpdateCompareMethod(CCmdUI* pCmdUI); afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized); diff --git a/Src/OptionsDef.h b/Src/OptionsDef.h index 39af4f28400..de4fed9e466 100644 --- a/Src/OptionsDef.h +++ b/Src/OptionsDef.h @@ -212,7 +212,7 @@ inline const String OPT_CMP_IGNORE_CASE {_T("Settings/IgnoreCase"s)}; inline const String OPT_CMP_IGNORE_NUMBERS {_T("Settings/IgnoreNumbers"s)}; inline const String OPT_CMP_IGNORE_EOL {_T("Settings/IgnoreEol"s)}; inline const String OPT_CMP_IGNORE_CODEPAGE {_T("Settings/IgnoreCodepage"s)}; -inline const String OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE {_T("Settings/IgnoreEOFNewlinePresence"s)}; +inline const String OPT_CMP_IGNORE_MISSING_TRAILING_EOL {_T("Settings/IgnoreMissingTrailingEol"s)}; inline const String OPT_CMP_METHOD {_T("Settings/CompMethod2"s)}; inline const String OPT_CMP_MOVED_BLOCKS {_T("Settings/MovedBlocks"s)}; inline const String OPT_CMP_ALIGN_SIMILAR_LINES {_T("Settings/MatchSimilarLines"s)}; diff --git a/Src/OptionsDiffOptions.cpp b/Src/OptionsDiffOptions.cpp index e109e307cdc..0df45952ed5 100644 --- a/Src/OptionsDiffOptions.cpp +++ b/Src/OptionsDiffOptions.cpp @@ -25,7 +25,7 @@ void Init(COptionsMgr *pOptionsMgr) pOptionsMgr->InitOption(OPT_CMP_DIFF_ALGORITHM, (int)0, 0, 4); pOptionsMgr->InitOption(OPT_CMP_INDENT_HEURISTIC, true); pOptionsMgr->InitOption(OPT_CMP_COMPLETELY_BLANK_OUT_IGNORED_CHANGES, false); - pOptionsMgr->InitOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, false); + pOptionsMgr->InitOption(OPT_CMP_IGNORE_MISSING_TRAILING_EOL, false); } void Load(const COptionsMgr *pOptionsMgr, DIFFOPTIONS& options) @@ -37,7 +37,7 @@ void Load(const COptionsMgr *pOptionsMgr, DIFFOPTIONS& options) options.bIgnoreCase = pOptionsMgr->GetBool(OPT_CMP_IGNORE_CASE); options.bIgnoreNumbers = pOptionsMgr->GetBool(OPT_CMP_IGNORE_NUMBERS); options.bIgnoreEol = pOptionsMgr->GetBool(OPT_CMP_IGNORE_EOL); - options.bIgnoreEofNewlinePresence = pOptionsMgr->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE); + options.bIgnoreMissingTrailingEol = pOptionsMgr->GetBool(OPT_CMP_IGNORE_MISSING_TRAILING_EOL); options.bIndentHeuristic = pOptionsMgr->GetBool(OPT_CMP_INDENT_HEURISTIC); options.bCompletelyBlankOutIgnoredChanges = pOptionsMgr->GetBool(OPT_CMP_COMPLETELY_BLANK_OUT_IGNORED_CHANGES); } @@ -51,7 +51,7 @@ void Save(COptionsMgr *pOptionsMgr, const DIFFOPTIONS& options) pOptionsMgr->SaveOption(OPT_CMP_IGNORE_CASE, options.bIgnoreCase); pOptionsMgr->SaveOption(OPT_CMP_IGNORE_NUMBERS, options.bIgnoreNumbers); pOptionsMgr->SaveOption(OPT_CMP_IGNORE_EOL, options.bIgnoreEol); - pOptionsMgr->SaveOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, options.bIgnoreEofNewlinePresence); + pOptionsMgr->SaveOption(OPT_CMP_IGNORE_MISSING_TRAILING_EOL, options.bIgnoreMissingTrailingEol); pOptionsMgr->SaveOption(OPT_CMP_INDENT_HEURISTIC, options.bIndentHeuristic); pOptionsMgr->SaveOption(OPT_CMP_COMPLETELY_BLANK_OUT_IGNORED_CHANGES, options.bCompletelyBlankOutIgnoredChanges); } diff --git a/Src/ProjectFile.cpp b/Src/ProjectFile.cpp index d13730ead0e..1922ff9db78 100755 --- a/Src/ProjectFile.cpp +++ b/Src/ProjectFile.cpp @@ -56,7 +56,7 @@ const char Ignore_cr_diff_element_name[] = "ignore-carriage-return-diff"; const char Ignore_numbers_element_name[] = "ignore-numbers"; const char Ignore_codepage_diff_element_name[] = "ignore-codepage-diff"; const char Ignore_comment_diff_element_name[] = "ignore-comment-diff"; -const char Ignore_eof_newline_presence_element_name[] = "ignore-eof-newline-presence"; +const char Ignore_missing_trailing_eol_element_name[] = "ignore-missing-trailing-eol"; const char Compare_method_element_name[] = "compare-method"; const char Hidden_list_element_name[] = "hidden-list"; const char Hidden_items_element_name[] = "hidden-item"; @@ -211,9 +211,9 @@ class ProjectFileHandler: public ContentHandler { currentItem.m_bIgnoreCodepage = atoi(token.c_str()) != 0; } - else if (nodename == Ignore_eof_newline_presence_element_name) + else if (nodename == Ignore_missing_trailing_eol_element_name) { - currentItem.m_bIgnoreEofNewlinePresence = atoi(token.c_str()) != 0; + currentItem.m_bIgnoreMissingTrailingEol = atoi(token.c_str()) != 0; } else if (nodename == Ignore_comment_diff_element_name) { @@ -263,7 +263,7 @@ const String ProjectFile::PROJECTFILE_EXT = toTString("WinMerge"); , m_bSaveIgnoreEol(true) , m_bSaveIgnoreNumbers(true) , m_bSaveIgnoreCodepage(true) -, m_bSaveIgnoreEofNewlinePresence(true) +, m_bSaveIgnoreMissingTrailingEol(true) , m_bSaveFilterCommentsLines(true) , m_bSaveCompareMethod(true) , m_bSaveHiddenItems(true) @@ -436,8 +436,8 @@ bool ProjectFile::Save(const String& path) const writeElement(writer, Ignore_numbers_element_name, item.GetIgnoreNumbers() ? "1" : "0"); if (item.m_bSaveIgnoreCodepage) writeElement(writer, Ignore_codepage_diff_element_name, item.GetIgnoreCodepage() ? "1" : "0"); - if (item.m_bSaveIgnoreEofNewlinePresence) - writeElement(writer, Ignore_eof_newline_presence_element_name, item.GetIgnoreEofNewlinePresence() ? "1" : "0"); + if (item.m_bSaveIgnoreMissingTrailingEol) + writeElement(writer, Ignore_missing_trailing_eol_element_name, item.GetIgnoreMissingTrailingEol() ? "1" : "0"); if (item.m_bSaveFilterCommentsLines) writeElement(writer, Ignore_comment_diff_element_name, item.GetFilterCommentsLines() ? "1" : "0"); if (item.m_bSaveCompareMethod) diff --git a/Src/ProjectFile.h b/Src/ProjectFile.h index 8fe913dea8f..a79e51a94f7 100755 --- a/Src/ProjectFile.h +++ b/Src/ProjectFile.h @@ -36,7 +36,7 @@ class ProjectFileItem bool HasIgnoreEol() const; bool HasIgnoreNumbers() const; bool HasIgnoreCodepage() const; - bool HasIgnoreEofNewlinePresence() const; + bool HasIgnoreMissingTrailingEol() const; bool HasFilterCommentsLines() const; bool HasCompareMethod() const; bool HasHiddenItems() const; @@ -64,7 +64,7 @@ class ProjectFileItem bool GetIgnoreEol() const; bool GetIgnoreNumbers() const; bool GetIgnoreCodepage() const; - bool GetIgnoreEofNewlinePresence() const; + bool GetIgnoreMissingTrailingEol() const; bool GetFilterCommentsLines() const; int GetCompareMethod() const; const std::vector& GetHiddenItems() const; @@ -89,7 +89,7 @@ class ProjectFileItem void SetIgnoreEol(bool bIgnoreEol); void SetIgnoreNumbers(bool bIgnoreNumbers); void SetIgnoreCodepage(bool bIgnoreCodepage); - void SetIgnoreEofNewlinePresence(bool bIgnoreEofNewlinePresence); + void SetIgnoreMissingTrailingEol(bool bIgnoreMissingTrailingEol); void SetFilterCommentsLines(bool bFilterCommentsLines); void SetCompareMethod(int nCompareMethod); void SetHiddenItems(const std::vector& hiddenItems); @@ -107,7 +107,7 @@ class ProjectFileItem void SetSaveIgnoreEol(bool bSaveIgnoreEol); void SetSaveIgnoreNumbers(bool bSaveIgnoreNumbers); void SetSaveIgnoreCodepage(bool bSaveIgnoreCodepage); - void SetSaveIgnoreEofNewlinePresence(bool bSaveIgnoreEofNewlinePresence); + void SetSaveIgnoreMissingTrailingEol(bool bSaveIgnoreMissingTrailingEol); void SetSaveFilterCommentsLines(bool bSaveFilterCommentsLines); void SetSaveCompareMethod(bool bSaveCompareMethod); void SetSaveHiddenItems(bool bSaveHiddenItems); @@ -137,7 +137,7 @@ class ProjectFileItem std::optional m_bIgnoreEol; /**< The value of the "Ignore carriage return differences" setting */ std::optional m_bIgnoreNumbers; /**< The value of the "Ignore numbers" setting */ std::optional m_bIgnoreCodepage; /**< The value of the "Ignore codepage differences" setting */ - std::optional m_bIgnoreEofNewlinePresence; /**< The value of the "Ignore EOF newline presence" setting */ + std::optional m_bIgnoreMissingTrailingEol; /**< The value of the "Ignore missing trailing EOL" setting */ std::optional m_bFilterCommentsLines; /**< The value of the "Ignore comment differences" setting */ std::optional m_nCompareMethod; /**< The value of the "Compare method" setting */ std::vector m_vSavedHiddenItems; /**< The list of hidden items saved */ @@ -151,7 +151,7 @@ class ProjectFileItem bool m_bSaveIgnoreEol; /**< Save "Ignore carriage return differences" setting? */ bool m_bSaveIgnoreNumbers; /**< Save "Ignore numbers" setting? */ bool m_bSaveIgnoreCodepage; /**< Save "Ignore codepage differences" setting? */ - bool m_bSaveIgnoreEofNewlinePresence; /**< Save "Ignore EOF newline presence" setting? */ + bool m_bSaveIgnoreMissingTrailingEol; /**< Save "Ignore missing trailing EOL" setting? */ bool m_bSaveFilterCommentsLines; /**< Save "Ignore comment differences" setting? */ bool m_bSaveCompareMethod; /**< Save "Compare method" setting? */ bool m_bSaveHiddenItems;/* Save "Hidden item" settings?*/ @@ -409,12 +409,12 @@ inline bool ProjectFileItem::HasIgnoreCodepage() const } /** - * @brief Returns if "Ignore EOF newline presence" setting is defined in projectfile. - * @return true if project file has "Ignore EOF newline presence" setting definition. + * @brief Returns if "Ignore missing trailing EOL" setting is defined in projectfile. + * @return true if project file has "Ignore missing trailing EOL" setting definition. */ -inline bool ProjectFileItem::HasIgnoreEofNewlinePresence() const +inline bool ProjectFileItem::HasIgnoreMissingTrailingEol() const { - return m_bIgnoreEofNewlinePresence.has_value(); + return m_bIgnoreMissingTrailingEol.has_value(); } /** @@ -723,21 +723,21 @@ inline void ProjectFileItem::SetIgnoreCodepage(bool bIgnoreCodepage) } /** - * @brief Returns the value of the "Ignore EOF newline presence" setting. - * @return The value of the "Ignore EOF newline presence" setting + * @brief Returns the value of the "Ignore missing trailing EOL" setting. + * @return The value of the "Ignore missing trailing EOL" setting */ -inline bool ProjectFileItem::GetIgnoreEofNewlinePresence() const +inline bool ProjectFileItem::GetIgnoreMissingTrailingEol() const { - return m_bIgnoreEofNewlinePresence.value_or(false); + return m_bIgnoreMissingTrailingEol.value_or(false); } /** - * @brief Set the value of the "Ignore EOF newline presence" setting. - * @param [in] bIgnoreEofNewlinePresence New value of the "Ignore EOF newline presence" setting to set. + * @brief Set the value of the "Ignore missing trailing EOL" setting. + * @param [in] bIgnoreMissingTrailingEol New value of the "Ignore missing trailing EOL" setting to set. */ -inline void ProjectFileItem::SetIgnoreEofNewlinePresence(bool bIgnoreEofNewlinePresence) +inline void ProjectFileItem::SetIgnoreMissingTrailingEol(bool bIgnoreMissingTrailingEol) { - m_bIgnoreEofNewlinePresence = bIgnoreEofNewlinePresence; + m_bIgnoreMissingTrailingEol = bIgnoreMissingTrailingEol; } /** @@ -897,12 +897,12 @@ inline void ProjectFileItem::SetSaveIgnoreCodepage(bool bSaveIgnoreCodepage) } /** - * @brief Set whether to save "Ignore EOF newline presence" setting. - * @param [in] bSaveIgnoreEofNewlinePresence Whether to save "Ignore EOF newline presence" setting. + * @brief Set whether to save "Ignore missing trailing EOL" setting. + * @param [in] bSaveIgnoreMissingTrailingEol Whether to save "Ignore missing trailing EOL" setting. */ -inline void ProjectFileItem::SetSaveIgnoreEofNewlinePresence(bool bSaveIgnoreEofNewlinePresence) +inline void ProjectFileItem::SetSaveIgnoreMissingTrailingEol(bool bSaveIgnoreMissingTrailingEol) { - m_bSaveIgnoreEofNewlinePresence = bSaveIgnoreEofNewlinePresence; + m_bSaveIgnoreMissingTrailingEol = bSaveIgnoreMissingTrailingEol; } /** diff --git a/Src/PropCompare.cpp b/Src/PropCompare.cpp index 77ffb8abe25..7ce20f920d6 100644 --- a/Src/PropCompare.cpp +++ b/Src/PropCompare.cpp @@ -25,7 +25,7 @@ PropCompare::PropCompare(COptionsMgr *optionsMgr) , m_bIgnoreBlankLines(false) , m_bIgnoreEol(true) , m_bIgnoreCodepage(true) - , m_bIgnoreEofNewlinePresence(true) + , m_bIgnoreMissingTrailingEol(true) , m_nIgnoreWhite(-1) , m_bMovedBlocks(false) , m_bAlignSimilarLines(false) @@ -48,7 +48,7 @@ void PropCompare::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_CP_SENSITIVE, m_bIgnoreCodepage); DDX_Check(pDX, IDC_EOL_SENSITIVE, m_bIgnoreEol); DDX_Check(pDX, IDC_IGNORE_NUMBERS, m_bIgnoreNumbers); - DDX_Check(pDX, IDC_IGNEOFEOL_CHECK, m_bIgnoreEofNewlinePresence); + DDX_Check(pDX, IDC_IGNEOFEOL_CHECK, m_bIgnoreMissingTrailingEol); DDX_Radio(pDX, IDC_WHITESPACE, m_nIgnoreWhite); DDX_Check(pDX, IDC_MOVED_BLOCKS, m_bMovedBlocks); DDX_Check(pDX, IDC_ALIGN_SIMILAR_LINES, m_bAlignSimilarLines); @@ -79,7 +79,7 @@ void PropCompare::ReadOptions() m_bIgnoreNumbers = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_NUMBERS); m_bIgnoreEol = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOL); m_bIgnoreCodepage = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_CODEPAGE); - m_bIgnoreEofNewlinePresence = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE); + m_bIgnoreMissingTrailingEol = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_MISSING_TRAILING_EOL); m_bMovedBlocks = GetOptionsMgr()->GetBool(OPT_CMP_MOVED_BLOCKS); m_bAlignSimilarLines = GetOptionsMgr()->GetBool(OPT_CMP_ALIGN_SIMILAR_LINES); m_nDiffAlgorithm = GetOptionsMgr()->GetInt(OPT_CMP_DIFF_ALGORITHM); @@ -101,7 +101,7 @@ void PropCompare::WriteOptions() GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_EOL, m_bIgnoreEol); GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_CASE, m_bIgnoreCase); GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_NUMBERS, m_bIgnoreNumbers); - GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE, m_bIgnoreEofNewlinePresence); + GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_MISSING_TRAILING_EOL, m_bIgnoreMissingTrailingEol); GetOptionsMgr()->SaveOption(OPT_CMP_MOVED_BLOCKS, m_bMovedBlocks); GetOptionsMgr()->SaveOption(OPT_CMP_ALIGN_SIMILAR_LINES, m_bAlignSimilarLines); GetOptionsMgr()->SaveOption(OPT_CMP_DIFF_ALGORITHM, m_nDiffAlgorithm); @@ -133,7 +133,7 @@ void PropCompare::OnDefaults() m_bFilterCommentsLines = GetOptionsMgr()->GetDefault(OPT_CMP_FILTER_COMMENTLINES); m_bIgnoreCase = GetOptionsMgr()->GetDefault(OPT_CMP_IGNORE_CASE); m_bIgnoreNumbers = GetOptionsMgr()->GetDefault(OPT_CMP_IGNORE_NUMBERS); - m_bIgnoreEofNewlinePresence = GetOptionsMgr()->GetDefault(OPT_CMP_IGNORE_EOF_NEWLINE_PRESENCE); + m_bIgnoreMissingTrailingEol = GetOptionsMgr()->GetDefault(OPT_CMP_IGNORE_MISSING_TRAILING_EOL); m_bMovedBlocks = GetOptionsMgr()->GetDefault(OPT_CMP_MOVED_BLOCKS); m_bAlignSimilarLines = GetOptionsMgr()->GetDefault(OPT_CMP_ALIGN_SIMILAR_LINES); m_nDiffAlgorithm = GetOptionsMgr()->GetDefault(OPT_CMP_DIFF_ALGORITHM); diff --git a/Src/PropCompare.h b/Src/PropCompare.h index d26ca6edb50..3f9434c5216 100644 --- a/Src/PropCompare.h +++ b/Src/PropCompare.h @@ -35,7 +35,7 @@ class PropCompare : public OptionsPanel bool m_bIgnoreCase; bool m_bIgnoreNumbers; bool m_bIgnoreBlankLines; - int m_bIgnoreEofNewlinePresence; + int m_bIgnoreMissingTrailingEol; int m_nIgnoreWhite; bool m_bMovedBlocks; bool m_bAlignSimilarLines; diff --git a/Src/resource.h b/Src/resource.h index c6b14de3497..9890f4709ae 100644 --- a/Src/resource.h +++ b/Src/resource.h @@ -682,7 +682,7 @@ #define ID_DIFF_OPTIONS_IGNORE_EOL 16428 #define ID_DIFF_OPTIONS_IGNORE_CODEPAGE 16429 #define ID_DIFF_OPTIONS_IGNORE_COMMENTS 16430 -#define ID_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE 16431 +#define ID_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL 16431 #define ID_DIFF_OPTIONS_INCLUDE_SUBFOLDERS 16432 #define ID_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS 16433 #define ID_DIFF_OPTIONS_COMPMETHOD_QUICK_CONTENTS 16434 @@ -913,7 +913,7 @@ #define ID_PROJECT_DIFF_OPTIONS_IGNORE_NUMBERS 33130 #define ID_PROJECT_DIFF_OPTIONS_IGNORE_CODEPAGE 33131 #define ID_PROJECT_DIFF_OPTIONS_IGNORE_COMMENTS 33132 -#define ID_PROJECT_DIFF_OPTIONS_IGNORE_EOF_NEWLINE_PRESENCE 33133 +#define ID_PROJECT_DIFF_OPTIONS_IGNORE_MISSING_TRAILING_EOL 33133 #define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_FULL_CONTENTS 33134 #define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_QUICK_CONTENTS 33135 #define ID_PROJECT_DIFF_OPTIONS_COMPMETHOD_BINARY_CONTENTS 33136 diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 6b0e7cecd23..63c7889cef9 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -593,14 +593,14 @@ namespace } - TEST_F(ByteCompareTest, IgnoreEofNewlinePresence) + TEST_F(ByteCompareTest, IgnoreMissingTrailingEol) { CompareEngines::ByteCompare bc; QuickCompareOptions option; std::string filename_left = "_tmp_.txt"; std::string filename_right = "_tmp_2.txt"; - option.m_bIgnoreEofNewlinePresence = true; + option.m_bIgnoreMissingTrailingEol = true; bc.SetCompareOptions(option); for (int i = 0; i < 3; i++) @@ -840,14 +840,14 @@ namespace } } - TEST_F(ByteCompareTest, IgnoreEofNewlinePresenceAndIgnoreEOLDifference) + TEST_F(ByteCompareTest, IgnoreMissingTrailingEolAndIgnoreEOLDifference) { CompareEngines::ByteCompare bc; QuickCompareOptions option; std::string filename_left = "_tmp_.txt"; std::string filename_right = "_tmp_2.txt"; - option.m_bIgnoreEofNewlinePresence = true; + option.m_bIgnoreMissingTrailingEol = true; option.m_bIgnoreEOLDifference = true; bc.SetCompareOptions(option); @@ -1184,14 +1184,14 @@ namespace } } - TEST_F(ByteCompareTest, IgnoreEofNewlinePresenceAndIgnoreBlankLines) + TEST_F(ByteCompareTest, IgnoreMissingTrailingEolAndIgnoreBlankLines) { CompareEngines::ByteCompare bc; QuickCompareOptions option; std::string filename_left = "_tmp_.txt"; std::string filename_right = "_tmp_2.txt"; - option.m_bIgnoreEofNewlinePresence = true; + option.m_bIgnoreMissingTrailingEol = true; option.m_bIgnoreBlankLines = true; bc.SetCompareOptions(option); diff --git a/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp b/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp index 2324eb112e3..78042c9d1e9 100644 --- a/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp +++ b/Testing/GoogleTest/DiffWrapper/DiffWrapper_test.cpp @@ -95,13 +95,13 @@ TEST(DiffWrapper, RunFileDiff_NoEol) } } -TEST(DiffWrapper, RunFileDiff_IgnoreEofNewlinePresence) +TEST(DiffWrapper, RunFileDiff_IgnoreMissingTrailingEol) { CDiffWrapper dw; DIFFOPTIONS options{}; DIFFRANGE dr; - options.bIgnoreEofNewlinePresence = true; + options.bIgnoreMissingTrailingEol = true; for (auto algo : { DIFF_ALGORITHM_DEFAULT, DIFF_ALGORITHM_MINIMAL, DIFF_ALGORITHM_PATIENCE, DIFF_ALGORITHM_HISTOGRAM, DIFF_ALGORITHM_NONE }) { options.nDiffAlgorithm = algo; diff --git a/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp b/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp index 1bfc517bf98..a29ac8357e6 100644 --- a/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp +++ b/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp @@ -223,4 +223,13 @@ TEST_F(PathAndFilterTest, GetTableProperties) ASSERT_TRUE(tableAllowNewLinesInQuotes == true); } +/** + * @brief Read diff options + */ +TEST_F(PathAndFilterTest, GetDiffOptions) +{ + bool bIgnoreMissingTrailingEol = m_pProjectFileItem->HasIgnoreMissingTrailingEol(); + ASSERT_TRUE(bIgnoreMissingTrailingEol == true); + +} } diff --git a/Testing/GoogleTest/TestData/PathsAndFilter.WinMerge b/Testing/GoogleTest/TestData/PathsAndFilter.WinMerge index d07284fbeeb..98821356267 100644 --- a/Testing/GoogleTest/TestData/PathsAndFilter.WinMerge +++ b/Testing/GoogleTest/TestData/PathsAndFilter.WinMerge @@ -12,5 +12,18 @@ " 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + file1.txt + file2.txt + diff --git a/Translations/WinMerge/Arabic.po b/Translations/WinMerge/Arabic.po index f0008354d86..7b8827990c7 100644 --- a/Translations/WinMerge/Arabic.po +++ b/Translations/WinMerge/Arabic.po @@ -1104,7 +1104,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Basque.po b/Translations/WinMerge/Basque.po index 07f0b840cfe..52e821ec40d 100644 --- a/Translations/WinMerge/Basque.po +++ b/Translations/WinMerge/Basque.po @@ -1323,7 +1323,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Brazilian.po b/Translations/WinMerge/Brazilian.po index 4d6169afd87..3d7ce09fece 100644 --- a/Translations/WinMerge/Brazilian.po +++ b/Translations/WinMerge/Brazilian.po @@ -1101,7 +1101,7 @@ msgstr "Ignorar números" msgid "Ignore c&omment differences" msgstr "Ignorar as d&iferenças dos comentários" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Bulgarian.po b/Translations/WinMerge/Bulgarian.po index f4b36eb3e51..715f3d7760d 100644 --- a/Translations/WinMerge/Bulgarian.po +++ b/Translations/WinMerge/Bulgarian.po @@ -1098,7 +1098,7 @@ msgstr "Пренебрегване на &числа" msgid "Ignore c&omment differences" msgstr "Пренебрегване на различията в &коментари" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Catalan.po b/Translations/WinMerge/Catalan.po index 93e30495a6f..547ca04d46f 100644 --- a/Translations/WinMerge/Catalan.po +++ b/Translations/WinMerge/Catalan.po @@ -1321,7 +1321,7 @@ msgstr "Ignora els nombres" msgid "Ignore c&omment differences" msgstr "Ingora les diferències en els comentaris" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/ChineseSimplified.po b/Translations/WinMerge/ChineseSimplified.po index a7172b92d8e..186add94048 100644 --- a/Translations/WinMerge/ChineseSimplified.po +++ b/Translations/WinMerge/ChineseSimplified.po @@ -1105,7 +1105,7 @@ msgstr "忽略数字(&B)" msgid "Ignore c&omment differences" msgstr "忽略注释行差异(&O)" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/ChineseTraditional.po b/Translations/WinMerge/ChineseTraditional.po index 7d276fc5767..8d22bfb0943 100644 --- a/Translations/WinMerge/ChineseTraditional.po +++ b/Translations/WinMerge/ChineseTraditional.po @@ -1327,7 +1327,7 @@ msgstr "忽略數字 (&B)" msgid "Ignore c&omment differences" msgstr "忽略註解差異 (&O)" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Corsican.po b/Translations/WinMerge/Corsican.po index 2d0205cf2c1..b9425b498b9 100644 --- a/Translations/WinMerge/Corsican.po +++ b/Translations/WinMerge/Corsican.po @@ -1103,7 +1103,7 @@ msgstr "Ignurà i &numeri" msgid "Ignore c&omment differences" msgstr "Ignurà e sfarenze di c&ummentu" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Croatian.po b/Translations/WinMerge/Croatian.po index 4f9f430e567..a13d5fa1eee 100644 --- a/Translations/WinMerge/Croatian.po +++ b/Translations/WinMerge/Croatian.po @@ -1320,7 +1320,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Czech.po b/Translations/WinMerge/Czech.po index 0eecf817289..9cd25c52151 100644 --- a/Translations/WinMerge/Czech.po +++ b/Translations/WinMerge/Czech.po @@ -1320,7 +1320,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Danish.po b/Translations/WinMerge/Danish.po index eb8648d48bd..e36594d0328 100644 --- a/Translations/WinMerge/Danish.po +++ b/Translations/WinMerge/Danish.po @@ -1321,7 +1321,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Dutch.po b/Translations/WinMerge/Dutch.po index 15a4dbd4b18..f935c8a7caa 100644 --- a/Translations/WinMerge/Dutch.po +++ b/Translations/WinMerge/Dutch.po @@ -1099,7 +1099,7 @@ msgstr "Nummers negeren" msgid "Ignore c&omment differences" msgstr "Opmerkingsverschillen negeren" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/English.pot b/Translations/WinMerge/English.pot index 214dd44aaec..8fec3710e91 100644 --- a/Translations/WinMerge/English.pot +++ b/Translations/WinMerge/English.pot @@ -1095,7 +1095,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Finnish.po b/Translations/WinMerge/Finnish.po index 26cd8be36aa..9847bc5671d 100644 --- a/Translations/WinMerge/Finnish.po +++ b/Translations/WinMerge/Finnish.po @@ -1101,7 +1101,7 @@ msgstr "Jätä nume&rot huomiotta" msgid "Ignore c&omment differences" msgstr "Jätä k&ommenttien erot huomiotta" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/French.po b/Translations/WinMerge/French.po index 0cc9fa54c21..27ac045d671 100644 --- a/Translations/WinMerge/French.po +++ b/Translations/WinMerge/French.po @@ -1328,7 +1328,7 @@ msgstr "Ignorer les nom&bres" msgid "Ignore c&omment differences" msgstr "Ignorer les différences de c&ommentaire" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Galician.po b/Translations/WinMerge/Galician.po index 558f8aaf4b8..d1ad6a9cc45 100644 --- a/Translations/WinMerge/Galician.po +++ b/Translations/WinMerge/Galician.po @@ -1102,7 +1102,7 @@ msgstr "Ignorar nú&meros" msgid "Ignore c&omment differences" msgstr "Ignorar diferenzas nos c&omentarios" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/German.po b/Translations/WinMerge/German.po index 8fd48c55261..7fcea6701c8 100644 --- a/Translations/WinMerge/German.po +++ b/Translations/WinMerge/German.po @@ -1324,7 +1324,7 @@ msgstr "&Nummern ignorieren" msgid "Ignore c&omment differences" msgstr "&Kommentarunterschiede ignorieren" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Greek.po b/Translations/WinMerge/Greek.po index b94e92a68bd..bf0a73b2bca 100644 --- a/Translations/WinMerge/Greek.po +++ b/Translations/WinMerge/Greek.po @@ -1319,7 +1319,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Hungarian.po b/Translations/WinMerge/Hungarian.po index d8d302f1b8f..796eafe363c 100644 --- a/Translations/WinMerge/Hungarian.po +++ b/Translations/WinMerge/Hungarian.po @@ -1322,7 +1322,7 @@ msgstr "Számok mellőzése" msgid "Ignore c&omment differences" msgstr "Megjegyzés különbségek mellőzése" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Italian.po b/Translations/WinMerge/Italian.po index 5d742b7e94a..0b8cbde4590 100644 --- a/Translations/WinMerge/Italian.po +++ b/Translations/WinMerge/Italian.po @@ -1102,7 +1102,7 @@ msgstr "Ignora i nu&meri" msgid "Ignore c&omment differences" msgstr "Ignora le differenze nei c&ommenti" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Japanese.po b/Translations/WinMerge/Japanese.po index a86d7bf635a..7d20f5fd53b 100644 --- a/Translations/WinMerge/Japanese.po +++ b/Translations/WinMerge/Japanese.po @@ -1100,7 +1100,7 @@ msgstr "数字を無視する(&B)" msgid "Ignore c&omment differences" msgstr "コメントの違いを無視する(&O)" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "ファイル末尾の改行文字の有無を無視する(&E)" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Korean.po b/Translations/WinMerge/Korean.po index 507bf39dca3..57eb72d17ae 100644 --- a/Translations/WinMerge/Korean.po +++ b/Translations/WinMerge/Korean.po @@ -1329,7 +1329,7 @@ msgstr "숫자 무시(&B)" msgid "Ignore c&omment differences" msgstr "주석 차이 무시(&O)" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Lithuanian.po b/Translations/WinMerge/Lithuanian.po index 11eb0720e9e..3345ca5b40f 100644 --- a/Translations/WinMerge/Lithuanian.po +++ b/Translations/WinMerge/Lithuanian.po @@ -1101,7 +1101,7 @@ msgstr "Ignoruoti skai&čius" msgid "Ignore c&omment differences" msgstr "Nepaisyti skirtumų k&omentaruose" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Norwegian.po b/Translations/WinMerge/Norwegian.po index 91fab5a5deb..3b8c0e728a6 100644 --- a/Translations/WinMerge/Norwegian.po +++ b/Translations/WinMerge/Norwegian.po @@ -1100,7 +1100,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Persian.po b/Translations/WinMerge/Persian.po index 94659930061..e2f16397d74 100644 --- a/Translations/WinMerge/Persian.po +++ b/Translations/WinMerge/Persian.po @@ -1321,7 +1321,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Polish.po b/Translations/WinMerge/Polish.po index d8683c4ea4b..f4718c02f17 100644 --- a/Translations/WinMerge/Polish.po +++ b/Translations/WinMerge/Polish.po @@ -1102,7 +1102,7 @@ msgstr "Ignoruj liczby" msgid "Ignore c&omment differences" msgstr "Ignoruj różnice w komentarzach" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Portuguese.po b/Translations/WinMerge/Portuguese.po index 917fc279897..331b0353173 100644 --- a/Translations/WinMerge/Portuguese.po +++ b/Translations/WinMerge/Portuguese.po @@ -1102,7 +1102,7 @@ msgstr "Ignorar números" msgid "Ignore c&omment differences" msgstr "Ignorar diferenças de c&omentários" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Romanian.po b/Translations/WinMerge/Romanian.po index ef6b187a857..8dcee449563 100644 --- a/Translations/WinMerge/Romanian.po +++ b/Translations/WinMerge/Romanian.po @@ -1100,7 +1100,7 @@ msgstr "Ignoră numerele" msgid "Ignore c&omment differences" msgstr "Ignoră diferențele de c&omentarii" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Russian.po b/Translations/WinMerge/Russian.po index 1254d70e98c..2cc81caaf00 100644 --- a/Translations/WinMerge/Russian.po +++ b/Translations/WinMerge/Russian.po @@ -1103,7 +1103,7 @@ msgstr "Игнорировать числа" msgid "Ignore c&omment differences" msgstr "Игнорировать отличия в комментариях" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Serbian.po b/Translations/WinMerge/Serbian.po index 3e4a05c71da..cadbaa03317 100644 --- a/Translations/WinMerge/Serbian.po +++ b/Translations/WinMerge/Serbian.po @@ -1317,7 +1317,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Sinhala.po b/Translations/WinMerge/Sinhala.po index 4c7a70851fc..2cfa10f5969 100644 --- a/Translations/WinMerge/Sinhala.po +++ b/Translations/WinMerge/Sinhala.po @@ -1320,7 +1320,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format diff --git a/Translations/WinMerge/Slovak.po b/Translations/WinMerge/Slovak.po index 747dc5597ac..03d6f9a75c1 100644 --- a/Translations/WinMerge/Slovak.po +++ b/Translations/WinMerge/Slovak.po @@ -1101,7 +1101,7 @@ msgstr "Ignorovať čí&sla" msgid "Ignore c&omment differences" msgstr "Ignorovať rozdielne &komentáre" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Slovenian.po b/Translations/WinMerge/Slovenian.po index 4b76521e813..f0c6aeae621 100644 --- a/Translations/WinMerge/Slovenian.po +++ b/Translations/WinMerge/Slovenian.po @@ -1101,7 +1101,7 @@ msgstr "Prezri š&tevilke" msgid "Ignore c&omment differences" msgstr "Prezri razlike v k&omentarjih" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Spanish.po b/Translations/WinMerge/Spanish.po index 9fbae02405d..7b1ab258a86 100644 --- a/Translations/WinMerge/Spanish.po +++ b/Translations/WinMerge/Spanish.po @@ -1104,7 +1104,7 @@ msgstr "Ignorar nú&meros" msgid "Ignore c&omment differences" msgstr "Ignorar diferencias en c&omentarios" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Swedish.po b/Translations/WinMerge/Swedish.po index 80dfc94e5f1..701a1eb0bcc 100644 --- a/Translations/WinMerge/Swedish.po +++ b/Translations/WinMerge/Swedish.po @@ -1105,7 +1105,7 @@ msgstr "Ignorera nummer" msgid "Ignore c&omment differences" msgstr "Ignorera kommentarskillnader" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Tamil.po b/Translations/WinMerge/Tamil.po index e196eddfc76..4a758c04dd2 100644 --- a/Translations/WinMerge/Tamil.po +++ b/Translations/WinMerge/Tamil.po @@ -1099,7 +1099,7 @@ msgstr "எண்&பெர்களை புறக்கணிக்கவு msgid "Ignore c&omment differences" msgstr "க&கருத்து வேறுபாடுகளை புறக்கணிக்கவும்" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Turkish.po b/Translations/WinMerge/Turkish.po index 4da1e412842..fbf4d211fd3 100644 --- a/Translations/WinMerge/Turkish.po +++ b/Translations/WinMerge/Turkish.po @@ -1100,7 +1100,7 @@ msgstr "&Sayıları yok say" msgid "Ignore c&omment differences" msgstr "Yo&rum farklılıkları yok sayılsın" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" msgid "&Include subfolders" diff --git a/Translations/WinMerge/Ukrainian.po b/Translations/WinMerge/Ukrainian.po index 92c3a5431d2..e29ee5f5880 100644 --- a/Translations/WinMerge/Ukrainian.po +++ b/Translations/WinMerge/Ukrainian.po @@ -1304,7 +1304,7 @@ msgstr "" msgid "Ignore c&omment differences" msgstr "" -msgid "Ignore &end-of-file newline presence" +msgid "Ignore &missing trailing EOL" msgstr "" #, c-format From d94712964526057e99c4a126868a18be6f008b7b Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 21 Dec 2024 12:28:26 +0900 Subject: [PATCH 12/23] WIP --- .../ProjectFile_test_PathsAndFilter.cpp | 26 ++++++++++- .../GoogleTest/UnitTests/UnitTests.vcxproj | 13 ++++++ .../UnitTests/UnitTests.vcxproj.filters | 43 +++++++++++++++++++ 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp b/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp index a29ac8357e6..e408f8768e6 100644 --- a/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp +++ b/Testing/GoogleTest/ProjectFile/ProjectFile_test_PathsAndFilter.cpp @@ -228,8 +228,30 @@ TEST_F(PathAndFilterTest, GetTableProperties) */ TEST_F(PathAndFilterTest, GetDiffOptions) { - bool bIgnoreMissingTrailingEol = m_pProjectFileItem->HasIgnoreMissingTrailingEol(); - ASSERT_TRUE(bIgnoreMissingTrailingEol == true); + ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreMissingTrailingEol()); + ASSERT_EQ(true, m_pProjectFileItem->HasFilterCommentsLines()); + ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreCodepage()); + ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreNumbers()); + ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreEol()); + ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreCase()); + ASSERT_EQ(true, m_pProjectFileItem->HasIgnoreBlankLines()); + ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreMissingTrailingEol()); + ASSERT_EQ(true, m_pProjectFileItem->GetFilterCommentsLines()); + ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreCodepage()); + ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreNumbers()); + ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreEol()); + ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreCase()); + ASSERT_EQ(true, m_pProjectFileItem->GetIgnoreBlankLines()); +} +/** + * @brief Read hidden items + */ +TEST_F(PathAndFilterTest, GetHiddenItems) +{ + ASSERT_EQ(true, m_pProjectFileItem->HasHiddenItems()); + ASSERT_EQ(2, m_pProjectFileItem->GetHiddenItems().size()); + ASSERT_EQ(_T("file1.txt"), m_pProjectFileItem->GetHiddenItems()[0]); + ASSERT_EQ(_T("file2.txt"), m_pProjectFileItem->GetHiddenItems()[1]); } } diff --git a/Testing/GoogleTest/UnitTests/UnitTests.vcxproj b/Testing/GoogleTest/UnitTests/UnitTests.vcxproj index 52895bf76d8..b104e768f1f 100644 --- a/Testing/GoogleTest/UnitTests/UnitTests.vcxproj +++ b/Testing/GoogleTest/UnitTests/UnitTests.vcxproj @@ -888,6 +888,19 @@ + + + + + + + + + + + + + diff --git a/Testing/GoogleTest/UnitTests/UnitTests.vcxproj.filters b/Testing/GoogleTest/UnitTests/UnitTests.vcxproj.filters index 3c8aa891f20..81efc2ac6a4 100644 --- a/Testing/GoogleTest/UnitTests/UnitTests.vcxproj.filters +++ b/Testing/GoogleTest/UnitTests/UnitTests.vcxproj.filters @@ -16,6 +16,18 @@ {4b87ff85-2ba4-475b-823e-af42e45a3098} + + {26fc7ec7-3745-4a0e-9152-b470022385cd} + + + {185652df-51ae-4061-8100-d261f79b6116} + + + {c49154d0-df48-4a75-965a-bd0f362bfa1a} + + + {3068dbe3-428a-4a24-aedf-8eed46f308c4} + @@ -453,4 +465,35 @@ Header Files + + + TestData + + + TestData + + + TestData + + + TestData + + + TestData + + + TestData + + + + + TestData\DirWatcher + + + TestData\DirWatcher + + + TestData\DirWatcher\Subdir1 + + \ No newline at end of file From f578628152e2741448384bc8b07f78b3a8e1035e Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 21 Dec 2024 14:33:34 +0900 Subject: [PATCH 13/23] WIP --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 20b1243b28c..3e88f7136ec 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,4 @@ Docs/Manual/Manual.cfg text eol=lf Docs/Manual/**/*.xml text eol=lf Translations/**/*.po text eol=lf Translations/**/*.pot text eol=lf +Testing/Data/Compare/**/ignore_eof_*.txt -text From a34d606f8e12a22516c2ccd2769af2df838a63a1 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 21 Dec 2024 14:51:17 +0900 Subject: [PATCH 14/23] WIP --- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b From d29d133fc73499524e6645e223fc4a8d272645c1 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 21 Dec 2024 15:16:47 +0900 Subject: [PATCH 15/23] WIP --- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt | 2 +- Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt | 2 +- Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt | 4 ++-- Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt | 2 +- Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt | 2 +- Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt | 2 +- Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt | 2 +- Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt | 2 +- Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt | 2 +- Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt | 2 +- Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt | 4 ++-- Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt | 2 +- Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt | 2 +- Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt | 2 +- Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt | 2 +- Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt | 2 +- Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt | 2 +- Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt | 2 +- Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt | 4 ++-- Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt | 2 +- 38 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file From 6e95c48c87b6e52afb5ffa697ca535f68fc9d04f Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 21 Dec 2024 15:51:43 +0900 Subject: [PATCH 16/23] WIP --- Src/DiffWrapper.cpp | 33 +++++++++---------- .../Dir1/ignore_eof_1crlf_2crlf_3lf.txt | 4 +-- .../Dir2/ignore_eof_1crlf_2crlf_3lf.txt | 4 +-- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 19c52c5e488..f87abb6d661 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -340,25 +340,20 @@ static void ReplaceChars(std::string & str, const char* chars, const char *rep) } /** - * @brief Remove the end-of-line (EOL) characters (LF, CR, or CRLF) from the end of a string. - * - * This function removes any of the following EOL characters from the end of the string: - * - LF (line feed, '\n') - * - CR (carriage return, '\r') - * - CRLF (carriage return + line feed, "\r\n") - * - * @param [in,out] str - A string from which the EOL characters will be removed. + * @brief Get the end-of-line (EOL) characters (LF, CR, or CRLF) from the end of a string. + * @param [in] str - A string from which the EOL characters will be identified. */ -static void RemoveEOL(std::string& str) +static std::string GetEOL(const std::string& str) { if (str.empty()) - return; + return ""; if (str.size() >= 2 && str[str.size() - 2] == '\r' && str[str.size() - 1] == '\n') - str.erase(str.size() - 2, 2); - else if (str.back() == '\n') - str.pop_back(); - else if (str.back() == '\r') - str.pop_back(); + return "\r\n"; + if (str.back() == '\r') + return "\r"; + if (str.back() == '\n') + return "\n"; + return ""; } /** @@ -469,10 +464,12 @@ int CDiffWrapper::PostFilter(PostFilterContext& ctxt, change* thisob, const file Replace(lineDataRight, "\r\n", "\n"); Replace(lineDataRight, "\r", "\n"); } - if (thisob->link == nullptr && m_options.m_bIgnoreMissingTrailingEol && (file_data_ary[0].missing_newline || file_data_ary[1].missing_newline)) + if (thisob->link == nullptr && m_options.m_bIgnoreMissingTrailingEol && (file_data_ary[0].missing_newline != file_data_ary[1].missing_newline)) { - RemoveEOL(lineDataLeft); - RemoveEOL(lineDataRight); + if (file_data_ary[0].missing_newline && !file_data_ary[1].missing_newline) + lineDataLeft += GetEOL(lineDataRight); + else if (!file_data_ary[0].missing_newline && file_data_ary[1].missing_newline) + lineDataRight += GetEOL(lineDataLeft); } // If both match after filtering, mark this diff hunk as trivial and return. diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf.txt @@ -1,2 +1,2 @@ -a -b +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt index 422c2b7ab3b..c30dea8a364 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf.txt @@ -1,2 +1,2 @@ -a -b +a +b From ff4deec4e7bd21e01f5f39fa4217aa507dd5f9ca Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 21 Dec 2024 18:53:19 +0900 Subject: [PATCH 17/23] WIP --- Src/DiffWrapper.cpp | 106 +++++++++++++++++++++++++++++--------------- Src/DiffWrapper.h | 5 ++- Src/FolderCmp.cpp | 10 ++--- 3 files changed, 78 insertions(+), 43 deletions(-) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index f87abb6d661..56a98e848d4 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0-or-later +0/ SPDX-License-Identifier: GPL-2.0-or-later /** * @file DiffWrapper.cpp * @@ -768,8 +768,9 @@ bool CDiffWrapper::RunFileDiff() struct change *script = nullptr; struct change *script10 = nullptr; struct change *script12 = nullptr; - DiffFileData diffdata, diffdata10, diffdata12; - int bin_flag = 0, bin_flag10 = 0, bin_flag12 = 0; + struct change *script02 = nullptr; + DiffFileData diffdata, diffdata10, diffdata12, diffdata02; + int bin_flag = 0, bin_flag10 = 0, bin_flag12 = 0, bin_flag02 = 0; if (aFiles.GetSize() == 2) { @@ -807,6 +808,7 @@ bool CDiffWrapper::RunFileDiff() { diffdata10.SetDisplayFilepaths(aFiles[1], aFiles[0]); // store true names for diff utils patch file diffdata12.SetDisplayFilepaths(aFiles[1], aFiles[2]); // store true names for diff utils patch file + diffdata02.SetDisplayFilepaths(aFiles[0], aFiles[2]); // store true names for diff utils patch file if (!diffdata10.OpenFiles(strFileTemp[1], strFileTemp[0])) { @@ -821,6 +823,13 @@ bool CDiffWrapper::RunFileDiff() } bRet = Diff2Files(&script12, &diffdata12, &bin_flag12, nullptr); + + if (!diffdata02.OpenFiles(strFileTemp[0], strFileTemp[2])) + { + return false; + } + + bRet = Diff2Files(&script02, &diffdata02, &bin_flag02, nullptr); } // First determine what happened during comparison @@ -833,12 +842,40 @@ bool CDiffWrapper::RunFileDiff() file_data * inf = diffdata.m_inf; file_data * inf10 = diffdata10.m_inf; file_data * inf12 = diffdata12.m_inf; + file_data * inf02 = diffdata02.m_inf; if (aFiles.GetSize() == 2) { if (bin_flag != 0) - { m_status.bBinaries = true; + } + else + { + m_status.bBinaries = (bin_flag10 != 0 || bin_flag12 != 0); + } + + // Create patch file + if (!m_status.bBinaries && m_bCreatePatchFile && aFiles.GetSize() == 2) + { + WritePatchFile(script, &inf[0]); + } + + // Go through diffs adding them to WinMerge's diff list + // This is done on every WinMerge's doc rescan! + if (!m_status.bBinaries && m_bUseDiffList) + { + if (aFiles.GetSize() == 2) + LoadWinMergeDiffsFromDiffUtilsScript(script, diffdata.m_inf); + else + LoadWinMergeDiffsFromDiffUtilsScript3( + script10, script12, script02, + diffdata10.m_inf, diffdata12.m_inf, diffdata02.m_inf); + } + + if (aFiles.GetSize() == 2) + { + if (bin_flag != 0) + { if (bin_flag != -1) m_status.Identical = IDENTLEVEL::ALL; else @@ -847,7 +884,6 @@ bool CDiffWrapper::RunFileDiff() else { // text files according to diffutils, so change script exists m_status.Identical = (script == 0) ? IDENTLEVEL::ALL : IDENTLEVEL::NONE; - m_status.bBinaries = false; } m_status.bMissingNL[0] = !!inf[0].missing_newline; m_status.bMissingNL[1] = !!inf[1].missing_newline; @@ -857,52 +893,31 @@ bool CDiffWrapper::RunFileDiff() m_status.Identical = IDENTLEVEL::NONE; if (bin_flag10 != 0 || bin_flag12 != 0) { - m_status.bBinaries = true; if (bin_flag10 != -1 && bin_flag12 != -1) m_status.Identical = IDENTLEVEL::ALL; else if (bin_flag10 != -1) m_status.Identical = IDENTLEVEL::EXCEPTRIGHT; else if (bin_flag12 != -1) m_status.Identical = IDENTLEVEL::EXCEPTLEFT; - else + else if (bin_flag12 != -1) m_status.Identical = IDENTLEVEL::EXCEPTMIDDLE; } else { // text files according to diffutils, so change script exists - m_status.bBinaries = false; - if (script10 == nullptr && script12 == nullptr) + if (IsIdenticalOrIgnorable(script10) && IsIdenticalOrIgnorable(script12)) m_status.Identical = IDENTLEVEL::ALL; - else if (script10 == nullptr) + else if (IsIdenticalOrIgnorable(script10)) m_status.Identical = IDENTLEVEL::EXCEPTRIGHT; - else if (script12 == nullptr) + else if (IsIdenticalOrIgnorable(script12)) m_status.Identical = IDENTLEVEL::EXCEPTLEFT; - else + else if (IsIdenticalOrIgnorable(script02)) m_status.Identical = IDENTLEVEL::EXCEPTMIDDLE; } m_status.bMissingNL[0] = !!inf10[1].missing_newline; m_status.bMissingNL[1] = !!inf12[0].missing_newline; - m_status.bMissingNL[2] = !!inf12[1].missing_newline; + m_status.bMissingNL[2] = !!inf02[1].missing_newline; } - - // Create patch file - if (!m_status.bBinaries && m_bCreatePatchFile && aFiles.GetSize() == 2) - { - WritePatchFile(script, &inf[0]); - } - - // Go through diffs adding them to WinMerge's diff list - // This is done on every WinMerge's doc rescan! - if (!m_status.bBinaries && m_bUseDiffList) - { - if (aFiles.GetSize() == 2) - LoadWinMergeDiffsFromDiffUtilsScript(script, diffdata.m_inf); - else - LoadWinMergeDiffsFromDiffUtilsScript3( - script10, script12, - diffdata10.m_inf, diffdata12.m_inf); - } - // cleanup the script if (aFiles.GetSize() == 2) FreeDiffUtilsScript(script); @@ -910,6 +925,7 @@ bool CDiffWrapper::RunFileDiff() { FreeDiffUtilsScript(script10); FreeDiffUtilsScript(script12); + FreeDiffUtilsScript(script02); } // Done with diffutils filedata @@ -921,6 +937,7 @@ bool CDiffWrapper::RunFileDiff() { diffdata10.Close(); diffdata12.Close(); + diffdata02.Close(); } if (m_bPluginsEnabled) @@ -1147,6 +1164,19 @@ bool CDiffWrapper::Diff2Files(struct change ** diffs, DiffFileData *diffData, return bRet; } +bool CDiffWrapper::IsIdenticalOrIgnorable(struct change* script) +{ + bool diff = false; + struct change *e=nullptr, *p=nullptr; + for (e = script; e != nullptr; e = p) + { + if (!e->trivial) + diff = true; + p = e->link; + } + return !diff; +} + /** * @brief Free script (the diffutils linked list of differences) */ @@ -1388,19 +1418,22 @@ void CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript3( struct change * script10, struct change * script12, + struct change * script02, const file_data * inf10, - const file_data * inf12) + const file_data * inf12, + const file_data * inf02) { - DiffList diff10, diff12; + DiffList diff10, diff12, diff02; diff10.Clear(); diff12.Clear(); + diff02.Clear(); const bool usefilters = m_options.m_filterCommentsLines || m_options.m_bIgnoreMissingTrailingEol || (m_pFilterList && m_pFilterList->HasRegExps()) || (m_pSubstitutionList && m_pSubstitutionList->HasRegExps()); - for (int file = 0; file < 2; file++) + for (int file = 0; file < 3; file++) { struct change *next = nullptr; int trans_a0, trans_b0, trans_a1, trans_b1; @@ -1414,6 +1447,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript3( { case 0: next = script10; pdiff = &diff10; pinf = inf10; break; case 1: next = script12; pdiff = &diff12; pinf = inf12; break; + case 2: next = script02; pdiff = &diff02; pinf = inf02; break; } while (next != nullptr) @@ -1423,7 +1457,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript3( struct change *end = find_change(next); /* Disconnect them from the rest of the changes, - making them a hunk, and remember the rest for next iteration. */ + making them a hunk, and remember the res0 for next iteration. */ next = end->link; end->link = nullptr; #ifdef DEBUG diff --git a/Src/DiffWrapper.h b/Src/DiffWrapper.h index 6947f76a550..a576473c68e 100644 --- a/Src/DiffWrapper.h +++ b/Src/DiffWrapper.h @@ -202,8 +202,9 @@ class CDiffWrapper void WritePatchFile(struct change * script, file_data * inf); public: void LoadWinMergeDiffsFromDiffUtilsScript3( - struct change * script10, struct change * script12, - const file_data * inf10, const file_data * inf12); + struct change * script10, struct change * script12, struct change * script02, + const file_data * inf10, const file_data * inf12, const file_data * inf02); + static bool IsIdenticalOrIgnorable(struct change* script); static void FreeDiffUtilsScript(struct change * & script); bool RegExpFilter(std::string& lines) const; diff --git a/Src/FolderCmp.cpp b/Src/FolderCmp.cpp index 463d77327bc..cb8cc6f1298 100644 --- a/Src/FolderCmp.cpp +++ b/Src/FolderCmp.cpp @@ -261,8 +261,8 @@ int FolderCmp::prepAndCompareFiles(DIFFITEM &di) dw.SetFilterCommentsSourceDef(Ext); dw.SetCreateDiffList(&diffList); dw.LoadWinMergeDiffsFromDiffUtilsScript3( - script10, script12, - diffdata10.m_inf, diffdata12.m_inf); + script10, script12, script02, + diffdata10.m_inf, diffdata12.m_inf, diffdata02.m_inf); m_ndiffs = diffList.GetSignificantDiffs(); m_ntrivialdiffs = diffList.GetSize() - m_ndiffs; @@ -279,11 +279,11 @@ int FolderCmp::prepAndCompareFiles(DIFFITEM &di) { if ((code & DIFFCODE::TEXTFLAGS) == DIFFCODE::TEXT) { - if (script12 == nullptr) + if (CDiffWrapper::IsIdenticalOrIgnorable(script12)) code |= DIFFCODE::DIFF1STONLY; - else if (script02 == nullptr) + else if (CDiffWrapper::IsIdenticalOrIgnorable(script02)) code |= DIFFCODE::DIFF2NDONLY; - else if (script10 == nullptr) + else if (CDiffWrapper::IsIdenticalOrIgnorable(script10)) code |= DIFFCODE::DIFF3RDONLY; } else From 930e0a414a70d003146f4be5c700a43f13b47413 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sat, 21 Dec 2024 19:01:43 +0900 Subject: [PATCH 18/23] WIP --- ...rlf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt} | 0 ...2crlf_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt} | 0 ...eol_2lf_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt} | 0 ...lf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt} | 0 ...noeol_2lf_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3crlf.txt} | 0 ...oeol_2noeol_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3lf.txt} | 0 ..._2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt} | 0 ...eol_2noeol_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf.txt} | 0 ...f_1noeol_2noeol_3lf.txt => ignore_eof_1crlf-noeol_2lf_3lf.txt} | 0 ...lf_3noeol.txt => ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt} | 0 ...lf_2noeol_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3crlf.txt} | 0 ..._1crlf_2noeol_3lf.txt => ignore_eof_1crlf_2crlf-noeol_3lf.txt} | 0 ...f_2noeol_3noeol.txt => ignore_eof_1crlf_2crlf_3crlf-noeol.txt} | 0 ...oeol_2crlf_3noeol.txt => ignore_eof_1crlf_2lf_3crlf-noeol.txt} | 0 ..._1lf_2crlf_3noeol.txt => ignore_eof_1lf_2crlf-noeol_3crlf.txt} | 0 ...of_1lf_2lf_3noeol.txt => ignore_eof_1lf_2crlf_3crlf-noeol.txt} | 0 ...lf_2noeol_3crlf.txt => ignore_eof_1lf_2lf-noeol_3lf-noeol.txt} | 0 ...re_eof_1lf_2noeol_3lf.txt => ignore_eof_1lf_2lf-noeol_3lf.txt} | 0 ...eof_1lf_2noeol_3noeol.txt => ignore_eof_1lf_2lf_3lf-noeol.txt} | 0 ...rlf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt} | 0 ...noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt} | 0 ..._2noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt} | 0 ...lf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt} | 0 ...lf_2crlf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf.txt} | 0 ...noeol_2crlf_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3lf.txt} | 0 ..._2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt} | 0 ...of_1lf_2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf.txt} | 0 ...of_1noeol_2lf_3crlf.txt => ignore_eof_1crlf-noeol_2lf_3lf.txt} | 0 ...ol_3noeol.txt => ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt} | 0 ...lf_2noeol_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3crlf.txt} | 0 ...oeol_2noeol_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3lf.txt} | 0 ...noeol_2crlf_3lf.txt => ignore_eof_1crlf_2crlf_3crlf-noeol.txt} | 0 ...of_1noeol_2lf_3lf.txt => ignore_eof_1crlf_2lf_3crlf-noeol.txt} | 0 ...eol_2noeol_3noeol.txt => ignore_eof_1lf_2crlf-noeol_3crlf.txt} | 0 ...oeol_2crlf_3noeol.txt => ignore_eof_1lf_2crlf_3crlf-noeol.txt} | 0 ...f_2noeol_3noeol.txt => ignore_eof_1lf_2lf-noeol_3lf-noeol.txt} | 0 ...eof_1noeol_2noeol_3lf.txt => ignore_eof_1lf_2lf-noeol_3lf.txt} | 0 ...eof_1noeol_2lf_3noeol.txt => ignore_eof_1lf_2lf_3lf-noeol.txt} | 0 ...eol.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt} | 0 ...eol_3crlf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt} | 0 ..._2noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt} | 0 ...lf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt} | 0 ...lf_2noeol_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3crlf.txt} | 0 ...of_1lf_2noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf_3lf.txt} | 0 ..._2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt} | 0 ...noeol_2crlf_3crlf.txt => ignore_eof_1crlf-noeol_2lf_3crlf.txt} | 0 ...of_1noeol_2crlf_3lf.txt => ignore_eof_1crlf-noeol_2lf_3lf.txt} | 0 ...ol_3noeol.txt => ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt} | 0 ...noeol_2lf_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3crlf.txt} | 0 ...of_1noeol_2lf_3lf.txt => ignore_eof_1crlf_2crlf-noeol_3lf.txt} | 0 ...lf_2crlf_3noeol.txt => ignore_eof_1crlf_2crlf_3crlf-noeol.txt} | 0 ...oeol_2crlf_3noeol.txt => ignore_eof_1crlf_2lf_3crlf-noeol.txt} | 0 ...oeol_2noeol_3crlf.txt => ignore_eof_1lf_2crlf-noeol_3crlf.txt} | 0 ...eol_2noeol_3noeol.txt => ignore_eof_1lf_2crlf_3crlf-noeol.txt} | 0 ...f_2noeol_3noeol.txt => ignore_eof_1lf_2lf-noeol_3lf-noeol.txt} | 0 ...eof_1noeol_2noeol_3lf.txt => ignore_eof_1lf_2lf-noeol_3lf.txt} | 0 ...eof_1noeol_2lf_3noeol.txt => ignore_eof_1lf_2lf_3lf-noeol.txt} | 0 57 files changed, 0 insertions(+), 0 deletions(-) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2crlf_3crlf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2crlf_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2lf_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1crlf_2crlf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2lf_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3crlf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2noeol_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3lf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2noeol_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2noeol_3lf.txt => ignore_eof_1crlf-noeol_2lf_3lf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1crlf_2lf_3noeol.txt => ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1crlf_2noeol_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1crlf_2noeol_3lf.txt => ignore_eof_1crlf_2crlf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1crlf_2noeol_3noeol.txt => ignore_eof_1crlf_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1noeol_2crlf_3noeol.txt => ignore_eof_1crlf_2lf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1lf_2crlf_3noeol.txt => ignore_eof_1lf_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1lf_2lf_3noeol.txt => ignore_eof_1lf_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1lf_2noeol_3crlf.txt => ignore_eof_1lf_2lf-noeol_3lf-noeol.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1lf_2noeol_3lf.txt => ignore_eof_1lf_2lf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir1/{ignore_eof_1lf_2noeol_3noeol.txt => ignore_eof_1lf_2lf_3lf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1crlf_2noeol_3crlf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1crlf_2noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1lf_2noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1crlf_2crlf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1lf_2crlf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2crlf_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3lf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1crlf_2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1lf_2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2lf_3crlf.txt => ignore_eof_1crlf-noeol_2lf_3lf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1crlf_2noeol_3noeol.txt => ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1lf_2noeol_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2noeol_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2crlf_3lf.txt => ignore_eof_1crlf_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2lf_3lf.txt => ignore_eof_1crlf_2lf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2noeol_3noeol.txt => ignore_eof_1lf_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2crlf_3noeol.txt => ignore_eof_1lf_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1lf_2noeol_3noeol.txt => ignore_eof_1lf_2lf-noeol_3lf-noeol.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2noeol_3lf.txt => ignore_eof_1lf_2lf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir2/{ignore_eof_1noeol_2lf_3noeol.txt => ignore_eof_1lf_2lf_3lf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1crlf_2crlf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1crlf_2noeol_3crlf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1crlf_2noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1crlf_2lf_3noeol.txt => ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1lf_2noeol_3crlf.txt => ignore_eof_1crlf-noeol_2crlf_3crlf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1lf_2noeol_3lf.txt => ignore_eof_1crlf-noeol_2crlf_3lf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1lf_2lf_3noeol.txt => ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2crlf_3crlf.txt => ignore_eof_1crlf-noeol_2lf_3crlf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2crlf_3lf.txt => ignore_eof_1crlf-noeol_2lf_3lf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1crlf_2noeol_3noeol.txt => ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2lf_3crlf.txt => ignore_eof_1crlf_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2lf_3lf.txt => ignore_eof_1crlf_2crlf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1lf_2crlf_3noeol.txt => ignore_eof_1crlf_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2crlf_3noeol.txt => ignore_eof_1crlf_2lf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2noeol_3crlf.txt => ignore_eof_1lf_2crlf-noeol_3crlf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2noeol_3noeol.txt => ignore_eof_1lf_2crlf_3crlf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1lf_2noeol_3noeol.txt => ignore_eof_1lf_2lf-noeol_3lf-noeol.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2noeol_3lf.txt => ignore_eof_1lf_2lf-noeol_3lf.txt} (100%) rename Testing/Data/Compare/Dir3/{ignore_eof_1noeol_2lf_3noeol.txt => ignore_eof_1lf_2lf_3lf-noeol.txt} (100%) diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3crlf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3lf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3lf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3crlf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3lf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2lf_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2noeol_3lf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3lf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1crlf_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1noeol_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3lf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3lf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3lf.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3lf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir1/ignore_eof_1lf_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3lf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3lf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3lf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3crlf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3crlf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3lf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3crlf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3crlf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3lf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1crlf_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3lf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3lf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3lf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1lf_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3lf-noeol.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2noeol_3lf.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3lf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir2/ignore_eof_1noeol_2lf_3noeol.txt rename to Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3lf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3lf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3crlf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3lf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3lf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3crlf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3lf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3lf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1crlf_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3crlf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3lf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2crlf_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3crlf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3crlf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3crlf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3lf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1lf_2noeol_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3lf-noeol.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3lf.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2noeol_3lf.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3lf.txt diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3lf-noeol.txt similarity index 100% rename from Testing/Data/Compare/Dir3/ignore_eof_1noeol_2lf_3noeol.txt rename to Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3lf-noeol.txt From d83a157de3b7c41f66d4caaacbfaef5acca50cdb Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Sun, 22 Dec 2024 07:33:19 +0900 Subject: [PATCH 19/23] WIP --- .../Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt | 2 ++ .../Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt | 2 +- .../Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt | 2 +- .../Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt | 2 ++ .../Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt | 2 ++ .../Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt | 2 ++ .../Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt | 2 ++ .../Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt | 2 +- .../Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf.txt | 2 +- .../Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf-noeol.txt | 2 ++ .../Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf-noeol.txt | 2 ++ .../Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt | 2 ++ .../Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt | 2 ++ .../Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt | 2 ++ .../Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf.txt | 2 ++ .../Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt | 2 ++ .../Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf.txt | 2 ++ .../Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf.txt | 2 ++ Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf-noeol.txt | 2 ++ .../Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt | 2 ++ .../Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt | 2 +- .../Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt | 2 ++ .../Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt | 2 ++ .../Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt | 2 ++ .../Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt | 2 ++ .../Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf-noeol.txt | 2 ++ .../Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf-noeol.txt | 2 ++ .../Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt | 2 ++ .../Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt | 2 ++ .../Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt | 2 ++ .../Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf.txt | 2 ++ .../Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt | 2 ++ .../Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf.txt | 2 ++ .../Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf.txt | 2 ++ Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf-noeol.txt | 2 ++ .../Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt | 2 ++ .../Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt | 2 ++ .../Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt | 2 ++ .../Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt | 2 ++ .../Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt | 2 ++ .../Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt | 2 +- .../Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt | 2 ++ .../Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf-noeol.txt | 2 ++ .../Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf-noeol.txt | 2 ++ .../Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt | 2 ++ .../Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt | 2 ++ .../Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt | 2 ++ .../Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf.txt | 2 ++ .../Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt | 2 ++ .../Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf.txt | 2 ++ .../Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf-noeol.txt | 2 ++ .../Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf.txt | 2 ++ Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf-noeol.txt | 2 ++ 117 files changed, 228 insertions(+), 6 deletions(-) create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf.txt create mode 100644 Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf-noeol.txt diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt index c30dea8a364..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3crlf-noeol.txt @@ -1,2 +1,2 @@ a -b +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf.txt +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf-noeol_2lf_3lf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1crlf_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf-noeol_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir1/ignore_eof_1lf_2lf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf-noeol_3lf.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1crlf_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf-noeol_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf-noeol.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir2/ignore_eof_1lf_2lf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt index 0a207c060e6..0c991fcb4fe 100644 --- a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3crlf-noeol.txt @@ -1,2 +1,2 @@ -a +a b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf-noeol_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1crlf_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2crlf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf-noeol_2lf_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf.txt new file mode 100644 index 00000000000..422c2b7ab3b --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf-noeol_3lf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf-noeol.txt new file mode 100644 index 00000000000..0a207c060e6 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2crlf_3lf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf.txt new file mode 100644 index 00000000000..c30dea8a364 --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf-noeol_3crlf.txt @@ -0,0 +1,2 @@ +a +b diff --git a/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf-noeol.txt b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf-noeol.txt new file mode 100644 index 00000000000..0c991fcb4fe --- /dev/null +++ b/Testing/Data/Compare/Dir3/ignore_eof_1lf_2lf_3crlf-noeol.txt @@ -0,0 +1,2 @@ +a +b \ No newline at end of file From e70ef57cbba531f5eec1b0516ea220778500b00b Mon Sep 17 00:00:00 2001 From: sdottaka Date: Sun, 22 Dec 2024 18:32:08 +0900 Subject: [PATCH 20/23] WIP --- Src/DiffWrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 56a98e848d4..9f61654c5de 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -1,4 +1,4 @@ -0/ SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-License-Identifier: GPL-2.0-or-later /** * @file DiffWrapper.cpp * @@ -1457,7 +1457,7 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript3( struct change *end = find_change(next); /* Disconnect them from the rest of the changes, - making them a hunk, and remember the res0 for next iteration. */ + making them a hunk, and remember the rest for next iteration. */ next = end->link; end->link = nullptr; #ifdef DEBUG From bf91d286319f0eefea201ea92dfa2c6260bec330 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Sun, 22 Dec 2024 21:24:28 +0900 Subject: [PATCH 21/23] WIP --- Src/CompareEngines/ByteComparator.cpp | 2 +- .../ByteCompare/ByteCompare_test.cpp | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/Src/CompareEngines/ByteComparator.cpp b/Src/CompareEngines/ByteComparator.cpp index 03a3782b6b7..2162b5ca04d 100644 --- a/Src/CompareEngines/ByteComparator.cpp +++ b/Src/CompareEngines/ByteComparator.cpp @@ -389,7 +389,7 @@ ByteComparator::COMP_RESULT ByteComparator::CompareBuffers( goto need_more; else { - result = RESULT_SAME; + result = (m_eol0 == m_eol1) ? RESULT_SAME : RESULT_DIFF; goto exit; } } diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 63c7889cef9..47fe4fca603 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -397,6 +397,49 @@ namespace remove(filename_crlf.c_str()); remove(filename_lf.c_str()); + + std::string filename_left = "_tmp_.txt"; + std::string filename_right = "_tmp_2.txt"; + for (int i = 0; i < 3; i++) + { + {// diff left: LF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 - 1 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\n'; + buf_right[10] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: LF + std::vector buf_left(WMCMPBUFF * 2 - 1 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\r'; + buf_right[10] = '\n'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } } TEST_F(ByteCompareTest, IgnoreCase) @@ -440,6 +483,7 @@ namespace EXPECT_EQ(DIFFCODE::TEXT|DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); } + } TEST_F(ByteCompareTest, IgnoreBlankLines) From 947de2ad9bef0d5a13a9848b9eee65f7553c8975 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Sun, 22 Dec 2024 21:33:37 +0900 Subject: [PATCH 22/23] WIP --- .../ByteCompare/ByteCompare_test.cpp | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp index 47fe4fca603..2d259c6f062 100644 --- a/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp +++ b/Testing/GoogleTest/ByteCompare/ByteCompare_test.cpp @@ -437,6 +437,52 @@ namespace FilePair pair(filename_left, filename_right); + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + } + for (int i = 0; i < 3; i++) + { + {// diff left: CRLF - right: no EOL + std::vector buf_left(WMCMPBUFF * 2 + 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\r'; + buf_left[11] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + buf_left[buf_left.size() - 2] = '\r'; + buf_left[buf_left.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); + } + + {// diff left: no EOL - right: CRLF + std::vector buf_left(WMCMPBUFF * 2 + i); + std::vector buf_right(WMCMPBUFF * 2 + 2 + i); + + memset(buf_left.data(), 'A', buf_left.size()); + memset(buf_right.data(), 'A', buf_right.size()); + + buf_left[10] = '\r'; + buf_left[11] = '\n'; + buf_right[10] = '\r'; + buf_right[11] = '\n'; + buf_right[buf_right.size() - 2] = '\r'; + buf_right[buf_right.size() - 1] = '\n'; + + TempFile file_left(filename_left, buf_left.data(), buf_left.size()); + TempFile file_right(filename_right, buf_right.data(), buf_right.size()); + + FilePair pair(filename_left, filename_right); + EXPECT_EQ(DIFFCODE::TEXT | DIFFCODE::DIFF, bc.CompareFiles(&pair.diffData)); } } From 14bc5a91de003f789e793498aca8fffab97edd0e Mon Sep 17 00:00:00 2001 From: sdottaka Date: Tue, 24 Dec 2024 21:52:30 +0900 Subject: [PATCH 23/23] WIP --- Src/DiffWrapper.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 9f61654c5de..4ca3ea015b8 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -1335,8 +1335,10 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript(struct change * script, const last1 = first1 + thisob->inserted - 1; translate_range (&file_data_ary[0], first0, last0, &trans_a0, &trans_b0); translate_range (&file_data_ary[1], first1, last1, &trans_a1, &trans_b1); - const int qtyLinesLeft = (trans_b0 - trans_a0) + 1; //Determine quantity of lines in this block for left side - const int qtyLinesRight = (trans_b1 - trans_a1) + 1;//Determine quantity of lines in this block for right side + const int qtyLinesLeft = (trans_b0 - trans_a0) + 1 + - ((!thisob->link && file_data_ary[0].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for left side + const int qtyLinesRight = (trans_b1 - trans_a1) + 1 + - ((!thisob->link && file_data_ary[1].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for right side if (op == OP_TRIVIAL && m_options.m_bCompletelyBlankOutIgnoredDiffereneces) { @@ -1360,8 +1362,10 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript(struct change * script, const { if (thisob->trivial) op = OP_TRIVIAL; - const int qtyLinesLeft = (trans_b0 - trans_a0) + 1; //Determine quantity of lines in this block for left side - const int qtyLinesRight = (trans_b1 - trans_a1) + 1;//Determine quantity of lines in this block for right side + const int qtyLinesLeft = (trans_b0 - trans_a0) + 1 + - ((!thisob->link && file_data_ary[0].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for left side + const int qtyLinesRight = (trans_b1 - trans_a1) + 1 + - ((!thisob->link && file_data_ary[1].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for right side if (op == OP_TRIVIAL && m_options.m_bCompletelyBlankOutIgnoredDiffereneces) { if (qtyLinesLeft == qtyLinesRight)