Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 1997 12:05:34 +1030
From:      Greg Lehey <grog@lemis.com>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        "John S. Dyson" <toor@dyson.iquest.net>, Nate Williams <nate@mt.sri.com>, dyson@FreeBSD.ORG, gurney_j@resnet.uoregon.edu, julian@whistle.com, bde@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: Bruce vandalism again
Message-ID:  <19971221120534.43478@lemis.com>
In-Reply-To: <14545.882642903@time.cdrom.com>; from Jordan K. Hubbard on Sat, Dec 20, 1997 at 10:35:03AM -0800
References:  <199712201434.JAA00329@dyson.iquest.net> <14545.882642903@time.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 20, 1997 at 10:35:03AM -0800, Jordan K. Hubbard wrote:
>> Sorry, but most of us are real-world programmers, who try to keep our
>> code ANSI.  (Then we have to switch into the mode: Oh yeah, we are still
>
> You guys aren't even discussing the same subject here - is it any
> wonder there's an argument? 

I don't know what's being discussed here, either, but what I see is:

>> bde         1997/12/19 16:07:12 PST
>> 
>>   Modified files:
>>     sys/net              if_ethersubr.c
>>     sys/netinet          if_ether.c
>>   Log:
>>   Fixed gratuitous ANSIisms.
>> 
>>   Revision  Changes    Path
>>   1.41      +5 -2      src/sys/net/if_ethersubr.c
>>   1.42      +2 -2      src/sys/netinet/if_ether.c
> Bruce.
>  
> I know this has been discussed before,
> but I'm not convinced  that you are mving with the agreement of
> everybody here.
>  
>  int
> -ether_ioctl(struct ifnet *ifp, int command, caddr_t data)
> +ether_ioctl(ifp, command, data)
> +       struct ifnet *ifp;
> +       int command;
> +       caddr_t data;
>  {
>         struct ifaddr *ifa = (struct ifaddr *) data;

>From this I deduce:

1.  ANSIisms have been removed.  The general tenor of this discussion
    is that we should be gradually working towards ANSI, but files
    should remain consistent.  This still seems to be the wrong
    direction to me.

2.  John-Mark Gurney was the first to say:
> 
> easy, don't you guys read style(9)?
>      Use of the __P macro in new code is discouraged, although modifications
>      to existing files should be consistent with that file's conventions.
> 
> all the other parts of the code in that file are K&R style... so you
> need to maintain that convention...

I see no reference to __P in this change.  Yes, this is (apart from
the $Id$) the only change to the file, and there are still __Ps in
this file.

> (jkh)
> John, please go back and read this thread again because you've
> become lost in the weeds of a non-existant ANSI vs non-ANSI debate.
> This is a self-consistency debate here and you're bringing the wrong
> debating points to the wrong argument. :)

I don't see that John (Dyson) is wrong here.  Sure, it's a consistency
debate.  But the question of consistency brings with it the question
of what kind of consistency.  Since ANSI C prototypes enable more
error checking than (voluntary) K&R prototypes, I consider them a Good
Thing.  Why should our consistency abandon them?  

In any case, this modification alone hasn't made the file consistent.
We still have __P in there, and if_var.h still contains:

int	ether_ioctl __P((struct ifnet *, int, caddr_t));

It's a lot easier to prove consistency if the declaration and
definition use the same kind of prototype.

About the only plausible argument I've seen in favour of the K&R style
is (from Bruce) that it makes importing 4.4BSD Lite 2 easier.  Well,
wow, that's what the FreeBSD effort's about, isn't it?

Don't get me wrong, Bruce, I approve of your tidying up.  I just
disagree with the way you did it this time.

Greg




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