From owner-freebsd-current Sat Dec 20 17:36:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA28530 for current-outgoing; Sat, 20 Dec 1997 17:36:15 -0800 (PST) (envelope-from owner-freebsd-current) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA28506; Sat, 20 Dec 1997 17:36:00 -0800 (PST) (envelope-from grog@lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.8.8/8.8.7) id MAA07313; Sun, 21 Dec 1997 12:05:34 +1030 (CST) (envelope-from grog) Message-ID: <19971221120534.43478@lemis.com> Date: Sun, 21 Dec 1997 12:05:34 +1030 From: Greg Lehey To: "Jordan K. Hubbard" Cc: "John S. Dyson" , Nate Williams , dyson@FreeBSD.ORG, gurney_j@resnet.uoregon.edu, julian@whistle.com, bde@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Bruce vandalism again References: <199712201434.JAA00329@dyson.iquest.net> <14545.882642903@time.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e In-Reply-To: <14545.882642903@time.cdrom.com>; from Jordan K. Hubbard on Sat, Dec 20, 1997 at 10:35:03AM -0800 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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