OSDN Git Service

Cleanup: Eliminate silly *.inl files in CCrystalEdit
authorGreyMerlin <GreyMerlin7@gmail.com>
Sat, 23 Sep 2017 23:37:27 +0000 (16:37 -0700)
committerGreyMerlin <GreyMerlin7@gmail.com>
Wed, 4 Oct 2017 23:39:02 +0000 (16:39 -0700)
 * Elimination #defines for INLINE that always ended up blank
 * Merged code from *.inl files into appropriate *.h files
 * Eliminate ancient CE_DLL_BUILD stuff
 * Appropriate changes to *.vcxproj and *.vcxproj.filters files to
account for removal of the five *.inl files, for both
VS2015 and VS2017

17 files changed:
Externals/crystaledit/editlib/ccrystaleditview.h
Externals/crystaledit/editlib/ccrystaleditview.inl [deleted file]
Externals/crystaledit/editlib/ccrystaltextbuffer.h
Externals/crystaledit/editlib/ccrystaltextbuffer.inl [deleted file]
Externals/crystaledit/editlib/ccrystaltextview.h
Externals/crystaledit/editlib/ccrystaltextview.inl [deleted file]
Externals/crystaledit/editlib/crystaleditviewex.cpp
Externals/crystaledit/editlib/filesup.cpp
Externals/crystaledit/editlib/filesup.h
Externals/crystaledit/editlib/filesup.inl [deleted file]
Externals/crystaledit/editlib/memcombo.cpp
Externals/crystaledit/editlib/memcombo.h
Externals/crystaledit/editlib/memcombo.inl [deleted file]
Src/Merge.vs2015.vcxproj
Src/Merge.vs2015.vcxproj.filters
Src/Merge.vs2017.vcxproj
Src/Merge.vs2017.vcxproj.filters

index 8ccfd6f..583758c 100644 (file)
@@ -27,6 +27,7 @@
 #pragma once
 
 #include "ccrystaltextview.h"
+#include "ccrystaltextbuffer.h"
 #include "wispelld.h"
 
 /////////////////////////////////////////////////////////////////////////////
@@ -219,9 +220,46 @@ protected :
 
 /////////////////////////////////////////////////////////////////////////////
 
-#if ! (defined(CE_FROM_DLL) || defined(CE_DLL_BUILD))
-#include "ccrystaleditview.inl"
-#endif
+inline bool CCrystalEditView::
+GetOverwriteMode ()
+const
+{
+  return m_bOvrMode;
+}
+
+inline void CCrystalEditView::SetOverwriteMode (bool bOvrMode /*= true*/ )
+{
+  m_bOvrMode = bOvrMode;
+}
+
+inline bool CCrystalEditView::
+GetDisableBSAtSOL ()
+const
+{
+  return m_bDisableBSAtSOL;
+}
+
+inline bool CCrystalEditView::GetAutoIndent ()
+const
+{
+  return m_bAutoIndent;
+}
+
+inline void CCrystalEditView::SetAutoIndent (bool bAutoIndent)
+{
+  m_bAutoIndent = bAutoIndent;
+}
+
+inline bool CCrystalEditView::GetInsertTabs ()
+const
+{
+  return m_pTextBuffer->GetInsertTabs();
+}
+
+inline void CCrystalEditView::SetInsertTabs (bool bInsertTabs)
+{
+  m_pTextBuffer->SetInsertTabs(bInsertTabs);
+}
 
 //{{AFX_INSERT_LOCATION}}
 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
diff --git a/Externals/crystaledit/editlib/ccrystaleditview.inl b/Externals/crystaledit/editlib/ccrystaleditview.inl
deleted file mode 100644 (file)
index 737dad8..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-////////////////////////////////////////////////////////////////////////////
-//  File:       CCrystalEditView.inl
-//  Version:    1.0.0.0
-//  Created:    29-Dec-1998
-//
-//  Author:     Stcherbatchenko Andrei
-//  E-mail:     windfall@gmx.de
-//
-//  Inline functions of Crystal Edit classes
-//
-//  You are free to use or modify this code to the following restrictions:
-//  - Acknowledge me somewhere in your about box, simple "Parts of code by.."
-//  will be enough. If you can't (or don't want to), contact me personally.
-//  - LEAVE THIS HEADER INTACT
-////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////
-//  19-Jul-99
-//      Ferdinand Prantl:
-//  +   FEATURE: see cpps ...
-//
-//  ... it's being edited very rapidly so sorry for non-commented
-//        and maybe "ugly" code ...
-////////////////////////////////////////////////////////////////////////////
-
-#ifndef __CCrystalEditView_INL_INCLUDED
-#define __CCrystalEditView_INL_INCLUDED
-
-#include "ccrystaleditview.h"
-#include "ccrystaltextbuffer.h"
-
-inline bool CCrystalEditView::
-GetOverwriteMode ()
-const
-{
-  return m_bOvrMode;
-}
-
-inline void CCrystalEditView::SetOverwriteMode (bool bOvrMode /*= true*/ )
-{
-  m_bOvrMode = bOvrMode;
-}
-
-inline bool CCrystalEditView::
-GetDisableBSAtSOL ()
-const
-{
-  return m_bDisableBSAtSOL;
-}
-
-inline bool CCrystalEditView::GetAutoIndent ()
-const
-{
-  return m_bAutoIndent;
-}
-
-inline void CCrystalEditView::SetAutoIndent (bool bAutoIndent)
-{
-  m_bAutoIndent = bAutoIndent;
-}
-
-inline bool CCrystalEditView::GetInsertTabs ()
-const
-{
-  return m_pTextBuffer->GetInsertTabs();
-}
-
-inline void CCrystalEditView::SetInsertTabs (bool bInsertTabs)
-{
-  m_pTextBuffer->SetInsertTabs(bInsertTabs);
-}
-
-#endif
index 924fd60..b291179 100644 (file)
@@ -313,9 +313,21 @@ public :
     DECLARE_MESSAGE_MAP ()
   };
 
-#if ! (defined(CE_FROM_DLL) || defined(CE_DLL_BUILD))
-#include "ccrystaltextbuffer.inl"
-#endif
+
+inline bool CCrystalTextBuffer::IsModified () const
+{
+  return m_bModified;
+}
+
+inline bool CCrystalTextBuffer::GetInsertTabs() const          //UPDATE-BEGIN
+{
+    return m_bInsertTabs;
+}
+
+inline void CCrystalTextBuffer::SetInsertTabs(bool bInsertTabs)
+{
+    m_bInsertTabs = bInsertTabs;
+}
 
 /////////////////////////////////////////////////////////////////////////////
 
diff --git a/Externals/crystaledit/editlib/ccrystaltextbuffer.inl b/Externals/crystaledit/editlib/ccrystaltextbuffer.inl
deleted file mode 100644 (file)
index 880b88a..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-////////////////////////////////////////////////////////////////////////////
-//  File:       CCrystalTextBuffer.inl
-//  Version:    1.0.0.0
-//  Created:    29-Dec-1998
-//
-//  Author:     Stcherbatchenko Andrei
-//  E-mail:     windfall@gmx.de
-//
-//  Inline functions of Crystal Edit classes
-//
-//  You are free to use or modify this code to the following restrictions:
-//  - Acknowledge me somewhere in your about box, simple "Parts of code by.."
-//  will be enough. If you can't (or don't want to), contact me personally.
-//  - LEAVE THIS HEADER INTACT
-////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////
-//  19-Jul-99
-//      Ferdinand Prantl:
-//  +   FEATURE: see cpps ...
-//
-//  ... it's being edited very rapidly so sorry for non-commented
-//        and maybe "ugly" code ...
-////////////////////////////////////////////////////////////////////////////
-
-#ifndef __CCrystalTextBuffer_INL_INCLUDED
-#define __CCrystalTextBuffer_INL_INCLUDED
-
-#include "ccrystaltextbuffer.h"
-
-inline bool CCrystalTextBuffer::
-IsModified ()
-const
-{
-  return m_bModified;
-}
-
-inline bool CCrystalTextBuffer::GetInsertTabs() const          //UPDATE-BEGIN
-{
-    return m_bInsertTabs;
-}
-
-inline void CCrystalTextBuffer::SetInsertTabs(bool bInsertTabs)
-{
-    m_bInsertTabs = bInsertTabs;
-}
-
-#endif
index 8b97093..742436c 100644 (file)
@@ -994,9 +994,11 @@ protected :
 #define ASSERT_VALIDTEXTPOS(pt)
 #endif
 
-#if ! (defined(CE_FROM_DLL) || defined(CE_DLL_BUILD))
-#include "ccrystaltextview.inl"
-#endif
+
+inline bool CCrystalTextView::IsDraggingText () const
+{
+  return m_bDraggingText;
+}
 
 /////////////////////////////////////////////////////////////////////////////
 
diff --git a/Externals/crystaledit/editlib/ccrystaltextview.inl b/Externals/crystaledit/editlib/ccrystaltextview.inl
deleted file mode 100644 (file)
index aa5ea26..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-////////////////////////////////////////////////////////////////////////////
-//  File:       CCrystalTextView.inl
-//  Version:    1.0.0.0
-//  Created:    29-Dec-1998
-//
-//  Author:     Stcherbatchenko Andrei
-//  E-mail:     windfall@gmx.de
-//
-//  Inline functions of Crystal Edit classes
-//
-//  You are free to use or modify this code to the following restrictions:
-//  - Acknowledge me somewhere in your about box, simple "Parts of code by.."
-//  will be enough. If you can't (or don't want to), contact me personally.
-//  - LEAVE THIS HEADER INTACT
-////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////
-//  19-Jul-99
-//      Ferdinand Prantl:
-//  +   FEATURE: see cpps ...
-//
-//  ... it's being edited very rapidly so sorry for non-commented
-//        and maybe "ugly" code ...
-////////////////////////////////////////////////////////////////////////////
-
-#ifndef __CCrystalTextView_INL_INCLUDED
-#define __CCrystalTextView_INL_INCLUDED
-
-#include "ccrystaltextview.h"
-
-inline bool CCrystalTextView::
-IsDraggingText ()
-const
-{
-  return m_bDraggingText;
-}
-
-#endif
index 5f5f2ff..1d5085e 100644 (file)
@@ -22,16 +22,12 @@ CCrystalEditViewEx::CCrystalEditViewEx()
 
 HINSTANCE CCrystalEditViewEx::GetResourceHandle()
 {
-#ifdef CE_DLL_BUILD
-       return g_hDllInstance;
-#else
        // -> HE
        // call inherited
        return CCrystalEditView::GetResourceHandle();
        // <- HE
        // OLD
        //return AfxGetInstanceHandle();
-#endif
 }
 
 
index ca5b8e1..c7a5913 100644 (file)
 #include "StdAfx.h"
 #include "filesup.h"
 
-#ifdef  _DEBUG
-#include "filesup.inl"
-#endif // _DEBUG
-
-#ifdef INLINE
-#undef INLINE
-#endif
-#define INLINE
-
 ////////////////////////////////////////////////////////////////////////////////
 
 bool FileExist(LPCTSTR lpszPath)
@@ -34,8 +25,7 @@ bool FileExist(LPCTSTR lpszPath)
   return CFile::GetStatus(lpszPath, status) != 0;
 }
 
-INLINE int
-GetExtPosition (LPCTSTR pszString)
+int GetExtPosition (LPCTSTR pszString)
 {
   if (!pszString || !*pszString)
     return 0;
@@ -53,8 +43,7 @@ GetExtPosition (LPCTSTR pszString)
   return len;
 }
 
-INLINE CString
-GetExt (CString sString)
+CString GetExt (CString sString)
 {
   if (!sString.IsEmpty ())
     {
@@ -67,22 +56,19 @@ GetExt (CString sString)
   return sString;
 }
 
-INLINE CString
-GetName (const CString & sString)
+CString GetName (const CString & sString)
 {
   int nPosition = GetNamePosition (sString), nPosition2 = GetExtPosition (sString);
 
   return sString.IsEmpty ()? sString : (nPosition2 == sString.GetLength ()? sString.Mid (nPosition) : sString.Mid (nPosition, nPosition2 - nPosition));
 }
 
-INLINE CString
-GetNameExt (const CString & sString)
+CString GetNameExt (const CString & sString)
 {
   return sString.IsEmpty ()? sString : sString.Mid (GetNamePosition (sString));
 }
 
-INLINE int
-GetNamePosition (LPCTSTR pszString)
+int GetNamePosition (LPCTSTR pszString)
 {
   if (!pszString || !*pszString)
     return 0;
@@ -100,8 +86,7 @@ GetNamePosition (LPCTSTR pszString)
   return posit;
 }
 
-INLINE CString
-GetPath (const CString & sString, bool bClose /*= false*/ )
+CString GetPath (const CString & sString, bool bClose /*= false*/ )
 {
   if (sString.IsEmpty ())
     return sString;
@@ -120,8 +105,7 @@ GetPath (const CString & sString, bool bClose /*= false*/ )
   return sString.Left (bClose ? posit : test == _T (':') ? posit : posit - 1);
 }
 
-INLINE CString
-GetPathName (const CString & sString)
+CString GetPathName (const CString & sString)
 {
   int nPosition = GetExtPosition (sString);
 
index 75d0809..fe886e7 100644 (file)
@@ -26,11 +26,3 @@ CString EDITPADC_CLASS GetNameExt (const CString & sString);
 int EDITPADC_CLASS GetNamePosition (LPCTSTR pszString);
 CString EDITPADC_CLASS GetPath (const CString & sString, bool bClose = false);
 CString EDITPADC_CLASS GetPathName (const CString & sString);
-
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _DEBUG
-#include "filesup.inl"
-#endif // _DEBUG
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/crystaledit/editlib/filesup.inl b/Externals/crystaledit/editlib/filesup.inl
deleted file mode 100644 (file)
index 2033193..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-///////////////////////////////////////////////////////////////////////////
-//  File:    filesup.inl
-//  Version: 1.1.0.4
-//  Updated: 19-Jul-1998
-//
-//  Copyright:  Ferdinand Prantl, portions by Stcherbatchenko Andrei
-//  E-mail:     prantl@ff.cuni.cz
-//
-//  Some handy stuff to deal with files and their names
-//
-//  You are free to use or modify this code to the following restrictions:
-//  - Acknowledge me somewhere in your about box, simple "Parts of code by.."
-//  will be enough. If you can't (or don't want to), contact me personally.
-//  - LEAVE THIS HEADER INTACT
-////////////////////////////////////////////////////////////////////////////
-
-#ifndef __FILESUP_INL__INCLUDED__
-#define __FILESUP_INL__INCLUDED__
-
-////////////////////////////////////////////////////////////////////////////////
-
-#ifdef INLINE
-#undef INLINE
-#endif
-
-#ifndef _DEBUG
-#define INLINE inline
-#else
-#define INLINE
-#endif // _DEBUG
-
-////////////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////////
-
-#endif // __FILESUP_INL__INCLUDED__
index b227b20..1083ddf 100644 (file)
 
 #define REMEMBER_COUNT  64
 
-#ifdef  _DEBUG
-#include "memcombo.inl"
-#endif // _DEBUG
-
-#ifdef INLINE
-#undef INLINE
-#endif
-#define INLINE
-
 /////////////////////////////////////////////////////////////////////////////
 // CMemComboBox
 
@@ -43,6 +34,17 @@ ON_CONTROL_REFLECT (CBN_SETFOCUS, OnSetfocus)
 //}}AFX_MSG_MAP
 END_MESSAGE_MAP ()
 
+////////////////////////////////////////////////////////////////////////////////
+// Methods
+
+CMemComboBox::CMemComboBox () : m_bFirstFocus (true)
+{
+}
+
+CMemComboBox::~CMemComboBox ()
+{
+}
+
 /////////////////////////////////////////////////////////////////////////////
 // CMemComboBox message handlers
 
index 0ae5e25..89e8133 100644 (file)
@@ -68,9 +68,3 @@ public :
   };
 
 /////////////////////////////////////////////////////////////////////////////
-
-#ifndef _DEBUG
-#include "memcombo.inl"
-#endif // _DEBUG
-
-/////////////////////////////////////////////////////////////////////////////
diff --git a/Externals/crystaledit/editlib/memcombo.inl b/Externals/crystaledit/editlib/memcombo.inl
deleted file mode 100644 (file)
index 3560f8e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-///////////////////////////////////////////////////////////////////////////
-//  File:    memcombo.inl
-//  Version: 1.1.0.4
-//  Updated: 19-Jul-1998
-//
-//  Copyright:  Ferdinand Prantl
-//  E-mail:     prantl@ff.cuni.cz
-//
-//  Combo-box saving last typed expressions
-//
-//  You are free to use or modify this code to the following restrictions:
-//  - Acknowledge me somewhere in your about box, simple "Parts of code by.."
-//  will be enough. If you can't (or don't want to), contact me personally.
-//  - LEAVE THIS HEADER INTACT
-////////////////////////////////////////////////////////////////////////////
-
-#ifndef __MEMCOMBO_INL__INCLUDED__
-#define __MEMCOMBO_INL__INCLUDED__
-
-#ifdef INLINE
-#undef INLINE
-#endif
-
-#ifndef _DEBUG
-#define INLINE inline
-#else
-#define INLINE
-#endif // _DEBUG
-
-////////////////////////////////////////////////////////////////////////////////
-// Methods
-
-INLINE
-CMemComboBox::CMemComboBox () : m_bFirstFocus (true)
-{
-}
-
-INLINE
-CMemComboBox::~CMemComboBox ()
-{
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-#endif // __MEMCOMBO_INL__INCLUDED__
index 1be97ce..17b5226 100644 (file)
     <ClInclude Include="CompareEngines\TimeSizeCompare.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaleditview.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextbuffer.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextview.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\filesup.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\memcombo.inl" />\r
     <None Include="res\binarydiff.ico" />\r
     <None Include="res\both.bmp" />\r
     <None Include="res\equalbinary.ico" />\r
index 1153513..f9e5a03 100644 (file)
     <None Include="..\Docs\Users\ChangeLog.txt">\r
       <Filter>ChangeLogs</Filter>\r
     </None>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaleditview.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextbuffer.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextview.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\filesup.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\memcombo.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ResourceCompile Include="Merge.rc">\r
index 2fca43e..1daf9c1 100644 (file)
     <ClInclude Include="CompareEngines\TimeSizeCompare.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaleditview.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextbuffer.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextview.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\filesup.inl" />\r
-    <None Include="..\Externals\crystaledit\editlib\memcombo.inl" />\r
     <None Include="res\binarydiff.ico" />\r
     <None Include="res\both.bmp" />\r
     <None Include="res\equalbinary.ico" />\r
index a401f53..59f54aa 100644 (file)
     <None Include="..\Docs\Users\ChangeLog.txt">\r
       <Filter>ChangeLogs</Filter>\r
     </None>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaleditview.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextbuffer.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\ccrystaltextview.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\filesup.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
-    <None Include="..\Externals\crystaledit\editlib\memcombo.inl">\r
-      <Filter>EditLib</Filter>\r
-    </None>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ResourceCompile Include="Merge.rc">\r