mesa: replace old MEMSET macro with memset
authorBrian Paul <brianp@vmware.com>
Fri, 19 Feb 2010 15:12:31 +0000 (08:12 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 19 Feb 2010 15:12:31 +0000 (08:12 -0700)
src/gallium/state_trackers/glx/xlib/glx_usefont.c
src/mesa/drivers/dri/tdfx/tdfx_span.c
src/mesa/drivers/x11/xfonts.c
src/mesa/drivers/x11/xm_dd.c
src/mesa/main/eval.c
src/mesa/main/imports.h
src/mesa/main/polygon.c
src/mesa/math/m_translate.c

index e502198b2046f0ae7c8fec9c63b2723034a8f113..8903b0e6cbd44e121702a7877d93bf661cc4bfde 100644 (file)
@@ -343,7 +343,7 @@ glXUseXFont(Font font, int first, int count, int listbase)
       glNewList(list, GL_COMPILE);
       if (valid && (bm_width > 0) && (bm_height > 0)) {
 
-        MEMSET(bm, '\0', bm_width * bm_height);
+        memset(bm, '\0', bm_width * bm_height);
         fill_bitmap(dpy, win, gc, bm_width, bm_height, x, y, c, bm);
 
         glBitmap(width, height, x0, y0, dx, dy, bm);
index a17bcd952a11cdf80c9d5899249c090478653fd6..3879d506ee1dd7806dcc3123b7dc7029a5621007 100644 (file)
@@ -264,7 +264,7 @@ generate_vismask(const tdfxContextPtr fxMesa, GLint x, GLint y, GLint n,
    GLint i, j;
 
    /* Ensure we clear the visual mask */
-   MEMSET(vismask, 0, n);
+   memset(vismask, 0, n);
 
    /* turn on flags for all visible pixels */
    for (i = 0; i < fxMesa->numClipRects; i++) {
@@ -273,14 +273,14 @@ generate_vismask(const tdfxContextPtr fxMesa, GLint x, GLint y, GLint n,
       if (y >= rect->y1 && y < rect->y2) {
         if (x >= rect->x1 && x + n <= rect->x2) {
            /* common case, whole span inside cliprect */
-           MEMSET(vismask, 1, n);
+           memset(vismask, 1, n);
            return;
         }
         if (x < rect->x2 && x + n >= rect->x1) {
            /* some of the span is inside the rect */
            GLint start, end;
            if (!initialized) {
-              MEMSET(vismask, 0, n);
+              memset(vismask, 0, n);
               initialized = GL_TRUE;
            }
            if (x < rect->x1)
index f732c945865671c3295f2d1288d17089c3e8a3c7..91f819b8df25a1e2d14c9a6ca3a0ba3828ef3125 100644 (file)
@@ -345,7 +345,7 @@ Fake_glXUseXFont(Font font, int first, int count, int listbase)
       glNewList(list, GL_COMPILE);
       if (valid && (bm_width > 0) && (bm_height > 0)) {
 
-        MEMSET(bm, '\0', bm_width * bm_height);
+        memset(bm, '\0', bm_width * bm_height);
         fill_bitmap(dpy, win, gc, bm_width, bm_height, x, y, c, bm);
 
         glBitmap(width, height, x0, y0, dx, dy, bm);
index d70236c2a02c4f81058e96292ab86111b6b5fe0d..d304192f4cee2f851ce63d1d8fbb282b9fe0084b 100644 (file)
@@ -232,7 +232,7 @@ clear_8bit_ximage( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
    GLint i;
    for (i = 0; i < height; i++) {
       GLubyte *ptr = PIXEL_ADDR1(xrb, x, y + i);
-      MEMSET( ptr, xmesa->clearpixel, width );
+      memset( ptr, xmesa->clearpixel, width );
    }
 }
 
@@ -294,7 +294,7 @@ clear_24bit_ximage(GLcontext *ctx, struct xmesa_renderbuffer *xrb,
       GLint j;
       for (j = 0; j < height; j++) {
          bgr_t *ptr3 = PIXEL_ADDR3(xrb, x, y + j);
-         MEMSET(ptr3, r, 3 * width);
+         memset(ptr3, r, 3 * width);
       }
    }
    else {
@@ -524,7 +524,7 @@ xmesa_DrawPixels_8R8G8B( GLcontext *ctx,
           * been in the OpenGL bottom-to-top orientation.  X is top-to-bottom
           * so we have to carefully compute the Y coordinates/addresses here.
           */
-         MEMSET(&ximage, 0, sizeof(XMesaImage));
+         memset(&ximage, 0, sizeof(XMesaImage));
          ximage.width = width;
          ximage.height = height;
          ximage.format = ZPixmap;
@@ -658,7 +658,7 @@ xmesa_DrawPixels_5R6G5B( GLcontext *ctx,
           * been in the OpenGL bottom-to-top orientation.  X is top-to-bottom
           * so we have to carefully compute the Y coordinates/addresses here.
           */
-         MEMSET(&ximage, 0, sizeof(XMesaImage));
+         memset(&ximage, 0, sizeof(XMesaImage));
          ximage.width = width;
          ximage.height = height;
          ximage.format = ZPixmap;
@@ -829,7 +829,7 @@ clear_color_HPCR_ximage( GLcontext *ctx, const GLfloat color[4] )
 
    if (color[0] == 0.0 && color[1] == 0.0 && color[2] == 0.0) {
       /* black is black */
-      MEMSET( xmesa->xm_visual->hpcr_clear_ximage_pattern, 0x0 ,
+      memset( xmesa->xm_visual->hpcr_clear_ximage_pattern, 0x0 ,
               sizeof(xmesa->xm_visual->hpcr_clear_ximage_pattern));
    }
    else {
index 95d6e2318793c466344775dfad787f23c0901f24..58eb59b13c07b4421c5f7d12c45a9e09c671127b 100644 (file)
@@ -894,7 +894,7 @@ void _mesa_init_eval( GLcontext *ctx )
    ctx->Eval.Map1TextureCoord4 = GL_FALSE;
    ctx->Eval.Map1Vertex3 = GL_FALSE;
    ctx->Eval.Map1Vertex4 = GL_FALSE;
-   MEMSET(ctx->Eval.Map1Attrib, 0, sizeof(ctx->Eval.Map1Attrib));
+   memset(ctx->Eval.Map1Attrib, 0, sizeof(ctx->Eval.Map1Attrib));
    ctx->Eval.Map2Color4 = GL_FALSE;
    ctx->Eval.Map2Index = GL_FALSE;
    ctx->Eval.Map2Normal = GL_FALSE;
@@ -904,7 +904,7 @@ void _mesa_init_eval( GLcontext *ctx )
    ctx->Eval.Map2TextureCoord4 = GL_FALSE;
    ctx->Eval.Map2Vertex3 = GL_FALSE;
    ctx->Eval.Map2Vertex4 = GL_FALSE;
-   MEMSET(ctx->Eval.Map2Attrib, 0, sizeof(ctx->Eval.Map2Attrib));
+   memset(ctx->Eval.Map2Attrib, 0, sizeof(ctx->Eval.Map2Attrib));
    ctx->Eval.AutoNormal = GL_FALSE;
    ctx->Eval.MapGrid1un = 1;
    ctx->Eval.MapGrid1u1 = 0.0;
index c4e28df0513c4a56ad5bbf47e7e22f0a8e88a815..048ae912c9db42d4a3652c41d25e7b3be47f854e 100644 (file)
@@ -71,9 +71,6 @@ extern "C" {
 /** Free aligned memory */
 #define ALIGN_FREE(PTR)            _mesa_align_free(PTR)
 
-/** Set \p N bytes in \p DST to \p VAL */
-#define MEMSET( DST, VAL, N )      memset(DST, VAL, N)
-
 /*@}*/
 
 
index dcde6758c3f7311bb34e0b4f9c039824859f61ec..30e4a606bb79ea78819b02f50ea3b860f2f788fb 100644 (file)
@@ -315,7 +315,7 @@ void _mesa_init_polygon( GLcontext * ctx )
 
 
    /* Polygon Stipple group */
-   MEMSET( ctx->PolygonStipple, 0xff, 32*sizeof(GLuint) );
+   memset( ctx->PolygonStipple, 0xff, 32*sizeof(GLuint) );
 }
 
 /*@}*/
index 4a20f45ee434f2f96f2f7a77cc114771be4d2fc8..b12b07957cb6730ad5140e4151f7a822b0205db9 100644 (file)
@@ -556,13 +556,13 @@ static void trans_4_GLubyte_4ub_raw(GLubyte (*t)[4],
 
 static void init_translate_raw(void)
 {
-   MEMSET( TAB(_1ui), 0, sizeof(TAB(_1ui)) );
-   MEMSET( TAB(_1ub), 0, sizeof(TAB(_1ub)) );
-   MEMSET( TAB(_3fn),  0, sizeof(TAB(_3fn)) );
-   MEMSET( TAB(_4ub), 0, sizeof(TAB(_4ub)) );
-   MEMSET( TAB(_4us), 0, sizeof(TAB(_4us)) );
-   MEMSET( TAB(_4f),  0, sizeof(TAB(_4f)) );
-   MEMSET( TAB(_4fn),  0, sizeof(TAB(_4fn)) );
+   memset( TAB(_1ui), 0, sizeof(TAB(_1ui)) );
+   memset( TAB(_1ub), 0, sizeof(TAB(_1ub)) );
+   memset( TAB(_3fn),  0, sizeof(TAB(_3fn)) );
+   memset( TAB(_4ub), 0, sizeof(TAB(_4ub)) );
+   memset( TAB(_4us), 0, sizeof(TAB(_4us)) );
+   memset( TAB(_4f),  0, sizeof(TAB(_4f)) );
+   memset( TAB(_4fn),  0, sizeof(TAB(_4fn)) );
 
    init_trans_4_GLbyte_raw();
    init_trans_3_GLbyte_raw();