Benjamin Gerard <ben@sashipa.com>
Data Structures | |
struct | lua_matrix_def_t |
lua matrix definition type. More... | |
struct | lua_matrix_t |
lua matrix type. More... | |
Defines | |
#define | CHECK_MATRIX(i) |
Check if LUA stack argurment is a matrix or exit. | |
#define | GET_MATRIX(M, MD, i, j, k) |
Get a matrix and its definition from LUA stack with optionnal dimension checking. | |
#define | GET_VECTOR(M, MD, i, k) |
Get a vector (matrix line) and its definition from LUA stack with optionnal dimension checking. | |
#define | GET_MATRIX_OR_VECTOR(M, MD, i, k) |
Get either a matrix or a vector (matrix line) and its definition from LUA stack with optionnal dimension checking. | |
Functions | |
int | display_matrix_init (void) |
Call it at driver init. | |
int | display_matrix_shutdown (void) |
Call it at driver shutdown. | |
Variables | |
int | matrix_tag |
LUA tag value for matrix type. |
|
Value: if (lua_tag(L, i) != matrix_tag) { \ printf("%s : argument #%d is not a matrix\n", __FUNCTION__, i); \ return 0; \ }
|
|
Value: (MD) = 0; /* Avoid warning */ \ (M) = (lua_matrix_t *)lua_touserdata(L, i); \ if (!(M) || ((MD) = (M)->md), !(MD)) { \ printf("%s : null pointer\n", __FUNCTION__);\ return 0; \ } \ if ( (M)->li ) { \ printf("%s : matrix is a vector\n", __FUNCTION__); \ return 0; \ } \ if (j && j != (MD)->l) { \ printf("%s : invalid number of line. %d differs from %d\n", \ __FUNCTION__, (MD)->l, j); \ return 0; \ } \ if (k && k != (MD)->c) { \ printf("%s : invalid number of column. %d differs from %d\n", \ __FUNCTION__, (MD)->c, k); \ return 0; \ }
|
|
Value: (MD) = 0; /* Avoid warning */ \ (M) = (lua_matrix_t *)lua_touserdata(L, i); \ if (!(M) || ((MD) = (M)->md), !(MD)) { \ printf("%s : null pointer\n", __FUNCTION__);\ return 0; \ } \ if ( !(M)->li ) { \ printf("%s : not a vector\n", __FUNCTION__); \ return 0; \ } \ if (k && k != (MD)->c) { \ printf("%s : invalid number of column. %d differs from %d\n", \ __FUNCTION__, (MD)->c, k); \ return 0; \ }
|
|
Value: (MD) = 0; /* Avoid warning */ \ (M) = (lua_matrix_t *)lua_touserdata(L, i); \ if (!(M) || ((MD) = (M)->md), !(MD)) { \ printf("%s : null pointer\n", __FUNCTION__);\ return 0; \ } \ if (k && k != (MD)->c) { \ printf("%s : invalid number of column. %d differs from %d\n", \ __FUNCTION__, (MD)->c, k); \ return 0; \ }
|
dcplaya documentation version 2.0 | Generated on November 2004 by doxygen 1.3.6 |