[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: |
Clark Wang |
Subject: |
Re: [PATCH 11/11] Fix formatting of struct initializer lists, and add -sar |
Date: |
Wed, 17 Jun 2015 13:08:19 +0800 |
On Tue, Jun 16, 2015 at 5:36 PM, Tim Hentenaar <address@hidden>
wrote:
> Hi Clark,
>
> On Tue, Jun 16, 2015 at 10:41:11AM +0800, clarkw wrote:
> > Can anyone also take a look at another problem reported at
> > http://lists.gnu.org/archive/html/bug-indent/2015-04/msg00002.html ?
> >
> > -clark
>
> Try building with this patch. It should solve that problem:
>
> http://lists.gnu.org/archive/html/bug-indent/2015-06/msg00007.html
>
Hi Tim,
Does your github repository ( https://github.com/thentenaar/indent )
include all these patches? I just tried your latest code (commit
3c3dbe3e33) but it did not work. See followng example:
$ cat foo.c
void foo()
{
struct_a arr[] = {
{ &a, sizeof (a) },
{ &b, sizeof (b) },
{ &c, sizeof (c) },
{ &d, sizeof (d) }
};
struct {
int a;
int b;
} v = { 0 };
}
$ ./indent -st foo.c
void
foo ()
{
struct_a arr[] = {
{&a, sizeof (a)}
,
{&b, sizeof (b)}
,
{&c, sizeof (c)}
,
{&d, sizeof (d)}
};
struct
{
int a;
int b;
} v = { 0 };
}
$
-clark
>
> You can see that from the regression tests here (with the -sar option,
> spaces are added around the '{' and '} in the initializer:
>
> http://lists.gnu.org/archive/html/bug-indent/2015-06/msg00017.html
>
>
> Tim
>
- [PATCH 09/11] Fix handling of block comments after braces, (continued)
- [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, 2015/06/15
- 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 <=
- 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