summaryrefslogtreecommitdiff
path: root/include/GL/xmesa_xf86.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-12-13 21:53:01 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-12-13 21:53:01 +0000
commit32ea1fdc7e08890f282fe7e7f392efc535b80fe5 (patch)
tree4ce3bfbc18cd885772b44c62ebafe7b3a311facd /include/GL/xmesa_xf86.h
parent8d52ee9ae1dcbd69d0c17f060a8ab05806b91ede (diff)
applied Daryll's patches
Diffstat (limited to 'include/GL/xmesa_xf86.h')
-rw-r--r--include/GL/xmesa_xf86.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/include/GL/xmesa_xf86.h b/include/GL/xmesa_xf86.h
index 5c1af7a641..0b28aa48e2 100644
--- a/include/GL/xmesa_xf86.h
+++ b/include/GL/xmesa_xf86.h
@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_xf86.h,v 1.1 1999/08/19 00:55:40 jtg Exp $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/xmesa_xf86.h,v 1.1.1.1.2.1 1999/12/13 21:54:19 brianp Exp $
*/
#ifndef _XMESA_XF86_H_
@@ -52,29 +52,29 @@ typedef DDXPointRec XMesaPoint;
typedef xColorItem XMesaColor;
#define XMesaSetGeneric(__d,__gc,__val,__mask) \
-{ \
+do { \
CARD32 __v[1]; \
(void) __d; \
__v[0] = __val; \
dixChangeGC(NullClient, __gc, __mask, __v, NULL); \
-}
+} while (0)
#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \
-{ \
+do { \
ChangeGCVal __v[1]; \
(void) __d; \
__v[0].ptr = __pval; \
dixChangeGC(NullClient, __gc, __mask, NULL, __v); \
-}
+} while (0)
#define XMesaSetDashes(__d,__gc,__do,__dl,__n) \
-{ \
+do { \
(void) __d; \
SetDashes(__gc, __do, __n, (unsigned char *)__dl); \
-}
+} while (0)
#define XMesaSetLineAttributes(__d,__gc,__lw,__ls,__cs,__js) \
-{ \
+do { \
CARD32 __v[4]; \
(void) __d; \
__v[0] = __lw; \
@@ -84,7 +84,7 @@ typedef xColorItem XMesaColor;
dixChangeGC(NullClient, __gc, \
GCLineWidth|GCLineStyle|GCCapStyle|GCJoinStyle, \
__v, NULL); \
-}
+} while (0)
#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground)
#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground)
@@ -96,24 +96,24 @@ typedef xColorItem XMesaColor;
#define XMesaSetStipple(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCStipple)
#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \
-{ \
+do { \
XMesaPoint __p[1]; \
(void) __d; \
__p[0].x = __x; \
__p[0].y = __y; \
ValidateGC(__b, __gc); \
(*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \
-}
+} while (0)
#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \
-{ \
+do { \
(void) __d; \
ValidateGC(__b, __gc); \
(*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
-}
+} while (0)
#define XMesaDrawLine(__d,__b,__gc,__x0,__y0,__x1,__y1) \
-{ \
+do { \
XMesaPoint __p[2]; \
(void) __d; \
ValidateGC(__b, __gc); \
@@ -122,10 +122,10 @@ typedef xColorItem XMesaColor;
__p[1].x = __x1; \
__p[1].y = __y1; \
(*__gc->ops->Polylines)(__b, __gc, CoordModeOrigin, 2, __p); \
-}
+} while (0)
#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
-{ \
+do { \
xRectangle __r[1]; \
(void) __d; \
ValidateGC(__b, __gc); \
@@ -134,10 +134,10 @@ typedef xColorItem XMesaColor;
__r[0].width = __w; \
__r[0].height = __h; \
(*__gc->ops->PolyFillRect)(__b, __gc, 1, __r); \
-}
+} while (0)
#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
-{ \
+do { \
/* Assumes: Images are always in ZPixmap format */ \
(void) __d; \
if (__sx || __sy) /* The non-trivial case */ \
@@ -146,22 +146,22 @@ typedef xColorItem XMesaColor;
(*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
__x, __y, __w, __h, 0, ZPixmap, \
((XMesaImage *)(__i))->data); \
-}
+} while (0)
#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \
-{ \
+do { \
(void) __d; \
ValidateGC(__db, __gc); \
(*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \
__sx, __sy, __w, __h, __x, __y); \
-}
+} while (0)
#define XMesaFillPolygon(__d,__b,__gc,__p,__n,__s,__m) \
-{ \
+do { \
(void) __d; \
ValidateGC(__b, __gc); \
(*__gc->ops->FillPolygon)(__b, __gc, __s, __m, __n, __p); \
-}
+} while (0)
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
@@ -170,10 +170,10 @@ typedef xColorItem XMesaColor;
(*__d->DestroyPixmap)(__b)
#define XMesaFreeGC(__d,__gc) \
-{ \
+do { \
(void) __d; \
FreeScratchGC(__gc); \
-}
+} while (0)
#define GET_COLORMAP_SIZE(__v) __v->visinfo->ColormapEntries
#define GET_REDMASK(__v) __v->visinfo->redMask