From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- math/curfit/cvstat.gx | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 math/curfit/cvstat.gx (limited to 'math/curfit/cvstat.gx') diff --git a/math/curfit/cvstat.gx b/math/curfit/cvstat.gx new file mode 100644 index 00000000..e98367b9 --- /dev/null +++ b/math/curfit/cvstat.gx @@ -0,0 +1,61 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include + +$if (datatype == r) +include "curfitdef.h" +$else +include "dcurfitdef.h" +$endif + +# CVSTATI -- Return integer paramters from the curfit package + +$if (datatype == r) +int procedure cvstati (cv, param) +$else +int procedure dcvstati (cv, param) +$endif + +pointer cv # Curfit pointer +int param # Parameter + +begin + switch (param) { + case CVTYPE: + return (CV_TYPE(cv)) + case CVORDER: + switch (CV_TYPE(cv)) { + case LEGENDRE, CHEBYSHEV, USERFNC: + return (CV_ORDER(cv)) + case SPLINE1, SPLINE3: + return (CV_NPIECES(cv) + 1) + } + case CVNSAVE: + if (CV_TYPE(cv) == USERFNC) + return (CV_SAVECOEFF + CV_NCOEFF(cv)) + else + return (CV_SAVECOEFF + CV_NCOEFF(cv) - 1) + case CVNCOEFF: + return (CV_NCOEFF(cv)) + } +end + +# CVSTATR -- Return real paramters from the curfit package + +$if (datatype == r) +PIXEL procedure cvstatr (cv, param) +$else +PIXEL procedure dcvstatd (cv, param) +$endif + +pointer cv # Curfit pointer +int param # Parameter + +begin + switch (param) { + case CVXMIN: + return (CV_XMIN(cv)) + case CVXMAX: + return (CV_XMAX(cv)) + } +end -- cgit