Re: [dwm] more consistent codestyle patch

From: Szabolcs Nagy <>
Date: Tue, 13 May 2008 17:41:30 +0200

On 5/13/08, Diego Biurrun <> wrote:
> On Tue, May 13, 2008 at 02:05:27PM +0200, Szabolcs Nagy wrote:
> > simple modifications (whitespce, line wrapping)
> Ummmm...
> All of this looks like code uglification to me...

well imho consistent code style is better than inconsistent
especially if the inconsistency does not serve any purpose

i don't want you to worry about it too much so here is an explanation
of the patch:

1) removed accidental double spaces eg.:
-grabkeys(void) {
+grabkeys(void) {

2) consistent whitespace in selection/iteration statements eg:
- if (!len)
+ if(!len)

3) use tabs for identation (even for line wraps because arg prefers this way):
                 XGrabButton(dpy, AnyButton, AnyModifier, c->win, False,
- BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
+ BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);

4) no extra indentation if the conditional expression of a statement wraps:
         if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
- None, cursor[CurResize], CurrentTime) != GrabSuccess)
+ None, cursor[CurResize], CurrentTime) != GrabSuccess)

most of the code already followed these rules and i did not see any
reason not to follow them in the specific cases.

of course i am open to any comment about these style rules
Received on Tue May 13 2008 - 17:41:33 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:38:59 UTC