Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-17 Thread Chih-hung Hsieh
For Google code, I obey its coding style, which do not use tabs. :-) For Android AOSP, we keep every external project's coding style and prefer to make all necessary changes upstream first. Making local changes or branches will be the last resort, or replacing a library with another. If you watch

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-17 Thread Mark Wielaard
On Thu, Sep 17, 2015 at 01:40:45PM -0700, Roland McGrath wrote: > > Yes, normal GNU style. But whitespace mistakes are easy to make and hard > > to spot. Don't worry too much about it. emacs should do the right thing :) > > Emacs users at Google tend to get some settings that untabify everything >

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-17 Thread Roland McGrath
> Yes, normal GNU style. But whitespace mistakes are easy to make and hard > to spot. Don't worry too much about it. emacs should do the right thing :) Emacs users at Google tend to get some settings that untabify everything if they don't try hard to change it.

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-17 Thread Mark Wielaard
On Thu, Sep 17, 2015 at 01:33:34PM -0700, Roland McGrath wrote: > > How about using tabs? > > I cannot figure out if elfutils prefers tabs or not. > > Some statement blocks have some lines indented by tabs and some by spaces. > > Would it be okay to use all spaces? > > I'll let Mark decide what st

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-17 Thread Roland McGrath
> How about using tabs? > I cannot figure out if elfutils prefers tabs or not. > Some statement blocks have some lines indented by tabs and some by spaces. > Would it be okay to use all spaces? I'll let Mark decide what standard we want to use. AFAIK we have used the common GNU standard heretofor

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-17 Thread Chih-hung Hsieh
I will do my best to match existing coding style. How about using tabs? I cannot figure out if elfutils prefers tabs or not. Some statement blocks have some lines indented by tabs and some by spaces. Would it be okay to use all spaces? On Thu, Sep 17, 2015 at 1:04 PM, Roland McGrath wrote: > >

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-17 Thread Roland McGrath
> Does the new walk_children look right to you? > That style is similar to what I would use when I need to factor out code in > large C functions. It should be general enough to replace all nested > functions in elfutils. The general style of factoring out the shared locals into by-reference param

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-15 Thread Chih-hung Hsieh
Does the new walk_children look right to you? That style is similar to what I would use when I need to factor out code in large C functions. It should be general enough to replace all nested functions in elfutils. On Tue, Sep 15, 2015 at 3:46 PM, Roland McGrath wrote: > A lot of these are long

Re: [PATCH] Replace libdw nested functions with macros, part 1.

2015-09-15 Thread Roland McGrath
A lot of these are longer than I'd like to see for macros. Let's commit all the ones where it's pretty straightforward to make them static functions and then see what's left.

[PATCH] Replace libdw nested functions with macros, part 1.

2015-09-14 Thread Chih-Hung Hsieh
To be compiled without gnu99 extension. Signed-off-by: Chih-Hung Hsieh --- libdw/ChangeLog| 9 ++ libdw/cfi.c| 73 libdw/dwarf_getscopevar.c | 38 + libdw/dwarf_getsrclines.c | 85 +- libdw/libdw_visit_scopes.c | 209 +++