aboutsummaryrefslogtreecommitdiff
path: root/sys/plio/plnewcopy.x
blob: a429bc6ecfc03927316a5611a4339907168313b5 (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
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<plset.h>
include	<plio.h>

# PL_NEWCOPY -- Create a new, empty mask with the same size and depth
# attributes as the reference mask.

pointer procedure pl_newcopy (old_pl)

pointer	old_pl			#I mask descriptor

pointer	new_pl
int	naxes, depth
long	axlen[PL_MAXDIM]
pointer	pl_open()
errchk	pl_open

begin
	new_pl = pl_open (NULL)

	call pl_gsize (old_pl, naxes, axlen, depth)
	call pl_ssize (new_pl, naxes, axlen, depth)

	PL_PRIVATE1(new_pl) = PL_PRIVATE1(old_pl)
	PL_PRIVATE2(new_pl) = PL_PRIVATE2(old_pl)
	PL_MAXLINE(new_pl)  = PL_MAXLINE(old_pl)

	return (new_pl)
end