#include #include /**************************************************************** C DAREALLO C Allocates a REAL*8 area C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ long dareallo(numbel,number,iadres) long numbel, *number, *iadres; /*--------------------------------------------------------------- C NUMBEL: IN size of area. C NUMBER: OUT area number = location in C IFIELE, NUMELE of pointers to AREA. C IADRES: OUT address of first element of area. C NOTE: IADRES is valid only until the next C to DMATDEAL. The current address is C obtained by CALL DMATADDR C *: IN label where to branch at overflow. C----------------------------------------------------------------*/ { char *dp; if((dp = (char *)calloc(numbel,sizeof(double))) == NULL) { return(1); } *iadres = (long) dp; return(0); } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ C DAREDEAL C Deallocates area with given address; C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ long daredeal(number,iadres) long *number, *iadres; { free((char *) (*iadres)); return(0); }