From owner-freebsd-chat Wed Jan 24 15: 8:20 2001 Delivered-To: freebsd-chat@freebsd.org Received: from kwanon.research.canon.com.au (kwanon.research.canon.com.au [203.12.172.254]) by hub.freebsd.org (Postfix) with ESMTP id 237F237B402 for ; Wed, 24 Jan 2001 15:08:02 -0800 (PST) Received: from bellmann.research.canon.com.au (bellmann.research.canon.com.au [10.5.0.3]) by kwanon.research.canon.com.au (Postfix) with ESMTP id D817C8A8A0; Wed, 24 Jan 2001 23:15:11 +0000 (UTC) Received: from elph.research.canon.com.au (elph.research.canon.com.au [203.12.174.253]) by bellmann.research.canon.com.au (Postfix) with ESMTP id BE3058B10; Thu, 25 Jan 2001 10:00:05 +1100 (EST) Received: from blow.research.canon.com.au (blow.research.canon.com.au [10.8.1.4]) by elph.research.canon.com.au (Postfix) with ESMTP id E9965E2; Thu, 25 Jan 2001 10:07:45 +1100 (EST) Date: Thu, 25 Jan 2001 10:08:00 +1100 (EST) From: Iain Templeton To: Stephen McKay Cc: freebsd-chat@freebsd.org Subject: Re: silly C style question In-Reply-To: <200101241124.f0OBOgm22341@dungeon.home> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, 24 Jan 2001, Stephen McKay wrote: > Imported from Basser Department of Computer Science, University of Sydney? > Piers Lauder was mad keen on this diabolical but extremely logical indenting > scheme. > Hmm, quite possible. I don't know where the proponents of this scheme came from (it was developed 5-10 years ago), but given that we are in Syndey that is quite possible. I think UniTas seemed to have a fairly inconsistent style between the different lecturers, but vaguely Allman style, or perhaps K&R. > Example: > > if > ( > (id->id_type == NULL) > || > ( > (id->id_type->x_what == xt_arrayof) > && > (item->x_left->x_what == xt_arrayof) > && > (id->id_type->x_subtype == item->x_left->x_subtype) > && > (id->id_type->x_flags & XIS_DIMLESS) > ) > ) > ... > Yes, exactly, we alas sometimes have statements that are that complex. The same dealing with hardware sometimes. You know, reg = ( (field1 << REG_FIELD1_SHFT) | (field2 << REG_FIELD2_SHFT) | (field3 << REG_FIELD3_SHFT) ); Names changed to protect the innocent (and my job). Iain To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message