diff options
author | Mart Raudsepp <leio@gentoo.org> | 2018-07-14 21:40:40 +0300 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2018-07-14 22:32:12 +0300 |
commit | 7cb12e41fb9ad7c68edacfe5d3f7509c912ca2c8 (patch) | |
tree | dd69c2c3d16267b4d3b7f4503aec8fec2acbe61c /dev-util/codeblocks | |
parent | dev-util/codeblocks: update codeblocks-9999.ebuild (diff) | |
download | gentoo-7cb12e41fb9ad7c68edacfe5d3f7509c912ca2c8.tar.gz gentoo-7cb12e41fb9ad7c68edacfe5d3f7509c912ca2c8.tar.bz2 gentoo-7cb12e41fb9ad7c68edacfe5d3f7509c912ca2c8.zip |
dev-util/codeblocks: move large astyle patch to distfiles
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-util/codeblocks')
4 files changed, 9 insertions, 418 deletions
diff --git a/dev-util/codeblocks/Manifest b/dev-util/codeblocks/Manifest index 7bfced6413ff..c685be7d1e50 100644 --- a/dev-util/codeblocks/Manifest +++ b/dev-util/codeblocks/Manifest @@ -1,2 +1,3 @@ DIST codeblocks-17.12-fortran.tar.xz 3048 BLAKE2B 58fd3b95cea3303a41da31f5cffe08698fa51ff896c456224edd63d17ddfe8dd54b0c058bd2a68920cf15789bfe5e412054e4e603b1d644034d8cb43d3de3224 SHA512 78534706b6433ae93b680740b2e6c0b747119f6ac62477b901ceeb1900692465615e29f2837ceca48d127181fc6b653d6d49a85fdb8d2fb873ad5a915527936c +DIST codeblocks-17.12_update_astyle_plugin_to_v3.1.patch.xz 3712 BLAKE2B 4a5f75c18b365030a08196dcb2808d8f42d8adf9442552d372cb3923629d9d5b74c98c77557f0af46965bb875543cc6f221a5197fa2b4dba12409225c6cc61d9 SHA512 b216f2659b8ce2a22fd2f9af456af71328b40428510b75f0bb36cec4695d28bbd3133b7385614a84862c2ab5c560d314cc8153ddab09019410e179f5d337669b DIST codeblocks_17.12.tar.xz 15725976 BLAKE2B 871427b5d8a2296e04d640c35d9129deebf1bb35cd1573652099c02ad4495c4c1369ed382ba714848d6bd75304195a25f6a91bece398bedaffbee8ae3547c46b SHA512 f90e756ca6f532656eeed34c6259c6a96ae85d172fc11e39f696ded9189cab7171d0cead18524fbab50dd782f21adbc7d52e2ea90535a3ed0aef5946b8a476e1 diff --git a/dev-util/codeblocks/codeblocks-17.12-r1.ebuild b/dev-util/codeblocks/codeblocks-17.12-r1.ebuild index d6592a32274e..33bc6b02fc6b 100644 --- a/dev-util/codeblocks/codeblocks-17.12-r1.ebuild +++ b/dev-util/codeblocks/codeblocks-17.12-r1.ebuild @@ -12,7 +12,9 @@ HOMEPAGE="http://www.codeblocks.org/" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" -SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz" +SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz +https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz +https://dev.gentoo.org/~leio/distfiles/${P}_update_astyle_plugin_to_v3.1.patch.xz" # USE="fortran" enables FortranProject plugin (v1.5) # that is delivered with Code::Blocks 17.12 source code. @@ -42,7 +44,7 @@ PATCHES=( src_prepare() { default if has_version ">=dev-util/astyle-3.1" ; then - epatch "${FILESDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch + epatch "${WORKDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch fi eautoreconf } diff --git a/dev-util/codeblocks/codeblocks-17.12-r301.ebuild b/dev-util/codeblocks/codeblocks-17.12-r301.ebuild index ccc5d2c786ae..faf2dc26b2cf 100644 --- a/dev-util/codeblocks/codeblocks-17.12-r301.ebuild +++ b/dev-util/codeblocks/codeblocks-17.12-r301.ebuild @@ -12,7 +12,9 @@ HOMEPAGE="http://www.codeblocks.org/" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" -SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz" +SRC_URI="mirror://sourceforge/${PN}/${P/-/_}.tar.xz +https://dev.gentoo.org/~leio/distfiles/${P}-fortran.tar.xz +https://dev.gentoo.org/~leio/distfiles/${P}_update_astyle_plugin_to_v3.1.patch.xz" # USE="fortran" enables FortranProject plugin (v1.5) # that is delivered with Code::Blocks 17.12 source code. @@ -42,7 +44,7 @@ PATCHES=( src_prepare() { default if has_version ">=dev-util/astyle-3.1" ; then - epatch "${FILESDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch + epatch "${WORKDIR}"/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch fi eautoreconf } diff --git a/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch b/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch deleted file mode 100644 index c70cf083a44a..000000000000 --- a/dev-util/codeblocks/files/codeblocks-17.12_update_astyle_plugin_to_v3.1.patch +++ /dev/null @@ -1,414 +0,0 @@ -# Patch from: https://sourceforge.net/p/codeblocks/code/11266/ -# * updated astyle plugin to v3.1 -# * removed obsolete astyle options -# * added new astyle options -# Authored by: jenslody 2018-01-15 -diff -Naur codeblocks-17.12/src/plugins/astyle/asstreamiterator.cpp codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.cpp ---- codeblocks-17.12/src/plugins/astyle/asstreamiterator.cpp 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.cpp 2018-01-15 20:54:23.000000000 +0300 -@@ -2,9 +2,9 @@ - * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3 - * http://www.gnu.org/licenses/gpl-3.0.html - * -- * $Revision: 9995 $ -- * $Id: asstreamiterator.cpp 9995 2014-10-16 09:01:46Z mortenmacfly $ -- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/asstreamiterator.cpp $ -+ * $Revision: 11266 $ -+ * $Id: asstreamiterator.cpp 11266 2018-01-15 17:54:23Z jenslody $ -+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/asstreamiterator.cpp $ - */ - - #include "asstreamiterator.h" -@@ -53,8 +53,10 @@ - - std::string ASStreamIterator::peekNextLine() - { -- if (!m_SavedCharPtr) -+ if (!m_SavedCharPtr){ - m_SavedCharPtr = m_CharPtr; -+ m_SavedCurChar = m_CurChar; -+ } - - return readLine(); - } -@@ -62,6 +64,7 @@ - void ASStreamIterator::peekReset() - { - m_CharPtr = m_SavedCharPtr; -+ m_CurChar = m_SavedCurChar; - m_SavedCharPtr = 0; - } - -diff -Naur codeblocks-17.12/src/plugins/astyle/asstreamiterator.h codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.h ---- codeblocks-17.12/src/plugins/astyle/asstreamiterator.h 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/asstreamiterator.h 2018-01-15 20:54:23.000000000 +0300 -@@ -22,6 +22,7 @@ - - bool hasMoreLines() const; - int getStreamLength() const; -+ std::streamoff getPeekStart() const { return 0; } - std::string nextLine(bool emptyLineWasDeleted = false); - std::string peekNextLine(); - void peekReset(); -@@ -39,6 +40,7 @@ - const wxChar* m_CharPtr; - const wxChar* m_SavedCharPtr; - int m_CurChar; -+ int m_SavedCurChar; - int m_CurLine; - bool m_FoundBookmark; - bool m_FoundBreakpoint; -diff -Naur codeblocks-17.12/src/plugins/astyle/astyleconfigdlg.cpp codeblocks-code-11266-trunk/src/plugins/astyle/astyleconfigdlg.cpp ---- codeblocks-17.12/src/plugins/astyle/astyleconfigdlg.cpp 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/astyleconfigdlg.cpp 2018-01-15 20:54:23.000000000 +0300 -@@ -2,9 +2,9 @@ - * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3 - * http://www.gnu.org/licenses/gpl-3.0.html - * -- * $Revision: 10955 $ -- * $Id: astyleconfigdlg.cpp 10955 2016-12-29 08:55:24Z mortenmacfly $ -- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/astyleconfigdlg.cpp $ -+ * $Revision: 11266 $ -+ * $Id: astyleconfigdlg.cpp 11266 2018-01-15 17:54:23Z jenslody $ -+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/astyleconfigdlg.cpp $ - */ - - #include <sdk.h> -@@ -34,7 +34,7 @@ - EVT_RADIOBUTTON(XRCID("rbStroustrup"), AstyleConfigDlg::OnStyleChange) - EVT_RADIOBUTTON(XRCID("rbWhitesmith"), AstyleConfigDlg::OnStyleChange) - EVT_RADIOBUTTON(XRCID("rbVTK"), AstyleConfigDlg::OnStyleChange) -- EVT_RADIOBUTTON(XRCID("rbBanner"), AstyleConfigDlg::OnStyleChange) -+ EVT_RADIOBUTTON(XRCID("rbRatliff"), AstyleConfigDlg::OnStyleChange) - EVT_RADIOBUTTON(XRCID("rbGNU"), AstyleConfigDlg::OnStyleChange) - EVT_RADIOBUTTON(XRCID("rbLinux"), AstyleConfigDlg::OnStyleChange) - EVT_RADIOBUTTON(XRCID("rbHorstmann"), AstyleConfigDlg::OnStyleChange) -@@ -158,7 +158,7 @@ - XRCCTRL(*this, "rbVTK", wxRadioButton)->SetValue(true); - break; - #undef AS_VTK --#define AS_BANNER "\ -+#define AS_RATLIFF "\ - int Foo(bool isBar) {\n\ - if (isBar) {\n\ - bar();\n\ -@@ -167,11 +167,11 @@ - else\n\ - return 0;\n\ - }" -- case aspsBanner: -- sample = _T(AS_BANNER); -- XRCCTRL(*this, "rbBanner", wxRadioButton)->SetValue(true); -+ case aspsRatliff: -+ sample = _T(AS_RATLIFF); -+ XRCCTRL(*this, "rbRatliff", wxRadioButton)->SetValue(true); - break; --#undef AS_BANNER -+#undef AS_RATLIFF - #define AS_GNU "\ - int Foo(bool isBar)\n\ - {\n\ -@@ -307,8 +307,8 @@ - SetStyle(aspsWhitesmith); - else if (event.GetId() == XRCID("rbVTK")) - SetStyle(aspsVTK); -- else if (event.GetId() == XRCID("rbBanner")) -- SetStyle(aspsBanner); -+ else if (event.GetId() == XRCID("rbRatliff")) -+ SetStyle(aspsRatliff); - else if (event.GetId() == XRCID("rbGNU")) - SetStyle(aspsGnu); - else if (event.GetId() == XRCID("rbLinux")) -@@ -376,6 +376,7 @@ - XRCCTRL(*this, "chkAttachExternC", wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_extern_c"), false)); - XRCCTRL(*this, "chkAttachNamespaces", wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_namespaces"), false)); - XRCCTRL(*this, "chkAttachInlines", wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_inlines"), false)); -+ XRCCTRL(*this, "chkAttachClosingWhiles", wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_closing_whiles"), false)); - - XRCCTRL(*this, "spnIndentation", wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/indentation"), 4)); - XRCCTRL(*this, "spnContinuation", wxSpinCtrl)->SetValue(cfg->ReadInt(_T("/continuation"), 0)); -@@ -386,6 +387,7 @@ - XRCCTRL(*this, "chkIndentLabels", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_labels"), false)); - XRCCTRL(*this, "chkIndentModifiers", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_modifiers"), false)); - XRCCTRL(*this, "chkIndentNamespaces", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_namespaces"), false)); -+ XRCCTRL(*this, "chkIndentAfterParens", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_after_parens"), false)); - XRCCTRL(*this, "chkIndentSwitches", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_switches"), false)); - XRCCTRL(*this, "chkIndentPreprocBlock", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_preproc_block"), false)); - XRCCTRL(*this, "chkIndentPreprocDefine", wxCheckBox)->SetValue(cfg->ReadBool(_T("/indent_preproc_define"), false)); -@@ -399,6 +401,10 @@ - XRCCTRL(*this, "chkAddBrackets", wxCheckBox)->SetValue(cfg->ReadBool(_T("/add_brackets"), false)); - XRCCTRL(*this, "chkAddOneLineBrackets", wxCheckBox)->SetValue(cfg->ReadBool(_T("/add_one_line_brackets"), false)); - XRCCTRL(*this, "chkRemoveBrackets", wxCheckBox)->SetValue(cfg->ReadBool(_T("/remove_brackets"), false)); -+ XRCCTRL(*this, "chkBreakReturnType", wxCheckBox)->SetValue(cfg->ReadBool(_T("/break_return_type"), false)); -+ XRCCTRL(*this, "chkBreakReturnTypeDecl", wxCheckBox)->SetValue(cfg->ReadBool(_T("/break_return_type_decl"),false)); -+ XRCCTRL(*this, "chkAttachReturnType", wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_return_type"), false)); -+ XRCCTRL(*this, "chkAttachReturnTypeDecl",wxCheckBox)->SetValue(cfg->ReadBool(_T("/attach_return_type_decl"),false)); - XRCCTRL(*this, "chkKeepBlocks", wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_blocks"), false)); - XRCCTRL(*this, "chkKeepHeaders", wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_headers"), false)); - XRCCTRL(*this, "chkKeepStatements", wxCheckBox)->SetValue(cfg->ReadBool(_T("/keep_statements"), false)); -@@ -455,8 +461,8 @@ - style = aspsWhitesmith; - else if (XRCCTRL(*this, "rbVTK", wxRadioButton)->GetValue()) - style = aspsVTK; -- else if (XRCCTRL(*this, "rbBanner", wxRadioButton)->GetValue()) -- style = aspsBanner; -+ else if (XRCCTRL(*this, "rbRatliff", wxRadioButton)->GetValue()) -+ style = aspsRatliff; - else if (XRCCTRL(*this, "rbGNU", wxRadioButton)->GetValue()) - style = aspsGnu; - else if (XRCCTRL(*this, "rbLinux", wxRadioButton)->GetValue()) -@@ -480,6 +486,7 @@ - cfg->Write(_T("/attach_extern_c"), XRCCTRL(*this, "chkAttachExternC", wxCheckBox)->GetValue()); - cfg->Write(_T("/attach_namespaces"), XRCCTRL(*this, "chkAttachNamespaces", wxCheckBox)->GetValue()); - cfg->Write(_T("/attach_inlines"), XRCCTRL(*this, "chkAttachInlines", wxCheckBox)->GetValue()); -+ cfg->Write(_T("/attach_closing_whiles"), XRCCTRL(*this, "chkAttachClosingWhiles", wxCheckBox)->GetValue()); - - cfg->Write(_T("/indentation"), XRCCTRL(*this, "spnIndentation", wxSpinCtrl)->GetValue()); - cfg->Write(_T("/continuation"), XRCCTRL(*this, "spnContinuation", wxSpinCtrl)->GetValue()); -@@ -490,6 +497,7 @@ - cfg->Write(_T("/indent_labels"), XRCCTRL(*this, "chkIndentLabels", wxCheckBox)->GetValue()); - cfg->Write(_T("/indent_modifiers"), XRCCTRL(*this, "chkIndentModifiers", wxCheckBox)->GetValue()); - cfg->Write(_T("/indent_namespaces"), XRCCTRL(*this, "chkIndentNamespaces", wxCheckBox)->GetValue()); -+ cfg->Write(_T("/indent_after_parens"), XRCCTRL(*this, "chkIndentAfterParens", wxCheckBox)->GetValue()); - cfg->Write(_T("/indent_switches"), XRCCTRL(*this, "chkIndentSwitches", wxCheckBox)->GetValue()); - cfg->Write(_T("/indent_preproc_block"), XRCCTRL(*this, "chkIndentPreprocBlock", wxCheckBox)->GetValue()); - cfg->Write(_T("/indent_preproc_define"), XRCCTRL(*this, "chkIndentPreprocDefine", wxCheckBox)->GetValue()); -@@ -503,6 +511,10 @@ - cfg->Write(_T("/add_brackets"), XRCCTRL(*this, "chkAddBrackets", wxCheckBox)->GetValue()); - cfg->Write(_T("/add_one_line_brackets"), XRCCTRL(*this, "chkAddOneLineBrackets", wxCheckBox)->GetValue()); - cfg->Write(_T("/remove_brackets"), XRCCTRL(*this, "chkRemoveBrackets", wxCheckBox)->GetValue()); -+ cfg->Write(_T("/break_return_type_decl"), XRCCTRL(*this, "chkBreakReturnTypeDecl", wxCheckBox)->GetValue()); -+ cfg->Write(_T("/break_return_type"), XRCCTRL(*this, "chkBreakReturnType", wxCheckBox)->GetValue()); -+ cfg->Write(_T("/attach_return_type"), XRCCTRL(*this, "chkAttachReturnType", wxCheckBox)->GetValue()); -+ cfg->Write(_T("/attach_return_type_decl"), XRCCTRL(*this, "chkAttachReturnTypeDecl",wxCheckBox)->GetValue()); - cfg->Write(_T("/keep_blocks"), XRCCTRL(*this, "chkKeepBlocks", wxCheckBox)->GetValue()); - cfg->Write(_T("/keep_headers"), XRCCTRL(*this, "chkKeepHeaders", wxCheckBox)->GetValue()); - cfg->Write(_T("/keep_statements"), XRCCTRL(*this, "chkKeepStatements", wxCheckBox)->GetValue()); -diff -Naur codeblocks-17.12/src/plugins/astyle/astyleplugin.cpp codeblocks-code-11266-trunk/src/plugins/astyle/astyleplugin.cpp ---- codeblocks-17.12/src/plugins/astyle/astyleplugin.cpp 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/astyleplugin.cpp 2017-10-09 00:31:56.000000000 +0300 -@@ -4,7 +4,7 @@ - * - * $Revision: 11193 $ - * $Id: astyleplugin.cpp 11193 2017-10-08 21:31:56Z fuscated $ -- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/astyleplugin.cpp $ -+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/astyleplugin.cpp $ - */ - - #include <sdk.h> -diff -Naur codeblocks-17.12/src/plugins/astyle/astylepredefinedstyles.h codeblocks-code-11266-trunk/src/plugins/astyle/astylepredefinedstyles.h ---- codeblocks-17.12/src/plugins/astyle/astylepredefinedstyles.h 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/astylepredefinedstyles.h 2018-01-15 20:54:23.000000000 +0300 -@@ -14,7 +14,7 @@ - aspsStroustrup, - aspsWhitesmith, - aspsVTK, -- aspsBanner, -+ aspsRatliff, - aspsGnu, - aspsLinux, - aspsHorstmann, -diff -Naur codeblocks-17.12/src/plugins/astyle/dlgformattersettings.cpp codeblocks-code-11266-trunk/src/plugins/astyle/dlgformattersettings.cpp ---- codeblocks-17.12/src/plugins/astyle/dlgformattersettings.cpp 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/dlgformattersettings.cpp 2018-01-15 20:54:23.000000000 +0300 -@@ -2,9 +2,9 @@ - * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3 - * http://www.gnu.org/licenses/gpl-3.0.html - * -- * $Revision: 10950 $ -- * $Id: dlgformattersettings.cpp 10950 2016-12-29 06:16:39Z mortenmacfly $ -- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/dlgformattersettings.cpp $ -+ * $Revision: 11266 $ -+ * $Id: dlgformattersettings.cpp 11266 2018-01-15 17:54:23Z jenslody $ -+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/dlgformattersettings.cpp $ - */ - - #include "dlgformattersettings.h" -@@ -39,8 +39,8 @@ - formatter.setFormattingStyle(astyle::STYLE_WHITESMITH); - else if (XRCCTRL(*m_dlg, "rbVTK", wxRadioButton)->GetValue()) - formatter.setFormattingStyle(astyle::STYLE_VTK); -- else if (XRCCTRL(*m_dlg, "rbBanner", wxRadioButton)->GetValue()) -- formatter.setFormattingStyle(astyle::STYLE_BANNER); -+ else if (XRCCTRL(*m_dlg, "rbRatliff", wxRadioButton)->GetValue()) -+ formatter.setFormattingStyle(astyle::STYLE_RATLIFF); - else if (XRCCTRL(*m_dlg, "rbGNU", wxRadioButton)->GetValue()) - formatter.setFormattingStyle(astyle::STYLE_GNU); - else if (XRCCTRL(*m_dlg, "rbLinux", wxRadioButton)->GetValue()) -@@ -58,10 +58,11 @@ - else if (XRCCTRL(*m_dlg, "rbLisp", wxRadioButton)->GetValue()) - formatter.setFormattingStyle(astyle::STYLE_LISP); - -- formatter.setAttachClass(XRCCTRL(*m_dlg, "chkAttachClasses", wxCheckBox)->GetValue()); -- formatter.setAttachExternC(XRCCTRL(*m_dlg, "chkAttachExternC", wxCheckBox)->GetValue()); -- formatter.setAttachNamespace(XRCCTRL(*m_dlg, "chkAttachNamespaces", wxCheckBox)->GetValue()); -- formatter.setAttachInline(XRCCTRL(*m_dlg, "chkAttachInlines", wxCheckBox)->GetValue()); -+ formatter.setAttachClass(XRCCTRL(*m_dlg, "chkAttachClasses", wxCheckBox)->GetValue()); -+ formatter.setAttachExternC(XRCCTRL(*m_dlg, "chkAttachExternC", wxCheckBox)->GetValue()); -+ formatter.setAttachNamespace(XRCCTRL(*m_dlg, "chkAttachNamespaces", wxCheckBox)->GetValue()); -+ formatter.setAttachInline(XRCCTRL(*m_dlg, "chkAttachInlines", wxCheckBox)->GetValue()); -+ formatter.setAttachClosingWhile(XRCCTRL(*m_dlg, "chkAttachClosingWhiles", wxCheckBox)->GetValue()); - - bool value = XRCCTRL(*m_dlg, "chkForceUseTabs", wxCheckBox)->GetValue(); - int spaceNum = XRCCTRL(*m_dlg, "spnIndentation", wxSpinCtrl)->GetValue(); -@@ -79,6 +80,7 @@ - formatter.setLabelIndent(XRCCTRL(*m_dlg, "chkIndentLabels", wxCheckBox)->GetValue()); - formatter.setModifierIndent(XRCCTRL(*m_dlg, "chkIndentModifiers", wxCheckBox)->GetValue()); - formatter.setNamespaceIndent(XRCCTRL(*m_dlg, "chkIndentNamespaces", wxCheckBox)->GetValue()); -+ formatter.setAfterParenIndent(XRCCTRL(*m_dlg, "chkIndentAfterParens", wxCheckBox)->GetValue()); - formatter.setSwitchIndent(XRCCTRL(*m_dlg, "chkIndentSwitches", wxCheckBox)->GetValue()); - formatter.setPreprocBlockIndent(XRCCTRL(*m_dlg, "chkIndentPreprocBlock", wxCheckBox)->GetValue()); - formatter.setPreprocDefineIndent(XRCCTRL(*m_dlg, "chkIndentPreprocDefine", wxCheckBox)->GetValue()); -@@ -88,11 +90,15 @@ - formatter.setMinConditionalIndentOption(minConditionalEvent); - formatter.setMaxInStatementIndentLength( wxAtoi(XRCCTRL(*m_dlg, "txtMaxInStatementIndent", wxTextCtrl)->GetValue()) ); - -- formatter.setBreakClosingHeaderBracketsMode(XRCCTRL(*m_dlg, "chkBreakClosing", wxCheckBox)->GetValue()); -+ formatter.setBreakClosingHeaderBracesMode(XRCCTRL(*m_dlg, "chkBreakClosing", wxCheckBox)->GetValue()); - formatter.setBreakElseIfsMode(XRCCTRL(*m_dlg, "chkBreakElseIfs", wxCheckBox)->GetValue()); -- formatter.setAddBracketsMode(XRCCTRL(*m_dlg, "chkAddBrackets", wxCheckBox)->GetValue()); -- formatter.setAddOneLineBracketsMode(XRCCTRL(*m_dlg, "chkAddOneLineBrackets", wxCheckBox)->GetValue()); -- formatter.setRemoveBracketsMode(XRCCTRL(*m_dlg, "chkRemoveBrackets", wxCheckBox)->GetValue()); -+ formatter.setAddBracesMode(XRCCTRL(*m_dlg, "chkAddBrackets", wxCheckBox)->GetValue()); -+ formatter.setAddOneLineBracesMode(XRCCTRL(*m_dlg, "chkAddOneLineBrackets", wxCheckBox)->GetValue()); -+ formatter.setRemoveBracesMode(XRCCTRL(*m_dlg, "chkRemoveBrackets", wxCheckBox)->GetValue()); -+ formatter.setBreakReturnType(XRCCTRL(*m_dlg, "chkBreakReturnType", wxCheckBox)->GetValue()); -+ formatter.setBreakReturnTypeDecl(XRCCTRL(*m_dlg, "chkBreakReturnTypeDecl", wxCheckBox)->GetValue()); -+ formatter.setAttachReturnType(XRCCTRL(*m_dlg, "chkAttachReturnType", wxCheckBox)->GetValue()); -+ formatter.setAttachReturnTypeDecl(XRCCTRL(*m_dlg, "chkAttachReturnTypeDecl", wxCheckBox)->GetValue()); - formatter.setBreakOneLineBlocksMode(!XRCCTRL(*m_dlg, "chkKeepBlocks", wxCheckBox)->GetValue()); - formatter.setBreakOneLineHeadersMode(!XRCCTRL(*m_dlg, "chkKeepHeaders", wxCheckBox)->GetValue()); - formatter.setBreakOneLineStatementsMode(!XRCCTRL(*m_dlg, "chkKeepStatements", wxCheckBox)->GetValue()); -diff -Naur codeblocks-17.12/src/plugins/astyle/formattersettings.cpp codeblocks-code-11266-trunk/src/plugins/astyle/formattersettings.cpp ---- codeblocks-17.12/src/plugins/astyle/formattersettings.cpp 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/formattersettings.cpp 2018-01-15 20:54:23.000000000 +0300 -@@ -2,9 +2,9 @@ - * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3 - * http://www.gnu.org/licenses/gpl-3.0.html - * -- * $Revision: 10950 $ -- * $Id: formattersettings.cpp 10950 2016-12-29 06:16:39Z mortenmacfly $ -- * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx/src/plugins/astyle/formattersettings.cpp $ -+ * $Revision: 11266 $ -+ * $Id: formattersettings.cpp 11266 2018-01-15 17:54:23Z jenslody $ -+ * $HeadURL: file:///svn/p/codeblocks/code/trunk/src/plugins/astyle/formattersettings.cpp $ - */ - - #include <sdk.h> -@@ -54,8 +54,8 @@ - formatter.setFormattingStyle(astyle::STYLE_VTK); - break; - -- case aspsBanner: // Banner -- formatter.setFormattingStyle(astyle::STYLE_BANNER); -+ case aspsRatliff: // Ratliff -+ formatter.setFormattingStyle(astyle::STYLE_RATLIFF); - break; - - case aspsGnu: // GNU -@@ -123,7 +123,7 @@ - formatter.setMinConditionalIndentOption(cfg->ReadInt(_T("/min_conditional_indent"), 2)); - formatter.setMaxInStatementIndentLength(cfg->ReadInt(_T("/max_instatement_indent"), 40)); - -- formatter.setBreakClosingHeaderBracketsMode(cfg->ReadBool(_T("/break_closing"))); -+ formatter.setBreakClosingHeaderBracesMode(cfg->ReadBool(_T("/break_closing"))); - formatter.setBreakElseIfsMode(cfg->ReadBool(_T("/break_elseifs"))); - formatter.setAddBracketsMode(cfg->ReadBool(_T("/add_brackets"))); - formatter.setAddOneLineBracketsMode(cfg->ReadBool(_T("/add_one_line_brackets"))); -diff -Naur codeblocks-17.12/src/plugins/astyle/resources/configuration.xrc codeblocks-code-11266-trunk/src/plugins/astyle/resources/configuration.xrc ---- codeblocks-17.12/src/plugins/astyle/resources/configuration.xrc 2017-11-01 02:32:42.000000000 +0300 -+++ codeblocks-code-11266-trunk/src/plugins/astyle/resources/configuration.xrc 2018-01-15 20:54:23.000000000 +0300 -@@ -61,9 +61,9 @@ - <border>5</border> - </object> - <object class="sizeritem"> -- <object class="wxRadioButton" name="rbBanner"> -- <label>Banner</label> -- <tooltip>Banner style uses attached, indented brackets. Switch blocks and class blocks are indented to prevent a 'hanging indent' with following case statements and C++ class modifiers (public, private, protected).</tooltip> -+ <object class="wxRadioButton" name="rbRatliff"> -+ <label>Ratliff</label> -+ <tooltip>Ratliff style uses attached, indented brackets. Switch blocks and class blocks are indented to prevent a 'hanging indent' with following case statements and C++ class modifiers (public, private, protected).</tooltip> - </object> - <flag>wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT</flag> - <border>5</border> -@@ -212,6 +212,13 @@ - <flag>wxTOP|wxALIGN_LEFT</flag> - <border>5</border> - </object> -+ <object class="sizeritem"> -+ <object class="wxCheckBox" name="chkAttachClosingWhiles"> -+ <label>Attach closing "while"</label> -+ </object> -+ <flag>wxTOP|wxALIGN_LEFT</flag> -+ <border>5</border> -+ </object> - </object> - <flag>wxEXPAND</flag> - <border>5</border> -@@ -320,6 +327,13 @@ - <border>5</border> - </object> - <object class="sizeritem"> -+ <object class="wxCheckBox" name="chkIndentAfterParens"> -+ <label>Indent after parens</label> -+ </object> -+ <flag>wxTOP|wxALIGN_LEFT</flag> -+ <border>5</border> -+ </object> -+ <object class="sizeritem"> - <object class="wxCheckBox" name="chkIndentSwitches"> - <label>Indent switches (keyword case:)</label> - </object> -@@ -427,21 +441,49 @@ - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="chkAddBrackets"> -- <label>Add brackets to unbracketed one line conditional statements</label> -+ <label>Add braces to unbraced one line conditional statements</label> - </object> - <flag>wxTOP|wxALIGN_LEFT</flag> - <border>5</border> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="chkAddOneLineBrackets"> -- <label>Add one line brackets to unbracketed one line conditional statements</label> -+ <label>Add one line braces to unbraced one line conditional statements</label> - </object> - <flag>wxTOP|wxALIGN_LEFT</flag> - <border>5</border> - </object> - <object class="sizeritem"> - <object class="wxCheckBox" name="chkRemoveBrackets"> -- <label>Remove brackets from conditional statements (single statement on a single line)</label> -+ <label>Remove braces from conditional statements (single statement on a single line)</label> -+ </object> -+ <flag>wxTOP|wxALIGN_LEFT</flag> -+ <border>5</border> -+ </object> -+ <object class="sizeritem"> -+ <object class="wxCheckBox" name="chkBreakReturnType"> -+ <label>Break the return type from the function name in function definitions</label> -+ </object> -+ <flag>wxTOP|wxALIGN_LEFT</flag> -+ <border>5</border> -+ </object> -+ <object class="sizeritem"> -+ <object class="wxCheckBox" name="chkBreakReturnTypeDecl"> -+ <label>Break the return type from the function name in function declarations or signatures</label> -+ </object> -+ <flag>wxTOP|wxALIGN_LEFT</flag> -+ <border>5</border> -+ </object> -+ <object class="sizeritem"> -+ <object class="wxCheckBox" name="chkAttachReturnType"> -+ <label>Attach the return type to the function name in function definitions</label> -+ </object> -+ <flag>wxTOP|wxALIGN_LEFT</flag> -+ <border>5</border> -+ </object> -+ <object class="sizeritem"> -+ <object class="wxCheckBox" name="chkAttachReturnTypeDecl"> -+ <label>Attach the return type to the function name in function declarations or signatures</label> - </object> - <flag>wxTOP|wxALIGN_LEFT</flag> - <border>5</border> |