On Fri, Jan 31, 2014 at 01:27:14AM -0500, Mike Frysinger wrote: > > what would help i think with maintaining these files is a little macro that > > i use in other projects of mine: > > #define Q(x) { x, #x }, > > then the lists become: > > static const struct xlat domains[] = { > > Q(PF_UNSPEC) > > Q(PF_LOCAL) > > Q(PF_UNIX) > > ... > > }; > > > blah i'm dumb and forgot about the #ifdef part. it's still a bit cleaner > though: > > > --- a/defs.h > +++ b/defs.h > @@ -503,6 +503,7 @@ struct xlat { > int val; > const char *str; > }; > +#define XLAT(x) { x, #x } > > extern const struct xlat open_mode_flags[]; > extern const struct xlat addrfams[];
Agreed. Please write a commit message. :) -- ldv
pgp5noWOMH5g4.pgp
Description: PGP signature
------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel