iAligning the macros. - st - Simple Terminal Err gopher.r-36.net 70 i Err gopher.r-36.net 70 1Log /scm/st//log.gph gopher.r-36.net 70 1Files /scm/st//files.gph gopher.r-36.net 70 1Refs /scm/st//refs.gph gopher.r-36.net 70 1README /scm/st//file/README.gph gopher.r-36.net 70 1LICENSE /scm/st//file/LICENSE.gph gopher.r-36.net 70 i--- Err gopher.r-36.net 70 1commit b823f57fa045bf8efa5648adbfeb0b6a7a9eb48b /scm/st//commit/b823f57fa045bf8efa5648adbfeb0b6a7a9eb48b.gph gopher.r-36.net 70 1parent 684f0a0729442e18115f71bc594a159725418ce8 /scm/st//commit/684f0a0729442e18115f71bc594a159725418ce8.gph gopher.r-36.net 70 hAuthor: Christoph Lohmann <20h@r-36.net> URL:mailto:20h@r-36.net gopher.r-36.net 70 iDate: Fri, 10 Jul 2015 14:21:52 +0200 Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iAligning the macros. Err gopher.r-36.net 70 i Err gopher.r-36.net 70 iDiffstat: Err gopher.r-36.net 70 i st.c | 42 ++++++++++++++++--------------- Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i1 file changed, 22 insertions(+), 20 deletions(-) Err gopher.r-36.net 70 i--- Err gopher.r-36.net 70 1diff --git a/st.c b/st.c /scm/st//file/st.c.gph gopher.r-36.net 70 i@@ -62,26 +62,28 @@ char *argv0; Err gopher.r-36.net 70 i #define XK_SWITCH_MOD (1<<13) Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i /* macros */ Err gopher.r-36.net 70 i-#define MIN(a, b) ((a) < (b) ? (a) : (b)) Err gopher.r-36.net 70 i-#define MAX(a, b) ((a) < (b) ? (b) : (a)) Err gopher.r-36.net 70 i-#define LEN(a) (sizeof(a) / sizeof(a)[0]) Err gopher.r-36.net 70 i-#define DEFAULT(a, b) (a) = (a) ? (a) : (b) Err gopher.r-36.net 70 i-#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) Err gopher.r-36.net 70 i-#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177') Err gopher.r-36.net 70 i-#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) Err gopher.r-36.net 70 i-#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) Err gopher.r-36.net 70 i-#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL) Err gopher.r-36.net 70 i-#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) Err gopher.r-36.net 70 i-#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || (a).bg != (b).bg) Err gopher.r-36.net 70 i-#define IS_SET(flag) ((term.mode & (flag)) != 0) Err gopher.r-36.net 70 i-#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + (t1.tv_nsec-t2.tv_nsec)/1E6) Err gopher.r-36.net 70 i-#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit))) Err gopher.r-36.net 70 i- Err gopher.r-36.net 70 i-#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) Err gopher.r-36.net 70 i-#define IS_TRUECOL(x) (1 << 24 & (x)) Err gopher.r-36.net 70 i-#define TRUERED(x) (((x) & 0xff0000) >> 8) Err gopher.r-36.net 70 i-#define TRUEGREEN(x) (((x) & 0xff00)) Err gopher.r-36.net 70 i-#define TRUEBLUE(x) (((x) & 0xff) << 8) Err gopher.r-36.net 70 i+#define MIN(a, b) ((a) < (b) ? (a) : (b)) Err gopher.r-36.net 70 i+#define MAX(a, b) ((a) < (b) ? (b) : (a)) Err gopher.r-36.net 70 i+#define LEN(a) (sizeof(a) / sizeof(a)[0]) Err gopher.r-36.net 70 i+#define DEFAULT(a, b) (a) = (a) ? (a) : (b) Err gopher.r-36.net 70 i+#define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) Err gopher.r-36.net 70 i+#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177') Err gopher.r-36.net 70 i+#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) Err gopher.r-36.net 70 i+#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) Err gopher.r-36.net 70 i+#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL) Err gopher.r-36.net 70 i+#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) Err gopher.r-36.net 70 i+#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \ Err gopher.r-36.net 70 i+ (a).bg != (b).bg) Err gopher.r-36.net 70 i+#define IS_SET(flag) ((term.mode & (flag)) != 0) Err gopher.r-36.net 70 i+#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \ Err gopher.r-36.net 70 i+ (t1.tv_nsec-t2.tv_nsec)/1E6) Err gopher.r-36.net 70 i+#define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit))) Err gopher.r-36.net 70 i+ Err gopher.r-36.net 70 i+#define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) Err gopher.r-36.net 70 i+#define IS_TRUECOL(x) (1 << 24 & (x)) Err gopher.r-36.net 70 i+#define TRUERED(x) (((x) & 0xff0000) >> 8) Err gopher.r-36.net 70 i+#define TRUEGREEN(x) (((x) & 0xff00)) Err gopher.r-36.net 70 i+#define TRUEBLUE(x) (((x) & 0xff) << 8) Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i Err gopher.r-36.net 70 i enum glyph_attribute { Err gopher.r-36.net 70 .