mahogany-cvsupdates Mailing List for Mahogany mail and news client
Status: Beta
Brought to you by:
vadz
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(162) |
Oct
(140) |
Nov
(182) |
Dec
(55) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(203) |
Feb
(187) |
Mar
(289) |
Apr
(242) |
May
(151) |
Jun
(204) |
Jul
(288) |
Aug
(212) |
Sep
(193) |
Oct
(174) |
Nov
(273) |
Dec
(221) |
| 2002 |
Jan
(123) |
Feb
(71) |
Mar
(177) |
Apr
(193) |
May
(69) |
Jun
(95) |
Jul
(136) |
Aug
(34) |
Sep
(152) |
Oct
(76) |
Nov
(58) |
Dec
(129) |
| 2003 |
Jan
(66) |
Feb
(87) |
Mar
(69) |
Apr
(91) |
May
(3) |
Jun
(56) |
Jul
(147) |
Aug
(116) |
Sep
(167) |
Oct
(249) |
Nov
(34) |
Dec
(96) |
| 2004 |
Jan
(143) |
Feb
(9) |
Mar
(71) |
Apr
(92) |
May
(65) |
Jun
(27) |
Jul
(324) |
Aug
(19) |
Sep
(119) |
Oct
(98) |
Nov
(44) |
Dec
(7) |
| 2005 |
Jan
(5) |
Feb
(25) |
Mar
(10) |
Apr
(27) |
May
(28) |
Jun
(28) |
Jul
(121) |
Aug
(3) |
Sep
(6) |
Oct
(1) |
Nov
(18) |
Dec
(12) |
| 2006 |
Jan
(40) |
Feb
(41) |
Mar
(7) |
Apr
(47) |
May
(35) |
Jun
(56) |
Jul
(25) |
Aug
(68) |
Sep
(19) |
Oct
(19) |
Nov
(17) |
Dec
(37) |
| 2007 |
Jan
(11) |
Feb
(1) |
Mar
(4) |
Apr
(44) |
May
(12) |
Jun
(17) |
Jul
(18) |
Aug
(46) |
Sep
(23) |
Oct
(6) |
Nov
(8) |
Dec
(8) |
| 2008 |
Jan
(2) |
Feb
(1) |
Mar
(7) |
Apr
(24) |
May
(49) |
Jun
(1) |
Jul
(17) |
Aug
(45) |
Sep
|
Oct
(3) |
Nov
(2) |
Dec
|
| 2009 |
Jan
(6) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(3) |
Jun
|
Jul
(3) |
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(15) |
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2012 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
(2) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(1) |
| 2021 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: vadz <mah...@us...> - 2025-07-01 17:07:48
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via a08eccada51093940e6dbc47b92821b10af4db36 (commit)
via e8eddb343995a8606231f132610a65bb15557063 (commit)
via 6d2d1f7574e9e7eed14d40ba49f595206bed32a6 (commit)
via 7d06fdb792490290f04637c67d7e1bdf23ac5b41 (commit)
via 709118d8eb871d7fb4bd26364db75793246260ff (commit)
via 0e32f9a5a6ce054d5a971444e3c84f8b8495f74a (commit)
via bd1e35a8cee9225c7e30f9648d944b76c344c790 (commit)
via 5d2a27011c9153972c0a67383d5f0f5fd315202a (commit)
via a662d5983db0eaf949477cf3e795b6c1c9ab45d0 (commit)
from 24a99e76838e143fdec655a5f0dbaa370df90264 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a08eccada51093940e6dbc47b92821b10af4db36
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 1 17:51:17 2025 +0200
Define libraries search path correctly in DLL configurations
Search for the libraries in the directories without "DLL" in their
names, as this is where they are.
diff --git a/M.vsprops b/M.vsprops
index dd95c42e..d4a86afb 100644
--- a/M.vsprops
+++ b/M.vsprops
@@ -3,6 +3,16 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(WXWIN)\wxwidgets.props" />
</ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <!--
+ Our library projects don't have DLL configurations, so we need to look in
+ the directories without "DLL" in their names to find them.
+ -->
+ <LibOutSubdir Condition="'$(Configuration)'=='Debug'">Debug</LibOutSubdir>
+ <LibOutSubdir Condition="'$(Configuration)'=='Debug DLL'">Debug</LibOutSubdir>
+ <LibOutSubdir Condition="'$(Configuration)'=='Release'">Release</LibOutSubdir>
+ <LibOutSubdir Condition="'$(Configuration)'=='Release DLL'">Release</LibOutSubdir>
+ </PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_STC_LIB;wxNO_WEBVIEW_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -18,5 +28,8 @@
<DisableSpecificWarnings>4100;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalIncludeDirectories>include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>$(Platform)\$(LibOutSubdir)\output;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ </Link>
</ItemDefinitionGroup>
</Project>
commit e8eddb343995a8606231f132610a65bb15557063
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 1 17:45:05 2025 +0200
Harmonize output directories names for all configurations
diff --git a/M.vcxproj b/M.vcxproj
index 85f1b931..97b40b62 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -38,6 +38,7 @@
<ProjectGuid>{1515C8EB-5C72-43DF-9D3A-0703F155F268}</ProjectGuid>
<RootNamespace>M</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -115,27 +116,27 @@
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">$(Platform)\$(Configuration)\output</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">$(Platform)\$(Configuration)\output</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">$(Platform)\$(Configuration)\output</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">$(Platform)\$(Configuration)\output</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\output\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</LinkIncremental>
</PropertyGroup>
@@ -1553,4 +1554,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
commit 6d2d1f7574e9e7eed14d40ba49f595206bed32a6
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 1 17:20:06 2025 +0200
Extract MSVS options common to all configurations in M.vsprops
This allows to modify them in a single place instead of doing it for all
8 of the existing configurations.
Remove the unnecessary wx directories from AdditionalIncludeDirectories
and AdditionalLibraryDirectories as they're already added there by
wxwidgets.props.
Also disable some warnings to get less noisy build logs.
diff --git a/M.vcxproj b/M.vcxproj
index 5c30f37f..85f1b931 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -84,8 +84,8 @@
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
+ <Import Project="M.vsprops" />
<Import Project="python.vsprops" Condition="Exists('python.vsprops')" />
- <Import Project="$(WXWIN)\wxwidgets.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -145,24 +145,18 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -174,28 +168,25 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -207,30 +198,27 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -241,30 +229,27 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -275,13 +260,15 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -289,15 +276,10 @@
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -306,13 +288,15 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">
<ClCompile>
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -320,15 +304,10 @@
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -337,6 +316,9 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
@@ -344,8 +326,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -353,15 +334,10 @@
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -370,6 +346,9 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">
<Midl>
@@ -377,8 +356,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -386,15 +364,10 @@
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>include;$(wxwin)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -403,6 +376,9 @@
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\classes\CacheFile.cpp" />
@@ -1550,24 +1526,7 @@
<ClInclude Include="include\XFace.h" />
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="res\M.rc">
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">WX_MSC_FULL_VER=150030729;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
+ <ResourceCompile Include="res\M.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="lib\compface\compface.vcxproj">
diff --git a/M.vsprops b/M.vsprops
new file mode 100644
index 00000000..dd95c42e
--- /dev/null
+++ b/M.vsprops
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WXWIN)\wxwidgets.props" />
+ </ImportGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_STC_LIB;wxNO_WEBVIEW_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <!--
+ Globally disable some warnings:
+
+ - 4100: 'identifier' : unreferenced formal parameter
+ There are just too many of those and they rarely indicate any serious problem.
+ - 4244: '=': conversion from 'type' to 'type'
+ 4267: 'argument': conversion from 'size_t' to 'type', possible loss of data
+ Would be nice to fix but, again, there are just too many of those right now.
+ -->
+ <DisableSpecificWarnings>4100;4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
commit 7d06fdb792490290f04637c67d7e1bdf23ac5b41
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 1 16:51:57 2025 +0200
Stop defining wxMSVC_VERSION_ABI_COMPAT in MSVS project
Just use the standard, unversioned build directory.
diff --git a/M.vcxproj b/M.vcxproj
index ccd409a9..5c30f37f 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -146,7 +146,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -179,7 +179,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -214,7 +214,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -248,7 +248,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -281,7 +281,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -312,7 +312,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -345,7 +345,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -378,7 +378,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -1594,4 +1594,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
commit 709118d8eb871d7fb4bd26364db75793246260ff
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 1 04:07:16 2025 +0200
Fix CI build using wxWidgets from Conda forge
Specify wx-config using configure option.
Use matching configuration with MSVS.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2efc181d..9f08103d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,7 +10,7 @@ jobs:
build-linux:
runs-on: ubuntu-latest
env:
- WX_CONFIG: /usr/share/miniconda/bin/wx-config
+ LD_LIBRARY_PATH: /usr/lib/miniconda/lib
steps:
- uses: actions/checkout@v4
- name: Bootstrap
@@ -29,10 +29,10 @@ jobs:
run: |
mkdir build
cd build
- ../configure
+ ../configure --with-wx-config=/usr/share/miniconda/bin/wx-config
- name: Build
run: |
- make -C build
+ make -j`nproc` -C build
build-windows:
runs-on: windows-latest
@@ -53,4 +53,4 @@ jobs:
- name: Build
env:
WXWIN: 'c:\Miniconda\envs\wxenv\Library'
- run: msbuild.exe M.sln
+ run: msbuild.exe -noLogo -maxCpuCount -property:"Platform=x64,Configuration=Release DLL" M.sln
commit 0e32f9a5a6ce054d5a971444e3c84f8b8495f74a
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 1 04:06:25 2025 +0200
Create osdep.h as part of MSVS build
Somehow this seems to never have been done, but this file is needed
during the build.
diff --git a/lib/imap/imap.vcxproj b/lib/imap/imap.vcxproj
index 322faa78..bc0a4a7f 100644
--- a/lib/imap/imap.vcxproj
+++ b/lib/imap/imap.vcxproj
@@ -229,6 +229,28 @@
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\ip_nt.c;%(Outputs)</Outputs>
</CustomBuild>
+ <CustomBuild Include="src\osdep\nt\os_nt.h">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Creating osdep.h.h...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy "%(FullPath)" "%(RootDir)%(Directory)"\osdep.h
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(RootDir)%(Directory)\osdep.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Creating osdep.h.h...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy "%(FullPath)" "%(RootDir)%(Directory)"\osdep.h
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(RootDir)%(Directory)\osdep.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Creating osdep.h.h...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy "%(FullPath)" "%(RootDir)%(Directory)"\osdep.h
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(RootDir)%(Directory)\osdep.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Creating osdep.h.h...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy "%(FullPath)" "%(RootDir)%(Directory)"\osdep.h
+</Command>
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(RootDir)%(Directory)\osdep.h;%(Outputs)</Outputs>
+ </CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Mconfig.vcxproj">
commit bd1e35a8cee9225c7e30f9648d944b76c344c790
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Jun 4 20:05:39 2025 +0200
Disable Python support under Windows for now
This would need to be set up in the CI environment, so disable it for
now to let the builds there pass.
diff --git a/M.vcxproj b/M.vcxproj
index 7b8b248f..ccd409a9 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -617,9 +617,36 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="src\Python\InitPython.cpp" />
- <ClCompile Include="src\Python\PythonDll.cpp" />
- <ClCompile Include="src\Python\PythonHelp.cpp" />
+ <ClCompile Include="src\Python\InitPython.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="src\Python\PythonDll.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="src\Python\PythonHelp.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="src\Python\HeaderInfo_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -653,6 +680,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Python\MailFolder_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -687,6 +722,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Python\MDialogs_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -721,6 +764,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Python\Message_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -755,6 +806,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Python\MimePart_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -789,6 +848,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Python\MimeType_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -823,6 +890,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Python\SendMessage_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -857,6 +932,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Python\swiglib_swig.cpp">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">STATIC_LINKED;SWIG_GLOBAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -891,6 +974,14 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">Level1</WarningLevel>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\util\ColourNames.cpp" />
<ClCompile Include="src\util\matchurl.cpp" />
diff --git a/include/config_nt.h b/include/config_nt.h
index 6bf026bc..2e1cbf2a 100644
--- a/include/config_nt.h
+++ b/include/config_nt.h
@@ -26,7 +26,7 @@
#undef HAVE_PI_ACCEPT_TO
/** Define if you use Python. */
-#define USE_PYTHON 1
+#undef USE_PYTHON
/** Define if you have libswigpy */
#undef HAVE_SWIGLIB
commit 5d2a27011c9153972c0a67383d5f0f5fd315202a
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 1 18:15:29 2025 +0200
Only use PostScript-related code under Unix
It doesn't make sense to use it under Windows, even if wxUSE_POSTSCRIPT
is set to 1, for whatever reason.
diff --git a/src/gui/wxMApp.cpp b/src/gui/wxMApp.cpp
index 9a79124e..267110af 100644
--- a/src/gui/wxMApp.cpp
+++ b/src/gui/wxMApp.cpp
@@ -53,9 +53,15 @@
#include <wx/generic/helpext.h>
-#if wxUSE_POSTSCRIPT
+// wxUSE_POSTSCRIPT may be set to 1 under Windows, but we really only want to
+// use it under Unix (and probably not even there, actually...).
+#if defined(OS_UNIX) && wxUSE_POSTSCRIPT
+ #define USE_POSTSCRIPT 1
+#endif
+
+#if USE_POSTSCRIPT
#include <wx/generic/prntdlgg.h>
-#endif // wxUSE_POSTSCRIPT
+#endif // USE_POSTSCRIPT
#if defined(OS_WIN) || defined(__CYGWIN__)
#define wxConnection wxDDEConnection
@@ -1368,7 +1374,7 @@ void wxMApp::CleanUpPrintData()
// save our preferred printer settings
if ( m_PrintData )
{
-#if wxUSE_POSTSCRIPT
+#if USE_POSTSCRIPT
wxPrintNativeDataBase * const dataNative = m_PrintData->GetNativeData();
wxPostScriptPrintNativeData * const dataPS =
wxDynamicCast(dataNative, wxPostScriptPrintNativeData);
@@ -1378,7 +1384,7 @@ void wxMApp::CleanUpPrintData()
m_profile->writeEntry(MP_PRINT_COMMAND, dataPS->GetPrinterCommand());
m_profile->writeEntry(MP_PRINT_OPTIONS, dataPS->GetPrinterOptions());
}
-#endif // wxUSE_POSTSCRIPT
+#endif // USE_POSTSCRIPT
m_profile->writeEntry(MP_PRINT_ORIENTATION, m_PrintData->GetOrientation());
m_profile->writeEntry(MP_PRINT_MODE, m_PrintData->GetPrintMode());
@@ -1414,7 +1420,7 @@ const wxPrintData *wxMApp::GetPrintData()
{
m_PrintData = new wxPrintData;
-#if wxUSE_POSTSCRIPT && !defined(__WINE__)
+#if USE_POSTSCRIPT && !defined(__WINE__)
wxPrintNativeDataBase * const dataNative = m_PrintData->GetNativeData();
...
[truncated message content] |
|
From: vadz <mah...@us...> - 2025-07-01 01:51:08
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 24a99e76838e143fdec655a5f0dbaa370df90264 (commit)
from e5264c5d909fb52fe265fb4642ecfcb233267e6b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 24a99e76838e143fdec655a5f0dbaa370df90264
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 1 03:48:51 2025 +0200
Add GitHub Actions CI workflow
Use Conda to install wxWidgets as this seems to be the fastest way to
get it.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..2efc181d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,56 @@
+name: CI
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+
+jobs:
+ build-linux:
+ runs-on: ubuntu-latest
+ env:
+ WX_CONFIG: /usr/share/miniconda/bin/wx-config
+ steps:
+ - uses: actions/checkout@v4
+ - name: Bootstrap
+ run: ./bootstrap
+ - name: Set up Miniconda
+ uses: conda-incubator/setup-miniconda@v3
+ with:
+ auto-activate-base: false
+ auto-update-conda: false
+ activate-environment: wxenv
+ channels: conda-forge,defaults
+ - name: Install wxWidgets
+ run: |
+ conda install -y conda-forge::wxwidgets
+ - name: Configure
+ run: |
+ mkdir build
+ cd build
+ ../configure
+ - name: Build
+ run: |
+ make -C build
+
+ build-windows:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up MSBuild
+ uses: microsoft/setup-msbuild@v2
+ - name: Set up Miniconda
+ uses: conda-incubator/setup-miniconda@v3
+ with:
+ auto-activate-base: false
+ auto-update-conda: false
+ activate-environment: wxenv
+ channels: conda-forge,defaults
+ - name: Install wxWidgets
+ run: |
+ conda install -y conda-forge::wxwidgets
+ - name: Build
+ env:
+ WXWIN: 'c:\Miniconda\envs\wxenv\Library'
+ run: msbuild.exe M.sln
-----------------------------------------------------------------------
Summary of changes:
.github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 .github/workflows/ci.yml
hooks/post-receive
--
Mahogany sources repository.
|
|
From: vadz <mah...@us...> - 2025-06-04 18:35:43
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via e5264c5d909fb52fe265fb4642ecfcb233267e6b (commit)
via 38f452c5f7482296b1af16242fb2a871deeb3df0 (commit)
via 6ffae3ca046c853897242d02afab8bf2d6f98851 (commit)
via 56cc8d56dd2de333f0fc5e38e0a0254aa49493ae (commit)
via 1327cf57c4bd693c854d830079173c9a64ca0200 (commit)
via d0713693a6de6ff9d56712182258a2d2c158ba2d (commit)
via 6c783323e7e9823bcee9909cddbffbdeec1baf78 (commit)
via 04b63f3349595cc9b3f3fe5c5f08fc99e129287f (commit)
via f8a25b17f06ae0b3145946a61eeddc9c184bdd26 (commit)
via 2137cd715ed4e7c747cb25f30c12df42fc24a984 (commit)
via 8f0185169fe114c6dda5c74c459f0b9c03609348 (commit)
via eb6a9d4c79047bd3d8b9ca891914d3ece34cac2e (commit)
via bab7c12b3f1f411d4e26db0ee4f5346d05c02256 (commit)
via a4886096921d34d3a93463559717c08eda216c11 (commit)
via fa78ddb94c445ce090b224c8cb6e64a5bfb01ab8 (commit)
via 121c0607024781524b50de7e001fde75e289b78c (commit)
via 0937095bd52a5c28b1fda54045e5d479dce54243 (commit)
via 4d806afeca9d336801540ebeca4577d7b2870d82 (commit)
via bc24424e8b9ef31448e6f2eceec7b9dabdf8f538 (commit)
via c70cd4b56792a1992243b3bbde2c2826ab71131b (commit)
via 7bc745d7d7e03ba1d2ac828b5710be32c5da92d0 (commit)
via d2eb671ab10390fc61ef1ae1638e0c2e58164b5e (commit)
via df66576684d8e783289a7332e3eeb628876f015a (commit)
via 63bc9837b98b901c26c1627f2fb1762897142b51 (commit)
from bcc0c9d101a040236ffe7d16c659956ebc0eb536 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e5264c5d909fb52fe265fb4642ecfcb233267e6b
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Jun 4 20:06:38 2025 +0200
Redefine "or" and "not" before including c-client headers with MSVC
MSVS 2022 is standards compliant now and handles these keywords by
default, as it should.
diff --git a/include/Mcclient.h b/include/Mcclient.h
index eef08900..90fcd42c 100644
--- a/include/Mcclient.h
+++ b/include/Mcclient.h
@@ -10,6 +10,11 @@
#ifndef MCCLIENT_H
#define MCCLIENT_H
+// MSVS 2022 requires this.
+#ifdef CC_MSC
+ #define M_LOGICAL_OP_NAMES
+#endif
+
extern "C"
{
# define private cc__private
commit 38f452c5f7482296b1af16242fb2a871deeb3df0
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Jun 4 20:16:39 2025 +0200
Update version in configure to 0.68
This should have been only done 15 years ago, see ca24a138 (Change
version to 0.68., 2010-07-08).
diff --git a/configure.ac b/configure.ac
index 3a8378aa..cf47dc0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(Mahogany, 0.67)
+AC_INIT(Mahogany, 0.68)
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
commit 6ffae3ca046c853897242d02afab8bf2d6f98851
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Jun 4 20:04:04 2025 +0200
Stop including iostream from Mconfig.h and don't use std namespace
We don't need <iostream> and <fstream> everywhere, they're only used in
a couple of files, and we definitely don't want to be using namespace
std in global scope: this is not only bad practice, but breaks Windows
compilation.
Also drop support for compilers with only <iostream.h> and not
<iostream> as this is obsolete for decades.
diff --git a/include/Mconfig.h b/include/Mconfig.h
index 290f5b27..041b9c82 100644
--- a/include/Mconfig.h
+++ b/include/Mconfig.h
@@ -169,19 +169,6 @@
# define Str(str) str
#endif
-// you can't mix iostream.h and iostream, the former doesn't compile
-// with "using namespace std", the latter doesn't compile with older
-// compilers.
-
-#if wxUSE_IOSTREAMH
-# include <iostream.h>
-# include <fstream.h>
-#else
-# include <iostream>
-# include <fstream>
- using namespace std;
-#endif
-
// set the proper STL class names
#ifdef CC_MSC
# define STL_LIST std::list
diff --git a/include/strutil.h b/include/strutil.h
index d658e779..78a80020 100644
--- a/include/strutil.h
+++ b/include/strutil.h
@@ -11,6 +11,8 @@
#ifndef STRUTIL_H
#define STRUTIL_H
+#include <iostream>
+
#include <time.h> // for time_t
#include "FolderType.h" // for strutil_expandfoldername
@@ -37,7 +39,7 @@ inline bool strutil_isempty(const wxChar *s) { return s == NULL || *s == _T('\0'
@param istr reference to an input stream
@param str reference to the string to write to
*/
-void strutil_getstrline(istream &istr, String &str);
+void strutil_getstrline(std::istream &istr, String &str);
/** Read a folded string into a string variable.
@@ -46,7 +48,7 @@ void strutil_getstrline(istream &istr, String &str);
@param istr reference to an input stream
@param str reference to the string to write to
*/
-void strutil_getfoldedline(istream &istr, String &str);
+void strutil_getfoldedline(std::istream &istr, String &str);
/** Get the part of a string before the delimiter.
diff --git a/src/adb/ProvBbdb.cpp b/src/adb/ProvBbdb.cpp
index c27270cb..c0e5ba21 100644
--- a/src/adb/ProvBbdb.cpp
+++ b/src/adb/ProvBbdb.cpp
@@ -49,11 +49,7 @@
#include <wx/file.h>
#include <wx/filename.h>
-#if wxUSE_IOSTREAMH
-# include <fstream.h> // for ifstream
-#else
-# include <fstream> // for ifstream
-#endif
+#include <fstream> // for ifstream
#include "strlist.h"
@@ -143,7 +139,7 @@ public:
static StringListList ReadVector(String *string);
static StringListListList ReadListOfVectors(String *string);
- static void WriteString(ostream &out, String const &string);
+ static void WriteString(std::ostream &out, String const &string);
static bool ReadNil(String *line);
static bool ReadHeader(String *version, String *line);
@@ -412,7 +408,7 @@ BbdbEntry::ReadString(String * line, bool *success)
}
void
-BbdbEntry::WriteString(ostream &out, String const &string)
+BbdbEntry::WriteString(std::ostream &out, String const &string)
{
const wxChar *cptr;
@@ -676,12 +672,12 @@ BbdbEntryGroup::BbdbEntryGroup(BbdbEntryGroup *, const String& strName)
BbdbEntry *e;
wxString line, version;
int ignored = 0, entries_read = 0;
- ifstream file(strName.mb_str());
+ std::ifstream file(strName.mb_str());
int length = 0;
- file.seekg(0, ios::end);
+ file.seekg(0, std::ios::end);
length = (int) (file.tellg() / 1024);
- file.seekg(0, ios::beg);
+ file.seekg(0, std::ios::beg);
// read the header info
strutil_getstrline(file,line);
@@ -777,9 +773,9 @@ BbdbEntryGroup::~BbdbEntryGroup()
length, NULL, wxPD_APP_MODAL);
String str;
- ofstream out(m_strName.mb_str());
+ std::ofstream out(m_strName.mb_str());
size_t n,m;
- out << ";;; file-version: 2" << endl;
+ out << ";;; file-version: 2" << std::endl;
for(i = m_entries->begin(); i != m_entries->end(); i++)
{
e = *i;
@@ -852,7 +848,7 @@ BbdbEntryGroup::~BbdbEntryGroup()
e->GetEMail(m, &str);
out << '"' << str << "\" ";
}
- out << ") nil nil]" << endl;
+ out << ") nil nil]" << std::endl;
}
status_frame.Update(++count);
}
@@ -1070,7 +1066,7 @@ BbdbDataProvider::TestBookAccess(const String& name, AdbTests test)
// and Test_Create
if(wxFileExists(name))
{
- ifstream file(name.mb_str());
+ std::ifstream file(name.mb_str());
String line;
strutil_getstrline(file, line);
return BbdbEntry::ReadHeader(NULL, &line);
diff --git a/src/adb/ProvLine.cpp b/src/adb/ProvLine.cpp
index 1a613857..32e238fc 100644
--- a/src/adb/ProvLine.cpp
+++ b/src/adb/ProvLine.cpp
@@ -35,6 +35,8 @@
#include "adb/AdbBook.h"
#include "adb/AdbDataProvider.h"
+#include <fstream>
+
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
@@ -117,7 +119,7 @@ public:
bool IsDirty() const;
void ClearDirty();
- bool ReadFromStream(istream &stream);
+ bool ReadFromStream(std::istream &stream);
private:
virtual ~LineBook();
@@ -152,7 +154,7 @@ private:
bool m_dirty;
};
-ostream& operator << (ostream& out, const LineEntryData& entry);
+std::ostream& operator << (std::ostream& out, const LineEntryData& entry);
// our AdbEntryData implementation
class LineEntry : public AdbEntry
@@ -249,10 +251,10 @@ LineBook::LineBook(const String& file)
m_bad = false;
m_dirty = false;
- ifstream stream(m_file.fn_str());
+ std::ifstream stream(m_file.fn_str());
if ( !stream.good() )
{
- ofstream create(m_file.fn_str(), ios::out|ios::ate);
+ std::ofstream create(m_file.fn_str(), std::ios::out|std::ios::ate);
if ( !create.good() )
goto FileError;
create.close();
@@ -369,7 +371,7 @@ bool LineBook::Flush()
{
String commit = wxFileName::CreateTempFileName(wxEmptyString);
- ofstream stream(commit.fn_str());
+ std::ofstream stream(commit.fn_str());
if ( !stream.good() )
goto FileError;
@@ -418,7 +420,7 @@ void LineBook::ClearDirty()
}
}
-bool LineBook::ReadFromStream(istream &stream)
+bool LineBook::ReadFromStream(std::istream &stream)
{
for(;;)
{
@@ -525,7 +527,7 @@ int LineEntryData::Matches(const wxChar *what, int /*where*/, int how) const
return addressCopy.Matches(whatCopy) ? AdbLookup_EMail : 0;
}
-ostream& operator << (ostream& out, const LineEntryData& entry)
+std::ostream& operator << (std::ostream& out, const LineEntryData& entry)
{
String address;
entry.GetField(AdbField_EMail, &address);
@@ -533,7 +535,7 @@ ostream& operator << (ostream& out, const LineEntryData& entry)
String nonspace = LineEntry::StripSpace(address);
if ( nonspace.size() > 0 )
- out << nonspace << endl;
+ out << nonspace << std::endl;
return out;
}
diff --git a/src/gui/wxIconManager.cpp b/src/gui/wxIconManager.cpp
index f1ea6c05..48647859 100644
--- a/src/gui/wxIconManager.cpp
+++ b/src/gui/wxIconManager.cpp
@@ -34,6 +34,8 @@
#include <wx/file.h>
#include <wx/filename.h>
+#include <fstream>
+
#ifdef USE_ICONS_FROM_RESOURCES
# define unknown_xpm "unknown"
# define MFrame_xpm "mframe"
@@ -306,7 +308,7 @@ wxIconManager::LoadXpm(String filename)
ASSERT(cpptr);
bool found_xpm = false;
- ifstream in(filename.mb_str());
+ std::ifstream in(filename.mb_str());
if(in)
{
String str;
diff --git a/src/mail/SendMessageCC.cpp b/src/mail/SendMessageCC.cpp
index 47adcdd4..4a10c2c2 100644
--- a/src/mail/SendMessageCC.cpp
+++ b/src/mail/SendMessageCC.cpp
@@ -67,6 +67,8 @@
#include <wx/datetime.h>
#include <wx/scopeguard.h>
+#include <fstream>
+
extern bool InitSSL(); // from src/util/ssl.cpp
class MOption;
@@ -2081,9 +2083,9 @@ SendMessageCC::WriteToFile(const String &filename, bool append)
{
// note that we have to repeat ios::out and binary below, otherwise gcc 3.0
// refuses to compile it as it converts everything to int and then fails
- ofstream ostr(filename.mb_str(),
- append ? ios::out | ios::binary
- : ios::out | ios::binary | ios::trunc);
+ std::ofstream ostr(filename.mb_str(),
+ append ? std::ios::out | std::ios::binary
+ : std::ios::out | std::ios::binary | std::ios::trunc);
bool ok = !(!ostr || ostr.bad());
if ( ok )
@@ -2137,7 +2139,7 @@ SendMessageCC::WriteToFolder(String const &name)
// rfc822_output() callback for writing into a file
static long write_stream_output(void *stream, char *string)
{
- ostream *o = (ostream *)stream;
+ std::ostream *o = (std::ostream *)stream;
*o << static_cast<const char *>(wxString::From8BitData(string).ToUTF8());
if ( o->fail() )
return NIL;
diff --git a/src/util/strutil.cpp b/src/util/strutil.cpp
index 45fc4cc0..c6438dfd 100644
--- a/src/util/strutil.cpp
+++ b/src/util/strutil.cpp
@@ -77,7 +77,7 @@ static String strutil_decrypt_tf(const String& cleartext);
// ============================================================================
void
-strutil_getstrline(istream &istr, String &str)
+strutil_getstrline(std::istream &istr, String &str)
{
char ch;
str = wxEmptyString;
@@ -91,7 +91,7 @@ strutil_getstrline(istream &istr, String &str)
}
void
-strutil_getfoldedline(istream &istr, String &str)
+strutil_getfoldedline(std::istream &istr, String &str)
{
char ch;
str = wxEmptyString;
commit 56cc8d56dd2de333f0fc5e38e0a0254aa49493ae
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Jun 4 20:32:02 2025 +0200
Allow combining options types and flags together
Fix another warning from C++20 compiler due to adding together bit masks
defined in different enums.
diff --git a/src/gui/wxOptionsDlg.cpp b/src/gui/wxOptionsDlg.cpp
index 0ac02eee..e4f96635 100644
--- a/src/gui/wxOptionsDlg.cpp
+++ b/src/gui/wxOptionsDlg.cpp
@@ -83,6 +83,8 @@
#include <wx/stopwatch.h>
#endif
+wxALLOW_COMBINING_ENUMS(wxOptionsPage::FieldType, wxOptionsPage::FieldFlags)
+
// ----------------------------------------------------------------------------
// persistent msgboxes we use here
// ----------------------------------------------------------------------------
commit 1327cf57c4bd693c854d830079173c9a64ca0200
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Jun 4 20:03:40 2025 +0200
Avoid harmless warnings about adding different enum elements
Just cast enum to int to suppress warnings in C++20 build mode.
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 5a12e225..25286053 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -1934,9 +1934,9 @@ void wxFolderListCtrl::OnColumnRightClick(wxListEvent& event)
{
String colName = GetColumnName(col).Lower();
- menu.Append(WXMENU_FVIEW_SORT_BY_COL + col,
+ menu.Append(WXMENU_FVIEW_SORT_BY_COL + static_cast<int>(col),
wxString::Format(_("Sort by %s"), colName));
- menu.Append(WXMENU_FVIEW_SORT_BY_COL_REV + col,
+ menu.Append(WXMENU_FVIEW_SORT_BY_COL_REV + static_cast<int>(col),
wxString::Format(_("Reverse sort by %s"), colName));
menu.AppendSeparator();
}
diff --git a/src/gui/wxMenuDefs.cpp b/src/gui/wxMenuDefs.cpp
index 6c13dbf9..cf212060 100644
--- a/src/gui/wxMenuDefs.cpp
+++ b/src/gui/wxMenuDefs.cpp
@@ -891,7 +891,7 @@ extern void CheckLanguageInMenu(wxWindow *win, wxFontEncoding encoding)
case wxFONTENCODING_ISO8859_13:
case wxFONTENCODING_ISO8859_14:
case wxFONTENCODING_ISO8859_15:
- id = WXMENU_LANG_ISO8859_1 + encoding - wxFONTENCODING_ISO8859_1;
+ id = static_cast<int>(WXMENU_LANG_ISO8859_1) + encoding - wxFONTENCODING_ISO8859_1;
break;
case wxFONTENCODING_CP1250:
@@ -902,7 +902,7 @@ extern void CheckLanguageInMenu(wxWindow *win, wxFontEncoding encoding)
case wxFONTENCODING_CP1255:
case wxFONTENCODING_CP1256:
case wxFONTENCODING_CP1257:
- id = WXMENU_LANG_CP1250 + encoding - wxFONTENCODING_CP1250;
+ id = static_cast<int>(WXMENU_LANG_CP1250) + encoding - wxFONTENCODING_CP1250;
break;
case wxFONTENCODING_KOI8:
commit d0713693a6de6ff9d56712182258a2d2c158ba2d
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Jun 4 20:02:45 2025 +0200
Fix ambiguous types in ternary operator
Add explicit conversions to wxString to fix compilation with C++20
compilers, including MSVS 2022 with /std:c++20.
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 0d6840c3..09ebf505 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -3463,7 +3463,7 @@ void wxComposeView::SetEncodingToSameAs(const Message *msg)
void wxComposeView::EnableEditing(bool enable)
{
// indicate the current state in the status bar
- SetStatusText(enable ? "" : _("RO"), 1);
+ SetStatusText(enable ? wxString{} : _("RO"), 1);
m_editor->Enable(enable);
}
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 7e0a59cf..5a12e225 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -2728,7 +2728,7 @@ void wxFolderListCtrl::SetSortOrder(Profile *profile,
{
wxLogStatus(GetFrame(this), _("Now sorting by %s%s"),
GetColumnName(col).Lower(),
- reverse ? _(" (reverse)") : "");
+ reverse ? _(" (reverse)") : wxString{});
profile->writeEntry(MP_MSGS_SORTBY, sortOrder);
diff --git a/src/mail/MFui.cpp b/src/mail/MFui.cpp
index f1195130..09fbb3d8 100644
--- a/src/mail/MFui.cpp
+++ b/src/mail/MFui.cpp
@@ -80,7 +80,7 @@ SizeToString(unsigned long sizeBytes,
break;
case MessageSize_Bytes:
- s.Printf(_("%lu%s"), sizeBytes, terse ? "" : _(" bytes"));
+ s.Printf(_("%lu%s"), sizeBytes, terse ? wxString{} : _(" bytes"));
break;
case MessageSize_KBytes:
diff --git a/src/mail/MailFolderCmn.cpp b/src/mail/MailFolderCmn.cpp
index f70c90a9..ccda227d 100644
--- a/src/mail/MailFolderCmn.cpp
+++ b/src/mail/MailFolderCmn.cpp
@@ -1887,7 +1887,7 @@ bool MailFolderCmn::ProcessNewMail(UIdArray& uidsNew,
wxLogTrace(TRACE_MF_NEWMAIL, "MF(%s)::ProcessNewMail(%lu msgs) for %s",
GetName(),
(unsigned long)uidsNew.GetCount(),
- folderDst ? folderDst->GetFullName() : "ourselves");
+ folderDst ? folderDst->GetFullName() : wxString("ourselves"));
// use the settings for the folder where the new mail is!
MFolder *folderWithNewMail;
commit 6c783323e7e9823bcee9909cddbffbdeec1baf78
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Jun 4 19:35:26 2025 +0200
Update MSVS projects to 2022 and enable 64-bit builds
32-bit is obsolete in 2025.
diff --git a/M.vcxproj b/M.vcxproj
index 924b536a..7b8b248f 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -38,54 +38,54 @@
<ProjectGuid>{1515C8EB-5C72-43DF-9D3A-0703F155F268}</ProjectGuid>
<RootNamespace>M</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="python.vsprops" Condition="Exists('python.vsprops')" />
+ <Import Project="$(WXWIN)\wxwidgets.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -230,7 +230,7 @@
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc_amd64_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -264,7 +264,7 @@
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc_amd64_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -361,7 +361,7 @@
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc_amd64_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -394,7 +394,7 @@
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc_amd64_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -629,8 +629,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -647,8 +645,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -667,8 +663,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -685,8 +679,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -705,8 +697,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -723,8 +713,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -743,8 +731,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -761,8 +747,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -781,8 +765,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -799,8 +781,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -819,8 +799,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -837,8 +815,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -857,8 +833,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -875,8 +849,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -895,8 +867,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">STATIC_LINKED;SWIG_GLOBAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'">STATIC_LINKED;SWIG_GLOBAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -913,8 +883,6 @@
</PrecompiledHeader>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level1</WarningLevel>
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">Level1</WarningLevel>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">STATIC_LINKED;SWIG_GLOBAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">STATIC_LINKED;SWIG_GLOBAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -1535,4 +1503,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/Mconfig.vcxproj b/Mconfig.vcxproj
index 28d65b7b..71426c9f 100644
--- a/Mconfig.vcxproj
+++ b/Mconfig.vcxproj
@@ -23,28 +23,27 @@
<ProjectGuid>{86C1D2C7-C961-4017-88E8-63D0BCCBD0D5}</ProjectGuid>
<RootNamespace>config</RootNamespace>
<Keyword>MakeFileProj</Keyword>
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -138,4 +137,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/lib/compface/compface.vcxproj b/lib/compface/compface.vcxproj
index 8548a63b..8ec8a455 100644
--- a/lib/compface/compface.vcxproj
+++ b/lib/compface/compface.vcxproj
@@ -20,32 +20,31 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{0E9F4403-1AA1-4824-A99F-041B1BF18D14}</ProjectGuid>
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -249,4 +248,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/lib/dspam/dspam.vcxproj b/lib/dspam/dspam.vcxproj
index 46710d74..9481fc91 100644
--- a/lib/dspam/dspam.vcxproj
+++ b/lib/dspam/dspam.vcxproj
@@ -21,32 +21,31 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{62156246-DCEA-4713-95E0-C01F595F1A20}</ProjectGuid>
<RootNamespace>dspam</RootNamespace>
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -242,4 +241,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/lib/imap/imap.vcxproj b/lib/imap/imap.vcxproj
index 93f00cb0..322faa78 100644
--- a/lib/imap/imap.vcxproj
+++ b/lib/imap/imap.vcxproj
@@ -21,32 +21,31 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{457cfec8-5c3f-4c7e-98a6-b65e1de22682}</ProjectGuid>
<RootNamespace>imap</RootNamespace>
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -240,4 +239,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/wx/vcard/versit.vcxproj b/src/wx/vcard/versit.vcxproj
index 26b25115..569101db 100644
--- a/src/wx/vcard/versit.vcxproj
+++ b/src/wx/vcard/versit.vcxproj
@@ -21,28 +21,27 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{E46C11C7-5924-4F7C-B82E-5BEB8856A8BC}</ProjectGuid>
<RootNamespace>versit</RootNamespace>
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -271,4 +270,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
commit 04b63f3349595cc9b3f3fe5c5f08fc99e129287f
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Jun 4 19:46:59 2025 +0200
Convert source files to UTF-8
They were in Latin-1, with the only non-ASCII typically being "ü" in
Karsten's name.
This was mostly done by just running
$ git ls-files include src | xargs recode latin1..utf8
and then a couple of manual tweaks.
diff --git a/include/ASMailFolder.h b/include/ASMailFolder.h
index d1b759a3..84975dc0 100644
--- a/include/ASMailFolder.h
+++ b/include/ASMailFolder.h
@@ -2,14 +2,14 @@
* ASMailFolder class: ABC defining the interface for asynchronous *
* mail folders *
* *
- * (C) 1999-2000 by Karsten Ballüder (bal...@gm...) *
+ * (C) 1999-2000 by Karsten Ballüder (bal...@gm...) *
* *
* $Id$
*******************************************************************/
/**
@package Mailfolder access
- @author Karsten Ballüder
+ @author Karsten Ballüder
*/
#ifndef ASMAILFOLDER_H
#define ASMAILFOLDER_H
diff --git a/include/FolderView.h b/include/FolderView.h
index 1d649122..7a957118 100644
--- a/include/FolderView.h
+++ b/include/FolderView.h
@@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////////
// Project: M - cross platform e-mail GUI client
// File name: FolderView.h - interface of the folder view class
-// Author: Karsten Ballüder
+// Author: Karsten Ballüder
// Modified by:
// Created: 1997
// CVS-ID: $Id$
-// Copyright: (C) 1997-2000 by Karsten Ballüder (Bal...@gm...)
+// Copyright: (C) 1997-2000 by Karsten Ballüder (Bal...@gm...)
// Licence: M license
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/HeaderInfo.h b/include/HeaderInfo.h
index df0cb120..e56f3bd5 100644
--- a/include/HeaderInfo.h
+++ b/include/HeaderInfo.h
@@ -4,11 +4,11 @@
// Purpose: HeaderInfo contains all envelope information for one message,
// HeaderInfoList knows how to retrieve HeaderInfos for the given
// folder
-// Author: Karsten Ballüder
+// Author: Karsten Ballüder
// Modified by:
// Created: 1998
// CVS-ID: $Id$
-// Copyright: (C) 1998-2000 by Karsten Ballüder (ka...@ph...)
+// Copyright: (C) 1998-2000 by Karsten Ballüder (ka...@ph...)
// Licence: M license
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/HeaderInfoImpl.h b/include/HeaderInfoImpl.h
index 194bdf2a..75862f2c 100644
--- a/include/HeaderInfoImpl.h
+++ b/include/HeaderInfoImpl.h
@@ -2,11 +2,11 @@
// Project: M - cross platform e-mail GUI client
// File name: include/HeaderInfoImpl.h: HeaderInfoListImpl class
// Purpose: provide implementation of the ABC HeaderInfoList
-// Author: Karsten Ballüder, Vadim Zeitlin
+// Author: Karsten Ballüder, Vadim Zeitlin
// Modified by:
// Created: 1998
// CVS-ID: $Id$
-// Copyright: (C) 1998-2000 by Karsten Ballüder (ka...@ph...)
+// Copyright: (C) 1998-2000 by Karsten Ballüder (ka...@ph...)
// Licence: M license
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/MApplication.h b/include/MApplication.h
index 592aa8e4..055758e1 100644
--- a/include/MApplication.h
+++ b/include/MApplication.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MApplication class: all non GUI specific application stuff *
* *
- * (C) 1997-2000 by Karsten Ballüder (ka...@ph...) *
+ * (C) 1997-2000 by Karsten Ballüder (ka...@ph...) *
* *
* $Id$
*******************************************************************/
diff --git a/include/MDialogs.h b/include/MDialogs.h
index a45d0a29..3292e9c7 100644
--- a/include/MDialogs.h
+++ b/include/MDialogs.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MDialogs.h : GUI independent dialog boxes *
* *
- * (C) 1998 by Karsten Ballüder (Bal...@us...) *
+ * (C) 1998 by Karsten Ballüder (Bal...@us...) *
* *
* $Id$
*******************************************************************/
diff --git a/include/MFilter.h b/include/MFilter.h
index 246257ea..45e93c4e 100644
--- a/include/MFilter.h
+++ b/include/MFilter.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MFilter - a class for managing filter config settings *
* *
- * (C) 2000 by Karsten Ballüder (bal...@gm...) *
+ * (C) 2000 by Karsten Ballüder (bal...@gm...) *
* *
* $Id$
*******************************************************************/
diff --git a/include/MFrame.h b/include/MFrame.h
index 43c238b5..6275e232 100644
--- a/include/MFrame.h
+++ b/include/MFrame.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MFrame.h : GUI independent frame/window representation *
* *
- * (C) 1997, 1998 by Karsten Ballüder (Bal...@us...) *
+ * (C) 1997, 1998 by Karsten Ballüder (Bal...@us...) *
* *
* $Id$
*******************************************************************/
diff --git a/include/MGuiApp.h b/include/MGuiApp.h
index 8bf0e520..5cbdc0fe 100644
--- a/include/MGuiApp.h
+++ b/include/MGuiApp.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MGuiApp class: all GUI specific application stuff, pure virtual *
* *
- * (C) 1997 by Karsten Ballüder (Bal...@us...) *
+ * (C) 1997 by Karsten Ballüder (Bal...@us...) *
* *
* $Id$
*
diff --git a/include/MHelp.h b/include/MHelp.h
index 44adb879..c29d953f 100644
--- a/include/MHelp.h
+++ b/include/MHelp.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MHelp.h : M's help system, based on numeric help topic ids *
* *
- * (C) 1998 by Karsten Ballüder (Bal...@us...) *
+ * (C) 1998 by Karsten Ballüder (Bal...@us...) *
* *
* $Id$
*******************************************************************/
diff --git a/include/MLogFrame.h b/include/MLogFrame.h
index c332f749..60991bc2 100644
--- a/include/MLogFrame.h
+++ b/include/MLogFrame.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MLogFrame.h : baseclass for window printing log output *
* *
- * (C) 1998 by Karsten Ballüder (Bal...@us...) *
+ * (C) 1998 by Karsten Ballüder (Bal...@us...) *
* *
* $Id$
*******************************************************************/
diff --git a/include/MMainFrame.h b/include/MMainFrame.h
index d234f454..2525eb45 100644
--- a/include/MMainFrame.h
+++ b/include/MMainFrame.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MMainFrame.h : application's main frame *
* *
- * (C) 1997-2000 by Karsten Ballüder (Bal...@gm...) *
+ * (C) 1997-2000 by Karsten Ballüder (Bal...@gm...) *
* *
* $Id$
*
diff --git a/include/MModule.h b/include/MModule.h
index a0c32d54..ec2c4236 100644
--- a/include/MModule.h
+++ b/include/MModule.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MModule - a pluggable module architecture for Mahogany *
* *
- * (C) 1999-2000 by Karsten Ballüder (Bal...@gm...) *
+ * (C) 1999-2000 by Karsten Ballüder (Bal...@gm...) *
* *
* $Id$
*******************************************************************/
diff --git a/include/MPython.h b/include/MPython.h
index 4adc2fe2..0e0f9e67 100644
--- a/include/MPython.h
+++ b/include/MPython.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MPython.h - include file for M's python code *
* *
- * (C) 1997,1998 by Karsten Ballüder (Bal...@us...) *
+ * (C) 1997,1998 by Karsten Ballüder (Bal...@us...) *
* *
* $Id$
*
diff --git a/include/MScripts.h b/include/MScripts.h
index c2faf553..43d997d8 100644
--- a/include/MScripts.h
+++ b/include/MScripts.h
@@ -1,7 +1,7 @@
/*-*- c++ -*-********************************************************
* MScripts.h - Names of python scripts used by M *
* *
- * (C) 1998 by Karsten Ballüder (Bal...@us...) *
+ * (C) 1998 by Karsten Ballüder (Bal...@us...) *
* *
* $Id$
diff --git a/include/MailFolder.h b/include/MailFolder.h...
[truncated message content] |
|
From: vadz <mah...@us...> - 2025-03-21 03:59:54
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via bcc0c9d101a040236ffe7d16c659956ebc0eb536 (commit)
via 1ce4e762a220d22008d95c29033b475dc41bbf11 (commit)
via 583336819f11ab5e23bddfff15be73b6daa35854 (commit)
via 570b1608a0d04a22ea2d106e53ebbe9dcbc82c37 (commit)
via 7517e90b2e31776448ff881a3cfaa1435f55a6ce (commit)
via 50790426be9c783e4edea4a2e3ecc807efc90594 (commit)
via 044f6c4bc0c2a405f81617a9abd67929b9cd0077 (commit)
via ba821e338687c1602fc536c3db591c10ca281a8a (commit)
via f14cf32b94dd6d98b4ccf4bd52f1e787bceab2a3 (commit)
via 9f4b95a7555bf07860a2286f1f04b66885e0b71a (commit)
via ba1921ea80e18ca17d4978c5a57da36625c7233f (commit)
via 3d1f4cf9b4ac17f17b49f49145d51e3c0c131d4a (commit)
via 1ac798f306170815921c6d482d668cf27ede5e88 (commit)
via 868edf0e0f3facab75414106cbc04f2b27ed05b9 (commit)
via 409d6974435db410434831eed0ef2d561fcb6569 (commit)
via 6a5486de8057dc3e64036d61c67e769ccae2f8a6 (commit)
via 06d5b206e24809152471268a618bd0283722e4ee (commit)
via 64372212fc20adc244123679f96a2f5612b147d0 (commit)
via 610297bac03abfb00321bd71289c82067f51a858 (commit)
via 43f8634ada42e8e998e9962c7f1fdea7adb4a07e (commit)
via a1e6cff79899ea701e8e6e033618a622d501a674 (commit)
via 5bc4dbcf83c197a1ede8eac399b55d6a1ecb50dc (commit)
from eb1e403d031263ca26c36b5cb70aa45ea627d6dc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bcc0c9d101a040236ffe7d16c659956ebc0eb536
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Mar 21 04:56:49 2025 +0100
Strip literal CR LF from the internal header representation
Having CR LF in the "References:" header broke its value in the outgoing
messages after recent changes to MIME::EncodeHeader() which resulted in
not just throwing away all whitespace characters in the header when
encoding it.
It's not completely clear if AddHeaderEntry() should be given strings
with CR LF or if they should be stripped at some higher level, but for
now do it here to at least ensure that the program generates correct
outgoing messages.
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index f49cec7d..736bd151 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -5375,8 +5375,26 @@ void wxComposeView::OnSendThreadDone(wxThreadEvent& evt)
}
void
-wxComposeView::AddHeaderEntry(const String& name, const String& value)
+wxComposeView::AddHeaderEntry(const String& name, const String& valueOrig)
{
+ // We may need to unfold the header if it contains line folds, we don't want
+ // to have them in the logical header value that we store internally.
+ String value;
+ for ( size_t pos = 0;; )
+ {
+ auto eol = valueOrig.find("\r\n ", pos);
+ if ( eol == String::npos )
+ {
+ value.append(valueOrig, pos, String::npos);
+ break;
+ }
+
+ value.append(valueOrig, pos, eol - pos);
+ value += ' ';
+
+ pos = eol + 3;
+ }
+
// first check if we don't already have a header with this name
const StringList::iterator end = m_extraHeadersNames.end();
for ( StringList::iterator i = m_extraHeadersNames.begin(),
commit 1ce4e762a220d22008d95c29033b475dc41bbf11
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Mar 21 04:18:10 2025 +0100
Default encoding to UTF-8 in the MIME encoding test
This is by far the most common.
diff --git a/tests/mime/decode.cpp b/tests/mime/decode.cpp
index 168d4b03..04c9ce77 100644
--- a/tests/mime/decode.cpp
+++ b/tests/mime/decode.cpp
@@ -337,7 +337,7 @@ int main()
{
const char *encoded;
const char *utf8;
- wxFontEncoding enc;
+ wxFontEncoding enc = wxFONTENCODING_UTF8;
const char *encodedAlt = nullptr;
} data[] =
{
@@ -365,8 +365,7 @@ int main()
},
{
"=?UTF-8?Q?Ludovic_P=C3=A9net?=",
- "Ludovic P\303\251net",
- wxFONTENCODING_UTF8
+ "Ludovic P\303\251net"
},
{
@@ -380,8 +379,7 @@ int main()
{
"=?UTF-8?Q?2006_=D0=92_=D0=A6_2007?=",
- "2006 \xD0\x92 \xD0\xA6 2007",
- wxFONTENCODING_UTF8
+ "2006 \xD0\x92 \xD0\xA6 2007"
},
{
commit 583336819f11ab5e23bddfff15be73b6daa35854
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Mar 21 04:10:50 2025 +0100
Decide which RFC 2047 encoding to use based on input contents
Use Base64 if it's going to be more compact and only use QP if there are
relatively few characters to encode.
This requires modifying the test to accept Base64 encoding of QP-encoded
strings.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index f56b613d..93100d69 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -432,26 +432,6 @@ static inline bool NeedsEncodingInHeader(unsigned c)
return c < 20 || c >= 127;
}
-// return true if the string contains any characters which must be encoded
-static bool NeedsEncoding(const String& in)
-{
- // if input contains "=?", encode it anyhow to avoid generating invalid
- // encoded words
- if ( in.find(_T("=?")) != wxString::npos )
- return true;
-
- // only encode the strings which contain the characters unallowed in RFC
- // 822 headers
- for ( auto c : in )
- {
- if ( NeedsEncodingInHeader(c.GetValue()) )
- return true;
- }
-
- // string has only valid chars, don't encode
- return false;
-}
-
// Some constants used by the encoding functions below.
static constexpr size_t RFC2047_MAXWORD_LEN = 75;
static constexpr size_t MIME_WORD_OVERHEAD = 7; // =?...?X?...?=
@@ -609,7 +589,35 @@ EncodeTextBase64(const char* in, const std::string& csName)
std::string MIME::EncodeHeader(const String& in, wxFontEncoding enc)
{
- if ( !NeedsEncoding(in) )
+ // First check if this text needs to be encoded at all.
+ size_t countNeedsEncoding = 0;
+ for ( auto c : in )
+ {
+ if ( NeedsEncodingInHeader(c.GetValue()) )
+ countNeedsEncoding++;
+ }
+
+ // We arbitrarily decide that if more than 1/4 of the string needs to be
+ // encoded, we'll encode it using Base64, otherwise we'll use QP to keep it
+ // roughly readable even in the encoded form.
+ MIME::Encoding enc2047 = MIME::Encoding_Unknown;
+ if ( !countNeedsEncoding )
+ {
+ // if input contains "=?", encode it anyhow to avoid generating invalid
+ // encoded words
+ if ( in.find(_T("=?")) != wxString::npos )
+ enc2047 = MIME::Encoding_QuotedPrintable;
+ }
+ else if ( countNeedsEncoding >= in.length() / 4 )
+ {
+ enc2047 = MIME::Encoding_Base64;
+ }
+ else
+ {
+ enc2047 = MIME::Encoding_QuotedPrintable;
+ }
+
+ if ( enc2047 == MIME::Encoding_Unknown )
return std::string(in.ToAscii());
// If we were given an explicit encoding to use, check if we can use it, and
@@ -642,11 +650,11 @@ std::string MIME::EncodeHeader(const String& in, wxFontEncoding enc)
}
std::string out;
- switch ( MIME::GetEncodingForFontEncoding(enc) )
+ switch ( enc2047 )
{
case MIME::Encoding_Unknown:
- FAIL_MSG( "using unknown MIME encoding?" );
- wxFALLTHROUGH;
+ FAIL_MSG( "unreachable" );
+ break;
case MIME::Encoding_QuotedPrintable:
out = EncodeTextQP(inbuf.data(), csName);
diff --git a/tests/mime/decode.cpp b/tests/mime/decode.cpp
index 6f6d1f42..168d4b03 100644
--- a/tests/mime/decode.cpp
+++ b/tests/mime/decode.cpp
@@ -338,6 +338,7 @@ int main()
const char *encoded;
const char *utf8;
wxFontEncoding enc;
+ const char *encodedAlt = nullptr;
} data[] =
{
{
@@ -373,7 +374,8 @@ int main()
" =?UTF-8?Q?=D0=B8=D0=BD?=",
"\xD0\x92\xD0\xB0\xD0\xB4\xD0\xB8\xD0\xBC "
"\xD0\xA6\xD0\xB5\xD0\xB9\xD1\x82\xD0\xBB\xD0\xB8\xD0\xBD",
- wxFONTENCODING_UTF8
+ wxFONTENCODING_UTF8,
+ "=?UTF-8?B?0JLQsNC00LjQvCDQptC10LnRgtC70LjQvQ==?="
},
{
@@ -385,7 +387,8 @@ int main()
{
"=?UTF-8?Q?=D0=92_=D0=A6_2007?=",
"\xD0\x92 \xD0\xA6 2007",
- wxFONTENCODING_UTF8
+ wxFONTENCODING_UTF8,
+ "=?UTF-8?B?0JIg0KYgMjAwNw==?="
},
};
@@ -407,7 +410,7 @@ int main()
continue;
const std::string buf = MIME::EncodeHeader(s, d.enc);
- if ( buf != d.encoded )
+ if ( buf != d.encoded && (!d.encodedAlt || buf != d.encodedAlt) )
{
printf("ERROR: encoding #%u: expected \"%s\", got \"%s\"\n",
n, d.encoded, buf.c_str());
commit 570b1608a0d04a22ea2d106e53ebbe9dcbc82c37
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Mar 21 04:11:56 2025 +0100
Remove redundant encoding enum declaration
This is the same thing as MIME::Encoding.
No real changes.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 088ebac0..f56b613d 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -235,12 +235,7 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
}
// get the encoding in RFC 2047 sense
- enum
- {
- Encoding_Unknown,
- Encoding_Base64,
- Encoding_QuotedPrintable
- } enc2047 = Encoding_Unknown;
+ MIME::Encoding enc2047 = MIME::Encoding_Unknown;
++p; // skip '?'
@@ -256,14 +251,14 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
if ( *(p + 1) == '?' )
{
if ( *p == 'B' || *p == 'b' )
- enc2047 = Encoding_Base64;
+ enc2047 = MIME::Encoding_Base64;
else if ( *p == 'Q' || *p == 'q' )
- enc2047 = Encoding_QuotedPrintable;
+ enc2047 = MIME::Encoding_QuotedPrintable;
}
//else: multi letter encoding unrecognized
}
- if ( enc2047 == Encoding_Unknown )
+ if ( enc2047 == MIME::Encoding_Unknown )
{
wxLogDebug(_T("Unrecognized header encoding in '%s'."), in.c_str());
@@ -324,7 +319,7 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
// now decode the text using c-client functions
unsigned long len;
void *text;
- if ( enc2047 == Encoding_Base64 )
+ if ( enc2047 == MIME::Encoding_Base64 )
{
text = rfc822_base64(UCHAR_CCAST(encWord.data()), lenEncWord, &len);
}
commit 7517e90b2e31776448ff881a3cfaa1435f55a6ce
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Mar 21 04:01:11 2025 +0100
Return std::string from EncodeHeader()
This avoids extra conversions with wxString and using std::string in the
interface is just generally cleaner than using wxCharBuffer.
No real changes.
diff --git a/include/mail/MimeDecode.h b/include/mail/MimeDecode.h
index c20a3f0f..ce2a0fbc 100644
--- a/include/mail/MimeDecode.h
+++ b/include/mail/MimeDecode.h
@@ -66,7 +66,7 @@ String GetCharsetForFontEncoding(wxFontEncoding enc);
use the encoding of the current locale
@return the encoded text or NULL buffer if encoding failed
*/
-wxCharBuffer
+std::string
EncodeHeader(const wxString& in, wxFontEncoding enc = wxFONTENCODING_SYSTEM);
/**
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 603d96f1..f49cec7d 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -5402,7 +5402,7 @@ wxComposeView::AddHeaderEntry(const String& name, const String& value)
// if we didn't find it, add a new one
m_extraHeadersNames.push_back(name.utf8_string());
- m_extraHeadersValues.push_back(MIME::EncodeHeader(value).data());
+ m_extraHeadersValues.push_back(MIME::EncodeHeader(value));
}
bool wxComposeView::IsPGPSigningEnabled() const
diff --git a/src/mail/AddressCC.cpp b/src/mail/AddressCC.cpp
index fa69be51..577b412c 100644
--- a/src/mail/AddressCC.cpp
+++ b/src/mail/AddressCC.cpp
@@ -576,7 +576,7 @@ ParseAddressList(const String& address,
{
String personal = wxString::FromUTF8(adr2->personal);
fs_give((void **)&adr2->personal);
- adr2->personal = cpystr(MIME::EncodeHeader(personal, enc));
+ adr2->personal = cpystr(MIME::EncodeHeader(personal, enc).c_str());
}
}
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 197c6ef2..088ebac0 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -462,8 +462,8 @@ static constexpr size_t RFC2047_MAXWORD_LEN = 75;
static constexpr size_t MIME_WORD_OVERHEAD = 7; // =?...?X?...?=
// encode the text in the charset with the given name in QP
-static String
-EncodeTextQP(const char* in, const String& csName)
+static std::string
+EncodeTextQP(const char* in, const std::string& csName)
{
// encode the text splitting it in the chunks such that they will be no
// longer than maximum length each
@@ -471,7 +471,7 @@ EncodeTextQP(const char* in, const String& csName)
const char* const HEX_DIGITS = "0123456789ABCDEF";
- String out;
+ std::string out;
out.reserve(strlen(in) + overhead);
// Each iteration of this loop corresponds to a physical line.
@@ -543,14 +543,14 @@ EncodeTextQP(const char* in, const String& csName)
}
// same as the function above but use Base64 encoding
-static String
-EncodeTextBase64(const char* in, const String& csName)
+static std::string
+EncodeTextBase64(const char* in, const std::string& csName)
{
const size_t overhead = MIME_WORD_OVERHEAD + csName.length();
// encode the word splitting it in the chunks such that they will be no
// longer than maximum length each
- String out;
+ std::string out;
out.reserve(strlen(in) + overhead);
auto *s = reinterpret_cast<const unsigned char*>(in);
@@ -594,10 +594,14 @@ EncodeTextBase64(const char* in, const String& csName)
}
// put into string as we might want to do some more replacements...
- String encword(wxString::FromAscii(CHAR_CAST(textEnc), lenEnc));
+ std::string encword(CHAR_CAST(textEnc), lenEnc);
// append this word to the header
- out << _T("=?") << csName << _T("?B?") << encword << _T("?=");
+ out += "=?";
+ out += csName;
+ out += "?B?";
+ out += encword;
+ out += "?=";
fs_give((void **)&textEnc);
@@ -608,10 +612,10 @@ EncodeTextBase64(const char* in, const String& csName)
return out;
}
-wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
+std::string MIME::EncodeHeader(const String& in, wxFontEncoding enc)
{
if ( !NeedsEncoding(in) )
- return in.ToAscii();
+ return std::string(in.ToAscii());
// If we were given an explicit encoding to use, check if we can use it, and
// if not fall back to the same UTF-8 (which can always be used) as we use
@@ -623,12 +627,12 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
}
// get the name of the charset to use
- String csName = MIME::GetCharsetForFontEncoding(enc);
+ std::string csName = MIME::GetCharsetForFontEncoding(enc).utf8_string();
if ( csName.empty() )
{
FAIL_MSG( _T("should have a valid charset name!") );
- csName = _T("UNKNOWN");
+ csName = "UNKNOWN";
}
wxCharBuffer inbuf;
@@ -642,7 +646,7 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
inbuf = in.utf8_str();
}
- String out;
+ std::string out;
switch ( MIME::GetEncodingForFontEncoding(enc) )
{
case MIME::Encoding_Unknown:
@@ -658,7 +662,7 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
break;
}
- return out.ToAscii();
+ return out;
}
String MIME::DecodeText(const char *p, size_t len, wxFontEncoding enc)
diff --git a/src/mail/SendMessageCC.cpp b/src/mail/SendMessageCC.cpp
index c223dc99..f915ffd3 100644
--- a/src/mail/SendMessageCC.cpp
+++ b/src/mail/SendMessageCC.cpp
@@ -835,12 +835,12 @@ SendMessageCC::SetSubject(const String& subject)
// don't encode the headers of an existing message second time, we want to
// preserve them as they are
- wxCharBuffer buf;
+ std::string buf;
if ( m_cloneOfExisting )
buf = subject.ToAscii();
else
buf = MIME::EncodeHeader(subject, m_encHeaders);
- m_Envelope->subject = cpystr(buf);
+ m_Envelope->subject = cpystr(buf.c_str());
}
void
@@ -1331,8 +1331,8 @@ SendMessageCC::Build(bool forStorage)
continue;
}
- const wxCharBuffer value(MIME::EncodeHeader(i->m_value));
- if ( !value )
+ const std::string value(MIME::EncodeHeader(i->m_value));
+ if ( value.empty() )
{
wxLogError(_("Invalid value \"%s\" for the custom header \"%s\""),
i->m_value.c_str(), i->m_name.c_str());
@@ -1349,7 +1349,7 @@ SendMessageCC::Build(bool forStorage)
// Conversion to ASCII is safe because HeaderName::IsValid() would have
// returned false if we had any non-ASCII characters in the name.
m_headerNames[h] = strutil_strdup(i->m_name.ToAscii());
- m_headerValues[h] = strutil_strdup(value);
+ m_headerValues[h] = strutil_strdup(value.c_str());
h++;
}
@@ -1586,7 +1586,7 @@ SendMessageCC::AddPart(MimeType::Primary type,
}
par->attribute = strdup(name.ToAscii());
- par->value = strdup(MIME::EncodeHeader(i->value));
+ par->value = strdup(MIME::EncodeHeader(i->value).c_str());
par->next = lastpar;
lastpar = par;
}
@@ -1638,7 +1638,7 @@ SendMessageCC::AddPart(MimeType::Primary type,
{
PARAMETER *par = mail_newbody_parameter();
par->attribute = strdup(i->name.ToAscii());
- par->value = strdup(MIME::EncodeHeader(i->value));
+ par->value = strdup(MIME::EncodeHeader(i->value).c_str());
par->next = NULL;
if(lastpar)
lastpar->next = par;
diff --git a/tests/mime/decode.cpp b/tests/mime/decode.cpp
index 36d91829..6f6d1f42 100644
--- a/tests/mime/decode.cpp
+++ b/tests/mime/decode.cpp
@@ -406,11 +406,11 @@ int main()
if ( d.enc == wxFONTENCODING_DEFAULT )
continue;
- const wxCharBuffer buf = MIME::EncodeHeader(s, d.enc);
- if ( strcmp(buf, d.encoded) != 0 )
+ const std::string buf = MIME::EncodeHeader(s, d.enc);
+ if ( buf != d.encoded )
{
printf("ERROR: encoding #%u: expected \"%s\", got \"%s\"\n",
- n, d.encoded, (const char *)buf);
+ n, d.encoded, buf.c_str());
}
}
commit 50790426be9c783e4edea4a2e3ecc807efc90594
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Mar 21 03:47:52 2025 +0100
Rewrite headers QP MIME encoding code once again
The previous version was still wrong as it didn't handle spaces between
words correctly any longer.
Simplify things by always encoding, instead of deciding whether to
encode for each word separately, this is not significantly less readable
in the encoded form (if we even still care about this) but much simpler
and more obviously correct.
Also perform our own QP-encoding instead of using c-client function,
it's so simple that it's much easier to do it like this.
Update the tests to match the results of the encoding algorithm now.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 46fddd47..197c6ef2 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -465,101 +465,78 @@ static constexpr size_t MIME_WORD_OVERHEAD = 7; // =?...?X?...?=
static String
EncodeTextQP(const char* in, const String& csName)
{
- // encode the word splitting it in the chunks such that they will be no
+ // encode the text splitting it in the chunks such that they will be no
// longer than maximum length each
const size_t overhead = MIME_WORD_OVERHEAD + csName.length();
+ const char* const HEX_DIGITS = "0123456789ABCDEF";
+
String out;
out.reserve(strlen(in) + overhead);
- auto *s = reinterpret_cast<const unsigned char*>(in);
- while ( *s )
+ // Each iteration of this loop corresponds to a physical line.
+ while ( *in )
{
- // if we wrapped, insert a line break
if ( !out.empty() )
out += "\r\n ";
- // how many characters may we put in this encoded word?
- size_t len = 0;
+ out += "=?";
+ out += csName;
+ out += "?Q?";
- // take into account the length of "=?charset?...?="
- int lenRemaining = RFC2047_MAXWORD_LEN - overhead;
-
- // for QP we need to examine all characters
- for ( ; s[len]; len++ )
+ // Iterate over the characters that fit into the current line.
+ size_t lineLen = overhead;
+ for ( ;; ++in )
{
- const unsigned char c = s[len];
-
- // normal characters stand for themselves in QP, the encoded ones
- // take 3 positions (=XX)
- lenRemaining -= (NeedsEncodingInHeader(c) || strchr("=?", c))
- ? 3 : 1;
+ const unsigned char c = *in;
- if ( lenRemaining <= 0 )
- {
- // can't put any more chars into this word
+ if ( c == '\0' )
break;
- }
- }
-
- // do encode this word
- unsigned char *text = const_cast<unsigned char*>(s); // cast for cclient
-
- // length of the encoded text and the text itself
- unsigned long lenEnc;
- unsigned char *textEnc;
-
- textEnc = rfc822_8bit(text, len, &lenEnc);
-
- // put into string as we might want to do some more replacements...
- String encword(wxString::FromAscii(CHAR_CAST(textEnc), lenEnc));
- // hack: rfc822_8bit() doesn't encode spaces normally but we must
- // do it inside the headers
- //
- // we also have to encode '?'s in the headers which are not encoded by it
- String encword2;
- encword2.reserve(encword.length());
-
- bool replaced = false;
- for ( const wxChar *p = encword.c_str(); *p; p++ )
- {
- switch ( *p )
+ // If this character is 0, we must encode "c" instead.
+ unsigned char unencoded = '\0';
+ switch ( c )
{
case ' ':
- encword2 += '_'; // More readable than =20
- break;
-
- case '\t':
- encword2 += _T("=09");
+ // Encode spaces as underscores rather than =20, as this is more
+ // readable, even if both are allowed.
+ unencoded = '_';
break;
+ // These characters need to be encoded in headers to avoid
+ // clashing with the encoded word syntax. In principle, we could
+ // let them remain unencoded if they don't occur in the same
+ // combination as in the encoded word syntax, but for now keep
+ // things simple and always encode them.
+ case '=':
case '?':
- encword2 += _T("=3F");
break;
default:
- encword2 += *p;
-
- // skip assignment to replaced below
- continue;
+ if ( !NeedsEncodingInHeader(c) )
+ unencoded = c;
+ break;
}
- replaced = true;
- }
-
- if ( replaced )
- {
- encword = encword2;
- }
+ const auto lenNeeded = unencoded ? 1 : 3;
+ if ( lineLen + lenNeeded > RFC2047_MAXWORD_LEN )
+ break;
- // append this word to the header
- out << _T("=?") << csName << _T("?Q?") << encword << _T("?=");
+ if ( unencoded )
+ {
+ out += unencoded;
+ }
+ else
+ {
+ out += '=';
+ out += HEX_DIGITS[c >> 4];
+ out += HEX_DIGITS[c & 0xf];
+ }
- fs_give((void **)&textEnc);
+ lineLen += lenNeeded;
+ }
- // skip the already encoded part
- s += len;
+ out += "?=";
}
return out;
diff --git a/tests/mime/decode.cpp b/tests/mime/decode.cpp
index 8473f719..36d91829 100644
--- a/tests/mime/decode.cpp
+++ b/tests/mime/decode.cpp
@@ -358,32 +358,32 @@ int main()
wxFONTENCODING_KOI8
},
{
- "Ludovic =?ISO-8859-1?Q?P=E9net?= <lu...@xx...>",
- "Ludovic P\303\251net <lu...@xx...>",
+ "=?ISO-8859-1?Q?Ludovic_P=E9net?=",
+ "Ludovic P\303\251net",
wxFONTENCODING_ISO8859_1
},
{
- "Ludovic =?UTF-8?Q?P=C3=A9net?= <lu...@xx...>",
- "Ludovic P\303\251net <lu...@xx...>",
+ "=?UTF-8?Q?Ludovic_P=C3=A9net?=",
+ "Ludovic P\303\251net",
wxFONTENCODING_UTF8
},
{
- "=?UTF-8?Q?=D0=92=D0=B0=D0=B4=D0=B8=D0=BC_"
- "=D0=A6=D0=B5=D0=B9=D1=82=D0=BB=D0=B8=D0=BD?=",
+ "=?UTF-8?Q?=D0=92=D0=B0=D0=B4=D0=B8=D0=BC_=D0=A6=D0=B5=D0=B9=D1=82=D0=BB?=\r\n"
+ " =?UTF-8?Q?=D0=B8=D0=BD?=",
"\xD0\x92\xD0\xB0\xD0\xB4\xD0\xB8\xD0\xBC "
"\xD0\xA6\xD0\xB5\xD0\xB9\xD1\x82\xD0\xBB\xD0\xB8\xD0\xBD",
wxFONTENCODING_UTF8
},
{
- "2006 =?UTF-8?Q?=D0=92_=D0=A6?= 2007",
+ "=?UTF-8?Q?2006_=D0=92_=D0=A6_2007?=",
"2006 \xD0\x92 \xD0\xA6 2007",
wxFONTENCODING_UTF8
},
{
- "=?UTF-8?Q?=D0=92_=D0=A6?= 2007",
+ "=?UTF-8?Q?=D0=92_=D0=A6_2007?=",
"\xD0\x92 \xD0\xA6 2007",
wxFONTENCODING_UTF8
},
commit 044f6c4bc0c2a405f81617a9abd67929b9cd0077
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 03:09:23 2025 +0100
Simplify length calculation code in EncodeTextBase64()
Also improve the comments.
No real changes.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 151f734c..46fddd47 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -583,23 +583,18 @@ EncodeTextBase64(const char* in, const String& csName)
if ( !out.empty() )
out += "\r\n ";
- // how many characters may we put in this encoded word?
- size_t len = 0;
-
- // take into account the length of "=?charset?...?="
- int lenRemaining = RFC2047_MAXWORD_LEN - overhead;
-
// rfc822_binary() splits lines after 60 characters so don't make
// chunks longer than this as the base64-encoded headers can't have
// EOLs in them
static const int CCLIENT_MAX_BASE64_LEN = 60;
- if ( lenRemaining > CCLIENT_MAX_BASE64_LEN )
- lenRemaining = CCLIENT_MAX_BASE64_LEN;
+ // but if the charset name is sufficiently long, we may need to make them
+ // shorter than this
+ size_t lenRemaining = wxMin(CCLIENT_MAX_BASE64_LEN,
+ RFC2047_MAXWORD_LEN - overhead);
- // we can calculate how many characters we may put into lenRemaining
- // directly
- len = (lenRemaining / 4) * 3;
+ // we can calculate how many characters we may put on one line directly
+ size_t len = (lenRemaining / 4) * 3;
// but not more than what we have
size_t lenMax = strlen(reinterpret_cast<const char*>(s));
@@ -613,9 +608,8 @@ EncodeTextBase64(const char* in, const String& csName)
// length of the encoded text and the text itself
unsigned long lenEnc;
- unsigned char *textEnc;
+ unsigned char *textEnc = rfc822_binary(text, len, &lenEnc);
- textEnc = rfc822_binary(text, len, &lenEnc);
while ( textEnc[lenEnc - 2] == '\r' && textEnc[lenEnc - 1] == '\n' )
{
// discard eol which we don't need in the header
commit ba821e338687c1602fc536c3db591c10ca281a8a
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 03:00:24 2025 +0100
Use constants in text encoding code instead of bare numbers
Also fix an apparent bug when we used 5, instead of 7, when computing
the remaining available space in the line.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 62bc6865..151f734c 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -457,14 +457,20 @@ static bool NeedsEncoding(const String& in)
return false;
}
+// Some constants used by the encoding functions below.
+static constexpr size_t RFC2047_MAXWORD_LEN = 75;
+static constexpr size_t MIME_WORD_OVERHEAD = 7; // =?...?X?...?=
+
// encode the text in the charset with the given name in QP
static String
EncodeTextQP(const char* in, const String& csName)
{
// encode the word splitting it in the chunks such that they will be no
- // longer than 75 characters each
+ // longer than maximum length each
+ const size_t overhead = MIME_WORD_OVERHEAD + csName.length();
+
String out;
- out.reserve(csName.length() + strlen(in) + 7 /* for =?...?X?...?= */);
+ out.reserve(strlen(in) + overhead);
auto *s = reinterpret_cast<const unsigned char*>(in);
while ( *s )
@@ -473,13 +479,11 @@ EncodeTextQP(const char* in, const String& csName)
if ( !out.empty() )
out += "\r\n ";
- static const size_t RFC2047_MAXWORD_LEN = 75;
-
// how many characters may we put in this encoded word?
size_t len = 0;
// take into account the length of "=?charset?...?="
- int lenRemaining = RFC2047_MAXWORD_LEN - (5 + csName.length());
+ int lenRemaining = RFC2047_MAXWORD_LEN - overhead;
// for QP we need to examine all characters
for ( ; s[len]; len++ )
@@ -565,10 +569,12 @@ EncodeTextQP(const char* in, const String& csName)
static String
EncodeTextBase64(const char* in, const String& csName)
{
+ const size_t overhead = MIME_WORD_OVERHEAD + csName.length();
+
// encode the word splitting it in the chunks such that they will be no
- // longer than 75 characters each
+ // longer than maximum length each
String out;
- out.reserve(csName.length() + strlen(in) + 7 /* for =?...?X?...?= */);
+ out.reserve(strlen(in) + overhead);
auto *s = reinterpret_cast<const unsigned char*>(in);
while ( *s )
@@ -577,13 +583,11 @@ EncodeTextBase64(const char* in, const String& csName)
if ( !out.empty() )
out += "\r\n ";
- static const size_t RFC2047_MAXWORD_LEN = 75;
-
// how many characters may we put in this encoded word?
size_t len = 0;
// take into account the length of "=?charset?...?="
- int lenRemaining = RFC2047_MAXWORD_LEN - (5 + csName.length());
+ int lenRemaining = RFC2047_MAXWORD_LEN - overhead;
// rfc822_binary() splits lines after 60 characters so don't make
// chunks longer than this as the base64-encoded headers can't have
commit f14cf32b94dd6d98b4ccf4bd52f1e787bceab2a3
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 02:51:56 2025 +0100
Split EncodeText() into 2 functions for QP and Base64
There are already a few differences in how the different encodings are
handled and there will be even more of them soon, so don't try to handle
both encodings in a single function, this is too complicated.
No changes yet.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 1e98b81c..62bc6865 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -457,13 +457,9 @@ static bool NeedsEncoding(const String& in)
return false;
}
-// encode the given text unconditionally, i.e. without checking if it must be
-// encoded (this is supposed to be done in the caller) and using the specified
-// encodings and charset (which are supposed to be detected by the caller too)
+// encode the text in the charset with the given name in QP
static String
-EncodeText(const char* in,
- MIME::Encoding enc2047,
- const String& csName)
+EncodeTextQP(const char* in, const String& csName)
{
// encode the word splitting it in the chunks such that they will be no
// longer than 75 characters each
@@ -486,43 +482,19 @@ EncodeText(const char* in,
int lenRemaining = RFC2047_MAXWORD_LEN - (5 + csName.length());
// for QP we need to examine all characters
- if ( enc2047 == MIME::Encoding_QuotedPrintable )
+ for ( ; s[len]; len++ )
{
- for ( ; s[len]; len++ )
- {
- const unsigned char c = s[len];
-
- // normal characters stand for themselves in QP, the encoded ones
- // take 3 positions (=XX)
- lenRemaining -= (NeedsEncodingInHeader(c) || strchr("=?", c))
- ? 3 : 1;
-
- if ( lenRemaining <= 0 )
- {
- // can't put any more chars into this word
- break;
- }
- }
- }
- else // Base64
- {
- // rfc822_binary() splits lines after 60 characters so don't make
- // chunks longer than this as the base64-encoded headers can't have
- // EOLs in them
- static const int CCLIENT_MAX_BASE64_LEN = 60;
+ const unsigned char c = s[len];
- if ( lenRemaining > CCLIENT_MAX_BASE64_LEN )
- lenRemaining = CCLIENT_MAX_BASE64_LEN;
+ // normal characters stand for themselves in QP, the encoded ones
+ // take 3 positions (=XX)
+ lenRemaining -= (NeedsEncodingInHeader(c) || strchr("=?", c))
+ ? 3 : 1;
- // we can calculate how many characters we may put into lenRemaining
- // directly
- len = (lenRemaining / 4) * 3;
-
- // but not more than what we have
- size_t lenMax = strlen(reinterpret_cast<const char*>(s));
- if ( len > lenMax )
+ if ( lenRemaining <= 0 )
{
- len = lenMax;
+ // can't put any more chars into this word
+ break;
}
}
@@ -533,19 +505,7 @@ EncodeText(const char* in,
unsigned long lenEnc;
unsigned char *textEnc;
- if ( enc2047 == MIME::Encoding_QuotedPrintable )
- {
- textEnc = rfc822_8bit(text, len, &lenEnc);
- }
- else // Encoding_Base64
- {
- textEnc = rfc822_binary(text, len, &lenEnc);
- while ( textEnc[lenEnc - 2] == '\r' && textEnc[lenEnc - 1] == '\n' )
- {
- // discard eol which we don't need in the header
- lenEnc -= 2;
- }
- }
+ textEnc = rfc822_8bit(text, len, &lenEnc);
// put into string as we might want to do some more replacements...
String encword(wxString::FromAscii(CHAR_CAST(textEnc), lenEnc));
@@ -554,48 +514,115 @@ EncodeText(const char* in,
// do it inside the headers
//
// we also have to encode '?'s in the headers which are not encoded by it
- if ( enc2047 == MIME::Encoding_QuotedPrintable )
- {
- String encword2;
- encword2.reserve(encword.length());
+ String encword2;
+ encword2.reserve(encword.length());
- bool replaced = false;
- for ( const wxChar *p = encword.c_str(); *p; p++ )
+ bool replaced = false;
+ for ( const wxChar *p = encword.c_str(); *p; p++ )
+ {
+ switch ( *p )
{
- switch ( *p )
- {
- case ' ':
- encword2 += '_'; // More readable than =20
- break;
-
- case '\t':
- encword2 += _T("=09");
- break;
+ case ' ':
+ encword2 += '_'; // More readable than =20
+ break;
- case '?':
- encword2 += _T("=3F");
- break;
+ case '\t':
+ encword2 += _T("=09");
+ break;
- default:
- encword2 += *p;
+ case '?':
+ encword2 += _T("=3F");
+ break;
- // skip assignment to replaced below
- continue;
- }
+ default:
+ encword2 += *p;
- replaced = true;
+ // skip assignment to replaced below
+ continue;
}
- if ( replaced )
- {
- encword = encword2;
- }
+ replaced = true;
+ }
+
+ if ( replaced )
+ {
+ encword = encword2;
}
// append this word to the header
- out << _T("=?") << csName << _T('?') << (char)enc2047 << _T('?')
- << encword
- << _T("?=");
+ out << _T("=?") << csName << _T("?Q?") << encword << _T("?=");
+
+ fs_give((void **)&textEnc);
+
+ // skip the already encoded part
+ s += len;
+ }
+
+ return out;
+}
+
+// same as the function above but use Base64 encoding
+static String
+EncodeTextBase64(const char* in, const String& csName)
+{
+ // encode the word splitting it in the chunks such that they will be no
+ // longer than 75 characters each
+ String out;
+ out.reserve(csName.length() + strlen(in) + 7 /* for =?...?X?...?= */);
+
+ auto *s = reinterpret_cast<const unsigned char*>(in);
+ while ( *s )
+ {
+ // if we wrapped, insert a line break
+ if ( !out.empty() )
+ out += "\r\n ";
+
+ static const size_t RFC2047_MAXWORD_LEN = 75;
+
+ // how many characters may we put in this encoded word?
+ size_t len = 0;
+
+ // take into account the length of "=?charset?...?="
+ int lenRemaining = RFC2047_MAXWORD_LEN - (5 + csName.length());
+
+ // rfc822_binary() splits lines after 60 characters so don't make
+ // chunks longer than this as the base64-encoded headers can't have
+ // EOLs in them
+ static const int CCLIENT_MAX_BASE64_LEN = 60;
+
+ if ( lenRemaining > CCLIENT_MAX_BASE64_LEN )
+ lenRemaining = CCLIENT_MAX_BASE64_LEN;
+
+ // we can calculate how many characters we may put into lenRemaining
+ // directly
+ len = (lenRemaining / 4) * 3;
+
+ // but not more than what we have
+ size_t lenMax = strlen(reinterpret_cast<const char*>(s));
+ if ( len > lenMax )
+ {
+ len = lenMax;
+ }
+
+ // do encode this word
+ unsigned char *text = const_cast<unsigned char*>(s); // cast for cclient
+
+ // length of the encoded text and the text itself
+ unsigned long lenEnc;
+ unsigned char *textEnc;
+
+ textEnc = rfc822_binary(text, len, &lenEnc);
+ while ( textEnc[lenEnc - 2] == '\r' && textEnc[lenEnc - 1] == '\n' )
+ {
+ // discard eol which we don't need in the header
+ lenEnc -= 2;
+ }
+
+ // put into string as we might want to do some more replacements...
+ String encword(wxString::FromAscii(CHAR_CAST(textEnc), lenEnc));
+
+ // append this word to the header
+ out << _T("=?") << csName << _T("?B?") << encword << _T("?=");
fs_give((void **)&textEnc);
@@ -620,16 +647,6 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
enc = wxFONTENCODING_UTF8;
}
- // get the encoding in RFC 2047 sense
- MIME::Encoding enc2047 = MIME::GetEncodingForFontEncoding(enc);
-
- if ( enc2047 == MIME::Encoding_Unknown )
- {
- FAIL_MSG( _T("should have valid MIME encoding") );
-
- enc2047 = MIME::Encoding_QuotedPrintable;
- }
-
// get the name of the charset to use
String csName = MIME::GetCharsetForFontEncoding(enc);
if ( csName.empty() )
@@ -650,7 +667,23 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
inbuf = in.utf8_str();
}
- return EncodeText(inbuf.data(), enc2047, csName).ToAscii();
+ String out;
+ switch ( MIME::GetEncodingForFontEncoding(enc) )
+ {
+ case MIME::Encoding_Unknown:
+ FAIL_MSG( "using unknown MIME encoding?" );
+ wxFALLTHROUGH;
+
+ case MIME::Encoding_QuotedPrintable:
+ out = EncodeTextQP(inbuf.data(), csName);
+ break;
+
+ case MIME::Encoding_Base64:
+ out = EncodeTextBase64(inbuf.data(), csName);
+ break;
+ }
+
+ return out.ToAscii();
}
String MIME::DecodeText(const char *p, size_t len, wxFontEncoding enc)
commit 9f4b95a7555bf07860a2286f1f04b66885e0b71a
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 02:45:10 2025 +0100
Remove unused wxFontEncoding parameter of EncodeText()
Simplify the function a bit.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 8b6b11bd..1e98b81c 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -462,7 +462,6 @@ static bool NeedsEncoding(const String& in)
// encodings and charset (which are supposed to be detected by the caller too)
static String
EncodeText(const char* in,
- wxFontEncoding enc,
MIME::Encoding enc2047,
const String& csName)
{
@@ -651,7 +650,7 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
inbuf = in.utf8_str();
}
- return EncodeText(inbuf.data(), enc, enc2047, csName).ToAscii();
+ return EncodeText(inbuf.data(), enc2047, csName).ToAscii();
}
String MIME::DecodeText(const char *p, size_t len, wxFontEncoding enc)
commit ba1921ea80e18ca17d4978c5a57da36625c7233f
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 02:43:13 2025 +0100
Pass C string, not wxString, to EncodeText()
Also avoid constructing wxCSConv() when using UTF-8, which is the most
common use case.
No real changes, just prepare for the upcoming refactoring.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 7faeca1d..8b6b11bd 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -461,25 +461,17 @@ static bool NeedsEncoding(const String& in)
// encoded (this is supposed to be done in the caller) and using the specified
// encodings and charset (which are supposed to be detected by the caller too)
static String
-EncodeText(const String& in,
+EncodeText(const char* in,
wxFontEncoding enc,
MIME::Encoding enc2047,
const String& csName)
{
// encode the word splitting it in the chunks such that they will be no
// longer than 75 characters each
- wxCharBuffer buf(in.mb_str(wxCSConv(enc)));
- if ( !buf )
- {
- // if the header can't be encoded using the given encoding, use UTF-8
- // which always works
- buf = in.utf8_str();
- }
-
String out;
- out.reserve(csName.length() + strlen(buf) + 7 /* for =?...?X?...?= */);
+ out.reserve(csName.length() + strlen(in) + 7 /* for =?...?X?...?= */);
- auto *s = reinterpret_cast<const unsigned char*>(buf.data());
+ auto *s = reinterpret_cast<const unsigned char*>(in);
while ( *s )
{
// if we wrapped, insert a line break
@@ -648,7 +640,18 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
csName = _T("UNKNOWN");
}
- return EncodeText(in, enc, enc2047, csName).ToAscii();
+ wxCharBuffer inbuf;
+ if ( enc != wxFONTENCODING_UTF8 )
+ inbuf = in.mb_str(wxCSConv(enc));
+
+ if ( !inbuf )
+ {
+ // if the header can't be encoded using the given encoding, use UTF-8
+ // which always works
+ inbuf = in.utf8_str();
+ }
+
+ return EncodeText(inbuf.data(), enc, enc2047, csName).ToAscii();
}
String MIME::DecodeText(const char *p, size_t len, wxFontEncoding enc)
commit 3d1f4cf9b4ac17f17b49f49145d51e3c0c131d4a
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 01:27:05 2025 +0100
Allow up to 6 characters when encoding headers using Base64
The maximum length of the line shouldn't account for "\r\n", otherwise
we only put 58 characters in each line instead of 60 as intended.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 2dd19197..7faeca1d 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -525,7 +525,7 @@ EncodeText(const String& in,
// we can calculate how many characters we may put into lenRemaining
// directly
- len = (lenRemaining / 4) * 3 - 2;
+ len = (lenRemaining / 4) * 3;
// but not more than what we have
size_t lenMax = strlen(reinterpret_cast<const char*>(s));
commit 1ac798f306170815921c6d482d668cf27ede5e88
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 01:17:18 2025 +0100
Fix infinite loop in EncodeText() when using Base64
We need to get the number of remaining bytes in the string, so use
strlen() instead of using wxStrlen() which compiles without the cast but
involves a conversion to wxString, which may fail, returning an empty
string and hence encoding a "word" of 0 length.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 9134fb4c..2dd19197 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -528,7 +528,7 @@ EncodeText(const String& in,
len = (lenRemaining / 4) * 3 - 2;
// but not more than what we have
- size_t lenMax = wxStrlen(s);
+ size_t lenMax = strlen(reinterpret_cast<const char*>(s));
if ( len > lenMax )
{
len = lenMax;
commit 868edf0e0f3facab75414106cbc04f2b27ed05b9
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 01:16:51 2025 +0100
Stop using wxFONTENCODING_DEFAULT in MIME decoding test
This doesn't make much sense and doesn't work.
diff --git a/tests/mime/decode.cpp b/tests/mime/decode.cpp
index 08f8245d..8473f719 100644
--- a/tests/mime/decode.cpp
+++ b/tests/mime/decode.cpp
@@ -387,12 +387,6 @@ int main()
"\xD0\x92 \xD0\xA6 2007",
wxFONTENCODING_UTF8
},
-
- {
- "=?us-ascii?Q?Foo=20bar?=",
- "Foo bar",
- wxFONTENCODING_DEFAULT
- },
};
int rc = EXIT_SUCCESS;
commit 409d6974435db410434831eed0ef2d561fcb6569
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 01:16:00 2025 +0100
Suppress harmless warnings in code copied from c-client
Fixing them would involve modifying the code which really shouldn't even
be here at all.
diff --git a/tests/mime/decode.cpp b/tests/mime/decode.cpp
index 289f97dc..08f8245d 100644
--- a/tests/mime/decode.cpp
+++ b/tests/mime/decode.cpp
@@ -5,6 +5,8 @@ typedef wxString String;
#include "mail/MimeDecode.h"
+wxGCC_WARNING_SUPPRESS(write-strings)
+
extern "C" {
void *fs_get (size_t size) { return malloc(size); }
@@ -325,6 +327,8 @@ unsigned char *rfc822_8bit (unsigned char *src,unsigned long srcl,
}
}
+wxGCC_WARNING_RESTORE(write-strings)
+
int main()
{
wxInitializer init;
commit 6a5486de8057dc3e64036d61c67e769ccae2f8a6
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 01:08:02 2025 +0100
Remove hard coded paths from MIME tests makefile
diff --git a/tests/mime/Makefile b/tests/mime/Makefile
index a7fb3635..81d952ad 100644
--- a/tests/mime/Makefile
+++ b/tests/mime/Makefile
@@ -1,6 +1,9 @@
-WX_CONFIG := /usr/local/src/build/wx-gtkud/wx-config
+WX_CONFIG := wx-config
+
+ifndef top_builddir
+$(error Define top_builddir to point to build directory on make command line)
+endif
-top_builddir := /home/zeitlin/build/M-gtkud
top_srcdir := ../..
CXXFLAGS := -I$(top_srcdir)/include `$(WX_CONFIG) --cxxflags` -g
commit 06d5b206e24809152471268a618bd0283722e4ee
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 00:54:44 2025 +0100
Don't soft wrap "References" header value
This is done when constructing the final message and there is no need to
do it twice.
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index e04e6f18..603d96f1 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -5519,10 +5519,7 @@ bool wxComposeView::ConfigureInReplyTo()
// if replacement failed (or if we had nothing to replace),
// just add new message id
if ( !ref.empty() )
- {
- // continue "References" header on the next line
- ref += _T("\015\012 ");
- }
+ ref += ' ';
ref += messageIdNew;
}
diff --git a/src/mail/MailFolder.cpp b/src/mail/MailFolder.cpp
index e2a2f36b..4a597b6d 100644
--- a/src/mail/MailFolder.cpp
+++ b/src/mail/MailFolder.cpp
@@ -1117,10 +1117,7 @@ MailFolder::ReplyMessage(Message *msg,
{
String references = headersOrig[1].Trim(TRUE).Trim(FALSE);
if ( !references.empty() )
- {
- // continue "References" header on the next line
- references += _T("\015\012 ");
- }
+ references += ' ';
references += messageid;
cv->AddHeaderEntry(_T("References"), references);
commit 64372212fc20adc244123679f96a2f5612b147d0
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 00:40:58 2025 +0100
Compare header names case-insensitively
Header names are not case-sensitive, so don't allow adding 2 headers
differing in case only.
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 60fc33d6..e04e6f18 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -5384,7 +5384,7 @@ wxComposeView::AddHeaderEntry(const String& name, const String& value)
i != end;
++i, ++j )
{
- if ( *i == name )
+ if ( wxStricmp(*i, name) == 0 )
{
if ( value.empty() )
{
@@ -5421,7 +5421,7 @@ bool wxComposeView::IsInReplyTo() const
end = m_extraHeadersNames.end();
for ( i = m_extraHeadersNames.begin(); i != end; ++i )
{
- if ( *i == "In-Reply-To" )
+ if ( wxStricmp(*i, "In-Reply-To") == 0 )
return true;
}
@@ -5435,7 +5435,7 @@ bool wxComposeView::ConfigureInReplyTo()
for ( i = m_extraHeadersNames.begin(),
j = m_extraHeadersValues.begin(); i != end; ++i, ++j )
{
- if ( *i == "In-Reply-To" )
+ if ( wxStricmp(*i, "In-Reply-To") == 0 )
break;
}
@@ -5458,7 +5458,7 @@ bool wxComposeView::ConfigureInReplyTo()
end = m_extraHeadersNames.end(),
j = m_extraHeadersValues.begin() ; i != end; ++i, ++j )
{
- if ( *i == "References" )
+ if ( wxStricmp(*i, "References") == 0 )
{
String ref = *j;
ref.Trim(true).Trim(false);
@@ -5508,7 +5508,7 @@ bool wxComposeView::ConfigureInReplyTo()
end = m_extraHeadersNames.begin(),
j = m_extraHeadersValues.begin(); i != end; ++i, ++j )
{
- if ( *i == "References" )
+ if ( wxStricmp(*i, "References") == 0 )
{
String ref = *j;
commit 610297bac03abfb00321bd71289c82067f51a858
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Mar 12 00:39:45 2025 +0100
Let NeedsEncodingInHeader() check for ASCII too
We don't need to check whether a (Unicode) code point is an ASCII
character before calling this function if we avoid the truncating
conversion of its argument.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index e2e8c799..9134fb4c 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -432,7 +432,7 @@ String MIME::DecodeHeader(const String& in, wxFontEncoding *pEncoding)
// returns true if the character must be encoded in a MIME header
//
// NB: we suppose that any special characters had been already escaped
-static inline bool NeedsEncodingInHeader(unsigned char c)
+static inline bool NeedsEncodingInHeader(unsigned c)
{
return c < 20 || c >= 127;
}
@@ -449,7 +449,7 @@ static bool NeedsEncoding(const String& in)
// 822 headers
for ( auto c : in )
{
- if ( !c.IsAscii() || NeedsEncodingInHeader(c.GetValue()) )
+ if ( NeedsEncodingInHeader(c.GetValue()) )
return true;
}
commit 43f8634ada42e8e998e9962c7f1fdea7adb4a07e
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Mar 11 23:22:21 2025 +0100
Don't MIME-encode header names
This was added in the apparently unrelated 5ca32298 (Replace all uses of
obsolete kbList stuff with std::list., 2010-06-29) and doesn't make any
sense.
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 6a34407b..60fc33d6 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -5401,7 +5401,7 @@ wxComposeView::AddHeaderEntry(const String& name, const String& value)
}
// if we didn't find it, add a new one
- m_extraHeadersNames.push_back(MIME::EncodeHeader(name).data());
+ m_extraHeadersNames.push_back(name.utf8_string());
m_extraHeadersValues.push_back(MIME::EncodeHeader(value).data());
}
commit a1e6cff79899ea701e8e6e033618a622d501a674
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Mar 11 18:46:58 2025 +0100
Reopen previously opened mailboxes on resume under Linux too
Create a power resource blocker to be notified about suspend and resume
under Linux and so be able to reopen (even remote) mailboxes.
diff --git a/include/gui/wxMainFrame.h b/include/gui/wxMainFrame.h
index 477599db..54e1d98d 100644
--- a/include/gui/wxMainFrame.h
+++ b/include/gui/wxMainFrame.h
@@ -128,6 +128,10 @@ protected:
#ifdef wxHAS_POWER_EVENTS
+#if wxCHECK_VERSION(3, 3, 0)
+ wxPowerResourceBlocker m_powerDelaySleep;
+#endif // wx 3.3.0+
+
// the list of folders which were opened when we were suspended
typedef std::vector<MailFolder*> MailFolders;
MailFolders m_foldersToResume;
diff --git a/src/gui/wxMainFrame.cpp b/src/gui/wxMainFrame.cpp
index 8f39b421..d55f1434 100644
--- a/src/gui/wxMainFrame.cpp
+++ b/src/gui/wxMainFrame.cpp
@@ -628,6 +628,14 @@ END_EVENT_TABLE()
wxMainFrame::wxMainFrame(const String &iname, wxFrame *parent)
: wxMFrame(iname,parent)
+#if wxCHECK_VERSION(3, 3, 0)
+ // We could wait until we open any network connections before
+ // doing this, but it does no real harm to initialize it
+ // immediately.
+ , m_powerDelaySleep(wxPOWER_RESOURCE_SYSTEM,
+ _("Close network connections"),
+ wxPOWER_DELAY)
+#endif // wx 3.3.0+
{
// init members
m_searchData = NULL;
commit 5bc4dbcf83c197a1ede8eac399b55d6a1ecb50dc
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Mar 11 18:45:56 2025 +0100
Use CallAfter() instead of disconnecting event handler
Simplify the code a bit by using CallAfter() instead of defining and
connecting a handler which is only called once and then disconnects
itself.
No real changes.
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 27beb3da..6a34407b 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -800,21 +800,13 @@ public:
// AddHeaderEntry("In-Reply-To") is called after composer creation, so we
// want to update our state a bit later
- Connect(wxEVT_IDLE, wxIdleEventHandler(IsReplyButton::OnIdle));
+ CallAfter(&ToggleIconButton::Update);
}
private:
virtual void DoHandleClick() { m_composer->ConfigureInReplyTo(); }
virtual bool DoGetValue() const { return m_composer->IsInReplyTo(); }
- void OnIdle(wxIdleEvent& /* event */)
- {
- Disconnect(wxID_ANY, wxEVT_IDLE,
- wxIdleEventHandler(IsReplyButton::OnIdle));
-
- Update();
- }
-
DECLARE_NO_COPY_CLASS(IsReplyButton)
};
-----------------------------------------------------------------------
Summary of changes:
include/gui/wxMainFrame.h | 4 +
include/mail/MimeDecode.h | 2 +-
src/gui/wxComposeView.cpp | 49 ++++---
src/gui/wxMainFrame.cpp | 8 ++
src/mail/AddressCC.cpp | 2 +-
src/mail/MailFolder.cpp | 5 +-
src/mail/MimeDecode.cpp | 333 ++++++++++++++++++++++++---------------------
src/mail/SendMessageCC.cpp | 14 +-
tests/mime/Makefile | 7 +-
tests/mime/decode.cpp | 45 +++---
10 files changed, 252 insertions(+), 217 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: vadz <mah...@us...> - 2025-03-10 16:54:12
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via eb1e403d031263ca26c36b5cb70aa45ea627d6dc (commit)
via 222cf9d471588118c52c88b056e68d38ceba1e24 (commit)
via e28b1ef23247786e5148c01a59a6314b1da5653a (commit)
via c018ad921fa10ea741947733c2c1fd9405d45285 (commit)
via 6fd769a0e2121e792d0b54f15d96a28ab4af3056 (commit)
via ca0e027d908f09506bfeb169f8df10972a7a1c66 (commit)
via d4a702454b34ff4774c427fe9b4896a1bcb43e6a (commit)
from 9d1f084e02fa0258705884adba16c90f59d8e5d6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eb1e403d031263ca26c36b5cb70aa45ea627d6dc
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Feb 6 18:58:22 2025 +0100
Fix decoding RFC 2047 words broken between character boundaries
Concatenate the bytes encoded using RFC 2047 encoding first and then
convert them from the specified encoding to ensure that we can do it
successfully even when bytes of the same characters are separated in
different encoded words.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 9bde4aa4..e2e8c799 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -117,6 +117,13 @@ MIME::Encoding MIME::GetEncodingForFontEncoding(wxFontEncoding enc)
// decoding
// ----------------------------------------------------------------------------
+// Local wrapper around public function taking char* and length.
+static
+String DecodeString(const std::string& s, wxFontEncoding enc)
+{
+ return MIME::DecodeText(s.data(), s.length(), enc);
+}
+
/*
See RFC 2047 for the description of the encodings used in the mail headers.
Briefly, "encoded words" can be inserted which have the form of
@@ -135,10 +142,25 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
// we don't enforce the sanity checks on charset and encoding - should we?
// const char *specials = "()<>@,;:\\\"[].?=";
- // there can be words in different encodings inside the same header so this
- // variable doesn't really make sense but in practice only one encoding will
- // be used in the entire header
- wxFontEncoding encodingHeader = wxFONTENCODING_SYSTEM;
+ // encoding of the previous word or wxFONTENCODING_SYSTEM if it wasn't
+ // encoded (or there wasn't any previous word at all yet)
+ wxFontEncoding encodingLastWord = wxFONTENCODING_SYSTEM;
+
+ // the not yet decoded text using encodingLastWord, we'll convert it from
+ // this encoding all at once when we can be sure that there is nothing
+ // following it any more
+ //
+ // notice that this is more than just an optimization: RFC 2047 encoding can
+ // separate bytes that are part of the same multibyte characters, e.g. if
+ // the string is sufficiently long and needs to be wrapped it's perfectly
+ // possible that the leading byte of UTF-8 encoding is part of one encoded
+ // word while the rest of them are in the other one and so converting each
+ // of them from UTF-8 on their own wouldn't work, but combining them and
+ // only converting both at once would
+ std::string textLastWord;
+
+ if ( pEncoding )
+ *pEncoding = wxFONTENCODING_SYSTEM;
// if the header starts with an encoded word, preceding whitespace must be
// ignored, so the flag must be set to true initially
@@ -197,19 +219,20 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
wxLogDebug(_T("Unrecognized charset name \"%s\""), csName.mb_str());
}
- // this is not a problem in Unicode build
-#if !wxUSE_UNICODE
- if ( encodingHeader != wxFONTENCODING_SYSTEM &&
- encodingHeader != encodingWord )
+ if ( encodingWord != encodingLastWord )
{
- // this is a bug (well, missing feature) in ANSI build of Mahogany
- wxLogDebug(_T("This header contains encoded words with different ")
- _T("encodings and won't be rendered correctly."));
- }
-#endif // !wxUSE_UNICODE
+ if ( encodingLastWord != wxFONTENCODING_SYSTEM )
+ {
+ // The last word must be complete now, decode it.
+ out += DecodeString(textLastWord, encodingLastWord);
+ }
- encodingHeader = encodingWord;
+ encodingLastWord = encodingWord;
+ textLastWord.clear();
+ if ( pEncoding )
+ *pEncoding = encodingWord;
+ }
// get the encoding in RFC 2047 sense
enum
@@ -269,14 +292,16 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
p += 2; // skip "Q?" or "B?"
// get the encoded text
+ std::string encWord;
bool hasUnderscore = false;
- const wxString::const_iterator encTextStart = p;
while ( p != last && (*p != '?' || *(p + 1) != '=') )
{
// this is needed for QP hack below
if ( *p == '_' )
hasUnderscore = true;
+ encWord += *p;
+
++p;
}
@@ -289,23 +314,19 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
break;
}
- // convert the encoded word to char[] buffer for c-client
- wxCharBuffer encWord(wxString(encTextStart, p).To8BitData());
-
// skip '=' following '?'
++p;
- String textDecoded;
- if ( encWord )
+ if ( !encWord.empty() )
{
- const unsigned long lenEncWord = strlen(encWord);
+ const unsigned long lenEncWord = encWord.length();
// now decode the text using c-client functions
unsigned long len;
void *text;
if ( enc2047 == Encoding_Base64 )
{
- text = rfc822_base64(UCHAR_CCAST(encWord), lenEncWord, &len);
+ text = rfc822_base64(UCHAR_CCAST(encWord.data()), lenEncWord, &len);
}
else // QP
{
@@ -316,74 +337,26 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
// standard-conforming
if ( hasUnderscore )
{
- for ( char *pc = encWord.data(); *pc; ++pc )
+ for ( auto& c : encWord )
{
- if ( *pc == '_' )
- *pc = ' ';
+ if ( c == '_' )
+ c = ' ';
}
}
- text = rfc822_qprint(UCHAR_CCAST(encWord), lenEncWord, &len);
+ text = rfc822_qprint(UCHAR_CCAST(encWord.data()), lenEncWord, &len);
}
if ( text )
{
const char * const ctext = static_cast<char *>(text);
- if ( encodingWord == wxFONTENCODING_DEFAULT )
- {
- // CharsetToEncoding() returns this for US-ASCII but
- // wxCSConv() doesn't accept it, so handle it manually (we
- // also avoid wxString::FromAscii() because it asserts if the
- // string contains non-ASCII characters, but this can happen,
- // after all we're using untrusted input).
- textDecoded.reserve(len);
- for (unsigned long n = 0; n < len; ++n)
- {
- const unsigned char c = ctext[n];
- if ( c >= 0x80 )
- {
- wxLogDebug(wxS("Invalid character 0x%x "
- "in ASCII-encoded word \"%s\""),
- c, in);
- }
- else
- {
- textDecoded += static_cast<char>(c);
- }
- }
- }
- else // real conversion needed
- {
- textDecoded = wxString(ctext, wxCSConv(encodingWord), len);
- }
+ textLastWord.append(ctext, ctext + len);
fs_give(&text);
}
}
- if ( textDecoded.empty() )
- {
- // if decoding failed it is probably better to show undecoded
- // text than nothing at all
- textDecoded = wxString(encWordStart, p + 1);
- }
-
- // normally we leave the (8 bit) string as is and remember its
- // encoding so that we may choose the font for displaying it
- // correctly, but in case of UTF-7/8 we really need to transform it
- // here as we don't have any UTF-7/8 fonts, so we should display a
- // different string
-#if !wxUSE_UNICODE
- if ( encodingHeader == wxFONTENCODING_UTF7 ||
- encodingHeader == wxFONTENCODING_UTF8 )
- {
- encodingHeader = ConvertUTFToMB(&textDecoded, encodingHeader);
- }
-#endif // !wxUSE_UNICODE
-
- out += textDecoded;
-
// forget the space before this encoded word, it must be ignored
space.clear();
maybeBetweenEncodedWords = true;
@@ -398,6 +371,15 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
}
else // just another normal char
{
+ // the last word won't be continued any more, so decode it, if any
+ if ( encodingLastWord != wxFONTENCODING_SYSTEM )
+ {
+ out += DecodeString(textLastWord, encodingLastWord);
+
+ encodingLastWord = wxFONTENCODING_SYSTEM;
+ textLastWord.clear();
+ }
+
// if we got any delayed whitespace (see above), flush it now
if ( !space.empty() )
{
@@ -411,8 +393,9 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
}
}
- if ( pEncoding )
- *pEncoding = encodingHeader;
+ // decode anything that remains
+ if ( encodingLastWord != wxFONTENCODING_SYSTEM )
+ out += DecodeString(textLastWord, encodingLastWord);
return out;
}
@@ -670,15 +653,15 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
String MIME::DecodeText(const char *p, size_t len, wxFontEncoding enc)
{
- // Special case of using UTF-8: it often happens that a message encoded in
- // UTF-8 has some trailer with Latin-1 appended to it. In this case, try to
- // recover as much of UTF-8 text as possible.
- if ( enc == wxFONTENCODING_UTF8 )
- {
- return String(p, wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA), len);
- }
- else
- {
- return String(p, wxCSConv(enc), len);
- }
+ // Use always successful conversion from UTF-8 as fallback because it's
+ // better to return some garbage (which could, hopefully, contain readable
+ // parts of text) than nothing at all.
+ String s;
+ if ( enc != wxFONTENCODING_UTF8 )
+ s = String(p, wxCSConv(enc), len);
+
+ if ( s.empty() )
+ s = String(p, wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA), len);
+
+ return s;
}
commit 222cf9d471588118c52c88b056e68d38ceba1e24
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Feb 6 02:54:37 2025 +0100
Stop QP-encoding header words separately
This doesn't make much sense, ASCII words are readable in QP-encoded
form too (this is the rationale for having QP encoding in the first
place) and doing it broke header wrapping as the code for merging
adjacent encoded words completely disregarded the line length.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 2e5b793f..9bde4aa4 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -665,72 +665,7 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
csName = _T("UNKNOWN");
}
-
- String headerEnc;
- headerEnc.reserve(2*in.length());
-
- // for QP we encode each header word separately as some might not need being
- // encoded at all and the header remains more readable if we don't encode
- // them unnecessarily, but for Base64 it's useless to do this as it's
- // unreadable anyhow so we just encode everything at once
- if ( enc2047 == MIME::Encoding_QuotedPrintable )
- {
- // encode each word of the header if necessary, taking into account one
- // added complication: white space between 2 consecutive encoded words is
- // ignored during decoding, so we must encode 2 consecutive words both of
- // which need encoding as one single encoded word or the space between
- // them would be lost
- bool lastWordEncoded = false;
- const wxArrayString words(wxStringTokenize(in));
- const size_t count = words.size();
- for ( size_t n = 0; n < count; ++n )
- {
- const wxString& word = words[n];
- if ( NeedsEncoding(word) )
- {
- const String wordEnc = EncodeText(word, enc, enc2047, csName);
-
- if ( lastWordEncoded )
- {
- // we need to merge the 2 consecutive encoded words together: we
- // do it by removing "?=" suffix from the previous word, adding
- // a space and remove the "=?charset?Q?" prefix from this word
- ASSERT_MSG( headerEnc.length() > 7, "bad QP-encoded last word" );
- headerEnc.RemoveLast(2); // "?="
-
- headerEnc += '_'; // space can be represented like this in QP
-
- const size_t posText = wordEnc.find("?Q?");
- ASSERT_MSG( posText != String::npos, "bad QP-encoded word" );
- headerEnc += wordEnc.substr(posText + 3);
- }
- else // last word not encoded, just append this one
- {
- if ( !headerEnc.empty() )
- headerEnc += ' ';
-
- headerEnc += wordEnc;
- }
-
- lastWordEncoded = true;
- }
- else // this word doesn't need to be encoded, simply append it
- {
- if ( !headerEnc.empty() )
- headerEnc += ' ';
-
- headerEnc += word;
-
- lastWordEncoded = false;
- }
- }
- }
- else // MIME::Encoding_Base64
- {
- headerEnc = EncodeText(in, enc, enc2047, csName);
- }
-
- return headerEnc.ToAscii();
+ return EncodeText(in, enc, enc2047, csName).ToAscii();
}
String MIME::DecodeText(const char *p, size_t len, wxFontEncoding enc)
commit e28b1ef23247786e5148c01a59a6314b1da5653a
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Feb 6 02:44:48 2025 +0100
Use more readable encoding for spaces in QP-encoded headers
Use "_" rather than "=20", not only it's more readable, but it's also
more compact.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index c3bb176c..2e5b793f 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -520,7 +520,7 @@ EncodeText(const String& in,
// normal characters stand for themselves in QP, the encoded ones
// take 3 positions (=XX)
- lenRemaining -= (NeedsEncodingInHeader(c) || strchr(" =?", c))
+ lenRemaining -= (NeedsEncodingInHeader(c) || strchr("=?", c))
? 3 : 1;
if ( lenRemaining <= 0 )
@@ -591,7 +591,7 @@ EncodeText(const String& in,
switch ( *p )
{
case ' ':
- encword2 += _T("=20");
+ encword2 += '_'; // More readable than =20
break;
case '\t':
commit c018ad921fa10ea741947733c2c1fd9405d45285
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Feb 6 02:24:12 2025 +0100
Fix bug in QP-encoding over long words
Due to confusion between signed and unsigned chars, lenRemaining wasn't
computed correctly and we passed rfc822_8bit() words that were long
enough that it wrapped them by using "=\r\n", which completely mangled
the generated header.
Fix this by using unsigned chars.
Also simplify the loop over the string by using range for.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index 99427e57..c3bb176c 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -449,9 +449,9 @@ String MIME::DecodeHeader(const String& in, wxFontEncoding *pEncoding)
// returns true if the character must be encoded in a MIME header
//
// NB: we suppose that any special characters had been already escaped
-static inline bool NeedsEncodingInHeader(wxUChar c)
+static inline bool NeedsEncodingInHeader(unsigned char c)
{
- return c >= 127 || iscntrl(c);
+ return c < 20 || c >= 127;
}
// return true if the string contains any characters which must be encoded
@@ -459,26 +459,19 @@ static bool NeedsEncoding(const String& in)
{
// if input contains "=?", encode it anyhow to avoid generating invalid
// encoded words
- if ( in.find(_T("=?")) == wxString::npos )
- {
- // only encode the strings which contain the characters unallowed in RFC
- // 822 headers
- wxString::const_iterator p;
- const wxString::const_iterator end = in.end();
- for ( p = in.begin(); p != end; ++p )
- {
- if ( NeedsEncodingInHeader(*p) )
- break;
- }
+ if ( in.find(_T("=?")) != wxString::npos )
+ return true;
- if ( p == end )
- {
- // string has only valid chars, don't encode
- return false;
- }
+ // only encode the strings which contain the characters unallowed in RFC
+ // 822 headers
+ for ( auto c : in )
+ {
+ if ( !c.IsAscii() || NeedsEncodingInHeader(c.GetValue()) )
+ return true;
}
- return true;
+ // string has only valid chars, don't encode
+ return false;
}
// encode the given text unconditionally, i.e. without checking if it must be
@@ -503,7 +496,7 @@ EncodeText(const String& in,
String out;
out.reserve(csName.length() + strlen(buf) + 7 /* for =?...?X?...?= */);
- const char *s = buf;
+ auto *s = reinterpret_cast<const unsigned char*>(buf.data());
while ( *s )
{
// if we wrapped, insert a line break
@@ -523,11 +516,11 @@ EncodeText(const String& in,
{
for ( ; s[len]; len++ )
{
- const char c = s[len];
+ const unsigned char c = s[len];
// normal characters stand for themselves in QP, the encoded ones
// take 3 positions (=XX)
- lenRemaining -= (NeedsEncodingInHeader(c) || strchr(" \t=?", c))
+ lenRemaining -= (NeedsEncodingInHeader(c) || strchr(" =?", c))
? 3 : 1;
if ( lenRemaining <= 0 )
@@ -560,7 +553,7 @@ EncodeText(const String& in,
}
// do encode this word
- unsigned char *text = (unsigned char *)s; // cast for cclient
+ unsigned char *text = const_cast<unsigned char*>(s); // cast for cclient
// length of the encoded text and the text itself
unsigned long lenEnc;
commit 6fd769a0e2121e792d0b54f15d96a28ab4af3056
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Feb 6 02:23:13 2025 +0100
Don't freeze wxFolderListCtrl while changing it
This doesn't seem necessary with wxGTK neither (it was already disabled
with wxMSW) and sometimes results in problems due to thawing a control
which hadn't been frozen, so avoid this by simply not doing it at all.
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 20013982..dc07c221 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -1577,15 +1577,6 @@ void wxFolderListCtrl::OnFolderChange()
InvalidateCache();
}
-
- // freezing the control under MSW actually results in more flicker, not
- // less: Thaw() repaints it, but it's also repained when we give it the
- // focus so it's painted at least twice, while without Freeze/Thaw() it's
- // still painted correctly and only once
-#ifndef __WXMSW__
- // wait until we get the headers
- Freeze();
-#endif // __WXMSW__
}
void wxFolderListCtrl::UpdateColumnWidths()
@@ -2377,11 +2368,6 @@ void wxFolderListCtrl::UpdateListing(HeaderInfoList *headers)
SetListing(headers);
m_FolderView->SelectInitialMessage();
-
-#ifndef __WXMSW__
- // we can redraw now
- Thaw();
-#endif // __WXMSW__
}
}
commit ca0e027d908f09506bfeb169f8df10972a7a1c66
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Jan 31 01:40:29 2025 +0100
Make default colour for "flagged" messages brighter
The default value of "purple" has changed to be the same as in the CSS
after 1c06d46a9f (Use CSS colour values in wxColourDatabase by default,
2024-12-13) and is now not noticeable enough for such an "important"
colour, so change it to "magenta" which is definitely noticeable.
diff --git a/include/Moptions.h b/include/Moptions.h
index c00ad4ce..8a33a1d3 100644
--- a/include/Moptions.h
+++ b/include/Moptions.h
@@ -2004,7 +2004,7 @@ extern const MOption MP_OPTION_ORIGIN_INHERITED;
/// colour for unread messages
#define MP_FVIEW_UNREADCOLOUR_DEFVAL "blue"
/// colour for flagged messages
-#define MP_FVIEW_FLAGGEDCOLOUR_DEFVAL "purple"
+#define MP_FVIEW_FLAGGEDCOLOUR_DEFVAL "magenta"
/// automatically select next unread message after finishing the current one
#define MP_FVIEW_AUTONEXT_UNREAD_MSG_DEFVAL 1L
/// automatically select next unread folder after finishing the current one
commit d4a702454b34ff4774c427fe9b4896a1bcb43e6a
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Jan 31 01:32:53 2025 +0100
Fix wrong wxPLURAL usage
This never worked, i.e. never translated the messages, but also stopped
compiling with the latest wx, so fix it now.
diff --git a/src/gui/wxMainFrame.cpp b/src/gui/wxMainFrame.cpp
index 0c34b2d6..8f39b421 100644
--- a/src/gui/wxMainFrame.cpp
+++ b/src/gui/wxMainFrame.cpp
@@ -1283,8 +1283,8 @@ void wxMainFrame::OnPowerSuspended(wxPowerEvent& WXUNUSED(event))
{
const unsigned numFolders = m_foldersToResume.size();
wxLogStatus(
- wxPLURAL(_("Closed %u folder which will be reopened on resume."),
- _("Closed %u folders which will be reopened on resume."),
+ wxPLURAL("Closed %u folder which will be reopened on resume.",
+ "Closed %u folders which will be reopened on resume.",
numFolders),
numFolders
);
@@ -1305,8 +1305,8 @@ void wxMainFrame::OnPowerResume(wxPowerEvent& WXUNUSED(event))
foldersToResume.swap(m_foldersToResume);
const unsigned numFolders = foldersToResume.size();
- wxLogStatus(wxPLURAL(_("Reopening %u folder on system resume"),
- _("Reopening %u folders on system resume"),
+ wxLogStatus(wxPLURAL("Reopening %u folder on system resume",
+ "Reopening %u folders on system resume",
numFolders),
numFolders);
-----------------------------------------------------------------------
Summary of changes:
include/Moptions.h | 2 +-
src/gui/wxFolderView.cpp | 14 ---
src/gui/wxMainFrame.cpp | 8 +-
src/mail/MimeDecode.cpp | 267 ++++++++++++++++-------------------------------
4 files changed, 94 insertions(+), 197 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: vadz <mah...@us...> - 2024-11-02 14:04:41
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 9d1f084e02fa0258705884adba16c90f59d8e5d6 (commit)
via 36608f87476e79e75c304ae92f3bba4de4ccfc4c (commit)
from 2ed4ee7769d64c3f21f738cb0ba1bf57aed032d3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9d1f084e02fa0258705884adba16c90f59d8e5d6
Author: Vadim Zeitlin <va...@ze...>
Date: Sat Nov 2 15:02:33 2024 +0100
Remove unused variables, fixing a couple of bugs in the process
Fix all occurrences of -Wunused-variable when using latest wx which
makes unused wxStrings and a few other classes generate this warning.
In most cases, just remove the variables, but in a couple of them do use
them instead of the wrong variable that was used before, fixing bugs.
diff --git a/src/adb/AdbFrame.cpp b/src/adb/AdbFrame.cpp
index 19d8d5a2..abd05c9c 100644
--- a/src/adb/AdbFrame.cpp
+++ b/src/adb/AdbFrame.cpp
@@ -1703,7 +1703,7 @@ ask_name:
}
// prepare strings for diagnostic messages
- wxString strWhere, strGroup = group->GetWhere();
+ wxString strWhere = group->GetWhere();
wxString strWhat = m_bLastNewWasGroup ? _("group") : _("entry");
// first check that it doesn't already exist
diff --git a/src/adb/ProvBbdb.cpp b/src/adb/ProvBbdb.cpp
index f32227e8..8801de3d 100644
--- a/src/adb/ProvBbdb.cpp
+++ b/src/adb/ProvBbdb.cpp
@@ -474,8 +474,6 @@ BbdbEntry::ReadListOfVectors(String *string)
StringListListList vlist;
StringListList slist;
- String str;
-
if(! ReadToken('(', string))
{
ReadNil(string);
diff --git a/src/gui/wxFiltersDialog.cpp b/src/gui/wxFiltersDialog.cpp
index 792b4fc0..4d8a7114 100644
--- a/src/gui/wxFiltersDialog.cpp
+++ b/src/gui/wxFiltersDialog.cpp
@@ -2305,7 +2305,6 @@ void wxFolderFiltersDialog::OnAddButton(wxCommandEvent& event)
{
if ( event.GetEventObject() == m_btnAdd )
{
- wxArrayString allFiltersOld = Profile::GetAllFilters();
String name = CreateNewFilter(this);
if ( !name.empty() )
{
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 2cd7829f..20013982 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -5254,7 +5254,6 @@ wxFolderView::OnASFolderResultEvent(MEventASFolderResultData &event)
m_TicketList->Remove(t);
- String msg;
switch ( result->GetOperation() )
{
case ASMailFolder::Op_GetMessage:
diff --git a/src/gui/wxIconManager.cpp b/src/gui/wxIconManager.cpp
index b93f8f8b..c8b99462 100644
--- a/src/gui/wxIconManager.cpp
+++ b/src/gui/wxIconManager.cpp
@@ -173,7 +173,6 @@ wxIconManager::LoadImage(String filename, bool *success, bool showDlg)
#ifdef OS_UNIX
if(! loaded) // try to use imageMagick to convert image to another format:
{
- String oldfilename = filename;
String tempfile = filename;
int format = READ_APPCONFIG(MP_TMPGFXFORMAT);
if((format < 0 || format > NUMBER_OF_FORMATS)
diff --git a/src/gui/wxMDialogs.cpp b/src/gui/wxMDialogs.cpp
index 9a1d0df5..cbc37444 100644
--- a/src/gui/wxMDialogs.cpp
+++ b/src/gui/wxMDialogs.cpp
@@ -577,7 +577,7 @@ MDialog_FatalErrorMessage(const wxString& message,
{
String msg = String(message) + _("\nExiting application...");
- MDialog_ErrorMessage(message,parent, wxString(M_TITLE_PREFIX)+title,true);
+ MDialog_ErrorMessage(msg,parent, wxString(M_TITLE_PREFIX)+title,true);
mApplication->Exit();
}
diff --git a/src/mail/SendMessageCC.cpp b/src/mail/SendMessageCC.cpp
index 4c4eaac2..c223dc99 100644
--- a/src/mail/SendMessageCC.cpp
+++ b/src/mail/SendMessageCC.cpp
@@ -646,8 +646,7 @@ SendMessageCC::InitFromMsg(const Message *message, const wxArrayInt *partsToOmit
// next deal with the remaining headers
String name,
- value,
- nameUpper;
+ value;
HeaderIterator hdrIter = message->GetHeaderIterator();
while ( hdrIter.GetNext(&name, &value) )
{
diff --git a/src/modules/Filters.cpp b/src/modules/Filters.cpp
index 5359007a..dc19adb2 100644
--- a/src/modules/Filters.cpp
+++ b/src/modules/Filters.cpp
@@ -1878,7 +1878,6 @@ static Value func_isspam(ArgList *args, FilterRuleImpl *p)
if ( !msg )
return false;
- wxArrayString params;
if ( args->Count() != 1 )
return 0;
diff --git a/src/modules/NetscapeImporter.cpp b/src/modules/NetscapeImporter.cpp
index f7222100..47b40c7d 100644
--- a/src/modules/NetscapeImporter.cpp
+++ b/src/modules/NetscapeImporter.cpp
@@ -1063,7 +1063,6 @@ bool MNetscapeImporter::ImportSettingsFromFile(const wxString& filename)
wxStringTokenizer tkz;
wxString varName;
wxString value;
- wxString msg;
size_t nLines = file.GetLineCount();
@@ -1243,7 +1242,6 @@ bool MNetscapeImporter::ImportFolderSettings ( MyHashTable& tbl )
return FALSE;
bool tmpBool = FALSE;
- wxString lstr;
// pref says not to check for new mail, then set to a very large number
// otherwise leave it as set.
diff --git a/src/wx/common/vcard.cpp b/src/wx/common/vcard.cpp
index 12b9861f..0c2be159 100644
--- a/src/wx/common/vcard.cpp
+++ b/src/wx/common/vcard.cpp
@@ -238,7 +238,6 @@ bool wxVCardObject::GetValue(unsigned long *val) const
bool wxVCardObject::GetNamedPropValue(const char *name, wxString *val) const
{
- wxString value;
wxVCardObject *vcObj = GetProperty(wxConvertMB2WX(name));
if ( vcObj )
{
commit 36608f87476e79e75c304ae92f3bba4de4ccfc4c
Author: Vadim Zeitlin <va...@ze...>
Date: Sun Dec 10 00:44:55 2023 +0100
Fix check for conversion failure when sending messages
Fix wrong check added in 466ad2c0 (Fix wrong encoding conversion code in
composer code, 2023-08-23) which could result in an empty message being
sent if the conversion to the original encoding failed, instead of
converting the message to the correct encoding (e.g. UTF-8) as wanted.
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 817c8be6..27beb3da 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -4812,7 +4812,7 @@ wxComposeView::EncodeText(const wxString& text,
{
// try converting this part to the message encoding
textBuf = text.mb_str(wxCSConv(m_encoding));
- if ( !textBuf )
+ if ( !textBuf.length() )
{
// Before asking whether to convert to the part encoding, check if it
// can be converted.
-----------------------------------------------------------------------
Summary of changes:
src/adb/AdbFrame.cpp | 2 +-
src/adb/ProvBbdb.cpp | 2 --
src/gui/wxComposeView.cpp | 2 +-
src/gui/wxFiltersDialog.cpp | 1 -
src/gui/wxFolderView.cpp | 1 -
src/gui/wxIconManager.cpp | 1 -
src/gui/wxMDialogs.cpp | 2 +-
src/mail/SendMessageCC.cpp | 3 +--
src/modules/Filters.cpp | 1 -
src/modules/NetscapeImporter.cpp | 2 --
src/wx/common/vcard.cpp | 1 -
11 files changed, 4 insertions(+), 14 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: vadz <mah...@us...> - 2024-03-31 22:54:15
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 2ed4ee7769d64c3f21f738cb0ba1bf57aed032d3 (commit)
via 1332f9adccc91bd66699992d85bb2adb8f9cc235 (commit)
via 7dc61e5df661fd3fd90395b7922ccc9ba7d24088 (commit)
via dce8a08344eeee58b79365683a7ae4f01fe43898 (commit)
via eda0a65555519761ac608c6d509ee13201ebefa4 (commit)
from 2cea6d1be3661a1029ace9cd27de7a47cc07e9cd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2ed4ee7769d64c3f21f738cb0ba1bf57aed032d3
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Mar 30 17:46:10 2024 +0100
Drop "dynamic" Python support
Always link Python statically, this shouldn't be really a problem any
more and maintaining support for dynamic loading was so much work that
it was abandoned and bitrotted away anyhow.
diff --git a/acinclude.m4 b/acinclude.m4
index bd5c12db..ffc817ab 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -133,43 +133,6 @@ AC_DEFUN([M_CHECK_MYHEADER],
]
)
-dnl M_CHECK_MYHEADER_VER(HEADER-FILE, VERSION, LIBPATHLIST, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-AC_DEFUN([M_CHECK_MYHEADER_VER],
- [ m_safe=`echo "$1_$2" | sed 'y%./+-%__p_%'`
- AC_MSG_CHECKING([for $1 ($2)])
- AC_CACHE_VAL(m_cv_header_$m_safe,
- [ m_save_CPPFLAGS="$CPPFLAGS"
- for j in "." $3 ; do
- CPPFLAGS="-I$j $CPPFLAGS"
- AC_TRY_CPP(dnl
- [#include <$1>],
- [
- if test "$j" = "."; then
- j="/usr/include"
- fi
- eval "m_cv_header_$m_safe=$j"
- CPPFLAGS="$m_save_CPPFLAGS"
- break
- ],
- [ eval "m_cv_header_$m_safe=no" ]
- )
- CPPFLAGS="$m_save_CPPFLAGS"
- done
- ]
- )
- if eval "test \"`echo '$m_cv_header_'$m_safe`\" != no"; then
- dnl FIXME surely there must be a simpler way? (VZ)
- dir=`eval echo $\`eval echo m_cv_header_$m_safe\``
- AC_MSG_RESULT(yes (in $dir))
- eval "CPPFLAGS=\"-I$dir $CPPFLAGS\""
- ifelse([$4], , :, [$4])
- else
- AC_MSG_RESULT(no)
- ifelse([$5], , , [$5])dnl
- fi
- ]
-)
-
dnl M_ADD_CXXFLAGS_IF_SUPPORTED(OPTION)
dnl
dnl Check if the C++ compiler supports the given option and adds it to CXXFLAGS
diff --git a/configure.ac b/configure.ac
index 3ac064d8..3a8378aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,29 +113,16 @@ M_OVERRIDES(nls,i18n support,USE_I18N,1,
--disable-nls no internationalization support)
M_OVERRIDES(python,Python scripting,USE_PYTHON,1,
---with-python=xxx one of none/static/dynamic)
+--with-python use Python scripting)
M_OVERRIDES(dspam,DSPAM spam filter,USE_DSPAM,1,
--with-dspam use DSPAM for spam filtering)
-dnl choose how to use Python: normally, dynamic loading is preferred, but it
-dnl doesn't work under Mac (we need Python.bundle, but all we have is Python
-dnl framework which is a dylib and not a bundle)
if test "$USE_PYTHON" = 1; then
- if test "$USE_MAC" = 1; then
- USE_PYTHON="static"
- else
- USE_PYTHON="dynamic"
- fi
+ M_OVERRIDES(swig,whether we should use SWIG,USE_SWIG,1,
+ --without-swig do not use swig even if it is available)
fi
-case "$USE_PYTHON" in
- static|Static|STATIC|dynamic|Dynamic|DYNAMIC|1)
- M_OVERRIDES(swig,whether we should use SWIG,USE_SWIG,1,
- --without-swig don't use swig even if it is available)
- ;;
-esac
-
dnl dialup is not currently supported under Mac OS X
if test "$USE_MAC" = 0; then
M_OVERRIDES(dialup,special dial-up support,USE_DIALUP,1,
@@ -554,6 +541,9 @@ if test "x$USE_DIALUP" = "x1"; then
AC_DEFINE(USE_DIALUP)
fi
+dnl Find pkg-config outside of any conditional. Done before any PKG_* call.
+PKG_PROG_PKG_CONFIG
+
dnl --------------------------------------------------------------------------
dnl check for SSL
dnl --------------------------------------------------------------------------
@@ -737,120 +727,21 @@ dnl --------------------------------------------------------------------------
dnl which Python version are we going to use?
PYTHON_VER=
-dnl Check for Python headers first: we need this for both dynamic and static
-dnl linking
-case "$USE_PYTHON" in
-static|Static|STATIC|dynamic|Dynamic|DYNAMIC|1)
- for ver in 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.5; do
- M_CHECK_MYHEADER_VER(
- Python.h,
- $ver,
- [ \
- $prefix/include/python$ver \
- /usr/include/python$ver \
- /usr/local/include/python$ver \
- /System/Library/Frameworks/Python.framework/Versions/$ver/include/python$ver \
- ],
- [
- PYTHON_VER=$ver
- break
- ]
- )
- done
- if test "x$PYTHON_VER" = "x"; then
+if test "$USE_PYTHON" = 1; then
+ PKG_CHECK_MODULES(PYTHON, [python2],
+ [
+ CXXFLAGS="$PYTHON_CFLAGS $CXXFLAGS"
+ PYTHON_VER=`$PKG_CONFIG --modversion python2`
+ ],
+ [
USE_PYTHON=0
- fi
- ;;
-
-none|0)
- USE_PYTHON=0
- ;;
-
-*)
- USE_PYTHON=0
- AC_MSG_WARN(Unrecognized --with-python option value.)
- ;;
-esac
-
-dnl now check for the Python lib but only if linking statically
-case "$USE_PYTHON" in
-dynamic|Dynamic|DYNAMIC)
- if test "$USE_MAC" = 1; then
- AC_MSG_ERROR([Dynamic Python loading is not supported under Mac OS])
- fi
- AC_DEFINE(USE_PYTHON_DYNAMIC)
- ;;
-
-static|Static|STATIC|1)
- if test "$USE_MAC" = 1; then
- PYTHON_LIBS="-framework Python"
- AC_CACHE_CHECK(if we can link with Python framework,
- m_cv_framework_python,
- [
- LIBS_OLD=$LIBS
- LIBS="$LIBS $PYTHON_LIBS"
- AC_TRY_LINK([#include "python.h"],
- [Py_Initialize();],
- m_cv_framework_python=yes,
- m_cv_framework_python=no)
- LIBS="$LIBS_OLD"
- ])
- if test "$m_cv_framework_python" != "yes"; then
- PYTHON_LIBS=""
- fi
- fi
-
- if test "x$PYTHON_LIBS" = "x"; then
- M_CHECK_MYLIB(python$PYTHON_VER, main,
- [ \
- $prefix/lib \
- $prefix/lib/python$PYTHON_VER \
- $prefix/lib/python$PYTHON_VER/config \
- /usr/lib \
- /usr/lib/python$PYTHON_VER \
- /usr/lib/python$PYTHON_VER/config \
- /usr/local/lib \
- /usr/local/lib/python$PYTHON_VER \
- /usr/local/lib/python$PYTHON_VER/config \
- ],
- [
- VARNAME="libpath_python`echo $PYTHON_VER | sed 's/\./_/'`_main"
- PYTHON_LIBS="`eval echo $\`echo $VARNAME\`` -lpython$PYTHON_VER"
- ],
- [
- USE_PYTHON=0
- ])
- if test "$USE_PYTHON" != 0; then
- dnl extra libs required by python on freebsd
- case "$OSTYPE" in freebsd* | FreeBSD*)
- PYTHON_LIBS="-lreadline $PYTHON_LIBS"
- ;;
- esac
-
- dnl Python2 uses forkpty() and openpty() which are not in libc
- dnl under Linux but in libutil
- if test "$PYTHON_VER" != "1.5"; then
- AC_CHECK_FUNC(openpty,,
- AC_CHECK_LIB(util,openpty,
- PYTHON_LIBS="-lutil $PYTHON_LIBS"))
- fi
- fi
- fi
- ;;
-
-0)
- ;;
-
-*)
- AC_MSG_WARN(configure logic error, please report this bug)
- ;;
-esac
+ ]
+ )
+fi
case "$USE_PYTHON" in
0) MAKE_USE_PYTHON=''
AC_MSG_WARN([Mahogany will be built without embedded Python interpreter])
- PYTHON_LIBS=''
- PYTHON_VER=""
;;
*) AC_DEFINE(USE_PYTHON)
diff --git a/include/MPython.h b/include/MPython.h
index 61747a56..4adc2fe2 100644
--- a/include/MPython.h
+++ b/include/MPython.h
@@ -23,17 +23,6 @@
#undef HAVE_STRERROR
#undef HAVE_PROTOTYPES
#undef HAVE_STDARG_PROTOTYPES
-
- // use dynamic loading of Python DLL
- #ifndef USE_PYTHON_DYNAMIC
- #define USE_PYTHON_DYNAMIC
- #endif
-
- #ifdef USE_PYTHON_DYNAMIC
- // prevent Python.h from adding the library to our link settings (yes, it
- // really does it)
- #define USE_DL_EXPORT
- #endif // USE_PYTHON_DYNAMIC
#endif // OS_WIN
// under Linux we get annoying messages about redefinition of these symbols
@@ -94,374 +83,6 @@
#include <features.h>
#endif
-#ifdef USE_PYTHON_DYNAMIC
-
-#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
-typedef int Py_ssize_t;
-#endif
-
-// this function must be called before using any Python functions, it if
-// returns FALSE they can't be used
-extern bool InitPythonDll();
-
-// this one must be called if InitPythonDll() returned TRUE
-extern void FreePythonDll();
-
-// declare the wrappers
-extern "C"
-{
- /**
- Declare variable containing a pointer to Python function.
-
- This variable is later used instead of the real one with the help of
- redefinitions below. The macro also has a side effect of defining the
- type M_name_t for this function which is used elsewhere.
-
- This macro should be followed by a semicolon.
-
- @param rettype the return type of the function
- @param name name of the function
- @param args all function arguments inside parentheses
- */
- #define M_PY_WRAPPER_DECL(rettype, name, args) \
- typedef rettype (*M_##name##_t)args; \
- extern M_##name##_t M_##name
-
-
- /**
- Same as M_PY_WRAPPER_DECL but for a variable.
-
- This macro should be followed by a semicolon.
-
- @param type type of the variable
- @param name real name of the variable
- */
- #define M_PY_VAR_DECL(type, name) \
- typedef type M_##name##_t; \
- extern M_##name##_t M_##name
-
-
- // startup/shutdown
- M_PY_WRAPPER_DECL(void, Py_Initialize, (void));
- M_PY_WRAPPER_DECL(void, Py_Finalize, (void));
-
- // errors
- //M_PY_WRAPPER_DECL(int , PyErr_BadArgument, (void));
- M_PY_WRAPPER_DECL(void , PyErr_Clear, (void));
- M_PY_WRAPPER_DECL(void , PyErr_Fetch, (PyObject **, PyObject **, PyObject **));
- //M_PY_WRAPPER_DECL(PyObject * , PyErr_NoMemory, (void));
- M_PY_WRAPPER_DECL(PyObject * , PyErr_Occurred, (void));
- M_PY_WRAPPER_DECL(void , PyErr_Restore, (PyObject *, PyObject *, PyObject *));
- //M_PY_WRAPPER_DECL(void , PyErr_SetNone, (PyObject *));
- M_PY_WRAPPER_DECL(void , PyErr_SetString, (PyObject *, const char *));
- M_PY_WRAPPER_DECL(void , PyErr_SetObject, (PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyErr_Format, (PyObject *, const char *, ...));
-
- // objects
- M_PY_WRAPPER_DECL(PyObject *, PyObject_Init, (PyObject *, PyTypeObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_Call, (PyObject *, PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_CallFunction, (PyObject *, char *format, ...));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_CallFunctionObjArgs, (PyObject *, ...));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_CallObject, (PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_GenericGetAttr, (PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_GetAttr, (PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_GetAttrString, (PyObject *, char *));
- M_PY_WRAPPER_DECL(int, PyObject_IsTrue, (PyObject *));
- M_PY_WRAPPER_DECL(void , PyObject_Free, (void *));
- M_PY_WRAPPER_DECL(void *, PyObject_Malloc, (size_t));
- M_PY_WRAPPER_DECL(int , PyObject_SetAttrString, (PyObject *, char *, PyObject *));
- M_PY_WRAPPER_DECL(int , PyObject_Size, (PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyObject_Str, (PyObject *));
- M_PY_WRAPPER_DECL(void *, PyCObject_Import, (char *module_name, char *cobject_name));
- M_PY_WRAPPER_DECL(PyObject *, PyCObject_FromVoidPtr, (void *cobj, void (*destruct)(void*)));
- M_PY_WRAPPER_DECL(void *, PyCObject_AsVoidPtr, (PyObject *));
- M_PY_WRAPPER_DECL(PyObject **, _PyObject_GetDictPtr, (PyObject *));
-
- // instances
- M_PY_WRAPPER_DECL(PyObject *, PyInstance_NewRaw, (PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, _PyInstance_Lookup, (PyObject *, PyObject *));
- M_PY_VAR_DECL(PyTypeObject *, PyInstance_Type);
-
- // integer types
- M_PY_WRAPPER_DECL(PyObject *, PyBool_FromLong, (long));
- M_PY_WRAPPER_DECL(long, PyInt_AsLong, (PyObject *));
- M_PY_WRAPPER_DECL(PyObject*, PyInt_FromLong, (long));
- M_PY_WRAPPER_DECL(PyObject *, PyLong_FromUnsignedLong, (unsigned long));
- M_PY_WRAPPER_DECL(PyObject *, PyLong_FromVoidPtr, (void *));
- M_PY_WRAPPER_DECL(long , PyLong_AsLong, (PyObject *));
- M_PY_WRAPPER_DECL(unsigned long , PyLong_AsUnsignedLong, (PyObject *));
- M_PY_WRAPPER_DECL(double, PyLong_AsDouble, (PyObject *));
- M_PY_VAR_DECL(PyTypeObject *, PyInt_Type);
- M_PY_VAR_DECL(PyTypeObject *, PyLong_Type);
- M_PY_VAR_DECL(PyIntObject *, _Py_TrueStruct);
- M_PY_VAR_DECL(PyIntObject *, _Py_ZeroStruct);
-
- // floats
- M_PY_VAR_DECL(PyTypeObject *, PyFloat_Type);
- M_PY_WRAPPER_DECL(PyObject *, PyFloat_FromDouble, (double));
- M_PY_WRAPPER_DECL(double, PyFloat_AsDouble, (PyObject *));
-
- // strings
- M_PY_WRAPPER_DECL(char *, PyString_AsString, (PyObject *));
- M_PY_WRAPPER_DECL(int , PyString_AsStringAndSize, (PyObject *, char **, Py_ssize_t *));
- M_PY_WRAPPER_DECL(void, PyString_ConcatAndDel, (PyObject **, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyString_Format, (PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyString_FromString, (const char *));
- M_PY_WRAPPER_DECL(PyObject *, PyString_FromStringAndSize, (const char *, int));
- M_PY_WRAPPER_DECL(PyObject *, PyString_FromFormat, (const char *, ...));
- M_PY_WRAPPER_DECL(PyObject *, PyString_InternFromString, (const char *));
- M_PY_WRAPPER_DECL(int , PyString_Size, (PyObject *));
- M_PY_VAR_DECL(PyTypeObject* , PyString_Type);
-
- // tuples
- M_PY_WRAPPER_DECL(PyObject *, PyTuple_New, (int size));
- M_PY_WRAPPER_DECL(PyObject *, PyTuple_GetItem, (PyObject *, int));
- M_PY_WRAPPER_DECL(int *, PyTuple_SetItem, (PyObject *, int, PyObject *));
- M_PY_VAR_DECL(PyTypeObject * , PyTuple_Type);
-
- // dicts
- M_PY_WRAPPER_DECL(PyObject *, PyDict_GetItem, (PyObject *mp, PyObject *key));
- M_PY_WRAPPER_DECL(PyObject*, PyDict_GetItemString, (PyObject *, const char *));
- M_PY_WRAPPER_DECL(PyObject *, PyDict_New, (void));
- M_PY_WRAPPER_DECL(int, PyDict_SetItem, (PyObject *mp, PyObject *key, PyObject *item));
- M_PY_WRAPPER_DECL(int, PyDict_SetItemString, (PyObject *dp, const char *key, PyObject *item));
-
- // arguments
- M_PY_WRAPPER_DECL(int, PyArg_Parse, (PyObject *, char *, ...));
- M_PY_WRAPPER_DECL(int, PyArg_ParseTuple, (PyObject *, char *, ...));
- M_PY_WRAPPER_DECL(int, PyArg_UnpackTuple, (PyObject *, char *, int, int, ...));
-
- // other misc functions
- M_PY_WRAPPER_DECL(PyObject* , Py_VaBuildValue, (char *, va_list));
- M_PY_WRAPPER_DECL(void , _Py_Dealloc, (PyObject *));
- M_PY_WRAPPER_DECL(void, PyEval_RestoreThread, (PyThreadState *));
- M_PY_WRAPPER_DECL(PyThreadState*, PyEval_SaveThread, (void));
- M_PY_WRAPPER_DECL(PyObject*, PyList_GetItem, (PyObject *, int));
- M_PY_WRAPPER_DECL(PyObject*, PyList_New, (int size));
- M_PY_WRAPPER_DECL(int, PyList_Append, (PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(int, PyList_SetItem, (PyObject *, int, PyObject *));
- M_PY_WRAPPER_DECL(int, PyList_Size, (PyObject *));
- M_PY_VAR_DECL(PyTypeObject *, PyList_Type);
- M_PY_WRAPPER_DECL(PyObject*, PyImport_ImportModule, (const char *));
- M_PY_WRAPPER_DECL(PyObject*, PyModule_GetDict, (PyObject *));
- M_PY_WRAPPER_DECL(int, PyModule_AddObject, (PyObject *, char *, PyObject *));
- M_PY_WRAPPER_DECL(int, PySys_SetObject, (char *, PyObject *));
- M_PY_VAR_DECL(PyTypeObject* , PyType_Type);
- M_PY_WRAPPER_DECL(PyObject*, Py_BuildValue, (char *, ...));
- M_PY_WRAPPER_DECL(PyObject*, Py_FindMethod, (PyMethodDef[], PyObject *, char *));
- M_PY_WRAPPER_DECL(PyObject*, Py_InitModule4, (char *, PyMethodDef *, char *, PyObject *, int));
- M_PY_WRAPPER_DECL(PyObject *, PyEval_CallObjectWithKeywords, (PyObject *, PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyImport_AddModule, (char *name));
- M_PY_WRAPPER_DECL(PyObject *, PyImport_GetModuleDict, (void));
- M_PY_WRAPPER_DECL(PyObject *, PyImport_ReloadModule, (PyObject *));
- M_PY_WRAPPER_DECL(PyObject *, PyRun_String, (const char *, int, PyObject *, PyObject *));
- M_PY_WRAPPER_DECL(int, PyRun_SimpleStringFlags, (const char *, PyCompilerFlags *));
- M_PY_WRAPPER_DECL(int, PyOS_snprintf, (char *str, size_t size, const char *format, ...));
-
- M_PY_WRAPPER_DECL(int , PyType_IsSubtype, (PyTypeObject *, PyTypeObject *));
- M_PY_WRAPPER_DECL(void , _Py_NegativeRefcount, (const char *fname, int lineno, PyObject *op));
-
- // types
- M_PY_VAR_DECL(PyTypeObject *, PyBaseObject_Type);
- M_PY_VAR_DECL(PyTypeObject *, PyClass_Type);
- M_PY_VAR_DECL(PyTypeObject *, PyCFunction_Type);
- M_PY_VAR_DECL(PyTypeObject *, PyModule_Type);
- M_PY_VAR_DECL(PyTypeObject *, _PyWeakref_CallableProxyType);
- M_PY_VAR_DECL(PyTypeObject *, _PyWeakref_ProxyType);
-
- // variables
- M_PY_VAR_DECL(long, _Py_RefTotal);
- M_PY_VAR_DECL(PyObject *, _Py_NoneStruct);
- M_PY_VAR_DECL(PyObject *, _Py_NotImplementedStruct);
-
- // exception objects
- M_PY_VAR_DECL(PyObject *, PyExc_AttributeError);
- M_PY_VAR_DECL(PyObject *, PyExc_IOError);
- M_PY_VAR_DECL(PyObject *, PyExc_IndexError);
- M_PY_VAR_DECL(PyObject *, PyExc_MemoryError);
- M_PY_VAR_DECL(PyObject *, PyExc_NameError);
- M_PY_VAR_DECL(PyObject *, PyExc_NotImplementedError);
- M_PY_VAR_DECL(PyObject *, PyExc_OverflowError);
- M_PY_VAR_DECL(PyObject *, PyExc_RuntimeError);
- M_PY_VAR_DECL(PyObject *, PyExc_SyntaxError);
- M_PY_VAR_DECL(PyObject *, PyExc_SystemError);
- M_PY_VAR_DECL(PyObject *, PyExc_TypeError);
- M_PY_VAR_DECL(PyObject *, PyExc_ValueError);
- M_PY_VAR_DECL(PyObject *, PyExc_ZeroDivisionError);
-
- #undef M_PY_VAR_DECL
- #undef M_PY_WRAPPER_DECL
-}
-
-// redefine all functions we use to our wrappers instead
-// ----------------------------------------------------------------------------
-
-// startup/shutdown
-#define Py_Initialize M_Py_Initialize
-#define Py_Finalize M_Py_Finalize
-
-// errors
-#define PyErr_Clear M_PyErr_Clear
-#define PyErr_Fetch M_PyErr_Fetch
-#define PyErr_Occurred M_PyErr_Occurred
-#define PyErr_Restore M_PyErr_Restore
-#define PyErr_SetString M_PyErr_SetString
-#define PyErr_SetObject M_PyErr_SetObject
-#define PyErr_Format M_PyErr_Format
-
-// objects
-#define PyObject_Init M_PyObject_Init
-#define PyObject_Call M_PyObject_Call
-#define PyObject_CallFunction M_PyObject_CallFunction
-#define PyObject_CallFunctionObjArgs M_PyObject_CallFunctionObjArgs
-#define PyObject_CallObject M_PyObject_CallObject
-#define PyObject_GenericGetAttr M_PyObject_GenericGetAttr
-#define PyObject_GetAttr M_PyObject_GetAttr
-#define PyObject_GetAttrString M_PyObject_GetAttrString
-#define PyObject_IsTrue M_PyObject_IsTrue
-#if defined(WITH_PYMALLOC) && defined(PYMALLOC_DEBUG)
- #define _PyObject_DebugMalloc M_PyObject_Malloc
- #define _PyObject_DebugFree M_PyObject_Free
-#else
- #define PyObject_Malloc M_PyObject_Malloc
- #define PyObject_Free M_PyObject_Free
-#endif
-#define PyObject_SetAttrString M_PyObject_SetAttrString
-#define PyObject_Size M_PyObject_Size
-#define PyObject_Str M_PyObject_Str
-#define PyCObject_Import M_PyCObject_Import
-#define PyCObject_FromVoidPtr M_PyCObject_FromVoidPtr
-#define PyCObject_AsVoidPtr M_PyCObject_AsVoidPtr
-#define _PyObject_GetDictPtr M__PyObject_GetDictPtr
-
-// instances
-#define PyInstance_NewRaw M_PyInstance_NewRaw
-#define _PyInstance_Lookup M__PyInstance_Lookup
-#define PyInstance_Type (*M_PyInstance_Type)
-
-// integer types
-#define PyBool_FromLong M_PyBool_FromLong
-#define PyInt_AsLong M_PyInt_AsLong
-#define PyInt_FromLong M_PyInt_FromLong
-#define PyLong_FromUnsignedLong M_PyLong_FromUnsignedLong
-#define PyLong_FromVoidPtr M_PyLong_FromVoidPtr
-#define PyLong_AsLong M_PyLong_AsLong
-#define PyLong_AsUnsignedLong M_PyLong_AsUnsignedLong
-#define PyLong_AsDouble (*M_PyLong_AsDouble)
-#define PyInt_Type (*M_PyInt_Type)
-#define PyLong_Type (*M_PyLong_Type)
-#define _Py_TrueStruct (*M__Py_TrueStruct)
-#define _Py_ZeroStruct (*M__Py_ZeroStruct)
-
-// floats
-#define PyFloat_Type (*M_PyFloat_Type)
-#define PyFloat_FromDouble M_PyFloat_FromDouble
-#define PyFloat_AsDouble (*M_PyFloat_AsDouble)
-
-// strings
-#define PyString_AsString M_PyString_AsString
-#define PyString_AsStringAndSize M_PyString_AsStringAndSize
-#define PyString_ConcatAndDel M_PyString_ConcatAndDel
-#define PyString_Format M_PyString_Format
-#define PyString_FromString M_PyString_FromString
-#define PyString_FromStringAndSize M_PyString_FromStringAndSize
-#define PyString_FromFormat M_PyString_FromFormat
-#define PyString_InternFromString M_PyString_InternFromString
-#define PyString_Type (*M_PyString_Type)
-
-// tuples
-#define PyTuple_New M_PyTuple_New
-#define PyTuple_GetItem M_PyTuple_GetItem
-#define PyTuple_SetItem M_PyTuple_SetItem
-#define PyTuple_Type (*M_PyTuple_Type)
-
-// lists
-#define PyList_Type (*M_PyList_Type)
-#define PyList_New M_PyList_New
-#define PyList_SetItem M_PyList_SetItem
-#define PyList_Append M_PyList_Append
-
-// dicts
-#define PyDict_GetItem M_PyDict_GetItem
-#define PyDict_GetItemString M_PyDict_GetItemString
-#define PyDict_New M_PyDict_New
-#define PyDict_SetItem M_PyDict_SetItem
-#define PyDict_SetItemString M_PyDict_SetItemString
-
-// arguments
-#define PyArg_Parse M_PyArg_Parse
-#define PyArg_ParseTuple M_PyArg_ParseTuple
-#define PyArg_UnpackTuple M_PyArg_UnpackTuple
-
-// types: these are objects and not function pointers
-#define PyBaseObject_Type (*M_PyBaseObject_Type)
-#define PyClass_Type (*M_PyClass_Type)
-#define PyCFunction_Type (*M_PyCFunction_Type)
-#define PyModule_Type (*M_PyModule_Type)
-#define _PyWeakref_CallableProxyType (*M__PyWeakref_CallableProxyType)
-#define _PyWeakref_ProxyType (*M__PyWeakref_ProxyType)
-
-// ...
-#define _Py_NoneStruct (*M__Py_NoneStruct)
-#define _Py_NotImplementedStruct (*M__Py_NotImplementedStruct)
-#define Py_BuildValue M_Py_BuildValue
-#define Py_VaBuildValue M_Py_VaBuildValue
-#define _Py_RefTotal M__Py_RefTotal
-#define PyImport_ImportModule M_PyImport_ImportModule
-#define PyModule_GetDict M_PyModule_GetDict
-#define PyModule_AddObject M_PyModule_AddObject
-#define PyType_Type (*M_PyType_Type)
-#define PyEval_CallObjectWithKeywords M_PyEval_CallObjectWithKeywords
-#define PyImport_AddModule M_PyImport_AddModule
-#define PyImport_GetModuleDict M_PyImport_GetModuleDict
-#define PyImport_ReloadModule M_PyImport_ReloadModule
-// PyRun_String is already a macro in 2.6 but, surprisingly, the DLL still
-// exports it as a function too and using it seems to work fine...
-#undef PyRun_String
-#define PyRun_String M_PyRun_String
-#define PyRun_SimpleStringFlags M_PyRun_SimpleStringFlags
-#define PyOS_snprintf M_PyOS_snprintf
-
-// exception objects
-#define PyExc_AttributeError M_PyExc_AttributeError
-#define PyExc_IOError M_PyExc_IOError
-#define PyExc_IndexError M_PyExc_IndexError
-#define PyExc_MemoryError M_PyExc_MemoryError
-#define PyExc_NameError M_PyExc_NameError
-#define PyExc_NotImplementedError M_PyExc_NotImplementedError
-#define PyExc_OverflowError M_PyExc_OverflowError
-#define PyExc_RuntimeError M_PyExc_RuntimeError
-#define PyExc_SyntaxError M_PyExc_SyntaxError
-#define PyExc_SystemError M_PyExc_SystemError
-#define PyExc_TypeError M_PyExc_TypeError
-#define PyExc_ValueError M_PyExc_ValueError
-#define PyExc_ZeroDivisionError M_PyExc_ZeroDivisionError
-
-// Python 2.3+
-#define PyType_IsSubtype M_PyType_IsSubtype
-#define _Py_NegativeRefcount M__Py_NegativeRefcount
-
-// _Py_Dealloc may be defined as a macro or not (in debug builds)
-#ifndef _Py_Dealloc
-#define _Py_Dealloc M__Py_Dealloc
-#endif
-
-// Py_InitModule4 may be defined as Py_InitModule4TraceRefs (in debug builds)
-#ifdef Py_TRACE_REFS
-#define Py_InitModule4TraceRefs M_Py_InitModule4
-#define M_Py_InitModule4TraceRefs M_Py_InitModule4
-#else
-// Another complication: under 64 bit systems Python uses a different name to
-// avoid loading 32 bit modules into 64 bit interpreter
-#if SIZEOF_SIZE_T != SIZEOF_INT
-#define Py_InitModule4_64 M_Py_InitModule4
-#else
-#define Py_InitModule4 M_Py_InitModule4
-#endif
-#endif
-
-#endif // USE_PYTHON_DYNAMIC
-
#include "PythonHelp.h"
#define M_PYTHON_MODULE "Minit"
diff --git a/include/config.h.in b/include/config.h.in
index 2f88ad6c..3d4b746d 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -49,9 +49,6 @@
/** Define if you use Python. */
#undef USE_PYTHON
-/** Define to load Python library during run-time */
-#undef USE_PYTHON_DYNAMIC
-
/** Define if you have libswigpy */
#undef HAVE_SWIGLIB
diff --git a/src/Python/InitPython.cpp b/src/Python/InitPython.cpp
index ca10dba9..874a9403 100644
--- a/src/Python/InitPython.cpp
+++ b/src/Python/InitPython.cpp
@@ -136,16 +136,6 @@ InitPython(void)
return true;
}
- // check if Python is available at all if we load it during run-time
-#ifdef USE_PYTHON_DYNAMIC
- if ( !InitPythonDll() )
- {
- wxLogError(_("Python dynamic library couldn't be loaded."));
-
- return false;
- }
-#endif // USE_PYTHON_DYNAMIC
-
// initialise the interpreter -- this we do always, just to avoid problems
Py_Initialize();
gs_isPythonInitialized = true;
@@ -209,10 +199,6 @@ void FreePython()
gs_isPythonInitialized = false;
}
-
-#ifdef USE_PYTHON_DYNAMIC
- FreePythonDll();
-#endif // USE_PYTHON_DYNAMIC
}
#endif // USE_PYTHON
diff --git a/src/Python/Names.mk b/src/Python/Names.mk
index fbdb53b7..bb3ee793 100644
--- a/src/Python/Names.mk
+++ b/src/Python/Names.mk
@@ -7,7 +7,7 @@ ifdef USE_PYTHON
IFACE_DIR := .src/../include/interface
IFILES := $(filter-out swigcmn.i, $(notdir $(wildcard $(IFACE_DIR)/*.i)))
-MSRC := Python/InitPython.cpp Python/PythonHelp.cpp Python/PythonDll.cpp
+MSRC := Python/InitPython.cpp Python/PythonHelp.cpp
MOBJS += $(patsubst %.i,Python/%.o,$(IFILES)) $(MSRC:.cpp=.o)
MSGSRC += $(MSRC)
diff --git a/src/Python/PythonDll.cpp b/src/Python/PythonDll.cpp
deleted file mode 100644
index 178fd73b..00000000
--- a/src/Python/PythonDll.cpp
+++ /dev/null
@@ -1,506 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Project: M
-// File name: PythonDll.cpp - stubs for Python functions
-// Purpose: to allow real dynamic loading of Python.dll under Windows
-// we resolve the Python functions we use at run-time, otherwise
-// we'd need to always distribute Python.dll with Mahogany
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 11.03.01
-// CVS-ID: $Id$
-// Copyright: (c) 2001 Vadim Zeitlin <ze...@dp...>
-// Licence: M license
-///////////////////////////////////////////////////////////////////////////////
-
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "Mpch.h"
-
-#ifndef USE_PCH
- #include "Mcommon.h"
- #include "Mdefaults.h"
- #include "MApplication.h"
-#endif // USE_PCH
-
-#include "MPython.h"
-
-#ifdef USE_PYTHON_DYNAMIC
-
-#include <wx/dynlib.h>
-
-// ----------------------------------------------------------------------------
-// options we use here
-// ----------------------------------------------------------------------------
-
-extern const MOption MP_PYTHONDLL;
-
-// ----------------------------------------------------------------------------
-// local functions
-// ----------------------------------------------------------------------------
-
-namespace
-{
-
-// return the full name of the Python library with the given version
-inline String GetPythonDllBaseName(int major, int minor)
-{
-#if defined(OS_WIN)
- String basename = wxString::Format("python%d%d", major, minor);
-
- // we used to append "_d" to the base name here in debug build of M to
- // ensure that Python DLL we load uses the same CRT version as we do
- //
- // however it finally doesn't seem necessary to require this and we can
- // always the release version of Python DLL, even when building M itself in
- // debug, if we just #undef _DEBUG prior to including Python.h (as we now
- // do)
- //
- // this seems to work with at least Python 2.6 (compiled with VC9) and we
- // may always restore the basename += "_d"; line if we find any problems
-#elif defined(OS_UNIX)
- String basename = wxString::Format("libpython%d.%d", major, minor);
-#else
- #error "Unknown Python library naming convention under this OS"
-#endif // OS
-
- return basename;
-}
-
-} // anonymous namespace
-
-// ----------------------------------------------------------------------------
-// global data
-// ----------------------------------------------------------------------------
-
-#define M_PY_WRAPPER_DEF(name) M_##name##_t M_##name = NULL
-
-// use 0 and not NULL as not all variables are pointers
-#define M_PY_VAR_DEF(name) M_##name##_t M_##name = 0
-
-extern "C"
-{
- M_PY_WRAPPER_DEF(Py_Initialize);
- M_PY_WRAPPER_DEF(Py_Finalize);
-
- // errors
- //M_PY_WRAPPER_DEF(PyErr_BadArgument);
- M_PY_WRAPPER_DEF(PyErr_Clear);
- M_PY_WRAPPER_DEF(PyErr_Fetch);
- //M_PY_WRAPPER_DEF(PyErr_NoMemory);
- M_PY_WRAPPER_DEF(PyErr_Occurred);
- M_PY_WRAPPER_DEF(PyErr_Restore);
- //M_PY_WRAPPER_DEF(PyErr_SetNone);
- M_PY_WRAPPER_DEF(PyErr_SetString);
- M_PY_WRAPPER_DEF(PyErr_SetObject);
- M_PY_WRAPPER_DEF(PyErr_Format);
-
- // objects
- M_PY_WRAPPER_DEF(PyObject_Init);
- M_PY_WRAPPER_DEF(PyObject_Call);
- M_PY_WRAPPER_DEF(PyObject_CallFunction);
- M_PY_WRAPPER_DEF(PyObject_CallFunctionObjArgs);
- M_PY_WRAPPER_DEF(PyObject_CallObject);
- M_PY_WRAPPER_DEF(PyObject_Free);
- M_PY_WRAPPER_DEF(PyObject_GenericGetAttr);
- M_PY_WRAPPER_DEF(PyObject_GetAttr);
- M_PY_WRAPPER_DEF(PyObject_GetAttrString);
- M_PY_WRAPPER_DEF(PyObject_IsTrue);
- M_PY_WRAPPER_DEF(PyObject_Malloc);
- M_PY_WRAPPER_DEF(PyObject_SetAttrString);
- M_PY_WRAPPER_DEF(PyObject_Size);
- M_PY_WRAPPER_DEF(PyObject_Str);
- M_PY_WRAPPER_DEF(PyCObject_Import);
- M_PY_WRAPPER_DEF(PyCObject_FromVoidPtr);
- M_PY_WRAPPER_DEF(PyCObject_AsVoidPtr);
- M_PY_WRAPPER_DEF(_PyObject_GetDictPtr);
-
- // instances
- M_PY_WRAPPER_DEF(PyInstance_NewRaw);
- M_PY_WRAPPER_DEF(_PyInstance_Lookup);
- M_PY_VAR_DEF(PyInstance_Type);
-
- // integer types
- M_PY_WRAPPER_DEF(PyBool_FromLong);
- M_PY_WRAPPER_DEF(PyInt_AsLong);
- M_PY_WRAPPER_DEF(PyInt_FromLong);
- M_PY_WRAPPER_DEF(PyLong_FromUnsignedLong);
- M_PY_WRAPPER_DEF(PyLong_FromVoidPtr);
- M_PY_WRAPPER_DEF(PyLong_AsLong);
- M_PY_WRAPPER_DEF(PyLong_AsUnsignedLong);
- M_PY_WRAPPER_DEF(PyLong_AsDouble);
- M_PY_VAR_DEF(PyInt_Type);
- M_PY_VAR_DEF(PyLong_Type);
- M_PY_VAR_DEF(_Py_TrueStruct);
- M_PY_VAR_DEF(_Py_ZeroStruct);
-
- // floats
- M_PY_VAR_DEF(PyFloat_Type);
- M_PY_WRAPPER_DEF(PyFloat_FromDouble);
- M_PY_WRAPPER_DEF(PyFloat_AsDouble);
-
- // strings
- M_PY_WRAPPER_DEF(PyString_AsString);
- M_PY_WRAPPER_DEF(PyString_AsStringAndSize);
- M_PY_WRAPPER_DEF(PyString_ConcatAndDel);
- M_PY_WRAPPER_DEF(PyString_Format);
- M_PY_WRAPPER_DEF(PyString_FromString);
- M_PY_WRAPPER_DEF(PyString_FromStringAndSize);
- M_PY_WRAPPER_DEF(PyString_FromFormat);
- M_PY_WRAPPER_DEF(PyString_InternFromString);
- M_PY_WRAPPER_DEF(PyString_Size);
- M_PY_VAR_DEF(PyString_Type);
-
- // tuples
- M_PY_WRAPPER_DEF(PyTuple_New);
- M_PY_WRAPPER_DEF(PyTuple_GetItem);
- M_PY_WRAPPER_DEF(PyTuple_SetItem);
- M_PY_VAR_DEF(PyTuple_Type);
-
- // dicts
- M_PY_WRAPPER_DEF(PyDict_GetItem);
- M_PY_WRAPPER_DEF(PyDict_GetItemString);
- M_PY_WRAPPER_DEF(PyDict_New);
- M_PY_WRAPPER_DEF(PyDict_SetItem);
- M_PY_WRAPPER_DEF(PyDict_SetItemString);
-
- // args
- M_PY_WRAPPER_DEF(PyArg_Parse);
- M_PY_WRAPPER_DEF(PyArg_ParseTuple);
- M_PY_WRAPPER_DEF(PyArg_UnpackTuple);
-
- // ...
- M_PY_WRAPPER_DEF(Py_VaBuildValue);
- M_PY_WRAPPER_DEF(_Py_Dealloc);
- M_PY_WRAPPER_DEF(PyEval_RestoreThread);
- M_PY_WRAPPER_DEF(PyEval_SaveThread);
- M_PY_WRAPPER_DEF(PyList_GetItem);
- M_PY_WRAPPER_DEF(PyList_New);
- M_PY_WRAPPER_DEF(PyList_Append);
- M_PY_WRAPPER_DEF(PyList_SetItem);
- M_PY_WRAPPER_DEF(PyList_Size);
- M_PY_VAR_DEF(PyList_Type);
- M_PY_WRAPPER_DEF(PyImport_ImportModule);
- M_PY_WRAPPER_DEF(PyModule_GetDict);
- M_PY_WRAPPER_DEF(PyModule_AddObject);
- M_PY_WRAPPER_DEF(PySys_SetObject);
- M_PY_VAR_DEF(PyType_Type);
- M_PY_WRAPPER_DEF(Py_BuildValue);
- M_PY_WRAPPER_DEF(Py_FindMethod);
- M_PY_WRAPPER_DEF(Py_InitModule4);
- M_PY_WRAPPER_DEF(PyEval_CallObjectWithKeywords);
- M_PY_WRAPPER_DEF(PyImport_AddModule);
- M_PY_WRAPPER_DEF(PyImport_GetModuleDict);
- M_PY_WRAPPER_DEF(PyImport_ReloadModule);
- M_PY_WRAPPER_DEF(PyRun_String);
- M_PY_WRAPPER_DEF(PyRun_SimpleStringFlags);
-
- M_PY_WRAPPER_DEF(PyType_IsSubtype);
- M_PY_WRAPPER_DEF(_Py_NegativeRefcount);
-
- // other misc functions
- M_PY_WRAPPER_DEF(PyOS_snprintf);
-
- // misc types
- M_PY_VAR_DEF(PyBaseObject_Type);
- M_PY_VAR_DEF(PyClass_Type);
- M_PY_VAR_DEF(PyCFunction_Type);
- M_PY_VAR_DEF(PyModule_Type);
- M_PY_VAR_DEF(_PyWeakref_CallableProxyType);
- M_PY_VAR_DEF(_PyWeakref_ProxyType);
-
- // variables
-#ifdef Py_REF_DEBUG
- M_PY_VAR_DEF(_Py_RefTotal);
-#endif // Py_REF_DEBUG
- M_PY_VAR_DEF(_Py_NoneStruct);
- M_PY_VAR_DEF(_Py_NotImplementedStruct);
-
- // exception objects
- M_PY_VAR_DEF(PyExc_AttributeError);
- M_PY_VAR_DEF(PyExc_IOError);
- M_PY_VAR_DEF(PyExc_IndexError);
- M_PY_VAR_DEF(PyExc_MemoryError);
- M_PY_VAR_DEF(PyExc_NameError);
- M_PY_VAR_DEF(PyExc_NotImplementedError);
- M_PY_VAR_DEF(PyExc_OverflowError);
- M_PY_VAR_DEF(PyExc_RuntimeError);
- M_PY_VAR_DEF(PyExc_SyntaxError);
- M_PY_VAR_DEF(PyExc_SystemError);
- M_PY_VAR_DEF(PyExc_TypeError);
- M_PY_VAR_DEF(PyExc_ValueError);
- M_PY_VAR_DEF(PyExc_ZeroDivisionError);
-}
-
-#undef M_PY_VAR_DEF
-#undef M_PY_WRAPPER_DEF
-
-// ----------------------------------------------------------------------------
-// private data
-// ----------------------------------------------------------------------------
-
-#ifdef OS_WIN
- #define PYTHON_PROC FARPROC
-#else
- #define PYTHON_PROC void *
-#endif
-
-#define PYTHON_SYMBOL(func) { #func, (PYTHON_PROC *)&M_ ## func },
-
-static struct PythonFunc
-{
- const char *name; // function name
- PYTHON_PROC *ptr; // function pointer
-} pythonFuncs[] =
-{
- // startup/shutdown
- PYTHON_SYMBOL(Py_Initialize)
- PYTHON_SYMBOL(Py_Finalize)
-
- // errors
- PYTHON_SYMBOL(PyErr_Clear)
- PYTHON_SYMBOL(PyErr_Fetch)
- PYTHON_SYMBOL(PyErr_Occurred)
- PYTHON_SYMBOL(PyErr_Restore)
- PYTHON_SYMBOL(PyErr_SetString)
- PYTHON_SYMBOL(PyErr_SetObject)
- PYTHON_SYMBOL(PyErr_Format)
-
- // objects
- PYTHON_SYMBOL(PyObject_Init)
- PYTHON_SYMBOL(PyObject_Call)
- PYTHON_SYMBOL(PyObject_CallFunction)
- PYTHON_SYMBOL(PyObject_CallFunctionObjArgs)
- PYTHON_SYMBOL(PyObject_CallObject)
- PYTHON_SYMBOL(PyObject_Free)
- PYTHON_SYMBOL(PyObject_GenericGetAttr)
- PYTHON_SYMBOL(PyObject_GetAttr)
- PYTHON_SYMBOL(PyObject_GetAttrString)
- PYTHON_SYMBOL(PyObject_IsTrue)
- PYTHON_SYMBOL(PyObject_Malloc)
- PYTHON_SYMBOL(PyObject_SetAttrString)
- PYTHON_SYMBOL(PyObject_Size)
- PYTHON_SYMBOL(PyObject_Str)
- PYTHON_SYMBOL(PyCObject_Import)
- PYTHON_SYMBOL(PyCObject_FromVoidPtr)
- PYTHON_SYMBOL(PyCObject_AsVoidPtr)
- PYTHON_SYMBOL(_PyObject_GetDictPtr)
-
- // instances
- PYTHON_SYMBOL(PyInstance_NewRaw)
- PYTHON_SYMBOL(PyInstance_Type)
- PYTHON_SYMBOL(_PyInstance_Lookup)
-
- // integer types
- PYTHON_SYMBOL(PyBool_FromLong)
- PYTHON_SYMBOL(PyInt_AsLong)
- PYTHON_SYMBOL(PyInt_FromLong)
- PYTHON_SYMBOL(PyLong_FromUnsignedLong)
- PYTHON_SYMBOL(PyLong_FromVoidPtr)
- PYTHON_SYMBOL(PyLong_AsLong)
- PYTHON_SYMBOL(PyLong_AsUnsignedLong)
- PYTHON_SYMBOL(PyLong_AsDouble)
- PYTHON_SYMBOL(PyInt_Type)
- PYTHON_SYMBOL(PyLong_Type)
- PYTHON_SYMBOL(_Py_TrueStruct)
- PYTHON_SYMBOL(_Py_ZeroStruct)
-
- // floats
- PYTHON_SYMBOL(PyFloat_Type)
- PYTHON_SYMBOL(PyFloat_FromDouble)
- PYTHON_SYMBOL(PyFloat_AsDouble)
-
- // strings
- PYTHON_SYMBOL(PyString_AsString)
- PYTHON_SYMBOL(PyString_AsStringAndSize)
- PYTHON_SYMBOL(PyString_ConcatAndDel)
- PYTHON_SYMBOL(PyString_Format)
- PYTHON_SYMBOL(PyString_FromString)
- PYTHON_SYMBOL(PyString_FromStringAndSize)
- PYTHON_SYMBOL(PyString_FromFormat)
- PYTHON_SYMBOL(PyString_InternFromString)
- PYTHON_SYMBOL(PyString_Type)
-
- // tuples
- PYTHON_SYMBOL(PyTuple_New)
- PYTHON_SYMBOL(PyTuple_GetItem)
- PYTHON_SYMBOL(PyTuple_SetItem)
- PYTHON_SYMBOL(PyTuple_Type)
-
- // dicts
- PYTHON_SYMBOL(PyDict_GetItem)
- PYTHON_SYMBOL(PyDict_GetItemString)
- PYTHON_SYMBOL(PyDict_New)
- PYTHON_SYMBOL(PyDict_SetItem)
- PYTHON_SYMBOL(PyDict_SetItemString)
-
- // args
- PYTHON_SYMBOL(PyArg_Parse)
- PYTHON_SYMBOL(PyArg_ParseTuple)
- PYTHON_SYMBOL(PyArg_UnpackTuple)
-
- // ...
- PYTHON_SYMBOL(_Py_NoneStruct)
- PYTHON_SYMBOL(_Py_NotImplementedStruct)
- PYTHON_SYMBOL(PyCFunction_Type)
- PYTHON_SYMBOL(Py_BuildValue)
- PYTHON_SYMBOL(Py_VaBuildValue)
-#ifdef Py_REF_DEBUG
- PYTHON_SYMBOL(_Py_RefTotal)
-#endif // Py_REF_DEBUG
-#ifdef Py_TRACE_REFS
- PYTHON_SYMBOL(_Py_Dealloc)
-#endif // Py_TRACE_REFS
-
- // misc types
- PYTHON_SYMBOL(PyBaseObject_Type)
- PYTHON_SYMBOL(PyClass_Type)
- PYTHON_SYMBOL(PyModule_Type)
- PYTHON_SYMBOL(_PyWeakref_CallableProxyType)
- PYTHON_SYMBOL(_PyWeakref_ProxyType)
-
- PYTHON_SYMBOL(PyImport_ImportModule)
- PYTHON_SYMBOL(PyModule_GetDict)
- PYTHON_SYMBOL(PyModule_AddObject)
- PYTHON_SYMBOL(PyEval_CallObjectWithKeywords)
-
- PYTHON_SYMBOL(PyExc_AttributeError)
- PYTHON_SYMBOL(PyExc_IOError)
- PYTHON_SYMBOL(PyExc_IndexError)
- PYTHON_SYMBOL(PyExc_MemoryError)
- PYTHON_SYMBOL(PyExc_NameError)
- PYTHON_SYMBOL(PyExc_NotImplementedError)
- PYTHON_SYMBOL(PyExc_OverflowError)
- PYTHON_SYMBOL(PyExc_RuntimeError)
- PYTHON_SYMBOL(PyExc_SyntaxError)
- PYTHON_SYMBOL(PyExc_SystemError)
- PYTHON_SYMBOL(PyExc_TypeError)
- PYTHON_SYMBOL(PyExc_ValueError)
- PYTHON_SYMBOL(PyExc_ZeroDivisionError)
-
- PYTHON_SYMBOL(PyImport_AddModule)
- PYTHON_SYMBOL(PyImport_GetModuleDict)
- PYTHON_SYMBOL(PyImport_ReloadModule)
- PYTHON_SYMBOL(PyRun_String)
- PYTHON_SYMBOL(PyRun_SimpleStringFlags)
- PYTHON_SYMBOL(PyType_IsSubtype)
-
- // special case of Py_InitModule() which has different names in different
- // Python builds
- {
-#ifdef Py_TRACE_REFS
- "Py_InitModule4TraceRefs",
-#elif SIZEOF_SIZE_T != SIZEOF_INT
- "Py_InitModule4_64",
-#else
- "Py_InitModule4",
-#endif
- (PYTHON_PROC *)&M_Py_InitModule4
- },
-
- { "", NULL }
-};
-
-// the handle of Python DLL
-static wxDllType gs_dllPython = 0;
-
-// ----------------------------------------------------------------------------
-// public API
-// ----------------------------------------------------------------------------
-
-extern bool InitPythonDll()
-{
- CHECK( !gs_dllPython, true, _T("shouldn't be called more than once") );
-
- // supported Python versions: probably not all of them (still) work,
- // currently only 2.[45] under Linux and 2.6 under Windows are really known
- // to work
- static const struct PythonVersion
- {
- int major,
- minor;
- } pythonVersions[] =
- {
- { 1, 5 },
- { 2, 0 },
- { 2, 2 },
- { 2, 4 },
- { 2, 5 },
- { 2, 6 },
- };
-
- // load the library
- wxDynamicLibrary dllPython;
-
- String pathDLL = READ_APPCONFIG(MP_PYTHONDLL);
- if ( !pathDLL.empty() )
- {
- // directly use the Python DLL configured by the user
- dllPython.Load(pathDLL);
- }
- else // try to find the DLL ourselves
- {
- // don't give errors about missing DLL here
- wxLogNull noLog;
-
- const String ext = wxDynamicLibrary::GetDllExt();
-
- // try all supported versions starting with the most recent one
- for ( size_t nVer = WXSIZEOF(pythonVersions); nVer > 0; nVer-- )
- {
- const PythonVersion& ver = pythonVersions[nVer - 1];
- String name = GetPythonDllBaseName(ver.major, ver.minor);
-
- if ( dllPython.Load(name + ext) )
- break;
- }
- }
-
- if ( !dllPython.IsLoaded() )
- {
- if ( pathDLL.empty() )
- wxLogError(_("No suitable Python DLL could be found."));
- else
- wxLogError(_("Python DLL \"%s\" couldn't be loaded."), pathDLL);
-
- return false;
- }
-
- // load all functions
- PythonFunc *pf = pythonFuncs;
- while ( pf->ptr )
- {
- void *funcptr = dllPython.GetSymbol(pf->name);
-
- if ( !funcptr )
- {
- // error message is already given by GetSymbol()
- FreePythonDll();
-
- return false;
- }
-
- *(pf++->ptr) = (PYTHON_PROC)funcptr;
- }
-
- gs_dllPython = dllPython.Detach();
-
- return true;
-}
-
-extern void FreePythonDll()
-{
- if ( gs_dllPython )
- {
- wxDynamicLibrary::Unload(gs_dllPython);
- gs_dllPython = 0;
- }
-}
-
-#endif // USE_PYTHON_DYNAMIC
-
diff --git a/src/gui/wxOptionsDlg.cpp b/src/gui/wxOptionsDlg.cpp
index ff2c8d40..0ac02eee 100644
--- a/src/gui/wxOptionsDlg.cpp
+++ b/src/gui/wxOptionsDlg.cpp
@@ -72,7 +72,6 @@
#include "FolderView.h"
#include "TemplateDialog.h"
-#include "MPython.h" // defines USE_PYTHON_DYNAMIC
#include "InitPython.h"
#include "ColourNames.h"
@@ -354,10 +353,6 @@ enum ConfigFields
ConfigField_PythonFirst = ConfigField_FoldersLast,
ConfigField_Python_HelpText,
ConfigField_EnablePython,
-#ifdef USE_PYTHON_DYNAMIC
- ConfigField_PythonDll_Help,
- ConfigField_PythonDll,
-#endif // USE_PYTHON_DYNAMIC
ConfigField_PythonPath_Help,
ConfigField_PythonPath,
ConfigField_PythonModuleToLoad_Help,
@@ -1500,14 +1495,6 @@ const wxOptionsPage::FieldInfo wxOptionsPageStandard::ms_aFields[] =
Field_AppWide, -1 },
{ gettext_noop("&Enable Python"), Field_Bool |
Field_AppWide, -1, },
-#ifdef USE_PYTHON_DYNAMIC
- { gettext_noop("If Mahogany can't find Python shared library in one of\n"
- "the standard locations, you may enter full path to it here\n"),
- Field_Message |
- Field_AppWide, ConfigField_EnablePython },
- { gettext_noop("Python &DLL"), Field_File |
- Field_AppWide, ConfigField_EnablePython },
-#endif // USE_PYTHON_DYNAMIC
{ gettext_noop("The option below determines where Mahogany should look for\n"
"Python modules (in addition to standard places)"), Field_Message |
Field_AppWide, ConfigField_EnablePython },
@@ -2162,10 +2149,6 @@ const ConfigValueDefault wxOptionsPageStandard::ms_aConfigDefaults[] =
#ifdef USE_PYTHON
CONFIG_NONE(),
CONFIG_ENTRY(MP_USEPYTHON),
-#ifdef USE_PYTHON_DYNAMIC
- CONFIG_NONE(),
- CONFIG_ENTRY(MP_PYTHONDLL),
-#endif // USE_PYTHON_DYNAMIC
CONFIG_NONE(),
CONFIG_ENTRY(MP_PYTHONPATH),
CONFIG_NONE(),
commit 1332f9adccc91bd66699992d85bb2adb8f9cc235
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Mar 30 17:24:32 2024 +0100
Work around listing update problems with wxGTK/Wayland
Somehow, refreshing items directly from the idle event handler didn't
work when using Wayland: they were refreshed and repainted, but the
results didn't appear on the screen, unlike when using X11 (or MSW for
that matter).
Work around it by calling RefreshItems() later: this shouldn't normally
change anything, but it does fix the problem.
See https://github.com/wxWidgets/wxWidgets/issues/24443
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 5866470b..2cd7829f 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -2601,7 +2601,12 @@ void wxFolderListCtrl::OnIdle(wxIdleEvent& event)
// now the header info should be in cache, so GetHeaderInfo() will
// return it
- RefreshItems(posMin, posMax);
+ //
+ // don't call RefreshItems() from here because it somehow doesn't work,
+ // see https://github.com/wxWidgets/wxWidgets/issues/24443
+ CallAfter([this, posMin, posMax]() {
+ RefreshItems(posMin, posMax);
+ });
}
}
commit 7dc61e5df661fd3fd90395b7922ccc9ba7d24088
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Mar 30 17:23:23 2024 +0100
Avoid reentrancies in wxFolderListCtrl with wxGTK
We could call GetHeaderInfo() from inside CachePositions() which was
definitely unexpected even if it's unclear if it was actually harmful,
so don't do it.
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 11d8c5e7..5866470b 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -2992,6 +2992,13 @@ wxString wxFolderListCtrl::OnGetItemText(long item, long column) const
return text;
}
+ // We can get here if the window is being repainted while some other
+ // operation is already being executed, notably under wxGTK calling
+ // wxLogStatus(), as done by HeaderInfoList, results in wxEVT_PAINT
+ // generation.
+ if ( m_mutexHeaders.IsLocked() || !mApplication->AllowBgProcessing() )
+ return text;
+
HeaderInfo *hi = GetHeaderInfo((size_t)item);
if ( !hi )
{
commit dce8a08344eeee58b79365683a7ae4f01fe43898
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Mar 30 17:22:33 2024 +0100
Use the same email for all commits by Vadim Zeitlin
Map "vadim" email accidentally used for some commits ot "vz-mahogany"
one used for most of them.
diff --git a/.mailmap b/.mailmap
index 333d359f..913709bc 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,2 +1,3 @@
Nerijus Baliūnas <ne...@us...> Nerijus Baliunas <ne...@us...>
Nerijus Baliūnas <ne...@us...> Nerijus <ne...@ne...>
+Vadim Zeitlin <vz-...@ze...> Vadim Zeitlin <va...@ze...>
commit eda0a65555519761ac608c6d509ee13201ebefa4
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Mar 30 17:20:57 2024 +0100
Fix typo in a comment in wxFolderListCtrl
No real changes.
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 109dbf90..11d8c5e7 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -2433,7 +2433,7 @@ HeaderInfo *wxFolderListCtrl::GetHeaderInfo(size_t index) const
if ( !m_headers->Count() )
{
- // this probably menas that we lost the connection unexpectedly
+ // this probably means that we lost the connection unexpectedly
return NULL;
}
}
-----------------------------------------------------------------------
Summary of changes:
.mailmap | 1 +
acinclude.m4 | 37 ----
configure.ac | 141 ++-----------
include/MPython.h | 379 ----------------------------------
include/config.h.in | 3 -
src/Python/InitPython.cpp | 14 --
src/Python/Names.mk | 2 +-
src/Python/PythonDll.cpp | 506 ----------------------------------------------
src/gui/wxFolderView.cpp | 16 +-
src/gui/wxOptionsDlg.cpp | 17 --
10 files changed, 32 insertions(+), 1084 deletions(-)
delete mode 100644 src/Python/PythonDll.cpp
hooks/post-receive
--
Mahogany sources repository.
|
|
From: vadz <mah...@us...> - 2023-09-19 16:14:50
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 2cea6d1be3661a1029ace9cd27de7a47cc07e9cd (commit)
via 9cbf607726014dd3cb86fb261193b213a6adbd8c (commit)
via d65955f3db1b4f650a2aab50ba1cfa803b6bb1a6 (commit)
via b8875f4d5dd62165c0b1642452f699fb6076e7c5 (commit)
via 4b39405e268dd56dfaf0448b8316dd6cff5eea1d (commit)
via 13453cfafc9e0775d44bc0cd9f0ac1fc4ef12d94 (commit)
via 01e50709c305c21913803905347bfbd535ad6fd5 (commit)
via f7a43f1f8080357555c9f14c9bd88a44638db1bc (commit)
via d34c249f70ed5f302789b5ab40d18b2875768b8c (commit)
via 466ad2c0277a25d730c524e8554d558557f374d1 (commit)
from 403f3c88baa7e085a2b3eb311e66e2cc20d8a509 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2cea6d1be3661a1029ace9cd27de7a47cc07e9cd
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Sep 19 18:12:06 2023 +0200
Fix comparing "From" addresses containing commas with own ones
Using AddressList was wrong here as it's supposed to be used with the
raw header values and the value we get here is already decoded, so
parsing it using the RFC 822 rules doesn't work correctly if it contains
any commas, for example, as they are address separators when decoded,
but can be included in the encoded form.
This fixes spurious warning messages about "Must use commas to separate
addresses" and wrong comparison results for the (decoded) address of the
form "Foo, Bar <fo...@ba...>".
This commit is best viewed ignoring whitespace-only changes.
diff --git a/src/mail/HeaderInfoImpl.cpp b/src/mail/HeaderInfoImpl.cpp
index feccab01..f204137a 100644
--- a/src/mail/HeaderInfoImpl.cpp
+++ b/src/mail/HeaderInfoImpl.cpp
@@ -405,38 +405,30 @@ HeaderInfo::GetFromOrTo(const HeaderInfo *hi,
// the user himself
if ( replaceFromWithTo )
{
- size_t nAdrCount = ownAddresses.GetCount();
- if ( nAdrCount )
+ for ( const auto& ownAddress : ownAddresses )
{
- AddressList_obj addrList(*value);
- const Address* const addr = addrList->GetFirst();
- if ( addr )
+ // Allow the use of wildcards, e.g. to support own addresses of
+ // the form "localpart+*@domain", and match them anywhere inside the
+ // header for simplicity (otherwise we'd have to extract the email
+ // part of it for matching).
+ if ( value->Matches("*" + ownAddress + "*") )
{
- const String email = addr->GetEMail();
- for ( size_t nAdr = 0; nAdr < nAdrCount; nAdr++ )
+ // sender is the user himself, do the replacement
+ *value = hi->GetTo();
+
+ if ( value->empty() )
{
- // Allow the use of wildcards, e.g. to support own addresses of
- // the form "localpart+*@domain".
- if ( email.Matches(ownAddresses[nAdr]) )
+ // hmm, must be a newsgroup message
+ String ng = hi->GetNewsgroups();
+ if ( !ng.empty() )
{
- // sender is the user himself, do the replacement
- *value = hi->GetTo();
-
- if ( value->empty() )
- {
- // hmm, must be a newsgroup message
- String ng = hi->GetNewsgroups();
- if ( !ng.empty() )
- {
- *value = ng;
- return Newsgroup;
- }
- //else: weird, both to and newsgroup are empty??
- }
-
- return To;
+ *value = ng;
+ return Newsgroup;
}
+ //else: weird, both to and newsgroup are empty??
}
+
+ return To;
}
}
}
commit 9cbf607726014dd3cb86fb261193b213a6adbd8c
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Sep 15 14:26:45 2023 +0200
Use the same name and email for all Nerijus's commits
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 00000000..333d359f
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,2 @@
+Nerijus Baliūnas <ne...@us...> Nerijus Baliunas <ne...@us...>
+Nerijus Baliūnas <ne...@us...> Nerijus <ne...@ne...>
commit d65955f3db1b4f650a2aab50ba1cfa803b6bb1a6
Author: Vadim Zeitlin <va...@ze...>
Date: Fri Sep 15 14:23:08 2023 +0200
Remove now unused SSL-related options
This should have been part of e4c01c74 (Always link with OpenSSL
libraries under Unix, 2023-07-31): as we never load SSL libraries during
run-time any more, we don't need the options specifying the libraries to
load neither.
diff --git a/doc/tech/config.txt b/doc/tech/config.txt
index cf7c484a..2665c6b1 100644
--- a/doc/tech/config.txt
+++ b/doc/tech/config.txt
@@ -227,8 +227,6 @@ MP_SMTPHOST_PASSWORD MailHostPw ""
MP_SMTPHOST_USE_SSL MailHostSSL 0l
MP_SPLASHDELAY SplashDelay 5
MP_SSH_PATH SshPath "ssh"
-MP_SSL_DLL_CRYPTO CryptoDll "libcrypto.dll" or "libcrypto.so.0"
-MP_SSL_DLL_SSL SSLDll "libssl.dll" or "libssl.so.0"
MP_STARTUPSCRIPT StartupScript "Minit"
MP_SYNC_DATE SyncDate 0L
MP_SYNC_FILTERS SyncFilters 0L
diff --git a/include/Moptions.h b/include/Moptions.h
index 4b4b12a6..c00ad4ce 100644
--- a/include/Moptions.h
+++ b/include/Moptions.h
@@ -383,8 +383,6 @@ extern const MOption MP_AUTOCOLLECT_ADB;
extern const MOption MP_AUTOCOLLECT_NAMED;
extern const MOption MP_AUTOCOLLECT_SENDER;
extern const MOption MP_AUTOCOLLECT_OUTGOING;
-extern const MOption MP_SSL_DLL_SSL;
-extern const MOption MP_SSL_DLL_CRYPTO;
extern const MOption MP_INCFAX_SUPPORT;
extern const MOption MP_INCFAX_DOMAINS;
extern const MOption MP_ADB_SUBSTRINGEXPANSION;
diff --git a/src/classes/Moptions.cpp b/src/classes/Moptions.cpp
index 4f9d73ed..869ba492 100644
--- a/src/classes/Moptions.cpp
+++ b/src/classes/Moptions.cpp
@@ -443,8 +443,6 @@ const MOption MP_AUTOCOLLECT_SENDER;
const MOption MP_AUTOCOLLECT_OUTGOING;
const MOption MP_AUTOCOLLECT_NAMED;
-const MOption MP_SSL_DLL_SSL;
-const MOption MP_SSL_DLL_CRYPTO;
const MOption MP_INCFAX_SUPPORT;
const MOption MP_INCFAX_DOMAINS;
const MOption MP_ADB_SUBSTRINGEXPANSION;
@@ -864,8 +862,6 @@ static const MOptionData MOptions[] =
DEFINE_OPTION(MP_AUTOCOLLECT_SENDER),
DEFINE_OPTION(MP_AUTOCOLLECT_OUTGOING),
DEFINE_OPTION(MP_AUTOCOLLECT_NAMED),
- DEFINE_OPTION(MP_SSL_DLL_SSL),
- DEFINE_OPTION(MP_SSL_DLL_CRYPTO),
DEFINE_OPTION(MP_INCFAX_SUPPORT),
DEFINE_OPTION(MP_INCFAX_DOMAINS),
DEFINE_OPTION(MP_ADB_SUBSTRINGEXPANSION),
diff --git a/src/gui/wxOptionsDlg.cpp b/src/gui/wxOptionsDlg.cpp
index 1eff6af7..ff2c8d40 100644
--- a/src/gui/wxOptionsDlg.cpp
+++ b/src/gui/wxOptionsDlg.cpp
@@ -557,13 +557,6 @@ enum ConfigFields
ConfigField_ExternalEditor,
ConfigField_AutoLaunchExtEditor,
-#ifdef USE_OPENSSL
- ConfigField_HelpersSkip4,
- ConfigField_SslHelp,
- ConfigField_SslDllName,
- ConfigField_CryptoDllName,
-#endif // USE_OPENSSL
-
ConfigField_HelpersSkip5,
ConfigField_PGPHelp,
ConfigField_PGPCommand,
@@ -1839,16 +1832,6 @@ const wxOptionsPage::FieldInfo wxOptionsPageStandard::ms_aFields[] =
{ gettext_noop("&External editor"), Field_File, -1 },
{ gettext_noop("Always &use it"), Field_Bool, ConfigField_ExternalEditor },
-#ifdef USE_OPENSSL
- { "", Field_Message, -1 },
- { gettext_noop("Mahogany can use SSL (Secure Sockets Layer) for secure, encrypted\n"
- "communications, if you have the libssl and libcrypto shared libraries\n"
- "(DLLs) on your system."),
- Field_Message, -1 },
- { gettext_noop("Location of lib&ssl"), Field_File, -1 },
- { gettext_noop("Location of libcr&ypto"), Field_File, -1 },
-#endif // USE_OPENSSL
-
{ "", Field_Message, -1 },
{ gettext_noop("GNU Privacy Guard or a compatible program may be used to verify the\n"
"cryptographic signatures of the messages you receive and decrypt them.\n"
@@ -2366,12 +2349,7 @@ const ConfigValueDefault wxOptionsPageStandard::ms_aConfigDefaults[] =
CONFIG_NONE(),
CONFIG_ENTRY(MP_EXTERNALEDITOR),
CONFIG_ENTRY(MP_ALWAYS_USE_EXTERNALEDITOR),
-#ifdef USE_OPENSSL
- CONFIG_NONE(),
- CONFIG_NONE(),
- CONFIG_ENTRY(MP_SSL_DLL_SSL),
- CONFIG_ENTRY(MP_SSL_DLL_CRYPTO),
-#endif // USE_OPENSSL
+
CONFIG_NONE(),
CONFIG_NONE(), // PGP help
CONFIG_ENTRY(MP_PGP_COMMAND),
commit b8875f4d5dd62165c0b1642452f699fb6076e7c5
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Aug 29 00:49:30 2023 +0200
Fold "References:" header in the sent messages properly
This should be done for all headers, but for now do it just for this one
as it's the only one which can become longer than 998 characters in
practice.
diff --git a/src/mail/SendMessageCC.cpp b/src/mail/SendMessageCC.cpp
index b7d4e217..4c4eaac2 100644
--- a/src/mail/SendMessageCC.cpp
+++ b/src/mail/SendMessageCC.cpp
@@ -2261,6 +2261,58 @@ long Rfc822OutputRedirector::FullRfc822Output(char *headers,
{
for ( size_t n = 0; ms_HeaderNames[n]; n++ )
{
+ // We should wrap all headers, but this might break something, so wrap
+ // just the one which regularly gets too long to fit the maximum
+ // message line length (998 bytes).
+ constexpr const char* REFERENCES_HEADER = "References";
+
+ if ( strcmp(ms_HeaderNames[n], REFERENCES_HEADER) == 0 )
+ {
+ // Note that we don't bother null-terminating headers while we're
+ // inside this block, we just do it once at the end. The pointer is
+ // just always positioned at the end of the string, as done here.
+ headers += strlen(headers);
+
+ auto output = [&headers](const char* s, size_t len = 0)
+ {
+ if ( !len )
+ len = strlen(s);
+ memcpy(headers, s, len);
+ headers += len;
+ };
+
+ output(REFERENCES_HEADER);
+ output(": ");
+
+ const char* value = ms_HeaderValues[n];
+ for ( ;; )
+ {
+ auto space = strchr(value, ' ');
+ if ( !space )
+ {
+ // Output the rest of the header.
+ output(value);
+ output("\r\n");
+
+ break;
+ }
+
+ // Output just the part until the next space and add a
+ // continuation line.
+ output(value, space - value);
+ output("\r\n "); // Same indent as c-client RFC822BUFFER.
+
+ value = space;
+ while ( isspace(*value) )
+ value++;
+ }
+
+ *headers = '\0';
+
+ // Skip generic case below.
+ continue;
+ }
+
rfc822_header_line(&headers,
const_cast<char *>(ms_HeaderNames[n]),
env,
commit 4b39405e268dd56dfaf0448b8316dd6cff5eea1d
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Aug 28 23:59:58 2023 +0200
Fix constructing "References" header in replies
This was broken since a very long time (and possibly ever) because
multiline "References:" in the original message were collapsed into a
single line, without any spaces between them.
Use HeaderIterator::MultiLineOk if the headers being retrieved includes
"References" to preserve the original header structure.
This is not ideal but at least doesn't mangle the header in the replies
any longer.
diff --git a/src/mail/MessageCC.cpp b/src/mail/MessageCC.cpp
index 55a4ac37..9cf67a28 100644
--- a/src/mail/MessageCC.cpp
+++ b/src/mail/MessageCC.cpp
@@ -270,6 +270,11 @@ wxArrayString
MessageCC::GetHeaderLines(const char **headersOrig,
wxArrayInt *encodings) const
{
+ // Some headers have to be returned as multiline, but others must always be
+ // on the same line. This should probably be specified by caller, but for
+ // now decide what to do ourselves here depending on the headers requests.
+ int flags = HeaderIterator::Collapse;
+
// loop variable for iterating over headersOrig
const char **headers;
@@ -279,6 +284,13 @@ MessageCC::GetHeaderLines(const char **headersOrig,
wxArrayString values;
for ( headers = headersOrig; *headers; headers++ )
{
+ if ( strcmp(*headers, "References") == 0 )
+ {
+ // This header must be preserved as it can be too long to fit on a
+ // single line.
+ flags = HeaderIterator::MultiLineOk;
+ }
+
values.Add(wxEmptyString);
if ( encodings )
{
@@ -331,7 +343,7 @@ MessageCC::GetHeaderLines(const char **headersOrig,
// extract the headers values
HeaderIterator hdrIter(wxString::From8BitData(rc));
- hdrIter.GetAll(&names, &valuesInDisorder);
+ hdrIter.GetAll(&names, &valuesInDisorder, flags);
// and then copy the headers in order into the dst array
size_t nHdr = 0;
commit 13453cfafc9e0775d44bc0cd9f0ac1fc4ef12d94
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Aug 28 23:59:23 2023 +0200
Use proper end of line characters for multiline headers
Use "\r\n" and not just "\n".
diff --git a/src/mail/HeaderIterator.cpp b/src/mail/HeaderIterator.cpp
index 6de3b60e..9bf9ba9f 100644
--- a/src/mail/HeaderIterator.cpp
+++ b/src/mail/HeaderIterator.cpp
@@ -118,7 +118,7 @@ bool HeaderIterator::GetNext(String *name, String *value, int flags)
{
if ( flags & MultiLineOk )
{
- m_str += _T('\n');
+ m_str += "\r\n";
m_str += *m_pcCurrent;
}
commit 01e50709c305c21913803905347bfbd535ad6fd5
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Aug 28 23:58:22 2023 +0200
Show horizontal scrollbar in MTextDialog with wxGTK
Unlike in wxMSW, we need to specify wxTE_DONTWRAP explicitly to prevent
the text control from wrapping overlong lines.
Do it here as we want to see the text as it really is in e.g. raw email
text and not wrapped.
diff --git a/src/gui/wxTextDialog.cpp b/src/gui/wxTextDialog.cpp
index 0f758700..7db3076e 100644
--- a/src/gui/wxTextDialog.cpp
+++ b/src/gui/wxTextDialog.cpp
@@ -153,7 +153,8 @@ MTextDialog::MTextDialog(wxWindow *parent,
wxTE_MULTILINE |
wxTE_READONLY |
wxTE_NOHIDESEL |
- wxTE_RICH2);
+ wxTE_RICH2 |
+ wxTE_DONTWRAP);
// use fixed-width font and latin1 encoding in which all text is valid:
// without encoding information (which wouldn't make sense anyhow as we can
commit f7a43f1f8080357555c9f14c9bd88a44638db1bc
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Aug 23 15:28:25 2023 +0200
Adjust menu accelerators to work with GTK
Shift-Ctrl-U is intercepted by the IME and can't be used.
Shift-Ctrl-Del is not received for some other, unknown, reason.
diff --git a/src/gui/wxMenuDefs.cpp b/src/gui/wxMenuDefs.cpp
index f9bbdce0..6c13dbf9 100644
--- a/src/gui/wxMenuDefs.cpp
+++ b/src/gui/wxMenuDefs.cpp
@@ -435,10 +435,10 @@ static const MenuItemInfo g_aMenuItems[] =
{ WXMENU_MSG_FLAG, gettext_noop("&Flag as important\tCtrl-I"), gettext_noop("Mark message as flagged/unflagged") , wxITEM_NORMAL },
{ WXMENU_MSG_MARK_ANSWERED, gettext_noop("Mark ans&wered"), gettext_noop("Mark message as answered/not answered") , wxITEM_NORMAL },
{ WXMENU_MSG_MARK_READ, gettext_noop("Mark &read"), gettext_noop("Mark message as read"), wxITEM_NORMAL },
- { WXMENU_MSG_MARK_UNREAD, gettext_noop("Mar&k unread\tShift-Ctrl-U"), gettext_noop("Mark message as unread"), wxITEM_NORMAL },
+ { WXMENU_MSG_MARK_UNREAD, gettext_noop("Mar&k unread\tShift-Ctrl-+"), gettext_noop("Mark message as unread"), wxITEM_NORMAL },
{ WXMENU_SEPARATOR, "", "" , wxITEM_NORMAL },
{ WXMENU_SUBMENU, gettext_noop("&Spam"), "", wxITEM_NORMAL },
- { WXMENU_MSG_SPAM_MARK, gettext_noop("Dispose as &spam\tShift-Ctrl-Del"), gettext_noop("Classify the message as spam and treat it accordingly"), wxITEM_NORMAL },
+ { WXMENU_MSG_SPAM_MARK, gettext_noop("Dispose as &spam\tShift-Ctrl-_"), gettext_noop("Classify the message as spam and treat it accordingly"), wxITEM_NORMAL },
{ WXMENU_MSG_SPAM_UNMARK, gettext_noop("Mark as &ham"), gettext_noop("Classify the message as non-spam"), wxITEM_NORMAL },
{ WXMENU_MSG_SPAM_CHECK, gettext_noop("Chec&k message...\tShift-Ctrl-K"), gettext_noop("Check if this message is spam"), wxITEM_NORMAL },
{ WXMENU_SUBMENU, "", "", wxITEM_NORMAL },
commit d34c249f70ed5f302789b5ab40d18b2875768b8c
Author: Vadim Zeitlin <va...@ze...>
Date: Wed Aug 23 15:51:18 2023 +0200
Remove unnecessary c_str() calls from wxLogXXX() etc in GUI code
Don't call c_str() explicitly, this is unnecessary since wx 3.0 and just
results in extra verbosity and run-time overhead.
There are still many of probably unneeded such calls left, but remove at
least those that could be trivially removed.
diff --git a/src/gui/ClickURL.cpp b/src/gui/ClickURL.cpp
index f6504756..0a45fd50 100644
--- a/src/gui/ClickURL.cpp
+++ b/src/gui/ClickURL.cpp
@@ -220,7 +220,7 @@ UrlPopup::OnCommandEvent(wxCommandEvent &event)
if ( !addr )
{
wxLogError(_("Failed to parse address \"%s\""),
- m_clickableURL->GetUrl().c_str());
+ m_clickableURL->GetUrl());
break;
}
@@ -239,8 +239,7 @@ UrlPopup::OnCommandEvent(wxCommandEvent &event)
READ_CONFIG(profile, MP_WHITE_LIST)));
if ( whitelist.Index(str) != wxNOT_FOUND )
{
- wxLogStatus(frame, _("\"%s\" is already in the white list"),
- str.c_str());
+ wxLogStatus(frame, _("\"%s\" is already in the white list"), str);
break;
}
@@ -248,7 +247,7 @@ UrlPopup::OnCommandEvent(wxCommandEvent &event)
profile->writeEntry(MP_WHITE_LIST, strutil_flatten_array(whitelist));
- wxLogStatus(frame, _("Added \"%s\" to the white list"), str.c_str());
+ wxLogStatus(frame, _("Added \"%s\" to the white list"), str);
}
break;
@@ -377,7 +376,7 @@ void ClickableURL::OpenInBrowser(int options) const
bool anotherBrowser = (options & URLOpen_Other) != 0;
wxFrame *frame = m_msgView->GetParentFrame();
- wxLogStatus(frame, _("Opening URL '%s'..."), m_url.c_str());
+ wxLogStatus(frame, _("Opening URL '%s'..."), m_url);
MBusyCursor bc;
@@ -433,8 +432,7 @@ void ClickableURL::OpenInBrowser(int options) const
if ( !command.empty() )
{
wxString errmsg;
- errmsg.Printf(_("Could not launch browser: '%s' failed."),
- command.c_str());
+ errmsg.Printf(_("Could not launch browser: '%s' failed."), command);
bOk = m_msgView->LaunchProcess(command, errmsg);
}
else // easy case: open in the same window
@@ -473,8 +471,7 @@ void ClickableURL::OpenInBrowser(int options) const
command = ExpandExternalCommand(browser, m_url);
wxString errmsg;
- errmsg.Printf(_("Couldn't launch browser: '%s' failed"),
- command.c_str());
+ errmsg.Printf(_("Couldn't launch browser: '%s' failed"), command);
bOk = m_msgView->LaunchProcess(command, errmsg);
}
@@ -482,11 +479,11 @@ void ClickableURL::OpenInBrowser(int options) const
if ( bOk )
{
- wxLogStatus(frame, _("Opening URL '%s'... done."), m_url.c_str());
+ wxLogStatus(frame, _("Opening URL '%s'... done."), m_url);
}
else
{
- wxLogStatus(frame, _("Opening URL '%s' failed."), m_url.c_str());
+ wxLogStatus(frame, _("Opening URL '%s' failed."), m_url);
}
}
diff --git a/src/gui/CreateFolderWizard.cpp b/src/gui/CreateFolderWizard.cpp
index d4a35b2b..ca37f8e8 100644
--- a/src/gui/CreateFolderWizard.cpp
+++ b/src/gui/CreateFolderWizard.cpp
@@ -557,7 +557,7 @@ MWizard_CreateFolder_ServerPage(MWizard *wizard,
"it here you will be asked for it later.");
}
- text.Printf(msg, entry.c_str());
+ text.Printf(msg, entry);
}
wxStaticText *msgCtrl = new wxStaticText(this, -1, text);
@@ -747,7 +747,7 @@ MWizard_CreateFolder_ServerPage::TransferDataFromWindow()
{
wxLogError(_("The path '%s' is invalid for a MH folder. All MH "
"folders should be under the directory '%s'."),
- name.c_str(), root.c_str());
+ name, root);
return false;
}
@@ -994,7 +994,7 @@ MWizard_CreateFolder_FinalPage::MWizard_CreateFolder_FinalPage(MWizard *wizard)
"the folder properties dialog later. Simply\n"
"click the right mouse button on the\n"
"entry in the tree and choose \"Properties\"."
- ), params->m_Name.c_str());
+ ), params->m_Name);
MFolderType ftype = params->m_FolderType;
if ( ftype != MF_ILLEGAL &&
diff --git a/src/gui/MImport.cpp b/src/gui/MImport.cpp
index 6d7a5a72..5508a09f 100644
--- a/src/gui/MImport.cpp
+++ b/src/gui/MImport.cpp
@@ -148,7 +148,7 @@ public:
const wxLongLong t = info.timestampMS;
m_dialog->GetLogListBox()->Append(
wxString::Format(_T("%s:\t%s"),
- wxDateTime(t).FormatTime().c_str(),
+ wxDateTime(t).FormatTime(),
szString)
);
}
@@ -409,8 +409,7 @@ static bool FindAllImporters(wxArrayImporters& importers,
}
else
{
- wxLogDebug(_T("Couldn't load importer module '%s'."),
- entry.GetName().c_str());
+ wxLogDebug(_T("Couldn't load importer module '%s'."), entry.GetName());
}
}
diff --git a/src/gui/wxAttachDialog.cpp b/src/gui/wxAttachDialog.cpp
index 83083574..358a890c 100644
--- a/src/gui/wxAttachDialog.cpp
+++ b/src/gui/wxAttachDialog.cpp
@@ -219,7 +219,7 @@ bool wxAttachmentDialog::TransferDataFromWindow()
propsNew.mimetype = strMime;
if ( !propsNew.mimetype.IsOk() )
{
- wxLogError(_("MIME type \"%s\" is illegal."), strMime.c_str());
+ wxLogError(_("MIME type \"%s\" is illegal."), strMime);
return false;
}
diff --git a/src/gui/wxColumnsDlg.cpp b/src/gui/wxColumnsDlg.cpp
index 2a5c2947..f7b77e1f 100644
--- a/src/gui/wxColumnsDlg.cpp
+++ b/src/gui/wxColumnsDlg.cpp
@@ -143,7 +143,7 @@ wxFolderViewColumnsDialog(const String& folderName,
: wxSelectionsOrderDialogSimple
(
_("&Select the columns to show:"),
- String::Format(_("Configure columns for '%s'"), folderName.c_str()),
+ String::Format(_("Configure columns for '%s'"), folderName),
names,
status,
_T("FolderViewCol"),
diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 06b730c3..817c8be6 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -1153,8 +1153,7 @@ AttachmentMenu::OnCommandEvent(wxCommandEvent &event)
const wxFileOffset len = file.Length();
if ( len == 0 )
{
- wxLogWarning(_("Attached file \"%s\" is empty"),
- filename.c_str());
+ wxLogWarning(_("Attached file \"%s\" is empty"), filename);
break;
}
@@ -1177,15 +1176,14 @@ AttachmentMenu::OnCommandEvent(wxCommandEvent &event)
if ( !ok )
{
- wxLogError(_("Failed to get data of attached file \"%s\"."),
- filename.c_str());
+ wxLogError(_("Failed to get data of attached file \"%s\"."), filename);
break;
}
MDialog_ShowText
(
GetFrame(m_window),
- wxString::Format(_("Attached file \"%s\""), filename.c_str()),
+ wxString::Format(_("Attached file \"%s\""), filename),
content,
"AttachView"
);
@@ -1975,7 +1973,7 @@ Composer::EditMessage(Profile *profile, Message *msg)
else // bad header format
{
wxLogDebug(_T("Corrupted ") HEADER_GEOMETRY _T(" header '%s'."),
- value.c_str());
+ value);
}
}
}
@@ -2168,7 +2166,7 @@ wxComposeView::~wxComposeView()
if ( !wxRemoveFile(m_filenameAutoSave) )
{
wxLogSysError(_("Failed to remove stale composer autosave file '%s'"),
- m_filenameAutoSave.c_str());
+ m_filenameAutoSave);
}
}
}
@@ -2602,7 +2600,7 @@ wxComposeView::CreateEditor()
wxLogError(_("Failed to load the default message editor '%s'.\n"
"\n"
"Builtin message editing will not work!"),
- nameFirst.c_str());
+ nameFirst);
}
}
@@ -2866,7 +2864,7 @@ wxComposeView::AddRecipient(const String& addr, RecipientType addrType)
wxLogStatus(this,
_("Address '%s' is already in the recipients list, "
"not added."),
- addr.c_str());
+ addr);
}
else // found with a different type
{
@@ -2878,7 +2876,7 @@ wxComposeView::AddRecipient(const String& addr, RecipientType addrType)
wxLogStatus(this,
_("Address '%s' was already in the recipients list "
"with a different type, just changed the type."),
- addr.c_str());
+ addr);
m_rcptExtra[n]->SetType(addrType);
}
@@ -2887,7 +2885,7 @@ wxComposeView::AddRecipient(const String& addr, RecipientType addrType)
wxLogStatus(this,
_("Address '%s' was already in the recipients list "
"with a different type, not added."),
- addr.c_str());
+ addr);
}
}
@@ -3298,7 +3296,7 @@ wxComposeView::DoInitText(Message *msgOrig)
wxLog::FlushActive();
msg.Printf(_("Couldn't read vCard file '%s'."),
- filename.c_str());
+ filename);
}
}
@@ -3746,12 +3744,11 @@ wxComposeView::OnMenuCommand(int id)
}
else if ( InsertFileAsText(filename, MessageEditor::Insert_Append) )
{
- wxLogStatus(this, _("Inserted file '%s'."), filename.c_str());
+ wxLogStatus(this, _("Inserted file '%s'."), filename);
}
else
{
- wxLogError(_("Failed to insert the text file '%s'."),
- filename.c_str());
+ wxLogError(_("Failed to insert the text file '%s'."), filename);
}
}
break;
@@ -3776,8 +3773,7 @@ wxComposeView::OnMenuCommand(int id)
// we have been saved
ResetDirty();
- wxLogStatus(this, _("Message text saved to file '%s'."),
- filename.c_str());
+ wxLogStatus(this, _("Message text saved to file '%s'."), filename);
}
else
{
@@ -3823,7 +3819,7 @@ wxComposeView::OnMenuCommand(int id)
//else: we will take it from the profile when we will send the msg
wxLogStatus(this, _("Added custom header '%s' to the message."),
- headerName.c_str());
+ headerName);
}
//else: cancelled
}
@@ -4001,7 +3997,7 @@ bool wxComposeView::StartExternalEditor()
if ( !m_pidEditor )
{
- wxLogError(_("Execution of '%s' failed."), command.c_str());
+ wxLogError(_("Execution of '%s' failed."), command);
}
else // editor launched
{
@@ -4090,7 +4086,7 @@ void wxComposeView::OnExtEditorTerm(wxProcessEvent& event)
{
if ( wxRemove(m_tmpFileName) != 0 )
{
- wxLogDebug(_T("Stale temp file '%s' left."), m_tmpFileName.c_str());
+ wxLogDebug(_T("Stale temp file '%s' left."), m_tmpFileName);
}
ok = true;
@@ -4119,8 +4115,7 @@ void wxComposeView::OnExtEditorTerm(wxProcessEvent& event)
if ( !ok )
{
- wxLogError(_("The text was left in the file '%s'."),
- m_tmpFileName.c_str());
+ wxLogError(_("The text was left in the file '%s'."), m_tmpFileName);
}
m_pidEditor = 0;
@@ -4261,8 +4256,7 @@ wxComposeView::InsertFile(const wxChar *fileName,
strMimeType = props.mimetype.GetFull();
DoInsertAttachment(mc, strMimeType);
- wxLogStatus(this, _("Inserted file '%s' (as '%s')"),
- filename.c_str(), strMimeType.c_str());
+ wxLogStatus(this, _("Inserted file '%s' (as '%s')"), filename, strMimeType);
}
@@ -4283,8 +4277,7 @@ wxComposeView::InsertFileAsText(const String& filename,
{
if ( insMode != MessageEditor::Insert_Replace )
{
- wxLogVerbose(_("File '%s' is empty, no text to insert."),
- filename.c_str());
+ wxLogVerbose(_("File '%s' is empty, no text to insert."), filename);
return true;
}
//else: replace old text with new (empty) one
@@ -4648,7 +4641,7 @@ bool wxComposeView::CheckForForgottenAttachments() const
"Please change it in the program options and reenable "
"the check for forgotten attachments there\n"
"as it will be temporarily disabled now."),
- reText.c_str()
+ reText
),
this
);
@@ -4834,8 +4827,8 @@ wxComposeView::EncodeText(const wxString& text,
_("Text of this message can't be converted "
"to the encoding \"%s\", would you like "
" to send it in encoding \"%s\" instead?"),
- wxFontMapper::GetEncodingName(m_encoding).c_str(),
- wxFontMapper::GetEncodingName(encodingPart).c_str()
+ wxFontMapper::GetEncodingName(m_encoding),
+ wxFontMapper::GetEncodingName(encodingPart)
),
this,
MDIALOG_YESNOTITLE,
@@ -4871,8 +4864,7 @@ wxComposeView::EncodeText(const wxString& text,
_("Text of this message can't be converted "
"to the encoding \"%s\", would you like "
"to send it in UTF-8 instead?"),
- wxFontMapper::
- GetEncodingName(encodingPart).c_str()
+ wxFontMapper::GetEncodingName(encodingPart)
),
this,
MDIALOG_YESNOTITLE,
@@ -5023,7 +5015,7 @@ wxComposeView::BuildMessage(int flags) const
else if ( flags & Interactive )
{
wxLogError(_("Cannot read file '%s' included in "
- "this message!"), filename.c_str());
+ "this message!"), filename);
}
delete [] buffer;
@@ -5031,7 +5023,7 @@ wxComposeView::BuildMessage(int flags) const
else if ( flags & Interactive )
{
wxLogError(_("Cannot open file '%s' included in "
- "this message!"), filename.c_str());
+ "this message!"), filename);
}
if ( !partOk )
@@ -5322,7 +5314,7 @@ void wxComposeView::OnSendResult(const SendThreadResult& res)
if ( res.outbox.empty() )
{
s.Printf(_("Message has been posted to %s"),
- GetRecipients(Recipient_Newsgroup).c_str());
+ GetRecipients(Recipient_Newsgroup));
}
else
{
@@ -5335,13 +5327,13 @@ void wxComposeView::OnSendResult(const SendThreadResult& res)
{
// NB: don't show BCC as the message might be saved in the log file
s.Printf(_("Message has been sent to %s"),
- GetRecipients(Recipient_To).c_str());
+ GetRecipients(Recipient_To));
String rcptCC = GetRecipients(Recipient_Cc);
if ( !rcptCC.empty() )
{
s += String::Format(_(" (with courtesy copy sent to %s)"),
- rcptCC.c_str());
+ rcptCC);
}
else // no CC
{
@@ -5355,7 +5347,7 @@ void wxComposeView::OnSendResult(const SendThreadResult& res)
}
// avoid crashes if the message has any stray '%'s
- wxLogStatus(this, _T("%s"), s.c_str());
+ wxLogStatus(this, _T("%s"), s);
// we can now safely remove the draft message, if any
DeleteDraft();
@@ -5710,7 +5702,7 @@ bool wxComposeView::DeleteDraft()
if ( !mf->DeleteMessage(m_DraftMessage->GetUId()) )
{
wxLogError(_("Failed to delete the original draft message from "
- "the folder '%s'."), mf->GetName().c_str());
+ "the folder '%s'."), mf->GetName());
return false;
}
@@ -5849,7 +5841,7 @@ bool wxComposeView::SaveAsDraft() const
_("Your message has been saved in the folder '%s',\n"
"simply open it and choose \"Message|Edit in composer\" to\n"
"continue writing it."),
- nameDrafts.c_str()
+ nameDrafts
),
self->GetFrame(),
M_MSGBOX_DRAFT_SAVED,
@@ -5907,13 +5899,13 @@ wxComposeView::AutoSave()
if ( !wxMkdir(name, 0700) )
{
wxLogSysError(_("Failed to create the directory '%s' for the "
- "temporary composer files"), name.c_str());
+ "temporary composer files"), name);
wxLogError(_("Composer messages won't be saved automatically "
"for the duration of this session.\n"
"Please make sure that Mahogany can create the "
"directory \"%s\" and restart the program."),
- name.c_str());
+ name);
s_autosaveEnabled = false;
return false;
@@ -6046,7 +6038,7 @@ bool Composer::RestoreAll()
}
wxLogError(_("Failed to resume composing the message from file '%s'"),
- filename.c_str());
+ filename);
}
if ( nResumed )
diff --git a/src/gui/wxFiltersDialog.cpp b/src/gui/wxFiltersDialog.cpp
index 77201e02..792b4fc0 100644
--- a/src/gui/wxFiltersDialog.cpp
+++ b/src/gui/wxFiltersDialog.cpp
@@ -1817,7 +1817,7 @@ wxAllFiltersDialog::OnAddFiter(wxCommandEvent& /* event */)
"a folder to which you'd like to assign this filter\n"
"right now (otherwise you can do it later by using\n"
"the \"Filters\" entry in the \"Folder\" menu)?"),
- name.c_str());
+ name);
if ( MDialog_YesNoDialog(msg,
this,
@@ -2000,7 +2000,7 @@ wxAllFiltersDialog::DoCopyFilter(const wxString& nameOld,
String msg;
msg.Printf(_("Filter '%s' already exists, are you sure you want "
"to overwrite it with the filter '%s'?"),
- nameOld.c_str(), nameNew.c_str());
+ nameOld, nameNew);
if ( !MDialog_YesNoDialog(msg,
this,
_("Overwrite filter?"),
@@ -2098,7 +2098,7 @@ public:
m_filterNames(filterNames)
{
SetTitle(String::Format(_("Filters copying messages to \"%s\""),
- folderName.c_str()));
+ folderName));
}
virtual bool TransferDataToWindow()
@@ -2136,7 +2136,7 @@ private:
static String GetCaption(MFolder *folder)
{
return wxString::Format(_("Configure filters for '%s'"),
- folder->GetName().c_str());
+ folder->GetName());
}
// the folder which we are working with
@@ -2773,7 +2773,7 @@ bool wxQuickFilterDialog::TransferDataFromWindow()
wxLogWarning(_("Only a single sender address can be specified "
"here, \"%s\" will be used and the rest of "
"the sender string will be ignored."),
- addr->GetAddress().c_str());
+ addr->GetAddress());
}
const String& email = addr->GetEMail();
@@ -2913,7 +2913,7 @@ static String CreateNewFilter(wxWindow *parent, ConfigSource *config)
{
String msg;
msg.Printf(_("The filter '%s' already exists, do you want "
- "to replace it?"), name.c_str());
+ "to replace it?"), name);
if ( !MDialog_YesNoDialog(msg, parent, _("Replace filter?"),
M_DLG_NO_DEFAULT,
M_MSGBOX_FILTER_REPLACE) )
@@ -3038,7 +3038,7 @@ extern bool FindFiltersForFolder(MFolder *folder, wxWindow *parent)
{
wxLogStatus(GetFrame(parent),
_("No filters copying messages to folder \"%s\" found."),
- fullname.c_str());
+ fullname);
return false;
}
diff --git a/src/gui/wxFolderTree.cpp b/src/gui/wxFolderTree.cpp
index 738dc9af..7cd1ba61 100644
--- a/src/gui/wxFolderTree.cpp
+++ b/src/gui/wxFolderTree.cpp
@@ -1026,7 +1026,7 @@ bool wxFolderTree::OnDelete(MFolder *folder, bool removeOnly)
if ( folder->GetFlags() & MF_FLAGS_DONTDELETE )
{
wxLogError(_("The folder '%s' is used by Mahogany and cannot be deleted"),
- folder->GetFullName().c_str());
+ folder->GetFullName());
return false;
}
@@ -1046,13 +1046,13 @@ bool wxFolderTree::OnDelete(MFolder *folder, bool removeOnly)
{
msg.Printf(_("Do you really want to remove folder '%s' and all of its\n"
"subfolders? You will permanently lose all the settings\n"
- "for the removed folders!"), folder->GetName().c_str());
+ "for the removed folders!"), folder->GetName());
}
else // remove and delete
{
msg.Printf(_("Do you really want to delete folder '%s' and all of its\n"
"subfolders? All messages contained in them will be "
- "permanently lost!"), folder->GetFullName().c_str());
+ "permanently lost!"), folder->GetFullName());
}
}
else
@@ -1064,13 +1064,13 @@ bool wxFolderTree::OnDelete(MFolder *folder, bool removeOnly)
msgbox = M_MSGBOX_CONFIRM_FOLDER_DELETE;
msg.Printf(_("Do you really want to remove folder '%s'?"),
- folder->GetFullName().c_str());
+ folder->GetFullName());
}
else // remove and delete
{
msg.Printf(_("Do you really want to delete folder '%s' with\n"
"all the messages contained in it?"),
- folder->GetFullName().c_str());
+ folder->GetFullName());
}
}
@@ -1094,7 +1094,7 @@ bool wxFolderTree::OnDelete(MFolder *folder, bool removeOnly)
if ( !ok )
{
wxLogError(_("Failed to physically delete folder '%s'."),
- folder->GetFullName().c_str());
+ folder->GetFullName());
}
}
@@ -1133,7 +1133,7 @@ bool wxFolderTree::OnRename(MFolder *folder,
{
wxLogStatus(wxGetTopLevelParent(m_tree),
_("Successfully renamed folder '%s'."),
- folder->GetFullName().c_str());
+ folder->GetFullName());
}
else
{
@@ -1172,12 +1172,12 @@ bool wxFolderTree::OnMove(MFolder *folder,
{
wxLogStatus(wxGetTopLevelParent(m_tree),
_("Successfully moved folder '%s' to '%s'."),
- folder->GetFullName().c_str(), newParent->GetFullName().c_str());
+ folder->GetFullName(), newParent->GetFullName());
}
else
{
wxLogError(_("Failed to move the folder '%s' from '%s' to '%s'."),
- name.c_str(), oldPath.c_str(), newPath.c_str());
+ name, oldPath, newPath);
}
return false;
}
@@ -1191,7 +1191,7 @@ void wxFolderTree::OnClear(MFolder *folder)
"folder '%s'?\n"
"\n"
"Warning: it will be impossible to undelete them!"),
- fullname.c_str());
+ fullname);
wxWindow *parent = m_tree->wxWindow::GetParent();
@@ -1212,13 +1212,13 @@ void wxFolderTree::OnClear(MFolder *folder)
if ( n < 0 )
{
wxLogError(_("Failed to delete messages from folder '%s'."),
- fullname.c_str());
+ fullname);
}
else
{
wxLogStatus(GetFrame(parent),
- _("%lu messages were deleted from folder '%s'."),
- (unsigned long)n, fullname.c_str());
+ _("%ld messages were deleted from folder '%s'."),
+ n, fullname);
}
}
}
@@ -1232,13 +1232,13 @@ void wxFolderTree::OnUpdate(MFolder *folder)
if ( !MailFolder::CheckFolder(folder) )
{
wxLogError(_("Failed to update the status of the folder '%s'."),
- folder->GetFullName().c_str());
+ folder->GetFullName());
}
else
{
wxLogStatus(wxGetTopLevelParent(m_tree),
_("Updated status of the folder '%s'"),
- folder->GetFullName().c_str());
+ folder->GetFullName());
}
}
else // update subfolders
@@ -1268,7 +1268,7 @@ bool wxFolderTree::OnClose(MFolder *folder)
wxLogStatus(wxGetTopLevelParent(m_tree),
_("Folder '%s' closed."),
- folder->GetFullName().c_str());
+ folder->GetFullName());
m_tree->SetOpenFolderName(wxEmptyString);
@@ -1581,7 +1581,7 @@ void wxFolderTreeNode::UpdateShownStatus(wxTreeCtrl *tree,
{
if ( !ParseColourString(colorName, &col) )
{
- wxLogDebug(_T("Invalid colour string '%s'."), colorName.c_str());
+ wxLogDebug(_T("Invalid colour string '%s'."), colorName);
col = *wxBLACK;
}
}
@@ -1854,7 +1854,7 @@ void wxFolderTreeImpl::DoPopupMenu(const wxPoint& pos)
*menu = new FolderMenu(isRoot);
}
- (*menu)->SetTitle(wxString::Format(_("Folder '%s'"), title.c_str()));
+ (*menu)->SetTitle(wxString::Format(_("Folder '%s'"), title));
// some items (all WXMENU_FOLDEX_XXX ones) are taken care of there already
m_sink->UpdateMenu(*menu, folder);
@@ -1984,7 +1984,7 @@ bool wxFolderTreeImpl::CanRenameFolder(const MFolder *folder) const
else if ( folder->GetFlags() & MF_FLAGS_DONTDELETE )
{
wxLogError(_("The folder '%s' is used by Mahogany and cannot be renamed."),
- folder->GetName().c_str());
+ folder->GetName());
}
else
{
@@ -2135,7 +2135,7 @@ void wxFolderTreeImpl::DoFolderDelete(bool removeOnly)
}
wxLogStatus(GetFrame(this), _("Folder '%s' %s"),
- folder->GetName().c_str(),
+ folder->GetName(),
removeOnly ? _("removed from the tree")
: _("deleted"));
}
@@ -2657,7 +2657,7 @@ void wxFolderTreeImpl::OnTreeBeginDrag(wxTreeEvent& event)
{
wxLogStatus(GetFrame(this),
_("The folder \"%s\" cannot be moved."),
- folder->GetFullName().c_str());
+ folder->GetFullName());
return;
}
@@ -2710,15 +2710,15 @@ void wxFolderTreeImpl::OnTreeEndDrag(wxTreeEvent& event)
if ( !folderSrc->Move(folderDst) )
{
wxLogError(_("Failed to move the folder \"%s\" to \"%s\"."),
- folderSrc->GetFullName().c_str(),
- folderDst->GetFullName().c_str());
+ folderSrc->GetFullName(),
+ folderDst->GetFullName());
}
else // moved ok
{
wxLogStatus(GetFrame(this),
_("Successfully moved the folder \"%s\" to \"%s\"."),
- folderSrc->GetFullName().c_str(),
- folderDst->GetFullName().c_str());
+ folderSrc->GetFullName(),
+ folderDst->GetFullName());
}
}
}
@@ -3367,7 +3367,7 @@ ProcessFolderTreeChange(const MEventFolderTreeChangeData& event)
void wxFolderTreeImpl::ProcessMsgNumberChange(const wxString& folderName)
{
wxLogTrace(M_TRACE_MFSTATUS, _T("Folder tree: status changed for '%s'."),
- folderName.c_str());
+ folderName);
// check if we need to react to this event at all
// ----------------------------------------------
@@ -3418,7 +3418,7 @@ void wxFolderTreeImpl::ProcessMsgNumberChange(const wxString& folderName)
MailFolder_obj mf(MailFolder::GetOpenedFolderFor(folder));
if ( !mf )
{
- wxLogDebug(_T("Failed to update status for '%s'"), folderName.c_str());
+ wxLogDebug(_T("Failed to update status for '%s'"), folderName);
}
else
{
@@ -3487,7 +3487,7 @@ void wxFolderTreeImpl::ProcessMsgNumberChange(const wxString& folderName)
node->SetStatus(this, statusFormat, status);
wxLogTrace(M_TRACE_MFSTATUS, _T("Folder tree: updated status for '%s'"),
- folderName.c_str());
+ folderName);
}
// ----------------------------------------------------------------------------
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index ca16b3dc..109dbf90 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -1944,9 +1944,9 @@ void wxFolderListCtrl::OnColumnRightClick(wxListEvent& event)
String colName = GetColumnName(col).Lower();
menu.Append(WXMENU_FVIEW_SORT_BY_COL + col,
- wxString::Format(_("Sort by %s"), colName.c_str()));
+ wxString::Format(_("Sort by %s"), colName));
menu.Append(WXMENU_FVIEW_SORT_BY_COL_REV + col,
- wxString::Format(_("Reverse sort by %s"), colName.c_str()));
+ wxString::Format(_("Reverse sort by %s"), colName));
menu.AppendSeparator();
}
//else: clicked outside any column or on a column we can't use for sorting
@@ -2075,7 +2075,7 @@ void wxFolderListCtrl::OnColumnClick(wxListEvent& event)
// we can't sort by this column
wxLogStatus(GetFrame(this),
_("Impossible to sort messages using %s column"),
- GetColumnName(col).Lower().c_str());
+ GetColumnName(col).Lower());
return;
}
@@ -2736,7 +2736,7 @@ void wxFolderListCtrl::SetSortOrder(Profile *profile,
bool reverse)
{
wxLogStatus(GetFrame(this), _("Now sorting by %s%s"),
- GetColumnName(col).Lower().c_str(),
+ GetColumnName(col).Lower(),
reverse ? _(" (reverse)") : "");
profile->writeEntry(MP_MSGS_SORTBY, sortOrder);
@@ -3532,8 +3532,8 @@ void wxFolderView::MoveToNextSearchMatch(bool forward)
wxLogStatus(m_Frame, _("Search result %lu of %lu for \"%s\"%s"),
(unsigned long)(m_searchData.idx + 1),
(unsigned long)count,
- m_searchData.str.c_str(),
- status.c_str());
+ m_searchData.str,
+ status);
}
}
@@ -3936,7 +3936,7 @@ wxFolderView::DoClear(bool keepTheViewer)
{
wxString msg;
msg.Printf(_("Mark all articles in\n'%s'\nas read?"),
- m_ASMailFolder->GetName().c_str());
+ m_ASMailFolder->GetName());
if ( MDialog_YesNoDialog
(
@@ -4140,7 +4140,7 @@ wxFolderView::OpenFolder(MFolder *folder, bool readonly)
if ( AddAllSubfoldersToTree(folder, asmf) > 0 )
{
wxLogStatus(_("You can now open any of the folders on the "
- "IMAP server '%s'"), folder->GetName().c_str());
+ "IMAP server '%s'"), folder->GetName());
}
asmf->DecRef();
@@ -4163,7 +4163,7 @@ wxFolderView::OpenFolder(MFolder *folder, bool readonly)
_("The folder '%s' couldn't be opened last time, "
"do you still want to try to open it (it "
"will probably fail again)?"),
- m_fullname.c_str()
+ m_fullname
),
m_Frame,
MDIALOG_YESNOTITLE,
@@ -4193,7 +4193,7 @@ wxFolderView::OpenFolder(MFolder *folder, bool readonly)
{
// the dialog was cancelled
wxLogStatus(m_Frame, _("Opening the folder '%s' cancelled."),
- m_fullname.c_str());
+ m_fullname);
mApplication->SetLastError(M_ERROR_CANCEL);
return false;
@@ -4236,7 +4236,7 @@ wxFolderView::OpenFolder(MFolder *folder, bool readonly)
"If you believe this message to be incorrect, "
"you may reset \"Can be opened\" flag in the\n"
"folder properties dialog and try again."),
- m_fullname.c_str());
+ m_fullname);
break;
default:
@@ -4265,7 +4265,7 @@ wxFolderView::OpenFolder(MFolder *folder, bool readonly)
(
wxString::Format(_("The folder '%s' could not be opened, "
"would you like to change its settings?"),
- m_fullname.c_str()),
+ m_fullname),
m_Frame,
MDIALOG_YESNOTITLE,
M_DLG_YES_DEFAULT,
@@ -5051,7 +5051,7 @@ void wxFolderView::OnFolderDeleteEvent(const String& folderName)
// assume we're in a folder view frame
wxLogStatus(GetFrame(m_Parent),
_("Closing folder '%s' because the underlying mail "
- "folder was deleted."), m_folderName.c_str());
+ "folder was deleted."), m_folderName);
Clear();
}
@@ -5313,7 +5313,7 @@ wxFolderView::OnASFolderResultEvent(MEventASFolderResultData &event)
{
wxLogStatus(m_Frame,
_("No messages matching \"%s\" found."),
- m_searchData.str.c_str());
+ m_searchData.str);
}
}
break;
diff --git a/src/gui/wxHeadersDialogs.cpp b/src/gui/wxHeadersDialogs.cpp
index 36b19ea8..ac5a1763 100644
--- a/src/gui/wxHeadersDialogs.cpp
+++ b/src/gui/wxHeadersDialogs.cpp
@@ -372,7 +372,7 @@ wxComposeHeadersDialog::wxComposeHeadersDialog(Profile *profile,
wxString foldername = profile->GetFolderName();
wxString labelBox;
if ( !foldername.empty() )
- labelBox.Printf(_("&Headers for folder '%s'"), foldername.c_str());
+ labelBox.Printf(_("&Headers for folder '%s'"), foldername);
else
labelBox.Printf(_("Default headers"));
wxStaticBox *box = CreateStdButtonsAndBox(labelBox);
@@ -641,7 +641,7 @@ wxCustomHeaderDialog::wxCustomHeaderDialog(Profile *profile,
wxString foldername = profile->GetFolderName();
wxString labelBox;
if ( !foldername.empty() )
- labelBox.Printf(_("Custom header for folder '%s'"), foldername.c_str());
+ labelBox.Printf(_("Custom header for folder '%s'"), foldername);
else
labelBox.Printf(_("Default custom header"));
wxStaticBox *box = CreateStdButtonsAndBox(labelBox);
@@ -798,7 +798,7 @@ bool wxCustomHeaderDialog::TransferDataFromWindow()
if ( !reason.empty() )
{
- wxLogError(_("Specified header name is invalid: %s."), reason.c_str());
+ wxLogError(_("Specified header name is invalid: %s."), reason);
return false;
}
@@ -841,7 +841,7 @@ wxCustomHeadersDialog::wxCustomHeadersDialog(Profile *profile,
wxString foldername = profile->GetFolderName();
wxString labelBox;
if ( !foldername.empty() )
- labelBox.Printf(_("Custom &headers for folder '%s'"), foldername.c_str());
+ labelBox.Printf(_("Custom &headers for folder '%s'"), foldername);
else
labelBox.Printf(_("Default custom headers"));
diff --git a/src/gui/wxIconManager.cpp b/src/gui/wxIconManager.cpp
index 97388196..b93f8f8b 100644
--- a/src/gui/wxIconManager.cpp
+++ b/src/gui/wxIconManager.cpp
@@ -208,14 +208,14 @@ wxIconManager::LoadImage(String filename, bool *success, bool showDlg)
"exactly two '%%s' format specificators.\n"
"The current setting '%s' is incorrect and "
"the default value will be used instead."),
- strConvertProgram.c_str());
+ strConvertProgram);
strConvertProgram = GetStringDefault(MP_CONVERTPROGRAM);
}
String command;
- command.Printf(strConvertProgram, filename.c_str(), tempfile.c_str());
+ command.Printf(strConvertProgram, filename, tempfile);
wxLogTrace(wxTraceIconLoading,
_T("wxIconManager::LoadImage() calling '%s'..."),
- command.c_str());
+ command);
if(wxSystem(command) == 0)
{
wxLogNull lo; // suppress error messages
@@ -264,7 +264,7 @@ wxIconManager::LoadImageXpm(String filename)
char **cpptr = NULL;
wxLogTrace(wxTraceIconLoading, _T("wxIconManager::LoadImage(%s) called..."),
- filename.c_str());
+ filename);
wxFileName fn(filename);
if ( fn.GetExt() == _T("xpm") )
@@ -281,11 +281,10 @@ wxIconManager::LoadImageXpm(String filename)
String tempfile(fnXPM.GetFullPath());
String command;
- command.Printf(READ_APPCONFIG_TEXT(MP_CONVERTPROGRAM),
- filename.c_str(), tempfile.c_str());
+ command.Printf(READ_APPCONFIG_TEXT(MP_CONVERTPROGRAM), filename, tempfile);
wxLogTrace(wxTraceIconLoading,
_T("wxIconManager::LoadImage() calling '%s'..."),
- command.c_str());
+ command);
if(wxSystem(command) == 0)
cpptr = LoadXpm(tempfile);
@@ -504,7 +503,7 @@ wxIconManager::GetIcon(const String &iconNameOrig)
strutil_tolower(iconName);
wxLogTrace(wxTraceIconLoading, _T("wxIconManager::GetIcon(%s) called..."),
- iconNameOrig.c_str());
+ iconNameOrig);
wxIcon icon;
@@ -567,7 +566,7 @@ wxIconManager::GetIcon(const String &iconNameOrig)
id.iconRef = icon;
id.iconName = iconName;
wxLogTrace(wxTraceIconLoading, _T("... icon found in '%s'"),
- name.c_str());
+ name);
m_iconList.push_front(id);
return icon;
}
diff --git a/src/gui/wxMApp.cpp b/src/gui/wxMApp.cpp
index 097a7117..7e4cd68f 100644
--- a/src/gui/wxMApp.cpp
+++ b/src/gui/wxMApp.cpp
@@ -961,7 +961,7 @@ wxMApp::OnInit()
if ( !m_snglInstChecker->Create
(
wxString::Format(_T(".mahogany-%s.lock"),
- wxGetUserId().c_str()),
+ wxGetUserId()),
_T("/tmp")
) )
{
@@ -1197,13 +1197,13 @@ wxMApp::OnInit()
{
msg.Printf("Locale '%s' couldn't be set, do you want to "
"retry setting it the next time?",
- locale.c_str());
+ locale);
}
else // failedToLoadMsgs
{
msg.Printf("Impossible to load message catalog(s) for the "
"locale '%s', do you want to retry next time?",
- locale.c_str());
+ locale);
}
if ( wxMessageBox(msg, _T("Error"),
@@ -1569,7 +1569,7 @@ bool wxMApp::InitHelp()
"\n"
"Would you like to specify another help files "
"location (otherwise help will be unavailable)?"),
- helpdir.c_str());
+ helpdir);
if ( !MDialog_YesNoDialog(msg, NULL, _("Mahogany Help")) )
{
@@ -1698,7 +1698,7 @@ wxMApp::LoadModules(void)
if ( !module )
{
- ERRORMESSAGE((_("Cannot load module '%s'."), name.c_str()));
+ ERRORMESSAGE((_("Cannot load module '%s'."), name));
}
else
{
@@ -2268,7 +2268,7 @@ void wxMApp::SetLogFile(const String& filename)
}
wxLogVerbose(_("Started logging to the log file '%s'."),
- filename.c_str());
+ filename);
}
}
}
@@ -2581,7 +2581,7 @@ static String GetIPCSocket()
// seems to be better than UID as, although it seems unlikely, we might
// have the same user logged in from 2 different machines sharing the
// same /tmp directory
- s_socketName.Printf(_T("/tmp/.mahogany-%s.ipc"), wxGetUserId().c_str());
+ s_socketName.Printf(_T("/tmp/.mahogany-%s.ipc"), wxGetUserId());
}
return s_socketName;
diff --git a/src/gui/wxMDialogs.cpp b/src/gui/wxMDialogs.cpp
index a90261b1..9a1d0df5 100644
--- a/src/gui/wxMDialogs.cpp
+++ b/src/gui/wxMDialogs.cpp
@@ -561,7 +561,7 @@ MDialog_SystemErrorMessage(const wxString& message,
msg = String(message) + _("\nSystem error: ")
+ wxSafeConvertMB2WX(strerror(errno));
- MDialog_ErrorMessage(msg.c_str(), parent, wxString(M_TITLE_PREFIX)+title, modal);
+ MDialog_ErrorMessage(msg, parent, wxString(M_TITLE_PREFIX)+title, modal);
}
@@ -634,7 +634,7 @@ bool MDialog_Message(const wxString& message,
configPath = GetPersMsgBoxName(persMsg);
return MDialog_Message(message, parent, title,
- persMsg ? configPath.c_str()
+ persMsg ? (const char *)configPath.c_str()
: (const char *)NULL,
flags);
}
@@ -1241,7 +1241,7 @@ wxDateFmtDialog::wxDateFmtDialog(Prof...
[truncated message content] |
|
From: vadz <mah...@us...> - 2023-07-30 22:50:19
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 403f3c88baa7e085a2b3eb311e66e2cc20d8a509 (commit)
via e4c01c740208135fd21db8321daa34c744da50c5 (commit)
via 7c0dceb54b8a0a58a72bd0f56a37bb4f81b44a86 (commit)
via 9b487ce19ebff28117f29bb4992e6157adb191ac (commit)
via f4df09d95ce0cbc8a87a99dcd4e0d709a0831318 (commit)
via eaf382ea13e9c7cc1d2c0647e4f48496617c293a (commit)
from d0ecd4ca6401b383bdf9f7f4fea5b5cabedaf2f1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 403f3c88baa7e085a2b3eb311e66e2cc20d8a509
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Jul 31 00:48:44 2023 +0200
Add a dummy icon and a .desktop file using it
This is better than nothing (although not by much).
diff --git a/extra/install/M.svg b/extra/install/M.svg
new file mode 100644
index 00000000..91fdca16
--- /dev/null
+++ b/extra/install/M.svg
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ version="1.1"
+ width="256"
+ height="256"
+ viewBox="0 0 256 256"
+ xml:space="preserve"
+ id="svg74"
+ sodipodi:docname="envelope.svg"
+ inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
+ id="namedview76"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ inkscape:zoom="0.921875"
+ inkscape:cx="-144.81356"
+ inkscape:cy="128"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="g72" />
+
+<defs
+ id="defs56"><rect
+ x="177.59322"
+ y="189.31356"
+ width="64.580508"
+ height="52.95339"
+ id="rect4099" />
+</defs>
+<g
+ style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;"
+ transform="translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)"
+ id="g72">
+ <path
+ d="m 89.294,31.075512 -42.013,42.014 c -0.941,0.941 -2.466,0.941 -3.406,0 l -28.388,-28.388 c -0.941,-0.941 -0.941,-2.466 0,-3.406 L 57.501,-0.71748754 c 0.941,-0.94099996 2.466,-0.94099996 3.406,0 L 89.294,27.669512 c 0.941,0.941 0.941,2.466 0,3.406 z"
+ style="opacity:1;fill:#bf4000;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;image-rendering:auto;fill-opacity:1"
+ stroke-linecap="round"
+ id="path58" />
+ <path
+ d="M 21.236 45.964 c -0.547 0 -0.996 -0.436 -1.01 -0.986 c -0.014 -0.558 0.427 -1.023 0.985 -1.037 l 36.569 -0.943 l 0.943 -36.57 c 0.015 -0.558 0.488 -1.015 1.037 -0.985 c 0.559 0.014 0.999 0.478 0.986 1.037 l -0.968 37.53 c -0.014 0.538 -0.447 0.971 -0.986 0.985 l -37.529 0.967 C 21.254 45.963 21.245 45.964 21.236 45.964 z"
+ style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;"
+ transform=" matrix(1 0 0 1 0 0) "
+ stroke-linecap="round"
+ id="path60" />
+ <path
+ d="M 59.084 32.643 c -0.537 0 -0.985 -0.423 -1.009 -0.965 c -0.026 -0.558 0.406 -1.031 0.964 -1.057 l 24.688 -1.137 c 0.55 -0.017 1.031 0.405 1.057 0.964 c 0.026 0.558 -0.406 1.031 -0.964 1.057 l -24.688 1.137 C 59.116 32.642 59.1 32.643 59.084 32.643 z"
+ style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;"
+ transform=" matrix(1 0 0 1 0 0) "
+ stroke-linecap="round"
+ id="path62" />
+ <path
+ d="M 45.219 70.063 c -0.016 0 -0.032 0 -0.047 -0.001 c -0.558 -0.026 -0.99 -0.499 -0.964 -1.057 l 1.137 -24.689 c 0.026 -0.558 0.506 -0.979 1.057 -0.964 c 0.558 0.026 0.99 0.499 0.964 1.057 l -1.137 24.689 C 46.203 69.64 45.755 70.063 45.219 70.063 z"
+ style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;"
+ transform=" matrix(1 0 0 1 0 0) "
+ stroke-linecap="round"
+ id="path64" />
+ <path
+ d="M 1.011 90 c -0.259 0 -0.517 -0.099 -0.715 -0.296 c -0.395 -0.395 -0.395 -1.035 0 -1.43 L 21.99 66.58 c 0.395 -0.395 1.035 -0.395 1.43 0 c 0.395 0.395 0.395 1.035 0 1.43 L 1.726 89.704 C 1.529 89.901 1.27 90 1.011 90 z"
+ style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(91,93,110); fill-rule: nonzero; opacity: 1;"
+ transform=" matrix(1 0 0 1 0 0) "
+ stroke-linecap="round"
+ id="path66" />
+ <path
+ d="M 2.284 69.58 c -0.259 0 -0.517 -0.099 -0.715 -0.296 c -0.395 -0.395 -0.395 -1.035 0 -1.43 l 10.847 -10.847 c 0.395 -0.395 1.035 -0.395 1.43 0 c 0.395 0.395 0.395 1.035 0 1.43 L 2.999 69.283 C 2.802 69.481 2.543 69.58 2.284 69.58 z"
+ style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(91,93,110); fill-rule: nonzero; opacity: 1;"
+ transform=" matrix(1 0 0 1 0 0) "
+ stroke-linecap="round"
+ id="path68" />
+ <path
+ d="M 21.432 88.727 c -0.259 0 -0.517 -0.099 -0.715 -0.296 c -0.395 -0.395 -0.395 -1.035 0 -1.43 l 10.847 -10.847 c 0.395 -0.395 1.035 -0.395 1.43 0 c 0.395 0.395 0.395 1.035 0 1.43 L 22.147 88.431 C 21.949 88.628 21.691 88.727 21.432 88.727 z"
+ style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(91,93,110); fill-rule: nonzero; opacity: 1;"
+ transform=" matrix(1 0 0 1 0 0) "
+ stroke-linecap="round"
+ id="path70" />
+<text
+ xml:space="preserve"
+ transform="matrix(0.35587189,0,0,0.35587189,-0.50056705,-0.50056705)"
+ id="text4097"
+ style="white-space:pre;shape-inside:url(#rect4099);fill:#bf4000;fill-opacity:1"><tspan
+ x="177.59375"
+ y="199.93164"
+ id="tspan4117">Mahogany
+</tspan></text></g>
+</svg>
diff --git a/extra/install/mahogany.desktop b/extra/install/mahogany.desktop
new file mode 100644
index 00000000..7599d5e3
--- /dev/null
+++ b/extra/install/mahogany.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Mahogany
+Icon=mahogany.svg
+StartupWMClass=M
+StartupNotify=true
+Exec=/usr/bin/M
commit e4c01c740208135fd21db8321daa34c744da50c5
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Jul 31 00:45:27 2023 +0200
Always link with OpenSSL libraries under Unix
Remove obsolete and broken code for loading these libraries dynamically
and just call ssl_onceonlyinit() under all platforms.
diff --git a/configure.ac b/configure.ac
index 34ea1373..3ac064d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1318,7 +1318,7 @@ dnl --------------------------------------------------------------------------
dnl add other flags
CFLAGS="$CFLAGS $CODE_GEN_FLAGS"
CXXFLAGS="$CXXFLAGS $CODE_GEN_FLAGS"
-LIBS="$LIBS $PYTHON_LIBS $LIB_EFENCE $LIB_DMALLOC $LIB_PAM"
+LIBS="$LIBS $PYTHON_LIBS $LIB_EFENCE $LIB_DMALLOC $LIB_PAM $LIBS_SSL"
dnl imap
IMAP_CFLAGS="$CFLAGS $IMAP_CFLAGS"
diff --git a/src/util/ssl.cpp b/src/util/ssl.cpp
index 450d3390..c2a3f2b8 100644
--- a/src/util/ssl.cpp
+++ b/src/util/ssl.cpp
@@ -21,425 +21,8 @@
// needed to get ssl_onceonlyinit() declaration
#include "Mcclient.h"
-
- #if defined(OS_UNIX) || defined(__CYGWIN__)
- #include "Profile.h"
- #include "MApplication.h"
- #endif
#endif // USE_PCH
-#include "gui/wxMDialogs.h"
-
-// under Unix we have to load libssl and libcrypto to provide access to them to
-// c-client
-#if (defined(OS_UNIX) || defined(__CYGWIN__)) && !defined(__WINE__)
-
-#include <wx/dynlib.h>
-
-#include <stdint.h>
-
-extern const MOption MP_SSL_DLL_CRYPTO;
-extern const MOption MP_SSL_DLL_SSL;
-
-/* These functions will serve as stubs for the real openSSL library
- and must be initialised at runtime as c-client actually links
- against these. */
-
-#include <openssl/ssl.h>
-#include <openssl/opensslv.h>
-
-// starting from 0.9.6a, OpenSSL uses void, as it should, instead of char
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER > 0x0090600fL)
- #define ssl_data_t void *
-#else // old ssl
- #define ssl_data_t char *
-#endif
-// starting from 0.9.7, OpenSSL uses void instead of char
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x0090700fL)
- #define ssl_parg void *
-#else // old ssl
- #define ssl_parg char *
-#endif
-
-// starting from 0.9.7g OpenSSL has discovered const correctness (better late
-// than never)
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x0090707fL)
- #define ssl_const1 const
-#else
- #define ssl_const1
-#endif
-// OpenSSL 1.0.0-beta3
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10000003L)
- #define ssl_const2 const
- #define ssl_STACK _STACK
- #define sk_value_t void *
-#else
- #define ssl_const2
- #define ssl_STACK STACK
- #define sk_value_t char *
-#endif
-// OpenSSL 1.0.2g
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x1000207fL)
- #define ssl_const3 const
-#else
- #define ssl_const3
-#endif
-// OpenSSL 1.1.0
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- #define ssl_const110 const
-
- // A couple of functions used by c-client code were deprecated in OpenSSL
- // 1.1.0 and preserved only as compatibility defines. We still want to
- // define stub functions for them though and macros just get into the way.
- #undef SSL_library_init
- #undef SSL_load_error_strings
- #undef ERR_load_crypto_strings
- #undef SSL_CTX_set_tmp_rsa_callback
- #undef SSLv23_client_method
- #undef SSLv23_server_method
- #undef sk_num
- #undef sk_value
-#else
- #define ssl_const110
-
- // Conversely, a few functions existed as macros originally but need to be
- // loaded dynamically in 1.1.0. Handling them is simpler as c-client code
- // will still use the macros with old versions, while we'll provide the
- // forwarder functions for the later ones.
- #undef SSL_in_init
- #undef SSL_CTX_set_options
-#endif
-// OpenSSL 1.1.1
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x1010100fL)
- #define ssl_const111 const
-#else
- #define ssl_const111
-#endif
-// OpenSSL 3.0
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x30000000L)
- #define ssl_const30 const
- #define SSL_get_peer_certificate SSL_get1_peer_certificate
-#else
- #define ssl_const30
-#endif
-
-/* This is our interface to the library and auth_ssl.c in c-client
- which are all in "C" */
-extern "C" {
-
-/*
- This macro is used to do the following things:
-
- 1. define the type for the given SSL functions
- 2. declare a variable of this type named stub_SSL_XXX and init it to NULL
- 3. declare our SSL_XXX which simply forwards to stub_SSL_XXX
- */
-#define SSL_DEF2(returnval, name, args, params, ret) \
- typedef returnval (* name##_TYPE) args ; \
- name##_TYPE stub_##name = NULL; \
- returnval name args \
- { ret (*stub_##name) params; }
-
-// the SSL_DEF macro for non void functions
-#define SSL_DEF(returnval, name, args, params) \
- SSL_DEF2(returnval, name, args, params, return)
-
-// ... and for the void ones
-#define SSL_DEF_VOID(name, args, params) \
- SSL_DEF2(void, name, args, params, (void))
-
-#define SSL_LOOKUP_NO_ERROR_CHECK(name) \
- stub_##name = (name##_TYPE) gs_dllSll.GetSymbol(#name)
-
-#define SSL_LOOKUP(name) \
- SSL_LOOKUP_NO_ERROR_CHECK(name); \
- if ( !stub_##name ) \
- goto error
-
-#define CRYPTO_LOOKUP(name) \
- stub_##name = (name##_TYPE) gs_dllCrypto.GetSymbol(#name); \
- if ( !stub_##name ) \
- goto error
-
-SSL_DEF( SSL *, SSL_new, (SSL_CTX *ctx), (ctx) );
-SSL_DEF_VOID( SSL_free, (SSL *s), (s) );
-SSL_DEF( int, SSL_set_rfd, (SSL *s, int fd), (s, fd) );
-SSL_DEF( int, SSL_set_wfd, (SSL *s, int fd), (s, fd) );
-SSL_DEF_VOID( SSL_set_read_ahead, (SSL *s, int yes), (s, yes) );
-SSL_DEF( int, SSL_connect, (SSL *s), (s) );
-SSL_DEF( int, SSL_read, (SSL *s,ssl_data_t buf,int num), (s, buf, num) );
-SSL_DEF( int, SSL_write, (SSL *s,const ssl_data_t buf,int num), (s, buf, num) );
-SSL_DEF( int, SSL_pending, (ssl_const1 SSL *s), (s) );
-SSL_DEF( int, SSL_library_init, (void ), () );
-SSL_DEF_VOID( SSL_load_error_strings, (void ), () );
-SSL_DEF( SSL_CTX *,SSL_CTX_new, (ssl_const2 SSL_METHOD *meth), (meth) );
-SSL_DEF( const char *, SSL_CIPHER_get_name, (ssl_const1 SSL_CIPHER *c), (c) );
-SSL_DEF( int, SSL_CIPHER_get_bits, (ssl_const1 SSL_CIPHER *c, int *alg_bits), (c,alg_bits) );
-SSL_DEF( ssl_const2 SSL_CIPHER *, SSL_get_current_cipher ,(ssl_const1 SSL *s), (s) );
-SSL_DEF( int, SSL_get_fd, (ssl_const1 SSL *s), (s) );
-SSL_DEF( int, SSL_set_fd, (SSL *s, int fd), (s, fd) );
-SSL_DEF( int, SSL_get_error, (ssl_const1 SSL *s, int ret_code), (s, ret_code) );
-SSL_DEF( X509 *, SSL_get_peer_certificate, (ssl_const1 SSL *s), (s) );
-
-SSL_DEF( int, sk_num, (const ssl_STACK *s), (s) );
-SSL_DEF( sk_value_t, sk_value, (const ssl_STACK *s, int n), (s, n) );
-
-SSL_DEF( int, OPENSSL_sk_num, (const struct stack_st *s), (s) );
-SSL_DEF( void*, OPENSSL_sk_value, (const struct stack_st *s, int n), (s, n) );
-
-SSL_DEF_VOID( RAND_seed, (const void *buf,int num), (buf, num) );
-SSL_DEF( BIO *, BIO_new_socket, (int sock, int close_flag), (sock, close_flag) );
-SSL_DEF( BIO *, BIO_new_mem_buf, (ssl_const3 void *buf, int len), (buf, len) );
-SSL_DEF( int, BIO_free, (BIO *a), (a) );
-SSL_DEF( long, SSL_CTX_ctrl, (SSL_CTX *ctx,int cmd, long larg, ssl_parg parg), (ctx,cmd,larg,parg) );
-SSL_DEF_VOID( SSL_CTX_set_verify, (SSL_CTX *ctx,int mode, int (*callback)(int, X509_STORE_CTX *)), (ctx,mode,callback) );
-SSL_DEF( int, SSL_CTX_load_verify_locations, (SSL_CTX *ctx, const char *CAfile, const char *CApath), (ctx, CAfile, CApath) );
-SSL_DEF( int, SSL_CTX_set_default_verify_paths, (SSL_CTX *ctx), (ctx) );
-SSL_DEF_VOID( SSL_set_bio, (SSL *s, BIO *rbio,BIO *wbio), (s,rbio,wbio) );
-SSL_DEF_VOID( SSL_set_connect_state, (SSL *s), (s) );
-SSL_DEF( int, SSL_state, (ssl_const1 SSL *ssl), (ssl) );
-SSL_DEF( long, SSL_ctrl, (SSL *ssl,int cmd, long larg, ssl_parg parg), (ssl,cmd,larg,parg) );
-SSL_DEF_VOID( ERR_load_crypto_strings, (void), () );
-SSL_DEF( ssl_const2 SSL_METHOD *,TLSv1_server_method, (void), () );
-SSL_DEF( ssl_const2 SSL_METHOD *,SSLv23_server_method, (void), () );
-SSL_DEF( int, SSL_CTX_set_cipher_list, (SSL_CTX *ctx,const char *str), (ctx,str) );
-SSL_DEF( int, SSL_CTX_use_certificate_chain_file, (SSL_CTX *ctx, const char *file), (ctx,file) );
-SSL_DEF( int, SSL_CTX_use_RSAPrivateKey_file, (SSL_CTX *ctx, const char *file, int type), (ctx,file,type) );
-SSL_DEF_VOID( SSL_CTX_set_tmp_rsa_callback, (SSL_CTX *ctx, RSA *(*cb)(SSL *,int, int)), (ctx,cb) );
-SSL_DEF( int, SSL_accept, (SSL *ssl), (ssl) );
-SSL_DEF( int, X509_STORE_CTX_get_error, (ssl_const30 X509_STORE_CTX *ctx), (ctx) );
-SSL_DEF( const char *, X509_verify_cert_error_string, (long n), (n) );
-SSL_DEF( X509 *, X509_STORE_CTX_get_current_cert, (ssl_const30 X509_STORE_CTX *ctx), (ctx) );
-SSL_DEF( X509_NAME *, X509_get_subject_name, (ssl_const110 X509 *a), (a) );
-SSL_DEF( char *, X509_NAME_oneline, (ssl_const110 X509_NAME *a,char *buf,int size), (a,buf,size) );
-SSL_DEF( void *, X509_get_ext_d2i, (ssl_const110 X509 *x, int nid, int *crit, int *idx), (x, nid, crit, idx) );
-SSL_DEF_VOID( X509_free, (X509 *x), (x) );
-SSL_DEF( int, SSL_shutdown, (SSL *s), (s) );
-SSL_DEF( int, SSL_CTX_use_certificate, (SSL_CTX *ctx, X509 *x), (ctx, x) );
-SSL_DEF( int, SSL_CTX_use_PrivateKey, (SSL_CTX *ctx, EVP_PKEY *pk), (ctx, pk) );
-SSL_DEF_VOID( SSL_CTX_free, (SSL_CTX *ctx), (ctx) );
-SSL_DEF( RSA *, RSA_generate_key, (int bits, unsigned long e,void (*cb)(int,int,void *),void *cb_arg), (bits,e,cb,cb_arg) );
-SSL_DEF(ssl_const2 SSL_METHOD *, TLSv1_client_method, (void), () );
-SSL_DEF(ssl_const2 SSL_METHOD *, SSLv23_client_method, (void), () );
-SSL_DEF_VOID( EVP_PKEY_free, (EVP_PKEY *pk), (pk) );
-SSL_DEF( X509 *, PEM_read_bio_X509, (BIO *bp, X509 **x, pem_password_cb *cb, void *u), (bp, x, cb, u) );
-SSL_DEF( EVP_PKEY *, PEM_read_bio_PrivateKey, (BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u), (bp, x, cb, u) );
-
-SSL_DEF( unsigned long, ERR_get_error, (void), () );
-SSL_DEF( char *, ERR_error_string, (unsigned long e, char *p), (e, p) );
-
-// Those are macros until 1.1.0, functions in it.
-SSL_DEF( int, SSL_in_init, (ssl_const111 SSL* s), (s) );
-SSL_DEF( unsigned long, SSL_CTX_set_options, (SSL_CTX *ctx, unsigned long op), (ctx, op) );
-
-// These functions are used inside macro expansions in openssl/ssl.h.
-SSL_DEF( int, OPENSSL_init_ssl, (uint64_t opts, const struct ossl_init_settings_st* settings), (opts, settings) );
-SSL_DEF( int, OPENSSL_init_crypto, (uint64_t opts, const struct ossl_init_settings_st* settings), (opts, settings) );
-
-} // extern "C"
-
-// These functions are not used by c-client but only in this file itself.
-SSL_DEF( const SSL_METHOD *, TLS_client_method, (void), () );
-SSL_DEF( const SSL_METHOD *, TLS_server_method, (void), () );
-
-static int compat_SSL_library_init()
-{
- return (*stub_OPENSSL_init_ssl)(0, NULL);
-}
-
-#ifndef OPENSSL_INIT_LOAD_SSL_STRINGS
- #define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
-#endif
-#ifndef OPENSSL_INIT_LOAD_CRYPTO_STRINGS
- #define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
-#endif
-
-static void compat_SSL_load_error_strings()
-{
- (*stub_OPENSSL_init_ssl)(OPENSSL_INIT_LOAD_SSL_STRINGS |
- OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
-}
-
-static void compat_ERR_load_crypto_strings()
-{
- (*stub_OPENSSL_init_crypto)(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
-}
-
-static void compat_SSL_CTX_set_tmp_rsa_callback(SSL_CTX *, RSA *(*)(SSL *, int, int))
-{
- // Nothing to do here, this seems to be unsupported in OpenSSL 1.1.0.
-}
-
-#undef SSL_DEF
-
-static bool gs_SSL_loaded = false;
-static bool gs_SSL_available = false;
-
-static wxDynamicLibrary gs_dllSll,
- gs_dllCrypto;
-
-bool InitSSL(void) /* FIXME: MT */
-{
- static bool s_errMsgGiven = false;
-
- if(gs_SSL_loaded)
- return gs_SSL_available;
-
- String ssl_dll = READ_APPCONFIG(MP_SSL_DLL_SSL);
- String crypto_dll = READ_APPCONFIG(MP_SSL_DLL_CRYPTO);
-
- // it doesn't take long so nobody sees this message anyhow
-#if 0
- STATUSMESSAGE((_("Trying to load SSL libraries '%s' and '%s'..."),
- crypto_dll.c_str(),
- ssl_dll.c_str()));
-#endif // 0
-
- if ( !gs_dllCrypto.Load(crypto_dll) )
- goto error;
-
- if ( !gs_dllSll.Load(ssl_dll) )
- goto error;
-
- SSL_LOOKUP_NO_ERROR_CHECK(SSL_library_init);
- if ( stub_SSL_library_init )
- {
- // We must be using OpenSSL < 1.1.0, so all the other functions removed
- // in 1.1.0 should be there.
- SSL_LOOKUP(SSL_load_error_strings);
- SSL_LOOKUP(ERR_load_crypto_strings);
- SSL_LOOKUP(SSL_CTX_set_tmp_rsa_callback);
- SSL_LOOKUP(SSLv23_server_method);
- SSL_LOOKUP(SSLv23_client_method);
- SSL_LOOKUP(sk_num);
- SSL_LOOKUP(sk_value);
- }
- else // Perhaps it's OpenSSL 1.1.0+, check for new functions.
- {
- SSL_LOOKUP(OPENSSL_init_ssl);
- SSL_LOOKUP(OPENSSL_init_crypto);
- SSL_LOOKUP(TLS_server_method);
- SSL_LOOKUP(TLS_client_method);
- SSL_LOOKUP(OPENSSL_sk_num);
- SSL_LOOKUP(OPENSSL_sk_value);
- SSL_LOOKUP(SSL_in_init);
- SSL_LOOKUP(SSL_CTX_set_options);
-
- // We've got the new functions, but we still need to provide the old ones
- // to c-client
- stub_SSL_library_init = compat_SSL_library_init;
- stub_SSL_load_error_strings = compat_SSL_load_error_strings;
- stub_ERR_load_crypto_strings = compat_ERR_load_crypto_strings;
- stub_SSL_CTX_set_tmp_rsa_callback = compat_SSL_CTX_set_tmp_rsa_callback;
- stub_SSLv23_client_method = stub_TLS_client_method;
- stub_SSLv23_server_method = stub_TLS_server_method;
- }
-
- SSL_LOOKUP(SSL_new);
- SSL_LOOKUP(SSL_free);
- SSL_LOOKUP(SSL_set_rfd);
- SSL_LOOKUP(SSL_set_wfd);
- SSL_LOOKUP(SSL_set_read_ahead);
- SSL_LOOKUP(SSL_connect);
- SSL_LOOKUP(SSL_read);
- SSL_LOOKUP(SSL_write);
- SSL_LOOKUP(SSL_pending);
- SSL_LOOKUP(SSL_CTX_new);
- SSL_LOOKUP(SSL_CTX_use_certificate);
- SSL_LOOKUP(SSL_CTX_use_PrivateKey);
- SSL_LOOKUP(SSL_CIPHER_get_name);
- SSL_LOOKUP(SSL_CIPHER_get_bits);
- SSL_LOOKUP(SSL_get_current_cipher);
- SSL_LOOKUP(SSL_get_fd);
- SSL_LOOKUP(SSL_set_fd);
- SSL_LOOKUP(SSL_get_error);
-// OpenSSL 3.0
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x30000000L)
- SSL_LOOKUP(SSL_get1_peer_certificate);
-#else
- SSL_LOOKUP(SSL_get_peer_certificate);
-#endif
- SSL_LOOKUP(RAND_seed);
- SSL_LOOKUP(BIO_new_socket);
- SSL_LOOKUP(BIO_new_mem_buf);
- SSL_LOOKUP(BIO_free);
- SSL_LOOKUP(SSL_CTX_ctrl);
- SSL_LOOKUP(SSL_CTX_set_verify);
- SSL_LOOKUP(SSL_CTX_load_verify_locations);
- SSL_LOOKUP(SSL_CTX_set_default_verify_paths);
- SSL_LOOKUP(SSL_set_bio);
- SSL_LOOKUP(SSL_set_connect_state);
- SSL_LOOKUP(SSL_ctrl);
- SSL_LOOKUP(TLSv1_server_method);
- SSL_LOOKUP(SSL_CTX_set_cipher_list);
- SSL_LOOKUP(SSL_CTX_use_certificate_chain_file);
- SSL_LOOKUP(SSL_CTX_use_RSAPrivateKey_file);
- SSL_LOOKUP(SSL_accept);
- SSL_LOOKUP(X509_STORE_CTX_get_error);
- SSL_LOOKUP(X509_verify_cert_error_string);
- SSL_LOOKUP(X509_STORE_CTX_get_current_cert);
- SSL_LOOKUP(X509_get_subject_name);
- SSL_LOOKUP(X509_NAME_oneline);
- SSL_LOOKUP(X509_get_ext_d2i);
- SSL_LOOKUP(X509_free);
- SSL_LOOKUP(SSL_shutdown);
- SSL_LOOKUP(SSL_CTX_free);
- SSL_LOOKUP(RSA_generate_key);
- SSL_LOOKUP(TLSv1_client_method);
- SSL_LOOKUP(EVP_PKEY_free);
- SSL_LOOKUP(PEM_read_bio_X509);
- SSL_LOOKUP(PEM_read_bio_PrivateKey);
-
- CRYPTO_LOOKUP(ERR_get_error);
- CRYPTO_LOOKUP(ERR_error_string);
-
- gs_SSL_available =
- gs_SSL_loaded = true;
-
- STATUSMESSAGE((_("Successfully loaded '%s' and '%s' - "
- "SSL authentication is now available."),
- crypto_dll.c_str(),
- ssl_dll.c_str()));
-
- ssl_onceonlyinit();
-
- return true;
-
-error:
- // Unload the DLLs to avoid assertion failures when calling Load() on them
- // again if we reattempt SSL initialization later (note that Unload() itself
- // doesn't assert and just doesn't do anything if the DLL is not loaded).
- gs_dllSll.Unload();
- gs_dllCrypto.Unload();
-
- if ( !s_errMsgGiven )
- {
- ERRORMESSAGE((_("SSL authentication is not available.")));
-
- s_errMsgGiven = true;
-
- // show the log dialog first
- wxLog::FlushActive();
-
- MDialog_Message
- (
- _("You can change the locations of the SSL and crypto "
- "libraries in the Helpers page of the preferences dialog\n"
- "if you have these libraries in non default location"
- " or if they have some other names on your system."),
- NULL,
- "SSL tip",
- "SSLLibTip"
- );
- }
-
- return false;
-}
-
-#undef SSL_LOOKUP
-
-#else // !OS_UNIX
-
bool InitSSL()
{
ssl_onceonlyinit();
@@ -447,8 +30,6 @@ bool InitSSL()
return true;
}
-#endif // OS_UNIX/!OS_UNIX
-
#else // !USE_SSL
bool InitSSL(void)
commit 7c0dceb54b8a0a58a72bd0f56a37bb4f81b44a86
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Jul 31 00:44:37 2023 +0200
Fix deprecation warning due to wrong wxString ctor use
The warning was about deprecated ctor argument but actually the code was
just wrong and we need to check for the encoding availability in a
different way.
diff --git a/src/util/strutil.cpp b/src/util/strutil.cpp
index f4ee6ea0..d017c823 100644
--- a/src/util/strutil.cpp
+++ b/src/util/strutil.cpp
@@ -1446,7 +1446,7 @@ wxFontEncoding GuessUnicodeCharset(const wchar_t *pwz)
// awfully wasteful but currently it's possible for wxCSConv::
// WC2MB() to return successfully when it's used for just testing
// and not real conversion under Win32
- if ( !wxString(pwz, wxCSConv(enc)).empty() )
+ if ( wxCSConv(enc).FromWChar(NULL, 0, pwz) > 0 )
break;
}
}
commit 9b487ce19ebff28117f29bb4992e6157adb191ac
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Jul 31 00:43:46 2023 +0200
Avoid warning about __STRICT_ANSI__ redefinition
It's probably unnecessary to still define it ourselves at all, but for
now just avoid the warning as it's simpler than to update this old code.
diff --git a/src/modules/spam/HeadersFilter.cpp b/src/modules/spam/HeadersFilter.cpp
index a68f3bac..28ec4579 100644
--- a/src/modules/spam/HeadersFilter.cpp
+++ b/src/modules/spam/HeadersFilter.cpp
@@ -963,7 +963,9 @@ static bool CheckWhiteList(const Message& msg, String *match)
#ifdef USE_RBL
+#ifndef __STRICT_ANSI__
#define __STRICT_ANSI__
+#endif
#include <netinet/in.h>
// FreeBSD uses a variable name "class"
commit f4df09d95ce0cbc8a87a99dcd4e0d709a0831318
Author: Vadim Zeitlin <va...@ze...>
Date: Sun Jul 23 01:11:57 2023 +0200
Stop copying URLs to primary selection under Unix
This is worse than useless as it actually prevents them from being
copied to the clipboard and so they can't be pasted anywhere.
diff --git a/src/gui/ClickURL.cpp b/src/gui/ClickURL.cpp
index 93c470d1..f6504756 100644
--- a/src/gui/ClickURL.cpp
+++ b/src/gui/ClickURL.cpp
@@ -264,13 +264,6 @@ UrlPopup::OnCommandEvent(wxCommandEvent &event)
const wxString url = m_clickableURL->GetUrl();
wxTheClipboard->SetData(new wxURLDataObject(url));
-
-#ifdef __UNIX__
- // Different browsers (Firefox and Chromium) use different
- // selections for pasting URLs, so just copy it to both.
- wxTheClipboard->UsePrimarySelection(true);
- wxTheClipboard->SetData(new wxURLDataObject(url));
-#endif // __UNIX__
}
}
break;
commit eaf382ea13e9c7cc1d2c0647e4f48496617c293a
Author: Vadim Zeitlin <va...@ze...>
Date: Sun Jul 23 01:11:23 2023 +0200
Fix formatting specifier in address autocollect code
Avoid assert when formatting size_t.
diff --git a/src/adb/Collect.cpp b/src/adb/Collect.cpp
index df324ad7..21feabb8 100644
--- a/src/adb/Collect.cpp
+++ b/src/adb/Collect.cpp
@@ -436,7 +436,7 @@ int InteractivelyCollectAddresses(const wxArrayString& addresses,
}
}
- wxLogStatus(parent, _("Saved %u addresses."), saved);
+ wxLogStatus(parent, _("Saved %zu addresses."), saved);
}
//else: cancelled
}
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
extra/install/M.svg | 96 +++++++++
extra/install/mahogany.desktop | 7 +
src/adb/Collect.cpp | 2 +-
src/gui/ClickURL.cpp | 7 -
src/modules/spam/HeadersFilter.cpp | 2 +
src/util/ssl.cpp | 419 -------------------------------------
src/util/strutil.cpp | 2 +-
8 files changed, 108 insertions(+), 429 deletions(-)
create mode 100644 extra/install/M.svg
create mode 100644 extra/install/mahogany.desktop
hooks/post-receive
--
Mahogany sources repository.
|
|
From: vadz <mah...@us...> - 2022-11-22 15:01:32
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 743dd9ef9acf2ea0b0ab5a09bf450e2aad648820 (commit)
from 8468e43f216872b1390a6a1962fdf19c58a9e0fd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 743dd9ef9acf2ea0b0ab5a09bf450e2aad648820
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Nov 22 15:00:50 2022 +0000
Compilation fix for non-MSW after the last commit
Define wxPaintDC object everywhere, not just under MSW, as it's actually
used now, since the changes of the last commit.
diff --git a/src/gui/wxlwindow.cpp b/src/gui/wxlwindow.cpp
index 0df80c74..3d23c80a 100644
--- a/src/gui/wxlwindow.cpp
+++ b/src/gui/wxlwindow.cpp
@@ -900,10 +900,7 @@ wxLayoutWindow::ScrollToCursor(void)
void
wxLayoutWindow::OnPaint( wxPaintEvent &WXUNUSED(event))
{
-#ifdef __WXMSW__
- // must create it under Windows
wxPaintDC dc(this);
-#endif
PrepareDC( dc );
-----------------------------------------------------------------------
Summary of changes:
src/gui/wxlwindow.cpp | 3 ---
1 file changed, 3 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2022-11-12 18:59:04
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 8468e43f216872b1390a6a1962fdf19c58a9e0fd (commit)
via 9ed536f1c3f88cf48e274d986951d1d5041d3a9f (commit)
via 56c7a7718e042242d09a25f806347bbc5495a07c (commit)
from bddbc6dcb76eca43aa9bb52952768fd688d60b3c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8468e43f216872b1390a6a1962fdf19c58a9e0fd
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Nov 12 18:52:18 2022 +0000
Fix wxLayoutWindow drawing with the latest wx 3.3
Using wxClientDC doesn't work any longer, so don't use it and redraw the
window only in wxEVT_PAINT handler.
This allows to further simplify the code and also remove the unnecessary
wxEVT_SCROLL handler as everything works fine without it under wxMSW.
diff --git a/include/gui/wxlwindow.h b/include/gui/wxlwindow.h
index de4b0121..6925b855 100644
--- a/include/gui/wxlwindow.h
+++ b/include/gui/wxlwindow.h
@@ -129,10 +129,9 @@ public:
void SetWordWrap(bool on = true) { m_DoWordWrap = on; }
/** Redraws the window.
- Internally, this stores the parameter and calls a refresh on
- wxMSW, draws directly on wxGTK.
+ This actually is the same as Refresh() now.
*/
- void RequestUpdate(const wxRect *updateRect = NULL);
+ void RequestUpdate() { Refresh(); }
/// if exact == false, assume 50% extra size for the future
void ResizeScrollbars(bool exact = false); // don't change this to true!
@@ -149,7 +148,6 @@ public:
//@{
void OnSize(wxSizeEvent &event);
void OnPaint(wxPaintEvent &event);
- void OnIdle(wxIdleEvent &event);
void OnChar(wxKeyEvent& event);
void OnKeyDown(wxKeyEvent& event);
void OnKeyUp(wxKeyEvent& event);
@@ -165,15 +163,10 @@ public:
void OnMouseMove(wxMouseEvent &event) { OnMouse(WXLOWIN_MENU_MOUSEMOVE, event) ; }
void OnSetFocus(wxFocusEvent &ev);
void OnKillFocus(wxFocusEvent &ev);
-#ifdef __WXMSW__
- void OnScroll(wxScrollWinEvent& ev);
-#endif // __WXMSW__
//@}
/// Creates a wxMenu for use as a format popup.
static wxMenu * MakeFormatMenu(void);
- /// Redraws the window, used by RequestUpdate() or OnPaint().
- void InternalPaint(const wxRect *updateRect);
/** Tell window to update a wxStatusBar with UserData labels and
cursor positions.
@@ -238,7 +231,7 @@ protected:
bool m_HaveFocus;
/// do we handle clicks of the right mouse button?
bool m_DoPopupMenu;
- /// Should InternalPaint() scroll to cursor (VZ: seems unused any more)
+ /// Should OnPaint() scroll to cursor (VZ: seems unused any more)
bool m_ScrollToCursor;
/// Do we currently have a non-standard cursor?
bool m_HandCursor;
@@ -302,8 +295,6 @@ private:
#endif
/// For finding text and finding it again:
wxString m_FindString;
- /// does hte window need to be repainted?
- bool m_needsRedraw;
//@}
DECLARE_EVENT_TABLE()
diff --git a/src/gui/wxlwindow.cpp b/src/gui/wxlwindow.cpp
index d9eb31f8..0df80c74 100644
--- a/src/gui/wxlwindow.cpp
+++ b/src/gui/wxlwindow.cpp
@@ -103,7 +103,6 @@ BEGIN_EVENT_TABLE(wxLayoutWindow,wxScrolledWindow)
EVT_SIZE (wxLayoutWindow::OnSize)
EVT_PAINT (wxLayoutWindow::OnPaint)
- EVT_IDLE (wxLayoutWindow::OnIdle)
EVT_CHAR (wxLayoutWindow::OnChar)
EVT_KEY_DOWN (wxLayoutWindow::OnKeyDown)
@@ -123,10 +122,6 @@ BEGIN_EVENT_TABLE(wxLayoutWindow,wxScrolledWindow)
EVT_SET_FOCUS(wxLayoutWindow::OnSetFocus)
EVT_KILL_FOCUS(wxLayoutWindow::OnKillFocus)
-
-#ifdef __WXMSW__
- EVT_SCROLLWIN(wxLayoutWindow::OnScroll)
-#endif // __WXMSW__
END_EVENT_TABLE()
// ----------------------------------------------------------------------------
@@ -172,8 +167,6 @@ wxLayoutWindow::wxLayoutWindow(wxWindow *parent)
SetWordWrap(false);
SetWrapMargin(0);
- m_needsRedraw = true;
-
// no scrollbars initially
m_hasHScrollbar =
m_hasVScrollbar = false;
@@ -249,7 +242,7 @@ wxLayoutWindow::DoClearWindow(bool noUpdate)
if ( !noUpdate )
{
- RequestUpdate((wxRect *)NULL);
+ RequestUpdate();
}
}
@@ -815,7 +808,7 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
}
ScrollToCursor();
// refresh the screen
- RequestUpdate(m_llist->GetUpdateRect());
+ RequestUpdate();
}
void
@@ -912,49 +905,6 @@ wxLayoutWindow::OnPaint( wxPaintEvent &WXUNUSED(event))
wxPaintDC dc(this);
#endif
- RequestUpdate();
-}
-
-// under MSW, idle events are not generated while the scrollbar is being
-// dragged, so no repainting occurs
-//
-// this probably should be fixed in wxMSW aas it surely affects other controls
-// as well, but for now fixing it here
-#ifdef __WXMSW__
-
-void
-wxLayoutWindow::OnScroll(wxScrollWinEvent& event)
-{
- InternalPaint(NULL);
-
- event.Skip();
-}
-
-#endif // __WXMSW__
-
-void
-wxLayoutWindow::RequestUpdate(const wxRect * /* updateRect */)
-{
- m_needsRedraw = true;
-}
-
-void
-wxLayoutWindow::OnIdle(wxIdleEvent &event)
-{
- if ( m_needsRedraw )
- {
- InternalPaint(NULL);
-
- m_needsRedraw = false;
- }
-
- event.Skip();
-}
-
-void
-wxLayoutWindow::InternalPaint(const wxRect *updateRect)
-{
- wxClientDC dc( this );
PrepareDC( dc );
#ifdef WXLAYOUT_USE_CARET
@@ -979,14 +929,6 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect)
return;
}
- if(updateRect)
- {
- WXLO_DEBUG(("Update rect: %ld,%ld / %ld,%ld",
- updateRect->x, updateRect->y,
- updateRect->x+updateRect->width,
- updateRect->y+updateRect->height));
- }
-
ResizeScrollbars(true);
WXLO_TIMER_START(TmpTimer);
@@ -1037,15 +979,6 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect)
}
// This is the important bit: we tell the list to draw itself
-#if WXLO_DEBUG_URECT
- if(updateRect)
- {
- WXLO_DEBUG(("Update rect: %ld,%ld / %ld,%ld",
- updateRect->x, updateRect->y,
- updateRect->x+updateRect->width,
- updateRect->y+updateRect->height));
- }
-#endif
// Device origins on the memDC are suspect, we translate manually
// with the translate parameter of Draw().
@@ -1070,11 +1003,7 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect)
#ifdef WXLO_PARTIAL_REFRESH
// This somehow doesn't work, but even the following bit with the
// whole rect at once is still a bit broken I think.
- wxRegionIterator ri;
- if(updateRect)
- ri = wxRegionIterator(*updateRect);
- else
- ri = wxRegionIterator(GetUpdateRegion());
+ wxRegionIterator ri(GetUpdateRegion());
if(ri)
while(ri)
{
@@ -1087,12 +1016,6 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect)
else
#endif
{
- // FIXME: Trying to copy only the changed parts, but it does not seem
- // to work:
-// x0 = updateRect->x; y0 = updateRect->y;
-// if(updateRect->height < y1)
-// y1 = updateRect->height;
-// y1 += WXLO_YOFFSET; //FIXME might not be needed
dc.Blit(x0, y0, x1, y1, &dcMem, 0, 0, wxCOPY, FALSE);
}
WXLO_TIMER_STOP(BlitTimer);
commit 9ed536f1c3f88cf48e274d986951d1d5041d3a9f
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Nov 12 18:51:48 2022 +0000
Remove unnecessary wc_str() conversion parameter
This fixes another deprecation warning when using the latest wx 3.3.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index b81911e8..99427e57 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -648,7 +648,7 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
// if not fall back to the same UTF-8 (which can always be used) as we use
// by default if no encoding was specified in the first place.
if ( enc == wxFONTENCODING_SYSTEM ||
- wxCSConv(enc).FromWChar(NULL, 0, in.wc_str(wxConvLibc)) == wxCONV_FAILED )
+ wxCSConv(enc).FromWChar(NULL, 0, in.wc_str()) == wxCONV_FAILED )
{
enc = wxFONTENCODING_UTF8;
}
commit 56c7a7718e042242d09a25f806347bbc5495a07c
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Nov 12 18:50:23 2022 +0000
Correct handling of folder names using modified UTF-7
This didn't work correctly due to a confusion between different
conversions, we need to pass wxConvUTF7 to mb_str() and not wc_str(),
where it never made any sense (and now results in a warning when using
the latest wx 3.3).
diff --git a/src/gui/wxFolderTree.cpp b/src/gui/wxFolderTree.cpp
index 9167fd5a..738dc9af 100644
--- a/src/gui/wxFolderTree.cpp
+++ b/src/gui/wxFolderTree.cpp
@@ -1686,7 +1686,7 @@ wxString wxFolderTreeNode::GetName() const
// valid IMAP modified UTF-7 mailbox name, convert to the encoding
// used by the GUI
- name << wxString(nameutf7.wc_str(wxConvUTF7), *wxConvUI);
+ name << nameutf7.mb_str(wxConvUTF7);
}
else // s != '&'
{
-----------------------------------------------------------------------
Summary of changes:
include/gui/wxlwindow.h | 15 ++-------
src/gui/wxFolderTree.cpp | 2 +-
src/gui/wxlwindow.cpp | 83 ++----------------------------------------------
src/mail/MimeDecode.cpp | 2 +-
4 files changed, 8 insertions(+), 94 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2022-08-20 15:54:58
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via bddbc6dcb76eca43aa9bb52952768fd688d60b3c (commit)
via cce06771ae973bc6441a47bca0c3cdcd7a875112 (commit)
via 05487c6e558918f42ad9c3bba65f036884680cde (commit)
via 65a3d2dcbe3ea18f001a5fade2f2cca908c51eb4 (commit)
from 228268b3143c16365fc0f76f15d4b86c8e640e1d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bddbc6dcb76eca43aa9bb52952768fd688d60b3c
Author: Vadim Zeitlin <va...@ze...>
Date: Sat Aug 20 17:25:40 2022 +0200
Avoid gcc 12 warnings about deprecated default special members
Define copy ctors and assignment operators that we need explicitly, even
by just making them default, to avoid gcc warnings about the use of
deprecated implicitly defined versions.
No real changes.
diff --git a/include/MObject.h b/include/MObject.h
index 9abdd456..4d12cd1a 100644
--- a/include/MObject.h
+++ b/include/MObject.h
@@ -56,6 +56,13 @@ public:
m_magic = MOBJECT_MAGIC;
Register();
}
+ MObject& operator=(const MObject &oldobj)
+ {
+ MOcheck();
+ oldobj.MOcheck();
+ return *this;
+ }
+
/** Check validity of this object.
This function should be called wherever such an object is used,
especially at the beginning of all methods.
@@ -99,8 +106,12 @@ protected:
/// a simple magic number as a validity check
int m_magic;
#else
+ MObject() = default;
+ MObject(const MObject&) = default;
+ MObject^ operator=(const MObject&) = default;
+
/// virtual destructor
- virtual ~MObject() {}
+ virtual ~MObject() = default;
/// empty MOcheck() method
void MOcheck(void) const {}
/// nothing
diff --git a/include/gui/wxllist.h b/include/gui/wxllist.h
index ddd4ad94..1fa97031 100644
--- a/include/gui/wxllist.h
+++ b/include/gui/wxllist.h
@@ -363,6 +363,9 @@ struct wxLayoutStyleInfo
wxColour *fg = NULL,
wxColour *bg = NULL,
wxFontEncoding enc = wxFONTENCODING_DEFAULT);
+
+ wxLayoutStyleInfo(const wxLayoutStyleInfo&) = default;
+
wxLayoutStyleInfo & operator=(const wxLayoutStyleInfo &right);
wxColour & GetBGColour() { return m_bg; }
diff --git a/src/modules/Filters.cpp b/src/modules/Filters.cpp
index f94ceb5e..5359007a 100644
--- a/src/modules/Filters.cpp
+++ b/src/modules/Filters.cpp
@@ -381,6 +381,8 @@ public:
}
#endif // DEBUG
+ Value& operator=(const Value&) = default;
+
bool IsValid(void) const
{ MOcheck(); return m_Type != Type_Error; }
bool IsNumber(void) const
commit cce06771ae973bc6441a47bca0c3cdcd7a875112
Author: Vadim Zeitlin <va...@ze...>
Date: Sat Aug 20 17:24:56 2022 +0200
Fix harmless spurious fall through warning from gcc 12
Add an explicit return to avoid the warning about falling through here.
diff --git a/src/gui/wxFiltersDialog.cpp b/src/gui/wxFiltersDialog.cpp
index febe0e01..77201e02 100644
--- a/src/gui/wxFiltersDialog.cpp
+++ b/src/gui/wxFiltersDialog.cpp
@@ -530,7 +530,8 @@ public:
case ORC_MF_Important: return _T("*");
case ORC_MF_Recent: return _T("R");
}
- CHECK( false, wxEmptyString, _T("Invalid test message flag") );
+ wxFAIL_MSG( "Invalid test message flag" );
+ return String();
// Argument is used, but not for spam or message flag
default:
commit 05487c6e558918f42ad9c3bba65f036884680cde
Author: Vadim Zeitlin <va...@ze...>
Date: Sat Aug 20 17:24:12 2022 +0200
Fix build with wxWidgets 3.2 without 3.0 compatibility
Don't use deprecated wxLogRecordInfo::timestamp, use timestampMS
instead.
diff --git a/src/gui/MImport.cpp b/src/gui/MImport.cpp
index 4c10b2d9..6d7a5a72 100644
--- a/src/gui/MImport.cpp
+++ b/src/gui/MImport.cpp
@@ -145,7 +145,7 @@ public:
const wxString& szString,
const wxLogRecordInfo& info)
{
- time_t t = info.timestamp;
+ const wxLongLong t = info.timestampMS;
m_dialog->GetLogListBox()->Append(
wxString::Format(_T("%s:\t%s"),
wxDateTime(t).FormatTime().c_str(),
commit 65a3d2dcbe3ea18f001a5fade2f2cca908c51eb4
Author: Vadim Zeitlin <va...@ze...>
Date: Sat Aug 20 17:20:00 2022 +0200
Remove ancient module for exporting address book in Palm format
Palm Pilot doesn't exist since 25 years, so drop the code exporting in
its format to avoid a number of warnings in it given by the latest gcc.
diff --git a/M.vcxproj b/M.vcxproj
index 07070ead..924b536a 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -591,7 +591,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'">true</ExcludedFromBuild>
</ClCompile>
- <ClCompile Include="src\adb\ExportPalm.cpp" />
<ClCompile Include="src\adb\ExportText.cpp" />
<ClCompile Include="src\adb\ExportVCard.cpp" />
<ClCompile Include="src\adb\ImportEudora.cpp" />
@@ -1536,4 +1535,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/M.vcxproj.filters b/M.vcxproj.filters
index f75f942a..388b8e3e 100644
--- a/M.vcxproj.filters
+++ b/M.vcxproj.filters
@@ -423,9 +423,6 @@
<ClCompile Include="src\adb\ProvPasswd.cpp">
<Filter>Source Files\adb\providers</Filter>
</ClCompile>
- <ClCompile Include="src\adb\ExportPalm.cpp">
- <Filter>Source Files\adb\impexp</Filter>
- </ClCompile>
<ClCompile Include="src\adb\ExportText.cpp">
<Filter>Source Files\adb\impexp</Filter>
</ClCompile>
@@ -978,4 +975,4 @@
<Filter>Source Files\interfaces\python\SWIG precompiled output</Filter>
</CustomBuild>
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/src/adb/ExportPalm.cpp b/src/adb/ExportPalm.cpp
deleted file mode 100644
index ec0e3363..00000000
--- a/src/adb/ExportPalm.cpp
+++ /dev/null
@@ -1,468 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Project: M
-// File name: adb/ExportPalm.cpp - export ADB data to PalmOS
-// addressbook format
-// Author: Karsten Ballüder (based on ExportText.cpp by Vadim Zeitlin)
-// Modified by:
-// Created: 09.10.99
-// CVS-ID: $Id$
-// Copyright: (c) 1999 Karsten Ballüder <bal...@gm...>
-// Licence: M license
-///////////////////////////////////////////////////////////////////////////////
-
-// ============================================================================
-// declarations
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "Mpch.h"
-
-#ifndef USE_PCH
-# include "Mcommon.h"
-
-# include "MApplication.h"
-# include "guidef.h"
-# include "Profile.h"
-
-# include <wx/log.h> // for wxLogMessage
-# include <wx/layout.h>
-#endif // USE_PCH
-
-#include <wx/textfile.h>
-#include <wx/ffile.h>
-
-#include "gui/wxDialogLayout.h"
-
-#include "adb/AdbEntry.h"
-#include "adb/AdbExport.h"
-
-// ----------------------------------------------------------------------------
-// private classes
-// ----------------------------------------------------------------------------
-
-// the exporter itself
-class AdbPalmExporter : public AdbExporter
-{
-public:
- virtual bool Export(AdbEntryGroup& group, const String& dest);
- virtual bool Export(const AdbEntry& entry, const String& dest);
-
- DECLARE_ADB_EXPORTER();
-
-protected:
- // the real workers
- static bool DoExportEntry(const AdbEntry& entry,
- wxFFile& file, wxString const &category,
- bool includeEmpty, bool includeComments);
-
- static bool DoExportGroup(AdbEntryGroup& group,
- wxFFile& file, wxString const &category,
- bool includeEmpty, bool includeComments);
-
- // helper to escape quote characters:
- static wxString EscapeQuotes(const wxString &str)
- {
- wxString s;
- for(size_t i = 0; i < str.Length(); i++)
- {
- if( str[i] == '"') s << '\\';
- s << str[i];
- }
- return s;
- }
-};
-
-// a helper dialog used to ask the user for the name of the file
-class wxAdbPalmExporterConfigDialog : public wxManuallyLaidOutDialog
-{
-public:
- // ctor
- wxAdbPalmExporterConfigDialog(const String& filename);
-
- // accessors which may be used after successful ShowModal()
- // get the filename (always not empty)
- const wxString& GetFileName() const { return m_filename; }
-
- // get the category name (always not empty)
- const wxString& GetCategoryName() const { return m_CategoryName; }
-
- // get the include empty flag
- bool GetIncludeEmpty() const { return m_IncludeEmpty; }
-
- // get the include empty flag
- bool GetIncludeComments() const { return m_IncludeComments; }
-
- // transfer the data from window
- virtual bool TransferDataFromWindow();
-
-private:
- // the profile path for saving the last file used
- static const wxChar *ms_profilePathLastFile;
- // the profile path for saving the last category used
- static const wxChar *ms_profilePathLastCategory;
- // the profile path for saving the include empty flag
- static const wxChar *ms_profileIncludeEmpty;
- // the profile path for saving the include comments flag
- static const wxChar *ms_profileIncludeComments;
-
- // the data
- wxString
- m_filename,
- m_CategoryName;
- int m_selection;
- bool m_IncludeEmpty, m_IncludeComments;
-
- // GUI controls
- wxComboBox *m_textCustomSep;
- wxTextCtrl *m_textFileName;
- wxTextCtrl *m_textCategoryName;
- wxCheckBox *m_checkIncludeEmpty, *m_checkIncludeComments;
-};
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// macros for dynamic exporter creation
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_ADB_EXPORTER(AdbPalmExporter,
- gettext_noop("PalmOS format address book exporter"),
- gettext_noop("PalmOS addressbook"),
- "Karsten Ballueder <bal...@gm...>");
-
-
-// ----------------------------------------------------------------------------
-// AdbPalmExporter
-// ----------------------------------------------------------------------------
-
-#undef ADD
-#define ADD(n) entry.GetField(n, &val); s << _T('"') << EscapeQuotes(val) << _T("\",")
-#define ADDP(prefix,n) entry.GetField(n, &val); \
-if(wxStrlen(val)) s << prefix; s << _T('"') << EscapeQuotes(val) << _T("\",")
-
-bool AdbPalmExporter::DoExportEntry(const AdbEntry& entry,
- wxFFile& file, const wxString &
- category, bool includeEmpty, bool includeComments)
-{
- /*
- The format:
- "category name";["address type";]"lastname","firstname","title","company","",
- "phone type";"phone1",
- "phone type";"phone1",
- "phone type";"phone1",
- "phone type";"phone1",
- "phone type";"phone1",
- "street & number", "town", "county", "postcode","country",
- "custom1","custom2","custom3","custom4","Notes","0"
-
- Types are: "Home", "Work", "E-mail", "Fax", "Other", "Main",
- "Pager", "Mobile"
-
- "Last","First","Titie","Org","wobk","home","fax","other","email","Add","Town",
- "County","Pcode","Uk","C1","C2","C3","C4","Note","0"
-
- */
-
- wxString s;
- s.Alloc(4096); // be generous and speed up the export
-
-/* It seems the category no longer gets written.
- s << '"' << category << "\";";
-*/
- // dump all the fields
- wxString val, tmp;
- entry.GetField(AdbField_FamilyName, &val);
- if(val.Length())
- {
- ADD(AdbField_FamilyName);
- ADD(AdbField_FirstName);
- }
- else
- {
- entry.GetField(AdbField_FullName, &val);
- if(val.Length() == 0 && ! includeEmpty) // no name
- return TRUE; // ignore entry
- s << '"' << EscapeQuotes(val) << _T("\",\"\",");
- }
- entry.GetField(AdbField_Prefix, &val);
- entry.GetField(AdbField_Title, &tmp);
- if(!tmp.empty()) val << ' ' << tmp;
- s << '"' << EscapeQuotes(val) << _T("\",");
- ADD(AdbField_Organization);
-
- s << _T("\"\","); // unknown field after company
- ADDP(_T("\"E-mail\";"), AdbField_EMail);
- ADDP(_T("\"Home\";"), AdbField_H_Phone);
- ADDP(_T("\"Fax\";"), AdbField_H_Fax);
- ADDP(_T("\"Work\";"), AdbField_O_Phone);
- ADDP(_T("\"Fax\";"), AdbField_O_Fax);
-
- entry.GetField(AdbField_H_City, &val);
- if(val.Length()) // has home address?
- {
- entry.GetField(AdbField_H_Street, &val);
- if(val.Length())
- {
- entry.GetField(AdbField_H_StreetNo, &tmp);
- if(!tmp.empty()) val << ' ' << tmp;
- if(! val) entry.GetField(AdbField_H_POBox, &val);
- s << '"' << val << _T("\",");
- }
- ADD(AdbField_H_City);
- ADD(AdbField_H_Locality);
- ADD(AdbField_H_Postcode);
- ADD(AdbField_H_Country);
- }
- else // take work address
- {
- entry.GetField(AdbField_O_Street, &val);
- if(val.Length())
- {
- entry.GetField(AdbField_O_StreetNo, &tmp);
- if(!tmp.empty()) val << ' ' << tmp;
- if(! val) entry.GetField(AdbField_O_POBox, &val);
- s << '"' << val << _T("\",");
- }
- ADD(AdbField_O_City);
- ADD(AdbField_O_Locality);
- ADD(AdbField_O_Postcode);
- ADD(AdbField_O_Country);
- }
-
- // custom fields:
- ADD(AdbField_Birthday);
- ADD(AdbField_HomePage);
- ADD(AdbField_ICQ);
- ADD(AdbField_NickName);
- if(includeComments)
- {
- ADD(AdbField_Comments);
- }
- else
- s << _T("\"\","); // empty comment
-
- s << _T("\"0\"");
- s += wxTextFile::GetEOL();
-
- return file.Write(s);
-}
-#undef ADD
-#undef ADDP
-
-bool AdbPalmExporter::DoExportGroup(AdbEntryGroup& group,
- wxFFile& file, const wxString &
- category, bool includeEmpty,
- bool includeComments)
-{
- // first, export all subgroups
- wxArrayString names;
- size_t nGroupCount = group.GetGroupNames(names);
- for ( size_t nGroup = 0; nGroup < nGroupCount; nGroup++ )
- {
- AdbEntryGroup *subgroup = group.GetGroup(names[nGroup]);
-
- bool ok = DoExportGroup(*subgroup, file, category, includeEmpty,
- includeComments);
- subgroup->DecRef();
-
- if ( !ok )
- {
- return FALSE;
- }
- }
-
- // and then all entries
- size_t nEntryCount = group.GetEntryNames(names);
- for ( size_t nEntry = 0; nEntry < nEntryCount; nEntry++ )
- {
- AdbEntry *entry = group.GetEntry(names[nEntry]);
-
- bool ok = DoExportEntry(*entry, file, category, includeEmpty,
- includeComments);
- entry->DecRef();
-
- if ( !ok )
- {
- return FALSE;
- }
- }
-
-
- return TRUE;
-}
-
-bool AdbPalmExporter::Export(AdbEntryGroup& group, const String& dest)
-{
- // try to guess a reasonable default name for the file to create
- wxString filename = dest;
- if ( !filename )
- {
- filename << group.GetDescription() << _T(".palm");
- }
-
- // get the name of the file to create
- wxAdbPalmExporterConfigDialog dialog(filename);
- if ( dialog.ShowModal() != wxID_OK )
- {
- // cancelled...
-
- return FALSE;
- }
-
- // create the file
- filename = dialog.GetFileName();
- wxFFile file(filename, _T("w"));
- if ( file.IsOpened() )
- {
- // export everything recursively
- if ( DoExportGroup(group, file, dialog.GetCategoryName(),
- dialog.GetIncludeEmpty(), dialog.GetIncludeComments() ) )
- {
- wxLogMessage(_("Successfully exported address book data to "
- "file '%s'"), filename.c_str());
-
- return TRUE;
- }
- }
-
- wxLogError(_("Export failed."));
-
- return FALSE;
-}
-
-bool AdbPalmExporter::Export(const AdbEntry& entry, const String& dest)
-{
- // TODO
- return FALSE;
-}
-
-// ----------------------------------------------------------------------------
-// wxAdbPalmExporterConfigDialog
-// ----------------------------------------------------------------------------
-
-const wxChar *wxAdbPalmExporterConfigDialog::ms_profilePathLastFile
- = _T("Settings/AdbPalmExportFile");
-
-const wxChar *wxAdbPalmExporterConfigDialog::ms_profilePathLastCategory
- = _T("Settings/AdbPalmExportCategory");
-
-const wxChar *wxAdbPalmExporterConfigDialog::ms_profileIncludeEmpty
- = _T("Settings/AdbPalmExportIncludeEmpty");
-
-const wxChar *wxAdbPalmExporterConfigDialog::ms_profileIncludeComments
- = _T("Settings/AdbPalmExportIncludeComments");
-
-wxAdbPalmExporterConfigDialog::wxAdbPalmExporterConfigDialog
- (
- const String& filenameOrig
- )
- : wxManuallyLaidOutDialog
- (
- NULL,
- _("Mahogany: Exporting address book"),
- _T("AdbTextExport")
- )
-{
- wxLayoutConstraints *c;
-
- // don't create the box because we have another one already and boxes inside
- // boxes look ugly
- (void)CreateStdButtonsAndBox(_("Configure export"), TRUE /* no box */);
-
- // put the items into an enhanced panel - even if we don't use scrolling
- // here, we may use functions like CreateFileEntry() like this
- wxEnhancedPanel *panel = new wxEnhancedPanel(this, FALSE /* no scrolling */);
- c = new wxLayoutConstraints;
- c->left.SameAs(this, wxLeft);
- c->right.SameAs(this, wxRight);
- c->top.SameAs(this, wxTop);
- c->bottom.Above(FindWindow(wxID_OK), -2*LAYOUT_Y_MARGIN);
- panel->SetConstraints(c);
-
- // all controls must be created on the canvas, not the panel itself
-// wxWindow *parent = panel->GetCanvas();
-
- // the text entry (with label and browse button) for choosing the file to
- // export to
- wxString label = _("&Filename to export to: ");
- int width;
- GetTextExtent(label, &width, NULL);
- m_textFileName = panel->CreateFileEntry(label, width, NULL,
- NULL, FALSE /* save */);
-
- // the category name entry (with label) for choosing the file to
- // export to
- label = _("&Addressbook Category: ");
- GetTextExtent(label, &width, NULL);
- m_textCategoryName = panel->CreateTextWithLabel(label, width, m_textFileName);
-
- label = _("&Include entries with no name: ");
- GetTextExtent(label, &width, NULL);
- m_checkIncludeEmpty = panel->CreateCheckBox(label,width,m_textCategoryName);
-
- label = _("&Include comments: ");
- GetTextExtent(label, &width, NULL);
- m_checkIncludeComments = panel->CreateCheckBox(label,width,m_checkIncludeEmpty);
-
- String filename = filenameOrig;
- if ( !filename )
- {
- Profile *appProfile = mApplication->GetProfile();
- filename = appProfile->readEntry(ms_profilePathLastFile, "mahogany.txt");
- }
-
- m_textFileName->SetValue(
- mApplication->GetProfile()->readEntry(ms_profilePathLastFile, ""));
-
- m_textCategoryName->SetValue(
- mApplication->GetProfile()->readEntry(ms_profilePathLastCategory, "Unfiled"));
- m_checkIncludeEmpty->SetValue(
- mApplication->GetProfile()->readEntry(ms_profileIncludeEmpty, 0) != 0);
- m_checkIncludeComments->SetValue(
- mApplication->GetProfile()->readEntry(ms_profileIncludeComments,1) != 0);
-
- // set the initial and minimal dialog size
- SetDefaultSize(5*wBtn, 8*hBtn);
-}
-
-bool wxAdbPalmExporterConfigDialog::TransferDataFromWindow()
-{
- m_filename = m_textFileName->GetValue();
- if ( !m_filename )
- {
- wxLogError(_("Please specify the file name!"));
-
- return FALSE;
- }
-
- mApplication->GetProfile()->writeEntry(ms_profilePathLastFile,
- m_filename);
-
- m_CategoryName = m_textCategoryName->GetValue();
- if ( !m_CategoryName )
- {
- wxLogError(_("Please specify the category name!"));
-
- return FALSE;
- }
-
- m_IncludeEmpty = m_checkIncludeEmpty->GetValue();
-
- m_IncludeComments = m_checkIncludeComments->GetValue();
-
- mApplication->GetProfile()->writeEntry(ms_profilePathLastFile,
- m_filename);
- mApplication->GetProfile()->writeEntry(ms_profilePathLastCategory,
- m_CategoryName);
- mApplication->GetProfile()->writeEntry(ms_profileIncludeEmpty,
- m_IncludeEmpty);
- mApplication->GetProfile()->writeEntry(ms_profileIncludeComments,
- m_IncludeComments);
- return TRUE;
-}
-
-----------------------------------------------------------------------
Summary of changes:
M.vcxproj | 3 +-
M.vcxproj.filters | 5 +-
include/MObject.h | 13 +-
include/gui/wxllist.h | 3 +
src/adb/ExportPalm.cpp | 468 --------------------------------------------
src/gui/MImport.cpp | 2 +-
src/gui/wxFiltersDialog.cpp | 3 +-
src/modules/Filters.cpp | 2 +
8 files changed, 22 insertions(+), 477 deletions(-)
delete mode 100644 src/adb/ExportPalm.cpp
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Nerijus Baliūn. <mah...@us...> - 2022-05-09 20:44:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 228268b3143c16365fc0f76f15d4b86c8e640e1d (commit)
from 791b9f972459b7ed17255cd4cd64fd675b594d8c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 228268b3143c16365fc0f76f15d4b86c8e640e1d
Author: Nerijus Baliūnas <ne...@us...>
Date: Mon May 9 23:42:47 2022 +0300
Fix compilation with OpenSSL 3.0
diff --git a/src/util/ssl.cpp b/src/util/ssl.cpp
index 4483f4ef..450d3390 100644
--- a/src/util/ssl.cpp
+++ b/src/util/ssl.cpp
@@ -115,6 +115,13 @@ extern const MOption MP_SSL_DLL_SSL;
#else
#define ssl_const111
#endif
+// OpenSSL 3.0
+#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ #define ssl_const30 const
+ #define SSL_get_peer_certificate SSL_get1_peer_certificate
+#else
+ #define ssl_const30
+#endif
/* This is our interface to the library and auth_ssl.c in c-client
which are all in "C" */
@@ -200,9 +207,9 @@ SSL_DEF( int, SSL_CTX_use_certificate_chain_file, (SSL_CTX *ctx, const char *fil
SSL_DEF( int, SSL_CTX_use_RSAPrivateKey_file, (SSL_CTX *ctx, const char *file, int type), (ctx,file,type) );
SSL_DEF_VOID( SSL_CTX_set_tmp_rsa_callback, (SSL_CTX *ctx, RSA *(*cb)(SSL *,int, int)), (ctx,cb) );
SSL_DEF( int, SSL_accept, (SSL *ssl), (ssl) );
-SSL_DEF( int, X509_STORE_CTX_get_error, (X509_STORE_CTX *ctx), (ctx) );
+SSL_DEF( int, X509_STORE_CTX_get_error, (ssl_const30 X509_STORE_CTX *ctx), (ctx) );
SSL_DEF( const char *, X509_verify_cert_error_string, (long n), (n) );
-SSL_DEF( X509 *, X509_STORE_CTX_get_current_cert, (X509_STORE_CTX *ctx), (ctx) );
+SSL_DEF( X509 *, X509_STORE_CTX_get_current_cert, (ssl_const30 X509_STORE_CTX *ctx), (ctx) );
SSL_DEF( X509_NAME *, X509_get_subject_name, (ssl_const110 X509 *a), (a) );
SSL_DEF( char *, X509_NAME_oneline, (ssl_const110 X509_NAME *a,char *buf,int size), (a,buf,size) );
SSL_DEF( void *, X509_get_ext_d2i, (ssl_const110 X509 *x, int nid, int *crit, int *idx), (x, nid, crit, idx) );
@@ -346,7 +353,12 @@ bool InitSSL(void) /* FIXME: MT */
SSL_LOOKUP(SSL_get_fd);
SSL_LOOKUP(SSL_set_fd);
SSL_LOOKUP(SSL_get_error);
+// OpenSSL 3.0
+#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ SSL_LOOKUP(SSL_get1_peer_certificate);
+#else
SSL_LOOKUP(SSL_get_peer_certificate);
+#endif
SSL_LOOKUP(RAND_seed);
SSL_LOOKUP(BIO_new_socket);
SSL_LOOKUP(BIO_new_mem_buf);
-----------------------------------------------------------------------
Summary of changes:
src/util/ssl.cpp | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2021-02-24 12:41:22
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via e730c3820de494f931fe8b0e1fa4b7aa874a2331 (commit)
from 566f4ab86549de6a7ed6e625e0821f6e3c5e88a2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e730c3820de494f931fe8b0e1fa4b7aa874a2331
Author: Vadim Zeitlin <vz-...@ze...>
Date: Wed Feb 24 13:39:23 2021 +0100
Use a wxPanel, not just a wxWindow, as viewer window parent
This fixes using TAB for navigating out of the viewer since the changes
in 247bb98d07 (Generate Enter/Tab events even in readonly MSW
wxTextCtrl, 2021-01-29) in wxWidgets.
diff --git a/src/gui/wxMessageView.cpp b/src/gui/wxMessageView.cpp
index d633f167..aa8472e1 100644
--- a/src/gui/wxMessageView.cpp
+++ b/src/gui/wxMessageView.cpp
@@ -195,7 +195,7 @@ wxMessageView::wxMessageView(wxWindow *parent,
// OnViewerChange() for the initial dummy viewer
m_FolderView = NULL;
- m_viewerParent = new wxWindow(parent, wxID_ANY);
+ m_viewerParent = new wxPanel(parent);
m_infobar = new wxInfoBar(m_viewerParent);
// Don't delay showing the error messages with unnecessary effects.
-----------------------------------------------------------------------
Summary of changes:
src/gui/wxMessageView.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2021-01-04 23:16:07
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 566f4ab86549de6a7ed6e625e0821f6e3c5e88a2 (commit)
via b0490673f557cbbd7c777f74fb84c3e05f529486 (commit)
from a89d73c33234732c0ddba4c4644ff981e6c95fef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 566f4ab86549de6a7ed6e625e0821f6e3c5e88a2
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jan 5 00:14:56 2021 +0100
Fix warning about inconsistent operators redefinition in iterator
Tell the compiler to generate both copy ctor and assignment operator
instead of defining the former one but leaving the latter one to be
default-generated.
diff --git a/include/lists.h b/include/lists.h
index 72acbf3d..d85c9232 100644
--- a/include/lists.h
+++ b/include/lists.h
@@ -123,7 +123,8 @@ public: \
@param n if not NULL, the node to which to point \
*/ \
inline iterator(ListNode *n = NULL) : node(n) {} \
- inline iterator(const iterator &i) : node(i.node) {} \
+ iterator(const iterator &i) = default; \
+ iterator& operator=(const iterator &i) = default; \
/** Dereference operator. \
@return the data pointer of the node belonging to this \
iterator \
commit b0490673f557cbbd7c777f74fb84c3e05f529486
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jan 5 00:13:25 2021 +0100
Make wxHTML VFS file names not only simpler, but correct
This fixes a bug introduced in 5214239b0 (Make wxHTML VFS file names
simpler and more unique, 2020-12-07) which never reused a VFS name,
meaning that the same attachment used different names when it was added
and when trying to remove it later, triggering an assert and a memory
leak as the attachment was never actually removed.
diff --git a/src/modules/HtmlViewer.cpp b/src/modules/HtmlViewer.cpp
index f06a619a..1e683bfa 100644
--- a/src/modules/HtmlViewer.cpp
+++ b/src/modules/HtmlViewer.cpp
@@ -193,9 +193,16 @@ private:
bool m_hasHtmlContents;
+ // This is used in GetVirtualFileName() to ensure that the names we return
+ // from there are distinct for different objects by incrementing this
+ // counter every time a new viewer object is created.
+ static unsigned long s_viewerCount;
+
DECLARE_MESSAGE_VIEWER()
};
+unsigned long HtmlViewer::s_viewerCount = 0;
+
// ----------------------------------------------------------------------------
// HTML_Handler_META: wxHTML handler for the <meta> tag, see EncodingChanger
// ----------------------------------------------------------------------------
@@ -580,6 +587,8 @@ IMPLEMENT_MESSAGE_VIEWER(HtmlViewer,
HtmlViewer::HtmlViewer()
{
+ s_viewerCount++;
+
wxFileSystem::AddHandler(new wxInternetFSHandler);
m_window = NULL;
@@ -870,10 +879,7 @@ int HtmlViewer::CalculateFontSize(const wxFont& font)
wxString HtmlViewer::GetVirtualFileName(size_t n) const
{
- // the image file names must be globally unique, so use a counter to ensure
- // we never reuse it
- static unsigned long s_htmlImage = 0;
- return wxString::Format(_T("Mhtml%08lx%zd.png"), ++s_htmlImage, n);
+ return wxString::Format(_T("Mhtml%08lx%zd.png"), s_viewerCount, n);
}
wxString HtmlViewer::CreateImageInMemoryFS(const wxImage& image)
-----------------------------------------------------------------------
Summary of changes:
include/lists.h | 3 ++-
src/modules/HtmlViewer.cpp | 14 ++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2020-12-07 02:26:32
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via a89d73c33234732c0ddba4c4644ff981e6c95fef (commit)
via 5214239b00d8ec5a591f3a06175394ea0efd2cd8 (commit)
via 34d06bf0e7d6b081a727e6abf3704c45945b49e8 (commit)
via bf0ee0fa3afa6a07f25e152f6d43850459f380e6 (commit)
from 3dfac8814400d46cc8ed7ade7ad4656a06c103d2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a89d73c33234732c0ddba4c4644ff981e6c95fef
Author: Vadim Zeitlin <vz-...@ze...>
Date: Mon Dec 7 03:25:39 2020 +0100
Simplify opening URLs in the simple case
Just use wxLaunchDefaultBrowser() instead of calling ShellExecute()
directly, this is simpler and doesn't require any platform checks.
diff --git a/src/gui/ClickURL.cpp b/src/gui/ClickURL.cpp
index f477e9c9..93c470d1 100644
--- a/src/gui/ClickURL.cpp
+++ b/src/gui/ClickURL.cpp
@@ -446,10 +446,7 @@ void ClickableURL::OpenInBrowser(int options) const
}
else // easy case: open in the same window
{
-#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__WINE__) // FIXME ShellExecute() is defined in <w32api/shellapi.h>, how to include it?
- bOk = (int)ShellExecute(NULL, _T("open"), m_url,
- NULL, NULL, SW_SHOWNORMAL ) > 32;
-#endif
+ bOk = wxLaunchDefaultBrowser(m_url, wxBROWSER_NOBUSYCURSOR);
}
#else // Unix
// propose to choose program for opening URLs
commit 5214239b00d8ec5a591f3a06175394ea0efd2cd8
Author: Vadim Zeitlin <vz-...@ze...>
Date: Mon Dec 7 03:21:07 2020 +0100
Make wxHTML VFS file names simpler and more unique
Using "this" pointer to ensure uniqueness doesn't really work as it's
perfectly possible to create another HtmlViewer using the same memory
location as a previously existing one, so just use a monotone counter
instead: this is both simpler and more reliable.
And it also doesn't trigger any warnings about pointer truncation in 64
bit MSW builds.
diff --git a/src/modules/HtmlViewer.cpp b/src/modules/HtmlViewer.cpp
index dc5a8996..f06a619a 100644
--- a/src/modules/HtmlViewer.cpp
+++ b/src/modules/HtmlViewer.cpp
@@ -870,10 +870,10 @@ int HtmlViewer::CalculateFontSize(const wxFont& font)
wxString HtmlViewer::GetVirtualFileName(size_t n) const
{
- // the image file names must be globally unique, so concatenate the address
- // of this object together with counter to obtain a really unique name
- return wxString::Format(_T("Mhtml%08lx%lu.png"),
- (unsigned long)this, (unsigned long)n);
+ // the image file names must be globally unique, so use a counter to ensure
+ // we never reuse it
+ static unsigned long s_htmlImage = 0;
+ return wxString::Format(_T("Mhtml%08lx%zd.png"), ++s_htmlImage, n);
}
wxString HtmlViewer::CreateImageInMemoryFS(const wxImage& image)
commit 34d06bf0e7d6b081a727e6abf3704c45945b49e8
Author: Vadim Zeitlin <vz-...@ze...>
Date: Mon Dec 7 03:19:19 2020 +0100
Remove hard-coded Python paths from the project file
Python headers path must be specified via python.vsprops.
diff --git a/M.vcxproj b/M.vcxproj
index bf45de23..07070ead 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -280,7 +280,7 @@
<ClCompile>
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;w:\dev\lang\python\2.7.3\Include;w:\dev\lang\python\2.7.3\PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
commit bf0ee0fa3afa6a07f25e152f6d43850459f380e6
Author: Vadim Zeitlin <vz-...@ze...>
Date: Mon Dec 7 00:23:12 2020 +0100
Remove obsolete MSVS 2008 project file
This is not used any more since a very long time.
diff --git a/Mconfig.vcproj b/Mconfig.vcproj
deleted file mode 100644
index 0022eed4..00000000
--- a/Mconfig.vcproj
+++ /dev/null
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="config"
- ProjectGUID="{86C1D2C7-C961-4017-88E8-63D0BCCBD0D5}"
- RootNamespace="config"
- Keyword="MakeFileProj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\Debug"
- IntermediateDirectory=".\Debug"
- ConfigurationType="10"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\Debug/Mconfig.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\Release"
- IntermediateDirectory=".\Release"
- ConfigurationType="10"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName=".\Release/Mconfig.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="10"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- TypeLibraryName=".\Debug/Mconfig.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="10"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- TypeLibraryName=".\Release/Mconfig.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="include\config_nt.h"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Copying $(InputPath) to config.h..."
- CommandLine="copy "$(InputPath)" "$(InputDir)"config.h
"
- Outputs="$(InputDir)config.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Copying $(InputPath) to config.h..."
- CommandLine="copy "$(InputPath)" "$(InputDir)"config.h
"
- Outputs="$(InputDir)config.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Copying $(InputPath) to config.h..."
- CommandLine="copy "$(InputPath)" "$(InputDir)"config.h
"
- Outputs="$(InputDir)config.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Copying $(InputPath) to config.h..."
- CommandLine="copy "$(InputPath)" "$(InputDir)"config.h
"
- Outputs="$(InputDir)config.h"
- />
- </FileConfiguration>
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
-----------------------------------------------------------------------
Summary of changes:
M.vcxproj | 2 +-
Mconfig.vcproj | 171 ---------------------------------------------
src/gui/ClickURL.cpp | 5 +-
src/modules/HtmlViewer.cpp | 8 +--
4 files changed, 6 insertions(+), 180 deletions(-)
delete mode 100644 Mconfig.vcproj
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2020-11-22 22:26:36
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 3dfac8814400d46cc8ed7ade7ad4656a06c103d2 (commit)
from e3c352d7c60b383728918d290701d36ba0a45552 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3dfac8814400d46cc8ed7ade7ad4656a06c103d2
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sun Nov 22 23:24:29 2020 +0100
Undefine min after including c-client headers too
Fix compilation error with MSVS 16.8 which now uses min() in its <list>
header and so got broken by its redefinition in c-client.
This should have been done back in 83b36c04d (Undefine max after include
c=client headers to fix compilation., 2012-01-09).
diff --git a/include/Mcclient.h b/include/Mcclient.h
index 438f76b9..8ea77ae6 100644
--- a/include/Mcclient.h
+++ b/include/Mcclient.h
@@ -60,8 +60,9 @@ extern "C"
# undef SendMessage
# endif // OS_WIN
- // misc.h redefines max as Max breaking standard headers compilation
+ // misc.h redefines min/max as Min/Max breaking standard headers compilation
# undef max
+# undef min
// finally it also defines the name commonly used as C++ template parameter!
# undef T
-----------------------------------------------------------------------
Summary of changes:
include/Mcclient.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2020-11-14 16:26:18
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via e3c352d7c60b383728918d290701d36ba0a45552 (commit)
from 9c06cb92836356044f8d69644cf2ff9a280ef473 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e3c352d7c60b383728918d290701d36ba0a45552
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Nov 14 01:28:46 2020 +0100
Add option for addresses not to reply to automatically
This is useful in order not to include some special sender addresses in
the replies automatically.
diff --git a/CHANGES b/CHANGES
index adeb7f4d..de38e03a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,7 @@
Release 0.68 'Cynthia' September xx, 2010
-----------------------------------------
+2020-11-14 VZ: Add option for addresses not to reply to automatically.
2015-08-28 NB: Removed "Browser is Netscape" and "Open in new window" and
added "Open in another browser" instead
2015-03-11 VZ: Make it simpler to specify the attachment names in the message.
diff --git a/include/Moptions.h b/include/Moptions.h
index 1248f1ba..4b4b12a6 100644
--- a/include/Moptions.h
+++ b/include/Moptions.h
@@ -212,6 +212,7 @@ extern const MOption MP_COMPOSE_SHOW_FROM;
extern const MOption MP_DEFAULT_REPLY_KIND;
extern const MOption MP_LIST_ADDRESSES;
extern const MOption MP_EQUIV_ADDRESSES;
+extern const MOption MP_NEVER_SEND_TO_ADDRESSES;
extern const MOption MP_REPLY_PREFIX;
extern const MOption MP_FORWARD_PREFIX;
extern const MOption MP_REPLY_COLLAPSE_PREFIX;
@@ -836,6 +837,8 @@ extern const MOption MP_OPTION_ORIGIN_INHERITED;
#define MP_LIST_ADDRESSES_NAME "MLAddresses"
/// array of equivalent address pairs
#define MP_EQUIV_ADDRESSES_NAME "EquivAddresses"
+/// array of addresses to never send email to
+#define MP_NEVER_SEND_TO_ADDRESSES_NAME "NeverSendToAddresses"
/// prefix for subject in replies
#define MP_REPLY_PREFIX_NAME "ReplyPrefix"
/// prefix for subject in forwards
@@ -1697,6 +1700,8 @@ extern const MOption MP_OPTION_ORIGIN_INHERITED;
#define MP_LIST_ADDRESSES_DEFVAL ""
/// array of equivalent address pairs
#define MP_EQUIV_ADDRESSES_DEFVAL ""
+/// array of addresses to never send email to
+#define MP_NEVER_SEND_TO_ADDRESSES_DEFVAL ""
/// prefix for subject in replies
#define MP_REPLY_PREFIX_DEFVAL "Re: "
/// prefix for subject in forwards
diff --git a/src/classes/Moptions.cpp b/src/classes/Moptions.cpp
index 3e0d7250..4f9d73ed 100644
--- a/src/classes/Moptions.cpp
+++ b/src/classes/Moptions.cpp
@@ -272,6 +272,7 @@ const MOption MP_COMPOSE_BCC;
const MOption MP_COMPOSE_SHOW_FROM;
const MOption MP_LIST_ADDRESSES;
const MOption MP_EQUIV_ADDRESSES;
+const MOption MP_NEVER_SEND_TO_ADDRESSES;
const MOption MP_DEFAULT_REPLY_KIND;
const MOption MP_REPLY_PREFIX;
const MOption MP_FORWARD_PREFIX;
@@ -694,6 +695,7 @@ static const MOptionData MOptions[] =
DEFINE_OPTION(MP_COMPOSE_SHOW_FROM),
DEFINE_OPTION(MP_LIST_ADDRESSES),
DEFINE_OPTION(MP_EQUIV_ADDRESSES),
+ DEFINE_OPTION(MP_NEVER_SEND_TO_ADDRESSES),
DEFINE_OPTION(MP_DEFAULT_REPLY_KIND),
DEFINE_OPTION(MP_REPLY_PREFIX),
DEFINE_OPTION(MP_FORWARD_PREFIX),
diff --git a/src/gui/wxOptionsDlg.cpp b/src/gui/wxOptionsDlg.cpp
index abf2ad15..cf48ecc1 100644
--- a/src/gui/wxOptionsDlg.cpp
+++ b/src/gui/wxOptionsDlg.cpp
@@ -515,6 +515,8 @@ enum ConfigFields
ConfigField_AutoCollectOutgoing,
ConfigField_WhiteListHelp,
ConfigField_WhiteList,
+ ConfigField_NeverSendToAddressesHelp,
+ ConfigField_NeverSendToAddresses,
ConfigField_EquivAddressesHelp,
ConfigField_EquivAddresses,
#ifdef USE_BBDB
@@ -1774,6 +1776,13 @@ const wxOptionsPage::FieldInfo wxOptionsPageStandard::ms_aFields[] =
Field_Message, -1 },
{ gettext_noop("Addresses in &white list"), Field_List, -1 },
+ { gettext_noop("\nThis is a list of addresses that Mahogany will never add "
+ "to the recipients list automatically,\n"
+ "e.g. when replying. This can be useful to e.g. avoid "
+ "accidentally replying to addresses always sending a bounce back."),
+ Field_Message, -1 },
+ { gettext_noop("Addresses to &never send messages to"), Field_List, -1 },
+
{ gettext_noop("\nYou can add strings of the form \"<address1>=<address2>\" "
"here to indicate that\n"
"Mahogany should treat these addresses as being equivalent.\n"
@@ -2321,6 +2330,8 @@ const ConfigValueDefault wxOptionsPageStandard::ms_aConfigDefaults[] =
CONFIG_NONE(),
CONFIG_ENTRY(MP_WHITE_LIST),
CONFIG_NONE(),
+ CONFIG_ENTRY(MP_NEVER_SEND_TO_ADDRESSES),
+ CONFIG_NONE(),
CONFIG_ENTRY(MP_EQUIV_ADDRESSES),
#ifdef USE_BBDB
CONFIG_NONE(),
@@ -3301,7 +3312,7 @@ bool wxOptionsPage::GetListboxFromButtonEvent(const wxEvent& event,
break;
}
- CHECK( data, false, _T("button even from foreign lbox?") );
+ CHECK( data, false, _T("button event from foreign lbox?") );
if ( pLbox )
*pLbox = lbox;
@@ -4296,12 +4307,19 @@ wxOptionsPageAdb::wxOptionsPageAdb(MBookCtrl *parent,
lboxDataWhiteList->m_lboxDlgPers = _T("LastWhiteList");
lboxDataWhiteList->m_next = lboxDataMLAddr;
+ LboxData *lboxDataNeverSendToList = new LboxData;
+ lboxDataNeverSendToList->m_idListbox = ConfigField_NeverSendToAddresses;
+ lboxDataNeverSendToList->m_lboxDlgTitle = _("Addresses to not send to automatically");
+ lboxDataNeverSendToList->m_lboxDlgPrompt = _("Address");
+ lboxDataNeverSendToList->m_lboxDlgPers = _T("LastNeverSendToList");
+ lboxDataNeverSendToList->m_next = lboxDataWhiteList;
+
LboxData *lboxDataEquivList = new LboxData;
lboxDataEquivList->m_idListbox = ConfigField_EquivAddresses;
lboxDataEquivList->m_lboxDlgTitle = _("Equivalent addresses");
lboxDataEquivList->m_lboxDlgPrompt = _("Pair of equivalent addresses");
lboxDataEquivList->m_lboxDlgPers = _T("LastEquivList");
- lboxDataEquivList->m_next = lboxDataWhiteList;
+ lboxDataEquivList->m_next = lboxDataNeverSendToList;
m_lboxData = lboxDataEquivList;
}
diff --git a/src/mail/MailFolder.cpp b/src/mail/MailFolder.cpp
index d2da3670..e2a2f36b 100644
--- a/src/mail/MailFolder.cpp
+++ b/src/mail/MailFolder.cpp
@@ -63,6 +63,7 @@ extern const MOption MP_FORWARD_PREFIX;
extern const MOption MP_FROM_REPLACE_ADDRESSES;
extern const MOption MP_IMAPHOST;
extern const MOption MP_LIST_ADDRESSES;
+extern const MOption MP_NEVER_SEND_TO_ADDRESSES;
extern const MOption MP_NNTPHOST;
extern const MOption MP_PERSONALNAME;
extern const MOption MP_POPHOST;
@@ -646,6 +647,10 @@ InitRecipients(Composer *cv,
String returnAddrs = READ_CONFIG(profile, MP_FROM_REPLACE_ADDRESSES);
wxArrayString ownAddresses = strutil_restore_array(returnAddrs);
+ // addresses to exclude
+ const wxArrayString excludedAddresses =
+ strutil_restore_array(READ_CONFIG(profile, MP_NEVER_SEND_TO_ADDRESSES));
+
// is this a message from ourselves?
bool fromMyself = false;
@@ -729,7 +734,9 @@ InitRecipients(Composer *cv,
while ( n-- )
{
- cv->AddRecipients(rcptAddresses[n], (RecipientType)rcptTypes[n]);
+ const String& addr = rcptAddresses[n];
+ if ( !Address::IsInList(excludedAddresses, addr) )
+ cv->AddRecipients(addr, (RecipientType)rcptTypes[n]);
}
return;
@@ -920,7 +927,9 @@ InitRecipients(Composer *cv,
while ( n-- )
{
- cv->AddRecipients(rcptAddresses[n], (RecipientType)rcptTypes[n]);
+ const String& addr = rcptAddresses[n];
+ if ( !Address::IsInList(excludedAddresses, addr) )
+ cv->AddRecipients(addr, (RecipientType)rcptTypes[n]);
}
}
-----------------------------------------------------------------------
Summary of changes:
CHANGES | 1 +
include/Moptions.h | 5 +++++
src/classes/Moptions.cpp | 2 ++
src/gui/wxOptionsDlg.cpp | 22 ++++++++++++++++++++--
src/mail/MailFolder.cpp | 13 +++++++++++--
5 files changed, 39 insertions(+), 4 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2020-06-04 08:27:12
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 9c06cb92836356044f8d69644cf2ff9a280ef473 (commit)
via 2764050c3b2d246d637926c75f9817fc48253de9 (commit)
via 5e484b6b8c4b0e31a836f56a0d013944ef519051 (commit)
via 256481caced80bc7decb50e9d675886d78306547 (commit)
via 39c05943248436bdf4f8a750da10603413b9a04a (commit)
via b59fab2325b5b893646cf95f9f15b773165ae8b3 (commit)
from 94b44f13ea224b3b430f09a4d65d1a68bbd00c12 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9c06cb92836356044f8d69644cf2ff9a280ef473
Merge: 94b44f13 2764050c
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat May 9 23:14:01 2020 +0200
Merge branch 'msvs-2019'
Use MSVS 2019 for building under MSW.
commit 2764050c3b2d246d637926c75f9817fc48253de9
Author: Vadim Zeitlin <vz-...@ze...>
Date: Mon Nov 4 17:28:29 2019 +0100
Use wxWidgets libraries built with MSVS 2019
This supposes that wxMSVC_VERSION_ABI_COMPAT is in use.
diff --git a/M.vcxproj b/M.vcxproj
index 2b6fbbc9..bf45de23 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -146,7 +146,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -162,7 +162,7 @@
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc140_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -179,7 +179,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -195,7 +195,7 @@
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>NotSet</ShowProgress>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc140_dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
@@ -214,7 +214,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -248,7 +248,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -281,7 +281,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;w:\dev\lang\python\2.7.3\Include;w:\dev\lang\python\2.7.3\PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -297,7 +297,7 @@
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc140_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -312,7 +312,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -328,7 +328,7 @@
<Link>
<AdditionalDependencies>imap.lib;compface.lib;dspam.lib;versit.lib;winmm.lib;comctl32.lib;rpcrt4.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)M.exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc140_dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(OutDir);$(wxwin)\lib\vc14x_dll;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<StackReserveSize>10000000</StackReserveSize>
@@ -345,7 +345,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -378,7 +378,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
commit 5e484b6b8c4b0e31a836f56a0d013944ef519051
Author: Vadim Zeitlin <vz-...@ze...>
Date: Mon Nov 4 17:24:22 2019 +0100
Remove old MSVS 200x project files
They can't be used for building M any more since many years.
diff --git a/M.vcproj b/M.vcproj
deleted file mode 100644
index 5e18028b..00000000
--- a/M.vcproj
+++ /dev/null
@@ -1,2942 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="M"
- ProjectGUID="{1515C8EB-5C72-43DF-9D3A-0703F155F268}"
- RootNamespace="M"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="release"
- IntermediateDirectory="release"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="include;"$(wxwin)/include/msvc";"$(wxwin)/include";lib/compface;lib/imap/src/osdep/nt;"lib/imap/src/c-client""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB"
- RuntimeLibrary="2"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Mpch.h"
- WarningLevel="4"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4100"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="include,$(wxwin)/include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="lib/imap/$(IntDir)/imap.lib lib/compface/$(IntDir)/compface.lib lib/dspam/$(IntDir)/dspam.lib src\wx\vcard\$(IntDir)\versit.lib winmm.lib comctl32.lib rpcrt4.lib ws2_32.lib"
- ShowProgress="0"
- OutputFile="$(OutDir)/M.exe"
- LinkIncremental="1"
- AdditionalLibraryDirectories="$(wxwin)\lib\vc_lib"
- IgnoreDefaultLibraryNames=""
- GenerateDebugInformation="true"
- GenerateMapFile="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- LinkTimeCodeGeneration="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="include;"$(wxwin)/include/msvc";"$(wxwin)/include";lib/compface;lib/imap/src/osdep/nt;"lib/imap/src/c-client""
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB"
- RuntimeLibrary="2"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Mpch.h"
- WarningLevel="4"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4100"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="include,$(wxwin)/include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="lib/imap/$(IntDir)/imap.lib lib/compface/$(IntDir)/compface.lib lib/dspam/$(IntDir)/dspam.lib src\wx\vcard\$(IntDir)\versit.lib winmm.lib comctl32.lib rpcrt4.lib ws2_32.lib"
- ShowProgress="0"
- OutputFile="$(OutDir)/M.exe"
- LinkIncremental="1"
- AdditionalLibraryDirectories="$(wxwin)\lib\vc_amd64_lib"
- IgnoreDefaultLibraryNames=""
- GenerateDebugInformation="true"
- GenerateMapFile="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="debug"
- IntermediateDirectory="debug"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm110"
- Optimization="0"
- AdditionalIncludeDirectories="include;"$(wxwin)/include/msvc";"$(wxwin)/include";lib/compface;lib/imap/src/osdep/nt;"lib/imap/src/c-client""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Mpch.h"
- WarningLevel="4"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4100"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="include,$(wxwin)/include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="lib/imap/$(IntDir)/imap.lib lib/compface/$(IntDir)/compface.lib lib/dspam/$(IntDir)/dspam.lib src\wx\vcard\$(IntDir)\versit.lib winmm.lib comctl32.lib rpcrt4.lib ws2_32.lib"
- OutputFile="$(OutDir)/M.exe"
- LinkIncremental="2"
- AdditionalLibraryDirectories="$(wxwin)\lib\vc_lib"
- IgnoreDefaultLibraryNames=""
- GenerateDebugInformation="true"
- SubSystem="2"
- StackReserveSize="10000000"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="include;"$(wxwin)/include/msvc";"$(wxwin)/include";lib/compface;lib/imap/src/osdep/nt;"lib/imap/src/c-client""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_UNICODE;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Mpch.h"
- WarningLevel="4"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4100"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="include,$(wxwin)/include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="lib/imap/$(IntDir)/imap.lib lib/compface/$(IntDir)/compface.lib lib/dspam/$(IntDir)/dspam.lib src\wx\vcard\$(IntDir)\versit.lib winmm.lib comctl32.lib rpcrt4.lib ws2_32.lib"
- OutputFile="$(OutDir)/M.exe"
- LinkIncremental="2"
- AdditionalLibraryDirectories="$(wxwin)\lib\vc_amd64_lib"
- IgnoreDefaultLibraryNames=""
- GenerateDebugInformation="true"
- SubSystem="2"
- StackReserveSize="10000000"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <Filter
- Name="classes"
- >
- <File
- RelativePath=".\src\classes\CacheFile.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\ComposeTemplate.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\ConfigSource.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\ConfigSourcesAll.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\FolderMonitor.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\FolderView.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\kbList.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\ListReceiver.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MApplication.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MessageTemplate.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MessageView.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MEvent.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MFilter.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MFolder.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MModule.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\MObject.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\classes\Moptions.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\Mpers.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\NewMailNotifier.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\PathFinder.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\PGPClickInfo.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\Profile.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\QuotedText.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\Sequence.cpp"
- >
- </File>
- <File
- RelativePath=".\src\classes\XFace.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="SYSV32"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="SYSV32"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="SYSV32"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="SYSV32"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="gui"
- >
- <File
- RelativePath=".\src\gui\AddressExpander.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\ClickAtt.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\ClickURL.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\ConfigSourceChoice.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\CreateFolderWizard.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\ImportFoldersWizard.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\Mdnd.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\MImport.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxAttachDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxBrowseButton.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxColumnsDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxComposeView.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxDialogLayout.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxFiltersDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxFolderMenu.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxFolderTree.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxFolderView.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxHeadersDialogs.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxIconManager.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMainFrame.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMApp.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMDialogs.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMenuDefs.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMessageView.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMFolderDialogs.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMFrame.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMGuiUtils.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMimeDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMIMETreeDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxModulesDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMsgCmdProc.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxMSplash.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxOptionsDlg.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxRenameDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxSearchDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxSortDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxSubfoldersDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxTemplateDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxTextDialog.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxThrDialog.cpp"
- >
- </File>
- <Filter
- Name="layout"
- >
- <File
- RelativePath=".\src\gui\wxllist.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxlparser.cpp"
- >
- </File>
- <File
- RelativePath=".\src\gui\wxlwindow.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="wx"
- >
- <File
- RelativePath=".\src\wx\generic\persctrl.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="0"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="wx/wxprec.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="wx/wxprec.h"
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="mail"
- >
- <File
- RelativePath=".\src\mail\Address.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\AddressCC.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\ASMailFolder.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\FolderType.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\HeaderInfoImpl.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\HeaderIterator.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\LogCircle.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MailFolder.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MailFolderCC.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MailFolderCmn.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MailMH.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\Message.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MessageCC.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MFCache.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MFDriver.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MFPool.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MFui.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MimeDecode.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MimePartCC.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MimePartCCBase.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MimePartVirtual.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\MimeType.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\Pop3.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\SendMessageCC.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\Sorting.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\SpamFilter.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\Threading.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\ThreadJWZ.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\VFolder.cpp"
- >
- </File>
- <File
- RelativePath=".\src\mail\VMessage.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="adb"
- >
- <File
- RelativePath=".\src\adb\AdbDialogs.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\AdbEntry.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\AdbExport.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\AdbFrame.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\AdbImport.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\AdbManager.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\AdbModule.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\AdbProvider.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\Collect.cpp"
- >
- </File>
- <Filter
- Name="providers"
- >
- <File
- RelativePath=".\src\adb\ProvBbdb.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\adb\ProvDummy.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ProvFC.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ProvLine.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\adb\ProvPalm.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\adb\ProvPasswd.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="impexp"
- >
- <File
- RelativePath=".\src\adb\ExportPalm.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ExportText.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ExportVCard.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ImportEudora.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ImportMailrc.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\adb\ImportPine.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ImportText.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ImportVCard.cpp"
- >
- </File>
- <File
- RelativePath=".\src\adb\ImportXFMail.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="interfaces"
- >
- <File
- RelativePath=".\include\MInterface.mid"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Creating MInterface.h and .cpp"
- CommandLine="extra\scripts\m4.bat $(InputDir) $(InputDir)
"
- AdditionalDependencies="$(InputDir)/MInterface.mid;$(InputDir)/MInterface.cpp.m4;$(InputDir)/MInterface.h.m4;$(InputDir)/mid2cpp.m4;$(InputDir)/mid2h.m4"
- Outputs="$(InputDir)/MInterface.cpp;$(InputDir)/MInterface.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Creating MInterface.h and .cpp"
- CommandLine="extra\scripts\m4.bat $(InputDir) $(InputDir)
"
- AdditionalDependencies="$(InputDir)/MInterface.mid;$(InputDir)/MInterface.cpp.m4;$(InputDir)/MInterface.h.m4;$(InputDir)/mid2cpp.m4;$(InputDir)/mid2h.m4"
- Outputs="$(InputDir)/MInterface.cpp;$(InputDir)/MInterface.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Creating MInterface.h and .cpp"
- CommandLine="extra\scripts\m4.bat $(InputDir) $(InputDir)
"
- AdditionalDependencies="$(InputDir)/MInterface.mid;$(InputDir)/MInterface.cpp.m4;$(InputDir)/MInterface.h.m4;$(InputDir)/mid2cpp.m4;$(InputDir)/mid2h.m4"
- Outputs="$(InputDir)/MInterface.cpp;$(InputDir)/MInterface.h"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Creating MInterface.h and .cpp"
- CommandLine="extra\scripts\m4.bat $(InputDir) $(InputDir)
"
- AdditionalDependencies="$(InputDir)/MInterface.mid;$(InputDir)/MInterface.cpp.m4;$(InputDir)/MInterface.h.m4;$(InputDir)/mid2cpp.m4;$(InputDir)/mid2h.m4"
- Outputs="$(InputDir)/MInterface.cpp;$(InputDir)/MInterface.h"
- />
- </FileConfiguration>
- </File>
- <Filter
- Name="python"
- >
- <File
- RelativePath=".\src\Python\InitPython.cpp"
- >
- </File>
- <File
- RelativePath=".\src\Python\PythonDll.cpp"
- >
- </File>
- <File
- RelativePath=".\src\Python\PythonHelp.cpp"
- >
- </File>
- <Filter
- Name="SWIG output"
- >
- <File
- RelativePath=".\src\Python\HeaderInfo_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\MailFolder_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\MDialogs_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\Message_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\MimePart_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\MimeType_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\SendMessage_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\swiglib_swig.cpp"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED,SWIG_GLOBAL"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED,SWIG_GLOBAL"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED,SWIG_GLOBAL"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="STATIC_LINKED,SWIG_GLOBAL"
- UsePrecompiledHeader="0"
- WarningLevel="1"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="SWIG precompiled output"
- >
- <File
- RelativePath=".\src\Python\HeaderInfo.cpp-swig"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\MailFolder.cpp-swig"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\MDialogs.cpp-swig"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\Message.cpp-swig"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\src\Python\MimePart.cpp-swig"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- Description="Updating SWIG-generated sources"
- CommandLine="copy $(InputPath) $(InputDir)\$(InputName)_swig.cpp
"
- Outputs="$(InputDir)\$(InputName)_swig.cpp"
- />
- </FileConfiguratio...
[truncated message content] |
|
From: Vadim Z. <mah...@us...> - 2020-06-02 13:31:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 94b44f13ea224b3b430f09a4d65d1a68bbd00c12 (commit)
via 949b0c0748f77a655e077cd784441429811e65c8 (commit)
via 6fe1aeb63bf7a28fd14f750da69dea300f4d214a (commit)
via 1db144f5c548581f48e87e5748cd3f1c4feadb11 (commit)
via a79b4310b2e04d3996d01d535a12b2ec31a43409 (commit)
via 75f6f2bd2736ab8578ec590f034b147d30be3cb1 (commit)
via 3238eeef7b14bc9f1831755b2c71c5f448bb8f44 (commit)
via 84250ab6b1c92054246636f3d589f510ce612353 (commit)
via 8f806c0b075dcbe215a4d275a775136e5a7eec3f (commit)
via e1fa3d1e83c633be0c8748adadfafbff11542e84 (commit)
via ceb13204e99ef7d8e64ffe45707560034e4e9eae (commit)
via fe735b51283fa64c7f4bd848c2bfdce7cebf689b (commit)
via e9738339a48db903847f100276073cbeb071ebe9 (commit)
via 23fd7ce3af9084c0acb560744e03275a9389fff3 (commit)
from e59220506721b3213367771e4cb3301e21181df8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 94b44f13ea224b3b430f09a4d65d1a68bbd00c12
Merge: 949b0c07 8f806c0b
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 15:31:08 2020 +0200
Merge branch 'c-client-warnings'
Fix gcc warnings in c-client build under (relatively) modern Linux.
commit 949b0c0748f77a655e077cd784441429811e65c8
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 15:29:10 2020 +0200
Avoid gcc 8+ implicit fall through warnings
Relax the level of -Wimplicit-fallthrough to recognize more of the
existing comments; add missing ones; rewrite code where the use of
fall through wasn't really needed and use wxFALLTHROUGH in one place
where gcc didn't want to recognize the comment no matter what.
diff --git a/configure.ac b/configure.ac
index 98a0e2fa..ca49b37e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1462,6 +1462,11 @@ case "$GXX" in yes)
dnl avoided if we stop using the PCH or if we change all the code using
dnl wx event table macros to use Bind() instead.
M_ADD_CXXFLAGS_IF_SUPPORTED(-Wno-cast-function-type)
+
+ dnl Relax gcc checks for "fall through" comments: there are many of
+ dnl those that don't match the default strict checks (level 4) enabled
+ dnl by -Wextra, but they all contain "fall though", so match level 2.
+ M_ADD_CXXFLAGS_IF_SUPPORTED(-Wimplicit-fallthrough=2)
;;
esac ;;
esac
diff --git a/src/classes/FolderMonitor.cpp b/src/classes/FolderMonitor.cpp
index 26ac2f21..0e246ff2 100644
--- a/src/classes/FolderMonitor.cpp
+++ b/src/classes/FolderMonitor.cpp
@@ -517,8 +517,8 @@ FolderMonitorImpl::CheckOneFolder(FolderMonitorFolderEntry *i,
i->SetState(Folder_Ok);
break;
}
- //else: fall through
#endif // USE_DIALUP
+ //else: fall through
case Folder_Unaccessible:
// don't even try any more
diff --git a/src/classes/MessageTemplate.cpp b/src/classes/MessageTemplate.cpp
index 6440df49..b2dddd87 100644
--- a/src/classes/MessageTemplate.cpp
+++ b/src/classes/MessageTemplate.cpp
@@ -275,6 +275,7 @@ MessageTemplateParser::ExpandTemplate(const wxChar **ppc, String *value) const
case '=':
if ( alignment == None )
alignment = Center;
+ // fall through
case '1':
case '2':
diff --git a/src/classes/MessageView.cpp b/src/classes/MessageView.cpp
index 3f8b98a6..b9619bbb 100644
--- a/src/classes/MessageView.cpp
+++ b/src/classes/MessageView.cpp
@@ -1663,7 +1663,10 @@ MessageView::ShowSelectedHeaders(const wxArrayString& headersUser_,
MessageAddressType mat;
switch ( envhdr )
{
- default: FAIL_MSG( "forgot to add header here" );
+ default:
+ FAIL_MSG( "forgot to add header here" );
+ // fall through
+
case EnvelopHeader_From: mat = MAT_FROM; break;
case EnvelopHeader_To: mat = MAT_TO; break;
case EnvelopHeader_Cc: mat = MAT_CC; break;
diff --git a/src/classes/QuotedText.cpp b/src/classes/QuotedText.cpp
index 7ab410e9..b176d045 100644
--- a/src/classes/QuotedText.cpp
+++ b/src/classes/QuotedText.cpp
@@ -210,6 +210,7 @@ CountQuoteLevel(const wxChar *string,
default:
case Line_Unknown:
FAIL_MSG( _T("logical error: unexpected sameAsNext value") );
+ // fall through
case Line_Different:
// check for wrapped quoted lines
diff --git a/src/gui/ClickURL.cpp b/src/gui/ClickURL.cpp
index 5ab94564..f477e9c9 100644
--- a/src/gui/ClickURL.cpp
+++ b/src/gui/ClickURL.cpp
@@ -305,8 +305,8 @@ ClickableURL::ClickableURL(MessageView *msgView, const String& url)
{
case _T('\r'):
case _T('\n'):
- // ignore
- break;
+ // ignore and skip adding it to the URL below
+ continue;
case _T('@'):
if ( !hadColon )
@@ -314,14 +314,14 @@ ClickableURL::ClickableURL(MessageView *msgView, const String& url)
// we don't have an explicit scheme, assume email address
m_isMail = Yes;
}
- // fall through
+ break;
case _T(':'):
hadColon = true;
-
- default:
- m_url += *p;
+ break;
}
+
+ m_url += *p;
}
}
diff --git a/src/gui/wxMFolderDialogs.cpp b/src/gui/wxMFolderDialogs.cpp
index 187f69f3..fc5b54e6 100644
--- a/src/gui/wxMFolderDialogs.cpp
+++ b/src/gui/wxMFolderDialogs.cpp
@@ -1762,14 +1762,6 @@ wxFolderPropertiesPage::GetCurrentFolderType(RadioIndex selRadio,
FAIL_MSG(_T("invalid file folder subtype"));
// fall through
-#ifdef EXPERIMENTAL_MFormat
- case FileFolderSubtype_MFile:
- return MF_MFILE;
-
- case FileFolderSubtype_MDir:
- return MF_MDIR;
-#endif // EXPERIMENTAL_MFormat
-
case FileFolderSubtype_Mbx:
case FileFolderSubtype_Mbox:
case FileFolderSubtype_Mmdf:
@@ -1778,6 +1770,14 @@ wxFolderPropertiesPage::GetCurrentFolderType(RadioIndex selRadio,
case FileFolderSubtype_MH:
return MF_MH;
+
+#ifdef EXPERIMENTAL_MFormat
+ case FileFolderSubtype_MFile:
+ return MF_MFILE;
+
+ case FileFolderSubtype_MDir:
+ return MF_MDIR;
+#endif // EXPERIMENTAL_MFormat
}
case Radio_Pop:
@@ -2510,9 +2510,8 @@ wxFolderPropertiesPage::TransferDataFromWindow(void)
switch(folderType)
{
default:
- FAIL_MSG( _T("new foldertype with server added") );
- // fall through, otherwise we will crash with uninit serverType
- // anyhow
+ FAIL_MSG( "don't know how to create server folder of this type" );
+ return false;
case MF_NNTP:
serverType = ServerNews;
@@ -2581,7 +2580,7 @@ wxFolderPropertiesPage::TransferDataFromWindow(void)
case MF_INBOX:
if ( !m_dlgCreate )
break;
- //else: can't create INBOX folder!
+ //else: fall through, can't create INBOX folder
case MF_GROUP:
WriteEntryIfChanged(Path, m_mailboxname->GetValue());
diff --git a/src/gui/wxMenuDefs.cpp b/src/gui/wxMenuDefs.cpp
index 017c8053..61966fed 100644
--- a/src/gui/wxMenuDefs.cpp
+++ b/src/gui/wxMenuDefs.cpp
@@ -939,6 +939,7 @@ extern void CheckLanguageInMenu(wxWindow *win, wxFontEncoding encoding)
default:
wxFAIL_MSG( _T("Unexpected encoding in CheckLanguageInMenu") );
+ // fall through
case wxFONTENCODING_DEFAULT:
id = WXMENU_LANG_DEFAULT;
diff --git a/src/gui/wxMsgCmdProc.cpp b/src/gui/wxMsgCmdProc.cpp
index d69ba30c..d1f0992d 100644
--- a/src/gui/wxMsgCmdProc.cpp
+++ b/src/gui/wxMsgCmdProc.cpp
@@ -614,7 +614,7 @@ bool MsgCmdProcImpl::ProcessCommand(int cmd,
{
default:
FAIL_MSG( _T("unknown reply menu command") );
- // fall through
+ wxFALLTHROUGH;
CASE_REPLY(REPLY);
CASE_REPLY(REPLY_SENDER);
diff --git a/src/gui/wxOptionsDlg.cpp b/src/gui/wxOptionsDlg.cpp
index 29c9319d..abf2ad15 100644
--- a/src/gui/wxOptionsDlg.cpp
+++ b/src/gui/wxOptionsDlg.cpp
@@ -3015,11 +3015,13 @@ bool wxOptionsPage::DoTransferOptionsToWindow()
{
wxASSERT( !m_aDefaults[n].IsNumeric() );
}
+ // fall through
// can only have text value
case Field_Passwd:
if( GetFieldType(n) == Field_Passwd )
strValue = strutil_decrypt(strValue);
+ // fall through
case Field_Font:
case Field_Dir:
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index f8f511f1..b81911e8 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -106,6 +106,7 @@ MIME::Encoding MIME::GetEncodingForFontEncoding(wxFontEncoding enc)
default:
FAIL_MSG( _T("unknown encoding") );
+ // fall through
case wxFONTENCODING_SYSTEM:
return Encoding_Unknown;
diff --git a/src/modules/LayoutViewer.cpp b/src/modules/LayoutViewer.cpp
index e5fc61a8..eb1ae4d8 100644
--- a/src/modules/LayoutViewer.cpp
+++ b/src/modules/LayoutViewer.cpp
@@ -245,6 +245,7 @@ void LayoutViewerWindow::OnMouseEvent(wxCommandEvent& event)
default:
FAIL_MSG(_T("unknown mouse action"));
+ // fall through
case WXLOWIN_MENU_LCLICK:
ci->OnLeftClick();
diff --git a/src/modules/Migrate.cpp b/src/modules/Migrate.cpp
index 95868e7e..76fb4770 100644
--- a/src/modules/Migrate.cpp
+++ b/src/modules/Migrate.cpp
@@ -666,8 +666,8 @@ MigrateModule::Entry(int arg, ...)
return DoMigrate() ? 0 : -1;
FAIL_MSG( _T("unexpected menu event in migrate module") );
- // fall through
}
+ // fall through
default:
return 0;
@@ -1961,6 +1961,7 @@ bool MigrateWizard::HasNextPage(wxWizardPage *page)
default:
FAIL_MSG( _T("unknown page in MigrateWizard") );
+ // fall through
case Page_WarnEmptySource:
case Page_CantAccessSource:
commit 6fe1aeb63bf7a28fd14f750da69dea300f4d214a
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 15:19:45 2020 +0200
Really open file in read-only mode in line ADB provider
The test for Test_Open was wrong, and so the file was always opened in
"append" mode.
Thanks gcc for -Wint-in-bool-context warning.
diff --git a/src/adb/ProvLine.cpp b/src/adb/ProvLine.cpp
index ffbea01f..1a613857 100644
--- a/src/adb/ProvLine.cpp
+++ b/src/adb/ProvLine.cpp
@@ -560,7 +560,7 @@ bool LineDataProvider::TestBookAccess(const String& name, AdbTests test)
case Test_Open:
case Test_OpenReadOnly:
{
- FILE *fp = fopen(fullname.fn_str(), Test_Open ? "a" : "r");
+ FILE *fp = fopen(fullname.fn_str(), test == Test_Open ? "a" : "r");
if ( fp != NULL )
{
fclose(fp);
commit 1db144f5c548581f48e87e5748cd3f1c4feadb11
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 15:14:39 2020 +0200
Fix wrong bit flag operation in upgrade code
Use "~" instead of "!".
Thanks gcc for -Wint-in-bool-context warning.
diff --git a/src/util/upgrade.cpp b/src/util/upgrade.cpp
index b24c31c9..f77f3ba9 100644
--- a/src/util/upgrade.cpp
+++ b/src/util/upgrade.cpp
@@ -3001,7 +3001,7 @@ public:
"'%s'\n"
"Corrected configuration data."),
f->GetFullName().c_str()));
- f->SetFlags(f->GetFlags() & !MF_FLAGS_INCOMING);
+ f->SetFlags(f->GetFlags() & ~MF_FLAGS_INCOMING);
}
}
}
commit a79b4310b2e04d3996d01d535a12b2ec31a43409
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 15:04:14 2020 +0200
Fix wrong warning fix which broke old migration code
Fix wrong change done in 0c4e9d09c (Get rid of annoying variable
shadowing warnings with MSVS 2015, 2016-05-08).
Thanks gcc for -Wint-in-bool-context warning.
diff --git a/src/util/upgrade.cpp b/src/util/upgrade.cpp
index dfd62835..b24c31c9 100644
--- a/src/util/upgrade.cpp
+++ b/src/util/upgrade.cpp
@@ -1999,7 +1999,7 @@ CopyEntries(wxConfigBase *src,
copiedOk = dest->Write(newentry, val);
if ( copiedOk )
- copiedOk++;
+ numCopied++;
}
}
break;
commit 75f6f2bd2736ab8578ec590f034b147d30be3cb1
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 14:56:37 2020 +0200
Disable -Wcast-function-type with gcc 8+
Unfortunately pragmas disabling these warnings in wxWidgets headers
themselves don't seem to work when they're included from a PCH, so
building resulted in hundreds of lines of warnings, as every event table
macro resulted in a warning.
Disable the warning globally, even though it's clearly not ideal,
because having them enabled is too annoying right now.
diff --git a/configure.ac b/configure.ac
index c90cf01d..98a0e2fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1454,7 +1454,15 @@ case "$GXX" in yes)
1) CXXFLAGS_RELAXED="$CXXFLAGS_RELAXED -Wall -pedantic -Wno-long-long"
CXXFLAGS="$CXXFLAGS -Werror -pedantic -Wno-long-long" ;;
*) CXXFLAGS_RELAXED="$CXXFLAGS_RELAXED -Wall"
- CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers" ;;
+ CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
+
+ dnl Unfortunately we have to disable this warning globally for the
+ dnl compiler versions giving it (8+), as the use of PCH prevents
+ dnl disabling it locally in wxWidgets from working. This can only be
+ dnl avoided if we stop using the PCH or if we change all the code using
+ dnl wx event table macros to use Bind() instead.
+ M_ADD_CXXFLAGS_IF_SUPPORTED(-Wno-cast-function-type)
+ ;;
esac ;;
esac
AC_SUBST(CXXFLAGS_RELAXED)
commit 3238eeef7b14bc9f1831755b2c71c5f448bb8f44
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 14:53:45 2020 +0200
Use AX_C_CHECK_FLAG() and AX_CXX_CHECK_FLAG() in configure
Replace our similar custom macros M_GCC_OPTION and M_CXX_OPTION with the
standard macros from autoconf archive, which also do caching internally,
so using them makes configure code simpler and shorter.
Because of this, extend the new macros use to the cases where the old
ones were not used before, as they actually simplify things.
diff --git a/acinclude.m4 b/acinclude.m4
index 16fa12bd..bd5c12db 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -170,32 +170,10 @@ AC_DEFUN([M_CHECK_MYHEADER_VER],
]
)
-dnl M_GCC_OPTION(OPTION, ACTION-IF-SUPPORTED, ACTION-IF-NOT-SUPPORTED)
+dnl M_ADD_CXXFLAGS_IF_SUPPORTED(OPTION)
dnl
-dnl Check if gcc supports the given option (fails if compiler is not gcc)
-AC_DEFUN([M_GCC_OPTION], [
- AC_REQUIRE([AC_PROG_CC])
- if test "x$GCC" = "xyes"; then
- echo 'void f(){}' >conftest.c
- case "`$CC $1 -c conftest.c 2>&1`" in
- '') ifelse([$2], , :, [$2]) ;;
- *) ifelse([$3], , :, [$3]) ;;
- esac
- rm -f conftest.*
- else
- ifelse([$3], , :, [$3])
- fi
-])
-
-dnl M_CXX_OPTION(OPTION, ACTION-IF-SUPPORTED, ACTION-IF-NOT-SUPPORTED)
-dnl
-dnl Check if C++ compiler supports the given option.
-AC_DEFUN([M_CXX_OPTION], [
- AC_REQUIRE([AC_PROG_CXX])
- echo 'void f(){}' >conftest.cc
- case "`$CXX $1 -c conftest.cc 2>&1`" in
- '') ifelse([$2], , :, [$2]) ;;
- *) ifelse([$3], , :, [$3]) ;;
- esac
- rm -f conftest.*
+dnl Check if the C++ compiler supports the given option and adds it to CXXFLAGS
+dnl if it does.
+AC_DEFUN([M_ADD_CXXFLAGS_IF_SUPPORTED], [
+ AX_CXX_CHECK_FLAG($1,,,[CXXFLAGS="$CXXFLAGS $1"])
])
diff --git a/configure.ac b/configure.ac
index 43ee8196..c90cf01d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,34 +250,15 @@ dnl defines CXXFLAGS
AC_PROG_CXX
dnl We need C++11 support, so check for it.
-AC_CACHE_CHECK([whether $CC accepts -std=c++11],
- m_cv_cc_std_cxx11,
- [M_CXX_OPTION([-std=c++11],
- m_cv_cc_std_cxx11="yes",
- m_cv_cc_std_cxx11="no")]
-)
-if test $m_cv_cc_std_cxx11 != "yes"; then
- AC_MSG_ERROR([
- Sorry, $CC doesn't support -std=c++11 option and can't be used to compile
- this program.])
-fi
-CXXFLAGS="$CXXFLAGS -std=c++11"
+AX_CXX_CHECK_FLAG([-std=c++11],,,[CXXFLAGS="$CXXFLAGS -std=c++11"], [
+ AC_MSG_ERROR([
+Sorry, $CXX doesn't support -std=c++11 option and can't be used to compile this program.
+ ])
+])
dnl disable support for exceptions if the compiler is g++ and
dnl new enough to support it.
-case "$GXX" in yes)
- AC_CACHE_CHECK(whether ${CXX-g++} accepts -fno-exceptions,
- m_cv_gxx_exceptions,
- [echo 'void f(){}' >conftest.cc
- case "`${CXX-g++} -fno-exceptions -c conftest.cc 2>&1`" in
- '') m_cv_gxx_exceptions=yes ;;
- *) m_cv_gxx_exceptions=no ;;
- esac
- rm -f conftest*])
- case "$m_cv_gxx_exceptions" in yes)
- CXXFLAGS="$CXXFLAGS -fno-exceptions"
- esac
-esac
+M_ADD_CXXFLAGS_IF_SUPPORTED([-fno-exceptions])
dnl check whether the C++ supports the new logical operator names
dnl c-client library uses some of them as field names
@@ -1342,27 +1323,16 @@ LIBS="$LIBS $PYTHON_LIBS $LIB_EFENCE $LIB_DMALLOC $LIB_PAM"
dnl imap
IMAP_CFLAGS="$CFLAGS $IMAP_CFLAGS"
dnl there are too many warnings in c-client sources which its author
-dnl refuses to fix, suppress them when using gcc4
-AC_CACHE_CHECK([whether $CC accepts -Wno-pointer-sign],
- m_cv_cc_no_warn_ptr_sign,
- [M_GCC_OPTION(-Wno-pointer-sign,
- m_cv_cc_no_warn_ptr_sign="yes",
- m_cv_cc_no_warn_ptr_sign="no")]
-)
-if test $m_cv_cc_no_warn_ptr_sign = "yes"; then
- IMAP_CFLAGS="$IMAP_CFLAGS -Wno-pointer-sign"
-fi
-AC_CACHE_CHECK([whether $CC accepts -Wno-pointer-to-int-cast],
- m_cv_cc_no_warn_ptr_to_int_cast,
- [M_GCC_OPTION(-Wno-pointer-to-int-cast,
- m_cv_cc_no_warn_ptr_to_int_cast="yes",
- m_cv_cc_no_warn_ptr_to_int_cast="no")]
-)
-if test $m_cv_cc_no_warn_ptr_to_int_cast = "yes"; then
- dnl assume that if -Wno-pointer-to-int-cast is supported, then so is the
- dnl opposite option
- IMAP_CFLAGS="$IMAP_CFLAGS -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast"
-fi
+dnl refuses to fix, suppress them if possible.
+AX_C_CHECK_FLAG(-Wno-pointer-sign,,,[
+ IMAP_CFLAGS="$IMAP_CFLAGS -Wno-pointer-sign"
+])
+
+dnl assume that if -Wno-pointer-to-int-cast is supported, then so is the
+dnl opposite option
+AX_C_CHECK_FLAG(-Wno-pointer-to-int-cast,,,[
+ IMAP_CFLAGS="$IMAP_CFLAGS -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast"
+])
AC_SUBST(IMAP_CFLAGS)
dnl compface
diff --git a/extra/m4/ax_c_check_flag.m4 b/extra/m4/ax_c_check_flag.m4
new file mode 100644
index 00000000..6448bb64
--- /dev/null
+++ b/extra/m4/ax_c_check_flag.m4
@@ -0,0 +1,84 @@
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/ax_c_check_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_C_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
+#
+# DESCRIPTION
+#
+# This macro tests if the C compiler supports the flag FLAG-TO-CHECK. If
+# successfull execute ACTION-IF-SUCCESS otherwise ACTION-IF-FAILURE.
+# PROLOGUE and BODY are optional and should be used as in AC_LANG_PROGRAM
+# macro.
+#
+# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
+# Bogdan Drozdowski <bog...@op...> for testing and bug fixes.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Francesco Salvestrini <sal...@us...>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_C_CHECK_FLAG],[
+ AC_PREREQ([2.61])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_PROG_SED])
+
+ flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+ AC_CACHE_CHECK([whether the C compiler accepts the $1 flag],
+ [ax_cv_c_check_flag_$flag],[
+
+ AC_LANG_PUSH([C])
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([$2],[$3])
+ ],[
+ eval "ax_cv_c_check_flag_$flag=yes"
+ ],[
+ eval "ax_cv_c_check_flag_$flag=no"
+ ])
+
+ CFLAGS="$save_CFLAGS"
+
+ AC_LANG_POP
+
+ ])
+
+ AS_IF([eval "test \"`echo '$ax_cv_c_check_flag_'$flag`\" = yes"],[
+ :
+ $4
+ ],[
+ :
+ $5
+ ])
+])
diff --git a/extra/m4/ax_cxx_check_flag.m4 b/extra/m4/ax_cxx_check_flag.m4
new file mode 100644
index 00000000..2de9f273
--- /dev/null
+++ b/extra/m4/ax_cxx_check_flag.m4
@@ -0,0 +1,84 @@
+# ===========================================================================
+# http://www.nongnu.org/autoconf-archive/ax_cxx_check_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
+#
+# DESCRIPTION
+#
+# This macro tests if the C++ compiler supports the flag FLAG-TO-CHECK. If
+# successfull execute ACTION-IF-SUCCESS otherwise ACTION-IF-FAILURE.
+# PROLOGUE and BODY are optional and should be used as in AC_LANG_PROGRAM
+# macro.
+#
+# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
+# Bogdan Drozdowski <bog...@op...> for testing and bug fixes.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Francesco Salvestrini <sal...@us...>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_CXX_CHECK_FLAG],[
+ AC_PREREQ([2.61])
+ AC_REQUIRE([AC_PROG_CXX])
+ AC_REQUIRE([AC_PROG_SED])
+
+ flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
+
+ AC_CACHE_CHECK([whether the C++ compiler accepts the $1 flag],
+ [ax_cv_cxx_check_flag_$flag],[
+
+ AC_LANG_PUSH([C++])
+
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS $1"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([$2],[$3])
+ ],[
+ eval "ax_cv_cxx_check_flag_$flag=yes"
+ ],[
+ eval "ax_cv_cxx_check_flag_$flag=no"
+ ])
+
+ CXXFLAGS="$save_CXXFLAGS"
+
+ AC_LANG_POP
+
+ ])
+
+ AS_IF([eval "test \"`echo '$ax_cv_cxx_check_flag_'$flag`\" = yes"],[
+ :
+ $4
+ ],[
+ :
+ $5
+ ])
+])
commit 84250ab6b1c92054246636f3d589f510ce612353
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 14:52:24 2020 +0200
Add missing break for WXMENU_FILE_POST handler
Don't accidentally fall through to WXMENU_FILE_COLLECT here.
diff --git a/src/gui/wxMFrame.cpp b/src/gui/wxMFrame.cpp
index ac8bbaaf..bfba8723 100644
--- a/src/gui/wxMFrame.cpp
+++ b/src/gui/wxMFrame.cpp
@@ -602,6 +602,7 @@ wxMFrame::OnMenuCommand(int id)
composeView->InitText();
}
+ break;
case WXMENU_FILE_COLLECT:
{
commit 8f806c0b075dcbe215a4d275a775136e5a7eec3f
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 13:00:44 2020 +0200
Improve const correctness in c-client code
Avoid casting const char pointers to non-const ones, which is
unnecessary and results in warnings.
diff --git a/lib/imap/src/osdep/unix/mh.c b/lib/imap/src/osdep/unix/mh.c
index b0641560..43785f7c 100644
--- a/lib/imap/src/osdep/unix/mh.c
+++ b/lib/imap/src/osdep/unix/mh.c
@@ -1197,7 +1197,7 @@ long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
int mh_select (const struct direct *name)
{
char c;
- char *s = name->d_name;
+ const char *s = name->d_name;
while (c = *s++) if (!isdigit (c)) return NIL;
return T;
}
diff --git a/lib/imap/src/osdep/unix/mix.c b/lib/imap/src/osdep/unix/mix.c
index 090134eb..b2388042 100644
--- a/lib/imap/src/osdep/unix/mix.c
+++ b/lib/imap/src/osdep/unix/mix.c
@@ -114,7 +114,7 @@ MIXBURP {
DRIVER *mix_valid (char *name);
long mix_isvalid (char *name,char *meta);
void *mix_parameters (long function,void *value);
-long mix_dirfmttest (char *name);
+long mix_dirfmttest (const char *name);
void mix_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents);
long mix_scan_contents (char *name,char *contents,unsigned long csiz,
unsigned long fsiz);
@@ -284,7 +284,7 @@ void *mix_parameters (long function,void *value)
* Returns: T if internal name, NIL otherwise
*/
-long mix_dirfmttest (char *name)
+long mix_dirfmttest (const char *name)
{
/* belongs to MIX if starts with .mix */
return strncmp (name,MIXNAME,sizeof (MIXNAME) - 1) ? NIL : LONGT;
@@ -1148,7 +1148,8 @@ long mix_expunge (MAILSTREAM *stream,char *sequence,long options)
int mix_select (const struct direct *name)
{
- char c,*s;
+ char c;
+ const char *s;
/* make sure name has prefix */
if (mix_dirfmttest (name->d_name)) {
for (c = *(s = name->d_name + sizeof (MIXNAME) - 1); c && isxdigit (c);
diff --git a/lib/imap/src/osdep/unix/mx.c b/lib/imap/src/osdep/unix/mx.c
index 824fb414..23522fdd 100644
--- a/lib/imap/src/osdep/unix/mx.c
+++ b/lib/imap/src/osdep/unix/mx.c
@@ -1113,7 +1113,7 @@ long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt,
int mx_select (const struct direct *name)
{
char c;
- char *s = name->d_name;
+ const char *s = name->d_name;
while (c = *s++) if (!isdigit (c)) return NIL;
return T;
}
diff --git a/lib/imap/src/osdep/unix/news.c b/lib/imap/src/osdep/unix/news.c
index 2f0acbd4..d6dcfdf7 100644
--- a/lib/imap/src/osdep/unix/news.c
+++ b/lib/imap/src/osdep/unix/news.c
@@ -405,7 +405,7 @@ MAILSTREAM *news_open (MAILSTREAM *stream)
int news_select (const struct direct *name)
{
char c;
- char *s = name->d_name;
+ const char *s = name->d_name;
while (c = *s++) if (!isdigit (c)) return NIL;
return T;
}
commit e1fa3d1e83c633be0c8748adadfafbff11542e84
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 12:59:33 2020 +0200
Declare utime() in Linux c-client headers
Do it manually instead of including <utime.h> because c-client expects a
declaration different from, but compatible with, the real one, which
takes a struct with 2 time_t fields instead of an array of 2 time_t
values.
diff --git a/lib/imap/src/osdep/unix/os_lnx.h b/lib/imap/src/osdep/unix/os_lnx.h
index e0373ec8..0403c467 100644
--- a/lib/imap/src/osdep/unix/os_lnx.h
+++ b/lib/imap/src/osdep/unix/os_lnx.h
@@ -36,6 +36,8 @@
#include <syslog.h>
#include <sys/file.h>
+/* Real declaration in utime.h is compatible, but different. */
+extern int utime(const char *filename, const time_t *times);
/* Linux gets this wrong */
diff --git a/lib/imap/src/osdep/unix/os_slx.h b/lib/imap/src/osdep/unix/os_slx.h
index e0373ec8..0403c467 100644
--- a/lib/imap/src/osdep/unix/os_slx.h
+++ b/lib/imap/src/osdep/unix/os_slx.h
@@ -36,6 +36,8 @@
#include <syslog.h>
#include <sys/file.h>
+/* Real declaration in utime.h is compatible, but different. */
+extern int utime(const char *filename, const time_t *times);
/* Linux gets this wrong */
commit ceb13204e99ef7d8e64ffe45707560034e4e9eae
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 12:42:15 2020 +0200
Fix warnings about wrong scandir() parameter types in c-client
Avoid -Wincompatible-pointer-types by using correct signatures for
scandir() callbacks.
This also allows to remove tons of casts in the sort callback.
diff --git a/lib/imap/src/osdep/unix/mh.c b/lib/imap/src/osdep/unix/mh.c
index 98ca35fe..b0641560 100644
--- a/lib/imap/src/osdep/unix/mh.c
+++ b/lib/imap/src/osdep/unix/mh.c
@@ -103,8 +103,8 @@ long mh_copy (MAILSTREAM *stream,char *sequence,char *mailbox,
long options);
long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data);
-int mh_select (struct direct *name);
-int mh_numsort (const void *d1,const void *d2);
+int mh_select (const struct direct *name);
+int mh_numsort (const struct direct **d1,const struct direct **d2);
char *mh_file (char *dst,char *name);
long mh_canonicalize (char *pattern,char *ref,char *pat);
void mh_setdate (char *file,MESSAGECACHE *elt);
@@ -1194,7 +1194,7 @@ long mh_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data)
* Returns: T to use file name, NIL to skip it
*/
-int mh_select (struct direct *name)
+int mh_select (const struct direct *name)
{
char c;
char *s = name->d_name;
@@ -1209,10 +1209,9 @@ int mh_select (struct direct *name)
* Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2
*/
-int mh_numsort (const void *d1,const void *d2)
+int mh_numsort (const struct direct **d1,const struct direct **d2)
{
- return atoi ((*(struct direct **) d1)->d_name) -
- atoi ((*(struct direct **) d2)->d_name);
+ return atoi ((*d1)->d_name) - atoi ((*d2)->d_name);
}
diff --git a/lib/imap/src/osdep/unix/mix.c b/lib/imap/src/osdep/unix/mix.c
index fbf4a023..090134eb 100644
--- a/lib/imap/src/osdep/unix/mix.c
+++ b/lib/imap/src/osdep/unix/mix.c
@@ -125,7 +125,7 @@ long mix_unsubscribe (MAILSTREAM *stream,char *mailbox);
long mix_create (MAILSTREAM *stream,char *mailbox);
long mix_delete (MAILSTREAM *stream,char *mailbox);
long mix_rename (MAILSTREAM *stream,char *old,char *newname);
-int mix_rselect (struct direct *name);
+int mix_rselect (const struct direct *name);
MAILSTREAM *mix_open (MAILSTREAM *stream);
void mix_close (MAILSTREAM *stream,long options);
void mix_abort (MAILSTREAM *stream);
@@ -140,8 +140,8 @@ THREADNODE *mix_thread (MAILSTREAM *stream,char *type,char *charset,
long mix_ping (MAILSTREAM *stream);
void mix_check (MAILSTREAM *stream);
long mix_expunge (MAILSTREAM *stream,char *sequence,long options);
-int mix_select (struct direct *name);
-int mix_msgfsort (const void *d1,const void *d2);
+int mix_select (const struct direct *name);
+int mix_msgfsort (const struct direct **d1,const struct direct **d2);
long mix_addset (SEARCHSET **set,unsigned long start,unsigned long size);
long mix_burp (MAILSTREAM *stream,MIXBURP *burp,unsigned long *reclaimed);
long mix_burp_check (SEARCHSET *set,size_t size,char *file);
@@ -587,7 +587,7 @@ long mix_rename (MAILSTREAM *stream,char *old,char *newname)
* Returns: T if mix file name, NIL otherwise
*/
-int mix_rselect (struct direct *name)
+int mix_rselect (const struct direct *name)
{
return mix_dirfmttest (name->d_name);
}
@@ -1146,7 +1146,7 @@ long mix_expunge (MAILSTREAM *stream,char *sequence,long options)
* ".mix" with no suffix was used by experimental versions
*/
-int mix_select (struct direct *name)
+int mix_select (const struct direct *name)
{
char c,*s;
/* make sure name has prefix */
@@ -1165,10 +1165,10 @@ int mix_select (struct direct *name)
* Returns: -1 if d1 < d2, 0 if d1 == d2, 1 d1 > d2
*/
-int mix_msgfsort (const void *d1,const void *d2)
+int mix_msgfsort (const struct direct **d1,const struct direct **d2)
{
- char *n1 = (*(struct direct **) d1)->d_name + sizeof (MIXNAME) - 1;
- char *n2 = (*(struct direct **) d2)->d_name + sizeof (MIXNAME) - 1;
+ const char *n1 = (*d1)->d_name + sizeof (MIXNAME) - 1;
+ const char *n2 = (*d2)->d_name + sizeof (MIXNAME) - 1;
return compare_ulong (*n1 ? strtoul (n1,NIL,16) : 0,
*n2 ? strtoul (n2,NIL,16) : 0);
}
diff --git a/lib/imap/src/osdep/unix/mx.c b/lib/imap/src/osdep/unix/mx.c
index 45495279..824fb414 100644
--- a/lib/imap/src/osdep/unix/mx.c
+++ b/lib/imap/src/osdep/unix/mx.c
@@ -98,8 +98,8 @@ long mx_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data);
long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt,
STRING *st,SEARCHSET *set);
-int mx_select (struct direct *name);
-int mx_numsort (const void *d1,const void *d2);
+int mx_select (const struct direct *name);
+int mx_numsort (const struct direct **d1,const struct direct **d2);
char *mx_file (char *dst,char *name);
long mx_lockindex (MAILSTREAM *stream);
void mx_unlockindex (MAILSTREAM *stream);
@@ -1110,7 +1110,7 @@ long mx_append_msg (MAILSTREAM *stream,char *flags,MESSAGECACHE *elt,
* Returns: T to use file name, NIL to skip it
*/
-int mx_select (struct direct *name)
+int mx_select (const struct direct *name)
{
char c;
char *s = name->d_name;
@@ -1125,10 +1125,9 @@ int mx_select (struct direct *name)
* Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2
*/
-int mx_numsort (const void *d1,const void *d2)
+int mx_numsort (const struct direct **d1,const struct direct **d2)
{
- return atoi ((*(struct direct **) d1)->d_name) -
- atoi ((*(struct direct **) d2)->d_name);
+ return atoi ((*d1)->d_name) - atoi ((*d2)->d_name);
}
diff --git a/lib/imap/src/osdep/unix/news.c b/lib/imap/src/osdep/unix/news.c
index 4cf5bb70..2f0acbd4 100644
--- a/lib/imap/src/osdep/unix/news.c
+++ b/lib/imap/src/osdep/unix/news.c
@@ -76,8 +76,8 @@ long news_create (MAILSTREAM *stream,char *mailbox);
long news_delete (MAILSTREAM *stream,char *mailbox);
long news_rename (MAILSTREAM *stream,char *old,char *newname);
MAILSTREAM *news_open (MAILSTREAM *stream);
-int news_select (struct direct *name);
-int news_numsort (const void *d1,const void *d2);
+int news_select (const struct direct *name);
+int news_numsort (const struct direct **d1,const struct direct **d2);
void news_close (MAILSTREAM *stream,long options);
void news_fast (MAILSTREAM *stream,char *sequence,long flags);
void news_flags (MAILSTREAM *stream,char *sequence,long flags);
@@ -402,7 +402,7 @@ MAILSTREAM *news_open (MAILSTREAM *stream)
* Returns: T to use file name, NIL to skip it
*/
-int news_select (struct direct *name)
+int news_select (const struct direct *name)
{
char c;
char *s = name->d_name;
@@ -417,10 +417,9 @@ int news_select (struct direct *name)
* Returns: negative if d1 < d2, 0 if d1 == d2, postive if d1 > d2
*/
-int news_numsort (const void *d1,const void *d2)
+int news_numsort (const struct direct **d1,const struct direct **d2)
{
- return atoi ((*(struct direct **) d1)->d_name) -
- atoi ((*(struct direct **) d2)->d_name);
+ return atoi ((*d1)->d_name) - atoi ((*d2)->d_name);
}
commit fe735b51283fa64c7f4bd848c2bfdce7cebf689b
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 12:41:06 2020 +0200
Define safe_flock() function in Linux c-client header
Avoid -Wimplicit-function-declaration when using it later.
diff --git a/lib/imap/src/osdep/unix/os_lnx.h b/lib/imap/src/osdep/unix/os_lnx.h
index 2774472a..e0373ec8 100644
--- a/lib/imap/src/osdep/unix/os_lnx.h
+++ b/lib/imap/src/osdep/unix/os_lnx.h
@@ -43,6 +43,7 @@
#define direct dirent
+extern int safe_flock (int fd,int op);
#define flock safe_flock
diff --git a/lib/imap/src/osdep/unix/os_slx.h b/lib/imap/src/osdep/unix/os_slx.h
index 2774472a..e0373ec8 100644
--- a/lib/imap/src/osdep/unix/os_slx.h
+++ b/lib/imap/src/osdep/unix/os_slx.h
@@ -43,6 +43,7 @@
#define direct dirent
+extern int safe_flock (int fd,int op);
#define flock safe_flock
commit e9738339a48db903847f100276073cbeb071ebe9
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jun 2 12:17:32 2020 +0200
Stop defining _XOPEN_SOURCE and _BSD_SOURCE in c-client sources
This results in warnings from /usr/include/features.h and doesn't seem
to be needed anyhow.
diff --git a/lib/imap/src/osdep/unix/os_lnx.h b/lib/imap/src/osdep/unix/os_lnx.h
index b5f39ffa..2774472a 100644
--- a/lib/imap/src/osdep/unix/os_lnx.h
+++ b/lib/imap/src/osdep/unix/os_lnx.h
@@ -26,20 +26,6 @@
* Last Edited: 30 August 2006
*/
-/*
- *** These lines are claimed to be necessary to build on Debian Linux on an
- *** Alpha.
- */
-
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 1
-#endif /* _XOPEN_SOURCE */
-#ifndef _BSD_SOURCE
-#define _BSD_SOURCE 1
-#endif /* _BSD_SOURCE */
-
-/* end Debian Linux on Alpha strangeness */
-
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/lib/imap/src/osdep/unix/os_slx.h b/lib/imap/src/osdep/unix/os_slx.h
index b5f39ffa..2774472a 100644
--- a/lib/imap/src/osdep/unix/os_slx.h
+++ b/lib/imap/src/osdep/unix/os_slx.h
@@ -26,20 +26,6 @@
* Last Edited: 30 August 2006
*/
-/*
- *** These lines are claimed to be necessary to build on Debian Linux on an
- *** Alpha.
- */
-
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 1
-#endif /* _XOPEN_SOURCE */
-#ifndef _BSD_SOURCE
-#define _BSD_SOURCE 1
-#endif /* _BSD_SOURCE */
-
-/* end Debian Linux on Alpha strangeness */
-
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
commit 23fd7ce3af9084c0acb560744e03275a9389fff3
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Jul 25 21:32:24 2019 +0200
Include wxwin.m4 in the source tree
Don't rely on having it installed (or having "wx" environment variable)
and just store a copy of this file.
Also stop using obsolete synonyms of the macros defined there.
diff --git a/bootstrap b/bootstrap
index f723eeaf..07124985 100755
--- a/bootstrap
+++ b/bootstrap
@@ -42,7 +42,7 @@ if [ ! -f configure.ac -o ! -f include/Mcommon.h ]; then
fi
echo "Setting up build system for Mahogany:"
-echo " - aclocal " && aclocal ${wx:+-I $wx} && \
+echo " - aclocal " && aclocal && \
echo " - autoconf " && autoconf && \
echo "Build setup successful, type \"configure\" to configure Mahogany now." && \
exit 0
diff --git a/configure.ac b/configure.ac
index a85ec8e0..43ee8196 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,7 @@ echo ""
AC_CONFIG_HEADER(include/config.h)
AC_CONFIG_AUX_DIR(extra/scripts)
+AC_CONFIG_MACRO_DIR([extra/m4])
### HACK: unfortunately, the Makefiles in subdirectories can use this
### install program without qualification. We really shouldn't do it
### this way, but we force the install-sh found here to be a full path.
@@ -171,7 +172,7 @@ case "$m_cv_prefix" in /*) ;; *)
esac
prefix=$m_cv_prefix
-AM_OPTIONS_WXCONFIG
+WX_CONFIG_OPTIONS
dnl save parameter settings in case stuff below aborts
AC_CACHE_SAVE
@@ -978,7 +979,7 @@ dnl notice that libraries option should use correct order, otherwise statically
dnl linking won't work!
wxlibs=html,adv,qa,core,xml,net,base
-AM_PATH_WXCONFIG($MIN_WX_VERSION, [wxOK=1],[wxOK=0],[$wxlibs], [--debug=$debug_option])
+WX_CONFIG_CHECK($MIN_WX_VERSION, [wxOK=1],[wxOK=0],[$wxlibs], [--debug=$debug_option])
if test "$wxOK" != 1; then
if test $debug_option = "yes"; then
diff --git a/extra/m4/wxwin.m4 b/extra/m4/wxwin.m4
new file mode 100644
index 00000000..68cf880f
--- /dev/null
+++ b/extra/m4/wxwin.m4
@@ -0,0 +1,1057 @@
+dnl ---------------------------------------------------------------------------
+dnl Author: wxWidgets development team,
+dnl Francesco Montorsi,
+dnl Bob McCown (Mac-testing)
+dnl Creation date: 24/11/2001
+dnl ---------------------------------------------------------------------------
+
+dnl ===========================================================================
+dnl Table of Contents of this macro file:
+dnl -------------------------------------
+dnl
+dnl SECTION A: wxWidgets main macros
+dnl - WX_CONFIG_OPTIONS
+dnl - WX_CONFIG_CHECK
+dnl - WXRC_CHECK
+dnl - WX_STANDARD_OPTIONS
+dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
+dnl - WX_DETECT_STANDARD_OPTION_VALUES
+dnl
+dnl SECTION B: wxWidgets-related utilities
+dnl - WX_LIKE_LIBNAME
+dnl - WX_ARG_ENABLE_YESNOAUTO
+dnl - WX_ARG_WITH_YESNOAUTO
+dnl
+dnl SECTION C: messages to the user
+dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG
+dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
+dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END
+dnl - WX_BOOLOPT_SUMMARY
+dnl
+dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra
+dnl debug output on stdout from these macros.
+dnl ===========================================================================
+
+
+dnl ---------------------------------------------------------------------------
+dnl Macros for wxWidgets detection. Typically used in configure.in as:
+dnl
+dnl AC_ARG_ENABLE(...)
+dnl AC_ARG_WITH(...)
+dnl ...
+dnl WX_CONFIG_OPTIONS
+dnl ...
+dnl ...
+dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1])
+dnl if test "$wxWin" != 1; then
+dnl AC_MSG_ERROR([
+dnl wxWidgets must be installed on your system
+dnl but wx-config script couldn't be found.
+dnl
+dnl Please check that wx-config is in path, the directory
+dnl where wxWidgets libraries are installed (returned by
+dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
+dnl equivalent variable and wxWidgets version is 2.3.4 or above.
+dnl ])
+dnl fi
+dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
+dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
+dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
+dnl
+dnl LIBS="$LIBS $WX_LIBS"
+dnl
+dnl If you want to support standard --enable-debug/unicode/shared options, you
+dnl may do the following:
+dnl
+dnl ...
+dnl AC_CANONICAL_SYSTEM
+dnl
+dnl # define configure options
+dnl WX_CONFIG_OPTIONS
+dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared])
+dnl
+dnl # basic configure checks
+dnl ...
+dnl
+dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE
+dnl WX_DEBUG=$DEBUG
+dnl WX_UNICODE=$UNICODE
+dnl
+dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
+dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS])
+dnl WX_DETECT_STANDARD_OPTION_VALUES
+dnl
+dnl # write the output files
+dnl AC_CONFIG_FILES([Makefile ...])
+dnl AC_OUTPUT
+dnl
+dnl # optional: just to show a message to the user
+dnl WX_STANDARD_OPTIONS_SUMMARY_MSG
+dnl
+dnl ---------------------------------------------------------------------------
+
+
+dnl ---------------------------------------------------------------------------
+dnl WX_CONFIG_OPTIONS
+dnl
+dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and
+dnl --wx-config command line options
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([WX_CONFIG_OPTIONS],
+[
+ AC_ARG_WITH(wxdir,
+ [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH],
+ [ wx_config_name="$withval/wx-config"
+ wx_config_args="--inplace"])
+ AC_ARG_WITH(wx-config,
+ [ --with-wx-config=CONFIG wx-config script to use (optional)],
+ wx_config_name="$withval" )
+ AC_ARG_WITH(wx-prefix,
+ [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)],
+ wx_config_prefix="$withval", wx_config_prefix="")
+ AC_ARG_WITH(wx-exec-prefix,
+ [ --with-wx-exec-prefix=PREFIX
+ Exec prefix where wxWidgets is installed (optional)],
+ wx_config_exec_prefix="$withval", wx_config_exec_prefix="")
+])
+
+dnl Helper macro for checking if wx version is at least $1.$2.$3, set's
+dnl wx_ver_ok=yes if it is:
+AC_DEFUN([_WX_PRIVATE_CHECK_VERSION],
+[
+ wx_ver_ok=""
+ if test "x$WX_VERSION" != x ; then
+ if test $wx_config_major_version -gt $1; then
+ wx_ver_ok=yes
+ else
+ if test $wx_config_major_version -eq $1; then
+ if test $wx_config_minor_version -gt $2; then
+ wx_ver_ok=yes
+ else
+ if test $wx_config_minor_version -eq $2; then
+ if test $wx_config_micro_version -ge $3; then
+ wx_ver_ok=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl ---------------------------------------------------------------------------
+dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
+dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS
+dnl [, WX-OPTIONAL-LIBS]]]]])
+dnl
+dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC
+dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME
+dnl environment variable to override the default name of the wx-config script
+dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this
+dnl case the macro won't even waste time on tests for its existence.
+dnl
+dnl Optional WX-LIBS argument contains comma- or space-separated list of
+dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS
+dnl and WX_LIBS_STATIC will contain flags to link with all of the core
+dnl wxWidgets libraries.
+dnl
+dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config
+dnl invocation command in present. It can be used to fine-tune lookup of
+dnl best wxWidgets build available.
+dnl
+dnl Optional WX-OPTIONAL-LIBS argument contains comma- or space-separated list
+dnl of wxWidgets libraries to link against if they are available.
+dnl WX-OPTIONAL-LIBS is supported on version 2.9.0 and later.
+dnl
+dnl Example use:
+dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net]
+dnl [--unicode --debug])
+dnl ---------------------------------------------------------------------------
+
+dnl
+dnl Get the cflags and libraries from the wx-config script
+dnl
+AC_DEFUN([WX_CONFIG_CHECK],
+[
+ dnl do we have wx-config name: it can be wx-config or wxd-config or ...
+ if test x${WX_CONFIG_NAME+set} != xset ; then
+ WX_CONFIG_NAME=wx-config
+ fi
+
+ if test "x$wx_config_name" != x ; then
+ WX_CONFIG_NAME="$wx_config_name"
+ fi
+
+ dnl deal with optional prefixes
+ if test x$wx_config_exec_prefix != x ; then
+ wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
+ WX_LOOKUP_PATH="$wx_config_exec_prefix/bin"
+ fi
+ if test x$wx_config_prefix != x ; then
+ wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
+ WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
+ fi
+ if test "$cross_compiling" = "yes"; then
+ wx_config_args="$wx_config_args --host=$host_alias"
+ fi
+
+ dnl don't search the PATH if WX_CONFIG_NAME is absolute filename
+ if test -x "$WX_CONFIG_NAME" ; then
+ AC_MSG_CHECKING(for wx-config)
+ WX_CONFIG_PATH="$WX_CONFIG_NAME"
+ AC_MSG_RESULT($WX_CONFIG_PATH)
+ else
+ AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH")
+ fi
+
+ if test "$WX_CONFIG_PATH" != "no" ; then
+ WX_VERSION=""
+
+ min_wx_version=ifelse([$1], ,2.2.1,$1)
+ if test -z "$5" ; then
+ AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version])
+ else
+ AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)])
+ fi
+
+ dnl don't add the libraries (4th argument) to this variable as this would
+ dnl result in an error when it's used with --version below
+ WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5"
+
+ WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
+ wx_config_major_version=`echo $WX_VERSION | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ wx_config_minor_version=`echo $WX_VERSION | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ wx_config_micro_version=`echo $WX_VERSION | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+ wx_requested_major_version=`echo $min_wx_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ wx_requested_minor_version=`echo $min_wx_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ wx_requested_micro_version=`echo $min_wx_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+ _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version],
+ [$wx_requested_minor_version],
+ [$wx_requested_micro_version])
+
+ if test -n "$wx_ver_ok"; then
+ AC_MSG_RESULT(yes (version $WX_VERSION))
+
+ wx_optional_libs=""
+ _WX_PRIVATE_CHECK_VERSION(2,9,0)
+ if test -n "$wx_ver_ok" -a -n "$6"; then
+ wx_optional_libs="--optional-libs $6"
+ fi
+ WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4 $wx_optional_libs`
+
+ dnl is this even still appropriate? --static is a real option now
+ dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is
+ dnl what the user actually wants, making this redundant at best.
+ dnl For now keep it in case anyone actually used it in the past.
+ AC_MSG_CHECKING([for wxWidgets static library])
+ WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 $wx_optional_libs 2>/dev/null`
+ if test "x$WX_LIBS_STATIC" = "x"; then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ fi
+
+ dnl starting with version 2.2.6 wx-config has --cppflags argument
+ wx_has_cppflags=""
+ if test $wx_config_major_version -gt 2; then
+ wx_has_cppflags=yes
+ else
+ if test $wx_config_major_version -eq 2; then
+ if test $wx_config_minor_version -gt 2; then
+ wx_has_cppflags=yes
+ else
+ if test $wx_config_minor_version -eq 2; then
+ if test $wx_config_micro_version -ge 6; then
+ wx_has_cppflags=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ dnl starting with version 2.7.0 wx-config has --rescomp option
+ wx_has_rescomp=""
+ if test $wx_config_major_version -gt 2; then
+ wx_has_rescomp=yes
+ else
+ if test $wx_config_major_version -eq 2; then
+ if test $wx_config_minor_version -ge 7; then
+ wx_has_rescomp=yes
+ fi
+ fi
+ fi
+ if test "x$wx_has_rescomp" = x ; then
+ dnl cannot give any useful info for resource compiler
+ WX_RESCOMP=
+ else
+ WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp`
+ fi
+
+ if test "x$wx_has_cppflags" = x ; then
+ dnl no choice but to define all flags like CFLAGS
+ WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
+ WX_CPPFLAGS=$WX_CFLAGS
+ WX_CXXFLAGS=$WX_CFLAGS
+
+ WX_CFLAGS_ONLY=$WX_CFLAGS
+ WX_CXXFLAGS_ONLY=$WX_CFLAGS
+ else
+ dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS
+ WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4`
+ WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4`
+ WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4`
+
+ WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
+ WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
+ fi
+
+ ifelse([$2], , :, [$2])
+
+ else
+
+ if test "x$WX_VERSION" = x; then
+ dnl no wx-config at all
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(no (version $WX_VERSION is not new enough))
+ fi
+
+ WX_CFLAGS=""
+ WX_CPPFLAGS=""
+ WX_CXXFLAGS=""
+ WX_LIBS=""
+ WX_LIBS_STATIC=""
+ WX_RESCOMP=""
+
+ if test ! -z "$5"; then
+
+ wx_error_message="
+ The configuration you asked for $PACKAGE_NAME requires a wxWidgets
+ build with the following settings:
+ $5
+ but such build is not available.
+
+ To see the wxWidgets builds available on this system, please use
+ 'wx-config --list' command. To use the default build, returned by
+ 'wx-config --selected-config', use the options with their 'auto'
+ default values."
+
+ fi
+
+ wx_error_message="
+ The requested wxWidgets build couldn't be found.
+ $wx_error_message
+
+ If you still get this error, then check that 'wx-config' is
+ in path, the directory where wxWidgets libraries are installed
+ (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH
+ or equivalent variable and wxWidgets version is $1 or above."
+
+ ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3])
+
+ fi
+ else
+
+ WX_CFLAGS=""
+ WX_CPPFLAGS=""
+ WX_CXXFLAGS=""
+ WX_LIBS=""
+ WX_LIBS_STATIC=""
+ WX_RESCOMP=""
+
+ ifelse([$3], , :, [$3])
+
+ fi
+
+ AC_SUBST(WX_CPPFLAGS)
+ AC_SUBST(WX_CFLAGS)
+ AC_SUBST(WX_CXXFLAGS)
+ AC_SUBST(WX_CFLAGS_ONLY)
+ AC_SUBST(WX_CXXFLAGS_ONLY)
+ AC_SUBST(WX_LIBS)
+ AC_SUBST(WX_LIBS_STATIC)
+ AC_SUBST(WX_VERSION)
+ AC_SUBST(WX_RESCOMP)
+
+ dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols
+ dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness):
+ WX_VERSION_MAJOR="$wx_config_major_version"
+ WX_VERSION_MINOR="$wx_config_minor_version"
+ WX_VERSION_MICRO="$wx_config_micro_version"
+ AC_SUBST(WX_VERSION_MAJOR)
+ AC_SUBST(WX_VERSION_MINOR)
+ AC_SUBST(WX_VERSION_MICRO)
+])
+
+dnl ---------------------------------------------------------------------------
+dnl Get information on the wxrc program for making C++, Python and xrs
+dnl resource files.
+dnl
+dnl AC_ARG_ENABLE(...)
+dnl AC_ARG_WITH(...)
+dnl ...
+dnl WX_CONFIG_OPTIONS
+dnl ...
+dnl WX_CONFIG_CHECK(2.6.0, wxWin=1)
+dnl if test "$wxWin" != 1; then
+dnl AC_MSG_ERROR([
+dnl wxWidgets must be installed on your system
+dnl but wx-config script couldn't be found.
+dnl
+dnl Please check that wx-config is in path, the directory
+dnl where wxWidgets libraries are installed (returned by
+dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or
+dnl equivalent variable and wxWidgets version is 2.6.0 or above.
+dnl ])
+dnl fi
+dnl
+dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0])
+dnl if test "x$HAVE_WXRC" != x1; then
+dnl AC_MSG_ERROR([
+dnl The wxrc program was not installed or not found.
+dnl
+dnl Please check the wxWidgets installation.
+dnl ])
+dnl fi
+dnl
+dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
+dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
+dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
+dnl
+dnl LDFLAGS="$LDFLAGS $WX_LIBS"
+dnl ---------------------------------------------------------------------------
+
+dnl ---------------------------------------------------------------------------
+dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS
+dnl resources. The variable WXRC will be set and substituted in the configure
+dnl script and Makefiles.
+dnl
+dnl Example use:
+dnl WXRC_CHECK([wxrc=1], [wxrc=0])
+dnl ---------------------------------------------------------------------------
+
+dnl
+dnl wxrc program from the wx-config script
+dnl
+AC_DEFUN([WXRC_CHECK],
+[
+ AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler])
+
+ if test "x$WX_CONFIG_NAME" = x; then
+ AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.])
+ else
+
+ AC_MSG_CHECKING([for wxrc])
+
+ if test "x$WXRC" = x ; then
+ dnl wx-config --utility is a new addition to wxWidgets:
+ _WX_PRIVATE_CHECK_VERSION(2,5,3)
+ if test -n "$wx_ver_ok"; then
+ WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc`
+ fi
+ fi
+
+ if test "x$WXRC" = x ; then
+ AC_MSG_RESULT([not found])
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT([$WXRC])
+ ifelse([$1], , :, [$1])
+ fi
+
+ AC_SUBST(WXRC)
+ fi
+])
+
+dnl ---------------------------------------------------------------------------
+dnl WX_LIKE_LIBNAME([output-var] [prefix], [name])
+dnl
+dnl Sets the "output-var" variable to the name of a library named with same
+dnl wxWidgets rule.
+dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets
+dnl the $lib variable to:
+dnl 'mine_gtk2ud_test-2.8'
+dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28
+dnl ---------------------------------------------------------------------------
+AC_DEFUN([WX_LIKE_LIBNAME],
+ [
+ wx_temp="$2""_""$WX_PORT"
+
+ dnl add the [u][d] string
+ if test "$WX_UNICODE" = "1"; then
+ wx_temp="$wx_temp""u"
+ fi
+ if test "$WX_DEBUG" = "1"; then
+ wx_temp="$wx_temp""d"
+ fi
+
+ dnl complete the name of the lib
+ wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR"
+
+ dnl save it in the user's variable
+ $1=$wx_temp
+ ])
+
+dnl ---------------------------------------------------------------------------
+dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO
+dnl
+dnl Two little custom macros which define the ENABLE/WITH configure arguments.
+dnl Macro arguments:
+dnl $1 = the name of the --enable / --with feature
+dnl $2 = the name of the variable associated
+dnl $3 = the description of that feature
+dnl $4 = the default value for that feature
+dnl $5 = additional action to do in case option is given with "yes" value
+dnl ---------------------------------------------------------------------------
+AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO],
+ [AC_ARG_ENABLE($1,
+ AC_HELP_STRING([--enable-$1], [$3 (default is $4)]),
+ [], [enableval="$4"])
+
+ dnl Show a message to the user about this option
+ AC_MSG_CHECKING([for the...
[truncated message content] |
|
From: Nerijus Baliūn. <mah...@us...> - 2020-05-09 17:19:06
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via e59220506721b3213367771e4cb3301e21181df8 (commit)
from 00c2f6e361e64045af6559ab98f9f09bcf22a87d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e59220506721b3213367771e4cb3301e21181df8
Author: Nerijus Baliūnas <ne...@us...>
Date: Sat May 9 20:14:15 2020 +0300
Fix link with gcc 10
diff --git a/lib/dspam/src/hash_drv.h b/lib/dspam/src/hash_drv.h
index 1b683fe8..4bdcd835 100644
--- a/lib/dspam/src/hash_drv.h
+++ b/lib/dspam/src/hash_drv.h
@@ -73,7 +73,7 @@ struct _hash_drv_storage
int flags;
struct nt *dir_handles;
-} *hash_drv_storage_t;
+};
typedef struct _hash_drv_spam_record
{
-----------------------------------------------------------------------
Summary of changes:
lib/dspam/src/hash_drv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2019-07-30 11:35:12
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 00c2f6e361e64045af6559ab98f9f09bcf22a87d (commit)
from 1b285d6ff380a49571eb766a03257670551719d4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 00c2f6e361e64045af6559ab98f9f09bcf22a87d
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 30 13:30:08 2019 +0200
Decode PGP-encoded messages using UTF-8 instead of Latin-1
The decryption code seems to assume that anything coming back from gpg
is UTF-8 encoded which is probably not correct (to be tested with
encrypted messages using Content-Type charset different from UTF-8), but
as long as it does this, we need to use utf8_str() to work with decoded
data and not To8BitData().
This fixes showing encrypted messages with non-ASCII characters, which
previously couldn't be shown at all.
diff --git a/src/classes/MessageView.cpp b/src/classes/MessageView.cpp
index a73f5d37..3f8b98a6 100644
--- a/src/classes/MessageView.cpp
+++ b/src/classes/MessageView.cpp
@@ -2627,8 +2627,8 @@ MessageView::ProcessEncryptedMultiPart(const MimePart *mimepart)
// messages created under Unix systems, but c-client functions used
// in MimePartVirtual do expect a message in canonical format so we
// must ensure that we do have CR LFs
- MimePartVirtual *mpv = new
- MimePartVirtual(strutil_enforceCRLF(decryptedData).To8BitData());
+ const String dataCRLF = strutil_enforceCRLF(decryptedData);
+ MimePartVirtual *mpv = new MimePartVirtual(dataCRLF.utf8_str());
if ( mpv->IsOk() )
{
-----------------------------------------------------------------------
Summary of changes:
src/classes/MessageView.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2019-07-21 12:37:09
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 1b285d6ff380a49571eb766a03257670551719d4 (commit)
via 7089094b95b7858f263b986f49bdf8409aeae468 (commit)
via f70237fdb3ea7b2423c6ac59443f8d488639c0e1 (commit)
via a6c1e3e87239a9bc9a265db11ff523abd43907a4 (commit)
via 9b5b3a508259c5f05f2fec6a650f552a57177c01 (commit)
via 0c8afa393de9d49f0005bf4225c79a230582579e (commit)
via 61864a6f657f02ceee767bac57d55d008f3bd4a6 (commit)
from 7a2637cc0293354853e42b6098864305be166d60 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1b285d6ff380a49571eb766a03257670551719d4
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 16 15:03:38 2019 +0200
Prefer using lax UTF-8 decoding to Latin-1 for UTF-8 MIME parts
In 2019 it's vastly more likely that a message part using UTF-8 encoding
is actually encoded in UTF-8 and just has some non-UTF-8 bit appended to
it at the end, than it doesn't use UTF-8 at all (as happened 20 years
with some completely broken email-sending scripts that simple added
charset="UTF-8" to Content-Type without worrying about the actual
encoding of the data).
So stop replacing UTF-8 with Latin-1 at MimePart level and try to decode
the contents as UTF-8, but just ignore the non-UTF-8 characters instead.
From the user point of view, it means that the message with a non-UTF-8
trailer will now appear almost correctly by default, instead of having
to manually select "Language|UTF-8" to be able to see it correctly.
diff --git a/src/mail/MimePartCCBase.cpp b/src/mail/MimePartCCBase.cpp
index 72d7ae7a..5aff0c7c 100644
--- a/src/mail/MimePartCCBase.cpp
+++ b/src/mail/MimePartCCBase.cpp
@@ -284,28 +284,6 @@ wxFontEncoding MimePartCCBase::GetTextEncoding() const
{
m_encoding = wxFONTENCODING_ISO8859_1;
}
-
- // special case: many broken programs generate messages with UTF-8
- // charset but without properly encoding the contents in UTF-8 which
- // results in "s" being empty and not showing the text parts at all
- //
- // so if the conversion failed, try to show the text at least somehow
- // using latin1 (and the user will be able to change the encoding
- // manually from the menu later which would be impossible if we returned
- // an empty string from GetTextContent())
- if ( m_encoding == wxFONTENCODING_UTF8 ||
- m_encoding == wxFONTENCODING_UTF7 )
- {
- // check if we really have valid UTF-x
- unsigned long len;
- const char *p = reinterpret_cast<const char *>(GetContent(&len));
-
- if ( p &&
- wxCSConv(m_encoding).ToWChar(NULL, 0, p, len) == wxCONV_FAILED )
- {
- m_encoding = wxFONTENCODING_ISO8859_1;
- }
- }
}
return m_encoding;
@@ -496,7 +474,7 @@ String MimePartCCBase::GetTextContent() const
wxString s;
if ( p )
{
- s = wxString(p, wxCSConv(GetTextEncoding()), len);
+ s = MIME::DecodeText(p, len, GetTextEncoding());
}
return s;
commit 7089094b95b7858f263b986f49bdf8409aeae468
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 16 15:03:03 2019 +0200
Refactor UTF-8 non-strict decoding to a separate function
Add MIME::DecodeText() for "lossless" decoding of UTF-8.
No real changes.
diff --git a/include/mail/MimeDecode.h b/include/mail/MimeDecode.h
index b62b1c90..c20a3f0f 100644
--- a/include/mail/MimeDecode.h
+++ b/include/mail/MimeDecode.h
@@ -81,6 +81,15 @@ EncodeHeader(const wxString& in, wxFontEncoding enc = wxFONTENCODING_SYSTEM);
*/
String DecodeHeader(const String& in, wxFontEncoding *encoding = NULL);
+/**
+ Helper for decoding the given data using the specified encoding.
+
+ This method tries hard to return something useful and ignores invalid
+ characters when decoding using UTF-8 instead of failing and returning an
+ empty string, which is not useful.
+ */
+String DecodeText(const char *p, size_t len, wxFontEncoding enc);
+
} // namespace MIME
#endif // M_MAIL_MIMEDECODE_H
diff --git a/src/classes/MessageView.cpp b/src/classes/MessageView.cpp
index 23b6fcc4..a73f5d37 100644
--- a/src/classes/MessageView.cpp
+++ b/src/classes/MessageView.cpp
@@ -176,19 +176,7 @@ RecodeText(String *text, wxFontEncoding encSrc, wxFontEncoding encDst)
const wxCharBuffer textMB(text->mb_str(wxCSConv(encSrc)));
CHECK_RET( textMB, "string not in source encoding?" );
- // Special case of using UTF-8: it often happens that a message encoded in
- // UTF-8 has some trailer with Latin-1 appended to it. In this case, try to
- // recover as much of UTF-8 text as possible.
- if ( encDst == wxFONTENCODING_UTF8 )
- {
- *text = String(textMB, wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA));
- }
- else
- {
- String textNew = String(textMB, wxCSConv(encDst));
- if ( !textNew.empty() )
- text->swap(textNew);
- }
+ *text = MIME::DecodeText(textMB, textMB.length(), encDst);
}
#else // !wxUSE_UNICODE
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index c1d9c95c..f8f511f1 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -738,3 +738,18 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
return headerEnc.ToAscii();
}
+
+String MIME::DecodeText(const char *p, size_t len, wxFontEncoding enc)
+{
+ // Special case of using UTF-8: it often happens that a message encoded in
+ // UTF-8 has some trailer with Latin-1 appended to it. In this case, try to
+ // recover as much of UTF-8 text as possible.
+ if ( enc == wxFONTENCODING_UTF8 )
+ {
+ return String(p, wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA), len);
+ }
+ else
+ {
+ return String(p, wxCSConv(enc), len);
+ }
+}
commit f70237fdb3ea7b2423c6ac59443f8d488639c0e1
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 16 14:41:08 2019 +0200
Allow viewing not quite UTF-8 messages using UTF-8
Ignore invalid characters when decoding the message text using UTF-8,
this can be useful when the message is mostly UTF-8, but just happens to
contain some trailing junk not using UTF-8 at the end.
And it's definitely better to show at least something when the user
selects "UTF-8" from the "Language" menu rather than nothing at all, as
happened before.
diff --git a/src/classes/MessageView.cpp b/src/classes/MessageView.cpp
index aa936579..23b6fcc4 100644
--- a/src/classes/MessageView.cpp
+++ b/src/classes/MessageView.cpp
@@ -176,7 +176,19 @@ RecodeText(String *text, wxFontEncoding encSrc, wxFontEncoding encDst)
const wxCharBuffer textMB(text->mb_str(wxCSConv(encSrc)));
CHECK_RET( textMB, "string not in source encoding?" );
- *text = String(textMB, wxCSConv(encDst));
+ // Special case of using UTF-8: it often happens that a message encoded in
+ // UTF-8 has some trailer with Latin-1 appended to it. In this case, try to
+ // recover as much of UTF-8 text as possible.
+ if ( encDst == wxFONTENCODING_UTF8 )
+ {
+ *text = String(textMB, wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA));
+ }
+ else
+ {
+ String textNew = String(textMB, wxCSConv(encDst));
+ if ( !textNew.empty() )
+ text->swap(textNew);
+ }
}
#else // !wxUSE_UNICODE
commit a6c1e3e87239a9bc9a265db11ff523abd43907a4
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 16 14:02:31 2019 +0200
Use UTF-8 as fallback encoding for MIME headers directly
This makes more sense than using the local system encoding, which is not
really relevant for the headers being sent out.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index bce5ec4a..c1d9c95c 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -643,16 +643,12 @@ wxCharBuffer MIME::EncodeHeader(const String& in, wxFontEncoding enc)
if ( !NeedsEncoding(in) )
return in.ToAscii();
- // decide about the encoding to use if none specified
- if ( enc == wxFONTENCODING_SYSTEM )
+ // If we were given an explicit encoding to use, check if we can use it, and
+ // if not fall back to the same UTF-8 (which can always be used) as we use
+ // by default if no encoding was specified in the first place.
+ if ( enc == wxFONTENCODING_SYSTEM ||
+ wxCSConv(enc).FromWChar(NULL, 0, in.wc_str(wxConvLibc)) == wxCONV_FAILED )
{
- // try to use the user current encoding first
- enc = wxLocale::GetSystemEncoding();
- }
-
- if ( wxCSConv(enc).FromWChar(NULL, 0, in.wc_str(wxConvLibc)) == wxCONV_FAILED )
- {
- // but if we can't encode with it, fall back to UTF-8 as it never fails
enc = wxFONTENCODING_UTF8;
}
commit 9b5b3a508259c5f05f2fec6a650f552a57177c01
Author: Vadim Zeitlin <vz-...@ze...>
Date: Tue Jul 16 14:00:28 2019 +0200
Remove unnecessary inclusion of a private wx header
No real changes.
diff --git a/src/modules/TextViewer.cpp b/src/modules/TextViewer.cpp
index bd7bac69..9e7d0291 100644
--- a/src/modules/TextViewer.cpp
+++ b/src/modules/TextViewer.cpp
@@ -37,10 +37,6 @@
#include <wx/html/htmprint.h> // for wxHtmlEasyPrinting
-#ifdef __WXMSW__
- #include <wx/msw/private.h>
-#endif // __WXMSW__
-
// only Win32 supports URLs in the text control natively so far, define this to
// use this possibility
//
commit 0c8afa393de9d49f0005bf4225c79a230582579e
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Mar 14 22:14:29 2019 +0100
Avoid assertion failures when reloading SSL DLLs
If InitSSL() failed due to a missing function in either of SSL shared
libraries, then calling it again would result in an assertion failure
(in debug build only, of course) from wxDynamicLibrary::Load().
Fix this by explicitly unloading the libraries in case of failure.
diff --git a/src/util/ssl.cpp b/src/util/ssl.cpp
index 417447cb..4483f4ef 100644
--- a/src/util/ssl.cpp
+++ b/src/util/ssl.cpp
@@ -394,6 +394,12 @@ bool InitSSL(void) /* FIXME: MT */
return true;
error:
+ // Unload the DLLs to avoid assertion failures when calling Load() on them
+ // again if we reattempt SSL initialization later (note that Unload() itself
+ // doesn't assert and just doesn't do anything if the DLL is not loaded).
+ gs_dllSll.Unload();
+ gs_dllCrypto.Unload();
+
if ( !s_errMsgGiven )
{
ERRORMESSAGE((_("SSL authentication is not available.")));
commit 61864a6f657f02ceee767bac57d55d008f3bd4a6
Author: Vadim Zeitlin <va...@ze...>
Date: Thu Mar 14 22:10:03 2019 +0100
Remove SSL_state not existing any more in OpenSSL 1.1
It seems to have never been used, so there is no need to replace it with
SSL_get_state().
diff --git a/src/util/ssl.cpp b/src/util/ssl.cpp
index 8d56305d..417447cb 100644
--- a/src/util/ssl.cpp
+++ b/src/util/ssl.cpp
@@ -357,7 +357,6 @@ bool InitSSL(void) /* FIXME: MT */
SSL_LOOKUP(SSL_CTX_set_default_verify_paths);
SSL_LOOKUP(SSL_set_bio);
SSL_LOOKUP(SSL_set_connect_state);
- SSL_LOOKUP(SSL_state);
SSL_LOOKUP(SSL_ctrl);
SSL_LOOKUP(TLSv1_server_method);
SSL_LOOKUP(SSL_CTX_set_cipher_list);
-----------------------------------------------------------------------
Summary of changes:
include/mail/MimeDecode.h | 9 +++++++++
src/classes/MessageView.cpp | 2 +-
src/mail/MimeDecode.cpp | 29 ++++++++++++++++++++---------
src/mail/MimePartCCBase.cpp | 24 +-----------------------
src/modules/TextViewer.cpp | 4 ----
src/util/ssl.cpp | 7 ++++++-
6 files changed, 37 insertions(+), 38 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Vadim Z. <mah...@us...> - 2018-07-08 17:40:15
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 6b0283a44f53a5429078b663bec71287453726dc (commit)
via 9bde3628a0cc8053e63f1b49d2a9e11638f8379b (commit)
via 9713e1a8f4e83fbec580e494b7e4f95f71954da1 (commit)
via b3e9245ef0a468190fee14d7aee31250f6806b89 (commit)
via 2dab036b615c8512bc1fe2f865fd970ba4d2ba3f (commit)
via 3ffe567a61402a057c31a86036f7da5be56ecfb3 (commit)
via d95b85e6454c7eb3a02b994bc96f6bab6dee53c9 (commit)
via 54e985b6761badeb51aa19e3a1c628cca3e23e1a (commit)
via 27485d606c4c240e181e69021db9a36bddd3c2ad (commit)
via dea15864927f6b5aecb028f747a0e17514eb3034 (commit)
from 20d10932c1b273b65e0cfcabb2553fbda64578d5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6b0283a44f53a5429078b663bec71287453726dc
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sun Jul 8 19:37:01 2018 +0200
Upgrade MSVS projects to 2017 version
No real changes, just use a newer toolset.
diff --git a/M.vcxproj b/M.vcxproj
index 4f1133ec..6eac4b31 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug DLL|Win32">
<Configuration>Debug DLL</Configuration>
@@ -38,48 +38,48 @@
<ProjectGuid>{1515C8EB-5C72-43DF-9D3A-0703F155F268}</ProjectGuid>
<RootNamespace>M</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -146,7 +146,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -179,7 +179,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -214,7 +214,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -248,7 +248,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -281,7 +281,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -313,7 +313,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -347,7 +347,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -381,7 +381,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
diff --git a/Mconfig.vcxproj b/Mconfig.vcxproj
index c7607f70..7c077d7b 100644
--- a/Mconfig.vcxproj
+++ b/Mconfig.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -23,28 +23,28 @@
<ProjectGuid>{86C1D2C7-C961-4017-88E8-63D0BCCBD0D5}</ProjectGuid>
<RootNamespace>config</RootNamespace>
<Keyword>MakeFileProj</Keyword>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -138,4 +138,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/compface/compface.vcxproj b/lib/compface/compface.vcxproj
index e04849b1..0bfbac14 100644
--- a/lib/compface/compface.vcxproj
+++ b/lib/compface/compface.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -20,32 +20,32 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{0E9F4403-1AA1-4824-A99F-041B1BF18D14}</ProjectGuid>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -249,4 +249,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/dspam/dspam.vcxproj b/lib/dspam/dspam.vcxproj
index 2ae9197f..2a69f4e0 100644
--- a/lib/dspam/dspam.vcxproj
+++ b/lib/dspam/dspam.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -21,32 +21,32 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{62156246-DCEA-4713-95E0-C01F595F1A20}</ProjectGuid>
<RootNamespace>dspam</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -242,4 +242,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/imap/imap.vcxproj b/lib/imap/imap.vcxproj
index 491e8b7b..4ee803e0 100644
--- a/lib/imap/imap.vcxproj
+++ b/lib/imap/imap.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -21,32 +21,32 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{457cfec8-5c3f-4c7e-98a6-b65e1de22682}</ProjectGuid>
<RootNamespace>imap</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -240,4 +240,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/wx/vcard/versit.vcxproj b/src/wx/vcard/versit.vcxproj
index b9e41256..eadb043e 100644
--- a/src/wx/vcard/versit.vcxproj
+++ b/src/wx/vcard/versit.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -21,28 +21,28 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{E46C11C7-5924-4F7C-B82E-5BEB8856A8BC}</ProjectGuid>
<RootNamespace>versit</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -271,4 +271,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
commit 9bde3628a0cc8053e63f1b49d2a9e11638f8379b
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sun Jul 8 19:36:14 2018 +0200
Just some minor tweaks to the progress dialog appearance
No real changes, just reserve more space for the dialog width.
diff --git a/src/mail/MailFolderCC.cpp b/src/mail/MailFolderCC.cpp
index 44fc12c6..3e4185ef 100644
--- a/src/mail/MailFolderCC.cpp
+++ b/src/mail/MailFolderCC.cpp
@@ -676,9 +676,9 @@ public:
m_progdlg = new MProgressDialog
(
name,
- m_msgProgress + "\n\n" +
- _("Initializing...") + '\n' +
- wxString(' ', 100) + '\n',
+ m_msgProgress + "\n" +
+ _("Initializing...") + wxString(L'\u00a0', 150) +
+ '\n',
m_nTotal
);
}
@@ -695,7 +695,7 @@ public:
// construct the label
String label;
- label << m_msgProgress << "\n\n"
+ label << m_msgProgress << "\n"
<< _("From: ") << ShortenIfNecessary(entry.GetFrom()) << _T('\n')
<< _("Subject: ") << ShortenIfNecessary(entry.GetSubject());
commit 9713e1a8f4e83fbec580e494b7e4f95f71954da1
Author: Vadim Zeitlin <vz-...@ze...>
Date: Fri Nov 10 15:58:28 2017 +0100
Improve showing multiple messages in an info bar
This is still far from ideal as all but the most important (or last, if
they are all equally important) message is basically lost, but it's
slightly better than showing all of them in quick succession, which
still didn't allow to read them and just resulted in flicker.
diff --git a/include/gui/wxMLog.h b/include/gui/wxMLog.h
index 5ac4a678..3fb065b0 100644
--- a/include/gui/wxMLog.h
+++ b/include/gui/wxMLog.h
@@ -36,12 +36,21 @@ private:
// Ctor is private, use static Activate() to actually create the object.
wxMLog() = default;
+ // This method is private and can be called only by wxMLogTargetSetter.
+ void SetInfoBarToUse(wxInfoBarBase* infobar);
+
// The unique currently used wxMLog.
static wxMLog* ms_MLog;
- // This member is private and can be manipulated only by wxMLogTargetSetter.
+ // SetInfoBarToUse() must be called to change this from outside this class.
wxInfoBarBase* m_activeInfoBar = nullptr;
+ // The last shown message using the same infobar as is currently used.
+ wxString m_lastMsg;
+
+ // The level of the last shown message, only used if m_lastMsg is not empty.
+ wxLogLevel m_lastShownLevel = wxLOG_Max;
+
friend class wxMLogTargetSetter;
wxMLog(const wxMLog&);
@@ -57,13 +66,13 @@ public:
: m_infobarOrig(wxMLog::ms_MLog ? wxMLog::ms_MLog->m_activeInfoBar : NULL)
{
if ( wxMLog::ms_MLog )
- wxMLog::ms_MLog->m_activeInfoBar = infobar;
+ wxMLog::ms_MLog->SetInfoBarToUse(infobar);
}
~wxMLogTargetSetter()
{
if ( wxMLog::ms_MLog )
- wxMLog::ms_MLog->m_activeInfoBar = m_infobarOrig;
+ wxMLog::ms_MLog->SetInfoBarToUse(m_infobarOrig);
}
private:
diff --git a/src/gui/wxMLog.cpp b/src/gui/wxMLog.cpp
index 679a36ae..4ce68fc2 100644
--- a/src/gui/wxMLog.cpp
+++ b/src/gui/wxMLog.cpp
@@ -42,32 +42,30 @@ wxMLog::Activate()
}
void
-wxMLog::DoLogRecord(wxLogLevel level,
- const wxString& msg,
- const wxLogRecordInfo& info)
+wxMLog::SetInfoBarToUse(wxInfoBarBase* infobar)
{
- if ( !m_activeInfoBar )
- {
- wxLogGui::DoLogRecord(level, msg, info);
- return;
- }
+ // Last message was shown in a different infobar, so forget about it.
+ m_lastMsg.clear();
+ m_lastShownLevel = wxLOG_Max;
- int flags = 0;
+ m_activeInfoBar = infobar;
+}
+
+static
+int GetFlagsForLogLevel(wxLogLevel level)
+{
switch ( level )
{
case wxLOG_FatalError:
case wxLOG_Error:
- flags |= wxICON_ERROR;
- break;
+ return wxICON_ERROR;
case wxLOG_Warning:
- flags |= wxICON_WARNING;
- break;
+ return wxICON_WARNING;
case wxLOG_Message:
case wxLOG_Info:
- flags |= wxICON_INFORMATION;
- break;
+ return wxICON_INFORMATION;
case wxLOG_Status:
case wxLOG_Debug:
@@ -76,9 +74,54 @@ wxMLog::DoLogRecord(wxLogLevel level,
case wxLOG_User:
case wxLOG_Max:
default:
- // These messages are not shown in the infobar at all.
- return;
+ return 0;
+ }
+}
+
+void
+wxMLog::DoLogRecord(wxLogLevel level,
+ const wxString& msg,
+ const wxLogRecordInfo& info)
+{
+ if ( !m_activeInfoBar )
+ {
+ wxLogGui::DoLogRecord(level, msg, info);
+ return;
+ }
+
+ int flags = GetFlagsForLogLevel(level);
+ if ( !flags )
+ {
+ // These messages are too low priority to be shown in the infobar.
+ return;
+ }
+
+ wxString msgToShow;
+
+ if ( m_lastMsg.empty() )
+ {
+ m_lastMsg = msg;
+ msgToShow = msg;
+ }
+ else // We already have another message shown
+ {
+ // Check if we need to override it with the more recent one: normally we
+ // do it, but avoid overriding an error with an informational message.
+ if ( level <= m_lastShownLevel )
+ {
+ m_lastMsg = msg;
+ m_lastShownLevel = level;
+ }
+ else // The new message has strictly lower severity
+ {
+ // Don't show it and don't update the last values, but do use the same
+ // flags as the last time instead of the new ones.
+ flags = GetFlagsForLogLevel(m_lastShownLevel);
+ }
+
+ msgToShow = m_lastMsg;
+ msgToShow += " (and other messages, see log)";
}
- m_activeInfoBar->ShowMessage(msg, flags);
+ m_activeInfoBar->ShowMessage(msgToShow, flags);
}
commit b3e9245ef0a468190fee14d7aee31250f6806b89
Author: Vadim Zeitlin <vz-...@ze...>
Date: Fri Nov 10 15:36:02 2017 +0100
Use C++11 member initialization in wxMLog
There is no need to write out the ctor now that C++11 is used.
No real changes, just make the code shorter and safer.
diff --git a/include/gui/wxMLog.h b/include/gui/wxMLog.h
index 636dc324..5ac4a678 100644
--- a/include/gui/wxMLog.h
+++ b/include/gui/wxMLog.h
@@ -33,14 +33,14 @@ protected:
const wxLogRecordInfo& info);
private:
- // Ctor is private, use static Activate() to
- wxMLog();
+ // Ctor is private, use static Activate() to actually create the object.
+ wxMLog() = default;
// The unique currently used wxMLog.
static wxMLog* ms_MLog;
// This member is private and can be manipulated only by wxMLogTargetSetter.
- wxInfoBarBase* m_activeInfoBar;
+ wxInfoBarBase* m_activeInfoBar = nullptr;
friend class wxMLogTargetSetter;
diff --git a/src/gui/wxMLog.cpp b/src/gui/wxMLog.cpp
index 19774ff9..679a36ae 100644
--- a/src/gui/wxMLog.cpp
+++ b/src/gui/wxMLog.cpp
@@ -41,11 +41,6 @@ wxMLog::Activate()
delete wxLog::SetActiveTarget(ms_MLog);
}
-wxMLog::wxMLog()
-{
- m_activeInfoBar = NULL;
-}
-
void
wxMLog::DoLogRecord(wxLogLevel level,
const wxString& msg,
commit 2dab036b615c8512bc1fe2f865fd970ba4d2ba3f
Merge: 3ffe567a 54e985b6
Author: Vadim Zeitlin <vz-...@ze...>
Date: Fri Nov 10 15:09:42 2017 +0100
Merge branch 'better-log'
Improve UI for errors logged while showing the messages by showing them
in an unobtrusive wxInfoBar instead of modal message boxes.
commit 3ffe567a61402a057c31a86036f7da5be56ecfb3
Author: Vadim Zeitlin <vz-...@ze...>
Date: Fri Nov 10 15:07:56 2017 +0100
Improve appearance of progress dialog on folder opening
Especially under Windows, with the native wxProgressDialog
implementation, it is important to keep the messages used in the dialog
of roughly the same size as otherwise it can be automatically resized,
resulting in jarring size changes while the headers are being retrieved.
This is a purely cosmetic change.
diff --git a/src/mail/MailFolderCC.cpp b/src/mail/MailFolderCC.cpp
index 6a17a08e..44fc12c6 100644
--- a/src/mail/MailFolderCC.cpp
+++ b/src/mail/MailFolderCC.cpp
@@ -671,10 +671,14 @@ public:
m_msgProgress.Printf(_("Retrieving %lu message headers..."), m_nTotal);
+ // Make a placeholder for the message of comparable size to the messages
+ // shown below by UpdateProgress().
m_progdlg = new MProgressDialog
(
name,
- m_msgProgress + _T("\n\n"),
+ m_msgProgress + "\n\n" +
+ _("Initializing...") + '\n' +
+ wxString(' ', 100) + '\n',
m_nTotal
);
}
@@ -691,9 +695,9 @@ public:
// construct the label
String label;
- label << m_msgProgress << _T('\n')
- << _("From: ") << entry.GetFrom() << _T('\n')
- << _("Subject: ") << entry.GetSubject();
+ label << m_msgProgress << "\n\n"
+ << _("From: ") << ShortenIfNecessary(entry.GetFrom()) << _T('\n')
+ << _("Subject: ") << ShortenIfNecessary(entry.GetSubject());
if ( !m_progdlg->Update(m_nRetrieved, label) )
{
@@ -706,6 +710,26 @@ public:
}
private:
+ // A small helper to avoid showing too long strings in the progress dialog.
+ static wxString ShortenIfNecessary(const String& s)
+ {
+ wxString label(s);
+
+ // Ensure it doesn't have multiple lines.
+ label = label.BeforeFirst('\n');
+
+ // This is arbitrary, but we need to have some limit.
+ const size_t MAX_LABEL_LEN = 72;
+ if ( label.length() > MAX_LABEL_LEN )
+ {
+ label.Truncate(MAX_LABEL_LEN - 3);
+ label += "...";
+ }
+
+ return label;
+ }
+
+
// the total number of messages we are going to retrieve
size_t m_nTotal;
commit d95b85e6454c7eb3a02b994bc96f6bab6dee53c9
Author: Vadim Zeitlin <vz-...@ze...>
Date: Fri Nov 10 15:00:53 2017 +0100
Get rid of extra junk in quote prefix for mailing list posts
Many mailing lists use "From:" header of the form "Real Poster via
Mailing List" nowadays to work around DKIM constraints. This results in
using "RPvML" as quote prefix, which doesn't make much sense, so check
for this particular case and ignore everything coming after "via".
This is just a hack, but then so is the "via Mailing List" suffix to
begin with.
diff --git a/src/classes/ComposeTemplate.cpp b/src/classes/ComposeTemplate.cpp
index d712cf90..d7acbb6f 100644
--- a/src/classes/ComposeTemplate.cpp
+++ b/src/classes/ComposeTemplate.cpp
@@ -598,7 +598,21 @@ static String GetReplyPrefix(Message *msg, Profile *profile)
wxStringTokenizer tk(name, " '-", wxTOKEN_STRTOK);
while ( tk.HasMoreTokens() )
{
- wxChar chInitial = tk.GetNextToken()[0u];
+ const wxString& token = tk.GetNextToken();
+ if ( token == "via" )
+ {
+ // Many mailing lists rewrite "From:" header to be "Original
+ // Sender via Mailing List <ma...@li...>" to avoid
+ // problems with DKIM, don't include the nonsensical "vML"
+ // string into our attribution here.
+ if ( !prefix.empty() )
+ break;
+
+ // Unless we have nothing in it yet, in this case "via" might
+ // have been a false positive?
+ }
+
+ wxChar chInitial = token[0u];
if ( chInitial == '<' )
{
commit 54e985b6761badeb51aa19e3a1c628cca3e23e1a
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sun Oct 1 00:59:24 2017 +0200
Add a way to show log messages less intrusively
Create wxMLog class redirecting log messages to the currently active
wxInfoBar, if any, and set up an active wxInfoBar when showing a message in
a wxMessageView.
This shows any errors that may occur while parsing and showing the message in
this infobar without annoying the user with message boxes, which is much
better from the UI point of view.
diff --git a/M.vcxproj b/M.vcxproj
index e0bc5992..4f1133ec 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -481,6 +481,7 @@
<ClCompile Include="src\gui\wxMGuiUtils.cpp" />
<ClCompile Include="src\gui\wxMimeDialog.cpp" />
<ClCompile Include="src\gui\wxMIMETreeDialog.cpp" />
+ <ClCompile Include="src\gui\wxMLog.cpp" />
<ClCompile Include="src\gui\wxModulesDlg.cpp" />
<ClCompile Include="src\gui\wxMsgCmdProc.cpp" />
<ClCompile Include="src\gui\wxMSplash.cpp" />
@@ -1404,6 +1405,7 @@
<ClInclude Include="include\FolderType.h" />
<ClInclude Include="include\FolderView.h" />
<ClInclude Include="include\guidef.h" />
+ <ClInclude Include="include\gui\wxMLog.h" />
<ClInclude Include="include\HeaderInfo.h" />
<ClInclude Include="include\HeaderInfoImpl.h" />
<ClInclude Include="include\HeadersDialogs.h" />
diff --git a/M.vcxproj.filters b/M.vcxproj.filters
index a6914e2f..f75f942a 100644
--- a/M.vcxproj.filters
+++ b/M.vcxproj.filters
@@ -582,6 +582,9 @@
<ClCompile Include="src\wx\generic\vcarddlg.cpp">
<Filter>Source Files\vcard</Filter>
</ClCompile>
+ <ClCompile Include="src\gui\wxMLog.cpp">
+ <Filter>Source Files\gui</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="include\interface\HeaderInfo.i">
@@ -937,6 +940,9 @@
<ClInclude Include="include\mail\Header.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="include\gui\wxMLog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\M.rc">
diff --git a/include/MessageView.h b/include/MessageView.h
index d077a034..20921ab1 100644
--- a/include/MessageView.h
+++ b/include/MessageView.h
@@ -101,6 +101,10 @@ public:
*/
//@{
+ /// Get the window containing the viewer window and any other helper GUI
+ /// elements.
+ virtual wxWindow *GetContainerWindow() const = 0;
+
/// get the underlying window
wxWindow *GetWindow() const;
diff --git a/include/gui/wxMLog.h b/include/gui/wxMLog.h
new file mode 100644
index 00000000..636dc324
--- /dev/null
+++ b/include/gui/wxMLog.h
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////////
+// Project: M - cross platform e-mail GUI client
+// File name: gui/wxMLog.h
+// Purpose: wxMLog is a custom wxLog target showing the messages in a less
+// intrusive way by using the active wxInfoBar or showing them in
+// the default way if there is no active one currently
+// Author: Vadim Zeitlin
+// Created: 2017-09-30
+// Copyright: (c) 2017 Mahogany team
+// Licence: M license
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _M_MLOG_H_
+#define _M_MLOG_H_
+
+#include <wx/log.h>
+
+class wxInfoBarBase;
+
+// This class is never used directly, you need to use wxMLogTargetSetter below
+// to set the given wxInfoBar object as the target of log messages.
+class wxMLog : public wxLogGui
+{
+public:
+ // Install an object of this class as current wxLog target.
+ //
+ // Normally should be called exactly once, on program startup.
+ static void Activate();
+
+protected:
+ virtual void DoLogRecord(wxLogLevel level,
+ const wxString& msg,
+ const wxLogRecordInfo& info);
+
+private:
+ // Ctor is private, use static Activate() to
+ wxMLog();
+
+ // The unique currently used wxMLog.
+ static wxMLog* ms_MLog;
+
+ // This member is private and can be manipulated only by wxMLogTargetSetter.
+ wxInfoBarBase* m_activeInfoBar;
+
+ friend class wxMLogTargetSetter;
+
+ wxMLog(const wxMLog&);
+ wxMLog& operator=(const wxMLog&);
+};
+
+// Small RAII helper class ensuring that the active info bar is reset in its
+// dtor.
+class wxMLogTargetSetter
+{
+public:
+ explicit wxMLogTargetSetter(wxInfoBarBase* infobar)
+ : m_infobarOrig(wxMLog::ms_MLog ? wxMLog::ms_MLog->m_activeInfoBar : NULL)
+ {
+ if ( wxMLog::ms_MLog )
+ wxMLog::ms_MLog->m_activeInfoBar = infobar;
+ }
+
+ ~wxMLogTargetSetter()
+ {
+ if ( wxMLog::ms_MLog )
+ wxMLog::ms_MLog->m_activeInfoBar = m_infobarOrig;
+ }
+
+private:
+ wxInfoBarBase* const m_infobarOrig;
+
+ wxMLogTargetSetter(const wxMLogTargetSetter&);
+ wxMLogTargetSetter& operator=(const wxMLogTargetSetter&);
+};
+
+#endif // _M_MLOG_H_
diff --git a/include/gui/wxMessageView.h b/include/gui/wxMessageView.h
index ae222efa..bd6d94c8 100644
--- a/include/gui/wxMessageView.h
+++ b/include/gui/wxMessageView.h
@@ -27,6 +27,7 @@
class FolderView;
class MsgCmdProc;
+class wxInfoBar;
// ----------------------------------------------------------------------------
// wxMessageView
@@ -49,6 +50,8 @@ public:
/// Destructor
~wxMessageView();
+ virtual wxWindow *GetContainerWindow() const { return m_viewerParent; }
+
/// show message
virtual void DoShowMessage(Message *msg);
@@ -79,6 +82,14 @@ private:
/// the array containing the names of all the existing viewers
wxArrayString m_namesViewers;
+
+ /// The window containing the real viewer and various helper elements such
+ /// as the wxInfoBar below.
+ wxWindow* m_viewerParent;
+
+ /// The info bar object used for showing errors and warnings specific to
+ /// this message.
+ wxInfoBar* m_infobar;
};
// ----------------------------------------------------------------------------
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 0b3c6386..ca16b3dc 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -341,6 +341,9 @@ public:
wxFolderListCtrl *listCtrl);
virtual ~wxFolderMsgWindow();
+ // Called only once, soon after creation.
+ void SetViewerContainerWindow(wxWindow *winViewerContainer);
+
// called when the old viewer window is about to be destroyed and replaced
// with the new one
void SetViewerWindow(wxWindow *winViewerNew);
@@ -376,6 +379,9 @@ private:
// the folder view list part
wxFolderListCtrl *m_listCtrl;
+ // the window containing the viewer window (never NULL)
+ wxWindow *m_winViewerContainer;
+
// the current viewer window (may be NULL)
wxWindow *m_winViewer;
@@ -1138,10 +1144,15 @@ wxFolderMsgWindow::wxFolderMsgWindow(wxWindow *parent,
#endif // USE_VIEWER_BAR
m_folderView = folderView;
m_listCtrl = listCtrl;
- m_winViewer = NULL;
+ m_winViewerContainer = NULL;
m_evtHandlerMsgView = NULL;
}
+void wxFolderMsgWindow::SetViewerContainerWindow(wxWindow *winViewerContainer)
+{
+ m_winViewerContainer = winViewerContainer;
+}
+
// called when the old viewer window is about to be destroyed and replaced
// with the new one
void wxFolderMsgWindow::SetViewerWindow(wxWindow *winViewerNew)
@@ -1365,7 +1376,7 @@ void wxFolderMsgWindow::UpdateOptions()
void wxFolderMsgWindow::OnSize(wxSizeEvent& /* event */)
{
- if ( m_winViewer )
+ if ( m_winViewerContainer )
{
Resize();
}
@@ -1439,7 +1450,7 @@ void wxFolderMsgWindow::Resize()
y = 0;
}
- m_winViewer->SetSize(0, y, size.x, size.y - y);
+ m_winViewerContainer->SetSize(0, y, size.x, size.y - y);
}
// ----------------------------------------------------------------------------
@@ -3365,6 +3376,9 @@ wxFolderView::wxFolderView(wxWindow *parent)
m_MessagePreview = MessageView::Create(m_MessageWindow, this);
+ m_MessageWindow->
+ SetViewerContainerWindow(m_MessagePreview->GetContainerWindow());
+
m_MessageWindow->SetViewerWindow(m_MessagePreview->GetWindow());
m_msgCmdProc = MsgCmdProc::Create(m_MessagePreview, m_FolderCtrl);
diff --git a/src/gui/wxMApp.cpp b/src/gui/wxMApp.cpp
index c6c51371..097a7117 100644
--- a/src/gui/wxMApp.cpp
+++ b/src/gui/wxMApp.cpp
@@ -74,6 +74,7 @@
#include "PathFinder.h"
#include "gui/wxMDialogs.h"
+#include "gui/wxMLog.h"
#include "gui/wxMainFrame.h"
#include "FolderMonitor.h"
#include "MModule.h"
@@ -983,6 +984,10 @@ wxMApp::OnInit()
// format for it to have consistent output everywhere
wxLog::SetTimestamp("%Y-%m-%d %H:%M:%S");
+ // Replace the default logger with our own one which will try to show the
+ // messages better and less intrusively (see wxMLog class implementation).
+ wxMLog::Activate();
+
#ifdef USE_I18N
// Set up locale first, so everything is in the right language.
wxString locale = m_cmdLineOptions->lang;
diff --git a/src/gui/wxMLog.cpp b/src/gui/wxMLog.cpp
new file mode 100644
index 00000000..19774ff9
--- /dev/null
+++ b/src/gui/wxMLog.cpp
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////
+// Project: M - cross platform e-mail GUI client
+// File name: gui/wxMLog.cpp
+// Purpose: wxMLog implementation
+// Author: Vadim Zeitlin
+// Created: 2017-09-30
+// Copyright: (c) 2017 Mahogany team
+// Licence: M license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "Mpch.h"
+
+#ifndef USE_PCH
+# include "Mcommon.h"
+#endif // !USE_PCH
+
+#include "gui/wxMLog.h"
+
+#include <wx/infobar.h>
+
+// ============================================================================
+// wxMLog implementation
+// ============================================================================
+
+wxMLog* wxMLog::ms_MLog = NULL;
+
+void
+wxMLog::Activate()
+{
+ ASSERT( !ms_MLog );
+ ms_MLog = new wxMLog;
+
+ delete wxLog::SetActiveTarget(ms_MLog);
+}
+
+wxMLog::wxMLog()
+{
+ m_activeInfoBar = NULL;
+}
+
+void
+wxMLog::DoLogRecord(wxLogLevel level,
+ const wxString& msg,
+ const wxLogRecordInfo& info)
+{
+ if ( !m_activeInfoBar )
+ {
+ wxLogGui::DoLogRecord(level, msg, info);
+ return;
+ }
+
+ int flags = 0;
+ switch ( level )
+ {
+ case wxLOG_FatalError:
+ case wxLOG_Error:
+ flags |= wxICON_ERROR;
+ break;
+
+ case wxLOG_Warning:
+ flags |= wxICON_WARNING;
+ break;
+
+ case wxLOG_Message:
+ case wxLOG_Info:
+ flags |= wxICON_INFORMATION;
+ break;
+
+ case wxLOG_Status:
+ case wxLOG_Debug:
+ case wxLOG_Trace:
+ case wxLOG_Progress:
+ case wxLOG_User:
+ case wxLOG_Max:
+ default:
+ // These messages are not shown in the infobar at all.
+ return;
+ }
+
+ m_activeInfoBar->ShowMessage(msg, flags);
+}
diff --git a/src/gui/wxMessageView.cpp b/src/gui/wxMessageView.cpp
index 6e1b40f2..d633f167 100644
--- a/src/gui/wxMessageView.cpp
+++ b/src/gui/wxMessageView.cpp
@@ -30,6 +30,8 @@
# include <wx/menu.h>
#endif //USE_PCH
+#include <wx/infobar.h>
+
#include "MessageViewer.h"
#include "MsgCmdProc.h"
#include "FolderView.h"
@@ -44,6 +46,7 @@
#include "mail/MimeDecode.h"
#include "gui/wxMessageView.h"
+#include "gui/wxMLog.h"
// ----------------------------------------------------------------------------
// options we use here
@@ -192,7 +195,17 @@ wxMessageView::wxMessageView(wxWindow *parent,
// OnViewerChange() for the initial dummy viewer
m_FolderView = NULL;
- Init(parent, profile);
+ m_viewerParent = new wxWindow(parent, wxID_ANY);
+ m_infobar = new wxInfoBar(m_viewerParent);
+
+ // Don't delay showing the error messages with unnecessary effects.
+ m_infobar->SetShowHideEffects(wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE);
+
+ wxBoxSizer* const sizer = new wxBoxSizer(wxVERTICAL);
+ sizer->Add(m_infobar, wxSizerFlags().Expand());
+ m_viewerParent->SetSizer(sizer);
+
+ Init(m_viewerParent, profile);
// now really set it
m_FolderView = folderView;
@@ -222,6 +235,11 @@ MessageView::CreateStandalone(wxWindow *parent, Profile *profile)
void
wxMessageView::DoShowMessage(Message *mailMessage)
{
+ // First, dismiss any previously shown warnings.
+ m_infobar->Dismiss();
+
+ wxMLogTargetSetter logTarget(m_infobar);
+
MessageView::DoShowMessage(mailMessage);
wxFrame *frame = GetParentFrame();
@@ -243,6 +261,8 @@ wxMessageView::OnViewerChange(const MessageViewer *viewerOld,
const MessageViewer *viewerNew,
const String& nameViewer)
{
+ m_infobar->Dismiss();
+
if ( m_FolderView )
{
m_FolderView->OnMsgViewerChange(viewerNew ? viewerNew->GetWindow()
@@ -251,6 +271,8 @@ wxMessageView::OnViewerChange(const MessageViewer *viewerOld,
if ( viewerOld )
{
+ // Deleting the window will also remove it from the viewer parent sizer,
+ // no need to do anything else.
delete viewerOld->GetWindow();
}
@@ -268,15 +290,21 @@ wxMessageView::OnViewerChange(const MessageViewer *viewerOld,
CHECK_RET( mbar, _T("no menu bar in the frame containing wxMessageView?") );
mbar->Check(WXMENU_VIEW_VIEWERS_BEGIN + 1 + n, true);
+ }
- // finally we must ensure that the new viewer is positioned/sized
- // correctly: folder view does it itself in OnMsgViewerChange() but for
- // standalone message view frame we have to do it ourselves
- if ( !m_FolderView )
- {
- frame->SendSizeEvent();
- }
+ // finally we must ensure that the new viewer is positioned/sized correctly:
+ if ( viewerNew )
+ {
+ m_viewerParent->GetSizer()->Add(viewerNew->GetWindow(),
+ wxSizerFlags(1).Expand());
}
+
+ m_viewerParent->Layout();
+
+ // We may not return to the event loop immediately, as we could be opening a
+ // new folder, which takes time, so update the viewer window here explicitly
+ // to avoid not laid out yet window showing on the screen, which is ugly.
+ m_viewerParent->Update();
}
MessageViewer *
commit 27485d606c4c240e181e69021db9a36bddd3c2ad
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Sep 30 23:29:40 2017 +0200
Remove the never used logging macros
These macros were defined together with ERRORMESSAGE and others, but were
never actually used, so just drop them entirely.
diff --git a/include/Mcommon.h b/include/Mcommon.h
index 7a347732..7c1809b2 100644
--- a/include/Mcommon.h
+++ b/include/Mcommon.h
@@ -83,19 +83,12 @@ extern void CloseSplash();
# define M_LOG_URGENT wxLOG_Error
# define ERRORMESSAGE(arg) CloseSplash(); wxLogError arg
-# define SYSERRMESSAGE(arg) CloseSplash(); wxLogSysError arg
-# define FATALERROR(arg) CloseSplash(); wxLogFatalError arg
-# define INFOMESSAGE(arg) CloseSplash(); wxLogInfo arg
# define LOGMESSAGE(arg) wxLogGeneric arg
# define STATUSMESSAGE(arg) wxLogStatus arg
# ifdef DEBUG
# define DBGMESSAGE(arg) wxLogDebug arg
-# define TRACEMESSAGE(arg) wxLogTrace arg
-# define INTERNALERROR(arg) wxLogFatalError arg // aborts
# else
# define DBGMESSAGE(arg)
-# define TRACEMESSAGE(arg)
-# define INTERNALERROR(arg) wxLogError arg // just log the error
# endif
#if defined(OS_UNIX) || defined(__CYGWIN__)
commit dea15864927f6b5aecb028f747a0e17514eb3034
Author: Vadim Zeitlin <vz-...@ze...>
Date: Sat Sep 30 23:25:13 2017 +0200
Really use ISO date time format in message log
The comment said that we already did, but we actually used locale date and
time representation.
diff --git a/src/gui/wxMApp.cpp b/src/gui/wxMApp.cpp
index d0b8d75f..c6c51371 100644
--- a/src/gui/wxMApp.cpp
+++ b/src/gui/wxMApp.cpp
@@ -981,7 +981,7 @@ wxMApp::OnInit()
// by default only time stamp is used by wxLog, we want to have the time
// with date as the program may run for several days and we also use ISO
// format for it to have consistent output everywhere
- wxLog::SetTimestamp("%c");
+ wxLog::SetTimestamp("%Y-%m-%d %H:%M:%S");
#ifdef USE_I18N
// Set up locale first, so everything is in the right language.
-----------------------------------------------------------------------
Summary of changes:
M.vcxproj | 38 ++++++------
M.vcxproj.filters | 6 ++
Mconfig.vcxproj | 14 ++---
include/Mcommon.h | 7 ---
include/MessageView.h | 4 ++
include/gui/wxMLog.h | 85 +++++++++++++++++++++++++++
include/gui/wxMessageView.h | 11 ++++
lib/compface/compface.vcxproj | 14 ++---
lib/dspam/dspam.vcxproj | 14 ++---
lib/imap/imap.vcxproj | 14 ++---
src/classes/ComposeTemplate.cpp | 16 ++++-
src/gui/wxFolderView.cpp | 20 ++++++-
src/gui/wxMApp.cpp | 7 ++-
src/gui/wxMLog.cpp | 127 ++++++++++++++++++++++++++++++++++++++++
src/gui/wxMessageView.cpp | 44 +++++++++++---
src/mail/MailFolderCC.cpp | 32 ++++++++--
src/wx/vcard/versit.vcxproj | 14 ++---
17 files changed, 390 insertions(+), 77 deletions(-)
create mode 100644 include/gui/wxMLog.h
create mode 100644 src/gui/wxMLog.cpp
hooks/post-receive
--
Mahogany sources repository.
|
|
From: Nerijus Baliūn. <mah...@us...> - 2017-11-06 15:15:06
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 20d10932c1b273b65e0cfcabb2553fbda64578d5 (commit)
via 4a469d60602426aa22526ad8670cfcdaae35b0d2 (commit)
via 379f3ee47d04abd8156c49308ffedfb908def4a6 (commit)
via 905711a3587627310c9cbc6009844071dbdb0c06 (commit)
via 6686f62fbb22b1be5697e43b61c0006193208dfa (commit)
via 9d47e4a23cf28b07b64f78605344026145bf1579 (commit)
via b28d2ea470558387798b870a1b221b2dc79395e3 (commit)
via 2a94d457c3276d04a1c77b70b31a9a4a36ef7735 (commit)
via af354a9dcb349611d2155996119866d9f6c789b4 (commit)
via b0f19a82daf469cf61e094f56952870f019ac7d5 (commit)
from b46127b91ce9ea5662dea5572d38e79125c2974b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 20d10932c1b273b65e0cfcabb2553fbda64578d5
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Oct 16 19:45:57 2017 +0200
Avoid assert failures due to invalid encoded words in headers
Trying to print a non-ASCII character using "%c" format specifier
resulted in asserts when using UTF-8 locale (i.e. always under Unix)
because a single high byte couldn't be decoded as an UTF-8-encoded
character.
Fix this by just showing the hex code of this byte instead, this is more
useful anyhow.
diff --git a/src/mail/MimeDecode.cpp b/src/mail/MimeDecode.cpp
index a8e26ce..bce5ec4 100644
--- a/src/mail/MimeDecode.cpp
+++ b/src/mail/MimeDecode.cpp
@@ -342,7 +342,7 @@ String DecodeHeaderOnce(const String& in, wxFontEncoding *pEncoding)
const unsigned char c = ctext[n];
if ( c >= 0x80 )
{
- wxLogDebug(wxS("Invalid character \"%c\" "
+ wxLogDebug(wxS("Invalid character 0x%x "
"in ASCII-encoded word \"%s\""),
c, in);
}
commit 4a469d60602426aa22526ad8670cfcdaae35b0d2
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Oct 16 19:41:38 2017 +0200
Don't assert if getting message while filtering fails
This can happen due to e.g. a network issue, and should be dealt with as
any run-time error and not a program logic error.
diff --git a/src/mail/HeaderInfoImpl.cpp b/src/mail/HeaderInfoImpl.cpp
index 184ee97..feccab0 100644
--- a/src/mail/HeaderInfoImpl.cpp
+++ b/src/mail/HeaderInfoImpl.cpp
@@ -608,9 +608,6 @@ HeaderInfo *HeaderInfoListImpl::GetItemByIndex(MsgnoType n) const
m_mf->GetHeaderInfo(self->m_headers, seq);
}
- // the caller will crash...
- ASSERT_MSG( m_headers[n], _T("returning NULL HeaderInfo?") );
-
return m_headers[n];
}
diff --git a/src/mail/MailFolderCC.cpp b/src/mail/MailFolderCC.cpp
index 9fbf817..6a17a08 100644
--- a/src/mail/MailFolderCC.cpp
+++ b/src/mail/MailFolderCC.cpp
@@ -3342,23 +3342,27 @@ MailFolderCC::GetMsgnoFromUID(UIdType uid) const
Message *
MailFolderCC::GetMessage(unsigned long uid) const
{
- if ( !CheckConnection() )
+ Message* msg = NULL;
+ if ( CheckConnection() )
{
- wxLogError(_("Failed to retrieve message from folder '%s'."),
- GetName());
- return NULL;
- }
+ HeaderInfoList_obj headers(GetHeaders());
+ CHECK( headers, NULL, _T("GetMessage: failed to get headers") );
- HeaderInfoList_obj headers(GetHeaders());
- CHECK( headers, NULL, _T("GetMessage: failed to get headers") );
+ UIdType idx = headers->GetIdxFromUId(uid);
+ CHECK( idx != UID_ILLEGAL, NULL, _T("GetMessage: no UID with this message") );
- UIdType idx = headers->GetIdxFromUId(uid);
- CHECK( idx != UID_ILLEGAL, NULL, _T("GetMessage: no UID with this message") );
+ HeaderInfo *hi = headers->GetItemByIndex((size_t)idx);
+ if ( hi )
+ msg = MessageCC::Create((MailFolderCC *)this, *hi); // const_cast
+ }
- HeaderInfo *hi = headers->GetItemByIndex((size_t)idx);
- CHECK( hi, NULL, _T("invalid UID in GetMessage") );
+ if ( !msg )
+ {
+ wxLogError(_("Failed to retrieve message from folder '%s'."),
+ GetName());
+ }
- return MessageCC::Create((MailFolderCC *)this, *hi); // const_cast
+ return msg;
}
// ----------------------------------------------------------------------------
commit 379f3ee47d04abd8156c49308ffedfb908def4a6
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Jul 24 17:05:59 2017 +0200
Avoid deprecation warning with wxWidgets 3.x
Don't use wxSOLID as pen style, it is called wxPENSTYLE_SOLID now. In
fact, don't use the style constant at all as it is the default.
diff --git a/src/gui/wxllist.cpp b/src/gui/wxllist.cpp
index 16b0b97..8e72438 100644
--- a/src/gui/wxllist.cpp
+++ b/src/gui/wxllist.cpp
@@ -2791,7 +2791,7 @@ wxLayoutList::DrawCursor(wxDC& UNUSED_IF_USE_CARET(dc),
wxASSERT(m_CursorSize.x >= WXLO_MINIMUM_CURSOR_WIDTH);
dc.SetBrush(*wxWHITE_BRUSH);
//FIXME: wxGTK XOR is borken at the moment!!!dc.SetLogicalFunction(wxXOR);
- dc.SetPen(wxPen(*wxBLACK,1,wxSOLID));
+ dc.SetPen(*wxBLACK);
if(active)
{
dc.SetLogicalFunction(wxXOR);
commit 905711a3587627310c9cbc6009844071dbdb0c06
Merge: b46127b 6686f62
Author: Vadim Zeitlin <va...@ze...>
Date: Mon Jul 24 16:59:20 2017 +0200
Merge branch 'configure-cleanup'
commit 6686f62fbb22b1be5697e43b61c0006193208dfa
Author: Vadim Zeitlin <va...@ze...>
Date: Sat Oct 8 18:00:36 2016 +0200
Detect Python 2.7 in configure
This is by far the most common Python2 version since a long time.
diff --git a/configure.ac b/configure.ac
index 34e703e..a85ec8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -759,7 +759,7 @@ dnl Check for Python headers first: we need this for both dynamic and static
dnl linking
case "$USE_PYTHON" in
static|Static|STATIC|dynamic|Dynamic|DYNAMIC|1)
- for ver in 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.5; do
+ for ver in 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.5; do
M_CHECK_MYHEADER_VER(
Python.h,
$ver,
commit 9d47e4a23cf28b07b64f78605344026145bf1579
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 26 01:15:46 2016 +0200
Build Mahogany in C++11 mode under Unix
Check that the compiler supports C++11 and use it when building as we now use
some C++11 constructs in the code (e.g. lambdas for the event handlers).
diff --git a/acinclude.m4 b/acinclude.m4
index 0dd72de..16fa12b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -186,3 +186,16 @@ AC_DEFUN([M_GCC_OPTION], [
ifelse([$3], , :, [$3])
fi
])
+
+dnl M_CXX_OPTION(OPTION, ACTION-IF-SUPPORTED, ACTION-IF-NOT-SUPPORTED)
+dnl
+dnl Check if C++ compiler supports the given option.
+AC_DEFUN([M_CXX_OPTION], [
+ AC_REQUIRE([AC_PROG_CXX])
+ echo 'void f(){}' >conftest.cc
+ case "`$CXX $1 -c conftest.cc 2>&1`" in
+ '') ifelse([$2], , :, [$2]) ;;
+ *) ifelse([$3], , :, [$3]) ;;
+ esac
+ rm -f conftest.*
+])
diff --git a/configure.ac b/configure.ac
index 1060814..34e703e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,6 +248,20 @@ dnl defines GXX with yes if using gxx, else empty
dnl defines CXXFLAGS
AC_PROG_CXX
+dnl We need C++11 support, so check for it.
+AC_CACHE_CHECK([whether $CC accepts -std=c++11],
+ m_cv_cc_std_cxx11,
+ [M_CXX_OPTION([-std=c++11],
+ m_cv_cc_std_cxx11="yes",
+ m_cv_cc_std_cxx11="no")]
+)
+if test $m_cv_cc_std_cxx11 != "yes"; then
+ AC_MSG_ERROR([
+ Sorry, $CC doesn't support -std=c++11 option and can't be used to compile
+ this program.])
+fi
+CXXFLAGS="$CXXFLAGS -std=c++11"
+
dnl disable support for exceptions if the compiler is g++ and
dnl new enough to support it.
case "$GXX" in yes)
commit b28d2ea470558387798b870a1b221b2dc79395e3
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 26 01:13:46 2016 +0200
Add bootstrap script to initialize the Unix build system
Run aclocal and autoconf in one command.
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..f723eea
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,52 @@
+
+#!/bin/sh
+
+# Script to execute to initialize Mahogany build system after checking out
+# pristine sources from a version control system: this script creates all
+# generated files which are needed for the build but not stored under version
+# control.
+
+# Copyright (C) 2005, 2006, 2007, 2008, 2016 Vadim Zeitlin
+# All Rights Reserved
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Author nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+if [ ! -f configure.ac -o ! -f include/Mcommon.h ]; then
+ echo "Please run this script from the top level Mahogany source directory."
+ exit 2
+fi
+
+echo "Setting up build system for Mahogany:"
+echo " - aclocal " && aclocal ${wx:+-I $wx} && \
+echo " - autoconf " && autoconf && \
+echo "Build setup successful, type \"configure\" to configure Mahogany now." && \
+exit 0
+
+echo "Automatic build files setup failed!"
+
+exit 1
commit 2a94d457c3276d04a1c77b70b31a9a4a36ef7735
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 26 00:49:17 2016 +0200
Get rid of unnecessary AC_REVISION() in configure
This doesn't make sense with Git.
diff --git a/configure.ac b/configure.ac
index d1c2a5c..1060814 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Mahogany, 0.67)
-AC_REVISION([$Id$])
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
commit af354a9dcb349611d2155996119866d9f6c789b4
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 26 00:46:28 2016 +0200
Rename autoconf input file to configure.ac
This is the "new" (since 15 years) extension that should be used for autoconf
input.
Also use correct parameters for AC_INIT().
diff --git a/configure.in b/configure.ac
similarity index 99%
rename from configure.in
rename to configure.ac
index d105aef..d1c2a5c 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(configure.in)
+AC_INIT(Mahogany, 0.67)
AC_REVISION([$Id$])
rm -f conftestdata
commit b0f19a82daf469cf61e094f56952870f019ac7d5
Author: Vadim Zeitlin <va...@ze...>
Date: Tue Jul 26 00:43:58 2016 +0200
Remove generated configure file from version control system
There is no need to store generated files in the repository and this one can
be regenerated just by running "autoconf".
diff --git a/.gitignore b/.gitignore
index 033fb16..f7d719e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
aclocal.m4
+configure
include/MInterface.cpp
include/MInterface.h
include/config.h
diff --git a/configure b/configure
deleted file mode 100755
index d2176aa..0000000
--- a/configure
+++ /dev/null
@@ -1,6008 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-debug generate code with debugging information"
-ac_help="$ac_help
- --disable-optimize disable optimization (automatic if debugging)"
-ac_help="$ac_help
- --with-wxdebug use debug wxWidgets libraries"
-ac_help="$ac_help
- --with-dmalloc use dmalloc (http://dmalloc.com/) for debugging"
-ac_help="$ac_help
- --with-leaktracer use LeakTracer for debugging"
-ac_help="$ac_help
- --with-efence use ElectricFence for debugging"
-ac_help="$ac_help
- --enable-profile generate code for profiling"
-ac_help="$ac_help
- --enable-strict strict compiler flags - may not work on all systems"
-ac_help="$ac_help
- --disable-nls no internationalization support"
-ac_help="$ac_help
- --with-python=xxx one of none/static/dynamic"
-ac_help="$ac_help
- --with-dspam use DSPAM for spam filtering"
-ac_help="$ac_help
- --without-swig don't use swig even if it is available"
-ac_help="$ac_help
- --disable-dialup disable dial-up support for modem users"
-ac_help="$ac_help
- --with-experimental compile experimental code"
-ac_help="$ac_help
- --with-threads multi-threaded version (DOES NOT WORK)"
-ac_help="$ac_help
- --with-palm include support for Palm Pilot"
-ac_help="$ac_help
- --with-ccostype=xxx use OS type xxx for c-client compilation"
-ac_help="$ac_help
- --with-modules=xxx one of none/static/dynamic"
-ac_help="$ac_help
- --with-ssl=ssldir specify path where OpenSSL is installed"
-ac_help="$ac_help
- --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH"
-ac_help="$ac_help
- --with-wx-config=CONFIG wx-config script to use (optional)"
-ac_help="$ac_help
- --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)"
-ac_help="$ac_help
- --with-wx-exec-prefix=PREFIX
- Exec prefix where wxWidgets is installed (optional)"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=configure.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says gh...@ca....
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-# From configure.in Id
-
-rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then rm -f conftestdata
-else { echo "configure: error: Sorry, this build system will not work on a
- system without symbolic links. It depends on the ability
- to create links to directories, so this is not something
- that can be worked around." 1>&2; exit 1; }
-fi
-
-if test "x$OSTYPE" = "x"; then
- OSTYPE=`uname`
-fi
-
-case "$OSTYPE" in
- darwin* | Darwin*)
- USE_MAC=1
- MAKE_USE_MAC="USE_MAC=yes"
- USE_MINGW=0
- MAKE_USE_MINGW=""
- USE_RESOURCES=0
- MAKE_USE_RESOURCES=""
- ;;
- cygwin* | CYGWIN*)
- USE_MAC=0
- MAKE_USE_MAC=""
- USE_MINGW=0
- MAKE_USE_MINGW=""
- USE_RESOURCES=1
- MAKE_USE_RESOURCES="USE_RESOURCES=yes"
- ;;
- mingw* | MINGW*)
- USE_MAC=0
- MAKE_USE_MAC=""
- USE_MINGW=1
- MAKE_USE_MINGW="USE_MINGW=yes"
- USE_RESOURCES=1
- MAKE_USE_RESOURCES="USE_RESOURCES=yes"
- ;;
- *)
- USE_MAC=0
- MAKE_USE_MAC=""
- USE_MINGW=0
- MAKE_USE_MINGW=""
- USE_RESOURCES=0
- MAKE_USE_RESOURCES=""
- ;;
-esac
-
-
-
-
-echo ""
-echo "*** Configuring Mahogany for $OSTYPE ***"
-echo ""
-
-
-ac_aux_dir=
-for ac_dir in extra/scripts $srcdir/extra/scripts; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in extra/scripts $srcdir/extra/scripts" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-### HACK: unfortunately, the Makefiles in subdirectories can use this
-### install program without qualification. We really shouldn't do it
-### this way, but we force the install-sh found here to be a full path.
-case "$ac_install_sh" in
-/*) ;;
-../*) ac_install_sh=`cd .; exec pwd``expr "$ac_install_sh" : '\.\.\(.*\)'` ;;
-*) ac_install_sh=`cd $srcdir; exec pwd`/$ac_install_sh ;;
-esac
-
-
-echo $ac_n "checking for debugging""... $ac_c" 1>&6
-echo "configure:660: checking for debugging" >&5
-# Check whether --enable-debug or --disable-debug was given.
-if test "${enable_debug+set}" = set; then
- enableval="$enable_debug"
- case "$enableval" in
- yes) m_cv_USE_DEBUG=1 ;;
- no) m_cv_USE_DEBUG=0 ;;
- *) m_cv_USE_DEBUG="$enableval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_DEBUG'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_DEBUG='0'
-fi
-fi
-USE_DEBUG="$m_cv_USE_DEBUG"
-case "$m_cv_USE_DEBUG" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_DEBUG" 1>&6 ;;
-esac
-
-case "$USE_DEBUG" in
- 0|'')
- echo $ac_n "checking for optimization""... $ac_c" 1>&6
-echo "configure:686: checking for optimization" >&5
-# Check whether --enable-optimize or --disable-optimize was given.
-if test "${enable_optimize+set}" = set; then
- enableval="$enable_optimize"
- case "$enableval" in
- yes) m_cv_USE_OPT=1 ;;
- no) m_cv_USE_OPT=0 ;;
- *) m_cv_USE_OPT="$enableval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_OPT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_OPT='1'
-fi
-fi
-USE_OPT="$m_cv_USE_OPT"
-case "$m_cv_USE_OPT" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_OPT" 1>&6 ;;
-esac
- debug_option="no"
- ;;
-
- *)
- echo $ac_n "checking for wxWin debug libs""... $ac_c" 1>&6
-echo "configure:713: checking for wxWin debug libs" >&5
-# Check whether --with-wxdebug or --without-wxdebug was given.
-if test "${with_wxdebug+set}" = set; then
- withval="$with_wxdebug"
- case "$withval" in
- yes) m_cv_USE_WXDEBUG=1 ;;
- no) m_cv_USE_WXDEBUG=0 ;;
- *) m_cv_USE_WXDEBUG="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_WXDEBUG'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_WXDEBUG='0'
-fi
-fi
-USE_WXDEBUG="$m_cv_USE_WXDEBUG"
-case "$m_cv_USE_WXDEBUG" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_WXDEBUG" 1>&6 ;;
-esac
-
- echo $ac_n "checking for dmalloc library""... $ac_c" 1>&6
-echo "configure:737: checking for dmalloc library" >&5
-# Check whether --with-dmalloc or --without-dmalloc was given.
-if test "${with_dmalloc+set}" = set; then
- withval="$with_dmalloc"
- case "$withval" in
- yes) m_cv_USE_DMALLOC=1 ;;
- no) m_cv_USE_DMALLOC=0 ;;
- *) m_cv_USE_DMALLOC="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_DMALLOC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_DMALLOC='0'
-fi
-fi
-USE_DMALLOC="$m_cv_USE_DMALLOC"
-case "$m_cv_USE_DMALLOC" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_DMALLOC" 1>&6 ;;
-esac
-
- echo $ac_n "checking for LeakTracer""... $ac_c" 1>&6
-echo "configure:761: checking for LeakTracer" >&5
-# Check whether --with-leaktracer or --without-leaktracer was given.
-if test "${with_leaktracer+set}" = set; then
- withval="$with_leaktracer"
- case "$withval" in
- yes) m_cv_USE_LEAKTRACER=1 ;;
- no) m_cv_USE_LEAKTRACER=0 ;;
- *) m_cv_USE_LEAKTRACER="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_LEAKTRACER'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_LEAKTRACER='0'
-fi
-fi
-USE_LEAKTRACER="$m_cv_USE_LEAKTRACER"
-case "$m_cv_USE_LEAKTRACER" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_LEAKTRACER" 1>&6 ;;
-esac
-
- echo $ac_n "checking for ElectricFence""... $ac_c" 1>&6
-echo "configure:785: checking for ElectricFence" >&5
-# Check whether --with-efence or --without-efence was given.
-if test "${with_efence+set}" = set; then
- withval="$with_efence"
- case "$withval" in
- yes) m_cv_USE_EFENCE=1 ;;
- no) m_cv_USE_EFENCE=0 ;;
- *) m_cv_USE_EFENCE="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_EFENCE'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_EFENCE='0'
-fi
-fi
-USE_EFENCE="$m_cv_USE_EFENCE"
-case "$m_cv_USE_EFENCE" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_EFENCE" 1>&6 ;;
-esac
-
- debug_option="yes"
-esac
-
-echo $ac_n "checking for profiling""... $ac_c" 1>&6
-echo "configure:812: checking for profiling" >&5
-# Check whether --enable-profile or --disable-profile was given.
-if test "${enable_profile+set}" = set; then
- enableval="$enable_profile"
- case "$enableval" in
- yes) m_cv_USE_PROFILER=1 ;;
- no) m_cv_USE_PROFILER=0 ;;
- *) m_cv_USE_PROFILER="$enableval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_PROFILER'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_PROFILER='0'
-fi
-fi
-USE_PROFILER="$m_cv_USE_PROFILER"
-case "$m_cv_USE_PROFILER" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_PROFILER" 1>&6 ;;
-esac
-
-echo $ac_n "checking for strict compiler options""... $ac_c" 1>&6
-echo "configure:836: checking for strict compiler options" >&5
-# Check whether --enable-strict or --disable-strict was given.
-if test "${enable_strict+set}" = set; then
- enableval="$enable_strict"
- case "$enableval" in
- yes) m_cv_USE_STRICT=1 ;;
- no) m_cv_USE_STRICT=0 ;;
- *) m_cv_USE_STRICT="$enableval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_STRICT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_STRICT='0'
-fi
-fi
-USE_STRICT="$m_cv_USE_STRICT"
-case "$m_cv_USE_STRICT" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_STRICT" 1>&6 ;;
-esac
-
-echo $ac_n "checking for i18n support""... $ac_c" 1>&6
-echo "configure:860: checking for i18n support" >&5
-# Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- case "$enableval" in
- yes) m_cv_USE_I18N=1 ;;
- no) m_cv_USE_I18N=0 ;;
- *) m_cv_USE_I18N="$enableval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_I18N'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_I18N='1'
-fi
-fi
-USE_I18N="$m_cv_USE_I18N"
-case "$m_cv_USE_I18N" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_I18N" 1>&6 ;;
-esac
-
-echo $ac_n "checking for Python scripting""... $ac_c" 1>&6
-echo "configure:884: checking for Python scripting" >&5
-# Check whether --with-python or --without-python was given.
-if test "${with_python+set}" = set; then
- withval="$with_python"
- case "$withval" in
- yes) m_cv_USE_PYTHON=1 ;;
- no) m_cv_USE_PYTHON=0 ;;
- *) m_cv_USE_PYTHON="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_PYTHON'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_PYTHON='1'
-fi
-fi
-USE_PYTHON="$m_cv_USE_PYTHON"
-case "$m_cv_USE_PYTHON" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_PYTHON" 1>&6 ;;
-esac
-
-echo $ac_n "checking for DSPAM spam filter""... $ac_c" 1>&6
-echo "configure:908: checking for DSPAM spam filter" >&5
-# Check whether --with-dspam or --without-dspam was given.
-if test "${with_dspam+set}" = set; then
- withval="$with_dspam"
- case "$withval" in
- yes) m_cv_USE_DSPAM=1 ;;
- no) m_cv_USE_DSPAM=0 ;;
- *) m_cv_USE_DSPAM="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_DSPAM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_DSPAM='1'
-fi
-fi
-USE_DSPAM="$m_cv_USE_DSPAM"
-case "$m_cv_USE_DSPAM" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_DSPAM" 1>&6 ;;
-esac
-
-if test "$USE_PYTHON" = 1; then
- if test "$USE_MAC" = 1; then
- USE_PYTHON="static"
- else
- USE_PYTHON="dynamic"
- fi
-fi
-
-case "$USE_PYTHON" in
- static|Static|STATIC|dynamic|Dynamic|DYNAMIC|1)
- echo $ac_n "checking for whether we should use SWIG""... $ac_c" 1>&6
-echo "configure:942: checking for whether we should use SWIG" >&5
-# Check whether --with-swig or --without-swig was given.
-if test "${with_swig+set}" = set; then
- withval="$with_swig"
- case "$withval" in
- yes) m_cv_USE_SWIG=1 ;;
- no) m_cv_USE_SWIG=0 ;;
- *) m_cv_USE_SWIG="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_SWIG'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_SWIG='1'
-fi
-fi
-USE_SWIG="$m_cv_USE_SWIG"
-case "$m_cv_USE_SWIG" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_SWIG" 1>&6 ;;
-esac
- ;;
-esac
-
-if test "$USE_MAC" = 0; then
- echo $ac_n "checking for special dial-up support""... $ac_c" 1>&6
-echo "configure:969: checking for special dial-up support" >&5
-# Check whether --enable-dialup or --disable-dialup was given.
-if test "${enable_dialup+set}" = set; then
- enableval="$enable_dialup"
- case "$enableval" in
- yes) m_cv_USE_DIALUP=1 ;;
- no) m_cv_USE_DIALUP=0 ;;
- *) m_cv_USE_DIALUP="$enableval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_DIALUP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_DIALUP='1'
-fi
-fi
-USE_DIALUP="$m_cv_USE_DIALUP"
-case "$m_cv_USE_DIALUP" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_DIALUP" 1>&6 ;;
-esac
-fi
-
-echo $ac_n "checking for experimental code""... $ac_c" 1>&6
-echo "configure:994: checking for experimental code" >&5
-# Check whether --with-experimental or --without-experimental was given.
-if test "${with_experimental+set}" = set; then
- withval="$with_experimental"
- case "$withval" in
- yes) m_cv_USE_EXPERIMENTAL=1 ;;
- no) m_cv_USE_EXPERIMENTAL=0 ;;
- *) m_cv_USE_EXPERIMENTAL="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_EXPERIMENTAL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_EXPERIMENTAL='0'
-fi
-fi
-USE_EXPERIMENTAL="$m_cv_USE_EXPERIMENTAL"
-case "$m_cv_USE_EXPERIMENTAL" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_EXPERIMENTAL" 1>&6 ;;
-esac
-
-echo $ac_n "checking for multi-threading""... $ac_c" 1>&6
-echo "configure:1018: checking for multi-threading" >&5
-# Check whether --with-threads or --without-threads was given.
-if test "${with_threads+set}" = set; then
- withval="$with_threads"
- case "$withval" in
- yes) m_cv_USE_THREADS=1 ;;
- no) m_cv_USE_THREADS=0 ;;
- *) m_cv_USE_THREADS="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_THREADS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_THREADS='0'
-fi
-fi
-USE_THREADS="$m_cv_USE_THREADS"
-case "$m_cv_USE_THREADS" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_THREADS" 1>&6 ;;
-esac
-
-echo $ac_n "checking for Palm Pilot support""... $ac_c" 1>&6
-echo "configure:1042: checking for Palm Pilot support" >&5
-# Check whether --with-palm or --without-palm was given.
-if test "${with_palm+set}" = set; then
- withval="$with_palm"
- case "$withval" in
- yes) m_cv_USE_PISOCK=1 ;;
- no) m_cv_USE_PISOCK=0 ;;
- *) m_cv_USE_PISOCK="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_PISOCK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_PISOCK='0'
-fi
-fi
-USE_PISOCK="$m_cv_USE_PISOCK"
-case "$m_cv_USE_PISOCK" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_PISOCK" 1>&6 ;;
-esac
-
-echo $ac_n "checking for c-client OS type""... $ac_c" 1>&6
-echo "configure:1066: checking for c-client OS type" >&5
-# Check whether --with-ccostype or --without-ccostype was given.
-if test "${with_ccostype+set}" = set; then
- withval="$with_ccostype"
- case "$withval" in
- yes) m_cv_USE_CCOSTYPE=1 ;;
- no) m_cv_USE_CCOSTYPE=0 ;;
- *) m_cv_USE_CCOSTYPE="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_CCOSTYPE'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_CCOSTYPE=''
-fi
-fi
-USE_CCOSTYPE="$m_cv_USE_CCOSTYPE"
-case "$m_cv_USE_CCOSTYPE" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_CCOSTYPE" 1>&6 ;;
-esac
-
-echo $ac_n "checking for modules""... $ac_c" 1>&6
-echo "configure:1090: checking for modules" >&5
-# Check whether --with-modules or --without-modules was given.
-if test "${with_modules+set}" = set; then
- withval="$with_modules"
- case "$withval" in
- yes) m_cv_USE_MODULES=1 ;;
- no) m_cv_USE_MODULES=0 ;;
- *) m_cv_USE_MODULES="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_MODULES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_MODULES='auto'
-fi
-fi
-USE_MODULES="$m_cv_USE_MODULES"
-case "$m_cv_USE_MODULES" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_MODULES" 1>&6 ;;
-esac
-
-echo $ac_n "checking for SSL support""... $ac_c" 1>&6
-echo "configure:1114: checking for SSL support" >&5
-# Check whether --with-ssl or --without-ssl was given.
-if test "${with_ssl+set}" = set; then
- withval="$with_ssl"
- case "$withval" in
- yes) m_cv_USE_SSL=1 ;;
- no) m_cv_USE_SSL=0 ;;
- *) m_cv_USE_SSL="$withval" ;;
- esac
-else
- if eval "test \"`echo '$''{'m_cv_USE_SSL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_USE_SSL='1'
-fi
-fi
-USE_SSL="$m_cv_USE_SSL"
-case "$m_cv_USE_SSL" in
-''|0) echo "$ac_t""no" 1>&6 ;;
-1) echo "$ac_t""yes" 1>&6 ;;
-*) echo "$ac_t""$m_cv_USE_SSL" 1>&6 ;;
-esac
-
-echo $ac_n "checking for install location""... $ac_c" 1>&6
-echo "configure:1138: checking for install location" >&5
-case "$prefix" in
-NONE) if eval "test \"`echo '$''{'m_cv_prefix'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- m_cv_prefix=$ac_default_prefix
-fi
-;;
-*) m_cv_prefix=$prefix ;;
-esac
-echo "$ac_t""$m_cv_prefix" 1>&6
-case "$m_cv_prefix" in /*) ;; *)
- echo "configure: warning: --prefix=$prefix must be an absolute path name, using $ac_default_prefix" 1>&2
- m_cv_prefix=$ac_default_prefix
-esac
-prefix=$m_cv_prefix
-
-
- # Check whether --with-wxdir or --without-wxdir was given.
-if test "${with_wxdir+set}" = set; then
- withval="$with_wxdir"
- wx_config_name="$withval/wx-config"
- wx_config_args="--inplace"
-fi
-
- # Check whether --with-wx-config or --without-wx-config was given.
-if test "${with_wx_config+set}" = set; then
- withval="$with_wx_config"
- wx_config_name="$withval"
-fi
-
- # Check whether --with-wx-prefix or --without-wx-prefix was given.
-if test "${with_wx_prefix+set}" = set; then
- withval="$with_wx_prefix"
- wx_config_prefix="$withval"
-else
- wx_config_prefix=""
-fi
-
- # Check whether --with-wx-exec-prefix or --without-wx-exec-prefix was given.
-if test "${with_wx_exec_prefix+set}" = set; then
- withval="$with_wx_exec_prefix"
- wx_config_exec_prefix="$withval"
-else
- wx_config_exec_prefix=""
-fi
-
-
-
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1243: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-cat >> confdefs.h <<EOF
-#define M_CANONICAL_HOST "$host"
-EOF
-
-cat >> confdefs.h <<EOF
-#define M_OSINFO _T("`uname -s -r -m`")
-EOF
-
-cat >> confdefs.h <<EOF
-#define M_PREFIX "$prefix"
-EOF
-
-
-SOURCEDIR=`cd $srcdir; exec pwd`
-
-cat >> confdefs.h <<EOF
-#define M_TOP_SOURCEDIR _T("$SOURCEDIR")
-EOF
-
-BUILDDIR=`cd .; exec pwd`
-
-cat >> confdefs.h <<EOF
-#define M_TOP_BUILDDIR _T("$BUILDDIR")
-EOF
-
-
-
-CFLAGS=${CFLAGS=} # magic incantation so CFLAGS not set by AC_PROG_CC
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1294: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1324: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1375: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1407: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1418 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1449: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1454: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1482: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test ...
[truncated message content] |