version 1.7.2.2, 2012/05/18 12:43:06
|
version 1.7.2.4, 2012/05/18 13:37:48
|
Line 499 io_allocVars(int varnum)
|
Line 499 io_allocVars(int varnum)
|
* return: NULL error or !=NULL ait_val_t element |
* return: NULL error or !=NULL ait_val_t element |
*/ |
*/ |
inline ait_val_t * |
inline ait_val_t * |
io_getVars(array_t * __restrict vars, int n) | io_getVars(array_t ** __restrict vars, int n) |
{ |
{ |
ait_val_t *v; |
ait_val_t *v; |
|
|
if (!vars) { | if (!vars) |
if (!(vars = io_arrayInit(n + 1))) | return NULL; |
| |
| if (!*vars) { |
| if (!(*vars = io_arrayInit(n + 1))) |
return NULL; |
return NULL; |
} else { |
} else { |
if (n >= io_arraySize(vars) && io_arrayGrow(vars, n + 1, 0)) | if (n >= io_arraySize(*vars)) { |
return NULL; | if (io_arrayGrow(*vars, n + 1, 0)) |
| return NULL; |
| if ((v = io_allocVar())) |
| return NULL; |
| else |
| io_arraySet(*vars, n, v); |
| return v; |
| } |
} |
} |
|
|
if ((v = io_allocVar())) | return io_array(*vars, n, ait_val_t*); |
return NULL; | |
else | |
io_arraySet(vars, n, v); | |
| |
return v; | |
} |
} |
|
|
/* |
/* |