aboutsummaryrefslogtreecommitdiff
path: root/st.h
diff options
context:
space:
mode:
Diffstat (limited to 'st.h')
-rw-r--r--st.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/st.h b/st.h
index 46c33f6..c516cee 100644
--- a/st.h
+++ b/st.h
@@ -20,6 +20,10 @@
#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b))
#define IS_TRUECOL(x) (1 << 24 & (x))
+#define HEX_TO_INT(c) ((c) >= '0' && (c) <= '9' ? (c) - '0' : \
+ (c) >= 'a' && (c) <= 'f' ? (c) - 'a' + 10 : \
+ (c) >= 'A' && (c) <= 'F' ? (c) - 'A' + 10 : -1)
+
enum glyph_attribute {
ATTR_NULL = 0,
ATTR_SET = 1 << 0,