s/0/NULL/ (Jeff Muizelaar)
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 17 Feb 2005 14:12:50 +0000 (14:12 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 17 Feb 2005 14:12:50 +0000 (14:12 +0000)
12 files changed:
src/mesa/drivers/dri/r200/r200_cmdbuf.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_ioctl.c
src/mesa/drivers/dri/r200/r200_sanity.c
src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r200/r200_state_init.c
src/mesa/drivers/dri/r200/r200_swtcl.c
src/mesa/drivers/dri/r200/r200_tcl.c
src/mesa/drivers/dri/r200/r200_vtxfmt.c
src/mesa/drivers/dri/r200/r200_vtxfmt_c.c
src/mesa/drivers/dri/r200/r200_vtxfmt_sse.c
src/mesa/drivers/dri/r200/r200_vtxfmt_x86.c

index 9226ca917e79178c3c9bb5090b18c7a17c8a71f3..67eb1175543371d4cfb9777262626d8f264b5155 100644 (file)
@@ -231,7 +231,7 @@ void r200FlushElts( r200ContextPtr rmesa )
       fprintf(stderr, "%s\n", __FUNCTION__);
 
    assert( rmesa->dma.flush == r200FlushElts );
-   rmesa->dma.flush = 0;
+   rmesa->dma.flush = NULL;
 
    /* Cope with odd number of elts:
     */
index baaca087555238d6f732862d82e9a04fad2e70f9..25f9d2cb96b4ef65af6fa73722922fba603ffa04 100644 (file)
@@ -182,7 +182,7 @@ static const struct tnl_pipeline_stage *r200_pipeline[] = {
     */
 /*    &_r200_render_stage,  */ /* FIXME: bugs with ut2003 */
    &_tnl_render_stage,         /* FALLBACK:  */
-   0,
+   NULL,
 };
 
 
@@ -561,7 +561,7 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv )
 
       if (rmesa->state.scissor.pClipRects) {
         FREE(rmesa->state.scissor.pClipRects);
-        rmesa->state.scissor.pClipRects = 0;
+        rmesa->state.scissor.pClipRects = NULL;
       }
 
       if ( release_texture_heaps ) {
@@ -648,7 +648,7 @@ r200MakeCurrent( __DRIcontextPrivate *driContextPriv,
    } else {
       if (R200_DEBUG & DEBUG_DRI)
         fprintf(stderr, "%s ctx is null\n", __FUNCTION__);
-      _mesa_make_current( 0, 0 );
+      _mesa_make_current( NULL, NULL );
    }
 
    if (R200_DEBUG & DEBUG_DRI)
index a7d840f0f54c5f7c11978aefdbdb22904078c70a..ff2acdb7b196a2f0a291893cd4ea367195ec7336 100644 (file)
@@ -288,7 +288,7 @@ void r200ReleaseDmaRegion( r200ContextPtr rmesa,
       rmesa->dma.nr_released_bufs++;
    }
 
-   region->buf = 0;
+   region->buf = NULL;
    region->start = 0;
 }
 
index c5c56b8811b937bef1072d37e3ba2b8f3681d252..a950b364141b283fcfeb00418758f097214fe5e3 100644 (file)
@@ -623,7 +623,7 @@ static struct reg *lookup_reg( struct reg *tab, int reg )
    }
 
    fprintf(stderr, "*** unknown reg 0x%x\n", reg);
-   return 0;
+   return NULL;
 }
 
 
@@ -931,7 +931,7 @@ static char *primname[0x10] = {
    "TRIANGLE_FAN",
    "TRIANGLE_STRIP",
    "RECT_LIST",
-   0,
+   NULL,
    "3VRT_POINTS",
    "3VRT_LINES",
    "POINT_SPRITES",
index 48758c545685d04f038b4e4644553f1408fa8288..b0b0c889007c504b94a288991dd3d47c3ad67f7d 100644 (file)
@@ -1918,7 +1918,7 @@ static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
       R200_STATECHANGE(rmesa, ctx );
       if ( state ) {
         rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_FOG_ENABLE;
-        r200Fogfv( ctx, GL_FOG_MODE, 0 );
+        r200Fogfv( ctx, GL_FOG_MODE, NULL );
       } else {
         rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~R200_FOG_ENABLE;
         R200_STATECHANGE(rmesa, tcl);
index cdb1f4d0a05fb0f410dc4aa3b97595b4c45c462d..6115b57cb582b00eacfa24d0fbbee9edd154d5e1 100644 (file)
@@ -742,8 +742,8 @@ void r200InitState( r200ContextPtr rmesa )
       ctx->Driver.Lightfv( ctx, p, GL_AMBIENT, l->Ambient );
       ctx->Driver.Lightfv( ctx, p, GL_DIFFUSE, l->Diffuse );
       ctx->Driver.Lightfv( ctx, p, GL_SPECULAR, l->Specular );
-      ctx->Driver.Lightfv( ctx, p, GL_POSITION, 0 );
-      ctx->Driver.Lightfv( ctx, p, GL_SPOT_DIRECTION, 0 );
+      ctx->Driver.Lightfv( ctx, p, GL_POSITION, NULL );
+      ctx->Driver.Lightfv( ctx, p, GL_SPOT_DIRECTION, NULL );
       ctx->Driver.Lightfv( ctx, p, GL_SPOT_EXPONENT, &l->SpotExponent );
       ctx->Driver.Lightfv( ctx, p, GL_SPOT_CUTOFF, &l->SpotCutoff );
       ctx->Driver.Lightfv( ctx, p, GL_CONSTANT_ATTENUATION,
@@ -764,12 +764,12 @@ void r200InitState( r200ContextPtr rmesa )
       ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, NULL );
    }
 
-   ctx->Driver.Fogfv( ctx, GL_FOG_MODE, 0 );
+   ctx->Driver.Fogfv( ctx, GL_FOG_MODE, NULL );
    ctx->Driver.Fogfv( ctx, GL_FOG_DENSITY, &ctx->Fog.Density );
    ctx->Driver.Fogfv( ctx, GL_FOG_START, &ctx->Fog.Start );
    ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End );
    ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color );
-   ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, 0 );
+   ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, NULL );
    
    rmesa->hw.grd.cmd[GRD_VERT_GUARD_CLIP_ADJ] = IEEE_ONE;
    rmesa->hw.grd.cmd[GRD_VERT_GUARD_DISCARD_ADJ] = IEEE_ONE;
index 141bcde16179b907cc0b954016736f09a4dd6efd..1332ea3d7f859329be429ef90d53267110f26179 100644 (file)
@@ -266,7 +266,7 @@ static void flush_last_swtcl_prim( r200ContextPtr rmesa  )
    if (R200_DEBUG & DEBUG_IOCTL)
       fprintf(stderr, "%s\n", __FUNCTION__);
 
-   rmesa->dma.flush = 0;
+   rmesa->dma.flush = NULL;
 
    if (rmesa->dma.current.buf) {
       struct r200_dma_region *current = &rmesa->dma.current;
index 0e7c71054e7fe3ba0b54f846d622b2707439e842..ec1c43ce50736b8dbdae975b2e8a2fa759ac50bc 100644 (file)
@@ -484,7 +484,7 @@ const struct tnl_pipeline_stage _r200_tcl_stage =
    0,                          /* re-run (always runs) */
    GL_TRUE,                    /* active */
    0, 0,                       /* inputs (set in check_render), outputs */
-   0, 0,                       /* changed_inputs, private */
+   0, NULL,                    /* changed_inputs, private */
    dtr,                                /* destructor */
    r200_init_tcl_render,       /* check - initially set to alloc data */
    r200_run_tcl_render /* run */
@@ -540,7 +540,7 @@ static void transition_to_hwtnl( GLcontext *ctx )
    if ( rmesa->dma.flush )                     
       rmesa->dma.flush( rmesa );       
 
-   rmesa->dma.flush = 0;
+   rmesa->dma.flush = NULL;
    
    if (rmesa->swtcl.indexed_verts.buf) 
       r200ReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, 
index fde214102627cb6bd77e34c4b29b98de6112cb15..32d1ac521977c1d0fcd4acb5c401695e5eb0ba7f 100644 (file)
@@ -214,7 +214,7 @@ static void flush_prims( r200ContextPtr rmesa )
    rmesa->tcl.vertex_format = rmesa->vb.vtxfmt_0;
    rmesa->tcl.aos_components[0] = &tmp;
    rmesa->tcl.nr_aos_components = 1;
-   rmesa->dma.flush = 0;
+   rmesa->dma.flush = NULL;
 
    /* Optimize the primitive list:
     */
index 670a2fb05a5077149ef79133437e9d6810f79b88..7a789b21e292694d2df0438fd5fa503f882449b8 100644 (file)
@@ -659,7 +659,7 @@ static struct dynfn *lookup( struct dynfn *l, const int *key )
         return f;
    }
 
-   return 0;
+   return NULL;
 }
 
 /* Can't use the loopback template for this:
@@ -947,7 +947,7 @@ void r200VtxfmtInitChoosers( GLvertexformat *vfmt )
 static struct dynfn *codegen_noop( GLcontext *ctx, const int *key )
 {
    (void) ctx; (void) key;
-   return 0;
+   return NULL;
 }
 
 void r200InitCodegen( struct dfn_generators *gen, GLboolean useCodegen )
index 45950159f2d702f0aee5865542cb68a3d7161341..5901730494aea039259b26de5e7a935489c23189 100644 (file)
@@ -131,7 +131,7 @@ static struct dynfn *r200_makeSSENormal3f( GLcontext *ctx, const int * key )
 static struct dynfn *r200_makeSSEColor3fv( GLcontext *ctx, const int * key )
 {
    if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB) 
-      return 0;
+      return NULL;
    else
    {
       r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -144,7 +144,7 @@ static struct dynfn *r200_makeSSEColor3fv( GLcontext *ctx, const int * key )
 static struct dynfn *r200_makeSSEColor3f( GLcontext *ctx, const int * key )
 {
    if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB) 
-      return 0;
+      return NULL;
    else
    {
       r200ContextPtr rmesa = R200_CONTEXT(ctx);
index 333317818347272993e7f9f015b3116210cf69eb..b78a55c31f63399bb50eabb5486af521e36dbae7 100644 (file)
@@ -305,14 +305,14 @@ struct dynfn *r200_makeX86Color4ub( GLcontext *ctx, const int *key )
       return dfn;
    }
    else
-      return 0;
+      return NULL;
 }
 
 
 struct dynfn *r200_makeX86Color3fv( GLcontext *ctx, const int *key )
 {
    if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB) 
-      return 0;
+      return NULL;
    else
    {
       r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -325,7 +325,7 @@ struct dynfn *r200_makeX86Color3fv( GLcontext *ctx, const int *key )
 struct dynfn *r200_makeX86Color3f( GLcontext *ctx, const int *key )
 {
    if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB) 
-      return 0;
+      return NULL;
    else
    {
       r200ContextPtr rmesa = R200_CONTEXT(ctx);