Subject: Re: man pages & style guide
To: J.T. Conklin <jconklin@netcom.com>
From: Julian Bean <jules@mailbox.co.uk>
List: current-users
Date: 03/07/1996 08:36:35
>> On a not entirely unrelated note, whilst browsing around my new userland, I
>> read the BSD style guide.  It is not exactly my personal C style, but it's
>> pretty close, and I'm prepared to adjust.  But why do we dislike ANSI
>> function definitions, with parameter types in the arglist??  I was brought
>> up on this (I learnt C from the Que C Quick Reference Guide *shame*
>> although I did later read K&R on the subject).
>
>We'd like to make it possible for NetBSD to be compiled with pre-ANSI
>compilers.

Humph.  Why bother?

>
>> Also, although I feel much less strongly about this, why do we not named
>> parameters in prototypes?  I always feel this makes header files nicely
>> self-documenting...
>
>Possibly for aesthetic reasons.  To not intrude upon the user's
>namespace, we'd have to prepend underscores to function argument
>names.
>
>        extern foo __P((int __bar, int __quux, int __quuux, ...));
>

Umm...  I didn't think that function parameters went into the namespace..


int multiply(int op1,int op2);
int add(int op1,int op2);

static int op1,op2;

void func(void)
{
        int op1,op2;
}

No namespace conflict there, is there?  That'll compile, surely...

>Also on line manpages are probably better documentation for most folks.

Better yes.  Can be a hassle to bring up if all you want to know is which
order the parameters are in.

Jules


/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@mailbox.co.uk           |  6 Evelyn Road      |
|  Jules aka     |                               |  Richmond, Surrey   |
|  Julian Bean   |(jelibean@jmlbhome.demon.co.uk)|  TW9 2TF    *UK*    |
+----------------+-------------------------------+---------------------+
|  The Other Place - n. (pop.) Depending on the affiliation of the     |
|  speaker, one of Oxford, Cambridge, The House of Lords, The House of |
|  Commons, Hell.  Draw your own conclusions.                          |
\----------------------------------------------------------------------/