aboutsummaryrefslogtreecommitdiff
path: root/math/curfit/cvfreer.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /math/curfit/cvfreer.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'math/curfit/cvfreer.x')
-rw-r--r--math/curfit/cvfreer.x37
1 files changed, 37 insertions, 0 deletions
diff --git a/math/curfit/cvfreer.x b/math/curfit/cvfreer.x
new file mode 100644
index 00000000..95adffca
--- /dev/null
+++ b/math/curfit/cvfreer.x
@@ -0,0 +1,37 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "curfitdef.h"
+
+# CVFREE -- Procedure to free the curve descriptor
+
+procedure cvfree (cv)
+
+pointer cv # the curve descriptor
+
+errchk mfree
+
+begin
+ if (cv == NULL)
+ return
+
+ if (CV_XBASIS(cv) != NULL)
+ call mfree (CV_XBASIS(cv), TY_REAL)
+ if (CV_VECTOR(cv) != NULL)
+ call mfree (CV_VECTOR(cv), TY_REAL)
+ if (CV_COEFF(cv) != NULL)
+ call mfree (CV_COEFF(cv), TY_REAL)
+
+ if (CV_BASIS(cv) != NULL)
+ call mfree (CV_BASIS(cv), TY_REAL)
+ if (CV_LEFT(cv) != NULL)
+ call mfree (CV_LEFT(cv), TY_INT)
+ if (CV_WY(cv) != NULL)
+ call mfree (CV_WY(cv), TY_REAL)
+
+ if (CV_MATRIX(cv) != NULL)
+ call mfree (CV_MATRIX(cv), TY_REAL)
+ if (CV_CHOFAC(cv) != NULL)
+ call mfree (CV_CHOFAC(cv), TY_REAL)
+
+ call mfree (cv, TY_STRUCT)
+end