[Mesa-dev] [PATCH] Renamed functions for file enums.c

Brian Paul brianp at vmware.com
Wed Jun 5 07:52:36 PDT 2013


On 06/05/2013 03:53 AM, Arnas Milasevicius wrote:
> ---
>   src/mapi/glapi/gen/gl_enums.py                   |  6 +-
>   src/mesa/drivers/common/meta.c                   |  2 +-
>   src/mesa/drivers/dri/i915/i830_state.c           | 20 +++----
>   src/mesa/drivers/dri/i915/intel_render.c         |  2 +-
>   src/mesa/drivers/dri/i915/intel_tris.c           |  4 +-
>   src/mesa/drivers/dri/i965/brw_draw.c             | 10 ++--
>   src/mesa/drivers/dri/i965/brw_draw_upload.c      |  2 +-
>   src/mesa/drivers/dri/i965/gen6_cc.c              |  4 +-
>   src/mesa/drivers/dri/intel/intel_fbo.c           |  2 +-
>   src/mesa/drivers/dri/intel/intel_mipmap_tree.c   |  2 +-
>   src/mesa/drivers/dri/intel/intel_tex_image.c     |  2 +-
>   src/mesa/drivers/dri/intel/intel_tex_subimage.c  |  2 +-
>   src/mesa/drivers/dri/r200/r200_state.c           |  2 +-
>   src/mesa/drivers/dri/r200/r200_tex.c             | 20 +++----
>   src/mesa/drivers/dri/radeon/radeon_common.c      |  2 +-
>   src/mesa/drivers/dri/radeon/radeon_fbo.c         |  2 +-
>   src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c |  2 +-
>   src/mesa/drivers/dri/radeon/radeon_pixel_read.c  |  2 +-
>   src/mesa/drivers/dri/radeon/radeon_state.c       |  2 +-
>   src/mesa/drivers/dri/radeon/radeon_swtcl.c       |  2 +-
>   src/mesa/drivers/dri/radeon/radeon_tex.c         |  6 +-
>   src/mesa/drivers/dri/radeon/radeon_texture.c     |  4 +-
>   src/mesa/main/api_validate.c                     |  6 +-
>   src/mesa/main/atifragshader.c                    | 30 +++++-----
>   src/mesa/main/attrib.c                           |  2 +-
>   src/mesa/main/blend.c                            | 34 ++++++------
>   src/mesa/main/bufferobj.c                        | 10 ++--
>   src/mesa/main/clear.c                            |  8 +--
>   src/mesa/main/condrender.c                       |  4 +-
>   src/mesa/main/debug.c                            |  2 +-
>   src/mesa/main/depth.c                            |  2 +-
>   src/mesa/main/dlist.c                            | 14 ++---
>   src/mesa/main/drawpix.c                          | 18 +++---
>   src/mesa/main/enable.c                           | 12 ++--
>   src/mesa/main/enums.h                            |  6 +-
>   src/mesa/main/errors.c                           |  4 +-
>   src/mesa/main/fbobject.c                         | 30 +++++-----
>   src/mesa/main/feedback.c                         |  2 +-
>   src/mesa/main/formatquery.c                      |  8 +--
>   src/mesa/main/get.c                              |  8 +--
>   src/mesa/main/getstring.c                        |  4 +-
>   src/mesa/main/hint.c                             |  4 +-
>   src/mesa/main/light.c                            |  6 +-
>   src/mesa/main/matrix.c                           |  8 +--
>   src/mesa/main/pack.c                             | 10 ++--
>   src/mesa/main/pack_tmp.h                         |  2 +-
>   src/mesa/main/polygon.c                          |  8 +--
>   src/mesa/main/queryobj.c                         | 26 ++++-----
>   src/mesa/main/readpix.c                          | 12 ++--
>   src/mesa/main/samplerobj.c                       | 20 +++----
>   src/mesa/main/shaderapi.c                        | 12 ++--
>   src/mesa/main/tests/enum_strings.cpp             |  8 +--
>   src/mesa/main/texenv.c                           | 10 ++--
>   src/mesa/main/texformat.c                        |  2 +-
>   src/mesa/main/texgen.c                           |  6 +-
>   src/mesa/main/teximage.c                         | 70 ++++++++++++------------
>   src/mesa/main/texobj.c                           |  2 +-
>   src/mesa/main/texparam.c                         | 14 ++---
>   src/mesa/main/texstate.c                         | 36 ++++++------
>   src/mesa/main/texstorage.c                       |  4 +-
>   src/mesa/main/texstore.c                         |  4 +-
>   src/mesa/main/uniforms.c                         |  2 +-
>   src/mesa/tnl/t_draw.c                            |  2 +-
>   src/mesa/tnl/t_vb_render.c                       |  2 +-
>   src/mesa/tnl/t_vertex_sse.c                      |  2 +-
>   src/mesa/tnl_dd/t_dd_dmatmp.h                    |  2 +-
>   src/mesa/tnl_dd/t_dd_unfilled.h                  |  2 +-
>   src/mesa/vbo/vbo_exec_array.c                    | 46 ++++++++--------
>   src/mesa/vbo/vbo_exec_draw.c                     |  2 +-
>   src/mesa/vbo/vbo_save_api.c                      |  2 +-
>   src/mesa/vbo/vbo_save_loopback.c                 |  2 +-
>   71 files changed, 317 insertions(+), 317 deletions(-)
>
> diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
> index 806d384..ba19196 100644
> --- a/src/mapi/glapi/gen/gl_enums.py
> +++ b/src/mapi/glapi/gen/gl_enums.py
> @@ -91,7 +91,7 @@ static int compar_nr( const int *a, const unsigned *b )
>
>   static char token_tmp[20];
>
> -const char *_mesa_lookup_enum_by_nr( int nr )
> +const char *_mesa_enum_nr( int nr )

I don't think this is a good name for the function.  I'd suggest 
_mesa_enum_string() since we're returning the string for the given enum 
value, not a number.



>   {
>      unsigned * i;
>
> @@ -138,7 +138,7 @@ static const char *prim_names[PRIM_MAX+3] = {
>    * GL_FALSE/GL_POINTS ambiguity and others.
>    */
>   const char *
> -_mesa_lookup_prim_by_nr(GLuint nr)
> +_mesa_prim_nr(GLuint nr)

_mesa_prim_string()


>   {
>      if (nr < Elements(prim_names))
>         return prim_names[nr];
> @@ -147,7 +147,7 @@ _mesa_lookup_prim_by_nr(GLuint nr)
>   }
>
>
> -int _mesa_lookup_enum_by_name( const char *symbol )
> +int _mesa_enum_name( const char *symbol )

_mesa_enum_value()


-Brian



More information about the mesa-dev mailing list