patch to style(9) man page to reflect current practices

Chris Pressey cpressey at catseye.mine.nu
Thu Feb 5 12:14:15 PST 2004


On Thu, 5 Feb 2004 19:22:50 +0100
Joerg Sonnenberger <joerg at xxxxxxxxxxxxxxxxx> wrote:

> On Thu, Feb 05, 2004 at 10:18:58AM -0800, Chris Pressey wrote:
> > There was one other change I wanted to make, re:
> > 
> > "In header files visible to userland applications, prototypes that
> > are visible must use either ``protected'' names (ones beginning with
> > an underscore) or no names with the types.  It is preferable to use
> > pro- tected names.  E.g., use:
> >      void    function(int);
> >      or:
> >      void    function(int _fd);"
> 
> Well, I say simple drop the name.
> 
> > I completely fail to see the rationale for that, but I might be
> > missing something.  Also, I don't think I've ever seen prototype
> > declarations like that, but I probably just haven't been looking
> > hard enough.
> 
> You might have a #define fd foo somewhere.

Ah.

Well, I count about 470 occurances of the form #define _foo in the
source tree (more if you count _FOO and __foo and __FOO,) and there's
nothing in style(9) that I can see that forbids definining macros with a
leading underscore.  So I'm inclined to agree with you about just
dropping the name.

-Chris





More information about the Submit mailing list