/* ******************************************************************************** * * * 2DHF version 1-2003 * * Copyright (C) 1992 Leif Laaksonen * * * * This software may be used and distributed according to the terms * * of the GNU General Public License, see README and COPYING. * * * ******************************************************************************** Interface to a c routine to perform a dynamical memory allocation */ #include #include #include /* bv: is an integer to contain the address to the reserved memory reqlen: contains the number of bytes to be reserved /************************************************************************/ void fmalloc_(bv , reqlen) int *bv; int *reqlen; /************************************************************************/ { float *BV; BV = (float *)malloc(*reqlen); if(BV == NULL) { perror("Can't allocate memory"); exit(1);} *bv = (int)BV; }