aboutsummaryrefslogtreecommitdiff
path: root/dot_vim/c-support/codesnippets/calloc_double_matrix.c
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2021-12-14 11:42:41 -0500
committerRyan Kavanagh <rak@rak.ac>2021-12-14 11:42:41 -0500
commitfd2001cd614dfa0d55ec820b7c358a1795d3ea27 (patch)
tree932b5f91ad3c70f9cfa4455a0ccfb27a7b259bf1 /dot_vim/c-support/codesnippets/calloc_double_matrix.c
parentadded symlink to cclub afs (diff)
Simplify vim configuration
Diffstat (limited to '')
-rw-r--r--dot_vim/c-support/codesnippets/calloc_double_matrix.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/dot_vim/c-support/codesnippets/calloc_double_matrix.c b/dot_vim/c-support/codesnippets/calloc_double_matrix.c
deleted file mode 100644
index ec71658..0000000
--- a/dot_vim/c-support/codesnippets/calloc_double_matrix.c
+++ /dev/null
@@ -1,36 +0,0 @@
-
-/*
- * === FUNCTION ======================================================================
- * Name: calloc_double_matrix
- * Description: Allocate a dynamic double-matrix of size rows*columns;
- * return a pointer.
- * =====================================================================================
- */
- double**
-calloc_double_matrix ( int rows, int columns )
-{
- int i;
- double **m;
- m = calloc ( rows, sizeof(double*) ); /* allocate pointer array */
- assert( m != NULL); /* abort if allocation failed */
- *m = calloc ( rows*columns, sizeof(double) );/* allocate data array */
- assert(*m != NULL); /* abort if allocation failed */
- for ( i=1; i<rows; i+=1 ) /* set pointers */
- m[i] = m[i-1] + columns;
- return m;
-} /* ---------- end of function calloc_double_matrix ---------- */
-
-/*
- * === FUNCTION ======================================================================
- * Name: free_matrix_double
- * Description: Free a dynamic double-matrix.
- * =====================================================================================
- */
- void
-free_double_matrix ( double **m )
-{
- free(*m); /* free data array */
- free( m); /* free pointer array */
- return ;
-} /* ---------- end of function free_double_matrix ---------- */
-