Browse files

KNF, no binary change.

From Pierre Riteau. Thanks!
  • Loading branch information...
1 parent ec77265 commit 5034a77849c3a0ed91b67d1de65f063c9056cbc7 oga committed May 15, 2008
Showing with 28 additions and 30 deletions.
  1. +4 −4 client.c
  2. +2 −2 conf.c
  3. +1 −1 font.c
  4. +4 −6 grab.c
  5. +3 −3 group.c
  6. +4 −4 search.c
  7. +2 −2 util.c
  8. +2 −2 xevents.c
  9. +6 −6 xutil.c
View
8 client.c
@@ -330,9 +330,9 @@ client_maximize(struct client_ctx *cc)
cc->geom.x = Conf.gap_left;
cc->geom.y = Conf.gap_top;
cc->geom.height = rootwin_geom.height -
- (Conf.gap_top + Conf.gap_bottom);
+ (Conf.gap_top + Conf.gap_bottom);
cc->geom.width = rootwin_geom.width -
- (Conf.gap_left + Conf.gap_right);
+ (Conf.gap_left + Conf.gap_right);
cc->flags |= CLIENT_DOMAXIMIZE;
}
@@ -726,7 +726,7 @@ client_vertmaximize(struct client_ctx *cc)
cc->savegeom = cc->geom;
cc->geom.y = cc->bwidth + Conf.gap_top;
cc->geom.height = display_height -
- (Conf.gap_top + Conf.gap_bottom);
+ (Conf.gap_top + Conf.gap_bottom);
cc->flags |= CLIENT_DOVMAXIMIZE;
}
@@ -768,7 +768,7 @@ client_gethints(struct client_ctx *cc)
mha = XInternAtom(X_Dpy, "_MOTIF_WM_HINTS", False);
if (xu_getprop(cc, mha, mha, PROP_MWM_HINTS_ELEMENTS,
- (u_char **)&mwmh) == MWM_NUMHINTS)
+ (u_char **)&mwmh) == MWM_NUMHINTS)
if (mwmh->flags & MWM_HINTS_DECORATIONS &&
!(mwmh->decorations & MWM_DECOR_ALL) &&
!(mwmh->decorations & MWM_DECOR_BORDER))
View
4 conf.c
@@ -396,8 +396,8 @@ void conf_unbind(struct conf *c, struct keybinding *unbind)
continue;
if ((key->keycode != 0 && key->keysym == NoSymbol &&
- key->keycode == unbind->keycode) ||
- key->keysym == unbind->keysym)
+ key->keycode == unbind->keycode) ||
+ key->keysym == unbind->keysym)
TAILQ_REMOVE(&c->keybindingq, key, entry);
}
}
View
2 font.c
@@ -67,7 +67,7 @@ font_init(struct screen_ctx *sc)
errx(1, "XftDrawCreate");
if (!XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, sc->which),
- "black", &xcolor, &tmp))
+ "black", &xcolor, &tmp))
errx(1, "XAllocNamedColor");
sc->xftcolor.color.red = xcolor.red;
View
10 grab.c
@@ -292,16 +292,15 @@ grab_label(struct client_ctx *cc)
XMapRaised(X_Dpy, sc->searchwin);
XGetInputFocus(X_Dpy, &focuswin, &focusrevert);
- XSetInputFocus(X_Dpy, sc->searchwin,
- RevertToPointerRoot, CurrentTime);
+ XSetInputFocus(X_Dpy, sc->searchwin, RevertToPointerRoot, CurrentTime);
for (;;) {
XMaskEvent(X_Dpy, LabelMask, &e);
switch (e.type) {
case KeyPress:
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
- &ctl, &chr, 0) < 0)
+ &ctl, &chr, 0) < 0)
continue;
switch (ctl) {
@@ -348,9 +347,8 @@ grab_label(struct client_ctx *cc)
}
}
- out:
- XSetInputFocus(X_Dpy, focuswin,
- focusrevert, CurrentTime);
+out:
+ XSetInputFocus(X_Dpy, focuswin, focusrevert, CurrentTime);
XUnmapWindow(X_Dpy, sc->searchwin);
}
View
6 group.c
@@ -272,10 +272,10 @@ group_menu(XButtonEvent *e)
XCALLOC(mi, struct menu);
if (gc->hidden)
snprintf(mi->text, sizeof(mi->text), "%d: [%s]",
- gc->shortcut, gc->name);
+ gc->shortcut, gc->name);
else
snprintf(mi->text, sizeof(mi->text), "%d: %s",
- gc->shortcut, gc->name);
+ gc->shortcut, gc->name);
mi->ctx = gc;
TAILQ_INSERT_TAIL(&menuq, mi, entry);
}
@@ -295,7 +295,7 @@ group_menu(XButtonEvent *e)
else
_group_hide(gc);
- cleanup:
+cleanup:
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
xfree(mi);
View
8 search.c
@@ -104,7 +104,7 @@ search_start(struct menu_q *menuq,
switch (e.type) {
case KeyPress:
if (input_keycodetrans(e.xkey.keycode, e.xkey.state,
- &ctl, &chr, 1) < 0)
+ &ctl, &chr, 1) < 0)
continue;
switch (ctl) {
@@ -184,8 +184,8 @@ search_start(struct menu_q *menuq,
if (TAILQ_EMPTY(&resultq) && list) {
/* Copy them all over. */
TAILQ_FOREACH(mi, menuq, entry)
- TAILQ_INSERT_TAIL(&resultq, mi,
- resultentry);
+ TAILQ_INSERT_TAIL(&resultq, mi,
+ resultentry);
listing = 1;
} else if (mutated)
@@ -209,7 +209,7 @@ search_start(struct menu_q *menuq,
}
dx = MAX(dx, font_width(font, text,
- MIN(strlen(text), MENU_MAXENTRY)));
+ MIN(strlen(text), MENU_MAXENTRY)));
dy += fontheight;
}
View
4 util.c
@@ -49,9 +49,9 @@ u_exec(char *argstr)
char *tmp;
while (ap < end && (*ap = strsep(&argstr, " \t")) != NULL) {
- if(**ap == '\0')
+ if (**ap == '\0')
continue;
- ap++;
+ ap++;
if (argstr != NULL) {
/* deal with quoted strings */
switch(argstr[0]) {
View
4 xevents.c
@@ -342,7 +342,7 @@ xev_handle_buttonpress(struct xevent *xev, XEvent *ee)
client_lower(cc);
break;
}
- out:
+out:
xev_register(xev);
}
@@ -422,7 +422,7 @@ xev_handle_keyrelease(struct xevent *xev, XEvent *ee)
*/
client_mtf(NULL);
- out:
+out:
xev_register(xev);
}
View
12 xutil.c
@@ -25,15 +25,15 @@ int
xu_ptr_grab(Window win, int mask, Cursor curs)
{
return (XGrabPointer(X_Dpy, win, False, mask,
- GrabModeAsync, GrabModeAsync,
- None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
+ GrabModeAsync, GrabModeAsync,
+ None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
}
int
xu_ptr_regrab(int mask, Cursor curs)
{
return (XChangeActivePointerGrab(X_Dpy, mask,
- curs, CurrentTime) == GrabSuccess ? 0 : -1);
+ curs, CurrentTime) == GrabSuccess ? 0 : -1);
}
void
@@ -46,8 +46,8 @@ int
xu_btn_grab(Window win, int mask, u_int btn)
{
return (XGrabButton(X_Dpy, btn, mask, win,
- False, ButtonMask, GrabModeAsync,
- GrabModeSync, None, None) == GrabSuccess ? 0 : -1);
+ False, ButtonMask, GrabModeAsync,
+ GrabModeSync, None, None) == GrabSuccess ? 0 : -1);
}
void
@@ -110,7 +110,7 @@ xu_getprop(struct client_ctx *cc, Atom atm, Atom type, long len, u_char **p)
int format;
if (XGetWindowProperty(X_Dpy, cc->win, atm, 0L, len, False, type,
- &realtype, &format, &n, &extra, p) != Success || *p == NULL)
+ &realtype, &format, &n, &extra, p) != Success || *p == NULL)
return (-1);
if (n == 0)

0 comments on commit 5034a77

Please sign in to comment.