From 03176d219db80f5577b1945a0b32533a5263b933 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 17 Dec 2012 02:53:29 +0000 Subject: knf --- font.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'font.c') diff --git a/font.c b/font.c index 7268b7e..75d5686 100644 --- a/font.c +++ b/font.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. * - * $OpenBSD: font.c,v 1.21 2012/12/17 02:28:45 okan Exp $ + * $OpenBSD: font.c,v 1.22 2012/12/17 02:53:29 okan Exp $ */ #include @@ -51,8 +51,8 @@ font_height(struct screen_ctx *sc) void font_init(struct screen_ctx *sc, const char *name, const char **color) { - int i; - XRenderColor c; + int i; + XRenderColor c; sc->xftdraw = XftDrawCreate(X_Dpy, sc->rootwin, DefaultVisual(X_Dpy, sc->which), DefaultColormap(X_Dpy, sc->which)); @@ -62,7 +62,8 @@ font_init(struct screen_ctx *sc, const char *name, const char **color) sc->font = XftFontOpenName(X_Dpy, sc->which, name); if (sc->font == NULL) errx(1, "XftFontOpenName"); - for(i = 0; i < CWM_COLOR_MENU_MAX; i++) { + + for (i = 0; i < CWM_COLOR_MENU_MAX; i++) { if (*color[i] == '\0') break; if (!XftColorAllocName(X_Dpy, DefaultVisual(X_Dpy, sc->which), @@ -74,11 +75,11 @@ font_init(struct screen_ctx *sc, const char *name, const char **color) return; xu_xorcolor(sc->xftcolor[CWM_COLOR_MENU_BG].color, - sc->xftcolor[CWM_COLOR_MENU_FG].color, &c); + sc->xftcolor[CWM_COLOR_MENU_FG].color, &c); xu_xorcolor(sc->xftcolor[CWM_COLOR_MENU_FONT].color, c, &c); if (!XftColorAllocValue(X_Dpy, DefaultVisual(X_Dpy, sc->which), - DefaultColormap(X_Dpy, sc->which), &c, - &sc->xftcolor[CWM_COLOR_MENU_FONT_SEL])) + DefaultColormap(X_Dpy, sc->which), &c, + &sc->xftcolor[CWM_COLOR_MENU_FONT_SEL])) errx(1, "XftColorAllocValue"); } @@ -97,7 +98,7 @@ void font_draw(struct screen_ctx *sc, const char *text, int len, Drawable d, int active, int x, int y) { - int color; + int color; color = active ? CWM_COLOR_MENU_FONT_SEL : CWM_COLOR_MENU_FONT; XftDrawChange(sc->xftdraw, d); -- cgit v1.2.3-2-gb3c3