From owner-cvs-all Fri Sep 28 0:42:18 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 8C86937B407; Fri, 28 Sep 2001 00:42:01 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id f8S7esK33035; Fri, 28 Sep 2001 10:40:54 +0300 (EEST) (envelope-from ru) Date: Fri, 28 Sep 2001 10:40:53 +0300 From: Ruslan Ermilov To: Julian Elischer Cc: Garrett Wollman , obrien@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys proc.h Message-ID: <20010928104053.C30062@sunbay.com> References: <200109272214.f8RME1v06093@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from julian@elischer.org on Thu, Sep 27, 2001 at 05:27:14PM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Sep 27, 2001 at 05:27:14PM -0700, Julian Elischer wrote: > > Personally I'd like to see something that says like: > > "small variations to this rule, for the purpose of aligning > related fields and increasign readability are accepteble." > > and maybe an example > > struct foo { > int foo_a; /* comment */ > struct freddy foo_b; /* Comment aligned as above. */ > union bigwords *foo_c; /* All comments aligned */ > unsigned char foo_chars; /* to allow the eye to scan them */ > /* With overflow also aligned */ > /* the same as above. */ > struct bigstructures foo_vals[NUMSTRUCTS]; /* sometimes you just */ > /* have to bend the rules */ > }; > I would even allow the following, similar to prototypes: struct foo { int foo_a; /* comment */ struct freddy foo_b; /* Comment aligned as above. */ union bigwords *foo_c; /* All comments aligned */ unsigned char foo_chars; /* to allow the eye to scan them */ /* With overflow also aligned */ /* the same as above. */ struct bigstructures foo_vals[NUMSTRUCTS]; /* sometimes you just */ /* have to bend the rules */ }; -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message