Re: Different styles

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

 



On Wed, May 25, 2016 at 08:31:45AM -0400, Frediano Ziglio wrote:
> Hi,
>   I was reading the style document and I found some different styles in the code
> 
> The structures for GObject differs from the rest of the code, they are
> 
> struct DispatcherClass
> {
>     GObjectClass parent_class;
> };
> 
> instead of
> 
> struct DispatcherClass {
>     GObjectClass parent_class;
> };
> 
> (all other structure follow this schema)

I guess it's just that noone paid attention to the difference, I'd just
fix it.

> 
> 
> There is a chapter "Vertical indentation" which state that there is no
> vertical indentation quoting even some example of functions however
> there are some code, like
> 
> void red_qxl_on_ic_change(QXLInstance *qxl, SpiceImageCompression ic);
> void red_qxl_on_sv_change(QXLInstance *qxl, int sv);
> void red_qxl_set_mouse_mode(QXLInstance *qxl, uint32_t mode);
> void red_qxl_attach_worker(QXLInstance *qxl);
> 
> that follow these specification while others
> 
> void                       display_channel_draw                      (DisplayChannel *display,
>                                                                       const SpiceRect *area,
>                                                                       int surface_id);
> void                       display_channel_draw_until                (DisplayChannel *display,
>                                                                       const SpiceRect *area,
>                                                                       int surface_id,
>                                                                       Drawable *last);
> void                       display_channel_update                    (DisplayChannel *display,
>                                                                       uint32_t surface_id,
>                                                                       const QXLRect *area,
> 
> that clearly use vertical indentation.
> 
> I personally find that vertical indentation tend to cause long lines and
> it's hard to maintain when new declarations are added (like requiring
> new indentation) but the main argument is that I'd like to follow same
> rules or define exceptions with rules (like structure declarations for
> GObject have bracket on first column).

Yup, I'd avoid vertical indentation too. I don't think it's very
important to fix the existing instances until we touch that part of the
code though.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]