Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

KNF, no binary change.

From Pierre Riteau. Thanks!
  • Loading branch information...
commit 5034a77849c3a0ed91b67d1de65f063c9056cbc7 1 parent ec77265
oga authored
8 client.c
@@ -330,9 +330,9 @@ client_maximize(struct client_ctx *cc)
330 330 cc->geom.x = Conf.gap_left;
331 331 cc->geom.y = Conf.gap_top;
332 332 cc->geom.height = rootwin_geom.height -
333   - (Conf.gap_top + Conf.gap_bottom);
  333 + (Conf.gap_top + Conf.gap_bottom);
334 334 cc->geom.width = rootwin_geom.width -
335   - (Conf.gap_left + Conf.gap_right);
  335 + (Conf.gap_left + Conf.gap_right);
336 336 cc->flags |= CLIENT_DOMAXIMIZE;
337 337 }
338 338
@@ -726,7 +726,7 @@ client_vertmaximize(struct client_ctx *cc)
726 726 cc->savegeom = cc->geom;
727 727 cc->geom.y = cc->bwidth + Conf.gap_top;
728 728 cc->geom.height = display_height -
729   - (Conf.gap_top + Conf.gap_bottom);
  729 + (Conf.gap_top + Conf.gap_bottom);
730 730 cc->flags |= CLIENT_DOVMAXIMIZE;
731 731 }
732 732
@@ -768,7 +768,7 @@ client_gethints(struct client_ctx *cc)
768 768
769 769 mha = XInternAtom(X_Dpy, "_MOTIF_WM_HINTS", False);
770 770 if (xu_getprop(cc, mha, mha, PROP_MWM_HINTS_ELEMENTS,
771   - (u_char **)&mwmh) == MWM_NUMHINTS)
  771 + (u_char **)&mwmh) == MWM_NUMHINTS)
772 772 if (mwmh->flags & MWM_HINTS_DECORATIONS &&
773 773 !(mwmh->decorations & MWM_DECOR_ALL) &&
774 774 !(mwmh->decorations & MWM_DECOR_BORDER))
4 conf.c
@@ -396,8 +396,8 @@ void conf_unbind(struct conf *c, struct keybinding *unbind)
396 396 continue;
397 397
398 398 if ((key->keycode != 0 && key->keysym == NoSymbol &&
399   - key->keycode == unbind->keycode) ||
400   - key->keysym == unbind->keysym)
  399 + key->keycode == unbind->keycode) ||
  400 + key->keysym == unbind->keysym)
401 401 TAILQ_REMOVE(&c->keybindingq, key, entry);
402 402 }
403 403 }
2  font.c
@@ -67,7 +67,7 @@ font_init(struct screen_ctx *sc)
67 67 errx(1, "XftDrawCreate");
68 68
69 69 if (!XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, sc->which),
70   - "black", &xcolor, &tmp))
  70 + "black", &xcolor, &tmp))
71 71 errx(1, "XAllocNamedColor");
72 72
73 73 sc->xftcolor.color.red = xcolor.red;
10 grab.c
@@ -292,8 +292,7 @@ grab_label(struct client_ctx *cc)
292 292 XMapRaised(X_Dpy, sc->searchwin);
293 293
294 294 XGetInputFocus(X_Dpy, &focuswin, &focusrevert);
295   - XSetInputFocus(X_Dpy, sc->searchwin,
296   - RevertToPointerRoot, CurrentTime);
  295 + XSetInputFocus(X_Dpy, sc->searchwin, RevertToPointerRoot, CurrentTime);
297 296
298 297 for (;;) {
299 298 XMaskEvent(X_Dpy, LabelMask, &e);
@@ -301,7 +300,7 @@ grab_label(struct client_ctx *cc)
301 300 switch (e.type) {
302 301 case KeyPress:
303 302 if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
304   - &ctl, &chr, 0) < 0)
  303 + &ctl, &chr, 0) < 0)
305 304 continue;
306 305
307 306 switch (ctl) {
@@ -348,9 +347,8 @@ grab_label(struct client_ctx *cc)
348 347 }
349 348 }
350 349
351   - out:
352   - XSetInputFocus(X_Dpy, focuswin,
353   - focusrevert, CurrentTime);
  350 +out:
  351 + XSetInputFocus(X_Dpy, focuswin, focusrevert, CurrentTime);
354 352 XUnmapWindow(X_Dpy, sc->searchwin);
355 353 }
356 354
6 group.c
@@ -272,10 +272,10 @@ group_menu(XButtonEvent *e)
272 272 XCALLOC(mi, struct menu);
273 273 if (gc->hidden)
274 274 snprintf(mi->text, sizeof(mi->text), "%d: [%s]",
275   - gc->shortcut, gc->name);
  275 + gc->shortcut, gc->name);
276 276 else
277 277 snprintf(mi->text, sizeof(mi->text), "%d: %s",
278   - gc->shortcut, gc->name);
  278 + gc->shortcut, gc->name);
279 279 mi->ctx = gc;
280 280 TAILQ_INSERT_TAIL(&menuq, mi, entry);
281 281 }
@@ -295,7 +295,7 @@ group_menu(XButtonEvent *e)
295 295 else
296 296 _group_hide(gc);
297 297
298   - cleanup:
  298 +cleanup:
299 299 while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
300 300 TAILQ_REMOVE(&menuq, mi, entry);
301 301 xfree(mi);
8 search.c
@@ -104,7 +104,7 @@ search_start(struct menu_q *menuq,
104 104 switch (e.type) {
105 105 case KeyPress:
106 106 if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
107   - &ctl, &chr, 1) < 0)
  107 + &ctl, &chr, 1) < 0)
108 108 continue;
109 109
110 110 switch (ctl) {
@@ -184,8 +184,8 @@ search_start(struct menu_q *menuq,
184 184 if (TAILQ_EMPTY(&resultq) && list) {
185 185 /* Copy them all over. */
186 186 TAILQ_FOREACH(mi, menuq, entry)
187   - TAILQ_INSERT_TAIL(&resultq, mi,
188   - resultentry);
  187 + TAILQ_INSERT_TAIL(&resultq, mi,
  188 + resultentry);
189 189
190 190 listing = 1;
191 191 } else if (mutated)
@@ -209,7 +209,7 @@ search_start(struct menu_q *menuq,
209 209 }
210 210
211 211 dx = MAX(dx, font_width(font, text,
212   - MIN(strlen(text), MENU_MAXENTRY)));
  212 + MIN(strlen(text), MENU_MAXENTRY)));
213 213 dy += fontheight;
214 214 }
215 215
4 util.c
@@ -49,9 +49,9 @@ u_exec(char *argstr)
49 49 char *tmp;
50 50
51 51 while (ap < end && (*ap = strsep(&argstr, " \t")) != NULL) {
52   - if(**ap == '\0')
  52 + if (**ap == '\0')
53 53 continue;
54   - ap++;
  54 + ap++;
55 55 if (argstr != NULL) {
56 56 /* deal with quoted strings */
57 57 switch(argstr[0]) {
4 xevents.c
@@ -342,7 +342,7 @@ xev_handle_buttonpress(struct xevent *xev, XEvent *ee)
342 342 client_lower(cc);
343 343 break;
344 344 }
345   - out:
  345 +out:
346 346 xev_register(xev);
347 347 }
348 348
@@ -422,7 +422,7 @@ xev_handle_keyrelease(struct xevent *xev, XEvent *ee)
422 422 */
423 423 client_mtf(NULL);
424 424
425   - out:
  425 +out:
426 426 xev_register(xev);
427 427 }
428 428
12 xutil.c
@@ -25,15 +25,15 @@ int
25 25 xu_ptr_grab(Window win, int mask, Cursor curs)
26 26 {
27 27 return (XGrabPointer(X_Dpy, win, False, mask,
28   - GrabModeAsync, GrabModeAsync,
29   - None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
  28 + GrabModeAsync, GrabModeAsync,
  29 + None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
30 30 }
31 31
32 32 int
33 33 xu_ptr_regrab(int mask, Cursor curs)
34 34 {
35 35 return (XChangeActivePointerGrab(X_Dpy, mask,
36   - curs, CurrentTime) == GrabSuccess ? 0 : -1);
  36 + curs, CurrentTime) == GrabSuccess ? 0 : -1);
37 37 }
38 38
39 39 void
@@ -46,8 +46,8 @@ int
46 46 xu_btn_grab(Window win, int mask, u_int btn)
47 47 {
48 48 return (XGrabButton(X_Dpy, btn, mask, win,
49   - False, ButtonMask, GrabModeAsync,
50   - GrabModeSync, None, None) == GrabSuccess ? 0 : -1);
  49 + False, ButtonMask, GrabModeAsync,
  50 + GrabModeSync, None, None) == GrabSuccess ? 0 : -1);
51 51 }
52 52
53 53 void
@@ -110,7 +110,7 @@ xu_getprop(struct client_ctx *cc, Atom atm, Atom type, long len, u_char **p)
110 110 int format;
111 111
112 112 if (XGetWindowProperty(X_Dpy, cc->win, atm, 0L, len, False, type,
113   - &realtype, &format, &n, &extra, p) != Success || *p == NULL)
  113 + &realtype, &format, &n, &extra, p) != Success || *p == NULL)
114 114 return (-1);
115 115
116 116 if (n == 0)

0 comments on commit 5034a77

Please sign in to comment.
Something went wrong with that request. Please try again.