Introduction
Introduction Statistics Contact Development Disclaimer Help
tmove MODBIT to Macros section - st - [fork] customized build of st, the simple…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 138887033193389854a2cb748b8940793a7bfb6f
parent 6b56cbf9cc597b529f244ee8fcb1cbbcc338c7b7
Author: [email protected] <[email protected]>
Date: Sun, 20 Apr 2014 13:08:09 +0400
move MODBIT to Macros section
Patch moves MODBIT to macros section and uses it in tselcs.
Diffstat:
M st.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -75,6 +75,7 @@ char *argv0;
#define IS_SET(flag) ((term.mode & (flag)) != 0)
#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + (t1.tv_usec-t2.tv_usec)…
#define CEIL(x) (((x) != (int) (x)) ? (x) + 1 : (x))
+#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit)))
#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b))
#define IS_TRUECOL(x) (1 << 24 & (x))
t@@ -1784,8 +1785,6 @@ tsetscroll(int t, int b) {
term.bot = b;
}
-#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit)))
-
void
tsetmode(bool priv, bool set, int *args, int narg) {
int *lim, mode;
t@@ -2352,10 +2351,9 @@ tdeftran(char ascii) {
void
tselcs(void) {
- if (term.trantbl[term.charset] == CS_GRAPHIC0)
- term.c.attr.mode |= ATTR_GFX;
- else
- term.c.attr.mode &= ~ATTR_GFX;
+ MODBIT(term.c.attr.mode,
+ term.trantbl[term.charset] == CS_GRAPHIC0,
+ ATTR_GFX);
}
void
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.