aboutsummaryrefslogtreecommitdiff
path: root/math/surfit/islzero.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /math/surfit/islzero.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/surfit/islzero.x')
-rw-r--r--math/surfit/islzero.x25
1 files changed, 25 insertions, 0 deletions
diff --git a/math/surfit/islzero.x b/math/surfit/islzero.x
new file mode 100644
index 00000000..03034f01
--- /dev/null
+++ b/math/surfit/islzero.x
@@ -0,0 +1,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