[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: CODING_STYLE (was Re: [PATCHv2] qemu: target library, u

From: Paolo Bonzini
Subject: [Qemu-devel] Re: CODING_STYLE (was Re: [PATCHv2] qemu: target library, use it in msix)
Date: Wed, 30 Sep 2009 20:32:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]