diff options
author | Brian Paul <[email protected]> | 2005-09-06 02:56:51 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-06 02:56:51 +0000 |
commit | c0b4b9fc3e51c09a864fe5e3d439da95f8f0edc5 (patch) | |
tree | adfd491565717a1fa1f4162e6873600e17f63167 /src/mesa/main/imports.h | |
parent | e2399effa03a706d8f63fa9a27e985ca7e3dc3cd (diff) |
remove DEFARRAY, CHECKARRAY stuff
Diffstat (limited to 'src/mesa/main/imports.h')
-rw-r--r-- | src/mesa/main/imports.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index c63cc64eb86..27cc1a57f78 100644 --- a/src/mesa/main/imports.h +++ b/src/mesa/main/imports.h @@ -101,63 +101,6 @@ extern "C" { #define ADD_POINTERS(A, B) ( (GLubyte *) (A) + (uintptr_t) (B) ) -/**********************************************************************/ -/** \name [Pseudo] static array declaration. - * - * MACs and BeOS don't support static larger than 32kb, so ... - */ -/*@{*/ - -/** - * \def DEFARRAY - * Define a [static] unidimensional array - */ - -/** - * \def DEFMARRAY - * Define a [static] bi-dimensional array - */ - -/** - * \def DEFMNARRAY - * Define a [static] tri-dimensional array - */ - -/** - * \def CHECKARRAY - * Verifies a [static] array was properly allocated. - */ - -/** - * \def UNDEFARRAY - * Undefine (free) a [static] array. - */ - -#if defined(macintosh) && !defined(__MRC__) -/*extern char *AGLAlloc(int size);*/ -/*extern void AGLFree(char* ptr);*/ -# define DEFARRAY(TYPE,NAME,SIZE) TYPE *NAME = (TYPE*)_mesa_alloc(sizeof(TYPE)*(SIZE)) -# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])_mesa_alloc(sizeof(TYPE)*(SIZE1)*(SIZE2)) -# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE (*NAME)[SIZE2][SIZE3] = (TYPE(*)[SIZE2][SIZE3])_mesa_alloc(sizeof(TYPE)*(SIZE1)*(SIZE2)*(SIZE3)) -# define CHECKARRAY(NAME,CMD) do {if (!(NAME)) {CMD;}} while (0) -# define UNDEFARRAY(NAME) do {if ((NAME)) {_mesa_free((char*)NAME);} }while (0) -#elif defined(__BEOS__) -# define DEFARRAY(TYPE,NAME,SIZE) TYPE *NAME = (TYPE*)_mesa_malloc(sizeof(TYPE)*(SIZE)) -# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])_mesa_malloc(sizeof(TYPE)*(SIZE1)*(SIZE2)) -# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE (*NAME)[SIZE2][SIZE3] = (TYPE(*)[SIZE2][SIZE3])_mesa_malloc(sizeof(TYPE)*(SIZE1)*(SIZE2)*(SIZE3)) -# define CHECKARRAY(NAME,CMD) do {if (!(NAME)) {CMD;}} while (0) -# define UNDEFARRAY(NAME) do {if ((NAME)) {_mesa_free((char*)NAME);} }while (0) -#else -# define DEFARRAY(TYPE,NAME,SIZE) TYPE NAME[SIZE] -# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE NAME[SIZE1][SIZE2] -# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE NAME[SIZE1][SIZE2][SIZE3] -# define CHECKARRAY(NAME,CMD) do {} while(0) -# define UNDEFARRAY(NAME) -#endif - -/*@}*/ - - /** * Sometimes we treat GLfloats as GLints. On x86 systems, moving a float * as a int (thereby using integer registers instead of FP registers) is |