From owner-cvs-all Thu Oct 8 19:09:29 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA22634 for cvs-all-outgoing; Thu, 8 Oct 1998 19:09:29 -0700 (PDT) (envelope-from owner-cvs-all) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA22559 for ; Thu, 8 Oct 1998 19:08:52 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.1/8.9.1) id WAA21237; Thu, 8 Oct 1998 22:08:33 -0400 (EDT) (envelope-from wollman) Date: Thu, 8 Oct 1998 22:08:33 -0400 (EDT) From: Garrett Wollman Message-Id: <199810090208.WAA21237@khavrinen.lcs.mit.edu> To: "Jordan K. Hubbard" Cc: committers@FreeBSD.ORG Subject: Re: cvs commit: src/libexec/getty main.c In-Reply-To: <3634.907895816@time.cdrom.com> References: <3634.907895816@time.cdrom.com> Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk < said: > See the change in question. :) All sorts of things wrong here. Looking at the header file which started all this: #include #include System headers go first. Header files should never include other header files, except for certain system headers and as necessary to meet formal Standards. /* for properties.c */ typedef struct _property { struct _property *next; char *name; char *value; } *properties; This violates just about every rule in style(9) pertaining to structure declarations. /* for auth.c */ #define _PATH_AUTHCONF "/etc/auth.conf" System paths go in . properties properties_read __P((FILE *fp)); void properties_free __P((properties list)); char *property_find __P((properties list, const char *name)); char *auth_getval __P((const char *name)); This breaks even more rules from style(9) pertaining to the declaration of functions in heaer files. This whole debacle illustrates properties_read(), and non-Standard library functions generally, should not take `FILE *' arguments. It should be an fd, or at the very least a `void *' so that clients of other interfaces declared in the same file need not include . By preference they should be declared in an entirely-separate header file. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick