Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
st.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fbb66da
)
fixed potential bug in IS_SET().
author
Aurélien Aptel
<aurelien.aptel@gmail.com>
Thu, 26 Aug 2010 22:58:28 +0000
(
00:58
+0200)
committer
Aurélien Aptel
<aurelien.aptel@gmail.com>
Thu, 26 Aug 2010 22:58:28 +0000
(
00:58
+0200)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
ebe896c
..
8dfd4a7
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-34,7
+34,7
@@
#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b))
#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || (a).bg != (b).bg)
#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b))
#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || (a).bg != (b).bg)
-#define IS_SET(flag) (term.mode & flag)
+#define IS_SET(flag) (term.mode & (flag))
/* Attribute, Cursor, Character state, Terminal mode, Screen draw mode */
enum { ATTR_NULL=0 , ATTR_REVERSE=1 , ATTR_UNDERLINE=2, ATTR_BOLD=4, ATTR_GFX=8 };
/* Attribute, Cursor, Character state, Terminal mode, Screen draw mode */
enum { ATTR_NULL=0 , ATTR_REVERSE=1 , ATTR_UNDERLINE=2, ATTR_BOLD=4, ATTR_GFX=8 };