aboutsummaryrefslogtreecommitdiff
path: root/math/surfit/islzero.x
blob: 03034f01f4c232350e4153e50d0376446eaf901b (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
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include "surfitdef.h"

# ISLZERO -- Procedure to zero the accumulators for line number lineno.

procedure islzero (sf, lineno)

pointer	sf	# pointer to the surface descriptor
int	lineno	# line number
pointer	xcptr

begin
	SF_NXPTS(sf) = 0

	call aclrr (XMATRIX(SF_XMATRIX(sf)),
		     SF_XORDER(sf) * SF_NXCOEFF(sf))
	xcptr = SF_XCOEFF(sf) + (lineno - 1) * SF_NXCOEFF(sf)
	call aclrr (XCOEFF(xcptr), SF_NXCOEFF(sf))

	if (SF_WZ(sf) != NULL)
	    call mfree (SF_WZ(sf), MEM_TYPE)
	if (SF_TLEFT(sf) != NULL)
	    call mfree (SF_TLEFT(sf), TY_INT)
end