From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtEkk-0006vD-Ug for qemu-devel@nongnu.org; Thu, 01 Oct 2009 02:02:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtEkf-0006sA-G1 for qemu-devel@nongnu.org; Thu, 01 Oct 2009 02:02:57 -0400 Received: from [199.232.76.173] (port=39430 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtEkf-0006s4-8I for qemu-devel@nongnu.org; Thu, 01 Oct 2009 02:02:53 -0400 Date: Thu, 1 Oct 2009 08:00:52 +0200 From: "Michael S. Tsirkin" Message-ID: <20091001060052.GA5142@redhat.com> References: <20090923200635.GA21246@redhat.com> <20090924191121.GB29419@redhat.com> <20090929161115.GA13885@redhat.com> <20090930135142.GA20378@redhat.com> <4AC395F8.8030004@gnu.org> <20090930174821.GA1489@redhat.com> <4AC3A440.8010202@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AC3A440.8010202@gnu.org> Subject: [Qemu-devel] Re: CODING_STYLE (was Re: [PATCHv2] qemu: target library, use it in msix) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , qemu-devel@nongnu.org On Wed, Sep 30, 2009 at 08:32:32PM +0200, Paolo Bonzini wrote: > On 09/30/2009 07:48 PM, Michael S. Tsirkin wrote: >> On Wed, Sep 30, 2009 at 07:31:36PM +0200, Paolo Bonzini wrote: >>> (indent requires knowledge of all the names of the types, so a >>> mechanical pass through the sources is more easily said than done). >> >> How do you tell it the names of the types? > > You use the `-T' option. `-T' can be specified more than once, and all > names specified are used. For example, if your program contains > > typedef unsigned long CODE_ADDR; > typedef enum {red, blue, green} COLOR; > > you would use the options `-T CODE_ADDR -T COLOR'. > > Actually, you only need that for types that are used in arguments and > declared in .h files (as opposed to the same .c file). Example: > > typedef struct color color; > void f(color* p) > > works, but if you remove the typedef you get > > void f (color * p) > > Paolo I see. Well, as we switch to linux CodingStyle we'll cut the number of typedefs dramatically, making this less of an issue :) -- MST