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) {