summaryrefslogtreecommitdiffstats
path: root/RichString.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-27 21:26:33 +0100
committercgzones <cgzones@googlemail.com>2020-10-28 19:57:10 +0100
commit8c1f5c5a6f341fc654808887fcbeec0ba2994f95 (patch)
tree1c32a6015a4dea748df8ed1b8f6b67fdb734f03f /RichString.h
parent61bae4c9d27f23b3ebda461a922ae76e63e0a9c2 (diff)
Enclose macro arguments in parentheses
Diffstat (limited to 'RichString.h')
-rw-r--r--RichString.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/RichString.h b/RichString.h
index 2e35b827..1320c938 100644
--- a/RichString.h
+++ b/RichString.h
@@ -15,13 +15,13 @@ in the source distribution for its full text.
#define RichString_size(this) ((this)->chlen)
#define RichString_sizeVal(this) ((this).chlen)
-#define RichString_begin(this) RichString (this); memset(&this, 0, sizeof(RichString)); (this).chptr = (this).chstr;
-#define RichString_beginAllocated(this) memset(&this, 0, sizeof(RichString)); (this).chptr = (this).chstr;
+#define RichString_begin(this) RichString (this); memset(&(this), 0, sizeof(RichString)); (this).chptr = (this).chstr;
+#define RichString_beginAllocated(this) memset(&(this), 0, sizeof(RichString)); (this).chptr = (this).chstr;
#define RichString_end(this) RichString_prune(&(this));
#ifdef HAVE_LIBNCURSESW
#define RichString_printVal(this, y, x) mvadd_wchstr(y, x, (this).chptr)
-#define RichString_printoffnVal(this, y, x, off, n) mvadd_wchnstr(y, x, (this).chptr + off, n)
+#define RichString_printoffnVal(this, y, x, off, n) mvadd_wchnstr(y, x, (this).chptr + (off), n)
#define RichString_getCharVal(this, i) ((this).chptr[i].chars[0] & 255)
#define RichString_setChar(this, at, ch) do{ (this)->chptr[(at)] = (CharType) { .chars = { ch, 0 } }; } while(0)
#define CharType cchar_t

© 2014-2024 Faster IT GmbH | imprint | privacy policy