---
 x.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/x.c b/x.c
index 40164f9..9126e07 100644
--- a/x.c
+++ b/x.c
@@ -138,7 +138,7 @@ static void xdrawglyphfontspecs(const XftGlyphFontSpec *, 
Glyph, int, int, int);
 static void xdrawglyph(Glyph, int, int);
 static void xclear(int, int, int, int);
 static int xgeommasktogravity(int);
-static void xinit(int, int);
+static void xinit(void);
 static void cresize(int, int);
 static void xresize(int, int);
 static void xhints(void);
@@ -996,7 +996,7 @@ xunloadfonts(void)
 }
 
 void
-xinit(int cols, int rows)
+xinit(void)
 {
        XGCValues gcvalues;
        Cursor cursor;
@@ -1124,7 +1124,7 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph 
*glyphs, size_t len, in
 {
        float winx = borderpx + x * win.cw, winy = borderpx + y * win.ch, xp, 
yp;
        ushort mode, prevmode = USHRT_MAX;
-       Font *font = &dc.font;
+       Font *dcfont = &dc.font;
        int frcflags = FRC_NORMAL;
        float runewidth = win.cw;
        Rune rune;
@@ -1135,7 +1135,7 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph 
*glyphs, size_t len, in
        FcCharSet *fccharset;
        size_t i, f, numspecs = 0;
 
-       for (i = 0, xp = winx, yp = winy + font->ascent; i < len; ++i) {
+       for (i = 0, xp = winx, yp = winy + dcfont->ascent; i < len; ++i) {
                /* Fetch rune and mode for current glyph. */
                rune = glyphs[i].u;
                mode = glyphs[i].mode;
@@ -1147,26 +1147,26 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const 
Glyph *glyphs, size_t len, in
                /* Determine font for glyph if different from previous glyph. */
                if (prevmode != mode) {
                        prevmode = mode;
-                       font = &dc.font;
+                       dcfont = &dc.font;
                        frcflags = FRC_NORMAL;
                        runewidth = win.cw * ((mode & ATTR_WIDE) ? 2.0f : 1.0f);
                        if ((mode & ATTR_ITALIC) && (mode & ATTR_BOLD)) {
-                               font = &dc.ibfont;
+                               dcfont = &dc.ibfont;
                                frcflags = FRC_ITALICBOLD;
                        } else if (mode & ATTR_ITALIC) {
-                               font = &dc.ifont;
+                               dcfont = &dc.ifont;
                                frcflags = FRC_ITALIC;
                        } else if (mode & ATTR_BOLD) {
-                               font = &dc.bfont;
+                               dcfont = &dc.bfont;
                                frcflags = FRC_BOLD;
                        }
-                       yp = winy + font->ascent;
+                       yp = winy + dcfont->ascent;
                }
 
                /* Lookup character index with default font. */
-               glyphidx = XftCharIndex(xw.dpy, font->match, rune);
+               glyphidx = XftCharIndex(xw.dpy, dcfont->match, rune);
                if (glyphidx) {
-                       specs[numspecs].font = font->match;
+                       specs[numspecs].font = dcfont->match;
                        specs[numspecs].glyph = glyphidx;
                        specs[numspecs].x = (short)xp;
                        specs[numspecs].y = (short)yp;
@@ -1190,10 +1190,10 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const 
Glyph *glyphs, size_t len, in
 
                /* Nothing was found. Use fontconfig to find matching font. */
                if (f >= frclen) {
-                       if (!font->set)
-                               font->set = FcFontSort(0, font->pattern,
+                       if (!dcfont->set)
+                               dcfont->set = FcFontSort(0, dcfont->pattern,
                                                       1, 0, &fcres);
-                       fcsets[0] = font->set;
+                       fcsets[0] = dcfont->set;
 
                        /*
                         * Nothing was found in the cache. Now use
@@ -1202,7 +1202,7 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph 
*glyphs, size_t len, in
                         *
                         * Xft and fontconfig are design failures.
                         */
-                       fcpattern = FcPatternDuplicate(font->pattern);
+                       fcpattern = FcPatternDuplicate(dcfont->pattern);
                        fccharset = FcCharSetCreate();
 
                        FcCharSetAddChar(fccharset, rune);
@@ -1947,7 +1947,7 @@ run:
        cols = MAX(cols, 1);
        rows = MAX(rows, 1);
        tnew(cols, rows);
-       xinit(cols, rows);
+       xinit();
        xsetenv();
        selinit();
        run();
-- 
2.20.1


Reply via email to