From 13dec2e88a4a0ba52efdd8ac2510ad791c2d6471 Mon Sep 17 00:00:00 2001 From: GreyMerlin Date: Sat, 23 Sep 2017 16:37:27 -0700 Subject: [PATCH] Cleanup: Eliminate silly *.inl files in CCrystalEdit * 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 --- Externals/crystaledit/editlib/ccrystaleditview.h | 44 ++++++++++++- Externals/crystaledit/editlib/ccrystaleditview.inl | 73 ---------------------- Externals/crystaledit/editlib/ccrystaltextbuffer.h | 18 +++++- .../crystaledit/editlib/ccrystaltextbuffer.inl | 48 -------------- Externals/crystaledit/editlib/ccrystaltextview.h | 8 ++- Externals/crystaledit/editlib/ccrystaltextview.inl | 38 ----------- .../crystaledit/editlib/crystaleditviewex.cpp | 4 -- Externals/crystaledit/editlib/filesup.cpp | 30 +++------ Externals/crystaledit/editlib/filesup.h | 8 --- Externals/crystaledit/editlib/filesup.inl | 36 ----------- Externals/crystaledit/editlib/memcombo.cpp | 20 +++--- Externals/crystaledit/editlib/memcombo.h | 6 -- Externals/crystaledit/editlib/memcombo.inl | 45 ------------- Src/Merge.vs2015.vcxproj | 5 -- Src/Merge.vs2015.vcxproj.filters | 15 ----- Src/Merge.vs2017.vcxproj | 5 -- Src/Merge.vs2017.vcxproj.filters | 15 ----- 17 files changed, 79 insertions(+), 339 deletions(-) delete mode 100644 Externals/crystaledit/editlib/ccrystaleditview.inl delete mode 100644 Externals/crystaledit/editlib/ccrystaltextbuffer.inl delete mode 100644 Externals/crystaledit/editlib/ccrystaltextview.inl delete mode 100644 Externals/crystaledit/editlib/filesup.inl delete mode 100644 Externals/crystaledit/editlib/memcombo.inl diff --git a/Externals/crystaledit/editlib/ccrystaleditview.h b/Externals/crystaledit/editlib/ccrystaleditview.h index 8ccfd6f4f..583758c22 100644 --- a/Externals/crystaledit/editlib/ccrystaleditview.h +++ b/Externals/crystaledit/editlib/ccrystaleditview.h @@ -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 index 737dad8c5..000000000 --- a/Externals/crystaledit/editlib/ccrystaleditview.inl +++ /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 diff --git a/Externals/crystaledit/editlib/ccrystaltextbuffer.h b/Externals/crystaledit/editlib/ccrystaltextbuffer.h index 924fd60bd..b2911798f 100644 --- a/Externals/crystaledit/editlib/ccrystaltextbuffer.h +++ b/Externals/crystaledit/editlib/ccrystaltextbuffer.h @@ -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 index 880b88a04..000000000 --- a/Externals/crystaledit/editlib/ccrystaltextbuffer.inl +++ /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 diff --git a/Externals/crystaledit/editlib/ccrystaltextview.h b/Externals/crystaledit/editlib/ccrystaltextview.h index 8b9709352..742436c11 100644 --- a/Externals/crystaledit/editlib/ccrystaltextview.h +++ b/Externals/crystaledit/editlib/ccrystaltextview.h @@ -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 index aa5ea269d..000000000 --- a/Externals/crystaledit/editlib/ccrystaltextview.inl +++ /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 diff --git a/Externals/crystaledit/editlib/crystaleditviewex.cpp b/Externals/crystaledit/editlib/crystaleditviewex.cpp index 5f5f2ff9e..1d5085ed1 100644 --- a/Externals/crystaledit/editlib/crystaleditviewex.cpp +++ b/Externals/crystaledit/editlib/crystaleditviewex.cpp @@ -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 } diff --git a/Externals/crystaledit/editlib/filesup.cpp b/Externals/crystaledit/editlib/filesup.cpp index ca5b8e1b2..c7a59130a 100644 --- a/Externals/crystaledit/editlib/filesup.cpp +++ b/Externals/crystaledit/editlib/filesup.cpp @@ -17,15 +17,6 @@ #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); diff --git a/Externals/crystaledit/editlib/filesup.h b/Externals/crystaledit/editlib/filesup.h index 75d0809bc..fe886e784 100644 --- a/Externals/crystaledit/editlib/filesup.h +++ b/Externals/crystaledit/editlib/filesup.h @@ -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 index 203319363..000000000 --- a/Externals/crystaledit/editlib/filesup.inl +++ /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__ diff --git a/Externals/crystaledit/editlib/memcombo.cpp b/Externals/crystaledit/editlib/memcombo.cpp index b227b20d7..1083ddf7e 100644 --- a/Externals/crystaledit/editlib/memcombo.cpp +++ b/Externals/crystaledit/editlib/memcombo.cpp @@ -25,15 +25,6 @@ #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 diff --git a/Externals/crystaledit/editlib/memcombo.h b/Externals/crystaledit/editlib/memcombo.h index 0ae5e2515..89e813322 100644 --- a/Externals/crystaledit/editlib/memcombo.h +++ b/Externals/crystaledit/editlib/memcombo.h @@ -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 index 3560f8ec3..000000000 --- a/Externals/crystaledit/editlib/memcombo.inl +++ /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__ diff --git a/Src/Merge.vs2015.vcxproj b/Src/Merge.vs2015.vcxproj index 1be97ce98..17b522602 100644 --- a/Src/Merge.vs2015.vcxproj +++ b/Src/Merge.vs2015.vcxproj @@ -1123,11 +1123,6 @@ - - - - - diff --git a/Src/Merge.vs2015.vcxproj.filters b/Src/Merge.vs2015.vcxproj.filters index 115351392..f9e5a0304 100644 --- a/Src/Merge.vs2015.vcxproj.filters +++ b/Src/Merge.vs2015.vcxproj.filters @@ -1520,21 +1520,6 @@ ChangeLogs - - EditLib - - - EditLib - - - EditLib - - - EditLib - - - EditLib - diff --git a/Src/Merge.vs2017.vcxproj b/Src/Merge.vs2017.vcxproj index 2fca43e08..1daf9c183 100644 --- a/Src/Merge.vs2017.vcxproj +++ b/Src/Merge.vs2017.vcxproj @@ -1123,11 +1123,6 @@ - - - - - diff --git a/Src/Merge.vs2017.vcxproj.filters b/Src/Merge.vs2017.vcxproj.filters index a401f5332..59f54aa59 100644 --- a/Src/Merge.vs2017.vcxproj.filters +++ b/Src/Merge.vs2017.vcxproj.filters @@ -1520,21 +1520,6 @@ ChangeLogs - - EditLib - - - EditLib - - - EditLib - - - EditLib - - - EditLib - -- 2.11.0