qemu-devel
[Top][All Lists]
Advanced

[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: Michael S. Tsirkin
Subject: [Qemu-devel] Re: CODING_STYLE (was Re: [PATCHv2] qemu: target library, use it in msix)
Date: Thu, 1 Oct 2009 08:00:52 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

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




reply via email to

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