diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-05-15 22:18:01 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-05-15 22:18:01 +0000 |
commit | 34b7609ab2a3489a289ff69005d82e39e0df1d38 (patch) | |
tree | aad7994759d487f7d4c9b1c55eb23c9aa5ca99d8 /app | |
parent | 8922e68dbc998b43da1c7c904799e15902248495 (diff) |
KNF, no binary change.
From Pierre Riteau. Thanks!
Diffstat (limited to 'app')
-rw-r--r-- | app/cwm/client.c | 10 | ||||
-rw-r--r-- | app/cwm/conf.c | 6 | ||||
-rw-r--r-- | app/cwm/font.c | 2 | ||||
-rw-r--r-- | app/cwm/grab.c | 12 | ||||
-rw-r--r-- | app/cwm/group.c | 8 | ||||
-rw-r--r-- | app/cwm/search.c | 10 | ||||
-rw-r--r-- | app/cwm/util.c | 6 | ||||
-rw-r--r-- | app/cwm/xevents.c | 6 | ||||
-rw-r--r-- | app/cwm/xutil.c | 14 |
9 files changed, 36 insertions, 38 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c index f4efb74c1..2bc8ac761 100644 --- a/app/cwm/client.c +++ b/app/cwm/client.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: client.c,v 1.20 2008/05/15 21:56:21 okan Exp $ + * $Id: client.c,v 1.21 2008/05/15 22:18:00 oga Exp $ */ #include "headers.h" @@ -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/app/cwm/conf.c b/app/cwm/conf.c index 119b14729..db12e79b5 100644 --- a/app/cwm/conf.c +++ b/app/cwm/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: conf.c,v 1.28 2008/04/16 13:47:29 oga Exp $ + * $Id: conf.c,v 1.29 2008/05/15 22:18:00 oga Exp $ */ #include "headers.h" @@ -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/app/cwm/font.c b/app/cwm/font.c index 9eaadc7e2..38670e59a 100644 --- a/app/cwm/font.c +++ b/app/cwm/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/app/cwm/grab.c b/app/cwm/grab.c index 896ba588a..6c2dcccda 100644 --- a/app/cwm/grab.c +++ b/app/cwm/grab.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: grab.c,v 1.9 2008/04/15 20:24:41 oga Exp $ + * $Id: grab.c,v 1.10 2008/05/15 22:18:00 oga Exp $ */ #include "headers.h" @@ -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/app/cwm/group.c b/app/cwm/group.c index 406eaf13a..ba0bd36a5 100644 --- a/app/cwm/group.c +++ b/app/cwm/group.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: group.c,v 1.11 2008/04/16 13:38:09 oga Exp $ + * $Id: group.c,v 1.12 2008/05/15 22:18:00 oga Exp $ */ #include "headers.h" @@ -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/app/cwm/search.c b/app/cwm/search.c index 031d245d5..ee6058dd6 100644 --- a/app/cwm/search.c +++ b/app/cwm/search.c @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: search.c,v 1.8 2008/04/15 20:24:41 oga Exp $ + * $Id: search.c,v 1.9 2008/05/15 22:18:00 oga Exp $ */ #include "headers.h" @@ -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/app/cwm/util.c b/app/cwm/util.c index c4ceff7c7..4c55924d0 100644 --- a/app/cwm/util.c +++ b/app/cwm/util.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: util.c,v 1.8 2008/04/15 21:20:56 oga Exp $ + * $Id: util.c,v 1.9 2008/05/15 22:18:00 oga Exp $ */ #include "headers.h" @@ -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/app/cwm/xevents.c b/app/cwm/xevents.c index c5f5d7f36..24f334443 100644 --- a/app/cwm/xevents.c +++ b/app/cwm/xevents.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: xevents.c,v 1.12 2008/04/16 13:35:37 oga Exp $ + * $Id: xevents.c,v 1.13 2008/05/15 22:18:00 oga Exp $ */ /* @@ -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/app/cwm/xutil.c b/app/cwm/xutil.c index 5e9f180cc..ad58c0087 100644 --- a/app/cwm/xutil.c +++ b/app/cwm/xutil.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: xutil.c,v 1.5 2008/04/15 20:24:41 oga Exp $ + * $Id: xutil.c,v 1.6 2008/05/15 22:18:00 oga Exp $ */ #include "headers.h" @@ -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) |