core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

enums.c File Reference

#include "glheader.h"
#include "mfeatures.h"
#include "enums.h"
#include "imports.h"

Data Structures

struct  enum_elt

Typedefs

typedef int(* cfunc )(const void *, const void *)

Functions

static int compar_name (const char *a, const enum_elt *b)
 Compare a key name to an element in the all_enums array.
static int compar_nr (const int *a, const unsigned *b)
 Compare a key enum value to an element in the all_enums array.
const char * _mesa_lookup_enum_by_nr (int nr)
const char * _mesa_lookup_prim_by_nr (int nr)
int _mesa_lookup_enum_by_name (const char *symbol)

Variables

static LONGSTRING const char enum_string_table []
static const enum_elt all_enums [1862]
static const unsigned reduced_enums [1347]
static char token_tmp [20]


Typedef Documentation

typedef int(* cfunc)(const void *, const void *)


Function Documentation

int _mesa_lookup_enum_by_name ( const char *  symbol  ) 

const char* _mesa_lookup_enum_by_nr ( int  nr  ) 

const char* _mesa_lookup_prim_by_nr ( int  nr  ) 

static int compar_name ( const char *  a,
const enum_elt b 
) [static]

Compare a key name to an element in the all_enums array.

bsearch always passes the key as the first parameter and the pointer to the array element as the second parameter. We can elimiate some extra work by taking advantage of that fact.

Parameters:
a Pointer to the desired enum name.
b Pointer to an element of the all_enums array.

static int compar_nr ( const int *  a,
const unsigned *  b 
) [static]

Compare a key enum value to an element in the all_enums array.

bsearch always passes the key as the first parameter and the pointer to the array element as the second parameter. We can elimiate some extra work by taking advantage of that fact.

Parameters:
a Pointer to the desired enum name.
b Pointer to an index into the all_enums array.


Variable Documentation

const enum_elt all_enums[1862] [static]

LONGSTRING const char enum_string_table[] [static]

const unsigned reduced_enums[1347] [static]

char token_tmp[20] [static]


Generated on Sun Sep 27 06:47:45 2009 for Mesa Main by  doxygen 1.5.4