Maarten Lankhorst maarten at
Thu Jan 10 08:32:29 CST 2008

Divan Burger schreef:
> Hi,
> What is the preferred number of spaces of indentation? In
> comdlg32/colordlg.c it is either one or three spaces and there are a
> few places where there is no indentation and where things are randomly
> indented or switches between amounts of indentation.
Some of wine's code is a mess with indentation, but alexandre won't
commit indentation patches.
This basically means that if there are multiple styles of indentations
in the same file, you have to pick the one that is around the place
where you put your function, although secretly when Alexandre isn't
looking I sometimes pick the preferred '4 spaces' one.
> What is the policy on when to change indentation and other things like
> turning something like this:
>     if (condition)
>     {
>         ...some code...
>         return 0;
>     }
>     return 1;
> into
>     if (condition)
>         return 1;
>     ...some code...
>     return 0;
> The page on style
> ( only
> contains very little on coding style.
> Another question, would it be OK to use smooth gradients in the colour
> dialog? It could be slow on older computer accessing each pixel
> individually although the code is only run on startup.
Explicit patches that only do that are not accepted as far as I know,
because it introduces bugs as you just skillfully demonstrated. ;-)

However if you are rewriting the function you might end up doing that
simplication in the process.


More information about the wine-devel mailing list