From 5876c20dbac37f6732107d3f876edf99210c86ee Mon Sep 17 00:00:00 2001 From: ratmice Date: Mon, 29 Nov 2004 00:19:46 +0000 Subject: [PATCH] 2004-11-28 Matt Rice * Source/x11/XGGLFormat.m (-initWithAttributes:,append,append1): Add missing curly brackets, fix append and append1 macros so they can safely be used without curly brackets. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20392 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/x11/XGGLFormat.m | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 239a055..34eb4d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-28 Matt Rice + + * Source/x11/XGGLFormat.m (-initWithAttributes:,append,append1): Add + missing curly brackets, fix append and append1 macros so they can safely + be used without curly brackets. + 2004-11-28 Richard Frith-Macdonald * Tools/gpbs.m: When run as daemon, re-execute with --no-fork flag diff --git a/Source/x11/XGGLFormat.m b/Source/x11/XGGLFormat.m index 45d9fd0..f8b3632 100644 --- a/Source/x11/XGGLFormat.m +++ b/Source/x11/XGGLFormat.m @@ -69,12 +69,14 @@ NSMutableData *data = [NSMutableData data]; MAKE_DISPLAY(dpy); -#define append(a, b) v1 = a;v2 = b;[data appendBytes: &v1 length: sizeof(v1)];\ - [data appendBytes: &v2 length: sizeof(v2)] -#define append1(a) v1 = a;[data appendBytes: &v1 length: sizeof(v1)] +#define append(a, b) do {v1 = a;v2 = b;[data appendBytes: &v1 length: sizeof(v1)];\ + [data appendBytes: &v2 length: sizeof(v2)];} while (0) +#define append1(a) do {v1 = a;[data appendBytes: &v1 length: sizeof(v1)];} while (0) if (GSglxMinorVersion (dpy) < 3) - append1 (GLX_RGBA); + { + append1 (GLX_RGBA); + } while(*ptr) {