[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -s
From: |
Daniel P. Valentine |
Subject: |
Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar |
Date: |
Mon, 15 Jun 2015 15:31:25 -0500 |
Thanks for all the suggestions.
I'll work to get them onto our list. If we are able to use your patches as is,
we might get back to you about copyright assignment.
Thanks,
Dan
--
Daniel P. Valentine
On Jun 15, 2015, at 2:53 PM, Tim Hentenaar <address@hidden> wrote:
> Initializer lists wern't being properly detected as block
> initializers and thus were being formatted with a newline forced after
> the opening brace.
>
> The newly added -sar option will add spaces between the braces and the
> inner part of the initializer for those who prefer it. I've alwo added
> this to the K&R style, as this style can be clearly seen in The C
> Programming Language 2nd Ed.
> ---
> ChangeLog | 3 +++
> doc/indent.texi | 46 ++++++++++++++++++++++++++++++++++++++++++++++
> regression/TEST | 3 ++-
> src/args.c | 6 +++++-
> src/handletoken.c | 19 +++++++++++++++++--
> src/indent.h | 1 +
> 6 files changed, 74 insertions(+), 4 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 3807fe2..facc512 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,5 +1,8 @@
> 2015-06-15 Tim Hentenaar <address@hidden>
> * Added -par to -kr.
> + * Fixed detection of struct initializer lists as block_init.
> + * Added an option (-sar/--spaces-around-initializers) to add a space
> + after the lbrace and before the rbrace of struct initializers.
>
> 2015-06-14 Tim Hentenaar <address@hidden>
> * Added an option (-as/--align-with-spaces) which if indenting with
> diff --git a/doc/indent.texi b/doc/indent.texi
> index 68ea82d..858c632 100644
> --- a/doc/indent.texi
> +++ b/doc/indent.texi
> @@ -1214,6 +1214,45 @@ int one(void)
> @end group
> @end example
>
> address@hidden
> address@hidden -sar
- [PATCH 06/11] Automatically include 'size_t', 'wchar_t' and 'ptrdiff_t' as a rw_decl tokens, since they're guaranteed to be available in ANSI C., (continued)
- [PATCH 06/11] Automatically include 'size_t', 'wchar_t' and 'ptrdiff_t' as a rw_decl tokens, since they're guaranteed to be available in ANSI C., Tim Hentenaar, 2015/06/15
- [PATCH 04/11] parse: Write out token names when dumping the parser's stack, Tim Hentenaar, 2015/06/15
- [PATCH 01/11] lexi.c: Fix conditionals around the GNU inline attribute, Tim Hentenaar, 2015/06/15
- [PATCH 02/11] Fix html doc generation, Tim Hentenaar, 2015/06/15
- [PATCH 03/11] Fix regression introduced in hg revision 25c27d429590, Tim Hentenaar, 2015/06/15
- [PATCH 09/11] Fix handling of block comments after braces, Tim Hentenaar, 2015/06/15
- [PATCH 07/11] Add an option to use spaces for aligment when using tabs, Tim Hentenaar, 2015/06/15
- [PATCH 08/11] Adjust -npcs so that if set, no space will be added between a function pointer's name and its argument list., Tim Hentenaar, 2015/06/15
- [PATCH 05/11] Add an option to allow single-line conditionals, Tim Hentenaar, 2015/06/15
- [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Tim Hentenaar, 2015/06/15
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar,
Daniel P. Valentine <=
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Andrew Shadura, 2015/06/15
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Tim Hentenaar, 2015/06/15
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, clarkw, 2015/06/16
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Tim Hentenaar, 2015/06/16
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Clark Wang, 2015/06/17
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Tim Hentenaar, 2015/06/17
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Clark Wang, 2015/06/17
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Tim Hentenaar, 2015/06/17
- Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar, Clark Wang, 2015/06/18
[PATCH 10/11] Add -par to K&R style, Tim Hentenaar, 2015/06/15