diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2015-01-19 16:47:31 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2015-01-19 16:47:31 -0500 |
commit | d9c28a178bd5fbab4b949664d9ec48c83d6df092 (patch) | |
tree | 33e25ce8d694479ceff267ec9c696982d1adf506 /plugins/shn/array.c | |
parent | 69b7e9b21892b684d93c335bc143b3998c53ad2b (diff) |
Make DFSG-clean0.6.2+dfsgdfsg_clean
Diffstat (limited to 'plugins/shn/array.c')
-rw-r--r-- | plugins/shn/array.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/plugins/shn/array.c b/plugins/shn/array.c deleted file mode 100644 index 0adf8549..00000000 --- a/plugins/shn/array.c +++ /dev/null @@ -1,41 +0,0 @@ -/****************************************************************************** -* * -* Copyright (C) 1992-1995 Tony Robinson * -* * -* See the file doc/LICENSE.shorten for conditions on distribution and usage * -* * -******************************************************************************/ - -/* - * $Id: array.c,v 1.7 2003/08/26 05:34:04 jason Exp $ - */ - -#include <stdio.h> -#include <stdlib.h> -#include "shorten.h" -#include "shn.h" - -void *pmalloc(ulong size, shn_file *this_shn) { - void *ptr; - - ptr = malloc(size); - - if(ptr == NULL) - shn_error_fatal(this_shn,"Call to malloc(%ld) failed in pmalloc() -\nyour system may be low on memory", size); - - return(ptr); -} - -slong **long2d(ulong n0, ulong n1, shn_file *this_shn) { - slong **array0 = NULL; - - if((array0 = (slong**) pmalloc((ulong) (n0 * sizeof(slong*) + - n0 * n1 * sizeof(slong)),this_shn)) != NULL ) { - slong *array1 = (slong*) (array0 + n0); - int i; - - for(i = 0; i < n0; i++) - array0[i] = array1 + i * n1; - } - return(array0); -} |