aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/polyphot/apyfree.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 /noao/digiphot/apphot/polyphot/apyfree.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/digiphot/apphot/polyphot/apyfree.x')
-rw-r--r--noao/digiphot/apphot/polyphot/apyfree.x41
1 files changed, 41 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/polyphot/apyfree.x b/noao/digiphot/apphot/polyphot/apyfree.x
new file mode 100644
index 00000000..0bede579
--- /dev/null
+++ b/noao/digiphot/apphot/polyphot/apyfree.x
@@ -0,0 +1,41 @@
+include "../lib/apphotdef.h"
+include "../lib/polyphotdef.h"
+
+# AP_YFREE -- Procedure to free the polyphot structure.
+
+procedure ap_yfree (ap)
+
+pointer ap # pointer to the apphot structure
+
+begin
+ if (ap == NULL)
+ return
+ if (AP_NOISE(ap) != NULL)
+ call ap_noisecls (ap)
+ if (AP_PDISPLAY(ap) != NULL)
+ call ap_dispcls (ap)
+ if (AP_POLY(ap) != NULL)
+ call ap_ycls (ap)
+ if (AP_PSKY(ap) != NULL)
+ call ap_skycls (ap)
+ if (AP_PCENTER(ap) != NULL)
+ call ap_ctrcls (ap)
+ if (AP_IMBUF(ap) != NULL)
+ call mfree (AP_IMBUF(ap), TY_REAL)
+ if (AP_MW(ap) != NULL)
+ call mw_close (AP_MW(ap))
+ call mfree (ap, TY_STRUCT)
+end
+
+
+# AP_YCLS -- Procedure to close up the polyphot structure and arrays.
+
+procedure ap_ycls (ap)
+
+pointer ap # pointer to the apphot structure
+
+begin
+ if (AP_POLY(ap) == NULL)
+ return
+ call mfree (AP_POLY(ap), TY_STRUCT)
+end