diff options
author | Keith Whitwell <[email protected]> | 2005-02-10 10:57:22 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2005-02-10 10:57:22 +0000 |
commit | b97e478fe90f612041e27852eb8c95f45467bde8 (patch) | |
tree | 944adbe75c4027772cc1208c4ba35c60d1480148 /src | |
parent | a9a4c5489ec12f6aa768d44578c332f654c536ea (diff) |
mesa-tnl-0-to-NULL.patch from Jeff Muizelaar
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/tnl/t_array_api.c | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_array_import.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_pipeline.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_save_api.c | 12 | ||||
-rw-r--r-- | src/mesa/tnl/t_save_loopback.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_save_playback.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_fog.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_light.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_normals.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_points.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_program.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texgen.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texmat.c | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_vertex.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex.c | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex_c.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vertex_codegen.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_api.c | 14 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_eval.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_exec.c | 8 |
21 files changed, 59 insertions, 59 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index c3e63582214..3aa91f9d906 100644 --- a/src/mesa/tnl/t_array_api.c +++ b/src/mesa/tnl/t_array_api.c @@ -422,13 +422,13 @@ void _tnl_array_init( GLcontext *ctx ) /* Setup vector pointers that will be used to bind arrays to VB's. */ - _mesa_vector4f_init( &tmp->Obj, 0, 0 ); - _mesa_vector4f_init( &tmp->Normal, 0, 0 ); - _mesa_vector4f_init( &tmp->FogCoord, 0, 0 ); - _mesa_vector4f_init( &tmp->Index, 0, 0 ); + _mesa_vector4f_init( &tmp->Obj, 0, NULL); + _mesa_vector4f_init( &tmp->Normal, 0, NULL); + _mesa_vector4f_init( &tmp->FogCoord, 0, NULL); + _mesa_vector4f_init( &tmp->Index, 0, NULL); for (i = 0; i < ctx->Const.MaxTextureUnits; i++) - _mesa_vector4f_init( &tmp->TexCoord[i], 0, 0); + _mesa_vector4f_init( &tmp->TexCoord[i], 0, NULL); } diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c index 93d2640b8e1..00a933ede51 100644 --- a/src/mesa/tnl/t_array_import.c +++ b/src/mesa/tnl/t_array_import.c @@ -347,11 +347,11 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLint end) VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS]; VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL]; VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0]; - VB->ColorPtr[1] = 0; + VB->ColorPtr[1] = NULL; VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_INDEX]; - VB->IndexPtr[1] = 0; + VB->IndexPtr[1] = NULL; VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1]; - VB->SecondaryColorPtr[1] = 0; + VB->SecondaryColorPtr[1] = NULL; VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG]; for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 7e4f3fd2399..531e639e845 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -141,7 +141,7 @@ _tnl_DestroyContext( GLcontext *ctx ) _ae_destroy_context( ctx ); FREE(tnl); - ctx->swtnl_context = 0; + ctx->swtnl_context = NULL; } diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index e90e21ba09b..1e9b686789b 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -212,5 +212,5 @@ const struct tnl_pipeline_stage *_tnl_default_pipeline[] = { &_tnl_vertex_program_stage, #endif &_tnl_render_stage, - 0 + NULL }; diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c index 6e737f400f4..684263660a7 100644 --- a/src/mesa/tnl/t_save_api.c +++ b/src/mesa/tnl/t_save_api.c @@ -248,7 +248,7 @@ static void _save_compile_vertex_list( GLcontext *ctx ) node->prim_count = tnl->save.prim_count; node->vertex_store = tnl->save.vertex_store; node->prim_store = tnl->save.prim_store; - node->normal_lengths = 0; + node->normal_lengths = NULL; node->vertex_store->refcount++; node->prim_store->refcount++; @@ -457,7 +457,7 @@ static void _save_upgrade_vertex( GLcontext *ctx, tmp += tnl->save.attrsz[i]; } else - tnl->save.attrptr[i] = 0; /* will not be dereferenced. */ + tnl->save.attrptr[i] = NULL; /* will not be dereferenced. */ } /* Copy from current to repopulate the vertex with correct values. @@ -481,7 +481,7 @@ static void _save_upgrade_vertex( GLcontext *ctx, if (tnl->save.currentsz[attr][0] == 0) { assert(oldsz == 0); tnl->save.dangling_attr_ref = GL_TRUE; - _mesa_debug(0, "_save_upgrade_vertex: dangling reference attr %d\n", + _mesa_debug(NULL, "_save_upgrade_vertex: dangling reference attr %d\n", attr); #if 0 @@ -1616,14 +1616,14 @@ static void _tnl_print_vertex_list( GLcontext *ctx, void *data ) GLuint i; (void) ctx; - _mesa_debug(0, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n", + _mesa_debug(NULL, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n", node->count, node->prim_count, node->vertex_size); for (i = 0 ; i < node->prim_count ; i++) { struct tnl_prim *prim = &node->prim[i]; - _mesa_debug(0, " prim %d: %s %d..%d %s %s\n", + _mesa_debug(NULL, " prim %d: %s %d..%d %s %s\n", i, _mesa_lookup_enum_by_nr(prim->mode & PRIM_MODE_MASK), prim->start, @@ -1669,7 +1669,7 @@ void _tnl_save_init( GLcontext *ctx ) for (i = 0; i < _TNL_ATTRIB_MAX; i++) - _mesa_vector4f_init( &tmp->Attribs[i], 0, 0); + _mesa_vector4f_init( &tmp->Attribs[i], 0, NULL); tnl->save.opcode_vertex_list = _mesa_alloc_opcode( ctx, diff --git a/src/mesa/tnl/t_save_loopback.c b/src/mesa/tnl/t_save_loopback.c index 66def96121b..2dae9c60932 100644 --- a/src/mesa/tnl/t_save_loopback.c +++ b/src/mesa/tnl/t_save_loopback.c @@ -188,7 +188,7 @@ static void mat_attr4fv( GLcontext *ctx, GLint target, const GLfloat *v ) static attr_func mat_attrfunc[4] = { mat_attr1fv, - 0, + NULL, mat_attr3fv, mat_attr4fv }; diff --git a/src/mesa/tnl/t_save_playback.c b/src/mesa/tnl/t_save_playback.c index d5fcbe6c02a..fa094b10a21 100644 --- a/src/mesa/tnl/t_save_playback.c +++ b/src/mesa/tnl/t_save_playback.c @@ -105,11 +105,11 @@ static void _tnl_bind_vertex_list( GLcontext *ctx, VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS]; VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL]; VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0]; - VB->ColorPtr[1] = 0; + VB->ColorPtr[1] = NULL; VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_INDEX]; - VB->IndexPtr[1] = 0; + VB->IndexPtr[1] = NULL; VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1]; - VB->SecondaryColorPtr[1] = 0; + VB->SecondaryColorPtr[1] = NULL; VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG]; for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index 13a2cbb4d10..8eb1f78dc7f 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -238,7 +238,7 @@ alloc_fog_data(GLcontext *ctx, struct tnl_pipeline_stage *stage) return GL_FALSE; _mesa_vector4f_alloc( &store->fogcoord, 0, tnl->vb.Size, 32 ); - _mesa_vector4f_init( &store->input, 0, 0 ); + _mesa_vector4f_init( &store->input, 0, NULL ); if (!inited) init_static_data(); diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index cd5792e4589..aa420c3c14f 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -344,7 +344,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->LitIndex[0] ); _mesa_vector4f_free( &store->LitIndex[1] ); FREE( store ); - stage->privatePtr = 0; + stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c index 9d6a4ba5d2d..f8c73c702d2 100644 --- a/src/mesa/tnl/t_vb_normals.c +++ b/src/mesa/tnl/t_vb_normals.c @@ -85,7 +85,7 @@ static GLboolean run_normal_stage( GLcontext *ctx, VB->NormalPtr = &store->normal; VB->AttribPtr[_TNL_ATTRIB_NORMAL] = VB->NormalPtr; - VB->NormalLengthPtr = 0; /* no longer valid */ + VB->NormalLengthPtr = NULL; /* no longer valid */ return GL_TRUE; } @@ -126,7 +126,7 @@ static GLboolean run_validate_normal_stage( GLcontext *ctx, store->NormalTransform = _mesa_normal_tab[NORM_RESCALE]; } else { - store->NormalTransform = 0; + store->NormalTransform = NULL; } } diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c index 746ea8ba7f9..de866974473 100644 --- a/src/mesa/tnl/t_vb_points.c +++ b/src/mesa/tnl/t_vb_points.c @@ -103,7 +103,7 @@ static void free_point_data( struct tnl_pipeline_stage *stage ) if (store) { _mesa_vector4f_free( &store->PointSize ); FREE( store ); - stage->privatePtr = 0; + stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 38b04b48f9d..520775412e8 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -201,9 +201,9 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) &store->andmask ); } else { - VB->NdcPtr = 0; + VB->NdcPtr = NULL; _mesa_clip_np_tab[VB->ClipPtr->size]( VB->ClipPtr, - 0, + NULL, store->clipmask, &store->ormask, &store->andmask ); @@ -345,7 +345,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) ALIGN_FREE( store->clipmask ); FREE( store ); - stage->privatePtr = 0; + stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index a2912cf7af3..3cdd2341a19 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -161,8 +161,8 @@ typedef void (*build_m_func)( GLfloat f[][3], static build_m_func build_m_tab[5] = { - 0, - 0, + NULL, + NULL, build_m2, build_m3, build_m3 @@ -238,8 +238,8 @@ typedef void (*build_f_func)( GLfloat *f, /* Just treat 4-vectors as 3-vectors. */ static build_f_func build_f_tab[5] = { - 0, - 0, + NULL, + NULL, build_f2, build_f3, build_f3 diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index 8f6ca893123..00330b689ae 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -128,7 +128,7 @@ static void free_texmat_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; } } diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 3951439fff3..ec303187a54 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -118,8 +118,8 @@ static void (*(usercliptab[5]))( GLcontext *, GLvector4f *, GLubyte *, GLubyte *, GLubyte * ) = { - 0, - 0, + NULL, + NULL, userclip2, userclip3, userclip4 @@ -209,9 +209,9 @@ static GLboolean run_vertex_stage( GLcontext *ctx, &store->andmask ); } else { - VB->NdcPtr = 0; + VB->NdcPtr = NULL; _mesa_clip_np_tab[VB->ClipPtr->size]( VB->ClipPtr, - 0, + NULL, store->clipmask, &store->ormask, &store->andmask ); diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index bc60665bbd1..2f7c37ad246 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -831,8 +831,8 @@ const static struct { 4 * sizeof(GLchan) }, { "pad", - 0, - { 0, 0, 0, 0 }, + NULL, + { NULL, NULL, NULL, NULL }, 0 } }; @@ -1105,7 +1105,7 @@ static void choose_emit_func( GLcontext *ctx, GLuint count, GLubyte *dest) struct tnl_clipspace_attr *a = vtx->attr; const GLuint attr_count = vtx->attr_count; - vtx->emit = 0; + vtx->emit = NULL; if (0) vtx->emit = _tnl_codegen_emit(ctx); @@ -1421,7 +1421,7 @@ void _tnl_init_vertices( GLcontext *ctx, { struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); - _tnl_install_attrs( ctx, 0, 0, 0, 0 ); + _tnl_install_attrs( ctx, NULL, 0, NULL, 0 ); vtx->need_extras = GL_TRUE; if (max_vertex_size > vtx->max_vertex_size) { @@ -1440,7 +1440,7 @@ void _tnl_free_vertices( GLcontext *ctx ) struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); if (vtx->vertex_buf) { ALIGN_FREE(vtx->vertex_buf); - vtx->vertex_buf = 0; + vtx->vertex_buf = NULL; } _tnl_free_c_codegen( &vtx->codegen ); diff --git a/src/mesa/tnl/t_vertex_c.c b/src/mesa/tnl/t_vertex_c.c index 419e7b92420..d7e1a0375f7 100644 --- a/src/mesa/tnl/t_vertex_c.c +++ b/src/mesa/tnl/t_vertex_c.c @@ -234,7 +234,7 @@ static GLboolean print_attr_footer( struct tnl_clipspace_codegen *p ) static tnl_emit_func print_store_func( struct tnl_clipspace_codegen *p ) { fprintf(stderr, "print_store_func: emitted:\n%s\n", p->buf); - return 0; + return NULL; } void _tnl_init_c_codegen( struct tnl_clipspace_codegen *p ) @@ -262,6 +262,6 @@ void _tnl_free_c_codegen( struct tnl_clipspace_codegen *p ) { if (p->buf) { FREE(p->buf); - p->buf = 0; + p->buf = NULL; } } diff --git a/src/mesa/tnl/t_vertex_codegen.c b/src/mesa/tnl/t_vertex_codegen.c index 4ff96430700..e3d9a0a8295 100644 --- a/src/mesa/tnl/t_vertex_codegen.c +++ b/src/mesa/tnl/t_vertex_codegen.c @@ -436,7 +436,7 @@ static struct { emit_4chan_4f_rgba_4 } }, { "pad", 0, 0, - { 0, 0, 0, 0 } } + { NULL, NULL, NULL, NULL } } }; @@ -497,7 +497,7 @@ tnl_emit_func _tnl_codegen_emit( GLcontext *ctx ) if (!emit_info[a[j].format].emit[sz]( p )) { fprintf(stderr, "codegen failed\n"); - return 0; + return NULL; } p->emit_attr_footer( p ); diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c index d92e03e58d9..1ba0f468ce9 100644 --- a/src/mesa/tnl/t_vtx_api.c +++ b/src/mesa/tnl/t_vtx_api.c @@ -255,7 +255,7 @@ static void _tnl_wrap_upgrade_vertex( GLcontext *ctx, tmp += tnl->vtx.attrsz[i]; } else - tnl->vtx.attrptr[i] = 0; /* will not be dereferenced */ + tnl->vtx.attrptr[i] = NULL; /* will not be dereferenced */ } /* Copy from current to repopulate the vertex with correct values. @@ -358,14 +358,14 @@ static struct _tnl_dynfn *lookup( struct _tnl_dynfn *l, GLuint key ) return f; } - return 0; + return NULL; } static tnl_attrfv_func do_codegen( GLcontext *ctx, GLuint attr, GLuint sz ) { TNLcontext *tnl = TNL_CONTEXT(ctx); - struct _tnl_dynfn *dfn = 0; + struct _tnl_dynfn *dfn = NULL; if (attr == 0) { GLuint key = tnl->vtx.vertex_size; @@ -387,7 +387,7 @@ static tnl_attrfv_func do_codegen( GLcontext *ctx, GLuint attr, GLuint sz ) if (dfn) return *(tnl_attrfv_func *) &dfn->code; else - return 0; + return NULL; } #endif /* USE_X86_ASM */ @@ -422,7 +422,7 @@ static tnl_attrfv_func do_choose( GLuint attr, GLuint sz ) tnl->vtx.tabfv[attr][sz-1] = do_codegen( ctx, attr, sz ); else #endif - tnl->vtx.tabfv[attr][sz-1] = 0; + tnl->vtx.tabfv[attr][sz-1] = NULL; /* Else use generic version: */ @@ -867,7 +867,7 @@ static void _tnl_current_init( GLcontext *ctx ) static struct _tnl_dynfn *no_codegen( GLcontext *ctx, int key ) { (void) ctx; (void) key; - return 0; + return NULL; } void _tnl_vtx_init( GLcontext *ctx ) @@ -912,7 +912,7 @@ void _tnl_vtx_init( GLcontext *ctx ) } for (i = 0; i < _TNL_ATTRIB_INDEX; i++) - _mesa_vector4f_init( &tmp->Attribs[i], 0, 0); + _mesa_vector4f_init( &tmp->Attribs[i], 0, NULL); for (i = 0; i < 4; i++) { make_empty_list( &tnl->vtx.cache.Vertex[i] ); diff --git a/src/mesa/tnl/t_vtx_eval.c b/src/mesa/tnl/t_vtx_eval.c index 5a24c70d21f..3b09bd29f59 100644 --- a/src/mesa/tnl/t_vtx_eval.c +++ b/src/mesa/tnl/t_vtx_eval.c @@ -35,12 +35,12 @@ static void clear_active_eval1( TNLcontext *tnl, GLuint attr ) { - tnl->vtx.eval.map1[attr].map = 0; + tnl->vtx.eval.map1[attr].map = NULL; } static void clear_active_eval2( TNLcontext *tnl, GLuint attr ) { - tnl->vtx.eval.map2[attr].map = 0; + tnl->vtx.eval.map2[attr].map = NULL; } static void set_active_eval1( TNLcontext *tnl, GLuint attr, GLuint dim, diff --git a/src/mesa/tnl/t_vtx_exec.c b/src/mesa/tnl/t_vtx_exec.c index 690912dd89d..e71a8fcac69 100644 --- a/src/mesa/tnl/t_vtx_exec.c +++ b/src/mesa/tnl/t_vtx_exec.c @@ -49,7 +49,7 @@ static void _tnl_print_vtx( GLcontext *ctx ) for (i = 0 ; i < tnl->vtx.prim_count ; i++) { struct tnl_prim *prim = &tnl->vtx.prim[i]; - _mesa_debug(0, " prim %d: %s %d..%d %s %s\n", + _mesa_debug(NULL, " prim %d: %s %d..%d %s %s\n", i, _mesa_lookup_enum_by_nr(prim->mode & PRIM_MODE_MASK), prim->start, @@ -166,11 +166,11 @@ static void _tnl_vb_bind_vtx( GLcontext *ctx ) VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS]; VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL]; VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0]; - VB->ColorPtr[1] = 0; + VB->ColorPtr[1] = NULL; VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_INDEX]; - VB->IndexPtr[1] = 0; + VB->IndexPtr[1] = NULL; VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1]; - VB->SecondaryColorPtr[1] = 0; + VB->SecondaryColorPtr[1] = NULL; VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG]; for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { |