From 8c1f5c5a6f341fc654808887fcbeec0ba2994f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 27 Oct 2020 21:26:33 +0100 Subject: Enclose macro arguments in parentheses --- RichString.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'RichString.h') 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 -- cgit v1.2.3