[hackers] [st] Style cleanup. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Sat, 01 Mar 2014 11:04:50 +0100

commit 1584956a60f7739e46c5a0cd0e0e8295aa26071c
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Sat Mar 1 11:04:03 2014 +0100

    Style cleanup.
    
    Add some note about the main reason why st is still that big.

diff --git a/st.c b/st.c
index 9371b62..c16e45d 100644
--- a/st.c
+++ b/st.c
_AT_@ -3091,6 +3091,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                 if(base.fg == defaultfg)
                         base.fg = defaultunderline;
         }
+
         if(IS_TRUECOL(base.fg)) {
                 colfg.alpha = 0xffff;
                 colfg.red = TRUERED(base.fg);
_AT_@ -3113,8 +3114,6 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                 bg = &dc.col[base.bg];
         }
 
-
-
         if(base.mode & ATTR_BOLD) {
                 if(BETWEEN(base.fg, 0, 7)) {
                         /* basic system colors */
_AT_@ -3144,7 +3143,8 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                         colfg.green = ~fg->color.green;
                         colfg.blue = ~fg->color.blue;
                         colfg.alpha = fg->color.alpha;
- XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg, &revfg);
+ XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colfg,
+ &revfg);
                         fg = &revfg;
                 }
 
_AT_@ -3155,7 +3155,8 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                         colbg.green = ~bg->color.green;
                         colbg.blue = ~bg->color.blue;
                         colbg.alpha = bg->color.alpha;
- XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg, &revbg);
+ XftColorAllocValue(xw.dpy, xw.vis, xw.cmap, &colbg,
+ &revbg);
                         bg = &revbg;
                 }
         }
_AT_@ -3235,7 +3236,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                         u8fblen += u8cblen;
                 }
                 if(doesexist) {
- if (oneatatime)
+ if(oneatatime)
                                 continue;
                         break;
                 }
_AT_@ -3258,6 +3259,8 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
                          * Nothing was found in the cache. Now use
                          * some dozen of Fontconfig calls to get the
                          * font for one single character.
+ *
+ * Xft and fontconfig are design failures.
                          */
                         fcpattern = FcPatternDuplicate(font->pattern);
                         fccharset = FcCharSetCreate();
_AT_@ -3302,6 +3305,12 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
         }
 
         /*
+ * This is how the loop above actually should be. Why does the
+ * application have to care about font details?
+ *
+ * I have to repeat: Xft and Fontconfig are design failures.
+ */
+ /*
         XftDrawStringUtf8(xw.draw, fg, font->set, winx,
                         winy + font->ascent, (FcChar8 *)s, bytelen);
         */
Received on Sat Mar 01 2014 - 11:04:50 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 01 2014 - 11:12:17 CET