diff --git a/include/nana/config.hpp b/include/nana/config.hpp index 418871f1..8969fc88 100644 --- a/include/nana/config.hpp +++ b/include/nana/config.hpp @@ -1,7 +1,7 @@ /* * Nana Configuration * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -20,10 +20,13 @@ #define PLATFORM_SPEC_HPP //Test if it is MINGW - #if defined(__MINGW32__) + #if defined(__MINGW32__) || defined(__MINGW64__) #define NANA_MINGW #define STD_CODECVT_NOT_SUPPORTED - //#define STD_THREAD_NOT_SUPPORTED //Use this flag if MinGW version is older than 4.8.1 + #if (__GNUC__ == 4) && ((__GNUC_MINOR__ < 8) || (__GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ < 1)) + //Use this flag if MinGW version is older than 4.8.1 + #define STD_THREAD_NOT_SUPPORTED + #endif #endif #elif (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) //Linux: @@ -33,6 +36,13 @@ #define STD_CODECVT_NOT_SUPPORTED #endif +#if defined(NANA_MINGW) || defined(NANA_LINUX) + #if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) && (__GNUC_PATCHLEVEL__ <= 1) + //Some functions which are specified in 21.5 Numeric conversions in Strings library have not yet implemented + #define STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED + #endif +#endif + //Here defines some flags that tell Nana what features will be supported. #define NANA_UNICODE diff --git a/include/nana/deploy.hpp b/include/nana/deploy.hpp index 0862a7a3..743ecf8f 100644 --- a/include/nana/deploy.hpp +++ b/include/nana/deploy.hpp @@ -21,8 +21,8 @@ #undef NANA_WINDOWS #endif -//Implement workarounds for MinGW -#if defined(NANA_MINGW) +//Implement workarounds for GCC/MinGW which version is below 4.8.2 +#if defined(STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED) namespace std { //Workaround for no implemenation of std::stoi in MinGW. diff --git a/include/nana/paint/detail/image_bmp.hpp b/include/nana/paint/detail/image_bmp.hpp index f5493881..5397faef 100644 --- a/include/nana/paint/detail/image_bmp.hpp +++ b/include/nana/paint/detail/image_bmp.hpp @@ -1,3 +1,15 @@ +/* + * Bitmap Format Graphics Implementation + * Nana C++ Library(http://www.nanapro.org) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * @file: nana/paint/detail/image_bmp.hpp + * @contributors: Ryan Gonzalez + */ #ifndef NANA_PAINT_DETAIL_IMAGE_BMP_HPP #define NANA_PAINT_DETAIL_IMAGE_BMP_HPP diff --git a/source/basic_types.cpp b/source/basic_types.cpp index 629ab81b..8edc8a0f 100644 --- a/source/basic_types.cpp +++ b/source/basic_types.cpp @@ -8,6 +8,7 @@ * http://www.boost.org/LICENSE_1_0.txt) * * @file: nana/basic_types.cpp + * @contributos: Jan */ #include diff --git a/source/deploy.cpp b/source/deploy.cpp index b2d053f4..c4d4d3f8 100644 --- a/source/deploy.cpp +++ b/source/deploy.cpp @@ -23,7 +23,8 @@ #include PLATFORM_SPEC_HPP #endif -#if defined(NANA_MINGW) +//Implement workarounds for GCC/MinGW which version is below 4.8.2 +#if defined(STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED) #include namespace std { diff --git a/source/gui/layout_utility.cpp b/source/gui/layout_utility.cpp index d59e89c3..8ab4c9b9 100644 --- a/source/gui/layout_utility.cpp +++ b/source/gui/layout_utility.cpp @@ -8,7 +8,7 @@ * http://www.boost.org/LICENSE_1_0.txt) * * @file: nana/gui/layout_utility.hpp - * + * @contributors: Ryan Gonzalez * */ #include diff --git a/source/gui/notifier.cpp b/source/gui/notifier.cpp index 9ccc3dd4..aec5686f 100644 --- a/source/gui/notifier.cpp +++ b/source/gui/notifier.cpp @@ -1,14 +1,15 @@ /* -* Implementation of Notifier -* Nana C++ Library(http://www.nanapro.org) -* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) -* -* Distributed under the Boost Software License, Version 1.0. -* (See accompanying file LICENSE_1_0.txt or copy at -* http://www.boost.org/LICENSE_1_0.txt) -* -* @file: nana/gui/notifier.cpp -*/ + * Implementation of Notifier + * Nana C++ Library(http://www.nanapro.org) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * @file: nana/gui/notifier.cpp + * @contributors: Jan + */ #include #include #include diff --git a/source/gui/widgets/skeletons/text_editor.cpp b/source/gui/widgets/skeletons/text_editor.cpp index e5125c9c..0cb39750 100644 --- a/source/gui/widgets/skeletons/text_editor.cpp +++ b/source/gui/widgets/skeletons/text_editor.cpp @@ -1,15 +1,15 @@ /* -* A text editor implementation -* Nana C++ Library(http://www.nanapro.org) -* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) -* -* Distributed under the Boost Software License, Version 1.0. -* (See accompanying file LICENSE_1_0.txt or copy at -* http://www.boost.org/LICENSE_1_0.txt) -* -* @file: nana/gui/widgets/skeletons/text_editor.cpp -* @description: -*/ + * A text editor implementation + * Nana C++ Library(http://www.nanapro.org) + * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com) + * + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * @file: nana/gui/widgets/skeletons/text_editor.cpp + * @contributors: qPCR4vir + */ #include #include #include @@ -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 + 1); chp != chp_end; ++chp) // + 2 + for (auto chp = text.data() + (pos + 1); chp != chp_end; ++chp) if (*chp == '\n') lines.emplace_back(0, 0);