From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- math/surfit/isfree.x | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 math/surfit/isfree.x (limited to 'math/surfit/isfree.x') diff --git a/math/surfit/isfree.x b/math/surfit/isfree.x new file mode 100644 index 00000000..2eb25891 --- /dev/null +++ b/math/surfit/isfree.x @@ -0,0 +1,45 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "surfitdef.h" + +# ISFREE -- Procedure to free the surface descriptor + +procedure isfree (sf) + +pointer sf # pointer to the surface descriptor +errchk mfree + +begin + # free arrays in memory + + # first the basis functions + if (SF_XBASIS(sf) != NULL) + call mfree (SF_XBASIS(sf), MEM_TYPE) + if (SF_XLEFT(sf) != NULL) + call mfree (SF_XLEFT(sf), TY_INT) + if (SF_YBASIS(sf) != NULL) + call mfree (SF_YBASIS(sf), MEM_TYPE) + if (SF_YLEFT(sf) != NULL) + call mfree (SF_YLEFT(sf), TY_INT) + + # next the x and y matrices + if (SF_XMATRIX(sf) != NULL) + call mfree (SF_XMATRIX(sf), MEM_TYPE) + if (SF_YMATRIX(sf) != NULL) + call mfree (SF_YMATRIX(sf), MEM_TYPE) + + # last the coefficient matrices + if (SF_XCOEFF(sf) != NULL) + call mfree (SF_XCOEFF(sf), MEM_TYPE) + if (SF_COEFF(sf) != NULL) + call mfree (SF_COEFF(sf), MEM_TYPE) + + if (SF_WZ(sf) != NULL) + call mfree (SF_WZ(sf), MEM_TYPE) + if (SF_TLEFT(sf) != NULL) + call mfree (SF_TLEFT(sf), TY_INT) + + # free surface descriptor + if (sf != NULL) + call mfree (sf, TY_STRUCT) +end -- cgit