From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- math/gsurfit/gsfreer.x | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 math/gsurfit/gsfreer.x (limited to 'math/gsurfit/gsfreer.x') diff --git a/math/gsurfit/gsfreer.x b/math/gsurfit/gsfreer.x new file mode 100644 index 00000000..95148363 --- /dev/null +++ b/math/gsurfit/gsfreer.x @@ -0,0 +1,33 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "gsurfitdef.h" + +# GSFREE -- Procedure to free the surface descriptor + +procedure gsfree (sf) + +pointer sf # the surface descriptor +errchk mfree + +begin + if (sf == NULL) + return + + if (GS_XBASIS(sf) != NULL) + call mfree (GS_XBASIS(sf), TY_REAL) + if (GS_YBASIS(sf) != NULL) + call mfree (GS_YBASIS(sf), TY_REAL) + if (GS_MATRIX(sf) != NULL) + call mfree (GS_MATRIX(sf), TY_REAL) + if (GS_CHOFAC(sf) != NULL) + call mfree (GS_CHOFAC(sf), TY_REAL) + if (GS_VECTOR(sf) != NULL) + call mfree (GS_VECTOR(sf), TY_REAL) + if (GS_COEFF(sf) != NULL) + call mfree (GS_COEFF(sf), TY_REAL) + if (GS_WZ(sf) != NULL) + call mfree (GS_WZ(sf), TY_REAL) + + if (sf != NULL) + call mfree (sf, TY_STRUCT) +end -- cgit