aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/daofind/apfdfree.x
blob: 3f1ea7621ce9c73aad564470baef504c5a275ee0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
include "../lib/apphotdef.h"

# AP_FDFREE -- Free the apphot data structure.

procedure ap_fdfree (ap)

pointer	ap		# pointer to the apphot structure

begin
	if (ap == NULL)
	    return
	if (AP_NOISE(ap) != NULL)
	    call ap_noisecls (ap)
	if (AP_PFIND(ap) != NULL)
	    call ap_fdcls (ap)
	if (AP_PDISPLAY(ap) != NULL)
	    call ap_dispcls (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_FDCLS -- Free the find data structure.

procedure ap_fdcls (ap)

pointer	ap		# pointer to the apphot structure

begin
	call mfree (AP_PFIND(ap), TY_STRUCT)
end