From f25fcade08ce90fb8dbaeb948676aa33e4265fe0 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Fri, 27 Feb 2015 19:50:25 +0100 Subject: [PATCH 1/6] ignore *.a --- .gitignore | 3 ++- extrlib/readme (2).txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 extrlib/readme (2).txt diff --git a/.gitignore b/.gitignore index f6f1e54d..36e8ba58 100644 --- a/.gitignore +++ b/.gitignore @@ -21,10 +21,11 @@ Thumbs.db [Bb]in [Dd]ebug*/ *.lib +*.a *.sbr obj/ [Rr]elease*/ _ReSharper*/ [Tt]est[Rr]esult* *.suo -*.sdf \ No newline at end of file +*.sdf diff --git a/extrlib/readme (2).txt b/extrlib/readme (2).txt new file mode 100644 index 00000000..84359ae5 --- /dev/null +++ b/extrlib/readme (2).txt @@ -0,0 +1 @@ +The libpng.a is for MinGW(Not linux), and other .lib files are for VS2013 \ No newline at end of file From d57fb034e3b89a981b6602af42296dba0bc10a93 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Tue, 3 Mar 2015 22:43:44 +0100 Subject: [PATCH 2/6] Doxygen comments --- include/nana/basic_types.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/nana/basic_types.hpp b/include/nana/basic_types.hpp index 9a2d85f2..2e8c0929 100644 --- a/include/nana/basic_types.hpp +++ b/include/nana/basic_types.hpp @@ -18,7 +18,7 @@ namespace nana { - //A constant value for the invalid position. + /// A constant value for the invalid position. const std::size_t npos = static_cast(-1); @@ -127,8 +127,7 @@ namespace nana using pixel_color_t = pixel_argb_t; - //http://www.w3.org/TR/2011/REC-css3-color-20110607/ - //4.3. Extended color keywords + /// See extended CSS color keywords (4.3) in http://www.w3.org/TR/2011/REC-css3-color-20110607/ enum class colors { alice_blue = 0xf0f8ff, @@ -320,10 +319,10 @@ namespace nana color blend(const color& bgcolor, bool ignore_bgcolor_alpha) const; - ///< Blends two colors with the specified alpha, and the alpha values that come with these two colors are both ignored. + /// Blends two colors with the specified alpha, and the alpha values that come with these two colors are both ignored. color blend(const color& bgcolor, double alpha) const; - ///< Determines whether the color is completely transparent. + /// Determines whether the color is completely transparent. bool invisible() const; pixel_color_t px_color() const; pixel_argb_t argb() const; From 3b2e63da67b24de556a4488ffc8578ffe45de478 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 4 Mar 2015 03:30:54 +0100 Subject: [PATCH 3/6] ignore lib/ --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 36e8ba58..318a153e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ _ReSharper*/ [Tt]est[Rr]esult* *.suo *.sdf +lib/ From 5b989435f2bc6083ffd337809a3135c9e128efe5 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Thu, 5 Mar 2015 00:38:29 +0100 Subject: [PATCH 4/6] add x64 and OutputFile name: $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib --- build/vc2013/nana.sln | 6 +++ build/vc2013/nana.vcxproj | 81 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/build/vc2013/nana.sln b/build/vc2013/nana.sln index 6baefd4a..f92bfa92 100644 --- a/build/vc2013/nana.sln +++ b/build/vc2013/nana.sln @@ -8,13 +8,19 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|Win32.ActiveCfg = Debug|Win32 {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|Win32.Build.0 = Debug|Win32 + {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|x64.ActiveCfg = Debug|x64 + {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|x64.Build.0 = Debug|x64 {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|Win32.ActiveCfg = Release|Win32 {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|Win32.Build.0 = Release|Win32 + {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|x64.ActiveCfg = Release|x64 + {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/vc2013/nana.vcxproj b/build/vc2013/nana.vcxproj index d6b6e976..17ac7ac4 100644 --- a/build/vc2013/nana.vcxproj +++ b/build/vc2013/nana.vcxproj @@ -5,10 +5,18 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + {25B21068-491B-4A9F-B99F-6C27BF31BAAD} @@ -22,6 +30,12 @@ v120 Unicode + + StaticLibrary + true + v120 + Unicode + StaticLibrary false @@ -29,21 +43,48 @@ true Unicode + + StaticLibrary + false + v120 + true + Unicode + + + + + + + ../bin/vc2013/ + ..\..\include;$(IncludePath) + ..\..\source;$(VC_SourcePath); + + + ..\..\include;$(IncludePath) + ..\..\source;$(VC_SourcePath); + ../bin/vc2013/ ../bin/vc2013/ + ..\..\include;$(IncludePath) + ..\..\source;$(VC_SourcePath); + + + ..\..\include;$(IncludePath) + ..\..\source;$(VC_SourcePath); + ../bin/vc2013/ @@ -58,7 +99,23 @@ true - $(OutDir)\nana_debug.lib + $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + + + Windows + true + + + $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib @@ -78,7 +135,27 @@ true - $(OutDir)\nana_release.lib + $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib From 24675db26be5c6f6c73b62156dd91de5d776b01a Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Mon, 9 Mar 2015 12:01:35 +0100 Subject: [PATCH 5/6] static link runtime --- build/vc2013/nana.sln | 2 +- build/vc2013/nana.vcxproj | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/vc2013/nana.sln b/build/vc2013/nana.sln index f92bfa92..3d18acf9 100644 --- a/build/vc2013/nana.sln +++ b/build/vc2013/nana.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Express 2013 for Windows Desktop -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nana", "nana.vcxproj", "{25B21068-491B-4A9F-B99F-6C27BF31BAAD}" EndProject diff --git a/build/vc2013/nana.vcxproj b/build/vc2013/nana.vcxproj index 17ac7ac4..c8024ba7 100644 --- a/build/vc2013/nana.vcxproj +++ b/build/vc2013/nana.vcxproj @@ -93,6 +93,7 @@ Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreadedDebug Windows @@ -109,6 +110,7 @@ Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreadedDebug Windows @@ -127,6 +129,7 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded Windows @@ -147,6 +150,7 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + MultiThreaded Windows From b62cbc1cf3df4c8a5b3e5998e4f5fd5d2f0e7b21 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Wed, 11 Mar 2015 02:20:40 +0100 Subject: [PATCH 6/6] fix: UB due to pos=57, begin=58 (first char finded) infinite cycle => *chp : crash in text_editor --- source/gui/widgets/skeletons/text_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gui/widgets/skeletons/text_editor.cpp b/source/gui/widgets/skeletons/text_editor.cpp index f8ffa7f0..e5125c9c 100644 --- a/source/gui/widgets/skeletons/text_editor.cpp +++ b/source/gui/widgets/skeletons/text_editor.cpp @@ -2528,7 +2528,7 @@ namespace nana{ namespace widgets //The number of new lines minus one const auto chp_end = text.data() + (begin == text.npos ? text.size() : begin); - for (auto chp = text.data() + (pos + 2); chp != chp_end; ++chp) + for (auto chp = text.data() + (pos + 1); chp != chp_end; ++chp) // + 2 if (*chp == '\n') lines.emplace_back(0, 0);