Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-17 Thread David Malcolm
On Wed, 2013-05-15 at 11:51 -0600, Jeff Law wrote: > On 05/14/2013 01:07 PM, David Malcolm wrote: > > On Tue, 2013-05-14 at 11:44 -0600, Jeff Law wrote: > >> On 05/06/2013 03:05 PM, David Malcolm wrote: > > > > [...snip review and comments about auto-checking of formatting...] > > > >> Anyway, the

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-15 Thread Jeff Law
On 05/14/2013 01:07 PM, David Malcolm wrote: On Tue, 2013-05-14 at 11:44 -0600, Jeff Law wrote: On 05/06/2013 03:05 PM, David Malcolm wrote: [...snip review and comments about auto-checking of formatting...] Anyway, the patch is good to go. Please install. Thanks for reviewing. Probably

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-14 Thread David Malcolm
On Tue, 2013-05-14 at 11:44 -0600, Jeff Law wrote: > On 05/06/2013 03:05 PM, David Malcolm wrote: [...snip review and comments about auto-checking of formatting...] > Anyway, the patch is good to go. Please install. Thanks for reviewing. Probably a dumb question, but by "Please install", do y

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-14 Thread Jeff Law
On 05/06/2013 03:05 PM, David Malcolm wrote: Note that this code is for the gengtype build-time utility, rather than in GCC proper, so this wasn't on my own mental hitlist for fixing global state. Yea, but we probably should be taking opportunities to clean this stuff up even in the gen* utilit

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-06 Thread Laurynas Biveinis
2013/5/6 Jeff Law : > On 05/03/2013 06:48 PM, David Malcolm wrote: > >> >> +static int indent_amount = 0; >> +static int had_recent_newline = 0; > > Any clean way to do this without the global state? I have to ask given > you're generally working on removing global state. Seems to take a tiny > s

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-06 Thread David Malcolm
On Mon, 2013-05-06 at 17:05 -0400, David Malcolm wrote: [...snip...] > Thanks for review; see attached rewrite of patch. Sorry, I messed up the macro for generating the ChangeLog in the last patch; version with fixed ChangeLog attached. commit 566185b94449a90dc3213ea11643bfb3924a751d Author: David

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-06 Thread David Malcolm
On Mon, 2013-05-06 at 12:22 -0600, Jeff Law wrote: > On 05/03/2013 06:48 PM, David Malcolm wrote: > > > > +static int indent_amount = 0; > > +static int had_recent_newline = 0; > Any clean way to do this without the global state? I have to ask given > you're generally working on removing global s

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-06 Thread Jeff Law
On 05/03/2013 06:48 PM, David Malcolm wrote: +static int indent_amount = 0; +static int had_recent_newline = 0; Any clean way to do this without the global state? I have to ask given you're generally working on removing global state. Seems to take a tiny step backwards. + +static void +

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-06 Thread David Malcolm
On Mon, 2013-05-06 at 07:56 +0300, Laurynas Biveinis wrote: [...snip...] > The patch is OK with some minor formatting errors fixed: [...snip...] Thanks for reviewing this. BTW, is there an automated tool for checking for formatting issues like this in patches? (contrib/check_GNU_style.sh didn'

Re: [PATCH] Use indentation in gtype.state to show nested structure

2013-05-05 Thread Laurynas Biveinis
> +2013-05-03 David Malcolm > + > + * gengtype-state.c: (indent_amount): New variable, > + (had_recent_newline): likewise > + (write_new_line): New function > + (write_any_indent): likewise > + (write_open_paren): likewise > + (write_close_paren): likewise > +