aboutsummaryrefslogtreecommitdiff
path: root/math/gsurfit/gsfree.gx
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /math/gsurfit/gsfree.gx
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/gsurfit/gsfree.gx')
-rw-r--r--math/gsurfit/gsfree.gx58
1 files changed, 58 insertions, 0 deletions
diff --git a/math/gsurfit/gsfree.gx b/math/gsurfit/gsfree.gx
new file mode 100644
index 00000000..b97e960a
--- /dev/null
+++ b/math/gsurfit/gsfree.gx
@@ -0,0 +1,58 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+$if (datatype == r)
+include "gsurfitdef.h"
+$else
+include "dgsurfitdef.h"
+$endif
+
+# GSFREE -- Procedure to free the surface descriptor
+
+$if (datatype == r)
+procedure gsfree (sf)
+$else
+procedure dgsfree (sf)
+$endif
+
+pointer sf # the surface descriptor
+errchk mfree
+
+begin
+ if (sf == NULL)
+ return
+
+ $if (datatype == r)
+ 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)
+ $else
+ if (GS_XBASIS(sf) != NULL)
+ call mfree (GS_XBASIS(sf), TY_DOUBLE)
+ if (GS_YBASIS(sf) != NULL)
+ call mfree (GS_YBASIS(sf), TY_DOUBLE)
+ if (GS_MATRIX(sf) != NULL)
+ call mfree (GS_MATRIX(sf), TY_DOUBLE)
+ if (GS_CHOFAC(sf) != NULL)
+ call mfree (GS_CHOFAC(sf), TY_DOUBLE)
+ if (GS_VECTOR(sf) != NULL)
+ call mfree (GS_VECTOR(sf), TY_DOUBLE)
+ if (GS_COEFF(sf) != NULL)
+ call mfree (GS_COEFF(sf), TY_DOUBLE)
+ if (GS_WZ(sf) != NULL)
+ call mfree (GS_WZ(sf), TY_DOUBLE)
+ $endif
+
+ if (sf != NULL)
+ call mfree (sf, TY_STRUCT)
+end