Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Oct 2002 23:09:35 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Robert Drehmel <robert@ferrari-electronic.de>
Cc:        Robert Drehmel <robert@FreeBSD.org>, <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/lib/libc/net inet.3
Message-ID:  <20021003225719.X3806-100000@gamplex.bde.org>
In-Reply-To: <20020816115127.A3354@alpha.develop.ferrari.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Long ago, On Fri, 16 Aug 2002, Robert Drehmel wrote:

> On Fri, Aug 16, 2002 at 06:07:57PM +1000, Bruce Evans wrote:
> > On Thu, 15 Aug 2002, Robert Drehmel wrote:
> >
> > > robert      2002/08/15 13:33:44 PDT
> > >
> > >   Modified files:
> > >     lib/libc/net         inet.3
> > >   Log:
> > >   Put each function argument on its own line to keep lines shorter
> > >   than 80 columns.
> > >
> > >   Revision  Changes    Path
> > >   1.24      +6 -1      src/lib/libc/net/inet.3
> >
> > The limit of 9 macro args was fixed a year or two ago, and backslash/newline
> > in man pages has worked for much longer, so man pages should be changed
> > away from using the ugly .Fo ... .Fc construct and not towards it.

I noticed a few more conversions to .Fo ... .Fc in sigaction.2 and
sigprocmask.2.  Some of the corresponding C protypes in <signal.h> became
multi-line (because addition of __restrict expanded them).

> People seem to have differing opinions about that.  ru basically
> told me that using ".Fo .Fa* .Fc" or ".Fn" is ok.  I am now a bit
> confused about what construct to use, i.e. what style is preferred.

I think it is OK for old code but shouldn't be used for new code.

> > Especially when you change the corresponding non-ugly C construct in the
> > opposite direction :-).  (Some people prefer old-style ANSI function
> > declarations (with one physical line per parameter) to new-style ANSI
> > function declarations (with all parameters on 1 longical line).
>
> In my opinion, that looks especially concise for functions with many
> arguments like vm_map_lookup() in sys/vm/vm_map.c.

I think you mean "especaully verbose".  vm_map_lookup() is a good bad
example.  It has a new-style ANSI function declaration but is formatted
like an old-style ANSI function function declaration (except for indentation
bugs) to provide a place to attach comments.

> > The separate lines at least provide a good place to put comments on the
> > parameters in C declarations.  This advantage doesn't apply to prototypes
> > in either C code or man pages.)

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021003225719.X3806-100000>