From 5034a77849c3a0ed91b67d1de65f063c9056cbc7 Mon Sep 17 00:00:00 2001 From: oga Date: Thu, 15 May 2008 22:18:00 +0000 Subject: KNF, no binary change. From Pierre Riteau. Thanks! --- client.c | 8 ++++---- conf.c | 4 ++-- font.c | 2 +- grab.c | 10 ++++------ group.c | 6 +++--- search.c | 8 ++++---- util.c | 4 ++-- xevents.c | 4 ++-- xutil.c | 12 ++++++------ 9 files changed, 28 insertions(+), 30 deletions(-) diff --git a/client.c b/client.c index 7af597a..96c0351 100644 --- a/client.c +++ b/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)) diff --git a/conf.c b/conf.c index ad1aadc..fe14817 100644 --- a/conf.c +++ b/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); } } diff --git a/font.c b/font.c index 9eaadc7..38670e5 100644 --- a/font.c +++ b/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; diff --git a/grab.c b/grab.c index 724981e..d488394 100644 --- a/grab.c +++ b/grab.c @@ -292,8 +292,7 @@ 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); @@ -301,7 +300,7 @@ grab_label(struct client_ctx *cc) 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); } diff --git a/group.c b/group.c index 9f01b7e..5d6175a 100644 --- a/group.c +++ b/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); diff --git a/search.c b/search.c index c0c159f..d507fbf 100644 --- a/search.c +++ b/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; } diff --git a/util.c b/util.c index 7e941c6..f7ef353 100644 --- a/util.c +++ b/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]) { diff --git a/xevents.c b/xevents.c index 5afba57..54f07a9 100644 --- a/xevents.c +++ b/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); } diff --git a/xutil.c b/xutil.c index 4f80351..09c6eda 100644 --- a/xutil.c +++ b/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) -- cgit 1.4.1