mesa: Use _mesa_bsearch.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 24 Jun 2008 02:33:03 +0000 (11:33 +0900)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 22 Sep 2008 05:13:56 +0000 (22:13 -0700)
src/mesa/main/enums.c

index a9c102e4f2df47ee02c7d34793afbc3b427b6c6e..15e7d5b96ce713d3e72e9456b63bfe34673ca815 100644 (file)
@@ -4866,8 +4866,8 @@ const char *_mesa_lookup_enum_by_nr( int nr )
 {
    unsigned * i;
 
-   i = (unsigned *)bsearch( & nr, reduced_enums, Elements(reduced_enums),
-                            sizeof(reduced_enums[0]), (cfunc) compar_nr );
+   i = (unsigned *)_mesa_bsearch( & nr, reduced_enums, Elements(reduced_enums),
+                                  sizeof(reduced_enums[0]), (cfunc) compar_nr );
 
    if ( i != NULL ) {
       return & enum_string_table[ all_enums[ *i ].offset ];
@@ -4884,8 +4884,8 @@ int _mesa_lookup_enum_by_name( const char *symbol )
    enum_elt * f = NULL;
 
    if ( symbol != NULL ) {
-      f = (enum_elt *)bsearch( symbol, all_enums, Elements(all_enums),
-                              sizeof( enum_elt ), (cfunc) compar_name );
+      f = (enum_elt *)_mesa_bsearch( symbol, all_enums, Elements(all_enums),
+                                     sizeof( enum_elt ), (cfunc) compar_name );
    }
 
    return (f != NULL) ? f->n : -1;