diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
| commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
| tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/xtools/clginterp.x | |
| download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz | |
Initial commit
Diffstat (limited to 'pkg/xtools/clginterp.x')
| -rw-r--r-- | pkg/xtools/clginterp.x | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkg/xtools/clginterp.x b/pkg/xtools/clginterp.x new file mode 100644 index 00000000..c65d69ca --- /dev/null +++ b/pkg/xtools/clginterp.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <math/iminterp.h> + +# CLGINTERP -- Select an interpolator from a CL input string. The procedure +# is coded to be protected from changes in the values of the interpolator +# types in interpdef.h. + +int procedure clginterp (param) + +char param[ARB] # CL parameter prompt string +int index, iicodes[5] +pointer sp, word +int clgwrd() +errchk clgwrd +data iicodes /II_NEAREST, II_LINEAR, II_POLY3, II_POLY5, II_SPLINE3/ + +begin + call smark (sp) + call salloc (word, SZ_FNAME, TY_CHAR) + + index = max (1, min (5, clgwrd (param, Memc[word], SZ_FNAME, + "|nearest|linear|poly3|poly5|spline3|"))) + + call sfree (sp) + return (iicodes[index]) +end |
