diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/output.0 codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/output.0 --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/output.0 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/output.0 2018-01-15 20:57:12.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d. +@%:@ Generated by GNU Autoconf 2.69 for codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='codeblocks' PACKAGE_TARNAME='codeblocks' -PACKAGE_VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' -PACKAGE_STRING='codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' +PACKAGE_VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' +PACKAGE_STRING='codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1643,7 +1643,7 @@ # 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 <<_ACEOF -\`configure' configures codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d to adapt to many kinds of systems. +\`configure' configures codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1719,7 +1719,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d:";; + short | recursive ) echo "Configuration of codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk:";; esac cat <<\_ACEOF @@ -1926,7 +1926,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -codeblocks configure 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks configure 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2466,7 +2466,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +It was created by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3665,7 +3665,7 @@ # Define the identity of the package. PACKAGE='codeblocks' - VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' + VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' cat >>confdefs.h <<_ACEOF @@ -24771,11 +24771,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Code::Blocks..." >&5 $as_echo "$as_me: Configuring Code::Blocks..." >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&5 -$as_echo "$as_me: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&6;} -REVISION=revision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&5 +$as_echo "$as_me: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&6;} +REVISION=revision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk -DATE="2018-01-12 02:22:19" +DATE="2018-01-15 20:57:06" if test "x${target_vendor}" = "xapple"; then @@ -26074,7 +26074,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +This file was extended by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26140,7 +26140,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -codeblocks config.status 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks config.status 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/output.1 codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/output.1 --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/output.1 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/output.1 2018-01-15 20:57:12.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d. +@%:@ Generated by GNU Autoconf 2.69 for codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='codeblocks' PACKAGE_TARNAME='codeblocks' -PACKAGE_VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' -PACKAGE_STRING='codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' +PACKAGE_VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' +PACKAGE_STRING='codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1643,7 +1643,7 @@ # 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 <<_ACEOF -\`configure' configures codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d to adapt to many kinds of systems. +\`configure' configures codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1719,7 +1719,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d:";; + short | recursive ) echo "Configuration of codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk:";; esac cat <<\_ACEOF @@ -1926,7 +1926,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -codeblocks configure 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks configure 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2466,7 +2466,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +It was created by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3665,7 +3665,7 @@ # Define the identity of the package. PACKAGE='codeblocks' - VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' + VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' cat >>confdefs.h <<_ACEOF @@ -24771,11 +24771,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Code::Blocks..." >&5 $as_echo "$as_me: Configuring Code::Blocks..." >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&5 -$as_echo "$as_me: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&6;} -REVISION=revision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&5 +$as_echo "$as_me: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&6;} +REVISION=revision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk -DATE="2018-01-12 02:22:19" +DATE="2018-01-15 20:57:06" if test "x${target_vendor}" = "xapple"; then @@ -26074,7 +26074,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +This file was extended by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26140,7 +26140,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -codeblocks config.status 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks config.status 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/output.2 codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/output.2 --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/output.2 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/output.2 2018-01-15 20:57:12.000000000 +0000 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d. +@%:@ Generated by GNU Autoconf 2.69 for codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='codeblocks' PACKAGE_TARNAME='codeblocks' -PACKAGE_VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' -PACKAGE_STRING='codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' +PACKAGE_VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' +PACKAGE_STRING='codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1643,7 +1643,7 @@ # 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 <<_ACEOF -\`configure' configures codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d to adapt to many kinds of systems. +\`configure' configures codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1719,7 +1719,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d:";; + short | recursive ) echo "Configuration of codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk:";; esac cat <<\_ACEOF @@ -1926,7 +1926,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -codeblocks configure 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks configure 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2466,7 +2466,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +It was created by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3665,7 +3665,7 @@ # Define the identity of the package. PACKAGE='codeblocks' - VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' + VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' cat >>confdefs.h <<_ACEOF @@ -24771,11 +24771,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Code::Blocks..." >&5 $as_echo "$as_me: Configuring Code::Blocks..." >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&5 -$as_echo "$as_me: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&6;} -REVISION=revision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&5 +$as_echo "$as_me: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&6;} +REVISION=revision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk -DATE="2018-01-12 02:22:19" +DATE="2018-01-15 20:57:06" if test "x${target_vendor}" = "xapple"; then @@ -26074,7 +26074,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +This file was extended by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26140,7 +26140,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -codeblocks config.status 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks config.status 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/requests codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/requests --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/requests 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/requests 2018-01-15 20:57:12.000000000 +0000 @@ -40,198 +40,198 @@ 'configure.ac' ], { - 'AC_ENABLE_SHARED' => 1, - '_LT_AC_CHECK_DLFCN' => 1, - 'WX_ARG_ENABLE_YESNOAUTO' => 1, - 'AM_SET_DEPDIR' => 1, + 'AX_BOOST_SYSTEM' => 1, + 'AM_PROG_LD' => 1, + 'AC_DEFUN_ONCE' => 1, + '_LT_WITH_SYSROOT' => 1, + '_AM_IF_OPTION' => 1, + 'CODEBLOCKS_CHECK_LINK_FLAG' => 1, + 'AM_CONDITIONAL' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, 'PKG_NOARCH_INSTALLDIR' => 1, - 'AC_LIBTOOL_FC' => 1, - 'LT_LANG' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AC_PATH_MAGIC' => 1, - 'PKG_CHECK_MODULES_STATIC' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - '_AX_BOOST_BASE_RUNDETECT' => 1, - 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'LT_AC_PROG_GCJ' => 1, - 'WX_ARG_WITH_YESNOAUTO' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AM_MAKE_INCLUDE' => 1, - '_LT_PROG_F77' => 1, - 'AC_LIBTOOL_PROG_CC_C_O' => 1, - '_AM_SET_OPTIONS' => 1, - 'AC_LIBTOOL_PICMODE' => 1, - '_m4_warn' => 1, - 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - 'AC_PROG_EGREP' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, + 'WX_DETECT_STANDARD_OPTION_VALUES' => 1, + 'AM_PATH_WXRC' => 1, + '_LT_PROG_CXX' => 1, + 'CB_GCC_VERSION' => 1, + 'LT_AC_PROG_SED' => 1, + 'AM_ENABLE_SHARED' => 1, + '_AX_BOOST_BASE_TONUMERICVERSION' => 1, + 'LT_LIB_M' => 1, + 'AM_RUN_LOG' => 1, + 'AM_PROG_NM' => 1, 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, - 'AC_DISABLE_FAST_INSTALL' => 1, - 'CODEBLOCKS_CHECK_LINK_FLAG' => 1, - '_AM_DEPENDENCIES' => 1, - 'AC_DISABLE_SHARED' => 1, - '_LT_PROG_FC' => 1, - 'CODEBLOCKS_GET_PLATFORM' => 1, - '_WX_PRIVATE_CHECK_VERSION' => 1, + '_AM_PROG_CC_C_O' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, '_LT_LINKER_BOILERPLATE' => 1, - 'AC_CHECK_LIBM' => 1, - 'AM_ENABLE_SHARED' => 1, - 'AC_LTDL_ENABLE_INSTALL' => 1, - '_LT_AC_SHELL_INIT' => 1, - '_LT_CC_BASENAME' => 1, - 'AC_LTDL_PREOPEN' => 1, - 'LT_OUTPUT' => 1, - 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, - '_LT_REQUIRED_DARWIN_CHECKS' => 1, - '_AM_SET_OPTION' => 1, - 'AC_PROG_LD_GNU' => 1, - 'AC_LIBTOOL_DLOPEN' => 1, - '_LT_AC_LOCK' => 1, - 'AC_LIBTOOL_LINKER_OPTION' => 1, - 'AC_ENABLE_STATIC' => 1, - 'LT_PROG_GO' => 1, - 'AM_PATH_WXCONFIG' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, - 'AC_LTDL_OBJDIR' => 1, - '_LT_AC_SYS_COMPILER' => 1, - 'LTSUGAR_VERSION' => 1, - 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, - 'AC_PROG_LD_RELOAD_FLAG' => 1, - 'AM_CONDITIONAL' => 1, - 'LT_AC_PROG_RC' => 1, - 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, - '_LT_COMPILER_OPTION' => 1, + '_AM_DEPENDENCIES' => 1, 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, - 'LT_PROG_RC' => 1, - '_LT_AC_LANG_F77_CONFIG' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, + 'LTOBSOLETE_VERSION' => 1, + 'm4_pattern_allow' => 1, + 'LT_LANG' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + '_AM_SET_OPTIONS' => 1, + '_LT_AC_CHECK_DLFCN' => 1, '_LT_LINKER_OPTION' => 1, - 'WX_STANDARD_OPTIONS' => 1, - '_LT_AC_LANG_GCJ' => 1, - 'PKG_INSTALLDIR' => 1, - '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AM_SILENT_RULES' => 1, + 'AC_CHECK_LIBM' => 1, + 'PKG_PROG_PKG_CONFIG' => 1, + 'AM_PROG_CC_C_O' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + '_LT_AC_TAGVAR' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, + 'LTVERSION_VERSION' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, '_LT_AC_LANG_RC_CONFIG' => 1, + 'WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + '_LT_AC_LANG_C_CONFIG' => 1, + '_LT_PROG_F77' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + 'CODEBLOCKS_SETUP_FOR_TARGET' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + 'WX_LIKE_LIBNAME' => 1, '_WX_SELECTEDCONFIG_CHECKFOR' => 1, - 'AM_PROG_INSTALL_STRIP' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, - 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - 'AC_LIBTOOL_WIN32_DLL' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + 'LT_PROG_GO' => 1, + 'WX_STANDARD_OPTIONS_SUMMARY_MSG' => 1, + 'AM_OPTIONS_WXCONFIG' => 1, + '_LT_CC_BASENAME' => 1, + 'AM_MAKE_INCLUDE' => 1, + '_WX_PRIVATE_CHECK_VERSION' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'PKG_INSTALLDIR' => 1, + 'AC_PATH_MAGIC' => 1, + '_LT_COMPILER_OPTION' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'BUILD_CONTRIB_NONE' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + 'WX_CONFIG_CHECK' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, + 'AX_BOOST_BASE' => 1, + 'm4_include' => 1, + 'AC_LIBTOOL_RC' => 1, + '_LT_DLL_DEF_P' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'AM_MISSING_HAS_RUN' => 1, + 'WX_CONFIG_OPTIONS' => 1, '_LT_AC_TRY_DLOPEN_SELF' => 1, - 'WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN' => 1, - '_LT_PROG_ECHO_BACKSLASH' => 1, - 'LT_LIB_M' => 1, - 'AM_PATH_WXRC' => 1, - 'AC_LIBTOOL_F77' => 1, - '_PKG_SHORT_ERRORS_SUPPORTED' => 1, - 'AM_PROG_INSTALL_SH' => 1, 'LT_PROG_GCJ' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, - 'CODEBLOCKS_ENABLE_SETTINGS' => 1, - 'AM_PROG_LD' => 1, - '_AM_MANGLE_OPTION' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, - 'LTOPTIONS_VERSION' => 1, - 'AC_LIBTOOL_CONFIG' => 1, + 'WX_STANDARD_OPTIONS_SUMMARY_MSG_END' => 1, + '_LT_AC_TAGCONFIG' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, 'AC_LIBTOOL_CXX' => 1, - 'WX_LIKE_LIBNAME' => 1, - '_LT_AC_LANG_CXX_CONFIG' => 1, - 'BUILD_CONTRIB_ALL' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, - 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + 'include' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, + 'WX_BOOLOPT_SUMMARY' => 1, + '_LT_AC_SYS_COMPILER' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + 'LT_PROG_RC' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, + 'AM_DISABLE_STATIC' => 1, + 'PKG_CHECK_MODULES' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + 'PKG_CHECK_MODULES_STATIC' => 1, + 'LT_AC_PROG_EGREP' => 1, + '_AM_MANGLE_OPTION' => 1, + 'AC_DISABLE_STATIC' => 1, + 'LTOPTIONS_VERSION' => 1, 'AM_SANITY_CHECK' => 1, - '_LT_COMPILER_BOILERPLATE' => 1, - '_AC_PROG_LIBTOOL' => 1, - 'CODEBLOCKS_CHECK_DEBUG' => 1, + 'WX_ARG_WITH_YESNOAUTO' => 1, + 'm4_pattern_forbid' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'LT_OUTPUT' => 1, + 'AC_LTDL_ENABLE_INSTALL' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, + 'WX_ARG_ENABLE_YESNOAUTO' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, 'AM_MISSING_PROG' => 1, - 'AC_LIBTOOL_OBJDIR' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_LIBTOOL_RC' => 1, - 'AM_SILENT_RULES' => 1, + '_AM_PROG_TAR' => 1, + '_LT_AC_LANG_GCJ_CONFIG' => 1, + 'LT_AC_PROG_RC' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, 'AC_DEFUN' => 1, - 'LT_SYS_DLOPEN_SELF' => 1, - 'AC_LIBTOOL_LANG_C_CONFIG' => 1, - '_AM_IF_OPTION' => 1, + '_AC_PROG_LIBTOOL' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, + 'AM_PATH_WXCONFIG' => 1, 'AM_DEP_TRACK' => 1, - 'AM_OPTIONS_WXCONFIG' => 1, - 'PKG_PROG_PKG_CONFIG' => 1, - 'WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_DISABLE_SHARED' => 1, - 'AU_DEFUN' => 1, - 'WX_DETECT_STANDARD_OPTION_VALUES' => 1, - 'CODEBLOCKS_SETUP_FOR_TARGET' => 1, - 'AM_AUX_DIR_EXPAND' => 1, - 'AM_RUN_LOG' => 1, - 'WX_CONFIG_OPTIONS' => 1, - 'AC_DISABLE_STATIC' => 1, - 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, - 'LT_PATH_NM' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, - 'm4_include' => 1, + 'AM_AUTOMAKE_VERSION' => 1, '_LT_AC_LANG_F77' => 1, - '_LT_DLL_DEF_P' => 1, - '_LT_AC_LANG_CXX' => 1, - '_LT_PROG_LTMAIN' => 1, - 'AM_MISSING_HAS_RUN' => 1, + 'AC_LIBTOOL_SETUP' => 1, + 'LT_CMD_MAX_LEN' => 1, + 'AC_LTDL_OBJDIR' => 1, + 'BUILD_CONTRIB_ALL' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, 'AM_ENABLE_STATIC' => 1, - 'CB_GCC_VERSION' => 1, - 'm4_pattern_allow' => 1, - 'AM_DISABLE_STATIC' => 1, - 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, - 'AC_PROG_LD' => 1, + 'WX_STANDARD_OPTIONS' => 1, + 'PKG_CHECK_EXISTS' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, + 'AC_ENABLE_STATIC' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + '_LT_PROG_FC' => 1, + '_AX_BOOST_BASE_RUNDETECT' => 1, + 'AC_DISABLE_SHARED' => 1, + '_PKG_SHORT_ERRORS_SUPPORTED' => 1, + 'AC_PROG_LD_GNU' => 1, + '_LT_AC_SHELL_INIT' => 1, + 'AC_ENABLE_SHARED' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AM_PROG_INSTALL_SH' => 1, + 'LTSUGAR_VERSION' => 1, '_AM_AUTOCONF_VERSION' => 1, + 'CODEBLOCKS_ENABLE_SETTINGS' => 1, + 'AU_DEFUN' => 1, + '_LT_AC_LANG_CXX' => 1, + 'LT_PATH_NM' => 1, + '_LT_AC_PROG_CXXCPP' => 1, + 'AC_PROG_LD' => 1, + 'AC_LIBTOOL_LANG_C_CONFIG' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, + 'AM_DISABLE_SHARED' => 1, + 'AC_LTDL_PREOPEN' => 1, 'WXRC_CHECK' => 1, - 'WX_STANDARD_OPTIONS_SUMMARY_MSG' => 1, - 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, - 'LT_AC_PROG_EGREP' => 1, - 'LT_CMD_MAX_LEN' => 1, - 'AM_PROG_LIBTOOL' => 1, - '_LT_AC_LANG_GCJ_CONFIG' => 1, - '_AM_PROG_CC_C_O' => 1, - 'WX_CONFIG_CHECK' => 1, - 'PKG_CHECK_MODULES' => 1, - 'AC_LIBTOOL_SETUP' => 1, - '_LT_PATH_TOOL_PREFIX' => 1, - 'WX_STANDARD_OPTIONS_SUMMARY_MSG_END' => 1, - 'AM_PROG_CC_C_O' => 1, - '_LT_PROG_CXX' => 1, - 'WX_BOOLOPT_SUMMARY' => 1, - 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, + 'AC_PROG_EGREP' => 1, + '_LT_AC_LOCK' => 1, + '_m4_warn' => 1, + 'AM_SUBST_NOTMAKE' => 1, + 'AC_LIBTOOL_F77' => 1, + 'AC_LIBTOOL_FC' => 1, + 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AX_CXX_COMPILE_STDCXX' => 1, + '_AM_SET_OPTION' => 1, + '_LT_PROG_LTMAIN' => 1, 'PKG_CHECK_VAR' => 1, - 'AC_DEFUN_ONCE' => 1, - 'AX_BOOST_SYSTEM' => 1, + 'LT_PATH_LD' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'LT_INIT' => 1, + 'CODEBLOCKS_GET_PLATFORM' => 1, + 'AM_SET_DEPDIR' => 1, + 'WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'CODEBLOCKS_CHECK_DEBUG' => 1, + 'AC_LIBTOOL_WIN32_DLL' => 1, 'AC_PROG_NM' => 1, - 'AC_ENABLE_FAST_INSTALL' => 1, 'AC_LIBTOOL_GCJ' => 1, - '_LT_PREPARE_SED_QUOTE_VARS' => 1, - 'm4_pattern_forbid' => 1, - 'LT_SUPPORTED_TAG' => 1, - '_LT_WITH_SYSROOT' => 1, - 'AC_PATH_TOOL_PREFIX' => 1, - 'PKG_CHECK_EXISTS' => 1, - 'BUILD_CONTRIB_NONE' => 1, - '_AM_PROG_TAR' => 1, - '_LT_AC_PROG_CXXCPP' => 1, - 'include' => 1, - 'LTOBSOLETE_VERSION' => 1, - 'LTVERSION_VERSION' => 1, - 'AC_DEPLIBS_CHECK_METHOD' => 1, - 'AX_BOOST_BASE' => 1, - 'LT_AC_PROG_SED' => 1, - '_LT_AC_TAGVAR' => 1, - 'AM_PROG_NM' => 1, - 'AC_LIBTOOL_COMPILER_OPTION' => 1, - 'AM_SUBST_NOTMAKE' => 1, - 'LT_INIT' => 1, - '_AX_BOOST_BASE_TONUMERICVERSION' => 1, - '_LT_AC_LANG_C_CONFIG' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'AX_CXX_COMPILE_STDCXX' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, - 'LT_PATH_LD' => 1 + 'LT_AC_PROG_GCJ' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -271,198 +271,198 @@ 'configure.ac' ], { - 'LT_OUTPUT' => 1, - 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, - '_AM_SET_OPTION' => 1, - '_LT_REQUIRED_DARWIN_CHECKS' => 1, - 'CODEBLOCKS_GET_PLATFORM' => 1, - '_LT_LINKER_BOILERPLATE' => 1, + '_LT_COMPILER_OPTION' => 1, + '_LT_PATH_TOOL_PREFIX' => 1, + 'BUILD_CONTRIB_NONE' => 1, + '_LT_AC_LANG_GCJ' => 1, + 'AC_PATH_MAGIC' => 1, + 'PKG_INSTALLDIR' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + 'AM_MISSING_HAS_RUN' => 1, + 'WX_CONFIG_OPTIONS' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'AC_ENABLE_FAST_INSTALL' => 1, + 'LT_PROG_GCJ' => 1, + '_LT_AC_TRY_DLOPEN_SELF' => 1, + 'AC_LIBTOOL_LINKER_OPTION' => 1, + 'LT_SUPPORTED_TAG' => 1, + 'AM_SET_LEADING_DOT' => 1, + 'WX_CONFIG_CHECK' => 1, + 'AM_AUX_DIR_EXPAND' => 1, + '_LT_DLL_DEF_P' => 1, + 'AC_LIBTOOL_RC' => 1, + 'm4_include' => 1, + 'AX_BOOST_BASE' => 1, + 'WX_LIKE_LIBNAME' => 1, + 'CODEBLOCKS_SETUP_FOR_TARGET' => 1, + 'AC_LIBTOOL_CONFIG' => 1, + 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + '_WX_SELECTEDCONFIG_CHECKFOR' => 1, + '_LT_AC_LANG_C_CONFIG' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, + '_LT_PROG_F77' => 1, '_WX_PRIVATE_CHECK_VERSION' => 1, - 'AC_CHECK_LIBM' => 1, - 'AM_ENABLE_SHARED' => 1, - 'AC_LTDL_ENABLE_INSTALL' => 1, - '_LT_AC_SHELL_INIT' => 1, + 'AM_MAKE_INCLUDE' => 1, + 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + 'LT_PROG_GO' => 1, + 'WX_STANDARD_OPTIONS_SUMMARY_MSG' => 1, '_LT_CC_BASENAME' => 1, - 'AC_LTDL_PREOPEN' => 1, - '_AM_DEPENDENCIES' => 1, - 'AC_DISABLE_SHARED' => 1, - '_LT_PROG_FC' => 1, - 'AC_DISABLE_FAST_INSTALL' => 1, - 'CODEBLOCKS_CHECK_LINK_FLAG' => 1, + 'AM_OPTIONS_WXCONFIG' => 1, + 'm4_pattern_allow' => 1, + 'LTOBSOLETE_VERSION' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, + 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'AC_PROG_LD_RELOAD_FLAG' => 1, + '_LT_AC_CHECK_DLFCN' => 1, + '_LT_LINKER_OPTION' => 1, '_AM_SET_OPTIONS' => 1, - 'AC_LIBTOOL_PROG_CC_C_O' => 1, - 'AC_LIBTOOL_PICMODE' => 1, - 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - '_m4_warn' => 1, - 'AC_PROG_EGREP' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, - 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, - 'PKG_CHECK_MODULES_STATIC' => 1, - 'AC_PATH_MAGIC' => 1, - '_AX_BOOST_BASE_RUNDETECT' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'WX_ARG_WITH_YESNOAUTO' => 1, - 'LT_AC_PROG_GCJ' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AM_MAKE_INCLUDE' => 1, - '_LT_PROG_F77' => 1, 'LT_LANG' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AC_ENABLE_SHARED' => 1, - '_LT_AC_CHECK_DLFCN' => 1, - 'AM_SET_DEPDIR' => 1, - 'WX_ARG_ENABLE_YESNOAUTO' => 1, + '_AM_PROG_CC_C_O' => 1, + '_AM_DEPENDENCIES' => 1, + '_LT_LINKER_BOILERPLATE' => 1, + '_LT_AC_LANG_F77_CONFIG' => 1, + 'LT_SYS_DLOPEN_SELF' => 1, + '_AM_SUBST_NOTMAKE' => 1, + 'LTVERSION_VERSION' => 1, + 'WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS' => 1, + 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, + '_LT_AC_LANG_RC_CONFIG' => 1, + 'AM_PROG_CC_C_O' => 1, + 'PKG_PROG_PKG_CONFIG' => 1, + 'AM_SILENT_RULES' => 1, + 'AC_CHECK_LIBM' => 1, + '_LT_AC_TAGVAR' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, + 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'PKG_NOARCH_INSTALLDIR' => 1, - 'AC_LIBTOOL_FC' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, - 'CODEBLOCKS_ENABLE_SETTINGS' => 1, + 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, + 'WX_DETECT_STANDARD_OPTION_VALUES' => 1, + '_LT_WITH_SYSROOT' => 1, + 'AC_DEFUN_ONCE' => 1, 'AM_PROG_LD' => 1, - '_AM_MANGLE_OPTION' => 1, - 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, - 'LTOPTIONS_VERSION' => 1, - 'AC_LIBTOOL_CONFIG' => 1, - 'WX_LIKE_LIBNAME' => 1, - 'AC_LIBTOOL_CXX' => 1, - '_LT_AC_LANG_CXX_CONFIG' => 1, + 'AX_BOOST_SYSTEM' => 1, + 'CODEBLOCKS_CHECK_LINK_FLAG' => 1, + 'AM_CONDITIONAL' => 1, + '_AM_IF_OPTION' => 1, + 'AM_ENABLE_SHARED' => 1, + 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, + 'AM_RUN_LOG' => 1, + 'AM_PROG_NM' => 1, 'LT_LIB_M' => 1, + '_AX_BOOST_BASE_TONUMERICVERSION' => 1, + '_LT_PROG_CXX' => 1, 'AM_PATH_WXRC' => 1, + 'LT_AC_PROG_SED' => 1, + 'CB_GCC_VERSION' => 1, + 'AC_LIBTOOL_FC' => 1, + 'AX_CXX_COMPILE_STDCXX' => 1, + '_AM_SET_OPTION' => 1, + 'AC_PATH_TOOL_PREFIX' => 1, + 'AC_LIBTOOL_PICMODE' => 1, + 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, + 'AC_PROG_EGREP' => 1, + 'WXRC_CHECK' => 1, + 'AC_LTDL_PREOPEN' => 1, 'AC_LIBTOOL_F77' => 1, - '_PKG_SHORT_ERRORS_SUPPORTED' => 1, - 'LT_PROG_GCJ' => 1, - 'AM_PROG_INSTALL_SH' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, - 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - '_LT_AC_TRY_DLOPEN_SELF' => 1, + 'AM_SUBST_NOTMAKE' => 1, + '_m4_warn' => 1, + '_LT_AC_LOCK' => 1, 'AC_LIBTOOL_WIN32_DLL' => 1, - 'WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN' => 1, - '_LT_PROG_ECHO_BACKSLASH' => 1, - '_LT_AC_LANG_RC_CONFIG' => 1, - '_WX_SELECTEDCONFIG_CHECKFOR' => 1, - 'AM_PROG_INSTALL_STRIP' => 1, - '_LT_AC_LANG_F77_CONFIG' => 1, - '_LT_LINKER_OPTION' => 1, - 'WX_STANDARD_OPTIONS' => 1, - 'PKG_INSTALLDIR' => 1, - '_LT_AC_LANG_GCJ' => 1, - '_LT_AC_PROG_ECHO_BACKSLASH' => 1, - 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, - '_LT_COMPILER_OPTION' => 1, - 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, - 'LT_PROG_RC' => 1, - 'AM_PATH_WXCONFIG' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, - '_LT_AC_SYS_COMPILER' => 1, - 'AC_LTDL_OBJDIR' => 1, - 'LTSUGAR_VERSION' => 1, - 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, - 'AC_PROG_LD_RELOAD_FLAG' => 1, - 'AM_CONDITIONAL' => 1, - 'LT_AC_PROG_RC' => 1, + 'CODEBLOCKS_CHECK_DEBUG' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'LT_AC_PROG_GCJ' => 1, + 'AC_LIBTOOL_GCJ' => 1, + 'AC_PROG_NM' => 1, + 'LT_INIT' => 1, + 'LT_PATH_LD' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + '_LT_PROG_LTMAIN' => 1, + 'PKG_CHECK_VAR' => 1, + 'AM_SET_DEPDIR' => 1, + 'WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN' => 1, + 'CODEBLOCKS_GET_PLATFORM' => 1, + '_LT_AC_SHELL_INIT' => 1, + '_PKG_SHORT_ERRORS_SUPPORTED' => 1, 'AC_PROG_LD_GNU' => 1, - 'AC_LIBTOOL_DLOPEN' => 1, - '_LT_AC_LOCK' => 1, - 'AC_LIBTOOL_LINKER_OPTION' => 1, - 'LT_PROG_GO' => 1, + 'AC_DISABLE_SHARED' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AM_PROG_INSTALL_SH' => 1, + 'LTSUGAR_VERSION' => 1, + 'AC_ENABLE_SHARED' => 1, + 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, 'AC_ENABLE_STATIC' => 1, - 'AM_ENABLE_STATIC' => 1, - 'CB_GCC_VERSION' => 1, - 'm4_pattern_allow' => 1, - 'AM_DISABLE_STATIC' => 1, - '_LT_AC_LANG_CXX' => 1, - '_LT_AC_LANG_F77' => 1, - '_LT_DLL_DEF_P' => 1, - '_LT_PROG_LTMAIN' => 1, - 'AM_MISSING_HAS_RUN' => 1, - 'AC_DISABLE_STATIC' => 1, - 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, - 'AM_RUN_LOG' => 1, - 'WX_CONFIG_OPTIONS' => 1, + '_AX_BOOST_BASE_RUNDETECT' => 1, + '_LT_PROG_FC' => 1, + 'AC_PROG_LD' => 1, + '_LT_AC_PROG_CXXCPP' => 1, 'LT_PATH_NM' => 1, - 'm4_include' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, - 'WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AU_DEFUN' => 1, + '_LT_AC_LANG_CXX' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, 'AM_DISABLE_SHARED' => 1, - 'WX_DETECT_STANDARD_OPTION_VALUES' => 1, - 'CODEBLOCKS_SETUP_FOR_TARGET' => 1, - 'AM_AUX_DIR_EXPAND' => 1, - 'AM_OPTIONS_WXCONFIG' => 1, - 'PKG_PROG_PKG_CONFIG' => 1, - 'AM_SILENT_RULES' => 1, - 'LT_SYS_DLOPEN_SELF' => 1, - 'AC_DEFUN' => 1, 'AC_LIBTOOL_LANG_C_CONFIG' => 1, - '_AM_IF_OPTION' => 1, - 'AM_DEP_TRACK' => 1, - 'AC_LIBTOOL_RC' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'BUILD_CONTRIB_ALL' => 1, - 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, - '_LT_COMPILER_BOILERPLATE' => 1, - 'AM_SANITY_CHECK' => 1, + 'CODEBLOCKS_ENABLE_SETTINGS' => 1, + '_AM_AUTOCONF_VERSION' => 1, + 'AU_DEFUN' => 1, + 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, + 'LT_AC_PROG_RC' => 1, + 'AM_PATH_WXCONFIG' => 1, + 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, '_AC_PROG_LIBTOOL' => 1, - 'CODEBLOCKS_CHECK_DEBUG' => 1, - 'AC_LIBTOOL_OBJDIR' => 1, + 'AC_DEFUN' => 1, + 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, 'AM_MISSING_PROG' => 1, - '_AX_BOOST_BASE_TONUMERICVERSION' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - 'LT_INIT' => 1, - '_LT_AC_LANG_C_CONFIG' => 1, - 'AM_SUBST_NOTMAKE' => 1, - 'AM_SET_LEADING_DOT' => 1, - 'AX_CXX_COMPILE_STDCXX' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, - 'LT_PATH_LD' => 1, - '_LT_AC_PROG_CXXCPP' => 1, - 'include' => 1, - 'LTOBSOLETE_VERSION' => 1, - 'LTVERSION_VERSION' => 1, - 'AC_DEPLIBS_CHECK_METHOD' => 1, - '_LT_AC_TAGVAR' => 1, - 'LT_AC_PROG_SED' => 1, - 'AX_BOOST_BASE' => 1, - 'AM_PROG_NM' => 1, - 'AC_LIBTOOL_COMPILER_OPTION' => 1, - 'BUILD_CONTRIB_NONE' => 1, + 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, + 'WX_ARG_ENABLE_YESNOAUTO' => 1, + '_LT_AC_LANG_CXX_CONFIG' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, + '_LT_AC_LANG_GCJ_CONFIG' => 1, '_AM_PROG_TAR' => 1, - 'm4_pattern_forbid' => 1, - 'LT_SUPPORTED_TAG' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, + 'AC_LTDL_OBJDIR' => 1, + 'BUILD_CONTRIB_ALL' => 1, + 'LT_CMD_MAX_LEN' => 1, + 'AC_LIBTOOL_DLOPEN' => 1, 'PKG_CHECK_EXISTS' => 1, - 'AC_PATH_TOOL_PREFIX' => 1, - '_LT_WITH_SYSROOT' => 1, - 'AX_BOOST_SYSTEM' => 1, - 'AC_DEFUN_ONCE' => 1, - 'PKG_CHECK_VAR' => 1, - 'AC_PROG_NM' => 1, - 'AC_ENABLE_FAST_INSTALL' => 1, - 'AC_LIBTOOL_GCJ' => 1, - '_LT_PREPARE_SED_QUOTE_VARS' => 1, - '_LT_AC_LANG_GCJ_CONFIG' => 1, - 'WX_CONFIG_CHECK' => 1, - 'PKG_CHECK_MODULES' => 1, - '_AM_PROG_CC_C_O' => 1, - '_LT_PATH_TOOL_PREFIX' => 1, + 'AM_ENABLE_STATIC' => 1, + 'WX_STANDARD_OPTIONS' => 1, + 'AC_LIBTOOL_COMPILER_OPTION' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_DEP_TRACK' => 1, 'AC_LIBTOOL_SETUP' => 1, - 'AM_PROG_CC_C_O' => 1, + '_LT_AC_LANG_F77' => 1, + 'LT_PROG_RC' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, + '_LT_AC_SYS_COMPILER' => 1, + 'AC_LIBTOOL_PROG_CC_C_O' => 1, + '_LT_AC_PROG_ECHO_BACKSLASH' => 1, + 'PKG_CHECK_MODULES' => 1, + 'AM_DISABLE_STATIC' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, 'WX_STANDARD_OPTIONS_SUMMARY_MSG_END' => 1, - '_LT_PROG_CXX' => 1, + 'AC_DEPLIBS_CHECK_METHOD' => 1, + '_LT_AC_TAGCONFIG' => 1, + 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, 'WX_BOOLOPT_SUMMARY' => 1, - 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, - 'WX_STANDARD_OPTIONS_SUMMARY_MSG' => 1, - 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, - 'LT_AC_PROG_EGREP' => 1, - 'AM_PROG_LIBTOOL' => 1, - 'LT_CMD_MAX_LEN' => 1, - 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, 'AC_CONFIG_MACRO_DIR_TRACE' => 1, - 'AC_PROG_LD' => 1, - '_AM_AUTOCONF_VERSION' => 1, - 'WXRC_CHECK' => 1 + 'include' => 1, + 'AC_LIBTOOL_CXX' => 1, + '_LT_COMPILER_BOILERPLATE' => 1, + 'AC_LTDL_ENABLE_INSTALL' => 1, + 'LT_OUTPUT' => 1, + 'AM_PROG_INSTALL_STRIP' => 1, + 'AC_DISABLE_STATIC' => 1, + '_AM_MANGLE_OPTION' => 1, + 'LT_AC_PROG_EGREP' => 1, + 'PKG_CHECK_MODULES_STATIC' => 1, + 'm4_pattern_forbid' => 1, + 'WX_ARG_WITH_YESNOAUTO' => 1, + 'LTOPTIONS_VERSION' => 1, + 'AM_SANITY_CHECK' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -477,66 +477,66 @@ 'configure.ac' ], { - 'AC_CONFIG_AUX_DIR' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'sinclude' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AC_CONFIG_HEADERS' => 1, - '_m4_warn' => 1, - 'AM_PROG_FC_C_O' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'AM_POT_TOOLS' => 1, 'AM_PROG_MOC' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - 'AM_PROG_AR' => 1, - 'AC_SUBST_TRACE' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'AM_PATH_GUILE' => 1, - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'AM_SILENT_RULES' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'AC_CANONICAL_HOST' => 1, '_AM_SUBST_NOTMAKE' => 1, - 'AM_PROG_CC_C_O' => 1, 'AM_PROG_F77_C_O' => 1, - 'AC_CONFIG_LINKS' => 1, - 'AC_CONFIG_FILES' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'AM_PROG_CXX_C_O' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + 'AC_FC_PP_SRCEXT' => 1, 'AM_PROG_LIBTOOL' => 1, - 'AM_CONDITIONAL' => 1, - 'AM_INIT_AUTOMAKE' => 1, + 'AC_SUBST' => 1, + '_AM_COND_ENDIF' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + 'AC_SUBST_TRACE' => 1, 'AC_REQUIRE_AUX_FILE' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'AC_FC_FREEFORM' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AM_PROG_MKDIR_P' => 1, + 'm4_include' => 1, + 'AM_SILENT_RULES' => 1, + 'LT_SUPPORTED_TAG' => 1, '_AM_MAKEFILE_INCLUDE' => 1, 'LT_INIT' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_PROG_CC_C_O' => 1, + 'AM_EXTRA_RECURSIVE_TARGETS' => 1, + 'LT_CONFIG_LTDL_DIR' => 1, + 'AC_LIBSOURCE' => 1, + 'AC_PROG_LIBTOOL' => 1, + 'sinclude' => 1, + 'AC_CONFIG_LIBOBJ_DIR' => 1, 'm4_pattern_allow' => 1, - 'AC_SUBST' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AH_OUTPUT' => 1, - 'm4_sinclude' => 1, - 'AC_FC_PP_SRCEXT' => 1, '_AM_COND_IF' => 1, + 'AC_CONFIG_LINKS' => 1, + 'AC_CONFIG_HEADERS' => 1, + '_m4_warn' => 1, + 'AM_MAKEFILE_INCLUDE' => 1, + 'AM_PROG_FC_C_O' => 1, '_AM_COND_ELSE' => 1, - 'include' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AM_NLS' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_LIBSOURCE' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AH_OUTPUT' => 1, + 'AC_FC_PP_DEFINE' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AC_FC_FREEFORM' => 1, + 'AM_PROG_CXX_C_O' => 1, + 'm4_pattern_forbid' => 1, + 'AC_CONFIG_FILES' => 1, + 'AC_CANONICAL_TARGET' => 1, + 'm4_sinclude' => 1, 'AC_FC_SRCEXT' => 1, - 'AM_POT_TOOLS' => 1, - '_AM_COND_ENDIF' => 1, - 'm4_include' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AM_PATH_GUILE' => 1, 'AC_INIT' => 1, - 'AC_CANONICAL_TARGET' => 1, - 'm4_pattern_forbid' => 1, - 'AC_FC_PP_DEFINE' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'LT_SUPPORTED_TAG' => 1 + 'AM_GNU_GETTEXT' => 1, + 'AC_CANONICAL_BUILD' => 1, + 'AM_PROG_MKDIR_P' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AM_CONDITIONAL' => 1, + 'include' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AM_PROG_AR' => 1, + '_LT_AC_TAGCONFIG' => 1, + 'AC_CONFIG_AUX_DIR' => 1, + 'AM_NLS' => 1 } ], 'Autom4te::Request' ) ); diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/traces.2 codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/traces.2 --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/autom4te.cache/traces.2 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/autom4te.cache/traces.2 2018-01-15 20:57:12.000000000 +0000 @@ -4,7 +4,7 @@ m4trace:aclocal.m4:2359: -1- m4_include([m4/ltversion.m4]) m4trace:aclocal.m4:2360: -1- m4_include([m4/lt~obsolete.m4]) m4trace:configure.ac:3: -1- m4_include([revision.m4]) -m4trace:configure.ac:5: -1- AC_INIT([codeblocks], [16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d]) +m4trace:configure.ac:5: -1- AC_INIT([codeblocks], [17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) @@ -3046,10 +3046,10 @@ m4trace:configure.ac:397: -1- AC_SUBST([HAVE_CXX11]) m4trace:configure.ac:397: -1- AC_SUBST_TRACE([HAVE_CXX11]) m4trace:configure.ac:397: -1- m4_pattern_allow([^HAVE_CXX11$]) -m4trace:configure.ac:405: -1- AC_SUBST([REVISION], [revision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d]) +m4trace:configure.ac:405: -1- AC_SUBST([REVISION], [revision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk]) m4trace:configure.ac:405: -1- AC_SUBST_TRACE([REVISION]) m4trace:configure.ac:405: -1- m4_pattern_allow([^REVISION$]) -m4trace:configure.ac:406: -1- AC_SUBST([DATE], ["2018-01-12 02:22:19"]) +m4trace:configure.ac:406: -1- AC_SUBST([DATE], ["2018-01-15 20:57:06"]) m4trace:configure.ac:406: -1- AC_SUBST_TRACE([DATE]) m4trace:configure.ac:406: -1- m4_pattern_allow([^DATE$]) m4trace:configure.ac:409: -1- AC_CONFIG_FILES([bundle.sh], [chmod +x bundle.sh]) diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/codeblocks.plist.in codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/codeblocks.plist.in --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/codeblocks.plist.in 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/codeblocks.plist.in 2018-01-15 20:56:41.000000000 +0000 @@ -17,15 +17,15 @@ CFBundlePackageType APPL CFBundleVersion - CodeBlocks version 16.01 + CodeBlocks version 17.12 CFBundleShortVersionString - CodeBlocks version 16.01 + CodeBlocks version 17.12 LSRequiresCarbon CFBundleGetInfoString - CodeBlocks version 16.01, (c) 2004-2017 Code::Blocks + CodeBlocks version 17.12, (c) 2004-2017 Code::Blocks CFBundleLongVersionString - CodeBlocks version 16.01 SVN revision 10701, (c) 2004-2017 Code::Blocks + CodeBlocks version 17.12 SVN revision @REVISION@, (c) 2004-2017 Code::Blocks NSHumanReadableCopyright Copyright 2004-2017, The Code::Blocks Team CFBundleIdentifier diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/codeblocks.spec.fedora.in codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/codeblocks.spec.fedora.in --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/codeblocks.spec.fedora.in 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/codeblocks.spec.fedora.in 2018-01-15 20:56:41.000000000 +0000 @@ -1,7 +1,5 @@ -%global svnrev @REVISION@ - Name: codeblocks -Version: 16.01.svn.%{svnrev} +Version: 17.12 Release: 1%{?dist} Summary: An open source, cross platform, free C++ IDE License: GPLv3+ @@ -343,6 +341,9 @@ %changelog +* Thu Dec 28 2017 Jens Lody - 17.12-1 +- New release. + * Tue Jul 19 2016 Jens Lody - 16.01.svn.10885-1 - New upstream. - Spec-file clean up. diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/codeblocks.spec.in codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/codeblocks.spec.in --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/codeblocks.spec.in 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/codeblocks.spec.in 2018-01-15 20:56:41.000000000 +0000 @@ -2,7 +2,7 @@ %define req_wxgtk 2.8.0 %define _redhat %(if [ -f /etc/redhat-release ]; then echo 1; else echo 0; fi) %define _mandrake %(if [ -f /etc/mandrake-release ]; then echo 1; else echo 0; fi) -%define _version 16.01.svn.%{_svnrev} +%define _version 17.12.svn.%{_svnrev} %define _rel 1 %define _release %{_rel} %define jobs %(if [ -e /usr/bin/getconf ]; then echo $(( `/usr/bin/getconf _NPROCESSORS_ONLN` + 1 )); else echo 1; fi) diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/configure codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/configure --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/configure 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/configure 2018-01-15 20:57:12.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d. +# Generated by GNU Autoconf 2.69 for codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='codeblocks' PACKAGE_TARNAME='codeblocks' -PACKAGE_VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' -PACKAGE_STRING='codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' +PACKAGE_VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' +PACKAGE_STRING='codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1643,7 +1643,7 @@ # 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 <<_ACEOF -\`configure' configures codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d to adapt to many kinds of systems. +\`configure' configures codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1719,7 +1719,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of codeblocks 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d:";; + short | recursive ) echo "Configuration of codeblocks 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk:";; esac cat <<\_ACEOF @@ -1926,7 +1926,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -codeblocks configure 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks configure 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2466,7 +2466,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +It was created by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3665,7 +3665,7 @@ # Define the identity of the package. PACKAGE='codeblocks' - VERSION='16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d' + VERSION='17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk' cat >>confdefs.h <<_ACEOF @@ -24771,11 +24771,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Code::Blocks..." >&5 $as_echo "$as_me: Configuring Code::Blocks..." >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&5 -$as_echo "$as_me: SVN revision 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d (2018-01-12 02:22:19)" >&6;} -REVISION=revision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&5 +$as_echo "$as_me: SVN revision 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk (2018-01-15 20:57:06)" >&6;} +REVISION=revision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk -DATE="2018-01-12 02:22:19" +DATE="2018-01-15 20:57:06" if test "x${target_vendor}" = "xapple"; then @@ -26074,7 +26074,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by codeblocks $as_me 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d, which was +This file was extended by codeblocks $as_me 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26140,7 +26140,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -codeblocks config.status 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +codeblocks config.status 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/bzr-builder.manifest codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/bzr-builder.manifest --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/bzr-builder.manifest 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/bzr-builder.manifest 2018-01-15 20:57:12.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version 16.01+p~launchpadrev9384 -lp:~codeblocks-devs/codeblocks/trunk revid:svn-v4:2a5c6006-c6dd-42ca-98ab-0921f2732cef:trunk:11261 +# bzr-builder format 0.3 deb-version 16.01+p~launchpadrev9388 +lp:~codeblocks-devs/codeblocks/trunk revid:svn-v4:2a5c6006-c6dd-42ca-98ab-0921f2732cef:trunk:11267 merge lp-package-tweaks lp:~damien-moore/+junk/codeblocks-dly-merge revid:damienlmoore@gmail.com-20160202022009-1b4fhdkww5gamaif diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/changelog codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/changelog --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/changelog 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/changelog 2018-01-15 20:57:12.000000000 +0000 @@ -1,8 +1,20 @@ -codeblocks (16.01+p~launchpadrev9384~ubuntu17.04.1) zesty; urgency=low +codeblocks (16.01+p~launchpadrev9388~ubuntu17.04.1) zesty; urgency=low * Auto build. - -- dmoore Fri, 12 Jan 2018 02:22:25 +0000 + -- dmoore Mon, 15 Jan 2018 20:57:12 +0000 + +codeblocks (17.12-1) unstable; urgency=medium + + * Try to fix cross dependencies. + + -- Jens Lody Sat, 06 Jan 2018 11:12:19 +0100 + +codeblocks (17.12) unstable; urgency=medium + + * New release + + -- Jens Lody Thu, 28 Dec 2017 12:04:37 +0100 codeblocks (16.01svn10783) unstable; urgency=low diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/get-orig-source codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/get-orig-source --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/get-orig-source 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/get-orig-source 2018-01-15 20:56:41.000000000 +0000 @@ -5,8 +5,8 @@ # It is copied from ubuntus codeblocks-package. # Some variables to make maintaining this script easier -CODEBLOCKS_VERSION="16.01-1" -CODEBLOCKS_URL_DIR="http://download.berlios.de/codeblocks" +CODEBLOCKS_VERSION="17.12-1" +CODEBLOCKS_URL_DIR="https://sourceforge.net/projects/codeblocks/files/Sources/17.12/" CODEBLOCKS_TARBALL="codeblocks_${CODEBLOCKS_VERSION}.tar.gz" CODEBLOCKS_TARBALL_CHECKSUM="4b450f620d9f1875ecf6882ab3c11402" diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/get-orig-source-from-svn codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/get-orig-source-from-svn --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/debian/get-orig-source-from-svn 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/debian/get-orig-source-from-svn 2018-01-15 20:56:41.000000000 +0000 @@ -7,16 +7,16 @@ # subversion archive. # Some variables to make maintaining this script easier -CODEBLOCKS_BASE_VERSION="16.01svn" +CODEBLOCKS_BASE_VERSION="17.12svn" CODEBLOCKS_SVN_URL="http://svn.code.sf.net/p/codeblocks/code/trunk" CODEBLOCKS_LOCAL_DIR="../codeblocks-$CODEBLOCKS_BASE_VERSION-download/codeblocks-$CODEBLOCKS_BASE_VERSION" OLD_DIR=`pwd` -USAGE='This script is used to generate the orig tarball used in building -Debian packages from codeblocks svn (HEAD). -Usage: get-orig-source-from-svn [OPTION] - - -h, --help Display this help message. +USAGE='This script is used to generate the orig tarball used in building +Debian packages from codeblocks svn (HEAD). +Usage: get-orig-source-from-svn [OPTION] + + -h, --help Display this help message. --remove-upstream-dir Remove downloaded files. ' diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/.last_revision codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/.last_revision --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/.last_revision 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/.last_revision 2018-01-15 20:57:12.000000000 +0000 @@ -1 +1 @@ -OLD_REV=revision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d +OLD_REV=revision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/README codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/README --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/README 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/README 2018-01-15 20:56:41.000000000 +0000 @@ -1,4 +1,4 @@ -This is the Code::Blocks IDE version 16.01-HEAD +This is the Code::Blocks IDE version 17.12 For license info, see the file "COPYING" For compilers info, see the file "COMPILERS" For support/feedback visit http://www.codeblocks.org diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/README.release codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/README.release --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/README.release 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/README.release 2018-01-15 20:56:41.000000000 +0000 @@ -1,14 +1,14 @@ Preparations for a release: 1.) Make a release branch in SVN, e.g. - http://svn.code.sf.net/p/codeblocks/code/branches/release-16.xx + http://svn.code.sf.net/p/codeblocks/code/branches/release-17.xx 2.) Adopt the RELEASE #define in: [C::B]\src\src\appglobals.h ...and remove the comment. 3.) Feel free to adopt or add a new logo in e.g.: - [C::B]\src\src\resources\images\splash_1601.png + [C::B]\src\src\resources\images\splash_17xx.png 4.) With repect to changes in the logo, adopt: [C::B]\src\src\splashscreen.cpp @@ -20,12 +20,15 @@ 5.) Make relevant changes in specific files, set new version number in: [C::B]\codeblocks.plist.in [C::B]\codeblocks.spec.in <- careful here: don't change the changelog + [C::B]\codeblocks.spec.fedora.in <- careful here: don't change the changelog [C::B]\README [C::B]\update_revision.sh [C::B]\debian\get-orig-source [C::B]\debian\get-orig-source-from-svn - [C::B]\src\src\build_tools\Info.plist + [C::B]\src\build_tools\Info.plist [C::B]\src\src\resources\resources.rc + [C::B]src\plugins\contrib\wxSmith\wxs.doxy + [C::B]src\sdk.doxy 6.) Create nightlies based on that branch and fix bugs in that branch (No new features!) @@ -36,4 +39,4 @@ alike. (But including logos etc. if not yet done.) 6.) After release, rename the branch to the date C::B was actually released: - branches/release-16.xx -> branches/release-16.01 + branches/release-17.xx -> branches/release-17.12 diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/revision.m4 codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/revision.m4 --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/revision.m4 2018-01-12 02:22:25.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/revision.m4 2018-01-15 20:57:12.000000000 +0000 @@ -1,3 +1,3 @@ -m4_define([SVN_REV], revision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d) -m4_define([SVN_REVISION], 16.01svnrevision-id: buildd@lgw01-amd64-018-20180112022219-z31ggx7di18lje4d) -m4_define([SVN_DATE], 2018-01-12 02:22:19) +m4_define([SVN_REV], revision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk) +m4_define([SVN_REVISION], 17.12svnrevision-id: buildd@lcy01-amd64-018-20180115205706-5tqubvdzh068q7hk) +m4_define([SVN_DATE], 2018-01-15 20:57:06) diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/build_tools/Info.plist codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/build_tools/Info.plist --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/build_tools/Info.plist 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/build_tools/Info.plist 2018-01-15 20:56:41.000000000 +0000 @@ -15,15 +15,15 @@ CFBundlePackageType APPL CFBundleVersion - CodeBlocks version 16.01 + CodeBlocks version 17.12 CFBundleShortVersionString - CodeBlocks version 16.01 + CodeBlocks version 17.12 LSRequiresCarbon CFBundleGetInfoString - CodeBlocks version 16.01, (c) 2004-2017 Code::Blocks + CodeBlocks version 17.12, (c) 2004-2017 Code::Blocks CFBundleLongVersionString - CodeBlocks version 16.01 SVN revision 10701, (c) 2004-2017 Code::Blocks + CodeBlocks version 17.12 SVN revision 11249, (c) 2004-2017 Code::Blocks NSHumanReadableCopyright Copyright 2004-2017, The Code::Blocks Team CFBundleIdentifier diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/include/cbplugin.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/include/cbplugin.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/include/cbplugin.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/include/cbplugin.h 2018-01-15 20:56:41.000000000 +0000 @@ -37,7 +37,7 @@ // this is the plugins SDK version number // it will change when the SDK interface breaks #define PLUGIN_SDK_VERSION_MAJOR 1 -#define PLUGIN_SDK_VERSION_MINOR 32 +#define PLUGIN_SDK_VERSION_MINOR 33 #define PLUGIN_SDK_VERSION_RELEASE 0 // class decls diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -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 -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/asstreamiterator.h 2018-01-15 20:56:41.000000000 +0000 @@ -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 -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASBeautifier.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASBeautifier.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASBeautifier.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASBeautifier.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // ASBeautifier.cpp -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -38,7 +38,7 @@ headerStack = nullptr; tempStacks = nullptr; - squareBracketDepthStack = nullptr; + parenDepthStack = nullptr; blockStatementStack = nullptr; parenStatementStack = nullptr; braceBlockStateStack = nullptr; @@ -106,8 +106,8 @@ tempStacks = copyTempStacks(other); - squareBracketDepthStack = new vector; - *squareBracketDepthStack = *other.squareBracketDepthStack; + parenDepthStack = new vector; + *parenDepthStack = *other.parenDepthStack; blockStatementStack = new vector; *blockStatementStack = *other.blockStatementStack; @@ -200,6 +200,7 @@ isInEnum = other.isInEnum; isInEnumTypeID = other.isInEnumTypeID; isInLet = other.isInLet; + isInTrailingReturnType = other.isInTrailingReturnType; modifierIndent = other.modifierIndent; switchIndent = other.switchIndent; caseIndent = other.caseIndent; @@ -273,7 +274,7 @@ deleteContainer(activeBeautifierStackLengthStack); deleteContainer(headerStack); deleteTempStacksContainer(tempStacks); - deleteContainer(squareBracketDepthStack); + deleteContainer(parenDepthStack); deleteContainer(blockStatementStack); deleteContainer(parenStatementStack); deleteContainer(braceBlockStateStack); @@ -312,7 +313,7 @@ initTempStacksContainer(tempStacks, new vector*>); tempStacks->emplace_back(new vector); - initContainer(squareBracketDepthStack, new vector); + initContainer(parenDepthStack, new vector); initContainer(blockStatementStack, new vector); initContainer(parenStatementStack, new vector); initContainer(braceBlockStateStack, new vector); @@ -356,6 +357,7 @@ isInHeader = false; isInTemplate = false; isInConditional = false; + isInTrailingReturnType = false; indentCount = 0; spaceIndentCount = 0; @@ -538,7 +540,7 @@ maxContinuationIndent = max; } -// retained for compatability with release 2.06 +// retained for compatibility with release 2.06 // "MaxInStatementIndent" has been changed to "MaxContinuationIndent" in 3.0 // it is referenced only by the old "MaxInStatementIndent" options void ASBeautifier::setMaxInStatementIndentLength(int max) @@ -1010,9 +1012,12 @@ if (isInDefineDefinition && !isInDefine) { isInDefineDefinition = false; - ASBeautifier* defineBeautifier = activeBeautifierStack->back(); - activeBeautifierStack->pop_back(); - delete defineBeautifier; + if (!activeBeautifierStack->empty()) + { + ASBeautifier* defineBeautifier = activeBeautifierStack->back(); + activeBeautifierStack->pop_back(); + delete defineBeautifier; + } } } if (emptyLineFill && !isInQuoteContinuation) @@ -1128,6 +1133,9 @@ if (!backslashEndsPrevLine && isInDefineDefinition && !isInDefine) { isInDefineDefinition = false; + // this could happen with invalid input + if (activeBeautifierStack->empty()) + return originalLine; ASBeautifier* defineBeautifier = activeBeautifierStack->back(); activeBeautifierStack->pop_back(); @@ -1278,6 +1286,7 @@ void ASBeautifier::registerContinuationIndent(const string& line, int i, int spaceIndentCount_, int tabIncrementIn, int minIndent, bool updateParenStack) { + assert(i >= -1); int remainingCharNum = line.length() - i; int nextNonWSChar = getNextProgramCharDistance(line, i); @@ -1298,7 +1307,11 @@ } if (updateParenStack) + { parenIndentStack->emplace_back(i + spaceIndentCount_ - runInIndentContinuation); + if (parenIndentStack->back() < 0) + parenIndentStack->back() = 0; + } int tabIncrement = tabIncrementIn; @@ -1328,7 +1341,7 @@ continuationIndentCount = continuationIndentStack->back(); // the block opener is not indented for a NonInStatementArray - if ((isNonInStatementArray && line[i] == '{') + if ((isNonInStatementArray && i >= 0 && line[i] == '{') && !isInEnum && !braceBlockStateStack->empty() && braceBlockStateStack->back()) continuationIndentCount = 0; @@ -1348,7 +1361,7 @@ if (firstChar == (size_t) i) // firstChar is ':' { size_t firstWord = line.find_first_not_of(" \t", firstChar + 1); - if (firstChar != string::npos) + if (firstWord != string::npos) { int continuationIndentCount = firstWord + spaceIndentCount + tabIncrementIn; continuationIndentStack->emplace_back(continuationIndentCount); @@ -1735,7 +1748,7 @@ int start; // start of the previous word for (start = end; start > -1; start--) { - if (!isLegalNameChar(line[start]) || line[start] == '.') + if (!isLegalNameChar(line[start])) break; } start++; @@ -1869,11 +1882,11 @@ { charNum += 7; charNum = preproc.find_first_not_of(" \t", charNum); - if (preproc.compare(charNum, 1, "(") == 0) + if (charNum != string::npos && preproc.compare(charNum, 1, "(") == 0) { ++charNum; charNum = preproc.find_first_not_of(" \t", charNum); - if (preproc.compare(charNum, 11, "__cplusplus") == 0) + if (charNum != string::npos && preproc.compare(charNum, 11, "__cplusplus") == 0) return true; } } @@ -2276,7 +2289,7 @@ if (shouldAlignMethodColon && objCColonAlignSubsequent != -1) { string convertedLine = getIndentedSpaceEquivalent(line_); - colonIndentObjCMethodAlignment = convertedLine.find(':'); + colonIndentObjCMethodAlignment = findObjCColonAlignment(convertedLine); int objCColonAlignSubsequentIndent = objCColonAlignSubsequent + indentLength; if (objCColonAlignSubsequentIndent > colonIndentObjCMethodAlignment) colonIndentObjCMethodAlignment = objCColonAlignSubsequentIndent; @@ -2310,7 +2323,7 @@ bracePosObjCMethodAlignment = convertedLine.find('['); keywordIndentObjCMethodAlignment = getObjCFollowingKeyword(convertedLine, bracePosObjCMethodAlignment); - colonIndentObjCMethodAlignment = convertedLine.find(':'); + colonIndentObjCMethodAlignment = findObjCColonAlignment(convertedLine); if (colonIndentObjCMethodAlignment >= 0) { int objCColonAlignSubsequentIndent = objCColonAlignSubsequent + indentLength; @@ -2322,7 +2335,7 @@ } else { - if (line_.find(':') != string::npos) + if (findObjCColonAlignment(line_) != -1) { if (colonIndentObjCMethodAlignment < 0) spaceIndentCount += computeObjCColonAlignment(line_, objCColonAlignSubsequent); @@ -2372,6 +2385,34 @@ } /** + * Find the first alignment colon on a line. + * Ternary operators (?) are bypassed. + */ +int ASBeautifier::findObjCColonAlignment(const string& line) const +{ + bool haveTernary = false; + for (size_t i = 0; i < line.length(); i++) + { + i = line.find_first_of(":?", i); + if (i == string::npos) + break; + + if (line[i] == '?') + { + haveTernary = true; + continue; + } + if (haveTernary) + { + haveTernary = false; + continue; + } + return i; + } + return -1; +} + +/** * Compute the spaceIndentCount necessary to align the current line colon * with the colon position in the argument. * If it cannot be aligned indentLength is returned and a new colon @@ -2379,14 +2420,17 @@ */ int ASBeautifier::computeObjCColonAlignment(const string& line, int colonAlignPosition) const { - int colonPosition = line.find(':'); + int colonPosition = findObjCColonAlignment(line); if (colonPosition < 0 || colonPosition > colonAlignPosition) return indentLength; return (colonAlignPosition - colonPosition); } /* - * Compute postition of the keyword following the method call object. + * Compute position of the keyword following the method call object. + * This is oversimplified to find unusual method calls. + * Use for now and see what happens. + * Most programmers will probably use align-method-colon anyway. */ int ASBeautifier::getObjCFollowingKeyword(const string& line, int bracePos) const { @@ -2445,6 +2489,34 @@ } /** + * Determine if an item is at a top level. + */ +bool ASBeautifier::isTopLevel() const +{ + if (headerStack->empty()) + return true; + else if (headerStack->back() == &AS_OPEN_BRACE + && headerStack->size() >= 2) + { + if ((*headerStack)[headerStack->size() - 2] == &AS_NAMESPACE + || (*headerStack)[headerStack->size() - 2] == &AS_MODULE + || (*headerStack)[headerStack->size() - 2] == &AS_CLASS + || (*headerStack)[headerStack->size() - 2] == &AS_INTERFACE + || (*headerStack)[headerStack->size() - 2] == &AS_STRUCT + || (*headerStack)[headerStack->size() - 2] == &AS_UNION) + return true; + } + else if (headerStack->back() == &AS_NAMESPACE + || headerStack->back() == &AS_MODULE + || headerStack->back() == &AS_CLASS + || headerStack->back() == &AS_INTERFACE + || headerStack->back() == &AS_STRUCT + || headerStack->back() == &AS_UNION) + return true; + return false; +} + +/** * Parse the current line to update indentCount and spaceIndentCount. */ void ASBeautifier::parseCurrentLine(const string& line) @@ -2752,7 +2824,7 @@ if (currentHeader != nullptr) registerContinuationIndent(line, i, spaceIndentCount, tabIncrementIn, minConditionalIndent, true); - else + else if (!isInObjCMethodDefinition) registerContinuationIndent(line, i, spaceIndentCount, tabIncrementIn, 0, true); } else if (ch == ')' || ch == ']') @@ -2803,6 +2875,7 @@ || prevNonSpaceCh == ')' || prevNonSpaceCh == ';' || peekNextChar(line, i) == '{' + || isInTrailingReturnType || foundPreCommandHeader || foundPreCommandMacro || isInClassHeader @@ -2829,25 +2902,7 @@ if (!isBlockOpener && !isContinuation && !isInClassInitializer && !isInEnum) { - if (headerStack->empty()) - isBlockOpener = true; - else if (headerStack->back() == &AS_OPEN_BRACE - && headerStack->size() >= 2) - { - if ((*headerStack)[headerStack->size() - 2] == &AS_NAMESPACE - || (*headerStack)[headerStack->size() - 2] == &AS_MODULE - || (*headerStack)[headerStack->size() - 2] == &AS_CLASS - || (*headerStack)[headerStack->size() - 2] == &AS_INTERFACE - || (*headerStack)[headerStack->size() - 2] == &AS_STRUCT - || (*headerStack)[headerStack->size() - 2] == &AS_UNION) - isBlockOpener = true; - } - else if (headerStack->back() == &AS_NAMESPACE - || headerStack->back() == &AS_MODULE - || headerStack->back() == &AS_CLASS - || headerStack->back() == &AS_INTERFACE - || headerStack->back() == &AS_STRUCT - || headerStack->back() == &AS_UNION) + if (isTopLevel()) isBlockOpener = true; } @@ -2917,12 +2972,13 @@ && isInIndentableStruct) (*headerStack).back() = &AS_CLASS; - squareBracketDepthStack->emplace_back(parenDepth); + // is a brace inside a paren? + parenDepthStack->emplace_back(parenDepth); blockStatementStack->push_back(isContinuation); if (!continuationIndentStack->empty()) { - // completely purge the inStatementIndentStack + // completely purge the continuationIndentStack while (!continuationIndentStack->empty()) popLastContinuationIndent(); if (isInClassInitializer || isInClassHeaderTab) @@ -2938,6 +2994,7 @@ if (g_preprocessorCppExternCBrace == 3) ++g_preprocessorCppExternCBrace; parenDepth = 0; + isInTrailingReturnType = false; isInClassHeader = false; isInClassHeaderTab = false; isInClassInitializer = false; @@ -2963,6 +3020,10 @@ { const string* newHeader = findHeader(line, i, headers); + // java can have a 'default' not in a switch + if (newHeader == &AS_DEFAULT + && peekNextChar(line, (i + (*newHeader).length() - 1)) != ':') + newHeader = nullptr; // Qt headers may be variables in C++ if (isCStyle() && (newHeader == &AS_FOREVER || newHeader == &AS_FOREACH)) @@ -2970,8 +3031,14 @@ if (line.find_first_of("=;", i) != string::npos) newHeader = nullptr; } + else if (isSharpStyle() + && (newHeader == &AS_GET || newHeader == &AS_SET)) + { + if (getNextWord(line, i + (*newHeader).length()) == "is") + newHeader = nullptr; + } else if (newHeader == &AS_USING - && ASBeautifier::peekNextChar(line, i + (*newHeader).length() - 1) != '(') + && peekNextChar(line, i + (*newHeader).length() - 1) != '(') newHeader = nullptr; if (newHeader != nullptr) @@ -2991,7 +3058,8 @@ // take care of the special case: 'else if (...)' if (newHeader == &AS_IF && lastLineHeader == &AS_ELSE) { - headerStack->pop_back(); + if (!headerStack->empty()) + headerStack->pop_back(); } // take care of 'else' @@ -3121,7 +3189,9 @@ } // newHeader != nullptr if (findHeader(line, i, preCommandHeaders) != nullptr) - foundPreCommandHeader = true; + // must be after function arguments + if (prevNonSpaceCh == ')') + foundPreCommandHeader = true; // Objective-C NSException macros are preCommandHeaders if (isCStyle() && findKeyword(line, i, AS_NS_DURING)) @@ -3164,7 +3234,7 @@ if (i == 0) indentCount += classInitializerIndents; } - else if (isCStyle() + else if ((isCStyle() || isSharpStyle()) && !isInCase && (prevNonSpaceCh == ')' || foundPreCommandHeader)) { @@ -3311,10 +3381,10 @@ if (!continuationIndentStackSizeStack->empty()) popLastContinuationIndent(); - if (!squareBracketDepthStack->empty()) + if (!parenDepthStack->empty()) { - parenDepth = squareBracketDepthStack->back(); - squareBracketDepthStack->pop_back(); + parenDepth = parenDepthStack->back(); + parenDepthStack->pop_back(); isContinuation = blockStatementStack->back(); blockStatementStack->pop_back(); @@ -3379,7 +3449,10 @@ } if (parenDepth == 0 && ch == ';') + { isContinuation = false; + isInClassInitializer = false; + } if (isInObjCMethodDefinition) { @@ -3408,7 +3481,7 @@ if (!isInTemplate && !(isCStyle() && parenDepth > 0)) { const string* newHeader = findHeader(line, i, preBlockStatements); - // handle CORBA IDL module + // CORBA IDL module if (newHeader == &AS_MODULE) { char nextChar = peekNextChar(line, i + newHeader->length() - 1); @@ -3416,7 +3489,10 @@ newHeader = nullptr; } if (newHeader != nullptr - && !(isCStyle() && newHeader == &AS_CLASS && isInEnum)) // is not 'enum class' + && !(isCStyle() && newHeader == &AS_CLASS && isInEnum) // is not 'enum class' + && !(isCStyle() && newHeader == &AS_INTERFACE // CORBA IDL interface + && (headerStack->empty() + || headerStack->back() != &AS_OPEN_BRACE))) { if (!isSharpStyle()) headerStack->emplace_back(newHeader); @@ -3481,6 +3557,11 @@ continuationIndentStack->back() = 0; } + if (isCStyle() && findKeyword(line, i, AS_AUTO) && isTopLevel()) + { + isInTrailingReturnType = true; + } + if (isCStyle()) { if (findKeyword(line, i, AS_ASM) @@ -3511,11 +3592,13 @@ // Handle Objective-C statements - if (ch == '@' && !isWhiteSpace(line[i + 1]) + if (ch == '@' + && line.length() > i + 1 + && !isWhiteSpace(line[i + 1]) && isCharPotentialHeader(line, i + 1)) { string curWord = getCurrentWord(line, i + 1); - if (curWord == AS_INTERFACE && headerStack->empty()) + if (curWord == AS_INTERFACE) { isInObjCInterface = true; string name = '@' + curWord; @@ -3550,8 +3633,10 @@ } } else if ((ch == '-' || ch == '+') - && peekNextChar(line, i) == '(' - && headerStack->empty() + && (prevNonSpaceCh == ';' || prevNonSpaceCh == '{' + || headerStack->empty() || isInObjCInterface) + && ASBase::peekNextChar(line, i) != '-' + && ASBase::peekNextChar(line, i) != '+' && line.find_first_not_of(" \t") == i) { if (isInObjCInterface) @@ -3606,7 +3691,7 @@ || foundNonAssignmentOp == &AS_LS_LS)) { // this will be true if the line begins with the operator - if (i < 2 && spaceIndentCount == 0) + if (i < foundNonAssignmentOp->length() && spaceIndentCount == 0) spaceIndentCount += 2 * indentLength; // align to the beginning column of the operator registerContinuationIndent(line, i - foundNonAssignmentOp->length(), spaceIndentCount, tabIncrementIn, 0, false); diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASEnhancer.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASEnhancer.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASEnhancer.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASEnhancer.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // ASEnhancer.cpp -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -679,7 +679,6 @@ if (line[i] == '}') { sw.switchBraceCount--; - assert(sw.switchBraceCount <= braceCount); if (sw.switchBraceCount == 0) // if end of switch statement { int lineUnindent = sw.unindentDepth; diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASFormatter.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASFormatter.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASFormatter.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASFormatter.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // ASFormatter.cpp -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -67,6 +67,10 @@ shouldBreakClosingHeaderBlocks = false; shouldBreakClosingHeaderBraces = false; shouldDeleteEmptyLines = false; + shouldBreakReturnType = false; + shouldBreakReturnTypeDecl = false; + shouldAttachReturnType = false; + shouldAttachReturnTypeDecl = false; shouldBreakElseIfs = false; shouldBreakLineAfterLogical = false; shouldAddBraces = false; @@ -172,7 +176,7 @@ currentChar = ' '; previousChar = ' '; previousCommandChar = ' '; - previousNonWSChar = ' '; + previousNonWSChar = ','; // not a potential name or operator quoteChar = '"'; preprocBlockEnd = 0; charNum = 0; @@ -184,6 +188,10 @@ previousReadyFormattedLineLength = string::npos; preprocBraceTypeStackSize = 0; spacePadNum = 0; + methodAttachCharNum = string::npos; + methodAttachLineNum = 0; + methodBreakCharNum = string::npos; + methodBreakLineNum = 0; nextLineSpacePadNum = 0; objCColonAlign = 0; templateDepth = 0; @@ -273,10 +281,12 @@ isInObjCInterface = false; isInObjCMethodDefinition = false; isInObjCReturnType = false; + isInObjCParam = false; isInObjCSelector = false; breakCurrentOneLineBlock = false; shouldRemoveNextClosingBrace = false; isInBraceRunIn = false; + returnTypeChecked = false; currentLineBeginsWithBrace = false; isPrependPostBlockEmptyLineRequested = false; isAppendPostBlockEmptyLineRequested = false; @@ -360,7 +370,7 @@ setBraceIndentVtk(true); // sets both braceIndent and braceIndentVtk setSwitchIndent(true); // avoid hanging indent with case statements } - else if (formattingStyle == STYLE_BANNER) + else if (formattingStyle == STYLE_RATLIFF) { // attached braces can have hanging indents with the closing brace setBraceFormatMode(ATTACH_MODE); @@ -435,6 +445,11 @@ // don't allow add-braces and remove-braces if (shouldAddBraces || shouldAddOneLineBraces) setRemoveBracesMode(false); + // don't allow break-return-type and attach-return-type + if (shouldBreakReturnType) + shouldAttachReturnType = false; + if (shouldBreakReturnTypeDecl) + shouldAttachReturnTypeDecl = false; // don't allow indent-classes and indent-modifiers if (getClassIndent()) setModifierIndent(false); @@ -515,7 +530,7 @@ if (isInLineBreak) // is true if not the first line breakLine(); formattedLine = currentLine; - charNum = (int)currentLine.length() - 1; + charNum = (int) currentLine.length() - 1; continue; } @@ -634,7 +649,9 @@ // check if in preprocessor // ** isInPreprocessor will be automatically reset at the beginning // of a new line in getnextChar() - if (currentChar == '#') + if (currentChar == '#' + && currentLine.find_first_not_of(" \t") == (size_t) charNum + && !isBraceType(braceTypeStack->back(), SINGLE_LINE_TYPE)) { isInPreprocessor = true; // check for run-in @@ -732,6 +749,7 @@ // should braces be added if (currentChar != '{' && shouldAddBraces + && currentChar != '#' // don't add to preprocessor && (shouldBreakOneLineStatements || !isHeaderInMultiStatementLine) && isOkToBreakBlock(braceTypeStack->back())) { @@ -882,6 +900,58 @@ checkIfTemplateOpener(); } + // Check for break return type + if ((size_t) charNum >= methodBreakCharNum && methodBreakLineNum == 0) + { + if ((size_t) charNum == methodBreakCharNum) + isInLineBreak = true; + methodBreakCharNum = string::npos; + methodBreakLineNum = 0; + } + // Check for attach return type + if ((size_t) charNum >= methodAttachCharNum && methodAttachLineNum == 0) + { + if ((size_t) charNum == methodAttachCharNum) + { + int pa = pointerAlignment; + int ra = referenceAlignment; + int itemAlignment = (previousNonWSChar == '*' || previousNonWSChar == '^') + ? pa : ((ra == REF_SAME_AS_PTR) ? pa : ra); + isInLineBreak = false; + if (previousNonWSChar == '*' || previousNonWSChar == '&' || previousNonWSChar == '^') + { + if (itemAlignment == REF_ALIGN_TYPE) + { + if (formattedLine.length() > 0 + && !isWhiteSpace(formattedLine[formattedLine.length() - 1])) + formattedLine.append(1, ' '); + } + else if (itemAlignment == REF_ALIGN_MIDDLE) + { + if (formattedLine.length() > 0 + && !isWhiteSpace(formattedLine[formattedLine.length() - 1])) + formattedLine.append(1, ' '); + } + else if (itemAlignment == REF_ALIGN_NAME) + { + if (formattedLine.length() > 0 + && isWhiteSpace(formattedLine[formattedLine.length() - 1])) + formattedLine.erase(formattedLine.length() - 1); + } + else + { + if (formattedLine.length() > 1 + && !isWhiteSpace(formattedLine[formattedLine.length() - 2])) + formattedLine.append(1, ' '); + } + } + else + formattedLine.append(1, ' '); + } + methodAttachCharNum = string::npos; + methodAttachLineNum = 0; + } + // handle parens if (currentChar == '(' || currentChar == '[' || (isInTemplate && currentChar == '<')) { @@ -959,13 +1029,21 @@ foundTrailingReturnType = false; isInPotentialCalculation = false; isInObjCMethodDefinition = false; + isImmediatelyPostObjCMethodPrefix = false; isInObjCInterface = false; isInEnum = false; isJavaStaticConstructor = false; isCharImmediatelyPostNonInStmt = false; needHeaderOpeningBrace = false; shouldKeepLineUnbroken = false; + returnTypeChecked = false; objCColonAlign = 0; + //assert(methodBreakCharNum == string::npos); // comment out + //assert(methodBreakLineNum == 0); // comment out + methodBreakCharNum = string::npos; + methodBreakLineNum = 0; + methodAttachCharNum = string::npos; + methodAttachLineNum = 0; isPreviousBraceBlockRelated = !isBraceType(newBraceType, ARRAY_TYPE); braceTypeStack->emplace_back(newBraceType); @@ -1122,6 +1200,14 @@ // reset block handling flags isImmediatelyPostEmptyBlock = false; + // Objective-C method prefix with no return type + if (isImmediatelyPostObjCMethodPrefix && currentChar != '(') + { + if (shouldPadMethodPrefix || shouldUnPadMethodPrefix) + padObjCMethodPrefix(); + isImmediatelyPostObjCMethodPrefix = false; + } + // look for headers bool isPotentialHeader = isCharPotentialHeader(currentLine, charNum); @@ -1132,6 +1218,11 @@ newHeader = findHeader(headers); + // java can have a 'default' not in a switch + if (newHeader == &AS_DEFAULT + && ASBeautifier::peekNextChar( + currentLine, charNum + (*newHeader).length() - 1) != ':') + newHeader = nullptr; // Qt headers may be variables in C++ if (isCStyle() && (newHeader == &AS_FOREVER || newHeader == &AS_FOREACH)) @@ -1311,7 +1402,7 @@ foundClassHeader = true; if (newHeader == &AS_STRUCT) foundStructHeader = true; - if (newHeader == &AS_INTERFACE) + if (newHeader == &AS_INTERFACE && !foundNamespaceHeader && !foundClassHeader) foundInterfaceHeader = true; foundPreDefinitionHeader = true; appendSequence(*newHeader); @@ -1321,7 +1412,7 @@ } else if ((newHeader = findHeader(preCommandHeaders)) != nullptr) { - // a 'const' variable is not a preCommandHeader + // must be after function arguments if (previousNonWSChar == ')') foundPreCommandHeader = true; } @@ -1354,6 +1445,12 @@ if (currentChar == ';') { squareBracketCount = 0; + //assert(methodBreakCharNum == string::npos); // comment out + //assert(methodBreakLineNum == 0); // comment out + methodBreakCharNum = string::npos; + methodBreakLineNum = 0; + methodAttachCharNum = string::npos; + methodAttachLineNum = 0; if (((shouldBreakOneLineStatements || isBraceType(braceTypeStack->back(), SINGLE_LINE_TYPE)) @@ -1384,6 +1481,7 @@ if (currentChar != ';' || (needHeaderOpeningBrace && parenStack->back() == 0)) currentHeader = nullptr; + resetEndOfStatement(); } @@ -1404,7 +1502,7 @@ && !foundPreDefinitionHeader // not in a definition block && previousCommandChar != ')' // not after closing paren of a method header && !foundPreCommandHeader // not after a 'noexcept' - && squareBracketCount == 0 // not in objC method call + && squareBracketCount == 0 // not in objC method call && !isInObjCMethodDefinition // not objC '-' or '+' method && !isInObjCInterface // not objC @interface && !isInObjCSelector // not objC @selector @@ -1418,10 +1516,15 @@ } if (isCStyle() - && shouldPadMethodColon && (squareBracketCount > 0 || isInObjCMethodDefinition || isInObjCSelector) && !foundQuestionMark) // not in a ?: sequence - padObjCMethodColon(); + { + isImmediatelyPostObjCMethodPrefix = false; + isInObjCReturnType = false; + isInObjCParam = true; + if (shouldPadMethodColon) + padObjCMethodColon(); + } if (isInObjCInterface) { @@ -1449,8 +1552,8 @@ if (findKeyword(currentLine, charNum, AS_RETURN)) { - isInPotentialCalculation = true; // return is the same as an = sign - isImmediatelyPostReturn = true; + isInPotentialCalculation = true; + isImmediatelyPostReturn = true; // return is the same as an = sign } if (findKeyword(currentLine, charNum, AS_OPERATOR)) @@ -1476,10 +1579,31 @@ if (isCStyle() && findKeyword(currentLine, charNum, AS_AUTO) && (isBraceType(braceTypeStack->back(), NULL_TYPE) - || isBraceType(braceTypeStack->back(), NAMESPACE_TYPE) - || isBraceType(braceTypeStack->back(), CLASS_TYPE))) + || isBraceType(braceTypeStack->back(), DEFINITION_TYPE))) foundTrailingReturnType = true; + // check for break/attach return type + if (shouldBreakReturnType || shouldBreakReturnTypeDecl + || shouldAttachReturnType || shouldAttachReturnTypeDecl) + { + if ((isBraceType(braceTypeStack->back(), NULL_TYPE) + || isBraceType(braceTypeStack->back(), DEFINITION_TYPE)) + && !returnTypeChecked + && !foundNamespaceHeader + && !foundClassHeader + && !isInObjCMethodDefinition + // bypass objective-C and java @ character + && charNum == (int) currentLine.find_first_not_of(" \t") + && !(isCStyle() && isCharPotentialHeader(currentLine, charNum) + && (findKeyword(currentLine, charNum, AS_PUBLIC) + || findKeyword(currentLine, charNum, AS_PRIVATE) + || findKeyword(currentLine, charNum, AS_PROTECTED)))) + { + findReturnTypeSplitPoint(currentLine); + returnTypeChecked = true; + } + } + // Objective-C NSException macros are preCommandHeaders if (isCStyle() && findKeyword(currentLine, charNum, AS_NS_DURING)) foundPreCommandMacro = true; @@ -1555,6 +1679,9 @@ // determine if this is an Objective-C statement if (currentChar == '@' + && isCStyle() + && (int) currentLine.length() > charNum + 1 + && !isWhiteSpace(currentLine[charNum + 1]) && isCharPotentialHeader(currentLine, charNum + 1) && findKeyword(currentLine, charNum + 1, AS_INTERFACE) && isBraceType(braceTypeStack->back(), NULL_TYPE)) @@ -1566,6 +1693,9 @@ continue; } else if (currentChar == '@' + && isCStyle() + && (int) currentLine.length() > charNum + 1 + && !isWhiteSpace(currentLine[charNum + 1]) && isCharPotentialHeader(currentLine, charNum + 1) && findKeyword(currentLine, charNum + 1, AS_SELECTOR)) { @@ -1576,13 +1706,16 @@ continue; } else if ((currentChar == '-' || currentChar == '+') + && isCStyle() && (int) currentLine.find_first_not_of(" \t") == charNum - && peekNextChar() == '(' - && isBraceType(braceTypeStack->back(), NULL_TYPE) - && !isInPotentialCalculation) + && !isInPotentialCalculation + && !isInObjCMethodDefinition + && (isBraceType(braceTypeStack->back(), NULL_TYPE) + || (isBraceType(braceTypeStack->back(), EXTERN_TYPE)))) { isInObjCMethodDefinition = true; isImmediatelyPostObjCMethodPrefix = true; + isInObjCParam = false; isInObjCInterface = false; if (getAlignMethodColon()) objCColonAlign = findObjCColonAlignment(); @@ -1726,7 +1859,8 @@ padObjCReturnType(); isInObjCReturnType = false; } - else if (shouldPadParamType || shouldUnPadParamType) + else if (isInObjCParam + && (shouldPadParamType || shouldUnPadParamType)) padObjCParamType(); } continue; @@ -1861,7 +1995,7 @@ shouldRemoveBraces = state; } -// retained for compatability with release 2.06 +// retained for compatibility with release 2.06 // "Brackets" have been changed to "Braces" in 3.0 // it is referenced only by the old "bracket" options void ASFormatter::setAddBracketsMode(bool state) @@ -1869,7 +2003,7 @@ setAddBracesMode(state); } -// retained for compatability with release 2.06 +// retained for compatibility with release 2.06 // "Brackets" have been changed to "Braces" in 3.0 // it is referenced only by the old "bracket" options void ASFormatter::setAddOneLineBracketsMode(bool state) @@ -1877,7 +2011,7 @@ setAddOneLineBracesMode(state); } -// retained for compatability with release 2.06 +// retained for compatibility with release 2.06 // "Brackets" have been changed to "Braces" in 3.0 // it is referenced only by the old "bracket" options void ASFormatter::setRemoveBracketsMode(bool state) @@ -1885,7 +2019,7 @@ setRemoveBracesMode(state); } -// retained for compatability with release 2.06 +// retained for compatibility with release 2.06 // "Brackets" have been changed to "Braces" in 3.0 // it is referenced only by the old "bracket" options void ASFormatter::setBreakClosingHeaderBracketsMode(bool state) @@ -1893,7 +2027,6 @@ setBreakClosingHeaderBracesMode(state); } - /** * set the brace formatting mode. * options: @@ -2276,6 +2409,26 @@ shouldDeleteEmptyLines = state; } +void ASFormatter::setBreakReturnType(bool state) +{ + shouldBreakReturnType = state; +} + +void ASFormatter::setBreakReturnTypeDecl(bool state) +{ + shouldBreakReturnTypeDecl = state; +} + +void ASFormatter::setAttachReturnType(bool state) +{ + shouldAttachReturnType = state; +} + +void ASFormatter::setAttachReturnTypeDecl(bool state) +{ + shouldAttachReturnTypeDecl = state; +} + /** * set the pointer alignment. * @@ -2490,6 +2643,11 @@ if (currentLine.length() == 0) currentLine = string(" "); // a null is inserted if this is not done + if (methodBreakLineNum > 0) + --methodBreakLineNum; + if (methodAttachLineNum > 0) + --methodAttachLineNum; + // unless reading in the first line of the file, break a new line. if (!isVirgin) isInLineBreak = true; @@ -2844,7 +3002,8 @@ || ((previousCommandChar == '{' || previousCommandChar == '}') && isPreviousBraceBlockRelated) || (isInClassInitializer - && (!isLegalNameChar(previousNonWSChar) || foundPreCommandHeader)) + && ((!isLegalNameChar(previousNonWSChar) && previousNonWSChar != '(') + || foundPreCommandHeader)) || foundTrailingReturnType || isInObjCMethodDefinition || isInObjCInterface @@ -2894,6 +3053,36 @@ return returnVal; } +bool ASFormatter::isNumericVariable(string word) const +{ + if (word == "bool" + || word == "int" + || word == "void" + || word == "char" + || word == "long" + || word == "short" + || word == "double" + || word == "float" + || (word.length() >= 4 // check end of word for _t + && word.compare(word.length() - 2, 2, "_t") == 0) +// removed release 3.1 +// || word == "Int32" +// || word == "UInt32" +// || word == "Int64" +// || word == "UInt64" + || word == "BOOL" + || word == "DWORD" + || word == "HWND" + || word == "INT" + || word == "LPSTR" + || word == "VOID" + || word == "LPVOID" + || word == "wxFontEncoding" + ) + return true; + return false; +} + /** * check if a colon is a class initializer separator * @@ -2988,18 +3177,17 @@ string nextText = peekNextText(currentLine.substr(charNum + 1)); if (nextText.length() == 0) nextText = " "; - char nextChar = nextText[0]; if (isDigit(lastWord[0]) - || isDigit(nextChar) - || nextChar == '!' - || nextChar == '~') + || isDigit(nextText[0]) + || nextText[0] == '!' + || nextText[0] == '~') return false; // check for multiply then a dereference (a * *b) + char nextChar = peekNextChar(); if (currentChar == '*' - && charNum < (int) currentLine.length() - 1 - && isWhiteSpace(currentLine[charNum + 1]) - && nextChar == '*') + && nextChar == '*' + && !isPointerToPointer(currentLine, charNum)) return false; if ((foundCastOperator && nextChar == '>') @@ -3017,6 +3205,8 @@ //check for rvalue reference if (currentChar == '&' && nextChar == '&') { + if (lastWord == AS_AUTO) + return true; if (previousNonWSChar == '>') return true; string followingText; @@ -3173,7 +3363,7 @@ return true; } - // check for reference to a pointer *& (cannot have &*) + // check for reference to a pointer *& if ((currentChar == '*' && nextChar == '&') || (previousNonWSChar == '*' && currentChar == '&')) return false; @@ -3261,6 +3451,27 @@ } /** + * Check if * * is a pointer to a pointer or a multiply then a dereference. + * + * @return true if a pointer *. + */ +bool ASFormatter::isPointerToPointer(const string& line, int currPos) const +{ + assert(line[currPos] == '*' && peekNextChar() == '*'); + if ((int) line.length() > currPos + 1 && line[currPos + 1] == '*') + return true; + size_t nextText = line.find_first_not_of(" \t", currPos + 1); + if (nextText == string::npos || line[nextText] != '*') + return false; + size_t nextText2 = line.find_first_not_of(" \t", nextText + 1); + if (nextText == string::npos) + return false; + if (line[nextText2] == ')' || line[nextText2] == '*') + return true; + return false; +} + +/** * check if the currently reached '+' or '-' character is a unary operator * this method takes for granted that the current character * is a '+' or '-'. @@ -3271,11 +3482,31 @@ { assert(currentChar == '+' || currentChar == '-'); + // does a digit follow a c-style cast + if (previousCommandChar == ')') + { + if (!isdigit(peekNextChar())) + return false; + size_t end = currentLine.rfind(')', charNum); + if (end == string::npos) + return false; + size_t lastChar = currentLine.find_last_not_of(" \t", end - 1); + if (lastChar == string::npos) + return false; + if (currentLine[lastChar] == '*') + end = lastChar; + string prevWord = getPreviousWord(currentLine, end); + if (prevWord.empty()) + return false; + if (!isNumericVariable(prevWord)) + return false; + return true; + } + return ((isCharImmediatelyPostReturn || !isLegalNameChar(previousCommandChar)) && previousCommandChar != '.' && previousCommandChar != '\"' && previousCommandChar != '\'' - && previousCommandChar != ')' && previousCommandChar != ']'); } @@ -3325,7 +3556,7 @@ char nextChar = peekNextChar(); // if this opening brace begins the line there will be no inStatement indent if (currentLineBeginsWithBrace - && charNum == (int) currentLineFirstBraceNum + && (size_t) charNum == currentLineFirstBraceNum && nextChar != '}') returnVal = true; // if an opening brace ends the line there will be no inStatement indent @@ -3378,15 +3609,11 @@ continue; } - if (ch == '\\') - { - ++i; - continue; - } - if (isInQuote_) { - if (ch == quoteChar_) + if (ch == '\\') + ++i; + else if (ch == quoteChar_) isInQuote_ = false; continue; } @@ -3521,7 +3748,8 @@ if (isCStyle() && !isInEnum && !isImmediatelyPostPreprocessor) { if (isInClassInitializer - || isLegalNameChar(previousNonWSChar)) + || isLegalNameChar(previousNonWSChar) + || previousNonWSChar == '(') return true; } return false; @@ -3610,11 +3838,12 @@ bool endOnEmptyLine /*false*/, shared_ptr streamArg /*nullptr*/) const { + assert(sourceIterator->getPeekStart() == 0 || streamArg != nullptr); // Borland may need != 0 bool isFirstLine = true; string nextLine_ = firstLine; size_t firstChar = string::npos; shared_ptr stream = streamArg; - if (stream == nullptr) // Borland may need == 0 + if (stream == nullptr) // Borland may need == 0 stream = make_shared(sourceIterator); // find the first non-blank text, bypassing all comments. @@ -3682,7 +3911,10 @@ size_t endNum = currentLine.find("*/", charNum + 2); if (endNum == string::npos) return; - if (currentLine.find_first_not_of(" \t", endNum + 2) != string::npos) + // following line comments may be a tag from AStyleWx //[[)> + size_t nextNum = currentLine.find_first_not_of(" \t", endNum + 2); + if (nextNum != string::npos + && currentLine.compare(nextNum, 2, "//") != 0) return; } @@ -3854,7 +4086,8 @@ int pa = pointerAlignment; int ra = referenceAlignment; - int itemAlignment = (currentChar == '*' || currentChar == '^') ? pa : ((ra == REF_SAME_AS_PTR) ? pa : ra); + int itemAlignment = (currentChar == '*' || currentChar == '^') + ? pa : ((ra == REF_SAME_AS_PTR) ? pa : ra); // check for ** and && int ptrLength = 1; @@ -3900,7 +4133,7 @@ } else // pointerAlignment == PTR_ALIGN_NONE { - formattedLine.append(ptrLength, currentChar); + formattedLine.append(currentLine.substr(charNum, ptrLength)); if (ptrLength > 1) goForward(ptrLength - 1); } @@ -3916,28 +4149,34 @@ // do this before bumping charNum bool isOldPRCentered = isPointerOrReferenceCentered(); - - size_t prevCh = formattedLine.find_last_not_of(" \t"); - if (prevCh == string::npos) - prevCh = 0; - if (formattedLine.length() == 0 || prevCh == formattedLine.length() - 1) - formattedLine.append(1, currentChar); - else + string sequenceToInsert(1, currentChar); + // get the sequence + if (currentChar == peekNextChar()) { - // exchange * or & with character following the type - // this may not work every time with a tab character - string charSave = formattedLine.substr(prevCh + 1, 1); - formattedLine[prevCh + 1] = currentChar; - formattedLine.append(charSave); + for (size_t i = charNum + 1; currentLine.length() > i; i++) + { + if (currentLine[i] == sequenceToInsert[0]) + { + sequenceToInsert.append(1, currentLine[i]); + goForward(1); + continue; + } + break; + } } - if (isSequenceReached("**") || isSequenceReached("&&")) + // append the seqence + string charSave; + size_t prevCh = formattedLine.find_last_not_of(" \t"); + if (prevCh < formattedLine.length()) { - if (formattedLine.length() == 1) - formattedLine.append(1, currentChar); - else - formattedLine.insert(prevCh + 2, 1, currentChar); - goForward(1); + charSave = formattedLine.substr(prevCh + 1); + formattedLine.resize(prevCh + 1); } + formattedLine.append(sequenceToInsert); + if (peekNextChar() != ')') + formattedLine.append(charSave); + else + spacePadNum -= charSave.length(); // if no space after then add one if (charNum < (int) currentLine.length() - 1 && !isWhiteSpace(currentLine[charNum + 1]) @@ -3951,7 +4190,7 @@ spacePadNum--; } // update the formattedLine split point - if (maxCodeLength != string::npos) + if (maxCodeLength != string::npos && formattedLine.length() > 0) { size_t index = formattedLine.length() - 1; if (isWhiteSpace(formattedLine[index])) @@ -3977,15 +4216,18 @@ else wsBefore = charNum - wsBefore - 1; string sequenceToInsert(1, currentChar); - if (isSequenceReached("**")) - { - sequenceToInsert = "**"; - goForward(1); - } - else if (isSequenceReached("&&")) + if (currentChar == peekNextChar()) { - sequenceToInsert = "&&"; - goForward(1); + for (size_t i = charNum + 1; currentLine.length() > i; i++) + { + if (currentLine[i] == sequenceToInsert[0]) + { + sequenceToInsert.append(1, currentLine[i]); + goForward(1); + continue; + } + break; + } } // if reference to a pointer check for conflicting alignment else if (currentChar == '*' && peekNextChar() == '&' @@ -4057,7 +4299,10 @@ // insert the pointer or reference char size_t padAfter = (wsBefore + wsAfter) / 2; size_t index = formattedLine.length() - padAfter; - formattedLine.insert(index, sequenceToInsert); + if (index < formattedLine.length()) + formattedLine.insert(index, sequenceToInsert); + else + formattedLine.append(sequenceToInsert); } else // formattedLine.length() == 0 { @@ -4095,15 +4340,18 @@ if (startNum == string::npos) startNum = 0; string sequenceToInsert(1, currentChar); - if (isSequenceReached("**")) + if (currentChar == peekNextChar()) { - sequenceToInsert = "**"; - goForward(1); - } - else if (isSequenceReached("&&")) - { - sequenceToInsert = "&&"; - goForward(1); + for (size_t i = charNum + 1; currentLine.length() > i; i++) + { + if (currentLine[i] == sequenceToInsert[0]) + { + sequenceToInsert.append(1, currentLine[i]); + goForward(1); + continue; + } + break; + } } // if reference to a pointer align both to name else if (currentChar == '*' && peekNextChar() == '&') @@ -4116,7 +4364,7 @@ char peekedChar = peekNextChar(); bool isAfterScopeResolution = previousNonWSChar == ':'; // check for :: // if this is not the last thing on the line - if (!isBeforeAnyComment() + if ((isLegalNameChar(peekedChar) || peekedChar == '(' || peekedChar == '[' || peekedChar == '=') && (int) currentLine.find_first_not_of(" \t", charNum + 1) > charNum) { // goForward() to convert tabs to spaces, if necessary, @@ -4128,13 +4376,13 @@ if (shouldPadParensOutside && peekedChar == '(' && !isOldPRCentered) { // empty parens don't count - size_t start = currentLine.find_first_not_of("( \t", charNum + 1); + size_t start = currentLine.find_first_not_of("( \t", i); if (start != string::npos && currentLine[start] != ')') break; } goForward(1); if (formattedLine.length() > 0) - formattedLine.append(1, currentLine[i]); + formattedLine.append(1, currentLine[charNum]); else spacePadNum--; } @@ -4159,6 +4407,7 @@ if (isOldPRCentered && formattedLine.length() > startNum + 1 && isWhiteSpace(formattedLine[startNum + 1]) + && peekedChar != '*' // check for '* *' && !isBeforeAnyComment()) { formattedLine.erase(startNum + 1, 1); @@ -4207,7 +4456,8 @@ int pa = pointerAlignment; int ra = referenceAlignment; - int itemAlignment = (currentChar == '*' || currentChar == '^') ? pa : ((ra == REF_SAME_AS_PTR) ? pa : ra); + int itemAlignment = (currentChar == '*' || currentChar == '^') + ? pa : ((ra == REF_SAME_AS_PTR) ? pa : ra); string sequenceToInsert(1, currentChar); if (isSequenceReached("**") || isSequenceReached("&&")) @@ -4226,9 +4476,19 @@ if (prevNum != string::npos) { prevCh = formattedLine[prevNum]; - if (prevNum + 1 < formattedLine.length() - && isWhiteSpace(formattedLine[prevNum + 1]) - && prevCh != '(') + if (itemAlignment == PTR_ALIGN_TYPE && currentChar == '*' && prevCh == '*') + { + // '* *' may be a multiply followed by a dereference + if (prevNum + 2 < formattedLine.length() + && isWhiteSpace(formattedLine[prevNum + 2])) + { + spacePadNum -= (formattedLine.length() - 2 - prevNum); + formattedLine.erase(prevNum + 2); + } + } + else if (prevNum + 1 < formattedLine.length() + && isWhiteSpace(formattedLine[prevNum + 1]) + && prevCh != '(') { spacePadNum -= (formattedLine.length() - 1 - prevNum); formattedLine.erase(prevNum + 1); @@ -4292,43 +4552,19 @@ && isCharPotentialHeader(prevWord, 0)) prevWordH = ASBase::findHeader(prevWord, 0, headers); if (prevWordH != nullptr) - prevIsParenHeader = true; - else if (prevWord == AS_RETURN) // don't unpad - prevIsParenHeader = true; + prevIsParenHeader = true; // don't unpad + else if (prevWord == AS_RETURN) + prevIsParenHeader = true; // don't unpad else if ((prevWord == AS_NEW || prevWord == AS_DELETE) - && shouldPadHeader) // don't unpad - prevIsParenHeader = true; - else if (isCStyle() && prevWord == AS_THROW && shouldPadHeader) // don't unpad - prevIsParenHeader = true; - else if (prevWord == "and" || prevWord == "or" || prevWord == "in") // don't unpad - prevIsParenHeader = true; + && shouldPadHeader) + prevIsParenHeader = true; // don't unpad + else if (isCStyle() && prevWord == AS_THROW && shouldPadHeader) + prevIsParenHeader = true; // don't unpad + else if (prevWord == "and" || prevWord == "or" || prevWord == "in") + prevIsParenHeader = true; // don't unpad // don't unpad variables - else if (prevWord == "bool" - || prevWord == "int" - || prevWord == "void" - || prevWord == "void*" - || prevWord == "char" - || prevWord == "char*" - || prevWord == "long" - || prevWord == "double" - || prevWord == "float" - || (prevWord.length() >= 4 // check end of word for _t - && prevWord.compare(prevWord.length() - 2, 2, "_t") == 0) - || prevWord == "Int32" - || prevWord == "UInt32" - || prevWord == "Int64" - || prevWord == "UInt64" - || prevWord == "BOOL" - || prevWord == "DWORD" - || prevWord == "HWND" - || prevWord == "INT" - || prevWord == "LPSTR" - || prevWord == "VOID" - || prevWord == "LPVOID" - ) - { - prevIsParenHeader = true; - } + else if (isNumericVariable(prevWord)) + prevIsParenHeader = true; // don't unpad } } // do not unpad operators, but leave them if already padded @@ -4455,22 +4691,23 @@ } /** -* add or remove space padding to objective-c parens +* add or remove space padding to objective-c method prefix (- or +) +* if this is a '(' it begins a return type * these options have precedence over the padParens methods * the padParens method has already been called, this method adjusts */ void ASFormatter::padObjCMethodPrefix() { - assert(currentChar == '(' && isImmediatelyPostObjCMethodPrefix); + assert(isInObjCMethodDefinition && isImmediatelyPostObjCMethodPrefix); assert(shouldPadMethodPrefix || shouldUnPadMethodPrefix); size_t prefix = formattedLine.find_first_of("+-"); if (prefix == string::npos) return; - size_t paren = formattedLine.find_first_of('('); - if (paren == string::npos) - return; - int spaces = paren - prefix - 1; + size_t firstChar = formattedLine.find_first_not_of(" \t", prefix + 1); + if (firstChar == string::npos) + firstChar = formattedLine.length(); + int spaces = firstChar - prefix - 1; if (shouldPadMethodPrefix) { @@ -4482,6 +4719,7 @@ else if (spaces > 1) { formattedLine.erase(prefix + 1, spaces - 1); + formattedLine[prefix + 1] = ' '; // convert any tab to space spacePadNum -= spaces - 1; } } @@ -4526,6 +4764,7 @@ { // do not use goForward here currentLine.erase(charNum + 1, spaces - 1); + currentLine[charNum + 1] = ' '; // convert any tab to space spacePadNum -= spaces - 1; } } @@ -4535,16 +4774,13 @@ // this will already be padded if pad-paren is used if (formattedLine[formattedLine.length() - 1] == ' ') { - spacePadNum -= formattedLine.length() - 1 - nextText; int lastText = formattedLine.find_last_not_of(" \t"); + spacePadNum -= formattedLine.length() - lastText - 1; formattedLine.resize(lastText + 1); } - if (spaces > 0) - { - // do not use goForward here - currentLine.erase(charNum + 1, spaces); - spacePadNum -= spaces; - } + // do not use goForward here + currentLine.erase(charNum + 1, spaces); + spacePadNum -= spaces; } } @@ -4581,6 +4817,7 @@ if (spaces > 1) { formattedLine.erase(prevText + 1, spaces - 1); + formattedLine[prevText + 1] = ' '; // convert any tab to space spacePadNum -= spaces - 1; } } @@ -4618,6 +4855,7 @@ { // do not use goForward here currentLine.erase(charNum + 1, spaces - 1); + currentLine[charNum + 1] = ' '; // convert any tab to space spacePadNum -= spaces - 1; } } @@ -4660,7 +4898,7 @@ if (breakBrace) { - if (isBeforeAnyComment() && isOkToBreakBlock(braceType)) + if (isBeforeAnyComment() && isOkToBreakBlock(braceType) && sourceIterator->hasMoreLines()) { // if comment is at line end leave the comment on this line if (isBeforeAnyLineEndComment(charNum) && !currentLineBeginsWithBrace) @@ -4756,7 +4994,7 @@ } else { - if (currentLineBeginsWithBrace && charNum == (int) currentLineFirstBraceNum) + if (currentLineBeginsWithBrace && (size_t) charNum == currentLineFirstBraceNum) { appendSpacePad(); appendCurrentChar(false); // attach @@ -4923,7 +5161,7 @@ testForTimeToSplitFormattedLine(); // line length will have changed if (currentLineBeginsWithBrace - && (int) currentLineFirstBraceNum == charNum) + && currentLineFirstBraceNum == (size_t) charNum) shouldBreakLineAtNextChar = true; } else @@ -4943,7 +5181,7 @@ { if (isWhiteSpace(peekNextChar()) && !isInVirginLine) breakLine(); - else if (isBeforeAnyComment()) + else if (isBeforeAnyComment() && sourceIterator->hasMoreLines()) { // do not break unless comment is at line end if (isBeforeAnyLineEndComment(charNum) && !currentLineBeginsWithBrace) @@ -4961,7 +5199,7 @@ appendCurrentChar(); if (currentLineBeginsWithBrace - && (int) currentLineFirstBraceNum == charNum + && currentLineFirstBraceNum == (size_t) charNum && !isBraceType(braceType, SINGLE_LINE_TYPE)) shouldBreakLineAtNextChar = true; } @@ -4969,7 +5207,7 @@ { if (isWhiteSpace(peekNextChar()) && !isInVirginLine) breakLine(); - else if (isBeforeAnyComment()) + else if (isBeforeAnyComment() && sourceIterator->hasMoreLines()) { // do not break unless comment is at line end if (isBeforeAnyLineEndComment(charNum) && !currentLineBeginsWithBrace) @@ -4989,7 +5227,7 @@ else if (braceFormatMode == NONE_MODE) { if (currentLineBeginsWithBrace - && charNum == (int) currentLineFirstBraceNum) + && (size_t) charNum == currentLineFirstBraceNum) { appendCurrentChar(); // don't attach } @@ -5054,7 +5292,7 @@ // if a declaration follows an enum definition, space pad char peekedChar = peekNextChar(); - if (isLegalNameChar(peekedChar) + if ((isLegalNameChar(peekedChar) && peekedChar != '.') || peekedChar == '[') appendSpaceAfter(); } @@ -5468,7 +5706,7 @@ else if (braceFormatMode == NONE_MODE) { if (currentLineBeginsWithBrace - && (int) currentLineFirstBraceNum == charNum) + && currentLineFirstBraceNum == (size_t) charNum) breakBrace = true; } else if (braceFormatMode == BREAK_MODE || braceFormatMode == RUN_IN_MODE) @@ -6203,6 +6441,8 @@ if (nextChar != string::npos) break; } + if (!stream.hasMoreLines()) + return false; // don't remove if comments or a header follow the brace if ((nextLine_.compare(nextChar, 2, "/*") == 0) @@ -6300,6 +6540,277 @@ } /** + * Find split point for break/attach return type. + */ +void ASFormatter::findReturnTypeSplitPoint(const string& firstLine) +{ + assert((isBraceType(braceTypeStack->back(), NULL_TYPE) + || isBraceType(braceTypeStack->back(), DEFINITION_TYPE))); + assert(shouldBreakReturnType || shouldBreakReturnTypeDecl + || shouldAttachReturnType || shouldAttachReturnTypeDecl); + + bool isFirstLine = true; + bool isInComment_ = false; + bool isInQuote_ = false; + bool foundSplitPoint = false; + bool isAlreadyBroken = false; + char quoteChar_ = ' '; + char currNonWSChar = ' '; + char prevNonWSChar = ' '; + size_t parenCount = 0; + size_t squareCount = 0; + size_t angleCount = 0; + size_t breakLineNum = 0; + size_t breakCharNum = string::npos; + string line = firstLine; + + // Process the lines until a ';' or '{'. + ASPeekStream stream(sourceIterator); + while (stream.hasMoreLines() || isFirstLine) + { + if (isFirstLine) + isFirstLine = false; + else + { + if (isInQuote_) + return; + line = stream.peekNextLine(); + if (!foundSplitPoint) + ++breakLineNum; + } + size_t firstCharNum = line.find_first_not_of(" \t"); + if (firstCharNum == string::npos) + continue; + if (line[firstCharNum] == '#') + { + // don't attach to a preprocessor + if (shouldAttachReturnType || shouldAttachReturnTypeDecl) + return; + else + continue; + } + // parse the line + for (size_t i = 0; i < line.length(); i++) + { + if (!isWhiteSpace(line[i])) + { + prevNonWSChar = currNonWSChar; + currNonWSChar = line[i]; + } + else if (line[i] == '\t' && shouldConvertTabs) + { + size_t tabSize = getTabLength(); + size_t numSpaces = tabSize - ((tabIncrementIn + i) % tabSize); + line.replace(i, 1, numSpaces, ' '); + currentChar = line[i]; + } + if (line.compare(i, 2, "/*") == 0) + isInComment_ = true; + if (isInComment_) + { + if (line.compare(i, 2, "*/") == 0) + { + isInComment_ = false; + ++i; + } + continue; + } + if (line[i] == '\\') + { + ++i; + continue; + } + + if (isInQuote_) + { + if (line[i] == quoteChar_) + isInQuote_ = false; + continue; + } + + if (line[i] == '"' + || (line[i] == '\'' && !isDigitSeparator(line, i))) + { + isInQuote_ = true; + quoteChar_ = line[i]; + continue; + } + if (line.compare(i, 2, "//") == 0) + { + i = line.length(); + continue; + } + // not in quote or comment + if (!foundSplitPoint) + { + if (line[i] == '<') + { + ++angleCount; + continue; + } + if (line[i] == '>') + { + if (angleCount) + --angleCount; + if (!angleCount) + { + size_t nextCharNum = line.find_first_not_of(" \t*&", i + 1); + if (nextCharNum == string::npos) + { + breakCharNum = string::npos; + continue; + } + if (line[nextCharNum] != ':') // scope operator + breakCharNum = nextCharNum; + } + continue; + } + if (angleCount) + continue; + if (line[i] == '[') + { + ++squareCount; + continue; + } + if (line[i] == ']') + { + if (squareCount) + --squareCount; + continue; + } + // an assignment before the parens is not a function + if (line[i] == '=') + return; + if (isWhiteSpace(line[i]) || line[i] == '*' || line[i] == '&') + { + size_t nextNum = line.find_first_not_of(" \t", i + 1); + if (nextNum == string::npos) + breakCharNum = string::npos; + else + { + if (line.length() > nextNum + 1 + && line[nextNum] == ':' && line[nextNum + 1] == ':') + i = --nextNum; + else if (line[nextNum] != '(') + breakCharNum = string::npos; + } + continue; + } + if ((isLegalNameChar(line[i]) || line[i] == '~') + && breakCharNum == string::npos) + { + breakCharNum = i; + if (isLegalNameChar(line[i]) + && findKeyword(line, i, AS_OPERATOR)) + { + if (breakCharNum == firstCharNum) + isAlreadyBroken = true; + foundSplitPoint = true; + // find the operator, may be parens + size_t parenNum = + line.find_first_not_of(" \t", i + AS_OPERATOR.length()); + if (parenNum == string::npos) + return; + // find paren after the operator + parenNum = line.find('(', parenNum + 1); + if (parenNum == string::npos) + return; + i = --parenNum; + } + continue; + } + if (line[i] == ':' + && line.length() > i + 1 + && line[i + 1] == ':') + { + size_t nextCharNum = line.find_first_not_of(" \t:", i + 1); + if (nextCharNum == string::npos) + return; + + if (isLegalNameChar(line[nextCharNum]) + && findKeyword(line, nextCharNum, AS_OPERATOR)) + { + i = nextCharNum; + if (breakCharNum == firstCharNum) + isAlreadyBroken = true; + foundSplitPoint = true; + // find the operator, may be parens + size_t parenNum = + line.find_first_not_of(" \t", i + AS_OPERATOR.length()); + if (parenNum == string::npos) + return; + // find paren after the operator + parenNum = line.find('(', parenNum + 1); + if (parenNum == string::npos) + return; + i = --parenNum; + } + else + i = --nextCharNum; + continue; + } + if (line[i] == '(' && !squareCount) + { + // is line is already broken? + if (breakCharNum == firstCharNum && breakLineNum > 0) + isAlreadyBroken = true; + ++parenCount; + foundSplitPoint = true; + continue; + } + } + // end !foundSplitPoint + if (line[i] == '(') + { + // consecutive ')(' parens is probably a function pointer + if (prevNonWSChar == ')' && !parenCount) + return; + ++parenCount; + continue; + } + if (line[i] == ')') + { + if (parenCount) + --parenCount; + continue; + } + if (line[i] == '{') + { + if (shouldBreakReturnType && foundSplitPoint && !isAlreadyBroken) + { + methodBreakCharNum = breakCharNum; + methodBreakLineNum = breakLineNum; + } + if (shouldAttachReturnType && foundSplitPoint && isAlreadyBroken) + { + methodAttachCharNum = breakCharNum; + methodAttachLineNum = breakLineNum; + } + return; + } + if (line[i] == ';') + { + if (shouldBreakReturnTypeDecl && foundSplitPoint && !isAlreadyBroken) + { + methodBreakCharNum = breakCharNum; + methodBreakLineNum = breakLineNum; + } + if ((shouldAttachReturnTypeDecl && foundSplitPoint && isAlreadyBroken)) + { + methodAttachCharNum = breakCharNum; + methodAttachLineNum = breakLineNum; + } + return; + } + if (line[i] == '}') + return; + } // end of for loop + if (!foundSplitPoint) + breakCharNum = string::npos; + } // end of while loop +} + +/** * Look ahead in the file to see if a struct has access modifiers. * * @param firstLine a reference to the line to indent. @@ -6509,7 +7020,7 @@ else if (nextLine_[i] == ':') { // check for '::' - if (nextLine_.length() > i && nextLine_[i + 1] == ':') + if (nextLine_.length() > i + 1 && nextLine_[i + 1] == ':') ++i; else isInClassConstructor = true; @@ -6927,7 +7438,7 @@ { // if follows an operator break before size_t parenNum; - if (isCharPotentialOperator(previousNonWSChar)) + if (previousNonWSChar != ' ' && isCharPotentialOperator(previousNonWSChar)) parenNum = formattedLine.length() - 1; else parenNum = formattedLine.length(); @@ -7225,7 +7736,7 @@ { // if end of the currentLine, find a new split point size_t newCharNum; - if (isCharPotentialHeader(currentLine, charNum)) + if (!isWhiteSpace(currentChar) && isCharPotentialHeader(currentLine, charNum)) newCharNum = getCurrentWord(currentLine, charNum).length() + charNum; else newCharNum = charNum + 2; @@ -7423,11 +7934,15 @@ isSharpAccessor = false; isSharpDelegate = false; isInObjCMethodDefinition = false; + isImmediatelyPostObjCMethodPrefix = false; + isInObjCReturnType = false; + isInObjCParam = false; isInObjCInterface = false; isInObjCSelector = false; isInEnum = false; isInExternC = false; elseHeaderFollowsComments = false; + returnTypeChecked = false; nonInStatementBrace = 0; while (!questionMarkStack->empty()) questionMarkStack->pop_back(); @@ -7444,6 +7959,7 @@ bool foundMethodColon = false; bool isInComment_ = false; bool isInQuote_ = false; + bool haveTernary = false; char quoteChar_ = ' '; int sqBracketCount = 0; int colonAdjust = 0; @@ -7516,9 +8032,19 @@ continue; if (haveFirstColon) // multiple colons per line continue; + if (nextLine_[i] == '?') + { + haveTernary = true; + continue; + } // compute colon adjustment if (nextLine_[i] == ':') { + if (haveTernary) + { + haveTernary = false; + continue; + } haveFirstColon = true; foundMethodColon = true; if (shouldPadMethodColon) @@ -7573,15 +8099,19 @@ formattedLine.erase(i); --commentAdjust; } - appendSpacePad(); + if (formattedLine.length() > 0) + { + appendSpacePad(); + formattedLine.back() = ' '; // convert any tab to space + } } if (objCColonPadMode == COLON_PAD_NONE || objCColonPadMode == COLON_PAD_BEFORE || nextChar == ')') { // remove spaces after - int nextText = currentLine.find_first_not_of(" \t", charNum + 1); - if (nextText == (int)string::npos) + size_t nextText = currentLine.find_first_not_of(" \t", charNum + 1); + if (nextText == string::npos) nextText = currentLine.length(); int spaces = nextText - charNum - 1; if (spaces > 0) @@ -7594,8 +8124,8 @@ else { // pad space after - int nextText = currentLine.find_first_not_of(" \t", charNum + 1); - if (nextText == (int)string::npos) + size_t nextText = currentLine.find_first_not_of(" \t", charNum + 1); + if (nextText == string::npos) nextText = currentLine.length(); int spaces = nextText - charNum - 1; if (spaces == 0) @@ -7607,6 +8137,7 @@ { // do not use goForward here currentLine.erase(charNum + 1, spaces - 1); + currentLine[charNum + 1] = ' '; // convert any tab to space spacePadNum -= spaces - 1; } } diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // ASLocalizer.cpp -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. // @@ -183,7 +183,7 @@ setTranslationClass(); } -#endif // _win32 +#endif // _WIN32 string ASLocalizer::getLanguageID() const // Returns the language ID in m_langID. @@ -350,6 +350,14 @@ return mbTranslation; } +string Translation::getTranslationString(size_t i) const +// Return the translation ascii value. Used for testing. +{ + if (i >= m_translation.size()) + return string(); + return m_translation[i].first; +} + size_t Translation::getTranslationVectorSize() const // Return the translation vector size. Used for testing. { @@ -403,18 +411,21 @@ addPair("Formatted %s\n", L"Форматиран %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Непроменен %s\n"); // should align with formatted addPair("Directory %s\n", L"директория %s\n"); + addPair("Default option file %s\n", L"Файл с опции по подразбиране %s\n"); + addPair("Project option file %s\n", L"Файл с опции за проекта %s\n"); addPair("Exclude %s\n", L"Изключвам %s\n"); addPair("Exclude (unmatched) %s\n", L"Изключване (несравнимо) %s\n"); addPair(" %s formatted %s unchanged ", L" %s форматиран %s hепроменен "); addPair(" seconds ", L" секунди "); addPair("%d min %d sec ", L"%d мин %d сек "); addPair("%s lines\n", L"%s линии\n"); - addPair("Using default options file %s\n", L"Използване на файла възможности по подразбиране %s\n"); addPair("Opening HTML documentation %s\n", L"Откриване HTML документация %s\n"); - addPair("Invalid option file options:", L"Невалидни опции опция файлове:"); + addPair("Invalid default options:", L"Невалидни опции по подразбиране:"); + addPair("Invalid project options:", L"Невалидни опции за проекти:"); addPair("Invalid command line options:", L"Невалидни опции за командния ред:"); addPair("For help on options type 'astyle -h'", L"За помощ относно възможностите тип 'astyle -h'"); - addPair("Cannot open options file", L"Не може да се отвори файл опции"); + addPair("Cannot open default option file", L"Не може да се отвори файлът с опции по подразбиране"); + addPair("Cannot open project option file", L"Не може да се отвори файла с опции за проекта"); addPair("Cannot open directory", L"Не може да се отвори директория"); addPair("Cannot open HTML file %s\n", L"Не може да се отвори HTML файл %s\n"); addPair("Command execute failure", L"Command изпълни недостатъчност"); @@ -425,7 +436,7 @@ addPair("No file to process %s\n", L"Не файл за обработка %s\n"); addPair("Did you intend to use --recursive", L"Знаете ли възнамерявате да използвате --recursive"); addPair("Cannot process UTF-32 encoding", L"Не може да са UTF-32 кодиране"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style е прекратено"); + addPair("Artistic Style has terminated\n", L"Artistic Style е прекратено\n"); } ChineseSimplified::ChineseSimplified() // 中文(简体) @@ -434,18 +445,21 @@ addPair("Formatted %s\n", L"格式化 %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"未改变 %s\n"); // should align with formatted addPair("Directory %s\n", L"目录 %s\n"); + addPair("Default option file %s\n", L"默认选项文件 %s\n"); + addPair("Project option file %s\n", L"项目选项文件 %s\n"); addPair("Exclude %s\n", L"排除 %s\n"); addPair("Exclude (unmatched) %s\n", L"排除(无匹配项) %s\n"); addPair(" %s formatted %s unchanged ", L" %s 格式化 %s 未改变 "); addPair(" seconds ", L" 秒 "); addPair("%d min %d sec ", L"%d 分 %d 秒 "); addPair("%s lines\n", L"%s 行\n"); - addPair("Using default options file %s\n", L"使用默认配置文件 %s\n"); addPair("Opening HTML documentation %s\n", L"打开HTML文档 %s\n"); - addPair("Invalid option file options:", L"无效的配置文件选项:"); + addPair("Invalid default options:", L"默认选项无效:"); + addPair("Invalid project options:", L"项目选项无效:"); addPair("Invalid command line options:", L"无效的命令行选项:"); addPair("For help on options type 'astyle -h'", L"输入 'astyle -h' 以获得有关命令行的帮助"); - addPair("Cannot open options file", L"无法打开配置文件"); + addPair("Cannot open default option file", L"无法打开默认选项文件"); + addPair("Cannot open project option file", L"无法打开项目选项文件"); addPair("Cannot open directory", L"无法打开目录"); addPair("Cannot open HTML file %s\n", L"无法打开HTML文件 %s\n"); addPair("Command execute failure", L"执行命令失败"); @@ -456,7 +470,7 @@ addPair("No file to process %s\n", L"没有文件可处理 %s\n"); addPair("Did you intend to use --recursive", L"你打算使用 --recursive"); addPair("Cannot process UTF-32 encoding", L"不能处理UTF-32编码"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style 已经终止运行"); + addPair("Artistic Style has terminated\n", L"Artistic Style 已经终止运行\n"); } ChineseTraditional::ChineseTraditional() // 中文(繁體) @@ -465,18 +479,21 @@ addPair("Formatted %s\n", L"格式化 %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"未改變 %s\n"); // should align with formatted addPair("Directory %s\n", L"目錄 %s\n"); + addPair("Default option file %s\n", L"默認選項文件 %s\n"); + addPair("Project option file %s\n", L"項目選項文件 %s\n"); addPair("Exclude %s\n", L"排除 %s\n"); addPair("Exclude (unmatched) %s\n", L"排除(無匹配項) %s\n"); addPair(" %s formatted %s unchanged ", L" %s 格式化 %s 未改變 "); addPair(" seconds ", L" 秒 "); addPair("%d min %d sec ", L"%d 分 %d 秒 "); addPair("%s lines\n", L"%s 行\n"); - addPair("Using default options file %s\n", L"使用默認配置文件 %s\n"); addPair("Opening HTML documentation %s\n", L"打開HTML文檔 %s\n"); - addPair("Invalid option file options:", L"無效的配置文件選項:"); + addPair("Invalid default options:", L"默認選項無效:"); + addPair("Invalid project options:", L"項目選項無效:"); addPair("Invalid command line options:", L"無效的命令行選項:"); addPair("For help on options type 'astyle -h'", L"輸入'astyle -h'以獲得有關命令行的幫助:"); - addPair("Cannot open options file", L"無法打開配置文件"); + addPair("Cannot open default option file", L"無法打開默認選項文件"); + addPair("Cannot open project option file", L"無法打開項目選項文件"); addPair("Cannot open directory", L"無法打開目錄"); addPair("Cannot open HTML file %s\n", L"無法打開HTML文件 %s\n"); addPair("Command execute failure", L"執行命令失敗"); @@ -487,7 +504,7 @@ addPair("No file to process %s\n", L"沒有文件可處理 %s\n"); addPair("Did you intend to use --recursive", L"你打算使用 --recursive"); addPair("Cannot process UTF-32 encoding", L"不能處理UTF-32編碼"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style 已經終止運行"); + addPair("Artistic Style has terminated\n", L"Artistic Style 已經終止運行\n"); } Dutch::Dutch() // Nederlandse @@ -496,18 +513,21 @@ addPair("Formatted %s\n", L"Geformatteerd %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Onveranderd %s\n"); // should align with formatted addPair("Directory %s\n", L"Directory %s\n"); + addPair("Default option file %s\n", L"Standaard optie bestand %s\n"); + addPair("Project option file %s\n", L"Project optie bestand %s\n"); addPair("Exclude %s\n", L"Uitsluiten %s\n"); addPair("Exclude (unmatched) %s\n", L"Uitgesloten (ongeëvenaarde) %s\n"); addPair(" %s formatted %s unchanged ", L" %s geformatteerd %s onveranderd "); addPair(" seconds ", L" seconden "); addPair("%d min %d sec ", L"%d min %d sec "); addPair("%s lines\n", L"%s lijnen\n"); - addPair("Using default options file %s\n", L"Met behulp van standaard opties bestand %s\n"); addPair("Opening HTML documentation %s\n", L"Het openen van HTML-documentatie %s\n"); - addPair("Invalid option file options:", L"Ongeldige optie file opties:"); + addPair("Invalid default options:", L"Ongeldige standaardopties:"); + addPair("Invalid project options:", L"Ongeldige projectopties:"); addPair("Invalid command line options:", L"Ongeldige command line opties:"); addPair("For help on options type 'astyle -h'", L"Voor hulp bij 'astyle-h' opties het type"); - addPair("Cannot open options file", L"Kan niet worden geopend options bestand"); + addPair("Cannot open default option file", L"Kan het standaardoptiesbestand niet openen"); + addPair("Cannot open project option file", L"Kan het project optie bestand niet openen"); addPair("Cannot open directory", L"Kan niet open directory"); addPair("Cannot open HTML file %s\n", L"Kan HTML-bestand niet openen %s\n"); addPair("Command execute failure", L"Voeren commando falen"); @@ -518,7 +538,7 @@ addPair("No file to process %s\n", L"Geen bestand te verwerken %s\n"); addPair("Did you intend to use --recursive", L"Hebt u van plan bent te gebruiken --recursive"); addPair("Cannot process UTF-32 encoding", L"Kan niet verwerken UTF-32 codering"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style heeft beëindigd"); + addPair("Artistic Style has terminated\n", L"Artistic Style heeft beëindigd\n"); } English::English() @@ -531,18 +551,21 @@ addPair("Formatted %s\n", L"Formaadis %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Muutumatu %s\n"); // should align with formatted addPair("Directory %s\n", L"Kataloog %s\n"); + addPair("Default option file %s\n", L"Vaikefunktsioonifail %s\n"); + addPair("Project option file %s\n", L"Projekti valiku fail %s\n"); addPair("Exclude %s\n", L"Välista %s\n"); addPair("Exclude (unmatched) %s\n", L"Välista (tasakaalustamata) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formaadis %s muutumatu "); addPair(" seconds ", L" sekundit "); addPair("%d min %d sec ", L"%d min %d sek "); addPair("%s lines\n", L"%s read\n"); - addPair("Using default options file %s\n", L"Kasutades selliseid vaikimisi valikuid faili %s\n"); addPair("Opening HTML documentation %s\n", L"Avamine HTML dokumentatsioon %s\n"); - addPair("Invalid option file options:", L"Vale valik faili võimalusi:"); + addPair("Invalid default options:", L"Vaikevalikud on sobimatud:"); + addPair("Invalid project options:", L"Projekti valikud on sobimatud:"); addPair("Invalid command line options:", L"Vale käsureavõtmetega:"); addPair("For help on options type 'astyle -h'", L"Abiks võimaluste tüüp 'astyle -h'"); - addPair("Cannot open options file", L"Ei saa avada võimalusi faili"); + addPair("Cannot open default option file", L"Vaikimisi valitud faili ei saa avada"); + addPair("Cannot open project option file", L"Projektivaliku faili ei saa avada"); addPair("Cannot open directory", L"Ei saa avada kataloogi"); addPair("Cannot open HTML file %s\n", L"Ei saa avada HTML-faili %s\n"); addPair("Command execute failure", L"Käsk täita rike"); @@ -553,7 +576,7 @@ addPair("No file to process %s\n", L"No faili töötlema %s\n"); addPair("Did you intend to use --recursive", L"Kas te kavatsete kasutada --recursive"); addPair("Cannot process UTF-32 encoding", L"Ei saa töödelda UTF-32 kodeeringus"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style on lõpetatud"); + addPair("Artistic Style has terminated\n", L"Artistic Style on lõpetatud\n"); } Finnish::Finnish() // Suomeksi @@ -562,18 +585,21 @@ addPair("Formatted %s\n", L"Muotoiltu %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Ennallaan %s\n"); // should align with formatted addPair("Directory %s\n", L"Directory %s\n"); + addPair("Default option file %s\n", L"Oletusasetustiedosto %s\n"); + addPair("Project option file %s\n", L"Projektin valintatiedosto %s\n"); addPair("Exclude %s\n", L"Sulkea %s\n"); addPair("Exclude (unmatched) %s\n", L"Sulkea (verraton) %s\n"); addPair(" %s formatted %s unchanged ", L" %s muotoiltu %s ennallaan "); addPair(" seconds ", L" sekuntia "); addPair("%d min %d sec ", L"%d min %d sek "); addPair("%s lines\n", L"%s linjat\n"); - addPair("Using default options file %s\n", L"Käyttämällä oletusasetuksia tiedosto %s\n"); addPair("Opening HTML documentation %s\n", L"Avaaminen HTML asiakirjat %s\n"); - addPair("Invalid option file options:", L"Virheellinen vaihtoehto tiedosto vaihtoehtoja:"); + addPair("Invalid default options:", L"Virheelliset oletusasetukset:"); + addPair("Invalid project options:", L"Virheelliset hankevalinnat:"); addPair("Invalid command line options:", L"Virheellinen komentorivin:"); addPair("For help on options type 'astyle -h'", L"Apua vaihtoehdoista tyyppi 'astyle -h'"); - addPair("Cannot open options file", L"Ei voi avata vaihtoehtoja tiedostoa"); + addPair("Cannot open default option file", L"Et voi avata oletusasetustiedostoa"); + addPair("Cannot open project option file", L"Projektin asetustiedostoa ei voi avata"); addPair("Cannot open directory", L"Ei Open Directory"); addPair("Cannot open HTML file %s\n", L"Ei voi avata HTML-tiedoston %s\n"); addPair("Command execute failure", L"Suorita komento vika"); @@ -584,7 +610,7 @@ addPair("No file to process %s\n", L"Ei tiedostoa käsitellä %s\n"); addPair("Did you intend to use --recursive", L"Oliko aiot käyttää --recursive"); addPair("Cannot process UTF-32 encoding", L"Ei voi käsitellä UTF-32 koodausta"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style on päättynyt"); + addPair("Artistic Style has terminated\n", L"Artistic Style on päättynyt\n"); } French::French() // Française @@ -593,18 +619,21 @@ addPair("Formatted %s\n", L"Formaté %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Inchangée %s\n"); // should align with formatted addPair("Directory %s\n", L"Répertoire %s\n"); + addPair("Default option file %s\n", L"Fichier d'option par défaut %s\n"); + addPair("Project option file %s\n", L"Fichier d'option de projet %s\n"); addPair("Exclude %s\n", L"Exclure %s\n"); addPair("Exclude (unmatched) %s\n", L"Exclure (non appariés) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formaté %s inchangée "); addPair(" seconds ", L" seconde "); addPair("%d min %d sec ", L"%d min %d sec "); addPair("%s lines\n", L"%s lignes\n"); - addPair("Using default options file %s\n", L"Options par défaut utilisation du fichier %s\n"); addPair("Opening HTML documentation %s\n", L"Ouverture documentation HTML %s\n"); - addPair("Invalid option file options:", L"Options Blancs option du fichier:"); + addPair("Invalid default options:", L"Options par défaut invalides:"); + addPair("Invalid project options:", L"Options de projet non valides:"); addPair("Invalid command line options:", L"Blancs options ligne de commande:"); addPair("For help on options type 'astyle -h'", L"Pour de l'aide sur les options tapez 'astyle -h'"); - addPair("Cannot open options file", L"Impossible d'ouvrir le fichier d'options"); + addPair("Cannot open default option file", L"Impossible d'ouvrir le fichier d'option par défaut"); + addPair("Cannot open project option file", L"Impossible d'ouvrir le fichier d'option de projet"); addPair("Cannot open directory", L"Impossible d'ouvrir le répertoire"); addPair("Cannot open HTML file %s\n", L"Impossible d'ouvrir le fichier HTML %s\n"); addPair("Command execute failure", L"Exécuter échec de la commande"); @@ -615,7 +644,7 @@ addPair("No file to process %s\n", L"Aucun fichier à traiter %s\n"); addPair("Did you intend to use --recursive", L"Avez-vous l'intention d'utiliser --recursive"); addPair("Cannot process UTF-32 encoding", L"Impossible de traiter codage UTF-32"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style a mis fin"); + addPair("Artistic Style has terminated\n", L"Artistic Style a mis fin\n"); } German::German() // Deutsch @@ -624,18 +653,21 @@ addPair("Formatted %s\n", L"Formatiert %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Unverändert %s\n"); // should align with formatted addPair("Directory %s\n", L"Verzeichnis %s\n"); + addPair("Default option file %s\n", L"Standard-Optionsdatei %s\n"); + addPair("Project option file %s\n", L"Projektoptionsdatei %s\n"); addPair("Exclude %s\n", L"Ausschließen %s\n"); addPair("Exclude (unmatched) %s\n", L"Ausschließen (unerreichte) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formatiert %s unverändert "); addPair(" seconds ", L" sekunden "); addPair("%d min %d sec ", L"%d min %d sek "); addPair("%s lines\n", L"%s linien\n"); - addPair("Using default options file %s\n", L"Mit Standard-Optionen Dat %s\n"); addPair("Opening HTML documentation %s\n", L"Öffnen HTML-Dokumentation %s\n"); - addPair("Invalid option file options:", L"Ungültige Option Datei-Optionen:"); + addPair("Invalid default options:", L"Ungültige Standardoptionen:"); + addPair("Invalid project options:", L"Ungültige Projektoptionen:"); addPair("Invalid command line options:", L"Ungültige Kommandozeilen-Optionen:"); addPair("For help on options type 'astyle -h'", L"Für Hilfe zu den Optionen geben Sie 'astyle -h'"); - addPair("Cannot open options file", L"Kann nicht geöffnet werden Optionsdatei"); + addPair("Cannot open default option file", L"Die Standardoptionsdatei kann nicht geöffnet werden"); + addPair("Cannot open project option file", L"Die Projektoptionsdatei kann nicht geöffnet werden"); addPair("Cannot open directory", L"Kann nicht geöffnet werden Verzeichnis"); addPair("Cannot open HTML file %s\n", L"Kann nicht öffnen HTML-Datei %s\n"); addPair("Command execute failure", L"Execute Befehl Scheitern"); @@ -646,7 +678,7 @@ addPair("No file to process %s\n", L"Keine Datei zu verarbeiten %s\n"); addPair("Did you intend to use --recursive", L"Haben Sie verwenden möchten --recursive"); addPair("Cannot process UTF-32 encoding", L"Nicht verarbeiten kann UTF-32 Codierung"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style ist beendet"); + addPair("Artistic Style has terminated\n", L"Artistic Style ist beendet\n"); } Greek::Greek() // ελληνικά @@ -655,18 +687,21 @@ addPair("Formatted %s\n", L"Διαμορφωμένη %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Αμετάβλητος %s\n"); // should align with formatted addPair("Directory %s\n", L"Κατάλογος %s\n"); + addPair("Default option file %s\n", L"Προεπιλεγμένο αρχείο επιλογών %s\n"); + addPair("Project option file %s\n", L"Αρχείο επιλογής έργου %s\n"); addPair("Exclude %s\n", L"Αποκλείω %s\n"); addPair("Exclude (unmatched) %s\n", L"Ausschließen (unerreichte) %s\n"); addPair(" %s formatted %s unchanged ", L" %s σχηματοποιημένη %s αμετάβλητες "); addPair(" seconds ", L" δευτερόλεπτα "); addPair("%d min %d sec ", L"%d λεπ %d δευ "); addPair("%s lines\n", L"%s γραμμές\n"); - addPair("Using default options file %s\n", L"Χρησιμοποιώντας το αρχείο προεπιλεγμένες επιλογές %s\n"); addPair("Opening HTML documentation %s\n", L"Εγκαίνια έγγραφα HTML %s\n"); - addPair("Invalid option file options:", L"Μη έγκυρες επιλογές αρχείου επιλογή:"); + addPair("Invalid default options:", L"Μη έγκυρες επιλογές προεπιλογής:"); + addPair("Invalid project options:", L"Μη έγκυρες επιλογές έργου:"); addPair("Invalid command line options:", L"Μη έγκυρη επιλογές γραμμής εντολών:"); addPair("For help on options type 'astyle -h'", L"Για βοήθεια σχετικά με το είδος επιλογές 'astyle -h'"); - addPair("Cannot open options file", L"Δεν μπορείτε να ανοίξετε το αρχείο επιλογών"); + addPair("Cannot open default option file", L"Δεν είναι δυνατό να ανοίξει το προεπιλεγμένο αρχείο επιλογών"); + addPair("Cannot open project option file", L"Δεν είναι δυνατό να ανοίξει το αρχείο επιλογής έργου"); addPair("Cannot open directory", L"Δεν μπορείτε να ανοίξετε τον κατάλογο"); addPair("Cannot open HTML file %s\n", L"Δεν μπορείτε να ανοίξετε το αρχείο HTML %s\n"); addPair("Command execute failure", L"Εντολή να εκτελέσει την αποτυχία"); @@ -677,7 +712,7 @@ addPair("No file to process %s\n", L"Δεν υπάρχει αρχείο για την επεξεργασία %s\n"); addPair("Did you intend to use --recursive", L"Μήπως σκοπεύετε να χρησιμοποιήσετε --recursive"); addPair("Cannot process UTF-32 encoding", L"δεν μπορεί να επεξεργαστεί UTF-32 κωδικοποίηση"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style έχει λήξει"); + addPair("Artistic Style has terminated\n", L"Artistic Style έχει λήξει\n"); } Hindi::Hindi() // हिन्दी @@ -688,18 +723,21 @@ addPair("Formatted %s\n", L"स्वरूपित किया %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"अपरिवर्तित %s\n"); // should align with formatted addPair("Directory %s\n", L"निर्देशिका %s\n"); + addPair("Default option file %s\n", L"डिफ़ॉल्ट विकल्प फ़ाइल %s\n"); + addPair("Project option file %s\n", L"प्रोजेक्ट विकल्प फ़ाइल %s\n"); addPair("Exclude %s\n", L"निकालना %s\n"); addPair("Exclude (unmatched) %s\n", L"अपवर्जित (बेजोड़) %s\n"); addPair(" %s formatted %s unchanged ", L" %s स्वरूपित किया %s अपरिवर्तित "); addPair(" seconds ", L" सेकंड "); addPair("%d min %d sec ", L"%d मिनट %d सेकंड "); addPair("%s lines\n", L"%s लाइनों\n"); - addPair("Using default options file %s\n", L"डिफ़ॉल्ट विकल्प का उपयोग कर फ़ाइल %s\n"); addPair("Opening HTML documentation %s\n", L"एचटीएमएल प्रलेखन खोलना %s\n"); - addPair("Invalid option file options:", L"अवैध विकल्प फ़ाइल विकल्प हैं:"); + addPair("Invalid default options:", L"अमान्य डिफ़ॉल्ट विकल्प:"); + addPair("Invalid project options:", L"अमान्य प्रोजेक्ट विकल्प:"); addPair("Invalid command line options:", L"कमांड लाइन विकल्प अवैध:"); addPair("For help on options type 'astyle -h'", L"विकल्पों पर मदद के लिए प्रकार 'astyle -h'"); - addPair("Cannot open options file", L"विकल्प फ़ाइल नहीं खोल सकता है"); + addPair("Cannot open default option file", L"डिफ़ॉल्ट विकल्प फ़ाइल नहीं खोल सकता"); + addPair("Cannot open project option file", L"परियोजना विकल्प फ़ाइल नहीं खोल सकता"); addPair("Cannot open directory", L"निर्देशिका नहीं खोल सकता"); addPair("Cannot open HTML file %s\n", L"HTML फ़ाइल नहीं खोल सकता %s\n"); addPair("Command execute failure", L"आदेश विफलता निष्पादित"); @@ -710,7 +748,7 @@ addPair("No file to process %s\n", L"कोई फ़ाइल %s प्रक्रिया के लिए\n"); addPair("Did you intend to use --recursive", L"क्या आप उपयोग करना चाहते हैं --recursive"); addPair("Cannot process UTF-32 encoding", L"UTF-32 कूटबन्धन प्रक्रिया नहीं कर सकते"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style समाप्त किया है"); + addPair("Artistic Style has terminated\n", L"Artistic Style समाप्त किया है\n"); } Hungarian::Hungarian() // Magyar @@ -719,18 +757,21 @@ addPair("Formatted %s\n", L"Formázott %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Változatlan %s\n"); // should align with formatted addPair("Directory %s\n", L"Címjegyzék %s\n"); + addPair("Default option file %s\n", L"Alapértelmezett beállítási fájl %s\n"); + addPair("Project option file %s\n", L"Projekt opciófájl %s\n"); addPair("Exclude %s\n", L"Kizár %s\n"); addPair("Exclude (unmatched) %s\n", L"Escludere (senza pari) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formázott %s változatlan "); addPair(" seconds ", L" másodperc "); addPair("%d min %d sec ", L"%d jeg %d más "); addPair("%s lines\n", L"%s vonalak\n"); - addPair("Using default options file %s\n", L"Az alapértelmezett beállítások fájl %s\n"); addPair("Opening HTML documentation %s\n", L"Nyitó HTML dokumentáció %s\n"); - addPair("Invalid option file options:", L"Érvénytelen opció fájlbeállítást:"); + addPair("Invalid default options:", L"Érvénytelen alapértelmezett beállítások:"); + addPair("Invalid project options:", L"Érvénytelen projektbeállítások:"); addPair("Invalid command line options:", L"Érvénytelen parancssori opciók:"); addPair("For help on options type 'astyle -h'", L"Ha segítségre van lehetőség típus 'astyle-h'"); - addPair("Cannot open options file", L"Nem lehet megnyitni beállítási fájlban"); + addPair("Cannot open default option file", L"Nem lehet megnyitni az alapértelmezett beállítási fájlt"); + addPair("Cannot open project option file", L"Nem lehet megnyitni a projekt opció fájlt"); addPair("Cannot open directory", L"Nem lehet megnyitni könyvtár"); addPair("Cannot open HTML file %s\n", L"Nem lehet megnyitni a HTML fájlt %s\n"); addPair("Command execute failure", L"Command végre hiba"); @@ -741,7 +782,7 @@ addPair("No file to process %s\n", L"Nincs fájl feldolgozása %s\n"); addPair("Did you intend to use --recursive", L"Esetleg a használni kívánt --recursive"); addPair("Cannot process UTF-32 encoding", L"Nem tudja feldolgozni UTF-32 kódolással"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style megszűnt"); + addPair("Artistic Style has terminated\n", L"Artistic Style megszűnt\n"); } Italian::Italian() // Italiano @@ -750,18 +791,21 @@ addPair("Formatted %s\n", L"Formattata %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Immutato %s\n"); // should align with formatted addPair("Directory %s\n", L"Elenco %s\n"); + addPair("Default option file %s\n", L"File di opzione predefinito %s\n"); + addPair("Project option file %s\n", L"File di opzione del progetto %s\n"); addPair("Exclude %s\n", L"Escludere %s\n"); addPair("Exclude (unmatched) %s\n", L"Escludere (senza pari) %s\n"); addPair(" %s formatted %s unchanged ", L" %s ormattata %s immutato "); addPair(" seconds ", L" secondo "); addPair("%d min %d sec ", L"%d min %d seg "); addPair("%s lines\n", L"%s linee\n"); - addPair("Using default options file %s\n", L"Utilizzando file delle opzioni di default %s\n"); addPair("Opening HTML documentation %s\n", L"Apertura di documenti HTML %s\n"); - addPair("Invalid option file options:", L"Opzione non valida file delle opzioni:"); + addPair("Invalid default options:", L"Opzioni di default non valide:"); + addPair("Invalid project options:", L"Opzioni di progetto non valide:"); addPair("Invalid command line options:", L"Opzioni della riga di comando non valido:"); addPair("For help on options type 'astyle -h'", L"Per informazioni sulle opzioni di tipo 'astyle-h'"); - addPair("Cannot open options file", L"Impossibile aprire il file opzioni"); + addPair("Cannot open default option file", L"Impossibile aprire il file di opzione predefinito"); + addPair("Cannot open project option file", L"Impossibile aprire il file di opzione del progetto"); addPair("Cannot open directory", L"Impossibile aprire la directory"); addPair("Cannot open HTML file %s\n", L"Impossibile aprire il file HTML %s\n"); addPair("Command execute failure", L"Esegui fallimento comando"); @@ -772,7 +816,7 @@ addPair("No file to process %s\n", L"Nessun file al processo %s\n"); addPair("Did you intend to use --recursive", L"Hai intenzione di utilizzare --recursive"); addPair("Cannot process UTF-32 encoding", L"Non è possibile processo di codifica UTF-32"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style ha terminato"); + addPair("Artistic Style has terminated\n", L"Artistic Style ha terminato\n"); } Japanese::Japanese() // 日本語 @@ -781,18 +825,21 @@ addPair("Formatted %s\n", L"フォーマット済みの %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"変わりません %s\n"); // should align with formatted addPair("Directory %s\n", L"ディレクトリ %s\n"); + addPair("Default option file %s\n", L"デフォルトオプションファイル %s\n"); + addPair("Project option file %s\n", L"プロジェクトオプションファイル %s\n"); addPair("Exclude %s\n", L"除外する %s\n"); addPair("Exclude (unmatched) %s\n", L"除外する(一致しません) %s\n"); addPair(" %s formatted %s unchanged ", L" %s フフォーマット済みの %s 変わりません "); addPair(" seconds ", L" 秒 "); addPair("%d min %d sec ", L"%d 分 %d 秒 "); addPair("%s lines\n", L"%s ライン\n"); - addPair("Using default options file %s\n", L"デフォルトのオプションファイルを使用して、 %s\n"); addPair("Opening HTML documentation %s\n", L"オープニングHTMLドキュメント %s\n"); - addPair("Invalid option file options:", L"無効なオプションファイルのオプション:"); + addPair("Invalid default options:", L"無効なデフォルトオプション:"); + addPair("Invalid project options:", L"無効なプロジェクトオプション:"); addPair("Invalid command line options:", L"無効なコマンドラインオプション:"); addPair("For help on options type 'astyle -h'", L"コオプションの種類のヘルプについて'astyle- h'を入力してください"); - addPair("Cannot open options file", L"オプションファイルを開くことができません"); + addPair("Cannot open default option file", L"デフォルトのオプションファイルを開くことができません"); + addPair("Cannot open project option file", L"プロジェクトオプションファイルを開くことができません"); addPair("Cannot open directory", L"ディレクトリを開くことができません。"); addPair("Cannot open HTML file %s\n", L"HTMLファイルを開くことができません %s\n"); addPair("Command execute failure", L"コマンドが失敗を実行します"); @@ -803,7 +850,7 @@ addPair("No file to process %s\n", L"いいえファイルは処理しないように %s\n"); addPair("Did you intend to use --recursive", L"あなたは--recursive使用するつもりでした"); addPair("Cannot process UTF-32 encoding", L"UTF - 32エンコーディングを処理できません"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style 終了しました"); + addPair("Artistic Style has terminated\n", L"Artistic Style 終了しました\n"); } Korean::Korean() // 한국의 @@ -812,18 +859,21 @@ addPair("Formatted %s\n", L"수정됨 %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"변경없음 %s\n"); // should align with formatted addPair("Directory %s\n", L"디렉토리 %s\n"); + addPair("Default option file %s\n", L"기본 옵션 파일 %s\n"); + addPair("Project option file %s\n", L"프로젝트 옵션 파일 %s\n"); addPair("Exclude %s\n", L"제외됨 %s\n"); addPair("Exclude (unmatched) %s\n", L"제외 (NO 일치) %s\n"); addPair(" %s formatted %s unchanged ", L" %s 수정됨 %s 변경없음 "); addPair(" seconds ", L" 초 "); addPair("%d min %d sec ", L"%d 분 %d 초 "); addPair("%s lines\n", L"%s 라인\n"); - addPair("Using default options file %s\n", L"기본 구성 파일을 사용 %s\n"); addPair("Opening HTML documentation %s\n", L"HTML 문서를 열기 %s\n"); - addPair("Invalid option file options:", L"잘못된 구성 파일 옵션 :"); + addPair("Invalid default options:", L"잘못된 기본 옵션:"); + addPair("Invalid project options:", L"잘못된 프로젝트 옵션:"); addPair("Invalid command line options:", L"잘못된 명령줄 옵션 :"); addPair("For help on options type 'astyle -h'", L"도움말을 보려면 옵션 유형 'astyle - H'를 사용합니다"); - addPair("Cannot open options file", L"구성 파일을 열 수 없습니다"); + addPair("Cannot open default option file", L"기본 옵션 파일을 열 수 없습니다."); + addPair("Cannot open project option file", L"프로젝트 옵션 파일을 열 수 없습니다."); addPair("Cannot open directory", L"디렉토리를 열지 못했습니다"); addPair("Cannot open HTML file %s\n", L"HTML 파일을 열 수 없습니다 %s\n"); addPair("Command execute failure", L"명령 실패를 실행"); @@ -834,7 +884,7 @@ addPair("No file to process %s\n", L"처리할 파일이 없습니다 %s\n"); addPair("Did you intend to use --recursive", L"--recursive 를 사용하고자 하십니까"); addPair("Cannot process UTF-32 encoding", L"UTF-32 인코딩을 처리할 수 없습니다"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style를 종료합니다"); + addPair("Artistic Style has terminated\n", L"Artistic Style를 종료합니다\n"); } Norwegian::Norwegian() // Norsk @@ -843,18 +893,21 @@ addPair("Formatted %s\n", L"Formatert %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Uendret %s\n"); // should align with formatted addPair("Directory %s\n", L"Katalog %s\n"); + addPair("Default option file %s\n", L"Standard alternativfil %s\n"); + addPair("Project option file %s\n", L"Prosjekt opsjonsfil %s\n"); addPair("Exclude %s\n", L"Ekskluder %s\n"); addPair("Exclude (unmatched) %s\n", L"Ekskluder (uovertruffen) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formatert %s uendret "); addPair(" seconds ", L" sekunder "); addPair("%d min %d sec ", L"%d min %d sek? "); addPair("%s lines\n", L"%s linjer\n"); - addPair("Using default options file %s\n", L"Ved hjelp av standardalternativer fil %s\n"); addPair("Opening HTML documentation %s\n", L"Åpning HTML dokumentasjon %s\n"); - addPair("Invalid option file options:", L"Ugyldige alternativ filalternativer:"); + addPair("Invalid default options:", L"Ugyldige standardalternativer:"); + addPair("Invalid project options:", L"Ugyldige prosjektalternativer:"); addPair("Invalid command line options:", L"Kommandolinjevalg Ugyldige:"); addPair("For help on options type 'astyle -h'", L"For hjelp til alternativer type 'astyle -h'"); - addPair("Cannot open options file", L"Kan ikke åpne alternativer fil"); + addPair("Cannot open default option file", L"Kan ikke åpne standardvalgsfilen"); + addPair("Cannot open project option file", L"Kan ikke åpne prosjektvalgsfilen"); addPair("Cannot open directory", L"Kan ikke åpne katalog"); addPair("Cannot open HTML file %s\n", L"Kan ikke åpne HTML-fil %s\n"); addPair("Command execute failure", L"Command utføre svikt"); @@ -865,7 +918,7 @@ addPair("No file to process %s\n", L"Ingen fil å behandle %s\n"); addPair("Did you intend to use --recursive", L"Har du tenkt å bruke --recursive"); addPair("Cannot process UTF-32 encoding", L"Kan ikke behandle UTF-32 koding"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style har avsluttet"); + addPair("Artistic Style has terminated\n", L"Artistic Style har avsluttet\n"); } Polish::Polish() // Polski @@ -874,18 +927,21 @@ addPair("Formatted %s\n", L"Sformatowany %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Niezmienione %s\n"); // should align with formatted addPair("Directory %s\n", L"Katalog %s\n"); + addPair("Default option file %s\n", L"Domyślny plik opcji %s\n"); + addPair("Project option file %s\n", L"Plik opcji projektu %s\n"); addPair("Exclude %s\n", L"Wykluczać %s\n"); addPair("Exclude (unmatched) %s\n", L"Wyklucz (niezrównany) %s\n"); addPair(" %s formatted %s unchanged ", L" %s sformatowany %s niezmienione "); addPair(" seconds ", L" sekund "); addPair("%d min %d sec ", L"%d min %d sek "); addPair("%s lines\n", L"%s linii\n"); - addPair("Using default options file %s\n", L"Korzystanie z domyślnej opcji %s plik\n"); addPair("Opening HTML documentation %s\n", L"Otwarcie dokumentacji HTML %s\n"); - addPair("Invalid option file options:", L"Nieprawidłowy opcji pliku opcji:"); + addPair("Invalid default options:", L"Nieprawidłowe opcje domyślne:"); + addPair("Invalid project options:", L"Nieprawidłowe opcje projektu:"); addPair("Invalid command line options:", L"Nieprawidłowe opcje wiersza polecenia:"); addPair("For help on options type 'astyle -h'", L"Aby uzyskać pomoc od rodzaju opcji 'astyle -h'"); - addPair("Cannot open options file", L"Nie można otworzyć pliku opcji"); + addPair("Cannot open default option file", L"Nie można otworzyć pliku opcji domyślnych"); + addPair("Cannot open project option file", L"Nie można otworzyć pliku opcji projektu"); addPair("Cannot open directory", L"Nie można otworzyć katalogu"); addPair("Cannot open HTML file %s\n", L"Nie można otworzyć pliku HTML %s\n"); addPair("Command execute failure", L"Wykonaj polecenia niepowodzenia"); @@ -896,7 +952,7 @@ addPair("No file to process %s\n", L"Brak pliku do procesu %s\n"); addPair("Did you intend to use --recursive", L"Czy masz zamiar używać --recursive"); addPair("Cannot process UTF-32 encoding", L"Nie można procesu kodowania UTF-32"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style został zakończony"); + addPair("Artistic Style has terminated\n", L"Artistic Style został zakończony\n"); } Portuguese::Portuguese() // Português @@ -905,18 +961,21 @@ addPair("Formatted %s\n", L"Formatado %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Inalterado %s\n"); // should align with formatted addPair("Directory %s\n", L"Diretório %s\n"); + addPair("Default option file %s\n", L"Arquivo de opção padrão %s\n"); + addPair("Project option file %s\n", L"Arquivo de opção de projeto %s\n"); addPair("Exclude %s\n", L"Excluir %s\n"); addPair("Exclude (unmatched) %s\n", L"Excluir (incomparável) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formatado %s inalterado "); addPair(" seconds ", L" segundo "); addPair("%d min %d sec ", L"%d min %d seg "); addPair("%s lines\n", L"%s linhas\n"); - addPair("Using default options file %s\n", L"Usando o arquivo de opções padrão %s\n"); addPair("Opening HTML documentation %s\n", L"Abrindo a documentação HTML %s\n"); - addPair("Invalid option file options:", L"Opções de arquivo inválido opção:"); + addPair("Invalid default options:", L"Opções padrão inválidas:"); + addPair("Invalid project options:", L"Opções de projeto inválidas:"); addPair("Invalid command line options:", L"Opções de linha de comando inválida:"); addPair("For help on options type 'astyle -h'", L"Para obter ajuda sobre as opções de tipo 'astyle -h'"); - addPair("Cannot open options file", L"Não é possível abrir arquivo de opções"); + addPair("Cannot open default option file", L"Não é possível abrir o arquivo de opção padrão"); + addPair("Cannot open project option file", L"Não é possível abrir o arquivo de opção do projeto"); addPair("Cannot open directory", L"Não é possível abrir diretório"); addPair("Cannot open HTML file %s\n", L"Não é possível abrir arquivo HTML %s\n"); addPair("Command execute failure", L"Executar falha de comando"); @@ -927,7 +986,7 @@ addPair("No file to process %s\n", L"Nenhum arquivo para processar %s\n"); addPair("Did you intend to use --recursive", L"Será que você pretende usar --recursive"); addPair("Cannot process UTF-32 encoding", L"Não pode processar a codificação UTF-32"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style terminou"); + addPair("Artistic Style has terminated\n", L"Artistic Style terminou\n"); } Romanian::Romanian() // Română @@ -936,18 +995,21 @@ addPair("Formatted %s\n", L"Formatat %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Neschimbat %s\n"); // should align with formatted addPair("Directory %s\n", L"Director %s\n"); + addPair("Default option file %s\n", L"Fișier opțional implicit %s\n"); + addPair("Project option file %s\n", L"Fișier opțiune proiect %s\n"); addPair("Exclude %s\n", L"Excludeți %s\n"); addPair("Exclude (unmatched) %s\n", L"Excludeți (necompensată) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formatat %s neschimbat "); addPair(" seconds ", L" secunde "); addPair("%d min %d sec ", L"%d min %d sec "); addPair("%s lines\n", L"%s linii\n"); - addPair("Using default options file %s\n", L"Fișier folosind opțiunile implicite %s\n"); addPair("Opening HTML documentation %s\n", L"Documentație HTML deschidere %s\n"); - addPair("Invalid option file options:", L"Opțiuni de opțiune de fișier nevalide:"); + addPair("Invalid default options:", L"Opțiuni implicite nevalide:"); + addPair("Invalid project options:", L"Opțiunile de proiect nevalide:"); addPair("Invalid command line options:", L"Opțiuni de linie de comandă nevalide:"); addPair("For help on options type 'astyle -h'", L"Pentru ajutor cu privire la tipul de opțiuni 'astyle -h'"); - addPair("Cannot open options file", L"Nu se poate deschide fișierul de opțiuni"); + addPair("Cannot open default option file", L"Nu se poate deschide fișierul cu opțiuni implicite"); + addPair("Cannot open project option file", L"Nu se poate deschide fișierul cu opțiuni de proiect"); addPair("Cannot open directory", L"Nu se poate deschide directorul"); addPair("Cannot open HTML file %s\n", L"Nu se poate deschide fișierul HTML %s\n"); addPair("Command execute failure", L"Comandă executa eșec"); @@ -958,7 +1020,7 @@ addPair("No file to process %s\n", L"Nu există un fișier pentru a procesa %s\n"); addPair("Did you intend to use --recursive", L"V-ați intenționați să utilizați --recursive"); addPair("Cannot process UTF-32 encoding", L"Nu se poate procesa codificarea UTF-32"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style a terminat"); + addPair("Artistic Style has terminated\n", L"Artistic Style a terminat\n"); } Russian::Russian() // русский @@ -967,18 +1029,21 @@ addPair("Formatted %s\n", L"Форматированный %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"без изменений %s\n"); // should align with formatted addPair("Directory %s\n", L"каталог %s\n"); + addPair("Default option file %s\n", L"Файл с опцией по умолчанию %s\n"); + addPair("Project option file %s\n", L"Файл опций проекта %s\n"); addPair("Exclude %s\n", L"исключать %s\n"); addPair("Exclude (unmatched) %s\n", L"Исключить (непревзойденный) %s\n"); addPair(" %s formatted %s unchanged ", L" %s Форматированный %s без изменений "); addPair(" seconds ", L" секунды "); addPair("%d min %d sec ", L"%d мин %d сек "); addPair("%s lines\n", L"%s линий\n"); - addPair("Using default options file %s\n", L"Использование опции по умолчанию файл %s\n"); addPair("Opening HTML documentation %s\n", L"Открытие HTML документации %s\n"); - addPair("Invalid option file options:", L"Недопустимый файл опций опцию:"); + addPair("Invalid default options:", L"Недействительные параметры по умолчанию:"); + addPair("Invalid project options:", L"Недопустимые параметры проекта:"); addPair("Invalid command line options:", L"Недопустимые параметры командной строки:"); addPair("For help on options type 'astyle -h'", L"Для получения справки по 'astyle -h' опций типа"); - addPair("Cannot open options file", L"Не удается открыть файл параметров"); + addPair("Cannot open default option file", L"Не удается открыть файл параметров по умолчанию"); + addPair("Cannot open project option file", L"Не удается открыть файл опций проекта"); addPair("Cannot open directory", L"Не могу открыть каталог"); addPair("Cannot open HTML file %s\n", L"Не удается открыть файл HTML %s\n"); addPair("Command execute failure", L"Выполнить команду недостаточности"); @@ -989,7 +1054,7 @@ addPair("No file to process %s\n", L"Нет файлов для обработки %s\n"); addPair("Did you intend to use --recursive", L"Неужели вы собираетесь использовать --recursive"); addPair("Cannot process UTF-32 encoding", L"Не удается обработать UTF-32 кодировке"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style прекратил"); + addPair("Artistic Style has terminated\n", L"Artistic Style прекратил\n"); } Spanish::Spanish() // Español @@ -998,18 +1063,21 @@ addPair("Formatted %s\n", L"Formato %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Inalterado %s\n"); // should align with formatted addPair("Directory %s\n", L"Directorio %s\n"); + addPair("Default option file %s\n", L"Archivo de opciones predeterminado %s\n"); + addPair("Project option file %s\n", L"Archivo de opciones del proyecto %s\n"); addPair("Exclude %s\n", L"Excluir %s\n"); addPair("Exclude (unmatched) %s\n", L"Excluir (incomparable) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formato %s inalterado "); addPair(" seconds ", L" segundo "); addPair("%d min %d sec ", L"%d min %d seg "); addPair("%s lines\n", L"%s líneas\n"); - addPair("Using default options file %s\n", L"Uso de las opciones por defecto del archivo %s\n"); addPair("Opening HTML documentation %s\n", L"Apertura de documentación HTML %s\n"); - addPair("Invalid option file options:", L"Opción no válida opciones de archivo:"); + addPair("Invalid default options:", L"Opciones predeterminadas no válidas:"); + addPair("Invalid project options:", L"Opciones de proyecto no válidas:"); addPair("Invalid command line options:", L"No válido opciones de línea de comando:"); addPair("For help on options type 'astyle -h'", L"Para obtener ayuda sobre las opciones tipo 'astyle -h'"); - addPair("Cannot open options file", L"No se puede abrir el archivo de opciones"); + addPair("Cannot open default option file", L"No se puede abrir el archivo de opciones predeterminado"); + addPair("Cannot open project option file", L"No se puede abrir el archivo de opciones del proyecto"); addPair("Cannot open directory", L"No se puede abrir el directorio"); addPair("Cannot open HTML file %s\n", L"No se puede abrir el archivo HTML %s\n"); addPair("Command execute failure", L"Ejecutar el fracaso de comandos"); @@ -1020,7 +1088,7 @@ addPair("No file to process %s\n", L"No existe el fichero a procesar %s\n"); addPair("Did you intend to use --recursive", L"Se va a utilizar --recursive"); addPair("Cannot process UTF-32 encoding", L"No se puede procesar la codificación UTF-32"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style ha terminado"); + addPair("Artistic Style has terminated\n", L"Artistic Style ha terminado\n"); } Swedish::Swedish() // Svenska @@ -1029,18 +1097,21 @@ addPair("Formatted %s\n", L"Formaterade %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"Oförändrade %s\n"); // should align with formatted addPair("Directory %s\n", L"Katalog %s\n"); + addPair("Default option file %s\n", L"Standardalternativsfil %s\n"); + addPair("Project option file %s\n", L"Projektalternativ fil %s\n"); addPair("Exclude %s\n", L"Uteslut %s\n"); addPair("Exclude (unmatched) %s\n", L"Uteslut (oöverträffad) %s\n"); addPair(" %s formatted %s unchanged ", L" %s formaterade %s oförändrade "); addPair(" seconds ", L" sekunder "); addPair("%d min %d sec ", L"%d min %d sek "); addPair("%s lines\n", L"%s linjer\n"); - addPair("Using default options file %s\n", L"Använda standardalternativ fil %s\n"); addPair("Opening HTML documentation %s\n", L"Öppna HTML-dokumentation %s\n"); - addPair("Invalid option file options:", L"Ogiltigt alternativ fil alternativ:"); + addPair("Invalid default options:", L"Ogiltiga standardalternativ:"); + addPair("Invalid project options:", L"Ogiltiga projektalternativ:"); addPair("Invalid command line options:", L"Ogiltig kommandoraden alternativ:"); addPair("For help on options type 'astyle -h'", L"För hjälp om alternativ typ 'astyle -h'"); - addPair("Cannot open options file", L"Kan inte öppna inställningsfilen"); + addPair("Cannot open default option file", L"Kan inte öppna standardalternativsfilen"); + addPair("Cannot open project option file", L"Kan inte öppna projektalternativsfilen"); addPair("Cannot open directory", L"Kan inte öppna katalog"); addPair("Cannot open HTML file %s\n", L"Kan inte öppna HTML-filen %s\n"); addPair("Command execute failure", L"Utför kommando misslyckande"); @@ -1051,7 +1122,7 @@ addPair("No file to process %s\n", L"Ingen fil att bearbeta %s\n"); addPair("Did you intend to use --recursive", L"Har du för avsikt att använda --recursive"); addPair("Cannot process UTF-32 encoding", L"Kan inte hantera UTF-32 kodning"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style har upphört"); + addPair("Artistic Style has terminated\n", L"Artistic Style har upphört\n"); } Ukrainian::Ukrainian() // Український @@ -1060,18 +1131,21 @@ addPair("Formatted %s\n", L"форматований %s\n"); // should align with unchanged addPair("Unchanged %s\n", L"без змін %s\n"); // should align with formatted addPair("Directory %s\n", L"Каталог %s\n"); + addPair("Default option file %s\n", L"Файл параметра за замовчуванням %s\n"); + addPair("Project option file %s\n", L"Файл варіанту проекту %s\n"); addPair("Exclude %s\n", L"Виключити %s\n"); addPair("Exclude (unmatched) %s\n", L"Виключити (неперевершений) %s\n"); addPair(" %s formatted %s unchanged ", L" %s відформатований %s без змін "); addPair(" seconds ", L" секунди "); addPair("%d min %d sec ", L"%d хви %d cek "); addPair("%s lines\n", L"%s ліній\n"); - addPair("Using default options file %s\n", L"Використання файлів опцій за замовчуванням %s\n"); addPair("Opening HTML documentation %s\n", L"Відкриття HTML документації %s\n"); - addPair("Invalid option file options:", L"Неприпустимий файл опцій опцію:"); + addPair("Invalid default options:", L"Недійсні параметри за умовчанням:"); + addPair("Invalid project options:", L"Недійсні параметри проекту:"); addPair("Invalid command line options:", L"Неприпустима параметри командного рядка:"); addPair("For help on options type 'astyle -h'", L"Для отримання довідки по 'astyle -h' опцій типу"); - addPair("Cannot open options file", L"Не вдається відкрити файл параметрів"); + addPair("Cannot open default option file", L"Неможливо відкрити файл параметрів за замовчуванням"); + addPair("Cannot open project option file", L"Неможливо відкрити файл параметрів проекту"); addPair("Cannot open directory", L"Не можу відкрити каталог"); addPair("Cannot open HTML file %s\n", L"Не вдається відкрити файл HTML %s\n"); addPair("Command execute failure", L"Виконати команду недостатності"); @@ -1082,7 +1156,7 @@ addPair("No file to process %s\n", L"Немає файлів для обробки %s\n"); addPair("Did you intend to use --recursive", L"Невже ви збираєтеся використовувати --recursive"); addPair("Cannot process UTF-32 encoding", L"Не вдається обробити UTF-32 кодуванні"); - addPair("\nArtistic Style has terminated", L"\nArtistic Style припинив"); + addPair("Artistic Style has terminated\n", L"Artistic Style припинив\n"); } diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASLocalizer.h 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // ASLocalizer.h -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -10,6 +10,13 @@ #include #include +// library builds do not need ASLocalizer +#ifdef ASTYLE_JNI + #ifndef ASTYLE_LIB // ASTYLE_LIB must be defined for ASTYLE_JNI + #define ASTYLE_LIB + #endif +#endif // ASTYLE_JNI + namespace astyle { using namespace std; @@ -63,6 +70,7 @@ Translation() {} virtual ~Translation() {} string convertToMultiByte(const wstring& wideStr) const; + string getTranslationString(size_t i) const; size_t getTranslationVectorSize() const; bool getWideTranslation(const string& stringIn, wstring& wideOut) const; string& translate(const string& stringIn) const; diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASResource.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASResource.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/ASResource.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/ASResource.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // ASResource.cpp -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -36,6 +36,7 @@ const string ASResource::AS_END = string("end"); const string ASResource::AS_ENUM = string("enum"); const string ASResource::AS_EXTERN = string("extern"); +const string ASResource::AS_FINAL = string("final"); const string ASResource::AS_FINALLY = string("finally"); const string ASResource::AS_FIXED = string("fixed"); const string ASResource::AS_FOR = string("for"); @@ -593,10 +594,11 @@ if (fileType == C_TYPE) { preCommandHeaders->emplace_back(&AS_CONST); - preCommandHeaders->emplace_back(&AS_VOLATILE); + preCommandHeaders->emplace_back(&AS_FINAL); preCommandHeaders->emplace_back(&AS_INTERRUPT); preCommandHeaders->emplace_back(&AS_NOEXCEPT); preCommandHeaders->emplace_back(&AS_OVERRIDE); + preCommandHeaders->emplace_back(&AS_VOLATILE); preCommandHeaders->emplace_back(&AS_SEALED); // Visual C only preCommandHeaders->emplace_back(&AS_AUTORELEASEPOOL); // Obj-C only } @@ -779,6 +781,8 @@ char prevCh = ' '; if (i > 0) prevCh = line[i - 1]; + if (i > 1 && line[i - 2] == '\\') + prevCh = ' '; if (!isLegalNameChar(prevCh) && isLegalNameChar(line[i])) return true; return false; diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.h 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // astyle.h -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -39,6 +39,10 @@ #pragma warn -8004 // variable is assigned a value that is never used #endif +#ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wconversion" +#endif + #ifdef __INTEL_COMPILER #pragma warning(disable: 383) // value copied to temporary, reference to temporary used #pragma warning(disable: 981) // operands are evaluated in unspecified order @@ -74,7 +78,7 @@ STYLE_STROUSTRUP, STYLE_WHITESMITH, STYLE_VTK, - STYLE_BANNER, + STYLE_RATLIFF, STYLE_GNU, STYLE_LINUX, STYLE_HORSTMANN, @@ -94,7 +98,7 @@ RUN_IN_MODE // broken braces }; -// maximun value for int is 16,384 (total value of 32,767) +// maximum value for int is 16,384 (total value of 32,767) enum BraceType { NULL_TYPE = 0, @@ -151,9 +155,10 @@ enum FileEncoding { - ENCODING_8BIT, + ENCODING_8BIT, // includes UTF-8 without BOM + UTF_8BOM, // UTF-8 with BOM UTF_16BE, - UTF_16LE, // Windows default + UTF_16LE, // Windows default UTF_32BE, UTF_32LE }; @@ -182,6 +187,7 @@ public: ASSourceIterator() {} virtual ~ASSourceIterator() {} + virtual streamoff getPeekStart() const = 0; virtual int getStreamLength() const = 0; virtual bool hasMoreLines() const = 0; virtual string nextLine(bool emptyLineWasDeleted = false) = 0; @@ -250,7 +256,8 @@ static const string AS_END; static const string AS_SELECTOR; static const string AS_EXTERN, AS_ENUM; - static const string AS_STATIC, AS_CONST, AS_SEALED, AS_OVERRIDE, AS_VOLATILE, AS_NEW, AS_DELETE; + static const string AS_FINAL, AS_OVERRIDE; + static const string AS_STATIC, AS_CONST, AS_SEALED, AS_VOLATILE, AS_NEW, AS_DELETE; static const string AS_NOEXCEPT, AS_INTERRUPT, AS_AUTORELEASEPOOL; static const string AS_WHERE, AS_LET, AS_SYNCHRONIZED; static const string AS_OPERATOR, AS_TEMPLATE; @@ -421,6 +428,7 @@ int adjustIndentCountForBreakElseIfComments() const; int computeObjCColonAlignment(const string& line, int colonAlignPosition) const; int convertTabToSpaces(int i, int tabIncrementIn) const; + int findObjCColonAlignment(const string& line) const; int getContinuationIndentAssign(const string& line, size_t currPos) const; int getContinuationIndentComma(const string& line, size_t currPos) const; int getObjCFollowingKeyword(const string& line, int bracePos) const; @@ -428,6 +436,7 @@ bool isLineEndComment(const string& line, int startPos) const; bool isPreprocessorConditionalCplusplus(const string& line) const; bool isInPreprocessorUnterminatedComment(const string& line); + bool isTopLevel() const; bool statementEndsWithComma(const string& line, int index) const; const string& getIndentedLineReturn(const string& newLine, const string& originalLine) const; string getIndentedSpaceEquivalent(const string& line_) const; @@ -453,7 +462,7 @@ vector* activeBeautifierStackLengthStack; vector* headerStack; vector* >* tempStacks; - vector* squareBracketDepthStack; + vector* parenDepthStack; vector* blockStatementStack; vector* parenStatementStack; vector* braceBlockStateStack; @@ -501,6 +510,7 @@ bool isInEnum; bool isInEnumTypeID; bool isInLet; + bool isInTrailingReturnType; bool modifierIndent; bool switchIndent; bool caseIndent; @@ -679,6 +689,10 @@ void setCloseTemplatesMode(bool state); void setCommaPaddingMode(bool state); void setDeleteEmptyLinesMode(bool state); + void setBreakReturnType(bool state); + void setBreakReturnTypeDecl(bool state); + void setAttachReturnType(bool state); + void setAttachReturnTypeDecl(bool state); void setIndentCol1CommentsMode(bool state); void setLineEndFormat(LineEndFormat fmt); void setMaxCodeLength(int max); @@ -698,7 +712,7 @@ size_t getChecksumOut() const; int getChecksumDiff() const; int getFormatterFileType() const; - // retained for compatability with release 2.06 + // retained for compatibility with release 2.06 // "Brackets" have been changed to "Braces" in 3.0 // they are referenced only by the old "bracket" options void setAddBracketsMode(bool state); @@ -738,10 +752,12 @@ bool isMultiStatementLine() const; bool isNextWordSharpNonParenHeader(int startChar) const; bool isNonInStatementArrayBrace() const; + bool isNumericVariable(string word) const; bool isOkToSplitFormattedLine(); bool isPointerOrReference() const; bool isPointerOrReferenceCentered() const; bool isPointerOrReferenceVariable(const string& word) const; + bool isPointerToPointer(const string& line, int currPos) const; bool isSharpStyleWithParen(const string* header) const; bool isStructAccessModified(const string& firstLine, size_t index) const; bool isIndentablePreprocessorBlock(const string& firstLine, size_t index); @@ -775,6 +791,7 @@ void clearFormattedLineSplitPoints(); void convertTabToSpaces(); void deleteContainer(vector*& container); + void findReturnTypeSplitPoint(const string& firstLine); void formatArrayRunIn(); void formatRunIn(); void formatArrayBraces(BraceType braceType, bool isOpeningArrayBrace); @@ -865,6 +882,10 @@ size_t formattedLineCommentNum; // comment location on formattedLine size_t leadingSpaces; size_t maxCodeLength; + size_t methodAttachCharNum; + size_t methodAttachLineNum; + size_t methodBreakCharNum; + size_t methodBreakLineNum; // possible split points size_t maxSemi; // probably a 'for' statement @@ -966,10 +987,12 @@ bool isInObjCMethodDefinition; bool isInObjCInterface; bool isInObjCReturnType; + bool isInObjCParam; bool isInObjCSelector; bool breakCurrentOneLineBlock; bool shouldRemoveNextClosingBrace; bool isInBraceRunIn; + bool returnTypeChecked; bool currentLineBeginsWithBrace; bool attachClosingBraceMode; bool shouldBreakOneLineBlocks; @@ -990,6 +1013,10 @@ bool shouldPadParamType; bool shouldUnPadParamType; bool shouldDeleteEmptyLines; + bool shouldBreakReturnType; + bool shouldBreakReturnTypeDecl; + bool shouldAttachReturnType; + bool shouldAttachReturnTypeDecl; bool needHeaderOpeningBrace; bool shouldBreakLineAtNextChar; bool shouldKeepLineUnbroken; diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.html codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.html --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.html 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle.html 2018-01-15 20:56:41.000000000 +0000 @@ -28,11 +28,38 @@ span.option { color: saddlebrown; font-weight: bold; } + + + + -

Artistic Style 3.0

+ + +

Artistic Style 3.1

A Free, Fast, and Small Automatic Formatter
@@ -50,7 +77,7 @@

Options

- Options File

+ Option Files

Disable Formatting

@@ -65,7 +92,7 @@ style=stroustrup    style=whitesmith    style=vtk    - style=banner    + style=ratliff    style=gnu    style=linux    style=horstmann    @@ -138,6 +165,8 @@ add‑braces    add‑one‑line‑braces    remove‑braces    + break‑return‑type    + attach‑return‑type    keep‑one‑line‑blocks    keep‑one‑line‑statements    convert‑tabs    @@ -178,13 +207,15 @@

Command Line Only

- options    - options=none    + options    + project    ascii    version    help    html    html=    + stdin=    + stdout=   

 

@@ -212,9 +243,8 @@

Artistic Style can process directories recursively. Wildcards (such as "*.cpp" or "*.c??") are processed internally. If a shell is used, it should pass the wildcards to Artistic Style instead of resolving them first. For Linux - use - double quotes around paths whose file name contains wildcards. For Windows use double quotes around paths whose - file name contains spaces. The recursive option in the + use double quotes around paths whose file name contains wildcards. For Windows use double quotes around paths + whose file name contains spaces. The recursive option in the Other Options section contains information on recursive processing.

File Names

@@ -252,17 +282,17 @@ The names of special characters used in programming vary by region. The terminology used by Artistic Style, followed by other common names, is:

- braces { } ‑ also called curly braces, brackets, or curly brackets.
- parens ( ) ‑ also called parentheses, brackets, round brackets, circle brackets, or soft brackets.
+ braces or curly braces { } ‑ also called brackets, or curly brackets.
+ parens or round brackets ( ) ‑ also called parentheses, brackets, circle brackets, or soft brackets.
square brackets [ ] ‑ also called block parens, brackets, closed brackets, or hard brackets.
angle brackets < > ‑ also called brackets, pointy brackets, triangular brackets, diamond brackets, tuples, or chevrons.

- Visual Studio, and possibly other development environments, has an Edit option "Align Assignments" that will align - assignment operators across multiple lines. There is also an extension named "Code alignment" that will align - the code on other items as well. Formatting with these options and extensions can be used with Artistic Style. - The space padding will be maintained and the alignment will be preserved.

+ Visual Studio, and possibly other development environments, has extensions that will align assignment operators + across multiple lines. There is an extension named "Code alignment" that will align the code on other items as + well. Formatting with these options and extensions can be used with Artistic Style. The space padding will be + maintained and the alignment will be preserved.

Artistic Style can format standard class library statements such as Open GL, wxWidgets, Qt, and MFC.

@@ -276,11 +306,9 @@ Unicode files encoded as UTF‑16, both big and little endian, will be formatted. The files must begin with a byte order mark (BOM) to be recognized. Files encoded as UTF‑32 will be rejected. Some compilers do not support these encodings. These files can be converted to UTF‑8 encoding with the program "iconv". There - are Linux and Windows versions available (the Windows version does not seem to work for all encodings). A sample - command line is "iconv ‑f  UTF‑16 ‑t UTF‑8 < filein.cpp > fileout.cpp. Visual - Studio can convert the files from the "File > Advanced Save Options" menu. Then select encoding "Unicode (UTF‑8 - with signature) - Codepage 65001". There are other development environments and text editors, such as SciTE, that - can convert files to UTF‑8.

+ are Linux and Windows versions available (the Windows version does not seem to work for all encodings). Visual + Studio can convert the files from the "File > Advanced Save Options" menu. There are other development environments + and text editors, such as SciTE, that can convert files to UTF‑8.

Embedded statements that are multiple-line and are NOT in a C-type format, such as Python, are usually mal-formatted (a C-type format has blocks enclosed by braces and statements terminated by a semi-colon). Macros that define @@ -297,8 +325,7 @@

Quick Start

- If you have never used Artistic Style there are a - several of ways to start.

+ If you have never used Artistic Style, there are several of ways to get started.

One is to run it with no options at all. This will use the default brace style, 4 spaces per indent, and no formatting changes. This will break the braces for one @@ -312,8 +339,8 @@ as described above.

A third option is to use an options file from the "file" folder. If there is a coding style you want - to duplicate, input the appropriate options file. Use the option - options=#### to specify the file to use. It must contain a path for the file, including + to duplicate, input the appropriate option file. Use the option + options=#### to specify the file to use. It must contain a path for the file, including the file name.

Once you are familiar with the options you can customize the format to your personal preference.

@@ -325,12 +352,14 @@

Usage

+

Command Line

+

Artistic style is a console program that receives information from the command line.

Command line format:

-
astyle  [OPTIONS]  SourceFile1  SourceFile2  SourceFile3  [ . . . ]
+
astyle  [OPTIONS]  SourceFilePath1  SourceFilePath2  SourceFilePath3  [ . . . ]

The square brackets [ ] indicate that more than one option or more than one file name can be entered. They are @@ -338,23 +367,43 @@

Example to format a single file:

-
astyle  --style=allman  /home/user/project/foo.cpp
+        
astyle  --style=allman  /home/project/foo.cpp
 

- Example to format all .cpp and .h files recursively:

-
astyle  --style=allman --recursive  /home/user/project/*.cpp  /home/user/project/*.h
+            Example to format C# files recursively:

+
astyle  --style=allman  --recursive  /home/project/*.cs
 
+ +

File Extensions

+ +

+ Multiple file extensions may be used if separated by commas or semicolons. An optional space may follow if the + entire file path is enclosed in double quotes. There is no limit to the number of extensions used. +

+
+

+ Example to format C++ files recursively using multiple file extensions:

+
astyle  --style=allman  --recursive  /home/project/*.cpp,*.h
+
+
+ +

Redirection

+

The < and > characters may be used to redirect the files into standard input (stdin) and out of standard output - (stdout) - don't forget them! With this option only one file at a time can be formatted. Wildcards are not - recognized, there are no console messages, and a backup is not created. On Windows the output will always have - Windows line ends.

+ (stdout) - don't forget them! With this option, only one file at a time can be formatted. Wildcards are not + recognized, there are no console messages, and a backup is not created. On Windows, the output will always have + Windows line ends. The options "stdin=" and "stdout=" can be used instead of redirection.

Example of redirection option to format a single file and change the name:

astyle --style=allman < OriginalSourceFile > BeautifiedSourceFile
 
+

+ Example of redirection using "stdin=" and "stdout=" to format a single file and change the name:

+
astyle --style=allman --stdin=OriginalSourceFile --stdout=BeautifiedSourceFile
+

@@ -374,7 +423,7 @@ Not specifying any options will result in the default brace style, 4 spaces per indent, and no formatting changes.

- Options may be written in two different ways.

+ This program follows the usual GNU command line syntax. Options may be written two different ways.

Long options

@@ -393,33 +442,59 @@ -

Options File

+

Option Files

- An OPTIONAL, default options file may be used to supplement or replace the command line options. 

-
    -
  • The command line options have precedence. If there is a conflict between a command line option and an option in - the default options file, the command line option will be used. + An OPTIONAL default option file and/or project option file may be used to supplement or replace the command + line options. They may use the computer's standard encoding, UTF-8 or UTF-16 unicode encoding.

    +

    + Options may be set apart by new-lines, tabs, commas, or spaces. Long options in the option file may be written + without the preceding '--'. Lines within the option file that begin with '#' are considered line-comments. + The option files used in formatting and their location can be displayed by using the --verbose + option.

    +
      +
    1. The command line options have precedence. If there is a conflict between a command line option + and an option in a default or project file, the command line option will be used. +
    2. +
    3. The project option file has precedence over the default option file but not the command line + options. The project option file should be in the top directory of the project being formatted. The file is identified + by a file name only. One of the command line project options must be used to indicate + a file is available, or it must be referred to by the environment variable. Artistic Style looks for the file + in the current directory or one of its parent directories in the following order. +
        +
      • the file name indicated by the --project= command line option.
      • +
      • the file named .astylerc or _ astylerc.
      • +
      • the file name identified by the environment variable ARTISTIC_STYLE_PROJECT_OPTIONS if it exists.
      • +
      • the file or environment variable can be disabled by specifying --project=none on the command line.
      • +
      + The file is expected to be in the top directory of the project being formatted. Only one file will be used per + execution and all files to be formatted are assumed to be in the same project. Artistic Style will search + backward in the directory path to find the project option file. The initial directory path for the search is obtained + from one of the following locations in the following order. +
        +
      • The first SourceFilePath entered on the command line.
      • +
      • The value of "--stdin=" if it is used for redirection.
      • +
      • The current directory if "<" is used for rediredction. If the file to be formatted is not in the current + directory, use the "--stdin=" option instead.
      • +
    4. -
    5. Artistic Style looks for this file in the following locations (in order): -
        -
      1. the file indicated by the --options= command line option;
      2. -
      3. the file and directory indicated by the environment variable ARTISTIC_STYLE_OPTIONS (if it exists);
      4. -
      5. the file named .astylerc in the directory pointed to by the HOME environment variable (e.g. "$HOME/.astylerc" - on Linux); -
      6. -
      7. the file named astylerc in the directory pointed to by the USERPROFILE environment variable (e.g. "%USERPROFILE%\astylerc" - on Windows). -
      8. -
      +
    6. The default option file can be used for all projects. The file is identified by a file path and + a file name. One of the command line options must be used to indicate a file is available, + or it must be referred to by the environment variable. Artistic Style looks for a file path and file name in the + following order. +
        +
      • the file path indicated by the --options= command line option.
      • +
      • the file path indicated by the environment variable ARTISTIC_STYLE_OPTIONS if it exists.
      • +
      • the file named .astylerc in the directory pointed to by the HOME environment variable + (e.g. "$HOME/.astylerc" on Linux);
      • +
      • the file named astylerc in the directory pointed to by the APPDATA environment variable + (e.g. "%APPDATA%\astylerc" on Windows).
      • +
      • the file or environment variable can be disabled by specifying --options=none on the command line.
      • +
    7. -
    8. This option file lookup can be disabled by specifying --options=none on the command line.
    9. -
    10. Options may be set apart by new-lines, tabs, commas, or spaces.
    11. -
    12. Long options in the options file may be written without the preceding '--'.
    13. -
    14. Lines within the options file that begin with '#' are considered line-comments.
    15. -
+

- Example of a default options file:

+ Example of a default or project option file:

# this line is a comment
 --style=allman      # this is a line-end comment
@@ -452,8 +527,8 @@
     

The beginning tag is "*INDENT-OFF*" and the ending tag is "*INDENT-ON*". They may be used anywhere in the program with the condition that parsing is partially disabled between the - tags. Disabling partial statements may result in incorrect formatting after the ending tag. If this happens expand - the tags to include additional code.

+ tags. Disabling partial statements may result in incorrect formatting after the ending tag. If this happens, + expand the tags to include additional code.

The following retains the format of a preprocessor define:

@@ -475,9 +550,9 @@ padded incorrectly, then disabling the formatting may be necessary. To avoid having to use the "disable block" tags above, a single line disable is available.

- A line-end comment tag "*NOPAD* will disable the "pad-oper", "align-pointer", and "align-reference" - options. Parsing does NOT stop and all other formatting will be applied to the line. The tag applies to the - one line only.

+ A line-end comment tag "*NOPAD*" will disable the "pad-oper", "align-pointer", and + "align-reference" options. Parsing does NOT stop and all other formatting will be applied to the line. + The tag applies to the one line only.

The following prevents the operator padding from changing:

@@ -503,8 +578,8 @@

Other brace styles are variations of these. Some will use variations on the placement of class, namespace, or other braces. (Stroustrup, Google, One True Brace, Lisp). Others will indent the braces (Whitesmith, VTK, - Banner, GNU). Still others will use run-in braces where the following statement is on the same line as the brace - (Horstmann, Pico).

+ Banner, and GNU). Others will use run-in braces where the following statement is on the same line as the + brace (Horstmann and Pico).

There are technical arguments for selecting one style over another. But the usual reason comes down to personal preference. Some like broken braces with vertical whitespace that makes the code easy to read. @@ -594,10 +669,11 @@  

--style=stroustrup / -A4
- Stroustrup style uses linux braces. Opening braces are broken from function definitions only. - The braces are attached to everything else, including namespaces, classes, arrays, structs, enums, - and statements within a function. This style frequently is used with headers broken from closing braces - (break-closing-braces) and an indent of 5 spaces.

+ Stroustrup style uses linux braces with closing headers broken from closing braces + (e.g. ‑‑break‑closing‑headers). Opening braces are broken from function definitions only. + The opening braces are attached to everything else, including namespaces, classes, arrays, structs, enums, and + statements within a function. This style frequently is used with "attach‑closing‑while", + tabbed indents, and an indent of 5 spaces.

int Foo(bool isBar)
 {
@@ -633,8 +709,9 @@
          

--style=vtk / -A15
- VTK (Visualization Toolkit) style uses broken, indented braces, except for the opening brace. Switch blocks - are indented to prevent a 'hanging indent' with following case statements.

+ VTK (Visualization Toolkit) style uses broken, indented braces, except for the opening brace of classes, + arrays, structs, enums, and function definitions.. Switch blocks are indented to prevent a 'hanging + indent' with following case statements.

int Foo(bool isBar)
 {
@@ -650,9 +727,9 @@
     

 

-

- --style=banner / -A6
- Banner style uses attached, indented braces. Switch blocks and class blocks are indented to prevent a 'hanging +

+ --style=ratliff / --style=banner / -A6
+ Ratliff style uses attached, indented braces. Switch blocks and class blocks are indented to prevent a 'hanging indent' with following case statements and C++ class modifiers (public, private, protected). 

int Foo(bool isBar) {
@@ -669,9 +746,9 @@
          

--style=gnu / -A7
- GNU style uses broken braces and indented blocks. Extra indentation is added to blocks within a - function only. Other braces and blocks are broken, but NOT indented. This style frequently is - used with an indent of 2 spaces.

+ GNU style uses broken braces. Extra indentation is added to blocks within a function + only. The entire block is indented, not just the brace. This style frequently is used with an indent of 2 + spaces.

int Foo(bool isBar)
 {
@@ -729,7 +806,7 @@
          

--style=1tbs / --style=otbs / -A10
- "One True Brace Style" uses linux braces and adds braces to unbraceed one line conditional statements. Opening + "One True Brace Style" uses linux braces and adds braces to unbraced one line conditional statements. Opening braces are broken from namespaces, classes, and function definitions. The braces are attached to everything else, including arrays, structs, enums, and statements within a function.

@@ -770,7 +847,7 @@ --style=mozilla / -A16
Mozilla style uses linux braces. Opening braces are broken from classes, structs, enums, and function definitions. The braces are attached to everything else, including namespaces, arrays, and statements - within a function. This style frequently is used with an indent of 2 spaces.

+ within a function. This style frequently is used with an indent of 2 spaces and --break-return-type.

int Foo(bool isBar)
 {
@@ -963,11 +1040,11 @@
          

--attach-inlines / -xl
- Attach braces to class and struct inline function definitions. This is not done for run-in type braces - (Horstmann and Pico styles). This option is effective for C++ files only.

+ Attach braces to class and struct inline function definitions. This option has precedence for all + styles except Horstmann and Pico (run-in styles). It is effective for C++ files only.

- all braces are always attached to class and struct inline function definitions:

+ all braces are attached to class and struct inline method definitions:

class FooClass
 {
     void Foo() {
@@ -1217,7 +1294,7 @@
     

--indent-continuation=# / -xt#
Set the continuation indent for a line that ends with an opening paren '(' or an assignment '='. This includes - function definitions and declarations. It will also modify the prevoius indent-after-paren option. The value for + function definitions and declarations. It will also modify the previous indent-after-paren option. The value for # indicates a number of indents. The valid values are the integer values from 0 thru 4. If this option is not used, the default value of 1 is used.

@@ -1379,7 +1456,7 @@ 3 - indent at least one-half an additional indent. This is intended for large indents (e.g. 8).
The default value is 2, two additional indents.

-
// default setting makes this non-braceed code clear
+        
// default setting makes this non-braced code clear
 if (a < b
         || c > d)
     foo++;
@@ -1411,9 +1488,8 @@
          

--max-continuation-indent=# / -M#
- --max-instatement-indent=# is depreciated
Set the  maximum of # spaces to indent a continuation line. The - # indicates a number of columns and must not be less than 40 nor + # indicates a number of columns and must not be less than 40 or greater than 120. If no value is set, the default value of 40 will be used. This option will prevent continuation lines from extending too far to the right. Setting a larger value will allow the code to be extended further to the right.

@@ -1523,12 +1599,12 @@ remain in the original column, if possible. Note that there is no option to unpad. Once padded, they stay padded.

-
if (isFoo(a,b)
+        
if (isFoo(a,b))
     bar(a,b);
 

becomes:

-
if (isFoo(a, b)
+        
if (isFoo(a, b))
     bar(a, b);
 
@@ -1576,7 +1652,7 @@ only. Parens that are empty will not be padded. Any end of line comments will remain in the original column, if possible. This can be used with unpad-paren below to remove unwanted spaces. If used with pad‑paren or pad‑paren‑out, this option will be ignored. If used with pad‑paren‑in, the result will - be the same as pad‑paren.

+ be the pad‑paren.

if (isFoo((a+2), b))
     bar(a, b);
@@ -1691,32 +1767,32 @@
     
char* foo1;
 char & foo2;
-String ^s1;
+string ^s1;

becomes (with align-pointer=type):

char* foo1;
 char& foo2;
-String^ s1;
+string^ s1;
char* foo1;
 char & foo2;
-String ^s1;
+string ^s1;

becomes (with align-pointer=middle):

char * foo1;
 char & foo2;
-String ^ s1;
+string ^ s1;
char* foo1;
 char & foo2;
-String ^s1;
+string ^s1;

becomes (with align-pointer=name):

char *foo1;
 char &foo2;
-String ^s1;
+string ^s1;

 

@@ -1757,9 +1833,7 @@

Formatting Options

- --break-closing-braces / -y
- --break-closing-brackets is depreciated
-
+ --break-closing-braces / -y
When used with --style=java, --style=kr, --style=stroustrup, --style=linux, or --style=1tbs, this breaks closing headers (e.g. 'else', 'catch', ...) from their immediately preceding closing braces. Closing header braces are always broken with the other styles.

@@ -1821,10 +1895,7 @@

 

- --break-one-line-headers / -xb -
-

-

+ --break-one-line-headers / -xb
Break one line headers (e.g. 'if', 'while', 'else', ...) from a statement residing on the same line. If the statement is enclosed in braces, the braces will be formatted according to the requested brace style.

@@ -1855,16 +1926,14 @@

 

- --add-braces / -j
- --add-brackets is depreciated
-
+ --add-braces / -j
Add braces to unbraced one line conditional statements (e.g. 'if', 'for', 'while'...). The statement must be on a single line. The braces will be added according to the requested brace style. If no style is requested the braces will be attached.

Braces will NOT be added to a multi-statement line if keep-one-line-statements is requested. Braces will - NOT be added to a one line block if keep-one-line-blocks is requested. If --add-one-line-braces is also - used, the result will be one line braces.

+ NOT be added to a one line block if keep-one-line-blocks is requested. If used with --add-one-line-braces, + the result will be one line braces.

if (isFoo)
     isFoo = false;
@@ -1879,9 +1948,7 @@
     

 

- --add-one-line-braces / -J
- --add-one-line-brackets is depreciated
-
+ --add-one-line-braces / -J
Add one line braces to unbraced one line conditional statements (e.g. 'if', 'for', 'while'...). The statement must be on a single line. The option implies --keep-one-line-blocks and will not break the one line blocks.

@@ -1898,9 +1965,7 @@

 

- --remove-braces / -xj
- --remove-brackets is depreciated
-
+ --remove-braces / -xj
Remove braces from conditional statements (e.g. 'if', 'for', 'while'...). The statement must be a single statement on a single line. If --add-braces or --add-one-line-braces is also used the result will be to add braces. Braces will not be removed from "One True Brace Style", @@ -1918,6 +1983,39 @@

 

+

+ --break-return-type      / -xB
+ --break-return-type-decl / -xD
+ Break the return type from the function name. The two options are for the function definitions (-xB), and the + function declarations or signatures (-xD). If used with --attach-return-type, the result will be to break the + return type. This option has no effect on Objective-C functions.

+
+
void Foo(bool isFoo);
+

+ becomes:

+
void
+Foo(bool isFoo);
+
+

+  

+

+ --attach-return-type      / -xf
+ --attach-return-type-decl / -xh
+ Attach the return type to the function name. The two options are for the function definitions (-xf), and the + function declarations or signatures (-xh). They are intended to undo the --break-return-type options. If used + with --break-return-type, the result will be to break the return type. This option has no effect on + Objective-C functions.

+
+
void
+Foo(bool isFoo);
+

+ becomes:

+
void Foo(bool isFoo);
+
+

+  

+ +

--keep-one-line-blocks / -O
@@ -1992,8 +2090,8 @@
--break-after-logical / -xL
The option max‑code‑length will break a line if the code exceeds # - characters. The valid values are 50 thru 200. Lines without logical conditionals will break on a logical conditional - (||, &&, ...), comma, paren, semicolon, or space.

+ characters. The valid values are 50 thru 200. Lines without logical conditionals + will break on a logical conditional (||, &&, ...), comma, paren, semicolon, or space.

Some code will not be broken, such as comments, quotes, and arrays. If used with keep‑one‑line‑blocks or add-one-line-braces the blocks will NOT be broken. If used with keep‑one‑line‑statements @@ -2001,9 +2099,9 @@ break point within the max code length, the line will be broken at the first available break point after the max code length.

- By default logical conditionals will be placed first in the new line. The option break‑after‑logical - will cause the logical conditionals to be placed last on the previous line. This option has no effect without - max‑code‑length.

+ By default logical conditionals will be placed first in the new line. The option + break‑after‑logical will cause the logical conditionals to be placed last on the + previous line. This option has no effect without max‑code‑length.

if (thisVariable1 == thatVariable1 || thisVariable2 == thatVariable2 || thisVariable3 == thatVariable3)
     bar();
@@ -2039,11 +2137,11 @@

Objective‑C Options

- These options are effective for Objective‑C files only. The paren padding options will still apply to the - Objective-C method prefix and return type unless overridden by the following options.

+ These options are effective for Objective‑C files only. The standard paren padding options will still apply + to the Objective-C method prefix and return type unless overridden by the following options.

Because of the longer indents sometimes needed for Objective‑C, the option "max-continuation-indent" may - need to be increased. If you are not getting the paren and square bracket alignment you want try increasing + need to be increased. If you are not getting the paren and square bracket alignment you want, try increasing this value. The option is described in the "Indentation Options" section.

--pad-method-prefix / -xQ
@@ -2105,9 +2203,9 @@  

--pad-param-type / -xS
- Insert space padding around the Objective‑C parameter type. This will add exactly one space. Any additional - spaces will be deleted. This has precedence over the pad method colon option and will always cause space padding - after the method colon.

+ Insert space padding around an Objective‑C parameter type. This will add exactly + one space. Any additional spaces will be deleted. This has precedence over the pad method colon option and + will always cause space padding after a method colon.

-(void)foo1:(bool)barArg1;
 -(void)foo2:    (bool)   barArg2;
@@ -2120,9 +2218,9 @@  

--unpad-param-type / -xs
- Remove all space padding around the Objective‑C parameter type. This option takes precedence over the pad - paren outside option. The pad method colon option has precedence over the opening paren. The - closing paren will always be unpadded.

+ Remove all space padding around an Objective‑C parameter type. This option takes precedence over the + pad paren outside option. The pad method colon option has precedence over the opening paren. + The closing paren will always be unpadded.

-(void)foo1: (bool)    barArg1;
 -(void)foo2:     (bool)    barArg2;
@@ -2208,7 +2306,7 @@

Other Options

- These are non-formatting options available for the command-line. They can also be included in an options + These are non-formatting options available for the command-line. They can also be included in an option file.

@@ -2234,11 +2332,11 @@

Excludes are matched from the end of the file path. An exclude option of "templates" will exclude ALL directories named "templates". An exclude option of "cpp/templates" will exclude ALL "cpp/templates" directories. You may - proceed backwards in the directory tree to exclude only the required directories.

+ proceed backward in the directory tree to exclude only the required directories.

Specific files may be excluded in the same manner. An exclude option of "default.cpp" will exclude ALL files named "default.cpp". An exclude option of "python/default.cpp" will exclude ALL files named "default.cpp" - contained in a "python" subdirectory. You may proceed backwards in the directory tree to exclude only the + contained in a "python" subdirectory. You may proceed backward in the directory tree to exclude only the required files.

Wildcards are NOT allowed. There may be more than one exclude statement. The file path and name may be placed @@ -2267,7 +2365,8 @@ file.

--verbose / -v
- Verbose display mode. Display optional information, such as release number, date, and statistical data.

+ Verbose display mode. Display optional information, such as release number, date, + option file locations, and statistical data.

--formatted / -Q
Formatted files display mode. Display only the files that have been formatted. Do not display files that @@ -2281,8 +2380,8 @@ --lineend=macold  / -z3
Force use of the specified line end style. Valid options are windows (CRLF), linux (LF), and macold (CR). MacOld - style is the format for Mac OS 9 and earlier. OS X uses the Linux style. If one of these options - is not used, the line ends will be determined automatically from the input file.

+ style is the format for Mac OS 9 and earlier. MacOS and OS X uses the Linux style. If one of + these options is not used, the line ends will be determined automatically from the input file.

When redirection is used on Windows the output will always have Windows line ends. This option will be ignored.

@@ -2295,13 +2394,33 @@

Command Line Only

These options are available for the command-line only. They are NOT available in an options file.

-

+ +

--options=####
- Specify an options file #### to read and use. It must contain a file path for the file. This will allow the file - name to be changed from astylerc or .astylerc.

-

--options=none
- Disable the default options file. Only the command-line parameters will be used.

+ Specify an options file #### to read and use. It must contain a file path and a file name. This will allow + the file name to be changed from astylerc or .astylerc.

+

+ The "none" option will disable the default options file if one exists. Only command-line parameters will be used. +

+

+ Further information is available in the Option Files section.

+

+ --project
+ --project=####
+ --project=none
+ Specify a project option file to use. The option file + should have  the default name of .astylerc or _astylerc and should be in the top directory of the project + being formatted.

+

+ Specify a project options file #### to use. It must contain a file name only without a directory path. + This will allow the project file name to be changed from .astylerc or _astylerc. It should be in the top directory + of the project being formatted.

+

+ The "none" option will disable a project options file if one exists. In this case, the project option file will + not be used.

+

+ Further information is available in the Option Files section.

--ascii / -I
The displayed output will be ASCII characters only. The text will be displayed in English and numbers will not @@ -2316,8 +2435,7 @@ options.

--html / -!
- Open the HTML help - file "astyle.html" in the default browser and quit. The short option must be by itself, it + Open the HTML help file "astyle.html" in the default browser and quit. The short option must be by itself, it cannot be concatenated with other options. The documentation must be installed in the standard install path (/usr/share/doc/astyle/html for Linux or %PROGRAMFILES%\AStyle\doc for Windows). If installed to a different path use html=###.

@@ -2325,7 +2443,7 @@ Open an HTML help file in the default browser using the file path #### and quit. An HTML file other than "astyle.help" may be specified. The path may include a directory path and a file name, or a file name only (e.g. html=install.html). If only a file name is used, it is assumed to be in the standard install path (/usr/share/doc/astyle/html - for Linux or %PROGRAMFILES%\AStyle\doc for Windows). In both cases the file name must include the html extension. + for Linux or %PROGRAMFILES%\AStyle\doc for Windows). In both cases, the file name must include the html extension. File paths containing spaces must be enclosed in quotes.

On Linux the HTML file is opened using the script "xdg-open" from the install package "xdg-utils". This should @@ -2333,6 +2451,14 @@

Any HTML file can be opened by this option. The files you are likely to need are astyle.html (the default), install.html, and index.html.

+

+ --stdin=####
+ Open a file using the file path #### as input to single file formatting. This is a replacement for redirection. + Do not use this with "<" redirection.

+

+ --stdout=####
+ Open a file using the file path #### as output from single file formatting. This is a replacement for redirection. + Do not use this with ">" redirection.

 


diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // astyle_main.cpp -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -94,11 +94,12 @@ jmethodID g_mid; #endif -const char* g_version = "3.0"; +const char* g_version = "3.1"; //----------------------------------------------------------------------------- // ASStreamIterator class -// typename will be istringstream for GUI and istream otherwise +// typename will be stringstream for AStyle +// it could be istream or wxChar for plug-ins //----------------------------------------------------------------------------- template @@ -206,6 +207,16 @@ inStream->clear(); } + // has not detected an input end of line + if (!eolWindows && !eolLinux && !eolMacOld) + { +#ifdef _WIN32 + eolWindows++; +#else + eolLinux++; +#endif + } + // set output end of line characters if (eolWindows >= eolLinux) { @@ -334,7 +345,6 @@ isFormattedOnly = false; ignoreExcludeErrors = false; ignoreExcludeErrorsDisplay = false; - optionsFileRequired = false; useAscii = false; // other variables bypassBrowserOpen = false; @@ -357,7 +367,7 @@ assert(lineEnd == LINEEND_WINDOWS || lineEnd == LINEEND_LINUX || lineEnd == LINEEND_MACOLD); const string& inStr = out.str(); // avoids strange looking syntax string outStr; // the converted output - int inLength = (int)inStr.length(); + int inLength = (int) inStr.length(); for (int pos = 0; pos < inLength; pos++) { if (inStr[pos] == '\r') @@ -454,7 +464,9 @@ { FileEncoding encoding = ENCODING_8BIT; - if (dataSize >= 4 && memcmp(data, "\x00\x00\xFE\xFF", 4) == 0) + if (dataSize >= 3 && memcmp(data, "\xEF\xBB\xBF", 3) == 0) + encoding = UTF_8BOM; + else if (dataSize >= 4 && memcmp(data, "\x00\x00\xFE\xFF", 4) == 0) encoding = UTF_32BE; else if (dataSize >= 4 && memcmp(data, "\xFF\xFE\x00\x00", 4) == 0) encoding = UTF_32LE; @@ -469,7 +481,7 @@ // error exit without a message void ASConsole::error() const { - (*errorStream) << _("\nArtistic Style has terminated") << endl; + (*errorStream) << _("Artistic Style has terminated\n") << endl; exit(EXIT_FAILURE); } @@ -483,7 +495,7 @@ /** * If no files have been given, use cin for input and cout for output. * - * This is used to format text for text editors like TextWrangler (Mac). + * This is used to format text for text editors. * Do NOT display any console messages when this function is used. */ void ASConsole::formatCinToCout() @@ -650,16 +662,47 @@ assert(formatter.getChecksumDiff() == 0); } -// build a vector of argv options -// the program path argv[0] is excluded -vector ASConsole::getArgvOptions(int argc, char** argv) const +/** + * Searches for a file named fileName_ in the current directory. If it is not + * found, recursively searches for fileName_ in the current directory's parent + * directories, returning the location of the first instance of fileName_ + * found. If fileName_ is not found, an empty string is returned. + * + * @param fileName_ The filename the function should attempt to locate. + * @return The full path to fileName_ in the current directory or + * nearest parent directory if found, otherwise an empty + * string. + */ +string ASConsole::findProjectOptionFilePath(const string& fileName_) const { - vector argvOptions; - for (int i = 1; i < argc; i++) + string parent; + + if (!fileNameVector.empty()) + parent = getFullPathName(fileNameVector.front()); + else if (!stdPathIn.empty()) + parent = getFullPathName(stdPathIn); + else + parent = getFullPathName(getCurrentDirectory(fileName_)); + + // remove filename from path + size_t endPath = parent.find_last_of(g_fileSeparator); + if (endPath != string::npos) + parent = parent.substr(0, endPath + 1); + + while (!parent.empty()) { - argvOptions.emplace_back(string(argv[i])); + string filepath = parent + fileName_; + if (fileExists(filepath.c_str())) + return filepath; + else if (fileName_ == ".astylerc") + { + filepath = parent + "_astylerc"; + if (fileExists(filepath.c_str())) + return filepath; + } + parent = getParentDirectory(parent); } - return argvOptions; + return string(); } // for unit testing @@ -731,8 +774,8 @@ { return noBackup; } // for unit testing -string ASConsole::getOptionsFileName() const -{ return optionsFileName; } +string ASConsole::getOptionFileName() const +{ return optionFileName; } // for unit testing vector ASConsole::getOptionsVector() const @@ -747,6 +790,21 @@ { return preserveDate; } // for unit testing +string ASConsole::getProjectOptionFileName() const +{ + assert(projectOptionFileName.length() > 0); + // remove the directory path + size_t start = projectOptionFileName.find_last_of(g_fileSeparator); + if (start == string::npos) + start = 0; + return projectOptionFileName.substr(start + 1); +} + +// for unit testing +vector ASConsole::getProjectOptionsVector() const +{ return projectOptionsVector; } + +// for unit testing string ASConsole::getStdPathIn() const { return stdPathIn; } @@ -769,11 +827,54 @@ errorStream = errStreamPtr; } +// build a vector of argv options +// the program path argv[0] is excluded +vector ASConsole::getArgvOptions(int argc, char** argv) const +{ + vector argvOptions; + for (int i = 1; i < argc; i++) + { + argvOptions.emplace_back(string(argv[i])); + } + return argvOptions; +} + string ASConsole::getParam(const string& arg, const char* op) { return arg.substr(strlen(op)); } +void ASConsole::getTargetFilenames(string& targetFilename_, + vector& targetFilenameVector) const +{ + size_t beg = 0; + size_t sep = 0; + while (beg < targetFilename_.length()) + { + // find next target + sep = targetFilename_.find_first_of(",;", beg); + if (sep == string::npos) + sep = targetFilename_.length(); + string fileExtension = targetFilename_.substr(beg, sep - beg); + beg = sep + 1; + // remove whitespace + while (fileExtension.length() > 0 + && (fileExtension[0] == ' ' || fileExtension[0] == '\t')) + fileExtension = fileExtension.erase(0, 1); + while (fileExtension.length() > 0 + && (fileExtension[fileExtension.length() - 1] == ' ' + || fileExtension[fileExtension.length() - 1] == '\t')) + fileExtension = fileExtension.erase(fileExtension.length() - 1, 1); + if (fileExtension.length() > 0) + targetFilenameVector.emplace_back(fileExtension); + } + if (targetFilenameVector.size() == 0) + { + fprintf(stderr, _("Missing filename in %s\n"), targetFilename_.c_str()); + error(); + } +} + // initialize output end of line void ASConsole::initializeOutputEOL(LineEndFormat lineEndFormat) { @@ -796,18 +897,19 @@ outputEOL.clear(); } +// read a file into the stringstream 'in' FileEncoding ASConsole::readFile(const string& fileName_, stringstream& in) const { const int blockSize = 65536; // 64 KB ifstream fin(fileName_.c_str(), ios::binary); if (!fin) - error("Cannot open input file", fileName_.c_str()); + error("Cannot open file", fileName_.c_str()); char* data = new (nothrow) char[blockSize]; if (data == nullptr) - error("Cannot allocate memory for input file", fileName_.c_str()); + error("Cannot allocate memory to open file", fileName_.c_str()); fin.read(data, blockSize); if (fin.bad()) - error("Cannot read input file", fileName_.c_str()); + error("Cannot read file", fileName_.c_str()); size_t dataSize = static_cast(fin.gcount()); FileEncoding encoding = detectEncoding(data, dataSize); if (encoding == UTF_32BE || encoding == UTF_32LE) @@ -819,12 +921,12 @@ if (encoding == UTF_16LE || encoding == UTF_16BE) { // convert utf-16 to utf-8 - size_t utf8Size = utf8_16.utf8LengthFromUtf16(data, dataSize, isBigEndian); + size_t utf8Size = encode.utf8LengthFromUtf16(data, dataSize, isBigEndian); char* utf8Out = new (nothrow) char[utf8Size]; if (utf8Out == nullptr) error("Cannot allocate memory for utf-8 conversion", fileName_.c_str()); - size_t utf8Len = utf8_16.utf16ToUtf8(data, dataSize, isBigEndian, firstBlock, utf8Out); - assert(utf8Len == utf8Size); + size_t utf8Len = encode.utf16ToUtf8(data, dataSize, isBigEndian, firstBlock, utf8Out); + assert(utf8Len <= utf8Size); in << string(utf8Out, utf8Len); delete[] utf8Out; } @@ -832,7 +934,7 @@ in << string(data, dataSize); fin.read(data, blockSize); if (fin.bad()) - error("Cannot read input file", fileName_.c_str()); + error("Cannot read file", fileName_.c_str()); dataSize = static_cast(fin.gcount()); firstBlock = false; } @@ -865,8 +967,8 @@ void ASConsole::setNoBackup(bool state) { noBackup = state; } -void ASConsole::setOptionsFileName(const string& name) -{ optionsFileName = name; } +void ASConsole::setOptionFileName(const string& name) +{ optionFileName = name; } void ASConsole::setOrigSuffix(const string& suffix) { origSuffix = suffix; } @@ -874,6 +976,9 @@ void ASConsole::setPreserveDate(bool state) { preserveDate = state; } +void ASConsole::setProjectOptionFileName(const string& optfilepath) +{ projectOptionFileName = optfilepath; } + void ASConsole::setStdPathIn(const string& path) { stdPathIn = path; } @@ -947,9 +1052,9 @@ * The fileName vector is filled with the path and names of files to process. * * @param directory The path of the directory to be processed. - * @param wildcard The wildcard to be processed (e.g. *.cpp). + * @param wildcards A vector of wildcards to be processed (e.g. *.cpp). */ -void ASConsole::getFileNames(const string& directory, const string& wildcard) +void ASConsole::getFileNames(const string& directory, const vector& wildcards) { vector subDirectory; // sub directories of directory WIN32_FIND_DATA findFileData; // for FindFirstFile and FindNextFile @@ -991,17 +1096,20 @@ continue; } - // save the file name string filePathName = directory + g_fileSeparator + findFileData.cFileName; // check exclude before wildcmp to avoid "unmatched exclude" error bool isExcluded = isPathExclued(filePathName); // save file name if wildcard match - if (wildcmp(wildcard.c_str(), findFileData.cFileName)) + for (size_t i = 0; i < wildcards.size(); i++) { - if (isExcluded) - printMsg(_("Exclude %s\n"), filePathName.substr(mainDirectoryLength)); - else - fileName.emplace_back(filePathName); + if (wildcmp(wildcards[i].c_str(), findFileData.cFileName)) + { + if (isExcluded) + printMsg(_("Exclude %s\n"), filePathName.substr(mainDirectoryLength)); + else + fileName.emplace_back(filePathName); + break; + } } } while (FindNextFile(hFind, &findFileData) != 0); @@ -1015,11 +1123,20 @@ // recurse into sub directories // if not doing recursive subDirectory is empty for (unsigned i = 0; i < subDirectory.size(); i++) - getFileNames(subDirectory[i], wildcard); + getFileNames(subDirectory[i], wildcards); return; } +// WINDOWS function to get the full path name from the relative path name +// Return the full path name or an empty string if failed. +string ASConsole::getFullPathName(const string& relativePath) const +{ + char fullPath[MAX_PATH]; + GetFullPathName(relativePath.c_str(), MAX_PATH, fullPath, NULL); + return fullPath; +} + /** * WINDOWS function to format a number according to the current locale. * This formats positive integers only, no float. @@ -1070,6 +1187,28 @@ } /** + * WINDOWS function to check for a HOME directory + * + * @param absPath The path to be evaluated. + * @returns true if absPath is HOME or is an invalid absolute + * path, false otherwise. + */ +bool ASConsole::isHomeOrInvalidAbsPath(const string& absPath) const +{ + char* env = getenv("USERPROFILE"); + if (env == nullptr) + return true; + + if (absPath.c_str() == env) + return true; + + if (absPath.compare(0, strlen(env), env) != 0) + return true; + + return false; +} + +/** * WINDOWS function to open a HTML file in the default browser. */ void ASConsole::launchDefaultBrowser(const char* filePathIn /*nullptr*/) const @@ -1150,9 +1289,9 @@ * The fileName vector is filled with the path and names of files to process. * * @param directory The path of the directory to be processed. - * @param wildcard The wildcard to be processed (e.g. *.cpp). + * @param wildcards A vector of wildcards to be processed (e.g. *.cpp). */ -void ASConsole::getFileNames(const string& directory, const string& wildcard) +void ASConsole::getFileNames(const string& directory, const vector& wildcards) { struct dirent* entry; // entry from readdir() struct stat statbuf; // entry from stat() @@ -1202,12 +1341,16 @@ // check exclude before wildcmp to avoid "unmatched exclude" error bool isExcluded = isPathExclued(entryFilepath); // save file name if wildcard match - if (wildcmp(wildcard.c_str(), entry->d_name) != 0) + for (string wildcard : wildcards) { - if (isExcluded) - printMsg(_("Exclude %s\n"), entryFilepath.substr(mainDirectoryLength)); - else - fileName.emplace_back(entryFilepath); + if (wildcmp(wildcard.c_str(), entry->d_name) != 0) + { + if (isExcluded) + printMsg(_("Exclude %s\n"), entryFilepath.substr(mainDirectoryLength)); + else + fileName.emplace_back(entryFilepath); + break; + } } } } @@ -1228,10 +1371,23 @@ sort(subDirectory.begin(), subDirectory.end()); for (unsigned i = 0; i < subDirectory.size(); i++) { - getFileNames(subDirectory[i], wildcard); + getFileNames(subDirectory[i], wildcards); } } +// LINUX function to get the full path name from the relative path name +// Return the full path name or an empty string if failed. +string ASConsole::getFullPathName(const string& relativePath) const +{ + // ignore realPath attribute warning +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" + char fullPath[PATH_MAX]; + realpath(relativePath.c_str(), fullPath); + return fullPath; +#pragma GCC diagnostic pop +} + /** * LINUX function to get locale information and call getNumberFormat. * This formats positive integers only, no float. @@ -1306,6 +1462,28 @@ } /** + * LINUX function to check for a HOME directory + * + * @param absPath The path to be evaluated. + * @returns true if absPath is HOME or is an invalid absolute + * path, false otherwise. + */ +bool ASConsole::isHomeOrInvalidAbsPath(const string& absPath) const +{ + char* env = getenv("HOME"); + if (env == nullptr) + return true; + + if (absPath.c_str() == env) + return true; + + if (absPath.compare(0, strlen(env), env) != 0) + return true; + + return false; +} + +/** * LINUX function to open a HTML file in the default browser. * Use xdg-open from freedesktop.org cross-desktop compatibility suite xdg-utils. * see http://portland.freedesktop.org/wiki/ @@ -1378,12 +1556,41 @@ #endif // _WIN32 +/** + * Returns the parent directory of absPath. If absPath is not a valid absolute + * path or if it does not have a parent, an empty string is returned. + * + * @param absPath The initial directory. + * @return The parent directory of absPath, or an empty string if + * one cannot be found. + */ +string ASConsole::getParentDirectory(const string& absPath) const +{ + if (isHomeOrInvalidAbsPath(absPath)) + { + return string(); + } + size_t offset = absPath.size() - 1; + if (absPath[absPath.size() - 1] == g_fileSeparator) + { + offset -= 1; + } + size_t idx = absPath.rfind(g_fileSeparator, offset); + if (idx == string::npos) + { + return string(); + } + string str = absPath.substr(0, idx + 1); + return str; +} + // get individual file names from the command-line file path void ASConsole::getFilePaths(const string& filePath) { fileName.clear(); targetDirectory = string(); targetFilename = string(); + vector targetFilenameVector; // separate directory and file name size_t separator = filePath.find_last_of(g_fileSeparator); @@ -1412,11 +1619,6 @@ if (targetFilename.find_first_of("*?") != string::npos) hasWildcard = true; - // clear exclude hits vector - size_t excludeHitsVectorSize = excludeHitsVector.size(); - for (size_t ix = 0; ix < excludeHitsVectorSize; ix++) - excludeHitsVector[ix] = false; - // If the filename is not quoted on Linux, bash will replace the // wildcard instead of passing it to the program. if (isRecursive && !hasWildcard) @@ -1428,6 +1630,10 @@ error(); } + bool hasMultipleTargets = false; + if (targetFilename.find_first_of(",;") != string::npos) + hasMultipleTargets = true; + // display directory name for wildcard processing if (hasWildcard) { @@ -1435,9 +1641,17 @@ printMsg(_("Directory %s\n"), targetDirectory + g_fileSeparator + targetFilename); } + // clear exclude hits vector + size_t excludeHitsVectorSize = excludeHitsVector.size(); + for (size_t ix = 0; ix < excludeHitsVectorSize; ix++) + excludeHitsVector[ix] = false; + // create a vector of paths and file names to process - if (hasWildcard || isRecursive) - getFileNames(targetDirectory, targetFilename); + if (hasWildcard || isRecursive || hasMultipleTargets) + { + getTargetFilenames(targetFilename, targetFilenameVector); + getFileNames(targetDirectory, targetFilenameVector); + } else { // verify a single file is not a directory (needed on Linux) @@ -1489,6 +1703,13 @@ printSeparatingLine(); } +// Check if a file exists +bool ASConsole::fileExists(const char* file) const +{ + struct stat buf; + return (stat(file, &buf) == 0); +} + bool ASConsole::fileNameVectorIsEmpty() const { return fileNameVector.empty(); @@ -1509,7 +1730,7 @@ bool retVal = arg.compare(0, strlen(option), option) == 0; // if comparing for short option, 2nd char of arg must be numeric if (retVal && strlen(option) == 1 && arg.length() > 1) - if (!isdigit((unsigned char)arg[1])) + if (!isdigit((unsigned char) arg[1])) retVal = false; return retVal; } @@ -1544,9 +1765,9 @@ { // make it case insensitive for Windows for (size_t j = 0; j < compare.length(); j++) - compare[j] = (char)tolower(compare[j]); + compare[j] = (char) tolower(compare[j]); for (size_t j = 0; j < exclude.length(); j++) - exclude[j] = (char)tolower(exclude[j]); + exclude[j] = (char) tolower(exclude[j]); } // compare sub directory to exclude data - must check them all if (compare == exclude) @@ -1578,6 +1799,7 @@ cout << endl; cout << " Wildcards (* and ?) may be used in the filename.\n"; cout << " A \'recursive\' option can process directories recursively.\n"; + cout << " Multiple file extensions may be separated by a comma.\n"; cout << endl; cout << " By default, astyle is set up to indent with four spaces per indent,\n"; cout << " a maximal indentation of 40 spaces inside continuous statements,\n"; @@ -1591,20 +1813,24 @@ cout << " Short options (starting with '-') may be appended together.\n"; cout << " Thus, -bps4 is the same as -b -p -s4.\n"; cout << endl; - cout << "Options File:\n"; + cout << "Option Files:\n"; cout << "-------------\n"; - cout << " Artistic Style looks for a default options file in the\n"; - cout << " following order:\n"; - cout << " 1. The contents of the ARTISTIC_STYLE_OPTIONS environment\n"; - cout << " variable if it exists.\n"; - cout << " 2. The file called .astylerc in the directory pointed to by the\n"; - cout << " HOME environment variable ( i.e. $HOME/.astylerc ).\n"; - cout << " 3. The file called astylerc in the directory pointed to by the\n"; - cout << " USERPROFILE environment variable (i.e. %USERPROFILE%\\astylerc).\n"; - cout << " If a default options file is found, the options in this file will\n"; - cout << " be parsed BEFORE the command-line options.\n"; - cout << " Long options within the default option file may be written without\n"; - cout << " the preliminary '--'.\n"; + cout << " Artistic Style looks for a default option file and/or a project\n"; + cout << " option file in the following order:\n"; + cout << " 1. The command line options have precedence.\n"; + cout << " 2. The project option file has precedence over the default file\n"; + cout << " o the file name indicated by the --project= command line option.\n"; + cout << " o the file named .astylerc or _ astylerc.\n"; + cout << " o the file name identified by ARTISTIC_STYLE_PROJECT_OPTIONS.\n"; + cout << " o the file is disabled by --project=none on the command line.\n"; + cout << " 3. The default option file that can be used for all projects.\n"; + cout << " o the file path indicated by the --options= command line option.\n"; + cout << " o the file path indicated by ARTISTIC_STYLE_OPTIONS.\n"; + cout << " o the file named .astylerc in the HOME directory (for Linux).\n"; + cout << " o the file name astylerc in the APPDATA directory (for Windows).\n"; + cout << " o the file is disabled by --project=none on the command line.\n"; + cout << " Long options within the option files may be written without '--'.\n"; + cout << " Line-end comments begin with a '#'.\n"; cout << endl; cout << "Disable Formatting:\n"; cout << "-------------------\n"; @@ -1647,8 +1873,8 @@ cout << " VTK style formatting/indenting.\n"; cout << " Broken, indented braces except for the opening braces.\n"; cout << endl; - cout << " --style=banner OR -A6\n"; - cout << " Banner style formatting/indenting.\n"; + cout << " --style=ratliff OR --style=banner OR -A6\n"; + cout << " Ratliff style formatting/indenting.\n"; cout << " Attached, indented braces.\n"; cout << endl; cout << " --style=gnu OR -A7\n"; @@ -1876,6 +2102,16 @@ cout << " --remove-braces OR -xj\n"; cout << " Remove braces from a braced one line conditional statements.\n"; cout << endl; + cout << " --break-return-type OR -xB\n"; + cout << " --break-return-type-decl OR -xD\n"; + cout << " Break the return type from the function name. Options are\n"; + cout << " for the function definitions and the function declarations.\n"; + cout << endl; + cout << " --attach-return-type OR -xf\n"; + cout << " --attach-return-type-decl OR -xh\n"; + cout << " Attach the return type to the function name. Options are\n"; + cout << " for the function definitions and the function declarations.\n"; + cout << endl; cout << " --keep-one-line-blocks OR -O\n"; cout << " Don't break blocks residing completely on one line.\n"; cout << endl; @@ -1995,11 +2231,19 @@ cout << "Command Line Only:\n"; cout << "------------------\n"; cout << " --options=####\n"; - cout << " Specify an options file #### to read and use.\n"; - cout << endl; cout << " --options=none\n"; - cout << " Disable the default options file.\n"; - cout << " Only the command-line parameters will be used.\n"; + cout << " Specify a default option file #### to read and use.\n"; + cout << " It must contain a file path and a file name.\n"; + cout << " 'none' disables the default option file.\n"; + cout << endl; + cout << " --project\n"; + cout << " --project=####\n"; + cout << " --project=none\n"; + cout << " Specify a project option file #### to read and use.\n"; + cout << " It must contain a file name only, without a directory path.\n"; + cout << " The file should be included in the project top-level directory.\n"; + cout << " The default file name is .astylerc or _astylerc.\n"; + cout << " 'none' disables the project or environment variable file.\n"; cout << endl; cout << " --ascii OR -I\n"; cout << " The displayed output will be ascii characters only.\n"; @@ -2019,6 +2263,14 @@ cout << " ####. The path may include a directory path and a file name, or a\n"; cout << " file name only. Paths containing spaces must be enclosed in quotes.\n"; cout << endl; + cout << " --stdin=####\n"; + cout << " Use the file path #### as input to single file formatting.\n"; + cout << " This is a replacement for redirection.\n"; + cout << endl; + cout << " --stdout=####\n"; + cout << " Use the file path #### as output from single file formatting.\n"; + cout << " This is a replacement for redirection.\n"; + cout << endl; cout << endl; } @@ -2047,62 +2299,102 @@ printVerboseStats(startTime); } -// process options from the command line and options file -// build the vectors fileNameVector, excludeVector, optionsVector, and fileOptionsVector +// process options from the command line and option files +// build the vectors fileNameVector, excludeVector, optionsVector, +// projectOptionsVector and fileOptionsVector void ASConsole::processOptions(const vector& argvOptions) { string arg; bool ok = true; - bool shouldParseOptionsFile = true; + bool optionFileRequired = false; + bool shouldParseOptionFile = true; + bool projectOptionFileRequired = false; + bool shouldParseProjectOptionFile = true; + string projectOptionArg; // save for display // get command line options for (size_t i = 0; i < argvOptions.size(); i++) { arg = argvOptions[i]; - if ( isOption(arg, "-I" ) - || isOption(arg, "--ascii") ) + if (isOption(arg, "-I") + || isOption(arg, "--ascii")) { useAscii = true; setlocale(LC_ALL, "C"); // use English decimal indicator localizer.setLanguageFromName("en"); } - else if ( isOption(arg, "--options=none") ) + else if (isOption(arg, "--options=none")) { - shouldParseOptionsFile = false; + optionFileRequired = false; + shouldParseOptionFile = false; + optionFileName = ""; } - else if ( isParamOption(arg, "--options=") ) + else if (isParamOption(arg, "--options=")) { - optionsFileName = getParam(arg, "--options="); - optionsFileRequired = true; - if (optionsFileName.empty()) - setOptionsFileName(" "); + optionFileName = getParam(arg, "--options="); + standardizePath(optionFileName); + optionFileName = getFullPathName(optionFileName); + optionFileRequired = true; } - else if ( isOption(arg, "-h") - || isOption(arg, "--help") - || isOption(arg, "-?") ) + else if (isOption(arg, "--project=none")) + { + projectOptionFileRequired = false; + shouldParseProjectOptionFile = false; + setProjectOptionFileName(""); + } + else if (isParamOption(arg, "--project=")) + { + projectOptionFileName = getParam(arg, "--project="); + standardizePath(projectOptionFileName); + projectOptionFileRequired = true; + shouldParseProjectOptionFile = false; + projectOptionArg = projectOptionFileName; + } + else if (isOption(arg, "--project")) + { + projectOptionFileName = ".astylerc"; + projectOptionFileRequired = true; + shouldParseProjectOptionFile = false; + projectOptionArg = projectOptionFileName; + } + else if (isOption(arg, "-h") + || isOption(arg, "--help") + || isOption(arg, "-?")) { printHelp(); exit(EXIT_SUCCESS); } - else if ( isOption(arg, "-!") - || isOption(arg, "--html") ) + else if (isOption(arg, "-!") + || isOption(arg, "--html")) { launchDefaultBrowser(); exit(EXIT_SUCCESS); } - else if ( isParamOption(arg, "--html=") ) + else if (isParamOption(arg, "--html=")) { string htmlFilePath = getParam(arg, "--html="); launchDefaultBrowser(htmlFilePath.c_str()); exit(EXIT_SUCCESS); } - else if ( isOption(arg, "-V" ) - || isOption(arg, "--version") ) + else if (isOption(arg, "-V") + || isOption(arg, "--version")) { printf("Artistic Style Version %s\n", g_version); exit(EXIT_SUCCESS); } + else if (isParamOption(arg, "--stdin=")) + { + string path = getParam(arg, "--stdin="); + standardizePath(path); + setStdPathIn(path); + } + else if (isParamOption(arg, "--stdout=")) + { + string path = getParam(arg, "--stdout="); + standardizePath(path); + setStdPathOut(path); + } else if (arg[0] == '-') { optionsVector.emplace_back(arg); @@ -2114,53 +2406,125 @@ } } - // get options file path and name - if (shouldParseOptionsFile) + // get option file path and name + if (shouldParseOptionFile) { - if (optionsFileName.empty()) + if (optionFileName.empty()) { char* env = getenv("ARTISTIC_STYLE_OPTIONS"); if (env != nullptr) - setOptionsFileName(env); + { + setOptionFileName(env); + standardizePath(optionFileName); + optionFileName = getFullPathName(optionFileName); + } } - if (optionsFileName.empty()) + // for Linux + if (optionFileName.empty()) { char* env = getenv("HOME"); if (env != nullptr) - setOptionsFileName(string(env) + "/.astylerc"); + { + string name = string(env) + "/.astylerc"; + if (fileExists(name.c_str())) + setOptionFileName(name); + } + } + // for Windows + if (optionFileName.empty()) + { + char* env = getenv("APPDATA"); + if (env != nullptr) + { + string name = string(env) + "\\astylerc"; + if (fileExists(name.c_str())) + setOptionFileName(name); + } } - if (optionsFileName.empty()) + // for Windows + // NOTE: depreciated with release 3.1, remove when appropriate + // there is NO test data for this option + if (optionFileName.empty()) { char* env = getenv("USERPROFILE"); if (env != nullptr) - setOptionsFileName(string(env) + "/astylerc"); + { + string name = string(env) + "\\astylerc"; + if (fileExists(name.c_str())) + setOptionFileName(name); + } } - if (!optionsFileName.empty()) - standardizePath(optionsFileName); } - // create the options file vector and parse the options for errors - ASOptions options(formatter, *this); - if (!optionsFileName.empty()) + // find project option file + if (projectOptionFileRequired) { - ifstream optionsIn(optionsFileName.c_str()); - if (optionsIn) - { - options.importOptions(optionsIn, fileOptionsVector); - ok = options.parseOptions(fileOptionsVector, - string(_("Invalid option file options:"))); - } - else - { - if (optionsFileRequired) - error(_("Cannot open options file"), optionsFileName.c_str()); - optionsFileName.clear(); + string optfilepath = findProjectOptionFilePath(projectOptionFileName); + if (optfilepath.empty() || projectOptionArg.empty()) + error(_("Cannot open project option file"), projectOptionArg.c_str()); + standardizePath(optfilepath); + setProjectOptionFileName(optfilepath); + } + if (shouldParseProjectOptionFile) + { + char* env = getenv("ARTISTIC_STYLE_PROJECT_OPTIONS"); + if (env != nullptr) + { + string optfilepath = findProjectOptionFilePath(env); + standardizePath(optfilepath); + setProjectOptionFileName(optfilepath); } - optionsIn.close(); } + + ASOptions options(formatter, *this); + if (!optionFileName.empty()) + { + stringstream optionsIn; + if (!fileExists(optionFileName.c_str())) + error(_("Cannot open default option file"), optionFileName.c_str()); + FileEncoding encoding = readFile(optionFileName, optionsIn); + // bypass a BOM, all BOMs have been converted to utf-8 + if (encoding == UTF_8BOM || encoding == UTF_16LE || encoding == UTF_16BE) + { + char buf[4]; + optionsIn.get(buf, 4); + assert(strcmp(buf, "\xEF\xBB\xBF") == 0); + } + options.importOptions(optionsIn, fileOptionsVector); + ok = options.parseOptions(fileOptionsVector, + string(_("Invalid default options:"))); + } + else if (optionFileRequired) + error(_("Cannot open default option file"), optionFileName.c_str()); + if (!ok) { - (*errorStream) << options.getOptionErrors() << endl; + (*errorStream) << options.getOptionErrors(); + (*errorStream) << _("For help on options type 'astyle -h'") << endl; + error(); + } + + if (!projectOptionFileName.empty()) + { + stringstream projectOptionsIn; + if (!fileExists(projectOptionFileName.c_str())) + error(_("Cannot open project option file"), projectOptionFileName.c_str()); + FileEncoding encoding = readFile(projectOptionFileName, projectOptionsIn); + // bypass a BOM, all BOMs have been converted to utf-8 + if (encoding == UTF_8BOM || encoding == UTF_16LE || encoding == UTF_16BE) + { + char buf[4]; + projectOptionsIn.get(buf, 4); + assert(strcmp(buf, "\xEF\xBB\xBF") == 0); + } + options.importOptions(projectOptionsIn, projectOptionsVector); + ok = options.parseOptions(projectOptionsVector, + string(_("Invalid project options:"))); + } + + if (!ok) + { + (*errorStream) << options.getOptionErrors(); (*errorStream) << _("For help on options type 'astyle -h'") << endl; error(); } @@ -2170,7 +2534,7 @@ string(_("Invalid command line options:"))); if (!ok) { - (*errorStream) << options.getOptionErrors() << endl; + (*errorStream) << options.getOptionErrors(); (*errorStream) << _("For help on options type 'astyle -h'") << endl; error(); } @@ -2227,12 +2591,12 @@ // If we are on a VMS system, translate VMS style filenames to unix // style. fab = cc$rms_fab; - fab.fab$l_fna = (char*) -1; // *NOPAD* + fab.fab$l_fna = (char*) -1; fab.fab$b_fns = 0; fab.fab$l_naml = &naml; naml = cc$rms_naml; strcpy(sess, path.c_str()); - naml.naml$l_long_filename = (char*)sess; + naml.naml$l_long_filename = (char*) sess; naml.naml$l_long_filename_size = path.length(); naml.naml$l_long_expand = less; naml.naml$l_long_expand_alloc = sizeof(less); @@ -2248,14 +2612,14 @@ { if (!$VMS_STATUS_SUCCESS(r0_status)) { - (void)lib$signal (r0_status); + (void) lib$signal(r0_status); } } less[naml.naml$l_long_expand_size - naml.naml$b_ver] = '\0'; sess[naml.naml$b_esl - naml.naml$b_ver] = '\0'; if (naml.naml$l_long_expand_size > naml.naml$b_esl) { - path = decc$translate_vms (less); + path = decc$translate_vms(less); } else { @@ -2310,9 +2674,19 @@ header.append(str); header.append("\n"); printf("%s", header.c_str()); - // print options file - if (!optionsFileName.empty()) - printf(_("Using default options file %s\n"), optionsFileName.c_str()); + // print option files + if (!optionFileName.empty()) + printf(_("Default option file %s\n"), optionFileName.c_str()); + // NOTE: depreciated with release 3.1, remove when appropriate + if (!optionFileName.empty()) + { + char* env = getenv("USERPROFILE"); + if (env != nullptr && optionFileName == string(env) + "\\astylerc") + printf("The above option file has been DEPRECIATED\n"); + } + // end depreciated + if (!projectOptionFileName.empty()) + printf(_("Project option file %s\n"), projectOptionFileName.c_str()); } void ASConsole::printVerboseStats(clock_t startTime) const @@ -2328,7 +2702,7 @@ // show processing time clock_t stopTime = clock(); - double secs = (stopTime - startTime) / double (CLOCKS_PER_SEC); + double secs = (stopTime - startTime) / double(CLOCKS_PER_SEC); if (secs < 60) { if (secs < 2.0) @@ -2344,18 +2718,19 @@ // show minutes and seconds if time is greater than one minute int min = (int) secs / 60; secs -= min * 60; - int minsec = int (secs + .5); + int minsec = int(secs + .5); printf(_("%d min %d sec "), min, minsec); } string lines = getNumberFormat(linesOut); printf(_("%s lines\n"), lines.c_str()); + printf("\n"); } void ASConsole::sleep(int seconds) const { clock_t endwait; - endwait = clock_t (clock () + seconds * CLOCKS_PER_SEC); + endwait = clock_t(clock() + seconds * CLOCKS_PER_SEC); while (clock() < endwait) {} } @@ -2485,11 +2860,11 @@ { // convert utf-8 to utf-16 bool isBigEndian = (encoding == UTF_16BE); - size_t utf16Size = utf8_16.utf16LengthFromUtf8(out.str().c_str(), out.str().length()); + size_t utf16Size = encode.utf16LengthFromUtf8(out.str().c_str(), out.str().length()); char* utf16Out = new char[utf16Size]; - size_t utf16Len = utf8_16.utf8ToUtf16(const_cast(out.str().c_str()), - out.str().length(), isBigEndian, utf16Out); - assert(utf16Len == utf16Size); + size_t utf16Len = encode.utf8ToUtf16(const_cast(out.str().c_str()), + out.str().length(), isBigEndian, utf16Out); + assert(utf16Len <= utf16Size); fout << string(utf16Out, utf16Len); delete[] utf16Out; } @@ -2527,10 +2902,10 @@ // used by shared object (DLL) calls //----------------------------------------------------------------------------- -utf16_t* ASLibrary::formatUtf16(const utf16_t* pSourceIn, // the source to be formatted - const utf16_t* pOptions, // AStyle options - fpError fpErrorHandler, // error handler function - fpAlloc fpMemoryAlloc) const // memory allocation function) +char16_t* ASLibrary::formatUtf16(const char16_t* pSourceIn, // the source to be formatted + const char16_t* pOptions, // AStyle options + fpError fpErrorHandler, // error handler function + fpAlloc fpMemoryAlloc) const // memory allocation function) { const char* utf8In = convertUtf16ToUtf8(pSourceIn); if (utf8In == nullptr) @@ -2560,7 +2935,7 @@ if (utf8Out == nullptr) return nullptr; // convert text to wide char and return it - utf16_t* utf16Out = convertUtf8ToUtf16(utf8Out, fpMemoryAlloc); + char16_t* utf16Out = convertUtf8ToUtf16(utf8Out, fpMemoryAlloc); delete[] utf8Out; utf8Out = nullptr; if (utf16Out == nullptr) @@ -2584,26 +2959,26 @@ * Memory is allocated by the calling program memory allocation function. * The calling function must check for errors. */ -utf16_t* ASLibrary::convertUtf8ToUtf16(const char* utf8In, fpAlloc fpMemoryAlloc) const +char16_t* ASLibrary::convertUtf8ToUtf16(const char* utf8In, fpAlloc fpMemoryAlloc) const { if (utf8In == nullptr) return nullptr; char* data = const_cast(utf8In); size_t dataSize = strlen(utf8In); - bool isBigEndian = utf8_16.getBigEndian(); - // return size is in number of CHARs, not utf16_t - size_t utf16Size = (utf8_16.utf16LengthFromUtf8(data, dataSize) + sizeof(utf16_t)); - char* utf16Out = fpMemoryAlloc((long)utf16Size); + bool isBigEndian = encode.getBigEndian(); + // return size is in number of CHARs, not char16_t + size_t utf16Size = (encode.utf16LengthFromUtf8(data, dataSize) + sizeof(char16_t)); + char* utf16Out = fpMemoryAlloc((long) utf16Size); if (utf16Out == nullptr) return nullptr; #ifdef NDEBUG - utf8_16.utf8ToUtf16(data, dataSize + 1, isBigEndian, utf16Out); + encode.utf8ToUtf16(data, dataSize + 1, isBigEndian, utf16Out); #else - size_t utf16Len = utf8_16.utf8ToUtf16(data, dataSize + 1, isBigEndian, utf16Out); + size_t utf16Len = encode.utf8ToUtf16(data, dataSize + 1, isBigEndian, utf16Out); assert(utf16Len == utf16Size); #endif - assert(utf16Size == (utf8_16.utf16len(reinterpret_cast(utf16Out)) + 1) * sizeof(utf16_t)); - return reinterpret_cast(utf16Out); + assert(utf16Size == (encode.utf16len(reinterpret_cast(utf16Out)) + 1) * sizeof(char16_t)); + return reinterpret_cast(utf16Out); } /** @@ -2611,22 +2986,22 @@ * The calling function must check for errors and delete the * allocated memory. */ -char* ASLibrary::convertUtf16ToUtf8(const utf16_t* utf16In) const +char* ASLibrary::convertUtf16ToUtf8(const char16_t* utf16In) const { if (utf16In == nullptr) return nullptr; - char* data = reinterpret_cast(const_cast(utf16In)); + char* data = reinterpret_cast(const_cast(utf16In)); // size must be in chars - size_t dataSize = utf8_16.utf16len(utf16In) * sizeof(utf16_t); - bool isBigEndian = utf8_16.getBigEndian(); - size_t utf8Size = utf8_16.utf8LengthFromUtf16(data, dataSize, isBigEndian) + 1; + size_t dataSize = encode.utf16len(utf16In) * sizeof(char16_t); + bool isBigEndian = encode.getBigEndian(); + size_t utf8Size = encode.utf8LengthFromUtf16(data, dataSize, isBigEndian) + 1; char* utf8Out = new (nothrow) char[utf8Size]; if (utf8Out == nullptr) return nullptr; #ifdef NDEBUG - utf8_16.utf16ToUtf8(data, dataSize + 1, isBigEndian, true, utf8Out); + encode.utf16ToUtf8(data, dataSize + 1, isBigEndian, true, utf8Out); #else - size_t utf8Len = utf8_16.utf16ToUtf8(data, dataSize + 1, isBigEndian, true, utf8Out); + size_t utf8Len = encode.utf16ToUtf8(data, dataSize + 1, isBigEndian, true, utf8Out); assert(utf8Len == utf8Size); #endif assert(utf8Size == strlen(utf8Out) + 1); @@ -2652,7 +3027,9 @@ /** * parse the options vector - * optionsVector can be either a fileOptionsVector (options file) or an optionsVector (command line) + * optionsVector can be either a fileOptionsVector (option file), + * a projectOptionsVector (project option file), + * or an optionsVector (command line) * * @return true if no errors, false if errors */ @@ -2675,7 +3052,7 @@ for (i = 1; i < arg.length(); ++i) { if (i > 1 - && isalpha((unsigned char)arg[i]) + && isalpha((unsigned char) arg[i]) && arg[i - 1] != 'x') { // parse the previous option in subArg @@ -2702,122 +3079,83 @@ void ASOptions::parseOption(const string& arg, const string& errorInfo) { - if ( isOption(arg, "style=allman") || isOption(arg, "style=bsd") || isOption(arg, "style=break") ) + if (isOption(arg, "A1", "style=allman") || isOption(arg, "style=bsd") || isOption(arg, "style=break")) { formatter.setFormattingStyle(STYLE_ALLMAN); } - else if ( isOption(arg, "style=java") || isOption(arg, "style=attach") ) + else if (isOption(arg, "A2", "style=java") || isOption(arg, "style=attach")) { formatter.setFormattingStyle(STYLE_JAVA); } - else if ( isOption(arg, "style=k&r") || isOption(arg, "style=kr") || isOption(arg, "style=k/r") ) + else if (isOption(arg, "A3", "style=k&r") || isOption(arg, "style=kr") || isOption(arg, "style=k/r")) { formatter.setFormattingStyle(STYLE_KR); } - else if ( isOption(arg, "style=stroustrup") ) + else if (isOption(arg, "A4", "style=stroustrup")) { formatter.setFormattingStyle(STYLE_STROUSTRUP); } - else if ( isOption(arg, "style=whitesmith") ) + else if (isOption(arg, "A5", "style=whitesmith")) { formatter.setFormattingStyle(STYLE_WHITESMITH); } - else if ( isOption(arg, "style=vtk") ) + else if (isOption(arg, "A15", "style=vtk")) { formatter.setFormattingStyle(STYLE_VTK); } - else if ( isOption(arg, "style=banner") ) + else if (isOption(arg, "A6", "style=ratliff") || isOption(arg, "style=banner")) { - formatter.setFormattingStyle(STYLE_BANNER); + formatter.setFormattingStyle(STYLE_RATLIFF); } - else if ( isOption(arg, "style=gnu") ) + else if (isOption(arg, "A7", "style=gnu")) { formatter.setFormattingStyle(STYLE_GNU); } - else if ( isOption(arg, "style=linux") || isOption(arg, "style=knf") ) + else if (isOption(arg, "A8", "style=linux") || isOption(arg, "style=knf")) { formatter.setFormattingStyle(STYLE_LINUX); } - else if ( isOption(arg, "style=horstmann") || isOption(arg, "style=run-in") ) + else if (isOption(arg, "A9", "style=horstmann") || isOption(arg, "style=run-in")) { formatter.setFormattingStyle(STYLE_HORSTMANN); } - else if ( isOption(arg, "style=1tbs") || isOption(arg, "style=otbs") ) + else if (isOption(arg, "A10", "style=1tbs") || isOption(arg, "style=otbs")) { formatter.setFormattingStyle(STYLE_1TBS); } - else if ( isOption(arg, "style=google") ) + else if (isOption(arg, "A14", "style=google")) { formatter.setFormattingStyle(STYLE_GOOGLE); } - else if (isOption(arg, "style=mozilla")) + else if (isOption(arg, "A16", "style=mozilla")) { formatter.setFormattingStyle(STYLE_MOZILLA); } - else if ( isOption(arg, "style=pico") ) + else if (isOption(arg, "A11", "style=pico")) { formatter.setFormattingStyle(STYLE_PICO); } - else if ( isOption(arg, "style=lisp") || isOption(arg, "style=python") ) + else if (isOption(arg, "A12", "style=lisp") || isOption(arg, "style=python")) { formatter.setFormattingStyle(STYLE_LISP); } - else if ( isParamOption(arg, "A") ) - { - int style = 0; - string styleParam = getParam(arg, "A"); - if (styleParam.length() > 0) - style = atoi(styleParam.c_str()); - if (style == 1) - formatter.setFormattingStyle(STYLE_ALLMAN); - else if (style == 2) - formatter.setFormattingStyle(STYLE_JAVA); - else if (style == 3) - formatter.setFormattingStyle(STYLE_KR); - else if (style == 4) - formatter.setFormattingStyle(STYLE_STROUSTRUP); - else if (style == 5) - formatter.setFormattingStyle(STYLE_WHITESMITH); - else if (style == 6) - formatter.setFormattingStyle(STYLE_BANNER); - else if (style == 7) - formatter.setFormattingStyle(STYLE_GNU); - else if (style == 8) - formatter.setFormattingStyle(STYLE_LINUX); - else if (style == 9) - formatter.setFormattingStyle(STYLE_HORSTMANN); - else if (style == 10) - formatter.setFormattingStyle(STYLE_1TBS); - else if (style == 11) - formatter.setFormattingStyle(STYLE_PICO); - else if (style == 12) - formatter.setFormattingStyle(STYLE_LISP); - else if (style == 14) - formatter.setFormattingStyle(STYLE_GOOGLE); - else if (style == 15) - formatter.setFormattingStyle(STYLE_VTK); - else if (style == 16) - formatter.setFormattingStyle(STYLE_MOZILLA); - else - isOptionError(arg, errorInfo); - } // must check for mode=cs before mode=c !!! - else if ( isOption(arg, "mode=cs") ) + else if (isOption(arg, "mode=cs")) { formatter.setSharpStyle(); formatter.setModeManuallySet(true); } - else if ( isOption(arg, "mode=c") ) + else if (isOption(arg, "mode=c")) { formatter.setCStyle(); formatter.setModeManuallySet(true); } - else if ( isOption(arg, "mode=java") ) + else if (isOption(arg, "mode=java")) { formatter.setJavaStyle(); formatter.setModeManuallySet(true); } - else if ( isParamOption(arg, "t", "indent=tab=") ) + else if (isParamOption(arg, "t", "indent=tab=")) { int spaceNum = 4; string spaceNumParam = getParam(arg, "t", "indent=tab="); @@ -2830,11 +3168,11 @@ formatter.setTabIndentation(spaceNum, false); } } - else if ( isOption(arg, "indent=tab") ) + else if (isOption(arg, "indent=tab")) { formatter.setTabIndentation(4); } - else if ( isParamOption(arg, "T", "indent=force-tab=") ) + else if (isParamOption(arg, "T", "indent=force-tab=")) { int spaceNum = 4; string spaceNumParam = getParam(arg, "T", "indent=force-tab="); @@ -2847,11 +3185,11 @@ formatter.setTabIndentation(spaceNum, true); } } - else if ( isOption(arg, "indent=force-tab") ) + else if (isOption(arg, "indent=force-tab")) { formatter.setTabIndentation(4, true); } - else if ( isParamOption(arg, "xT", "indent=force-tab-x=") ) + else if (isParamOption(arg, "xT", "indent=force-tab-x=")) { int tabNum = 8; string tabNumParam = getParam(arg, "xT", "indent=force-tab-x="); @@ -2864,11 +3202,11 @@ formatter.setForceTabXIndentation(tabNum); } } - else if ( isOption(arg, "indent=force-tab-x") ) + else if (isOption(arg, "indent=force-tab-x")) { formatter.setForceTabXIndentation(8); } - else if ( isParamOption(arg, "s", "indent=spaces=") ) + else if (isParamOption(arg, "s", "indent=spaces=")) { int spaceNum = 4; string spaceNumParam = getParam(arg, "s", "indent=spaces="); @@ -2881,7 +3219,7 @@ formatter.setSpaceIndentation(spaceNum); } } - else if ( isOption(arg, "indent=spaces") ) + else if (isOption(arg, "indent=spaces")) { formatter.setSpaceIndentation(4); } @@ -2898,7 +3236,7 @@ else formatter.setContinuationIndentation(contIndent); } - else if ( isParamOption(arg, "m", "min-conditional-indent=") ) + else if (isParamOption(arg, "m", "min-conditional-indent=")) { int minIndent = MINCOND_TWO; string minIndentParam = getParam(arg, "m", "min-conditional-indent="); @@ -2909,7 +3247,7 @@ else formatter.setMinConditionalIndentOption(minIndent); } - else if ( isParamOption(arg, "M", "max-continuation-indent=") ) + else if (isParamOption(arg, "M", "max-continuation-indent=")) { int maxIndent = 40; string maxIndentParam = getParam(arg, "M", "max-continuation-indent="); @@ -2922,31 +3260,31 @@ else formatter.setMaxContinuationIndentLength(maxIndent); } - else if ( isOption(arg, "N", "indent-namespaces") ) + else if (isOption(arg, "N", "indent-namespaces")) { formatter.setNamespaceIndent(true); } - else if ( isOption(arg, "C", "indent-classes") ) + else if (isOption(arg, "C", "indent-classes")) { formatter.setClassIndent(true); } - else if ( isOption(arg, "xG", "indent-modifiers") ) + else if (isOption(arg, "xG", "indent-modifiers")) { formatter.setModifierIndent(true); } - else if ( isOption(arg, "S", "indent-switches") ) + else if (isOption(arg, "S", "indent-switches")) { formatter.setSwitchIndent(true); } - else if ( isOption(arg, "K", "indent-cases") ) + else if (isOption(arg, "K", "indent-cases")) { formatter.setCaseIndent(true); } - else if ( isOption(arg, "xU", "indent-after-parens") ) + else if (isOption(arg, "xU", "indent-after-parens")) { formatter.setAfterParenIndent(true); } - else if ( isOption(arg, "L", "indent-labels") ) + else if (isOption(arg, "L", "indent-labels")) { formatter.setLabelIndent(true); } @@ -2954,52 +3292,52 @@ { formatter.setPreprocBlockIndent(true); } - else if ( isOption(arg, "w", "indent-preproc-define") ) + else if (isOption(arg, "w", "indent-preproc-define")) { formatter.setPreprocDefineIndent(true); } - else if ( isOption(arg, "xw", "indent-preproc-cond") ) + else if (isOption(arg, "xw", "indent-preproc-cond")) { formatter.setPreprocConditionalIndent(true); } - else if ( isOption(arg, "y", "break-closing-braces") ) + else if (isOption(arg, "y", "break-closing-braces")) { formatter.setBreakClosingHeaderBracesMode(true); } - else if ( isOption(arg, "O", "keep-one-line-blocks") ) + else if (isOption(arg, "O", "keep-one-line-blocks")) { formatter.setBreakOneLineBlocksMode(false); } - else if ( isOption(arg, "o", "keep-one-line-statements") ) + else if (isOption(arg, "o", "keep-one-line-statements")) { formatter.setBreakOneLineStatementsMode(false); } - else if ( isOption(arg, "P", "pad-paren") ) + else if (isOption(arg, "P", "pad-paren")) { formatter.setParensOutsidePaddingMode(true); formatter.setParensInsidePaddingMode(true); } - else if ( isOption(arg, "d", "pad-paren-out") ) + else if (isOption(arg, "d", "pad-paren-out")) { formatter.setParensOutsidePaddingMode(true); } - else if ( isOption(arg, "xd", "pad-first-paren-out") ) + else if (isOption(arg, "xd", "pad-first-paren-out")) { formatter.setParensFirstPaddingMode(true); } - else if ( isOption(arg, "D", "pad-paren-in") ) + else if (isOption(arg, "D", "pad-paren-in")) { formatter.setParensInsidePaddingMode(true); } - else if ( isOption(arg, "H", "pad-header") ) + else if (isOption(arg, "H", "pad-header")) { formatter.setParensHeaderPaddingMode(true); } - else if ( isOption(arg, "U", "unpad-paren") ) + else if (isOption(arg, "U", "unpad-paren")) { formatter.setParensUnPaddingMode(true); } - else if ( isOption(arg, "p", "pad-oper") ) + else if (isOption(arg, "p", "pad-oper")) { formatter.setOperatorPaddingMode(true); } @@ -3007,68 +3345,68 @@ { formatter.setCommaPaddingMode(true); } - else if ( isOption(arg, "xe", "delete-empty-lines") ) + else if (isOption(arg, "xe", "delete-empty-lines")) { formatter.setDeleteEmptyLinesMode(true); } - else if ( isOption(arg, "E", "fill-empty-lines") ) + else if (isOption(arg, "E", "fill-empty-lines")) { formatter.setEmptyLineFill(true); } - else if ( isOption(arg, "c", "convert-tabs") ) + else if (isOption(arg, "c", "convert-tabs")) { formatter.setTabSpaceConversionMode(true); } - else if ( isOption(arg, "xy", "close-templates") ) + else if (isOption(arg, "xy", "close-templates")) { formatter.setCloseTemplatesMode(true); } - else if ( isOption(arg, "F", "break-blocks=all") ) + else if (isOption(arg, "F", "break-blocks=all")) { formatter.setBreakBlocksMode(true); formatter.setBreakClosingHeaderBlocksMode(true); } - else if ( isOption(arg, "f", "break-blocks") ) + else if (isOption(arg, "f", "break-blocks")) { formatter.setBreakBlocksMode(true); } - else if ( isOption(arg, "e", "break-elseifs") ) + else if (isOption(arg, "e", "break-elseifs")) { formatter.setBreakElseIfsMode(true); } - else if ( isOption(arg, "xb", "break-one-line-headers") ) + else if (isOption(arg, "xb", "break-one-line-headers")) { formatter.setBreakOneLineHeadersMode(true); } - else if ( isOption(arg, "j", "add-braces") ) + else if (isOption(arg, "j", "add-braces")) { formatter.setAddBracesMode(true); } - else if ( isOption(arg, "J", "add-one-line-braces") ) + else if (isOption(arg, "J", "add-one-line-braces")) { formatter.setAddOneLineBracesMode(true); } - else if ( isOption(arg, "xj", "remove-braces") ) + else if (isOption(arg, "xj", "remove-braces")) { formatter.setRemoveBracesMode(true); } - else if ( isOption(arg, "Y", "indent-col1-comments") ) + else if (isOption(arg, "Y", "indent-col1-comments")) { formatter.setIndentCol1CommentsMode(true); } - else if ( isOption(arg, "align-pointer=type") ) + else if (isOption(arg, "align-pointer=type")) { formatter.setPointerAlignment(PTR_ALIGN_TYPE); } - else if ( isOption(arg, "align-pointer=middle") ) + else if (isOption(arg, "align-pointer=middle")) { formatter.setPointerAlignment(PTR_ALIGN_MIDDLE); } - else if ( isOption(arg, "align-pointer=name") ) + else if (isOption(arg, "align-pointer=name")) { formatter.setPointerAlignment(PTR_ALIGN_NAME); } - else if ( isParamOption(arg, "k") ) + else if (isParamOption(arg, "k")) { int align = 0; string styleParam = getParam(arg, "k"); @@ -3083,23 +3421,23 @@ else if (align == 3) formatter.setPointerAlignment(PTR_ALIGN_NAME); } - else if ( isOption(arg, "align-reference=none") ) + else if (isOption(arg, "align-reference=none")) { formatter.setReferenceAlignment(REF_ALIGN_NONE); } - else if ( isOption(arg, "align-reference=type") ) + else if (isOption(arg, "align-reference=type")) { formatter.setReferenceAlignment(REF_ALIGN_TYPE); } - else if ( isOption(arg, "align-reference=middle") ) + else if (isOption(arg, "align-reference=middle")) { formatter.setReferenceAlignment(REF_ALIGN_MIDDLE); } - else if ( isOption(arg, "align-reference=name") ) + else if (isOption(arg, "align-reference=name")) { formatter.setReferenceAlignment(REF_ALIGN_NAME); } - else if ( isParamOption(arg, "W") ) + else if (isParamOption(arg, "W")) { int align = 0; string styleParam = getParam(arg, "W"); @@ -3116,7 +3454,7 @@ else if (align == 3) formatter.setReferenceAlignment(REF_ALIGN_NAME); } - else if ( isParamOption(arg, "max-code-length=") ) + else if (isParamOption(arg, "max-code-length=")) { int maxLength = 50; string maxLengthParam = getParam(arg, "max-code-length="); @@ -3129,7 +3467,7 @@ else formatter.setMaxCodeLength(maxLength); } - else if ( isParamOption(arg, "xC") ) + else if (isParamOption(arg, "xC")) { int maxLength = 50; string maxLengthParam = getParam(arg, "xC"); @@ -3140,40 +3478,56 @@ else formatter.setMaxCodeLength(maxLength); } - else if ( isOption(arg, "xL", "break-after-logical") ) + else if (isOption(arg, "xL", "break-after-logical")) { formatter.setBreakAfterMode(true); } - else if ( isOption(arg, "xc", "attach-classes") ) + else if (isOption(arg, "xc", "attach-classes")) { formatter.setAttachClass(true); } - else if ( isOption(arg, "xV", "attach-closing-while") ) + else if (isOption(arg, "xV", "attach-closing-while")) { formatter.setAttachClosingWhile(true); } - else if ( isOption(arg, "xk", "attach-extern-c") ) + else if (isOption(arg, "xk", "attach-extern-c")) { formatter.setAttachExternC(true); } - else if ( isOption(arg, "xn", "attach-namespaces") ) + else if (isOption(arg, "xn", "attach-namespaces")) { formatter.setAttachNamespace(true); } - else if ( isOption(arg, "xl", "attach-inlines") ) + else if (isOption(arg, "xl", "attach-inlines")) { formatter.setAttachInline(true); } - else if ( isOption(arg, "xp", "remove-comment-prefix") ) + else if (isOption(arg, "xp", "remove-comment-prefix")) { formatter.setStripCommentPrefix(true); } + else if (isOption(arg, "xB", "break-return-type")) + { + formatter.setBreakReturnType(true); + } + else if (isOption(arg, "xD", "break-return-type-decl")) + { + formatter.setBreakReturnTypeDecl(true); + } + else if (isOption(arg, "xf", "attach-return-type")) + { + formatter.setAttachReturnType(true); + } + else if (isOption(arg, "xh", "attach-return-type-decl")) + { + formatter.setAttachReturnTypeDecl(true); + } // Objective-C options - else if ( isOption(arg, "xQ", "pad-method-prefix") ) + else if (isOption(arg, "xQ", "pad-method-prefix")) { formatter.setMethodPrefixPaddingMode(true); } - else if ( isOption(arg, "xR", "unpad-method-prefix") ) + else if (isOption(arg, "xR", "unpad-method-prefix")) { formatter.setMethodPrefixUnPaddingMode(true); } @@ -3197,49 +3551,50 @@ { formatter.setAlignMethodColon(true); } - else if ( isOption(arg, "xP0", "pad-method-colon=none") ) + else if (isOption(arg, "xP0", "pad-method-colon=none")) { formatter.setObjCColonPaddingMode(COLON_PAD_NONE); } - else if ( isOption(arg, "xP1", "pad-method-colon=all") ) + else if (isOption(arg, "xP1", "pad-method-colon=all")) { formatter.setObjCColonPaddingMode(COLON_PAD_ALL); } - else if ( isOption(arg, "xP2", "pad-method-colon=after") ) + else if (isOption(arg, "xP2", "pad-method-colon=after")) { formatter.setObjCColonPaddingMode(COLON_PAD_AFTER); } - else if ( isOption(arg, "xP3", "pad-method-colon=before") ) + else if (isOption(arg, "xP3", "pad-method-colon=before")) { formatter.setObjCColonPaddingMode(COLON_PAD_BEFORE); } + // NOTE: depreciated options - remove when appropriate // depreciated options //////////////////////////////////////////////////////////////////////// - else if ( isOption(arg, "indent-preprocessor") ) // depreciated release 2.04 + else if (isOption(arg, "indent-preprocessor")) // depreciated release 2.04 { formatter.setPreprocDefineIndent(true); } - else if ( isOption(arg, "style=ansi") ) // depreciated release 2.05 + else if (isOption(arg, "style=ansi")) // depreciated release 2.05 { formatter.setFormattingStyle(STYLE_ALLMAN); } // depreciated in release 3.0 ///////////////////////////////////////////////////////////////// - else if ( isOption(arg, "break-closing-brackets") ) // depreciated release 3.0 + else if (isOption(arg, "break-closing-brackets")) // depreciated release 3.0 { formatter.setBreakClosingHeaderBracketsMode(true); } - else if ( isOption(arg, "add-brackets") ) // depreciated release 3.0 + else if (isOption(arg, "add-brackets")) // depreciated release 3.0 { formatter.setAddBracketsMode(true); } - else if ( isOption(arg, "add-one-line-brackets") ) // depreciated release 3.0 + else if (isOption(arg, "add-one-line-brackets")) // depreciated release 3.0 { formatter.setAddOneLineBracketsMode(true); } - else if ( isOption(arg, "remove-brackets") ) // depreciated release 3.0 + else if (isOption(arg, "remove-brackets")) // depreciated release 3.0 { formatter.setRemoveBracketsMode(true); } - else if ( isParamOption(arg, "max-instatement-indent=") ) // depreciated release 3.0 + else if (isParamOption(arg, "max-instatement-indent=")) // depreciated release 3.0 { int maxIndent = 40; string maxIndentParam = getParam(arg, "max-instatement-indent="); @@ -3252,27 +3607,6 @@ else formatter.setMaxInStatementIndentLength(maxIndent); } -// NOTE: Removed in release 2.04. -// else if ( isOption(arg, "b", "brackets=break") ) -// { -// formatter.setBracketFormatMode(BREAK_MODE); -// } -// else if ( isOption(arg, "a", "brackets=attach") ) -// { -// formatter.setBracketFormatMode(ATTACH_MODE); -// } -// else if ( isOption(arg, "l", "brackets=linux") ) -// { -// formatter.setBracketFormatMode(LINUX_MODE); -// } -// else if ( isOption(arg, "u", "brackets=stroustrup") ) -// { -// formatter.setBracketFormatMode(STROUSTRUP_MODE); -// } -// else if ( isOption(arg, "g", "brackets=run-in") ) -// { -// formatter.setBracketFormatMode(RUN_IN_MODE); -// } // end depreciated options //////////////////////////////////////////////////////////////////// #ifdef ASTYLE_LIB // End of options used by GUI ///////////////////////////////////////////////////////////////// @@ -3280,11 +3614,11 @@ isOptionError(arg, errorInfo); #else // Options used by only console /////////////////////////////////////////////////////////////// - else if ( isOption(arg, "n", "suffix=none") ) + else if (isOption(arg, "n", "suffix=none")) { console.setNoBackup(true); } - else if ( isParamOption(arg, "suffix=") ) + else if (isParamOption(arg, "suffix=")) { string suffixParam = getParam(arg, "suffix="); if (suffixParam.length() > 0) @@ -3292,13 +3626,13 @@ console.setOrigSuffix(suffixParam); } } - else if ( isParamOption(arg, "exclude=") ) + else if (isParamOption(arg, "exclude=")) { string suffixParam = getParam(arg, "exclude="); if (suffixParam.length() > 0) console.updateExcludeVector(suffixParam); } - else if ( isOption(arg, "r", "R") || isOption(arg, "recursive") ) + else if (isOption(arg, "r", "R") || isOption(arg, "recursive")) { console.setIsRecursive(true); } @@ -3306,47 +3640,47 @@ { console.setIsDryRun(true); } - else if ( isOption(arg, "Z", "preserve-date") ) + else if (isOption(arg, "Z", "preserve-date")) { console.setPreserveDate(true); } - else if ( isOption(arg, "v", "verbose") ) + else if (isOption(arg, "v", "verbose")) { console.setIsVerbose(true); } - else if ( isOption(arg, "Q", "formatted") ) + else if (isOption(arg, "Q", "formatted")) { console.setIsFormattedOnly(true); } - else if ( isOption(arg, "q", "quiet") ) + else if (isOption(arg, "q", "quiet")) { console.setIsQuiet(true); } - else if ( isOption(arg, "i", "ignore-exclude-errors") ) + else if (isOption(arg, "i", "ignore-exclude-errors")) { console.setIgnoreExcludeErrors(true); } - else if ( isOption(arg, "xi", "ignore-exclude-errors-x") ) + else if (isOption(arg, "xi", "ignore-exclude-errors-x")) { console.setIgnoreExcludeErrorsAndDisplay(true); } - else if ( isOption(arg, "X", "errors-to-stdout") ) + else if (isOption(arg, "X", "errors-to-stdout")) { console.setErrorStream(&cout); } - else if ( isOption(arg, "lineend=windows") ) + else if (isOption(arg, "lineend=windows")) { formatter.setLineEndFormat(LINEEND_WINDOWS); } - else if ( isOption(arg, "lineend=linux") ) + else if (isOption(arg, "lineend=linux")) { formatter.setLineEndFormat(LINEEND_LINUX); } - else if ( isOption(arg, "lineend=macold") ) + else if (isOption(arg, "lineend=macold")) { formatter.setLineEndFormat(LINEEND_MACOLD); } - else if ( isParamOption(arg, "z") ) + else if (isParamOption(arg, "z")) { int lineendType = 0; string lineendParam = getParam(arg, "z"); @@ -3361,25 +3695,13 @@ else if (lineendType == 3) formatter.setLineEndFormat(LINEEND_MACOLD); } - else if ( isParamOption(arg, "stdin=") ) - { - string path = getParam(arg, "stdin="); - console.standardizePath(path); - console.setStdPathIn(path); - } - else if ( isParamOption(arg, "stdout=") ) - { - string path = getParam(arg, "stdout="); - console.standardizePath(path); - console.setStdPathOut(path); - } else isOptionError(arg, errorInfo); #endif } // End of parseOption function -// Parse options from the options file. -void ASOptions::importOptions(istream& in, vector& optionsVector) +// Parse options from the option file. +void ASOptions::importOptions(stringstream& in, vector& optionsVector) { char ch; bool isInQuote = false; @@ -3456,7 +3778,7 @@ { if (optionErrors.str().length() == 0) optionErrors << errorInfo << endl; // need main error message - optionErrors << arg << endl; + optionErrors << "\t" << arg << endl; } bool ASOptions::isParamOption(const string& arg, const char* option) @@ -3464,7 +3786,7 @@ bool retVal = arg.compare(0, strlen(option), option) == 0; // if comparing for short option, 2nd char of arg must be numeric if (retVal && strlen(option) == 1 && arg.length() > 1) - if (!isdigit((unsigned char)arg[1])) + if (!isdigit((unsigned char) arg[1])) retVal = false; return retVal; } @@ -3481,7 +3803,7 @@ // Return true if an int is big endian. bool ASEncoding::getBigEndian() const { - short int word = 0x0001; + char16_t word = 0x0001; char* byte = (char*) &word; return (byte[0] ? false : true); } @@ -3489,11 +3811,11 @@ // Swap the two low order bytes of a 16 bit integer value. int ASEncoding::swap16bit(int value) const { - return ( ((value & 0xff) << 8) | ((value & 0xff00) >> 8) ); + return (((value & 0xff) << 8) | ((value & 0xff00) >> 8)); } // Return the length of a utf-16 C string. -// The length is in number of utf16_t. +// The length is in number of char16_t. size_t ASEncoding::utf16len(const utf16* utf16In) const { size_t length = 0; @@ -3510,16 +3832,16 @@ size_t ASEncoding::utf8LengthFromUtf16(const char* utf16In, size_t inLen, bool isBigEndian) const { size_t len = 0; - size_t wcharLen = inLen / 2; - const short* uptr = reinterpret_cast(utf16In); - for (size_t i = 0; i < wcharLen && uptr[i];) + size_t wcharLen = (inLen / 2) + (inLen % 2); + const char16_t* uptr = reinterpret_cast(utf16In); + for (size_t i = 0; i < wcharLen;) { size_t uch = isBigEndian ? swap16bit(uptr[i]) : uptr[i]; if (uch < 0x80) len++; else if (uch < 0x800) len += 2; - else if ((uch >= SURROGATE_LEAD_FIRST) && (uch <= SURROGATE_TRAIL_LAST)) + else if ((uch >= SURROGATE_LEAD_FIRST) && (uch <= SURROGATE_LEAD_LAST)) { len += 4; i++; @@ -3828,10 +4150,10 @@ * /EXPORT:AStyleGetVersion=_AStyleGetVersion@0 * No /EXPORT is required for x64 */ -extern "C" EXPORT utf16_t* STDCALL AStyleMainUtf16(const utf16_t* pSourceIn, // the source to be formatted - const utf16_t* pOptions, // AStyle options - fpError fpErrorHandler, // error handler function - fpAlloc fpMemoryAlloc) // memory allocation function +extern "C" EXPORT char16_t* STDCALL AStyleMainUtf16(const char16_t* pSourceIn, // the source to be formatted + const char16_t* pOptions, // AStyle options + fpError fpErrorHandler, // error handler function + fpAlloc fpMemoryAlloc) // memory allocation function { if (fpErrorHandler == nullptr) // cannot display a message if no error handler return nullptr; @@ -3852,17 +4174,17 @@ return nullptr; } #ifndef _WIN32 - // check size of utf16_t on Linux + // check size of char16_t on Linux int sizeCheck = 2; - if (sizeof(utf16_t) != sizeCheck) + if (sizeof(char16_t) != sizeCheck) { - fpErrorHandler(104, "Unsigned short is not the correct size."); + fpErrorHandler(104, "char16_t is not the correct size."); return nullptr; } #endif ASLibrary library; - utf16_t* utf16Out = library.formatUtf16(pSourceIn, pOptions, fpErrorHandler, fpMemoryAlloc); + char16_t* utf16Out = library.formatUtf16(pSourceIn, pOptions, fpErrorHandler, fpMemoryAlloc); return utf16Out; } @@ -3904,7 +4226,7 @@ ASOptions options(formatter); vector optionsVector; - istringstream opt(pOptions); + stringstream opt(pOptions); options.importOptions(opt, optionsVector); @@ -3912,8 +4234,8 @@ if (!ok) fpErrorHandler(130, options.getOptionErrors().c_str()); - istringstream in(pSourceIn); - ASStreamIterator streamIterator(&in); + stringstream in(pSourceIn); + ASStreamIterator streamIterator(&in); ostringstream out; formatter.init(&streamIterator); @@ -3934,7 +4256,7 @@ } size_t textSizeOut = out.str().length(); - char* pTextOut = fpMemoryAlloc((long)textSizeOut + 1); // call memory allocation function + char* pTextOut = fpMemoryAlloc((long) textSizeOut + 1); // call memory allocation function if (pTextOut == nullptr) { fpErrorHandler(120, "Allocation failure on output."); @@ -3970,9 +4292,9 @@ { // create objects ASFormatter formatter; - auto console = make_shared(formatter); + unique_ptr console(new ASConsole(formatter)); - // process command line and options file + // process command line and option files // build the vectors fileNameVector, optionsVector, and fileOptionsVector vector argvOptions; argvOptions = console->getArgvOptions(argc, argv); diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/astyle_main.h 2018-01-15 20:56:41.000000000 +0000 @@ -1,5 +1,5 @@ // astyle_main.h -// Copyright (c) 2017 by Jim Pattee . +// Copyright (c) 2018 by Jim Pattee . // This code is licensed under the MIT License. // License.md describes the conditions under which this software may be distributed. @@ -57,9 +57,9 @@ #pragma warning(disable: 4996) // secure version deprecation warnings #endif -// for namespace problem in version 5.0 -#if defined(_MSC_VER) && _MSC_VER < 1200 // check for V6.0 - #error - Use Microsoft compiler version 6 or higher +// for Visual Studio supported C++11 standard +#if defined(_MSC_VER) && _MSC_VER < 1600 + #error Use Microsoft Visual Studio 2010 or higher #endif #ifdef __clang__ @@ -101,8 +101,6 @@ #endif #endif // #ifdef _WIN32 - // define utf-16 bit text for the platform - typedef unsigned short utf16_t; // define pointers to callback error handler and memory allocation typedef void (STDCALL* fpError)(int errorNumber, const char* errorMessage); typedef char* (STDCALL* fpAlloc)(unsigned long memoryNeeded); @@ -117,8 +115,9 @@ // //---------------------------------------------------------------------------- // ASStreamIterator class -// typename will be istringstream for GUI and istream otherwise -// ASSourceIterator is an abstract class defined in astyle.h +// typename will be stringstream for AStyle +// it could be istream or wxChar for plug-ins +// ASSourceIterator is an inherited abstract class defined in astyle.h //---------------------------------------------------------------------------- template @@ -156,6 +155,7 @@ bool compareToInputBuffer(const string& nextLine_) const { return (nextLine_ == prevBuffer); } const string& getOutputEOL() const { return outputEOL; } + streamoff getPeekStart() const { return peekStart; } bool hasMoreLines() const { return !inStream->eof(); } }; @@ -167,7 +167,7 @@ class ASEncoding { private: - typedef unsigned short utf16; // 16 bits + typedef char16_t utf16; // 16 bits unsigned typedef unsigned char utf8; // 8 bits typedef unsigned char ubyte; // 8 bits enum { SURROGATE_LEAD_FIRST = 0xD800 }; @@ -203,7 +203,7 @@ ASOptions(ASFormatter& formatterArg, ASConsole& consoleArg); #endif string getOptionErrors() const; - void importOptions(istream& in, vector& optionsVector); + void importOptions(stringstream& in, vector& optionsVector); bool parseOptions(vector& optionsVector, const string& errorInfo); private: @@ -237,7 +237,8 @@ { private: // variables ASFormatter& formatter; // reference to the ASFormatter object - ASLocalizer localizer; // ASLocalizer object + ASEncoding encode; // file encoding conversion + ASLocalizer localizer; // language translation ostream* errorStream; // direct error messages to cerr or cout // command line options bool isRecursive; // recursive option @@ -249,7 +250,6 @@ bool isFormattedOnly; // formatted lines only option bool ignoreExcludeErrors; // don't abort on unmatched excludes bool ignoreExcludeErrorsDisplay; // don't display unmatched excludes - bool optionsFileRequired; // options= option bool useAscii; // ascii option // other variables bool bypassBrowserOpen; // don't open the browser on html options @@ -261,12 +261,11 @@ bool lineEndsMixed; // output has mixed line ends int linesOut; // number of output lines - ASEncoding utf8_16; // utf8/16 conversion methods - string outputEOL; // current line end string prevEOL; // previous line end - string optionsFileName; // file path and name of the options file to use + string optionFileName; // file path and name of the options file string origSuffix; // suffix= option + string projectOptionFileName; // file path and name of the project options file string stdPathIn; // path to input from stdin= string stdPathOut; // path to output from stdout= string targetDirectory; // path to the directory being processed @@ -276,6 +275,7 @@ vector excludeHitsVector; // exclude flags for error reporting vector fileNameVector; // file paths and names from the command line vector optionsVector; // options from the command line + vector projectOptionsVector;// project options from the project options file vector fileOptionsVector; // options from the options file vector fileName; // files to be processed including path @@ -288,6 +288,7 @@ void error(const char* why, const char* what) const; void formatCinToCout(); vector getArgvOptions(int argc, char** argv) const; + bool fileExists(const char* file) const; bool fileNameVectorIsEmpty() const; ostream* getErrorStream() const; bool getFilesAreIdentical() const; @@ -305,10 +306,12 @@ string getLanguageID() const; string getNumberFormat(int num, size_t lcid = 0) const; string getNumberFormat(int num, const char* groupingArg, const char* separator) const; - string getOptionsFileName() const; + string getOptionFileName() const; string getOrigSuffix() const; + string getProjectOptionFileName() const; string getStdPathIn() const; string getStdPathOut() const; + void getTargetFilenames(string& targetFilename_, vector& targetFilenameVector) const; void processFiles(); void processOptions(const vector& argvOptions); void setBypassBrowserOpen(bool state); @@ -321,9 +324,10 @@ void setIsRecursive(bool state); void setIsVerbose(bool state); void setNoBackup(bool state); - void setOptionsFileName(const string& name); + void setOptionFileName(const string& name); void setOrigSuffix(const string& suffix); void setPreserveDate(bool state); + void setProjectOptionFileName(const string& optfilepath); void setStdPathIn(const string& path); void setStdPathOut(const string& path); void standardizePath(string& path, bool removeBeginningSeparator = false) const; @@ -333,6 +337,7 @@ vector getExcludeHitsVector() const; vector getFileNameVector() const; vector getOptionsVector() const; + vector getProjectOptionsVector() const; vector getFileOptionsVector() const; vector getFileName() const; @@ -341,10 +346,14 @@ ASConsole& operator=(ASConsole&); // assignment operator not to be implemented void correctMixedLineEnds(ostringstream& out); void formatFile(const string& fileName_); + string getParentDirectory(const string& absPath) const; + string findProjectOptionFilePath(const string& fileName_) const; string getCurrentDirectory(const string& fileName_) const; - void getFileNames(const string& directory, const string& wildcard); + void getFileNames(const string& directory, const vector& wildcards); void getFilePaths(const string& filePath); + string getFullPathName(const string& relativePath) const; string getParam(const string& arg, const char* op); + bool isHomeOrInvalidAbsPath(const string& absPath) const; void initializeOutputEOL(LineEndFormat lineEndFormat); bool isOption(const string& arg, const char* op); bool isOption(const string& arg, const char* a, const char* b); @@ -380,15 +389,15 @@ ASLibrary() {} virtual ~ASLibrary() {} // virtual functions are mocked in testing - utf16_t* formatUtf16(const utf16_t*, const utf16_t*, fpError, fpAlloc) const; - virtual utf16_t* convertUtf8ToUtf16(const char* utf8In, fpAlloc fpMemoryAlloc) const; - virtual char* convertUtf16ToUtf8(const utf16_t* utf16In) const; + char16_t* formatUtf16(const char16_t*, const char16_t*, fpError, fpAlloc) const; + virtual char16_t* convertUtf8ToUtf16(const char* utf8In, fpAlloc fpMemoryAlloc) const; + virtual char* convertUtf16ToUtf8(const char16_t* utf16In) const; private: static char* STDCALL tempMemoryAllocation(unsigned long memoryNeeded); private: - ASEncoding utf8_16; // utf8/16 conversion methods + ASEncoding encode; // file encoding conversion }; #endif // ASTYLE_LIB @@ -420,10 +429,10 @@ //---------------------------------------------------------------------------- #ifdef ASTYLE_LIB extern "C" EXPORT -utf16_t* STDCALL AStyleMainUtf16(const utf16_t* pSourceIn, - const utf16_t* pOptions, - fpError fpErrorHandler, - fpAlloc fpMemoryAlloc); +char16_t* STDCALL AStyleMainUtf16(const char16_t* pSourceIn, + const char16_t* pOptions, + fpError fpErrorHandler, + fpAlloc fpMemoryAlloc); #endif // ASTYLE_LIB //----------------------------------------------------------------------------- diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/install.html codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/install.html --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/install.html 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/install.html 2018-01-15 20:56:41.000000000 +0000 @@ -24,7 +24,7 @@

Linux Version

- CodeBlocks Linux

+ CMake Linux

GCC Makefile

@@ -32,25 +32,29 @@

Intel Makefile

- Other Makefile Targets

+ CodeBlocks Linux

MacOS Version

- CodeBlocks MacOS

-

- Xcode

+ CMake MacOS

MacOS Makefile

+

+ Xcode

Windows Version

Precompiled Executable

+ CMake Windows

+

CodeBlocks Windows

Visual Studio

- Other Compilers

+ Other Makefile Targets

+

+ Other Development Environments

Compiler Options

@@ -69,44 +73,73 @@ documentation, Visual C project files, and an executable. The Windows Version compile instructions below give information for compiling the source code.

+ astyle_x.x_windows_xp.zip is the Windows XP version of Artistic Style. It is identical to the + above Windows version except the executable is compiled to be compatible with Windows XP. If you are not running + Windows XP, use the above version.

+

Only one platform is supported in each distribution package. If you use Artistic Style on more than one platform you will need to download packages for each platform. The main difference in platforms is the build directories and the line endings. Most compilers and development packages will accept any type of line ending. The source code and documentation are the same for all distributions.

-

Linux Version

+

Linux Version

-

CodeBlocks Linux

+

CMake Linux

- There are workspace and project files for several Linux compilers. Open a workspace file for the appropriate - compiler. All projects have at least Debug and Release configurations. All output will be in the - "bin" directory. The workspace contains the following projects.

+ Artistic Style has CMake support for GCC, Clang, and Intel compilers. Other compilers will probably work if + the necessary options are set. Refer to the section on Compiler Options for + more information.

+

+ Since the different builds use the same source files an "out of source" build should be used. The + default build is a release version. A debug version must be specifically requested. The + the following options are available for building the various configurations.

    -
  • AStyle builds the Artistic Style command line program (AStyle.exe). 
  • -
  • AStyle Dll builds the Artistic Style program as a Dynamic Link Library (AStyle.dll). This will - also build an export library for linking the dll.
  • -
  • AStyle Java builds the Artistic Style program as a Dynamic Link Library (AStylej.dll) that can - be called from a Java program. The Java Development (JDK) is required for the project to compile. The Project - Properties must have an include path to the JDK include and include/win32 directories. This is set in "Project - > Properties > C/C++ > General > Additional Include Directories". The default setting - is for the JDK to be installed in the default directory, but it may not be the most current release. The output - DLL can also be called from a C++ or C# program.
  • -
  • AStyle Lib builds the Artistic Style program as a Static Library (libAStyle.lib). This can be - statically linked to a calling program.
  • +
  • The default builds the Artistic Style command line executable (astyle).
  • +
  • BUILD_SHARED_LIBS builds the Artistic Style program as a shared object (libastyle.so).
  • +
  • BUILD_JAVA_LIBS builds the Artistic Style program as a shared object (libastylej.so) that can be called + from a Java program. The Java Development Kit (JDK) must be installed for the project to compile.
  • +
  • BUILD_STATIC_LIBS builds the Artistic Style program as a Static Library (libastyle.a) that can be + statically linked to a user program.
+
EXAMPLES
+

- There are build - folders for the following compilers. All compiler folders are in the "build" directory. -

-
    -
  • cb-clang contains the workspace and project files for the Linux Clang Compiler.
  • -
  • cb-gcc contains the workspace and project files for the GCC Compiler.
  • -
  • cb-intel contains the workspace and project files for the Linux Intel Compiler.
  • -
+ The following examples are assumed to be run from the astyle directory that contains + CMakeLists.txt. They show out of source builds that generate makefiles.

+

+ To build the console release version:

+
mkdir  as-gcc-exe
+cd  as-gcc-exe
+cmake  ../
+make
+

- For other compilers, follow the instructions in Other Compilers.

+ To build the shared debug version:

+
mkdir  --parents  as-gcc-so
+cd  as-gcc-so
+cmake  -DBUILD_SHARED_LIBS=1  -DCMAKE_BUILD_TYPE=Debug  ../
+make
+
+

+ To build the Java release version using the Clang compiler:

+
mkdir  as-clang-java
+cd  as-clang-java
+CXX=clang++  CC=clang  cmake  -DBUILD_JAVA_LIBS=1  ../
+make
+
+ +
INSTALL
+ +

+ The makefile install option installs the astyle executable and documentation files. The default is /usr/bin for + the executable and /usr/share/doc/astyle for the documentation. You must have the appropriate permissions to use + install.

+ +

+ There is no uninstall. The easiest way to uninstall is to use the install_manifest.txt file, for example + "xargs rm < install_manifest.txt".

GCC Makefile

@@ -123,19 +156,19 @@ or "make release" will build the command line configuration. Following are the symbolic names and file names (in parens) of the various configurations:

    -
  • release builds the Artistic Style command line program (astyle). This is the default option. -
  • -
  • shared builds the Artistic Style program as a shared library (libastyle.so).
  • -
  • static builds the Artistic Style program as a static library (libastyle.a).
  • -
  • debug builds the Artistic Style command line program with debugging information (astyled). -
  • -
  • shareddebug builds the Artistic Style program as a shared library with debugging information - (libastyled.so). -
  • -
  • staticdebug builds the Artistic Style program as a static library with debugging information - (libastyled.a). -
  • -
  • all builds all the above configurations. +
  • release or astyle builds the Artistic Style command line program. This is the + default option.
  • +
  • shared or libastyle.so builds the Artistic Style program as a shared + library.
  • +
  • static or libastyle.a builds the Artistic Style program as a static + library.
  • +
  • debug or astyled builds the Artistic Style command line program with debugging + information
  • +
  • shareddebug or libastyled.so builds the Artistic Style program as a shared library + with debugging information.
  • +
  • staticdebug or libastyled.a builds the Artistic Style program as a static library + with debugging information.
  • +
  • all builds all the above configurations.

    The following Java shared library builds are separate from the above. They include a Java Native Interface (JNI) and require that the Java Development Kit (JDK) be installed. The environment variable JAVA_HOME should be defined. @@ -148,7 +181,7 @@

  • javadebug builds the Artistic Style program as a shared library which includes the JNI and debugging information (libastylejd.so).
  • -
  • javaall builds all the above java configurations.
  • +
  • javaall builds all the above java configurations.

More than one configuration can be built at the same time. For example, to build all the release configurations @@ -162,7 +195,7 @@

Clang has a static analyzer that finds potential bugs in C/C++ and Objective-C programs. It can be run as a standalone - tool from the command-line, and runs in tandem with a build. There is a script file, analyze.sh, that will run + tool from the command-line and runs in tandem with a build. There is a script file, analyze.sh, that will run the analysis on Artistic Style.

The build has no autoconf dependency. To build the Artistic Style configurations use the makefile located in the @@ -172,7 +205,7 @@

To build the other astyle configurations, you can enter the file name or a symbolic name. The configurations for - Clang are the same as for the GCC compiler. More than one configuration can be + Clang are the same as for the GCC Makefile. More than one configuration can be built at the same time. For example, to build all the release configurations enter:

cd astyle/build/clang
make release shared static
@@ -186,14 +219,10 @@ These procedures and the makefile are for recent versions of the compiler. They may not work for earlier versions. Instructions for your compiler are in the compiler documentation file "get_started_lc.htm".

- To compile the source there are environment variables that must be set by running the compiler environment script - compilervars.sh (or compilervars.csh) with an argument that specifies the target architecture. If this has not - been done already enter: "source  <install-dir>/bin/compilervars.sh <arg>", - where <install-dir> is the directory where the compiler is installed and <arg> is ia32 - or intel64. If this is not done "make" will display an error message "*** The compiler environment - variables are not set." On an Intel x64 platform installed in the default directory the instruction would - be

-
source /opt/intel/bin/compilervars.sh intel64
+ To compile with Intel there are environment variables that must be set by running the compiler environment + script compilervars.sh (or compilervars.csh) with an argument that specifies the target architecture. This + should be done before running the make. If it is not done, "make" will display an error message + stating that the compiler environment variables are not set.

The build has no autoconf dependency. To build the Artistic Style configurations use the makefile located in the astyle/build/intel directory. The output executables will be in the astyle/build/intel/bin directory. To build @@ -201,88 +230,72 @@

cd astyle/build/intel
make

To build the other astyle configurations, you can enter the file name or a symbolic name. The configuration names - for Intel are the same as for the GCC compiler. More than one configuration can be + for Intel are the same as for the GCC Makefile. More than one configuration can be built at the same time. For example, to build the entire debug configurations enter:

cd astyle/build/intel
make debug shareddebug staticdebug

The Other Makefile Targets section contains additional target options.

-

Other Makefile Targets

+

CodeBlocks Linux

- The following makefile targets are available for GCC, Clang, Intel, and Mac.

- -
clean
- + There are build folders for the following compilers. All compiler folders are in the "build" directory. +

+
    +
  • cb-clang contains the workspace and project files for the Linux Clang Compiler.
  • +
  • cb-gcc contains the workspace and project files for the Linux GCC Compiler.
  • +
  • cb-intel contains the workspace and project files for the Linux Intel Compiler.
  • +

- Removes the object and executable files for all configurations.

+ There are workspace and project files for each folder. All projects have at least Debug and Release + configurations. All output will be in the "bin" directory.

- To remove the files for all configurations:

-
make clean
-
- -
cleanobj
+ The workspace contains the following projects.

+
    +
  • AStyle builds the Artistic Style command line program (astyle).
  • +
  • AStyle So builds the Artistic Style program as a shared object (libastyle.so).
  • +
  • AStyle Java builds the Artistic Style program as a shared object (libastylej.so) that can + be called from a Java program. The Java Development Kit (JDK) is required for the project to compile. The + Project Properties must have an include path to the JDK include directories.
  • +
  • AStyle A builds the Artistic Style program as a Static Library (libastyle.a). This can be + statically linked to a user program.
  • +

- Removes the object files for all configurations. The executables will not be removed.

-

- To remove only the object files for all configurations:

-
make cleanobj
-
+ For other Linux development environments, follow the instructions in Other + Development Environments.

+ +

MacOS Version

-
install
+

CMake MacOS

- Installs the - astyle executable and documentation files. The default is /usr/bin for the executable and /usr/share/doc/astyle - for the documentation. You must have the appropriate permissions to use install.

-

- To install the astyle to the default directories:

-
sudo make install
-
-

- To install astyle to a different bin directory set a value for the macro $(prefix). For example, to install the - executable to a user's home directory (/home/user/bin):

-
sudo make prefix=$HOME install
-
+ Artistic Style has CMake support for MacOS. It is used the same as CMake Linux + except the supported compilers are only GCC and Clang.

-
uninstall
+

MacOS Makefile

- Uninstalls the executable and documentation. You must have the appropriate permissions to use uninstall.

+ The Artistic Style makefile compile uses the Mac OS "Command Line Tools". If you have Xcode 4.3 or newer + the command line tools, such as "make", are NOT installed by default. They must be downloaded and installed + separately. Once everything is successfully installed, you should see "make" and other command line + developer tools in /usr/bin.

- To uninstall astyle from the default directories:

-
sudo make uninstall
+        The build has no autoconf dependency. To build the Artistic Style configurations use the makefile located in the
+        astyle/build/mac directory. The executables will be in the astyle/build/mac/bin directory. To build the command
+        line configuration, enter the following:

+
cd astyle/build/mac
make

- To uninstall the files from a different directory set a value for the macro $(prefix). For example, to uninstall - the files from a user's home directory (/home/user):

-
 sudo make prefix=$HOME uninstall
+        To build the other astyle configurations, you can enter the file name or a symbolic name. The configurations for
+        Mac are the same as for the GCC Makefile. More than one configuration can be
+        built at the same time. For example, to build all the release configurations enter:

+
cd astyle/build/mac
make release shared static

- NOTE: The uninstall option will NOT remove the .astylerc files from the users' home directories. The files must - be removed individually for each user.

- -

MacOS Version

- -

CodeBlocks MacOS

- -

- There are workspace and project files for the MacOS compiler. Open the workspace file for the MacOS compiler. - All projects have at least Debug and Release configurations. All output will be in the "bin" - directory.

-

- The available projects are the same as in CodeBlocks Linux.

- -

- There is one build folder for the MacOS compiler. The compiler folder is in the "build" - directory.

-
    -
  • cb-mac contains the workspace and project files for the MacOS Compiler.
  • -
-

- For other compilers, follow the instructions in Other Compilers.

+ The Other Makefile Targets section contains additional target + options.

Xcode

@@ -302,7 +315,7 @@ C++ or C# program. -
install
+
INSTALL

Only the astyle executable is installed. The library project installs are sent to UninstalledProjects in @@ -321,7 +334,7 @@

sudo bash install.sh
 
-
uninstall
+
UNINSTALL

Uninstalls the executable and documentation. You must have the appropriate permissions to use uninstall.

@@ -333,55 +346,109 @@ NOTE: The uninstall option will NOT remove the .astylerc files from the users' home directories. The files must be removed individually for each user.

-

MacOS Makefile

+

Windows Version

+ +

Precompiled Executable

- The Artistic Style makefile compile uses the Mac OS "Command Line Tools". If you have Xcode 4.3 or newer - the command line tools, such as "make", are NOT installed by default. They must be downloaded and installed - separately. Once everything is successfully installed, you should see "make" and other command line - developer tools in /usr/bin.

+ In addition to the source files, the Windows distribution package contains an Artistic Style Win32 executable + (AStyle.exe). If you prefer to compile the executable yourself, pursue the following instructions.

+ +

CMake Windows

+

- The build has no autoconf dependency. To build the Artistic Style configurations use the makefile located in the - astyle/build/mac directory. The executables will be in the astyle/build/mac/bin directory. To build the command - line configuration, enter the following:

-
cd astyle/build/mac
make + Artistic Style has CMake support for Borland, and MinGW compilers. Other compilers will probably work if + the necessary options are set. Refer to the section on Compiler Options for + more information.

+

+ The console executable will run for both of the supported compilers. The DLL builds may not. CMake does not + fully support all Windows compilers. To build the DLLs it would be best to generate an IDE project file and + compile the DLLs with the IDE. The "build" folder contains project files for CodeBlocks and Visual Studio. +

+

+ Since the different builds use the same source files an "out of source" build should be used. The + default build for MinGW is a release version. A debug version must be specifically requested. For + Borland, a release build may need to be specifically requested, depending on the CMake release used. Borland + has been tested with the bcc32c free compiler. It may or may not work with other Borland compilers. The the following + options are available for building the various configurations.

+
    +
  • The default builds the Artistic Style command line executable (AStyle.exe).
  • +
  • BUILD_SHARED_LIBS builds the Artistic Style program as a DLL (AStylexx.dll, where xx is the astyle release + number).
  • +
  • BUILD_JAVA_LIBS builds the Artistic Style program as a DLL (AStylexxj.dll, where xx is the astyle release + number) that can be called from a Java program. The Java Development Kit (JDK) must be installed for the project + to compile.
  • +
  • BUILD_STATIC_LIBS builds the Artistic Style program as a Static Library (AStyleLib.lib) that can be + statically linked to a user program.
  • +
+ +
EXAMPLES
+ +

+ The following examples are assumed to be run from the astyle directory that contains + CMakeLists.txt. They show out of source builds that generate makefiles.

+

+ A path to the compiler executable + may need to be declared before compiling. And the Borland free compiler will need the compiler name. + To set the variables before compiling (replace the path names with the paths on your computer):

+
set PATH=C:\Program Files\CMake\bin;%PATH%
+set PATH=C:\Program Files (x86)\Embarcadero\BCC101\bin;%PATH%
+set CXX=bcc32c
 

- To build the other astyle configurations, you can enter the file name or a symbolic name. The configurations for - Mac are the same as for the Linux GCC compiler. More than one configuration can be - built at the same time. For example, to build all the release configurations enter:

-
cd astyle/build/mac
make release shared static + To build the Borland console release version (the release build may need to be specified):

+
md  as-bcc32c-exe
+cd  as-bcc32c-exe
+cmake  -G "Borland Makefiles"  -DCMAKE_BUILD_TYPE=Release  ../
+make
 

- The Other Makefile Targets section contains additional target - options.

+ To build the MinGW console release version:

+
md  as-mingw-exe
+cd  as-mingw-exe
+cmake  -G "MinGW Makefiles"  ../
+mingw32-make
-

Windows Version

+

As stated previously, the DLL builds may not work with the CMake generated makefiles.

+
INSTALL
-

Precompiled Executable

+

+ The makefile install option installs the astyle executable and documentation files. The default is "C:\Program + Files (x86)\AStyle" for the executable and "C:\Program Files (x86)\AStyle\doc" for the documentation. + You may need to run as an administrator to install.

- In addition to the source files, the Windows distribution package contains an Artistic Style Win32 executable - (AStyle.exe). If you prefer to compile the executable yourself, pursue the following instructions.

+ There is no uninstall. The uninstall must be done manually. Just remove the two folders indicated in the + Install.

CodeBlocks Windows

- There are workspace and project files for several Windows compilers. Open a workspace file for the appropriate - compiler. All projects have at least Debug and Release configurations. All output will be in the "bin" - directory.

-

- The available projects are the same as in CodeBlocks Linux.

- -

There are build folders for the following compilers. All compiler folders are in the "build" directory.

    -
  • cb-bcc32ccontains the workspace and project files for the Embarcadero BCC32C Compiler.
  • -
  • cb-mingwcontains the workspace and project files for the MinGw or TDM_GCC Compilers.
  • +
  • cb-bcc32c contains the workspace and project files for the Embarcadero BCC32C Compiler.
  • +
  • cb-mingw contains the workspace and project files for the MinGw or TDM_GCC Compilers.
  • +
+ +

+ There are workspace and project files for each folder. All projects have at least Debug and Release configurations. + All output + will be in the "bin" directory.

+

+ The workspace contains the following projects.

+
    +
  • AStyle builds the Artistic Style command line program (AStyle.exe).
  • +
  • AStyle Dll builds the Artistic Style program as a shared object (AStyle.dll).
  • +
  • AStyle Java builds the Artistic Style program as a shared object AStylej.dll) that can + be called from a Java program. The Java Development Kit (JDK) is required for the project to compile. The + Project Properties must have an include path to the JDK include directories.
  • +
  • AStyle Lib builds the Artistic Style program as a Static Library (astyle.lib). This can be + statically linked to a calling program.

- For other compilers, follow the instructions in Other Compilers.

+ For other Windows development environments, follow the instructions in + Other Development Environments.

Visual Studio

@@ -395,9 +462,9 @@
  • All AStyle builds the release and the debug configurations for all the following.
  • AStyle builds the Artistic Style command line program (AStyle.exe). This project has an extra - "Static" option. It is the same as the "Release" build except that it is linked with a static runtime library. - This is needed if the executable is to be run on a system without Visual Studio installed. The builds for this - configuration are placed in a separate "binstatic" directory.
  • + "Static"" option. It is the same as the "Release" build except that it is linked with a static + runtime library. This is needed if the executable is to be run on a system without Visual Studio installed. The + builds for this configuration are placed in a separate "binstatic" directory.
  • AStyle Dll builds the Artistic Style program as a Dynamic Link Library (AStyle.dll). This will also build an export library and a static library for linking the dll.
  • AStyle Java builds the Artistic Style program as a Dynamic Link Library (AStylej.dll) that can @@ -409,13 +476,72 @@
  • AStyle Lib builds the Artistic Style program as a Static Library (libAStyle.lib). This can be statically linked to a calling program.
  • +

    + For other Windows development environments, follow the instructions in + Other Development Environments.

    -

    Other Compilers

    +

    Other Makefile Targets

    - To use other compilers a project file must be built using a development environment.

    + The following makefile targets are available for GCC, Clang, Intel, and Mac.

    + +
    CLEAN
    + +

    + Removes the object and executable files for all configurations.

    +

    + To remove the files for all configurations:

    +
    make clean
    +
    + +
    CLEANOBJ
    + +

    + Removes the object files for all configurations. The executables will not be removed.

    +

    + To remove only the object files for all configurations:

    +
    make cleanobj
    +
    + +
    INSTALL
    + +

    + Installs the astyle executable and documentation files. The default is /usr/bin for the executable and /usr/share/doc/astyle + for the documentation. You must have the appropriate permissions to use install.

    +

    + To install the astyle to the default directories:

    +
    sudo make install
    +
    +

    + To install astyle to a different bin directory set a value for the macro $(prefix). For example, to install the + executable to a user's home directory (/home/user/bin):

    +
    sudo make prefix=$HOME install
    +
    + +
    UNINSTALL
    + +

    + Uninstalls the executable and documentation. You must have the appropriate permissions to use uninstall.

    +

    + To uninstall astyle from the default directories:

    +
    sudo make uninstall
    +
    +

    + To uninstall the files from a different directory set a value for the macro $(prefix). For example, to uninstall + the files from a user's home directory (/home/user):

    +
     sudo make prefix=$HOME uninstall
    +
    +

    + NOTE: The uninstall option will NOT remove the .astylerc files from the users' home directories. The files must + be removed individually for each user.

    + +

    Other Development Environments

    + +

    + To use other development environments project files usually must be built. CMake can be used if the development + environment is supported. Otherwise, use the development environment to create files.

      -
    • Create a project using the compiler development environment.
    • +
    • Create a project using the development environment.
    • Add to the project all the .cpp and .h files in the "src" directory.
    • The Compiler Options section discusses the compiler options to use.
    • Compile.
    • @@ -432,10 +558,10 @@

      Artistic Style is a small program and it is best to optimize for speed. The debug configurations are not usually optimized. To optimize for speed in the release configurations, use the macro NDEBUG to remove asserts. If - necessary, use an option to activate the C++11 standards (--std=c++0x on most compilers). Use an option that allows - inline function expansion. Runtime Type Information (RTTI) is NOT needed and exceptions are NOT used. Use whole - program optimization if your compiler supports it. There may be other options you can use depending on the - compiler.

      + necessary, use an option to activate the C++11 standards (-std=c++11 or -std=c++0x on most compilers). Use an + option that allows inline function expansion. Runtime Type Information (RTTI) is NOT needed and exceptions are + NOT used. Use whole program optimization if your compiler supports it. There may be other options you can use + depending on the compiler.

       

      @@ -446,6 +572,8 @@

       

      +

      +  

      diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/news.html codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/news.html --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/news.html 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/news.html 2018-01-15 20:56:41.000000000 +0000 @@ -17,11 +17,93 @@

       

      -

      Artistic Style 3.0  (Pending)

      +

      Artistic Style 3.1  (January 2018)

      + +

      + The Windows default option file location has been changed from USERPROFILE to APPDATA. This + moves the file from the User directory and to the user's hidden AppData\Roaming directory. The + USERPROFILE location has been depreciated and will be removed in a future release. You will need to relocate the + options file manually, Artistic Style will not change it. If the options file is in both locations, the new APPDATA + location will be used.

      +

      + The console build now accepts option file input encoded in UTF-16, or UTF-8 with a Byte Order Mark (BOM or signature). +

      +

      + New options, "break-return-type" and "break-return-type-decl", will break the return type + from function definitions and function declarations. Additional new options, "attach-return-type" and + "attach-return-type-decl", will attach the broken return types to function definitions and function + declarations. There is more information in the "Formatting Options" section of the documentation. +

      +

      + A new option, "style=ratliff", has been added as an alternate for banner style.

      +

      + Several changes have been made to Objective-C which will improve formatting in certain cases.

      +

      + CMake can now be used to compile the AStyle builds. It is run from the top level folder instead of the + "build" folder, and builds a Release configuration by default. The "Install Information" + contains additional information.

      +

      + When formatting files from the command line, multiple file extensions may now be used. The file + extensions should be separated by commas or semicolons. For example, to format C++ files, use + "astyle /home/project/*.cpp,*.h". This will change the processing sequence to format all requested files + in a directory rather than formatting a directory once for each file extension. There is additional information + in the "Usage" section of the documentation. +

      +

      + New options "project", "project=####", and "project=none"will allow the use of an + optional project option file. This may be used to supplement or replace the command line options and the default + option file. The file is identified by a file name only and resides in the top level folder of a project. The + default file names are .astylerc or _astylerc. A specific file name may also be specified. Instead of an + option, the environment variable ARTISTIC_STYLE_PROJECT_OPTION may be used. Using the environment variable + will make the project file the default for all projects. When formatting files in a project, the project option + file will be obtained from the files directory or a parent directory. The documentation has the details + in the "Option Files" section. The "project" option is described in the + "Command Line Only" section.

      +

      + Allowing both option files enables them to be used for different purposes. For example, the default + options could contain the file formatting options and the project options could contain the excludes for the + given project. The order of precedence, highest to lowest, is command line options, project options, and default + options. Options with a value (e.g. style=kr, indent=spaces) may be replaced by an option with a higher precedence. + The binary options (indent-classes, pad-oper) cannot be changed. Once they are set they stay set. Both the + default and project option files may be disabled if they are present and not required. When testing the + option files, the options "verbose" and "dry-run" may be used. The option files used + will be displayed by the "verbose" option.

      +

      + When making changes to more than one file in a project, it may be desirable to format an entire folder. Wildcards + may be used in a single folder without recursive. The current directory is used if a path is not given. So, + for example, to format all changed files in the current directory using the project options, use the command: + "astyle --project -A9s *.cpp,*.h". This example uses the project option file .astylerc + or _astylerc and overrides the project options with the command line -A9s options.

      +

      + Language translations have been added for the new project option file. A few of the other messages were changed + as well. If there is a better translation available report the change as a bug report. Be sure to include the + new translation. Translations are in the ASLocalizer.cpp file.

      +

      + A new virtual method, getPeekStart(), has been added to the pure virtual class ASSourceIterator. If you have + inherited this class to access the formatter, you will need to add a method similar to getPeekStart() in the + ASStreamIterator class in astyle_main.h.

      +

      + The Artistic Style source code has been fuzz tested with American Fuzzy Lop (AFL) and libFuzzer from Clang. This + will help prevent crashes caused by invalid input. There were about 30 corrections made to the source code. Most + of the crashes were caused by asserts which would not be present in a release version. There were a couple of + corrections that required logic changes. The changes should not affect the way the code is formatted.

      +

      + The documentation file, astyle.html, now has a sticky button in the lower right corner. It appears after you + have scrolled past the Contents section. It is labeled "Top" but actually takes you back to the Contents. + The purpose is to improve speed in navigating the document.

      +

      + Thanks to Rian Quinn, David Haney, and Tamás Kurucsai for their contributions.

      + +

      Artistic Style 3.0  (April 2017)

      + +

      + Release 3.0.1 (May 2017) is a maintenance release and no new features were added. A list of changes is in + the Release Notes. The following information is for the original 3.0 release. Thanks to Juan Alday for his + contribution.

      In the Artistic Style documentation, in General Information, Other Considerations, there is a list of - terminology used for special characters used in programming. The terms used by Artistic Style has been + terminology used for special characters used in programming. The terms used by Artistic Style have been different than is used by Visual Studio, Clang, and others. In this release the terms used by Artistic Style have been changed to the ones most commonly used in programming documentation. The following chart indicates the changes.

      @@ -79,17 +161,116 @@

      A new option, "indent-after-parens", will indent continuation lines following lines that contain an opening paren '(' or an assignment '='. This includes function definitions and declarations - and return statements. This option ay be preferred for editors displaying proportional fonts.

      + and return statements. This option may be preferred for editors displaying proportional fonts.

      A new option, "attach-closing-while", will attach the closing "while" of a "do-while" statement to the closing brace. It has precedence over both the brace style and the break closing braces option.

      - Thanks to Matthew Woehlke for his contribution.

      + The option "break-closing-braces" has been included in "style=stroustrup". This is the + correct style according to Wikipedia. The new option "attach-closing-while" is not included in + the style but can be used if you want. If there is a problem with the new format, change to the K&R style + using the same options as for Stroustrup.

      +

      + If you are using Windows XP, there is a download file available that has an XP compatible executable. Artistic + Style will still compile with Visual Studio 2010.

      +

      + Thanks to Jochen Tucht and Matthew Woehlke for their contributions.

      The following are additional topics.

      +

      Version 3

      + +

      + Artistic Style was written in the 1990's when personal computers were much slower and compilers were not as + sophisticated as today. It used a lot of global variables instead of class members. In previous releases, classes + were created for the astyle_main.h source code. With this release, the classes have been made independent + of the source file containing them and the shared and global data has been eliminated. The classes could now be + separated into separate source files. They have not been actually separated because it seems more convenient + to leave them combined.

      +

      + As explained previously, the terminology for special characters has been changed to agree with various + development environments and compilers. The variable and method names in the source code were changed as well + as the documentation. This was a major renaming. If not for the "rename" refactoring feature in Visual + Studio, and the AStyleTest programs, it would probably not have been attempted.

      +

      + Artistic Style has also started using C++11. Older compiler versions and compilers without C++11support cannot + be used. If your compiler requires a compiler directive for C++, such as -std=c++11 or -std=c++0x, it will + need to be used.

      +

      Library File Names

      + +

      + The shared library object (DLL) compile was originally intended to be a local library used by a single program. + Users could update the library at their convenience. Recently, it has started being distributed as a system library + for some distributions. In the past was not maintained for doing this. Since it is already being offered as + a distribution, the library soname on Linux has been standardized.

      +

      + It can still be used as a local or a static library if you want to control the changes. Or the system library + can be used. The system library version, of course, may change at any time. With this release the system + library will be available on Debian based systems, as well as possibly others.

      +

      + The Windows library name has been changed also. This Windows version is AStyle30.dll. The "30" refers + to the Artistic Style release number "3.0". The Linux library name is a soname version number, not the + Artistic Style release number.

      + +

      Artistic Style Wx

      + +

      + There is a new GUI test program AStyleWx that uses wxWidgets. This replaces the old AStyleWin program. AStyleWx + is multi-platform and has more features simply because they are easier to implement with wxWidgets.

      +

      + It has download files and a website in a new sub-project directory of Artistic Style. The downloads contain + source code, documentation, and scripts. The Windows download contains an executable. The needed Artistic Style + source files are included.

      +

      + It is licensed under the MIT license. The source code may be used and modified for any purpose you + choose. Developers using Artistic Style in another project may use any part of AStyleWx in their project. The + modified source code does NOT need to be made available to others.

      + +

      Code::Blocks Support

      + +

      + Code::Blocks is a free, open-source cross-platform IDE that supports multiple compilers. It currently gets over + 100,000 downloads per week. It is used by Artistic Style to test compilers on various systems. Code::Blocks build + files for several free compilers are now provided with the Artistic Style release. The "Install Information" + contains additional information.

      + +

      Embarcadero Compiler

      + +

      + Embarcadero is offering a new, free, BCC32C C++ compiler. It includes C++11 language support, the Dinkumware + Standard Template Library, and the Embarcadero Runtime Library. Included are a linker, a + resource compiler, and a number of command line tools. It is currently for Win32 only. There is more + information at their Free Tools web page. They are also currently offering a free debugger and two + different + development environments.

      + +

      Naming Conventions

      + +

      + If you use cppcheck, it has an add-on to check naming standards for functions and variables by using regular + expressions. Cppcheck must be run first to generate ".dump" files. The Python program, naming.py, + can then be run to check the names. It is basically a shell that you will probably want to modify for regular + use. The add-ons must be installed with cppcheck for naming.py to be available.

      + +

      WinMerge 2011

      + +

      + WinMerge 2011 is a fork of the original WinMerge application published on SourceForge by Thingamahoochie + Software. It is has removed the ATL/MFC dependencies and added some useful features. It uses Artistic Style + to format the source code.

      + +

      Whatstyle

      + +

      + Whatstyle finds a code format style that fits given source files. This program looks at your source code and + generates a style definition that fits its original formatting style as closely as possible. + Several formatters and programming languages are supported. It is written in Python and has an interesting + method for finding the style options. +

      Artistic Style 2.06  (December 2016)

      diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/notes.html codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/notes.html --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/notes.html 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/notes.html 2018-01-15 20:56:41.000000000 +0000 @@ -17,20 +17,85 @@

       

      -

      Artistic Style 3.0  (Pending)

      +

      Artistic Style 3.1  (January 2018)

      + +
        +
      • Add new options "project", "project=####", and "project=none" (#11).
      • +
      • Add new options, "break-return-type" and "break-return-type-decl" (358, 286, 205, 16). +
      • +
      • Add new options, "attach-return-type" and "attach-return-type-decl" (358, 286, 205, 16). +
      • +
      • Add new option "style=ratliff", as an alternate name for banner style.
      • +
      • Add new environment variable ARTISTIC_STYLE_PROJECT_OPTIONS (#11).
      • +
      • Add multiple extensions to the command line file paths option.
      • +
      • Improve recognition of unary + and - when using pad-oper.
      • +
      • Change the Windows default options file location from USERPROFILE to APPDATA.
      • +
      • Change options file input to accept UTF-16, or UTF-8 with a BOM (or signature).
      • +
      • Change "unsigned short" data type to c++11 "char16_t".
      • +
      • Change translations for new project options file.
      • +
      • Fix utf8LengthFromUtf16() calculation being less than the actual length.
      • +
      • Fix multiply followed by a dereference for "align-pointer=type".
      • +
      • Fix recognition of a uniform class initializer in a base class initialization (#441).
      • +
      • Fix indentation of "volatile" keyword not used in a method definition (#450).
      • +
      • Fix indentation of "final" keyword not used in a method definition (#450).
      • +
      • Fix indentation of compound literals in an argument list (#456).
      • +
      • Fix indentation of trailing return type method following a constructor (#463).
      • +
      • Fix space padding of closing brace before a dot (#468).
      • +
      • Fix Objective-C to allow for "Extern C" statements in the source files (#443, 444, 446).
      • +
      • Fix Objective-C to allow for method definitions without a specified return type (#447).
      • +
      • Fix Objective-C to allow for method definitions with multiple param types.
      • +
      • Fix Objective-C to replace tabbed padding with a space.
      • +
      • Fix Objective-C formatting of line-end comments with "unpad-return-type".
      • +
      • Fix Objective-C "align-method-colon" to ignore ternary (?) operators.
      • +
      • Fix C# base class constructor indentation (#459).
      • +
      • Fix C# indentation of method declaration containing a colon (#465)
      • +
      • Fix C/C++ to allow "interface" as a non-keyword (#445).
      • +
      • Fix Java to allow "default" as a non-switch keyword.
      • +
      • Fix line ends initialization if no line end has been read.
      • +
      • Fix Java build from including ASLocalizer in the shared library.
      • +
      • Fix to check for AStyleWx line tags after C style comments.
      • +
      • Fix boundary conditions and other errors discovered by fuzzing.
      • +
      • Refactoring: +
          +
        • Extract method isNumericVariable() in ASFormatter class.
        • +
        • Extract method isTopLevel() in ASBeautifier class.
        • +
        • Extract method fileExists() in Console class.
        • +
        • Rename ASEncoding variable from "utf8_16" to "encode".
        • +
        • Rename ASBeautifier vector from squareBracketDepthStack to parenDepthStack.
        • +
        • Combine style options in ASOptions class to avoid compiler limits.
        • +
        +
      • +
      + +

      Artistic Style 3.0.1  (May 2017)

      + +
        +
      • Fix crash caused by certain class initializer formats (#435).
      • +
      • Fix "final" identifier not being recognized as a pre-command header (#433).
      • +
      • Fix recognition of certain rvalue reference variables.
      • +
      + +

      Artistic Style 3.0  (April 2017)

      • Add new option "indent-after-parens" (#396, 152, 108, 79).
      • Add new option "attach-closing-while" (#177).
      • Add "style=run-in" as an alternative for "style=horstmann".
      • +
      • Add "break-closing-braces" to "style=stroustrup" (#267).
      • Add formatting for C++11 trailing return type methods.
      • Add new class ASPeekStream using RAII to allow early method returns.
      • Change affected variable names to new AStyle terminology.
      • Change some vector push_back() statements to emplace_back().
      • Fix memory leak when using "indent-preproc-define".
      • +
      • Fix sometimes splitting an r-value reference when "pad-oper" is used.
      • Fix in-statement-indent brace check not always checking a brace (#421).
      • -
      • Fix boundary conditions discovered by american fuzzy lop fuzzer (#370).
      • +
      • Fix formatting of C# get/set and add/remove when braces are attached (#430).
      • +
      • Fix formatting of C# generic constraints (#430).
      • +
      • Fix padding of C# null conditional operator.
      • +
      • Fix attach-inlines to not attach a brace followed by a run-in comment.
      • +
      • Fix not always breaking lines after "add-braces" (#341).
      • +
      • Fix unpadding the "in" in a foreach statement (#386).
      • +
      • Fix boundary conditions discovered by american fuzzy lop fuzzer (#370).
      • Refactoring:
        • Replace NULL with C++11 nullptr.
        • @@ -39,6 +104,7 @@
        • Move console error stream (cerr) from global to ASConsole class.
        • Move ASConsole pointer in ASOptions from global to a class member.
        • Move findHeader and findOperator methods from ASBeautifier to ASBase.
        • +
        • Minor changes from PVS-Studio analyzer.
        • Minor changes from clang-tidy.
      • diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/styles.css codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/styles.css --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyle/styles.css 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyle/styles.css 2018-01-15 20:56:41.000000000 +0000 @@ -34,3 +34,26 @@ img { border: none; } pre { margin-left: 0.3in; color: navy; font-weight: bold; } + +/*- the following styles are for the 'top' button + the corresponding javascript is in the html document from + https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_scroll_to_top +*/ +#topBtn { + display: none; /* Hidden by default */ + position: fixed; /* Fixed/sticky position */ + bottom: 55px; /* Place the button from the bottom */ + right: 10px; /* Place the button from the right */ + z-index: 99; /* Make sure it does not overlap */ + border: none; /* Remove borders */ + outline: none; /* Remove outline */ + background-color: #ccc; /* Set a background color */ + color: #0000C0; /* Text color */ + cursor: pointer; /* Add a mouse pointer on hover */ + padding: 10px; /* Some padding */ + border-radius: 10px; /* Rounded corners */ +} + +#topBtn:hover { + background-color: #aaa; /* Add a darker background on hover */ +} diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyleconfigdlg.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyleconfigdlg.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astyleconfigdlg.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astyleconfigdlg.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -34,12 +34,13 @@ 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) EVT_RADIOBUTTON(XRCID("rb1TBS"), AstyleConfigDlg::OnStyleChange) EVT_RADIOBUTTON(XRCID("rbGoogle"), AstyleConfigDlg::OnStyleChange) + EVT_RADIOBUTTON(XRCID("rbMozilla"), AstyleConfigDlg::OnStyleChange) EVT_RADIOBUTTON(XRCID("rbPico"), AstyleConfigDlg::OnStyleChange) EVT_RADIOBUTTON(XRCID("rbLisp"), AstyleConfigDlg::OnStyleChange) EVT_RADIOBUTTON(XRCID("rbCustom"), AstyleConfigDlg::OnStyleChange) @@ -158,7 +159,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 +168,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 +308,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 +377,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 +388,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 +402,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 +462,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()) @@ -467,6 +474,8 @@ style = asps1TBS; else if (XRCCTRL(*this, "rbGoogle", wxRadioButton)->GetValue()) style = aspsGoogle; + else if (XRCCTRL(*this, "rbMozilla", wxRadioButton)->GetValue()) + style = aspsMozilla; else if (XRCCTRL(*this, "rbPico", wxRadioButton)->GetValue()) style = aspsPico; else if (XRCCTRL(*this, "rbLisp", wxRadioButton)->GetValue()) @@ -480,6 +489,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 +500,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 +514,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 -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astylepredefinedstyles.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astylepredefinedstyles.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/astylepredefinedstyles.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/astylepredefinedstyles.h 2018-01-15 20:56:41.000000000 +0000 @@ -14,7 +14,7 @@ aspsStroustrup, aspsWhitesmith, aspsVTK, - aspsBanner, + aspsRatliff, aspsGnu, aspsLinux, aspsHorstmann, diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/dlgformattersettings.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/dlgformattersettings.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/dlgformattersettings.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/dlgformattersettings.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -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 -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/formattersettings.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/formattersettings.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/formattersettings.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/formattersettings.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -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 -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/resources/configuration.xrc codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/resources/configuration.xrc --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/astyle/resources/configuration.xrc 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/astyle/resources/configuration.xrc 2018-01-15 20:56:41.000000000 +0000 @@ -61,9 +61,9 @@ 5 - - - 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). + + + 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). wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT 5 @@ -212,6 +212,13 @@ wxTOP|wxALIGN_LEFT 5 + + + + + wxTOP|wxALIGN_LEFT + 5 + wxEXPAND 5 @@ -320,6 +327,13 @@ 5 + + + + wxTOP|wxALIGN_LEFT + 5 + + @@ -427,21 +441,49 @@ - + wxTOP|wxALIGN_LEFT 5 - + wxTOP|wxALIGN_LEFT 5 - + + + wxTOP|wxALIGN_LEFT + 5 + + + + + + wxTOP|wxALIGN_LEFT + 5 + + + + + + wxTOP|wxALIGN_LEFT + 5 + + + + + + wxTOP|wxALIGN_LEFT + 5 + + + + wxTOP|wxALIGN_LEFT 5 diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxs.doxy codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxs.doxy --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxs.doxy 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxs.doxy 2018-01-15 20:56:41.000000000 +0000 @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "16.01" +PROJECT_NUMBER = "17.12" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/plugins/contrib/wxSmith/wxwidgets/properties/wxscolourproperty.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -28,6 +28,7 @@ #include #if wxCHECK_VERSION(3, 0, 0) #include +#include #endif #include "../wxsflags.h" @@ -40,7 +41,6 @@ using namespace wxsFlags; - // Creating custom colour property. // This is based on wxSystemColourProperty from propgrid @@ -203,10 +203,12 @@ int ColToInd( const wxColour& colour ) const; }; - +#if wxCHECK_VERSION(3, 1, 0) + wxPG_IMPLEMENT_PROPERTY_CLASS(wxsMyColourPropertyClass,wxEnumProperty,Choice) +#else WX_PG_IMPLEMENT_PROPERTY_CLASS(wxsMyColourPropertyClass,wxEnumProperty, wxColourPropertyValue,const wxColourPropertyValue&,Choice) - +#endif void wxsMyColourPropertyClass::Init( int type, const wxColour& colour ) { @@ -775,11 +777,14 @@ if ( colourRGB.length() == 0 && m_choices.GetCount() && colourName == m_choices.GetLabel(GetCustomColourIndex()) ) { - if ( !(argFlags & wxPG_EDITABLE_VALUE )) + if ( !(argFlags & wxPG_EDITABLE_VALUE ) ) { - // This really should not occurr... +#if wxCHECK_VERSION(3, 0, 0) + // This really should not occur... // wxASSERT(false); +#else ResetNextIndex(); +#endif return false; } @@ -827,7 +832,12 @@ if ( !done ) { +#if wxCHECK_VERSION(3, 0, 0) + // This really should not occur... + // wxASSERT(false); +#else ResetNextIndex(); +#endif return false; } diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/sdk.doxy codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/sdk.doxy --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/sdk.doxy 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/sdk.doxy 2018-01-15 20:56:41.000000000 +0000 @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "16.01" +PROJECT_NUMBER = "17.12" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/appglobals.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/appglobals.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/appglobals.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/appglobals.h 2018-01-15 20:56:41.000000000 +0000 @@ -9,7 +9,7 @@ #include #include -//#define RELEASE "16.01" +//#define RELEASE "17.12" #ifndef RELEASE #define RELEASE "svn" diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/resources/resources.rc codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/resources/resources.rc --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/resources/resources.rc 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/resources/resources.rc 2018-01-15 20:56:41.000000000 +0000 @@ -60,8 +60,8 @@ /////////////////////////////////////////////////////////////////////////////// // Version information VS_VERSION_INFO VERSIONINFO - FILEVERSION 16,01,0,0 - PRODUCTVERSION 16,01,0,1 + FILEVERSION 17,12,0,0 + PRODUCTVERSION 17,12,0,1 FILEFLAGSMASK 0x3fL // VS_FFI_FILEFLAGSMASK #ifdef _DEBUG // Can be a combination of the following OR'ed flags: @@ -92,19 +92,19 @@ { BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual { - VALUE "Build", "January 2017\0" + VALUE "Build", "December 2017\0" VALUE "Comments", "Cross-platform IDE built around wxWidgets, designed to be extensible and configurable. Licensed under GPL3.\0" VALUE "CompanyName", "Code::Blocks Team\0" VALUE "Developer", "Code::Blocks Team\0" VALUE "FileDescription", "Code::Blocks IDE\0" - VALUE "FileVersion", "16.01.0.0\0" + VALUE "FileVersion", "17.12.0.0\0" VALUE "InternalName", "Code::Blocks\0" - VALUE "LegalCopyright", "Copyright (C) 2004-2017 Code::Blocks Team\0" + VALUE "LegalCopyright", "Copyright (C) 2004-2018 Code::Blocks Team\0" VALUE "LegalTrademarks", "All rights reserved.\0" VALUE "OriginalFilename", "codeblocks.exe\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Code::Blocks\0" - VALUE "ProductVersion", "16.01.0.0\0" + VALUE "ProductVersion", "17.12.0.1\0" VALUE "SpecialBuild", "\0" VALUE "Support", "mandrav at codeblocks.org\0" VALUE "Users", "Unlimited.\0" diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/resources/start_here/start_here.html codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/resources/start_here/start_here.html --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/resources/start_here/start_here.html 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/resources/start_here/start_here.html 2018-01-15 20:56:41.000000000 +0000 @@ -12,7 +12,7 @@
        - +
        CB_VAR_REVISION_INFO
        @@ -55,7 +55,7 @@
        - © 2004 - 2017, The + © 2004 - 2018, The Code::Blocks Team. Binary files /tmp/tmpC3ZbHv/487Fi9ZaZD/codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/resources/start_here/title_1712.png and /tmp/tmpC3ZbHv/uJljU8nch8/codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/resources/start_here/title_1712.png differ diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/splashscreen.cpp codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/splashscreen.cpp --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/splashscreen.cpp 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/splashscreen.cpp 2018-01-15 20:56:41.000000000 +0000 @@ -75,15 +75,7 @@ void cbSplashScreen::DoPaint(wxDC & /*dc*/) { wxPaintDC dc(this); -#ifdef __WIN32__ - #if wxCHECK_VERSION(3, 0, 0) -// dc.SetDeviceClippingRegion(m_region); // was used for 08/02 splash screen (transparent regions) - #else -// dc.SetClippingRegion(m_region); // was used for 08/02 splash screen (transparent regions) - #endif -#endif dc.DrawBitmap(m_label, 0, 0, false); - DrawReleaseInfo(dc); } @@ -121,12 +113,8 @@ cbSplashScreen::cbSplashScreen(wxBitmap &label, long timeout, wxWindow *parent, wxWindowID id, long style) : wxFrame(parent, id, wxEmptyString, wxPoint(0, 0), wxSize(0, 0), style), - m_timer(this, cbSplashScreen_timer_id)//, m_region(0, 0, 440, 190) // was used for 08/02 splash screen (transparent regions) + m_timer(this, cbSplashScreen_timer_id) { -// m_region.Union(50, 35, 181, 181); -// m_region.Union(166, 13, 181, 181); -// m_region.Union(259, 29, 181, 181); // was used for 08/02 splash screen (transparent regions) - int w = label.GetWidth(); int h = label.GetHeight(); @@ -160,8 +148,6 @@ label_dc.DrawBitmap(label, 0, 0, true); label_dc.SelectObject(wxNullBitmap); -// SetShape(m_region); // was used for 08/02 splash screen (transparent regions) - Show(true); SetThemeEnabled(false); // seems to be useful by description SetBackgroundStyle(wxBG_STYLE_CUSTOM); // the trick for GTK+ (notice it's after Show()) diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/splashscreen.h codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/splashscreen.h --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/src/src/splashscreen.h 2018-01-12 02:21:57.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/src/src/splashscreen.h 2018-01-15 20:56:41.000000000 +0000 @@ -16,7 +16,6 @@ private: wxBitmap m_label; wxTimer m_timer; -// wxRegion m_region; // was used for 08/02 splash screen (transparent regions) public: // A value of -1 for timeout makes it stay forever (you need to close it manually) cbSplashScreen(wxBitmap &label, long timeout, wxWindow *parent, wxWindowID id, long style = wxSTAY_ON_TOP | wxNO_BORDER | wxFRAME_NO_TASKBAR | wxFRAME_SHAPED); @@ -35,4 +34,3 @@ }; #endif // CBSPLASH_SCREEN_H - diff -Nru codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/update_revision.sh codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/update_revision.sh --- codeblocks-16.01+p~launchpadrev9384~ubuntu17.04.1/update_revision.sh 2018-01-12 02:22:13.000000000 +0000 +++ codeblocks-16.01+p~launchpadrev9388~ubuntu17.04.1/update_revision.sh 2018-01-15 20:56:57.000000000 +0000 @@ -63,7 +63,7 @@ if [ "x$REV" != "x$OLD_REV" -o ! -r $REV_FILE ]; then echo "m4_define([SVN_REV], $REV)" > $REV_FILE - echo "m4_define([SVN_REVISION], 16.01svn$REV)" >> $REV_FILE + echo "m4_define([SVN_REVISION], 17.12svn$REV)" >> $REV_FILE echo "m4_define([SVN_DATE], $LCD)" >> $REV_FILE # Also change the revision number in debian/changelog for package versioning @@ -72,12 +72,12 @@ if [ -x "$DCH" ]; then AKT_REV=`sed -e 's/.*svn\([0-9]*\).*/\1/' -e 'q' < debian/changelog` if [ $REV -gt $AKT_REV ]; then - dch -v 16.01svn$REV "New svn revision" + dch -v 17.12svn$REV "New svn revision" fi fi else mv debian/changelog debian/changelog.tmp - sed "1 s/(16.01svn[^-)]*/(16.01svn$REV/" < debian/changelog.tmp > debian/changelog + sed "1 s/(17.12svn[^-)]*/(17.12svn$REV/" < debian/changelog.tmp > debian/changelog rm debian/changelog.tmp fi fi