s/0/NULL/ (Jeff Muizelaar)

This commit is contained in:
Brian Paul 2005-02-16 15:02:25 +00:00
parent 5c2f3d5d3a
commit 2c28dd892c
11 changed files with 25 additions and 25 deletions

View File

@ -172,7 +172,7 @@ static const struct tnl_pipeline_stage *radeon_pipeline[] = {
&_radeon_render_stage,
&_tnl_render_stage, /* FALLBACK: */
0,
NULL,
};
@ -526,7 +526,7 @@ void radeonDestroyContext( __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 ) {
@ -612,7 +612,7 @@ radeonMakeCurrent( __DRIcontextPrivate *driContextPriv,
} else {
if (RADEON_DEBUG & DEBUG_DRI)
fprintf(stderr, "%s ctx is null\n", __FUNCTION__);
_mesa_make_current( 0, 0 );
_mesa_make_current( NULL, NULL );
}
if (RADEON_DEBUG & DEBUG_DRI)

View File

@ -301,7 +301,7 @@ void radeonFlushElts( radeonContextPtr rmesa )
fprintf(stderr, "%s\n", __FUNCTION__);
assert( rmesa->dma.flush == radeonFlushElts );
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
/* Cope with odd number of elts:
*/
@ -734,7 +734,7 @@ void radeonReleaseDmaRegion( radeonContextPtr rmesa,
rmesa->dma.nr_released_bufs++;
}
region->buf = 0;
region->buf = NULL;
region->start = 0;
}

View File

@ -389,7 +389,7 @@ static struct reg *lookup_reg( struct reg *tab, int reg )
}
fprintf(stderr, "*** unknown reg 0x%x\n", reg);
return 0;
return NULL;
}

View File

@ -1808,7 +1808,7 @@ static void radeonEnable( GLcontext *ctx, GLenum cap, GLboolean state )
RADEON_STATECHANGE(rmesa, ctx );
if ( state ) {
rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= RADEON_FOG_ENABLE;
radeonFogfv( ctx, GL_FOG_MODE, 0 );
radeonFogfv( ctx, GL_FOG_MODE, NULL );
} else {
rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~RADEON_FOG_ENABLE;
RADEON_STATECHANGE(rmesa, tcl);

View File

@ -529,8 +529,8 @@ void radeonInitState( radeonContextPtr 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,
@ -551,12 +551,12 @@ void radeonInitState( radeonContextPtr 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;

View File

@ -365,7 +365,7 @@ static void flush_last_swtcl_prim( radeonContextPtr rmesa )
if (RADEON_DEBUG & DEBUG_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
if (rmesa->dma.current.buf) {
struct radeon_dma_region *current = &rmesa->dma.current;
@ -669,7 +669,7 @@ const struct tnl_pipeline_stage _radeon_render_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 */
radeon_check_render, /* check - initially set to alloc data */
radeon_run_render /* run */
@ -782,7 +782,7 @@ static void free_texrect_data( struct tnl_pipeline_stage *stage )
if (store->texcoord[i].data)
_mesa_vector4f_free( &store->texcoord[i] );
FREE( store );
stage->privatePtr = 0;
stage->privatePtr = NULL;
}
}
@ -1221,7 +1221,7 @@ void radeonDestroySwtcl( GLcontext *ctx )
if (rmesa->swtcl.verts) {
ALIGN_FREE(rmesa->swtcl.verts);
rmesa->swtcl.verts = 0;
rmesa->swtcl.verts = NULL;
}
}

View File

@ -405,7 +405,7 @@ const struct tnl_pipeline_stage _radeon_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 */
radeon_init_tcl_render, /* check - initially set to alloc data */
radeon_run_tcl_render /* run */
@ -472,7 +472,7 @@ static void transition_to_hwtnl( GLcontext *ctx )
if ( rmesa->dma.flush )
rmesa->dma.flush( rmesa );
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
rmesa->swtcl.vertex_format = 0;
if (rmesa->swtcl.indexed_verts.buf)

View File

@ -178,7 +178,7 @@ static void flush_prims( radeonContextPtr rmesa )
rmesa->tcl.vertex_format = rmesa->vb.vertex_format;
rmesa->tcl.aos_components[0] = &tmp;
rmesa->tcl.nr_aos_components = 1;
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
/* Optimize the primitive list:
*/

View File

@ -602,7 +602,7 @@ static struct dynfn *lookup( struct dynfn *l, int key )
return f;
}
return 0;
return NULL;
}
/* Can't use the loopback template for this:
@ -876,7 +876,7 @@ void radeonVtxfmtInitChoosers( GLvertexformat *vfmt )
static struct dynfn *codegen_noop( GLcontext *ctx, int key )
{
(void) ctx; (void) key;
return 0;
return NULL;
}
void radeonInitCodegen( struct dfn_generators *gen, GLboolean useCodegen )

View File

@ -131,7 +131,7 @@ static struct dynfn *radeon_makeSSENormal3f( GLcontext *ctx, int key )
static struct dynfn *radeon_makeSSEColor3fv( GLcontext *ctx, int key )
{
if (key & (RADEON_CP_VC_FRMT_PKCOLOR|RADEON_CP_VC_FRMT_FPALPHA))
return 0;
return NULL;
else
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
@ -144,7 +144,7 @@ static struct dynfn *radeon_makeSSEColor3fv( GLcontext *ctx, int key )
static struct dynfn *radeon_makeSSEColor3f( GLcontext *ctx, int key )
{
if (key & (RADEON_CP_VC_FRMT_PKCOLOR|RADEON_CP_VC_FRMT_FPALPHA))
return 0;
return NULL;
else
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);

View File

@ -303,14 +303,14 @@ struct dynfn *radeon_makeX86Color4ub( GLcontext *ctx, int key )
return dfn;
}
else
return 0;
return NULL;
}
struct dynfn *radeon_makeX86Color3fv( GLcontext *ctx, int key )
{
if (key & (RADEON_CP_VC_FRMT_PKCOLOR|RADEON_CP_VC_FRMT_FPALPHA))
return 0;
return NULL;
else
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
@ -323,7 +323,7 @@ struct dynfn *radeon_makeX86Color3fv( GLcontext *ctx, int key )
struct dynfn *radeon_makeX86Color3f( GLcontext *ctx, int key )
{
if (key & (RADEON_CP_VC_FRMT_PKCOLOR|RADEON_CP_VC_FRMT_FPALPHA))
return 0;
return NULL;
else
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);