aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/photcal/mctable/mctfree.x
blob: f7f3e2c0f1df32ca7b707194a847e1acef4e2234 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
include	"../lib/mctable.h"


# MCT_FREE - Free table structure and data buffer associated with it.

procedure mct_free (table)

pointer	table			# table descriptor

begin
	# Check pointer and magic number.
	if (table == NULL)
	    call error (0, "mct_free: Null table pointer")
	if (MCT_MAGIC (table) != MAGIC)
	    call error (0, "mct_free: Bad magic number")
	
	# Free the table.
	call mfree (MCT_DATA (table), MCT_TYPE (table))
	call mfree (table, TY_STRUCT)
end