bug-indent
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]