From owner-freebsd-hackers Thu Oct 9 23:51:16 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA28616 for hackers-outgoing; Thu, 9 Oct 1997 23:51:16 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id XAA28608 for ; Thu, 9 Oct 1997 23:51:01 -0700 (PDT) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id IAA09955 for freebsd-hackers@FreeBSD.ORG; Fri, 10 Oct 1997 08:50:58 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.7/8.8.5) id IAA22908; Fri, 10 Oct 1997 08:49:13 +0200 (MET DST) Message-ID: <19971010084912.ZA64319@uriah.heep.sax.de> Date: Fri, 10 Oct 1997 08:49:12 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@FreeBSD.ORG Subject: Re: Major number requested References: <19971009203311.QE10395@uriah.heep.sax.de> <343D4AD9.794BDF32@whistle.com> <19971010072220.HE00812@uriah.heep.sax.de> <19971010155311.58360@lemis.com> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <19971010155311.58360@lemis.com>; from Greg Lehey on Oct 10, 1997 15:53:11 +0930 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As Greg Lehey wrote: > > ...or use Emacs with the appropriate style description. :-) > > That's a new one on me. Last time I looked, you didn't get much > choice. Pointer? My own Emacs is stone-aged. I'm using c++-mode.el (but i think this has been renamed since), and i've added a submenu that allows me for a number of choices for the C style. This is rather hacked, but i have yet to find the time to make it right (probably after upgrading Emacs to a current version, now that i've got enough disk space to do this). (defconst bsd-c-style '("FreeBSD" (c-basic-offset . 8) (c-tab-always-indent . t) (c-hanging-braces-alist . ((substatement-open after) (brace-list-open))) (c-hanging-colons-alist . ((member-init-intro before) (inher-intro) (case-label after) (label after) (access-label after))) (c-cleanup-list . (scope-operator empty-defun-braces defun-close-semi)) (c-offsets-alist . ((arglist-close . c-lineup-arglist) (substatement-open . 0) (case-label . 0) (block-open . 0) (knr-argdecl-intro . -))) ) "FreeBSD C Programming Style") Note that the above is not fully style(9)-compliant. I think other people might have better pointers. I know that K&R function arguments are not indented, and despite of style(9), i prefer expression continuation lines being indented to the level the original expression started (as opposed to 4 spaces as style(9) says). > > Better repair indent(1) before using it. See the Unix Hater's > > Handbook for a description of its flaws. > > I've hacked enough of them myself. They're too deep for anything > short of a rewrite to fix. I think so. I once tried, but eventually gave up. The worst thing is that the entire file is copied, and then written over the original file, instead of creating a new file with just the modified contents (and rename everything in the end). > What about a pointer to the UHH? ISBN 1-56884-203-1 -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)