diff options
-rw-r--r-- | client.c | 10 | ||||
-rw-r--r-- | conf.c | 6 | ||||
-rw-r--r-- | menu.c | 11 | ||||
-rw-r--r-- | mousefunc.c | 8 | ||||
-rw-r--r-- | search.c | 8 | ||||
-rw-r--r-- | xevents.c | 4 |
6 files changed, 23 insertions, 24 deletions
@@ -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. * - * $OpenBSD: client.c,v 1.197 2015/06/30 14:01:43 okan Exp $ + * $OpenBSD: client.c,v 1.198 2015/07/01 14:36:42 okan Exp $ */ #include <sys/types.h> @@ -655,7 +655,7 @@ client_cycle(struct screen_ctx *sc, int flags) oldcc = client_current(); if (oldcc == NULL) - oldcc = (flags & CWM_RCYCLE ? + oldcc = ((flags & CWM_RCYCLE) ? TAILQ_LAST(&sc->clientq, client_ctx_q) : TAILQ_FIRST(&sc->clientq)); @@ -663,7 +663,7 @@ client_cycle(struct screen_ctx *sc, int flags) while (again) { again = 0; - newcc = (flags & CWM_RCYCLE ? client_prev(newcc) : + newcc = ((flags & CWM_RCYCLE) ? client_prev(newcc) : client_next(newcc)); /* Only cycle visible and non-ignored windows. */ @@ -707,7 +707,7 @@ client_next(struct client_ctx *cc) struct screen_ctx *sc = cc->sc; struct client_ctx *ccc; - return((ccc = TAILQ_NEXT(cc, entry)) != NULL ? + return(((ccc = TAILQ_NEXT(cc, entry)) != NULL) ? ccc : TAILQ_FIRST(&sc->clientq)); } @@ -717,7 +717,7 @@ client_prev(struct client_ctx *cc) struct screen_ctx *sc = cc->sc; struct client_ctx *ccc; - return((ccc = TAILQ_PREV(cc, client_ctx_q, entry)) != NULL ? + return(((ccc = TAILQ_PREV(cc, client_ctx_q, entry)) != NULL) ? ccc : TAILQ_LAST(&sc->clientq, client_ctx_q)); } @@ -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. * - * $OpenBSD: conf.c,v 1.189 2015/06/30 18:44:29 okan Exp $ + * $OpenBSD: conf.c,v 1.190 2015/07/01 14:36:42 okan Exp $ */ #include <sys/types.h> @@ -346,8 +346,8 @@ conf_client(struct client_ctx *cc) } } - cc->bwidth = ignore ? 0 : Conf.bwidth; - cc->flags |= ignore ? CLIENT_IGNORE : 0; + cc->bwidth = (ignore) ? 0 : Conf.bwidth; + cc->flags |= (ignore) ? CLIENT_IGNORE : 0; } static const struct { @@ -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. * - * $OpenBSD: menu.c,v 1.85 2015/06/30 18:42:50 okan Exp $ + * $OpenBSD: menu.c,v 1.86 2015/07/01 14:36:42 okan Exp $ */ #include <sys/types.h> @@ -411,8 +411,7 @@ menu_draw(struct menu_ctx *mc, struct menu_q *menuq, struct menu_q *resultq) n = 0; TAILQ_FOREACH(mi, resultq, resultentry) { - char *text = mi->print[0] != '\0' ? - mi->print : mi->text; + char *text = (mi->print[0] != '\0') ? mi->print : mi->text; int y = n * (sc->xftfont->height + 1) + sc->xftfont->ascent + 1; /* Stop drawing when menu doesn't fit inside the screen. */ @@ -444,12 +443,12 @@ menu_draw_entry(struct menu_ctx *mc, struct menu_q *resultq, if (mi == NULL) return; - color = active ? CWM_COLOR_MENU_FG : CWM_COLOR_MENU_BG; - text = mi->print[0] != '\0' ? mi->print : mi->text; + color = (active) ? CWM_COLOR_MENU_FG : CWM_COLOR_MENU_BG; + text = (mi->print[0] != '\0') ? mi->print : mi->text; XftDrawRect(sc->xftdraw, &sc->xftcolor[color], 0, (sc->xftfont->height + 1) * entry, mc->geom.w, (sc->xftfont->height + 1) + sc->xftfont->descent); - color = active ? CWM_COLOR_MENU_FONT_SEL : CWM_COLOR_MENU_FONT; + color = (active) ? CWM_COLOR_MENU_FONT_SEL : CWM_COLOR_MENU_FONT; xu_xft_draw(sc, text, color, 0, (sc->xftfont->height + 1) * entry + sc->xftfont->ascent + 1); } diff --git a/mousefunc.c b/mousefunc.c index 20a022f..34c347f 100644 --- a/mousefunc.c +++ b/mousefunc.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. * - * $OpenBSD: mousefunc.c,v 1.94 2015/06/30 19:02:24 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.95 2015/07/01 14:36:42 okan Exp $ */ #include <sys/types.h> @@ -43,8 +43,8 @@ mousefunc_sweep_calc(struct client_ctx *cc, int x, int y, int mx, int my) client_applysizehints(cc); - cc->geom.x = x <= mx ? x : x - cc->geom.w; - cc->geom.y = y <= my ? y : y - cc->geom.h; + cc->geom.x = (x <= mx) ? x : x - cc->geom.w; + cc->geom.y = (y <= my) ? y : y - cc->geom.h; } static void @@ -183,7 +183,7 @@ mousefunc_menu_group(struct client_ctx *cc, union arg *arg) if (group_holds_only_sticky(gc)) continue; menuq_add(&menuq, gc, - group_holds_only_hidden(gc) ? "%d: [%s]" : "%d: %s", + (group_holds_only_hidden(gc)) ? "%d: [%s]" : "%d: %s", gc->num, gc->name); } @@ -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. * - * $OpenBSD: search.c,v 1.47 2015/07/01 14:29:36 okan Exp $ + * $OpenBSD: search.c,v 1.48 2015/07/01 14:36:42 okan Exp $ */ #include <sys/types.h> @@ -134,7 +134,7 @@ search_print_cmd(struct menu *mi, int i) special = 1; (void)snprintf(mi->print, sizeof(mi->print), - (special) ? "[%s]" : "%s", cmd->name); + (special) ? "[%s]" : "%s", cmd->name); } void @@ -152,8 +152,8 @@ search_print_client(struct menu *mi, int list) cc->matchname = cc->name; (void)snprintf(mi->print, sizeof(mi->print), "(%d) %c[%s] %s", - cc->group ? cc->group->num : 0, flag, - cc->label ? cc->label : "", cc->matchname); + (cc->group) ? cc->group->num : 0, flag, + (cc->label) ? cc->label : "", cc->matchname); } static void @@ -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. * - * $OpenBSD: xevents.c,v 1.117 2015/06/30 14:01:43 okan Exp $ + * $OpenBSD: xevents.c,v 1.118 2015/07/01 14:36:42 okan Exp $ */ /* @@ -279,7 +279,7 @@ xev_handle_keypress(XEvent *ee) if ((kb->modmask | modshift) != e->state) continue; - if (kb->press.keysym == (modshift == 0 ? keysym : skeysym)) + if (kb->press.keysym == ((modshift == 0) ? keysym : skeysym)) break; } |