Xinqi Bao's Git
projects
/
st.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
27b28f1
)
Refactor the innermost loop of the xdraws function
author
Silvan Jegen <
[email protected]
>
Fri, 6 Jun 2014 20:09:22 +0000
(22:09 +0200)
committer
Christoph Lohmann <
[email protected]
>
Sun, 15 Jun 2014 10:12:23 +0000
(12:12 +0200)
Signed-off-by: Silvan Jegen <
[email protected]
>
Signed-off-by: Christoph Lohmann <
[email protected]
>
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
3681776
..
2cf9a26
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-3245,28
+3245,22
@@
xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
bytelen -= u8cblen;
doesexist = XftCharExists(xw.dpy, font->match, unicodep);
bytelen -= u8cblen;
doesexist = XftCharExists(xw.dpy, font->match, unicodep);
- if(oneatatime || !doesexist || bytelen <= 0) {
- if(oneatatime || bytelen <= 0) {
- if(doesexist) {
- u8fl++;
- u8fblen += u8cblen;
- }
- }
-
- if(u8fl > 0) {
- XftDrawStringUtf8(xw.draw, fg,
- font->match, xp,
- winy + font->ascent,
- (FcChar8 *)u8fs,
- u8fblen);
- xp += xw.cw * u8fl;
-
- }
- break;
+ if(doesexist) {
+ u8fl++;
+ u8fblen += u8cblen;
+ if(!oneatatime && bytelen > 0)
+ continue;
}
}
- u8fl++;
- u8fblen += u8cblen;
+ if(u8fl > 0) {
+ XftDrawStringUtf8(xw.draw, fg,
+ font->match, xp,
+ winy + font->ascent,
+ (FcChar8 *)u8fs,
+ u8fblen);
+ xp += xw.cw * u8fl;
+ }
+ break;
}
if(doesexist) {
if(oneatatime)
}
if(doesexist) {
if(oneatatime)