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).
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
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 !!!
#include "diff.h"
#include <algorithm>
-// 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 *);
#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
#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
#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 *));
#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.
"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"
#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 *));
#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;
#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)))
#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 *));
#include <windows.h>
#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'. */