From 55d7446b9c8622cfb765e45fb8bbcb50b1f057e9 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Sun, 15 Nov 2015 19:51:45 +0900 Subject: [PATCH] Remove #if defined(_AFXDLL) because of using MFC static library now --- Src/Merge.cpp | 35 ----------------------------------- Src/PatchHTML.cpp | 6 ------ Src/diffutils/lib/cmpbuf.c | 6 ------ Src/diffutils/src/Diff.cpp | 5 ----- Src/diffutils/src/ED.C | 6 ------ Src/diffutils/src/NORMAL.C | 6 ------ Src/diffutils/src/analyze.c | 6 ------ Src/diffutils/src/context.c | 6 ------ Src/diffutils/src/ifdef.c | 6 ------ Src/diffutils/src/io.c | 6 ------ Src/diffutils/src/side.c | 6 ------ Src/diffutils/src/util.c | 6 ------ 12 files changed, 100 deletions(-) diff --git a/Src/Merge.cpp b/Src/Merge.cpp index 2c0823dcb..141b895bd 100644 --- a/Src/Merge.cpp +++ b/Src/Merge.cpp @@ -170,8 +170,6 @@ BEGIN_MESSAGE_MAP(CMergeApp, CWinApp) ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) END_MESSAGE_MAP() -static void AddEnglishResourceHook(); - /** * @brief Mapping from command line argument name (eg, ignorews) to WinMerge * option name (eg, Settings/IgnoreSpace). @@ -424,8 +422,6 @@ BOOL CMergeApp::InitInstance() m_pLangDlg->InitializeLanguage((WORD)GetOptionsMgr()->GetInt(OPT_SELECTED_LANGUAGE)); - AddEnglishResourceHook(); // Use English string when l10n (foreign) string missing - m_mainThreadScripts = new CAssureScriptsForThread; // Register the application's document templates. Document templates @@ -549,37 +545,6 @@ int CMergeApp::ExitInstance() return 0; } -static void AddEnglishResourceHook() -{ -#ifdef _AFXDLL - // After calling AfxSetResourceHandle to point to a language - // resource DLL, then the application is no longer on the - // resource lookup (defined by AfxFindResourceHandle). - - // Add a dummy extension DLL record whose resource handle - // points to the application resources, just to provide - // fallback to English for any resources missing from - // the language resource DLL. - - // (Why didn't Microsoft think of this? Bruno Haible who - // made gettext certainly thought of this.) - - // NB: This does not fix the problem that if a control is - // missing from a dialog (because it was added only to the - // English version, for example) then the DDX_ function is - // going to fail. I see no easy way to intercept all DDX - // functions except by macro overriding the call--Perry, 2002-12-07. - - static AFX_EXTENSION_MODULE FakeEnglishDLL = { NULL, NULL }; - memset(&FakeEnglishDLL, 0, sizeof(FakeEnglishDLL)); - FakeEnglishDLL.hModule = AfxGetApp()->m_hInstance; - FakeEnglishDLL.hResource = FakeEnglishDLL.hModule; - FakeEnglishDLL.bInitialized = TRUE; - new CDynLinkLibrary(FakeEnglishDLL); // hook into MFC extension DLL chain -#endif -} - - int CMergeApp::DoMessageBox( LPCTSTR lpszPrompt, UINT nType, UINT nIDPrompt ) { // This is a convenient point for breakpointing !!! diff --git a/Src/PatchHTML.cpp b/Src/PatchHTML.cpp index 27c041934..e7ac6e775 100644 --- a/Src/PatchHTML.cpp +++ b/Src/PatchHTML.cpp @@ -21,12 +21,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "diff.h" #include -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131) -#endif - - static struct change *find_hunk(struct change *); static void mark_ignorable(struct change *); static void pr_unidiff_hunk(struct change *); diff --git a/Src/diffutils/lib/cmpbuf.c b/Src/diffutils/lib/cmpbuf.c index 046c1579d..e95a8f98e 100644 --- a/Src/diffutils/lib/cmpbuf.c +++ b/Src/diffutils/lib/cmpbuf.c @@ -18,12 +18,6 @@ #include "system.h" #include "cmpbuf.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131) -#endif - - /* Least common multiple of two buffer sizes A and B. */ size_t diff --git a/Src/diffutils/src/Diff.cpp b/Src/diffutils/src/Diff.cpp index c5f7cdf13..0467c5e40 100644 --- a/Src/diffutils/src/Diff.cpp +++ b/Src/diffutils/src/Diff.cpp @@ -30,11 +30,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "io.h" #include "diffwrapper.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4706) -#endif - #ifndef DEFAULT_WIDTH diff --git a/Src/diffutils/src/ED.C b/Src/diffutils/src/ED.C index 455c98204..3e382f289 100644 --- a/Src/diffutils/src/ED.C +++ b/Src/diffutils/src/ED.C @@ -19,12 +19,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "diff.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131) -#endif - - static void print_ed_hunk PARAMS((struct change *)); static void print_rcs_hunk PARAMS((struct change *)); static void pr_forward_ed_hunk PARAMS((struct change *)); diff --git a/Src/diffutils/src/NORMAL.C b/Src/diffutils/src/NORMAL.C index f8147a412..7a84ac1ec 100644 --- a/Src/diffutils/src/NORMAL.C +++ b/Src/diffutils/src/NORMAL.C @@ -20,12 +20,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "diff.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131) -#endif - - static void print_normal_hunk PARAMS((struct change *)); /* Print the edit-script SCRIPT as a normal diff. diff --git a/Src/diffutils/src/analyze.c b/Src/diffutils/src/analyze.c index 53a1a6a27..ff5b21d13 100644 --- a/Src/diffutils/src/analyze.c +++ b/Src/diffutils/src/analyze.c @@ -30,12 +30,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ "Algorithms for Approximate String Matching", E. Ukkonen, Information and Control Vol. 64, 1985, pp. 100-118. */ -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131 4127 4013 4090) -#endif - - #include "diff.h" #include "cmpbuf.h" diff --git a/Src/diffutils/src/context.c b/Src/diffutils/src/context.c index daa26efb2..54fafa42f 100644 --- a/Src/diffutils/src/context.c +++ b/Src/diffutils/src/context.c @@ -19,12 +19,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "diff.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131) -#endif - - static struct change *find_hunk PARAMS((struct change *)); static void find_function PARAMS((struct file_data const *, int, char const HUGE **, size_t *)); static void mark_ignorable PARAMS((struct change *)); diff --git a/Src/diffutils/src/ifdef.c b/Src/diffutils/src/ifdef.c index afffd0e2d..15e9df61e 100644 --- a/Src/diffutils/src/ifdef.c +++ b/Src/diffutils/src/ifdef.c @@ -21,12 +21,6 @@ and this notice must be preserved on all copies. */ #include "diff.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131) -#endif - - struct group { struct file_data const *file; diff --git a/Src/diffutils/src/io.c b/Src/diffutils/src/io.c index b5660027d..904dc0316 100644 --- a/Src/diffutils/src/io.c +++ b/Src/diffutils/src/io.c @@ -19,12 +19,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "diff.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131 4013 4090) -#endif - - /* Rotate a value n bits to the left. */ #define UINT_BIT (sizeof (unsigned) * CHAR_BIT) #define ROL(v, n) ((v) << (n) | (v) >> (UINT_BIT - (n))) diff --git a/Src/diffutils/src/side.c b/Src/diffutils/src/side.c index 49f78e6b9..487735a4e 100644 --- a/Src/diffutils/src/side.c +++ b/Src/diffutils/src/side.c @@ -21,12 +21,6 @@ and this notice must be preserved on all copies. */ #include "diff.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131) -#endif - - static unsigned print_half_line PARAMS((char const HUGE * const *, unsigned, unsigned)); static unsigned tab_from_to PARAMS((unsigned, unsigned)); static void print_1sdiff_line PARAMS((char const HUGE * const *, int, char const HUGE * const *)); diff --git a/Src/diffutils/src/util.c b/Src/diffutils/src/util.c index 383deea88..d8c60f463 100644 --- a/Src/diffutils/src/util.c +++ b/Src/diffutils/src/util.c @@ -20,12 +20,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include "diff.h" -// reduce some noise produced with the MSVC compiler -#if defined (_AFXDLL) -#pragma warning(disable : 4131 4127) -#endif - - /* Queue up one-line messages to be printed at the end, when -l is specified. Each message is recorded with a `struct msg'. */ -- 2.11.0