static unsigned char *alloc_matrix(int rows, int cols)
{
- return alloc(rows * cols);
+ return arr_alloc(rows, cols);
}
/*
static int invert_mat(unsigned char *src, int k)
{
int irow, icol, row, col, ix, error;
- int *indxc = alloc(k * sizeof(int));
- int *indxr = alloc(k * sizeof(int));
- int *ipiv = alloc(k * sizeof(int)); /* elements used as pivots */
+ int *indxc = arr_alloc(k, sizeof(int));
+ int *indxr = arr_alloc(k, sizeof(int));
+ int *ipiv = arr_alloc(k, sizeof(int)); /* elements used as pivots */
unsigned char c, *p, *id_row = alloc_matrix(1, k),
*temp_row = alloc_matrix(1, k);
if (ret < 0)
return ret;
/* do the actual decoding */
- slice = alloc(k * sizeof(unsigned char *));
+ slice = arr_alloc(k, sizeof(unsigned char *));
for (row = 0; row < k; row++) {
if (idx[row] >= k) {
- slice[row] = para_calloc(sz);
+ slice[row] = zalloc(sz);
for (col = 0; col < k; col++)
addmul(slice[row], data[col],
m_dec[row * k + col], sz);