aboutsummaryrefslogtreecommitdiff
path: root/sys/mwcs/mwflookup.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 /sys/mwcs/mwflookup.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/mwcs/mwflookup.x')
-rw-r--r--sys/mwcs/mwflookup.x31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/mwcs/mwflookup.x b/sys/mwcs/mwflookup.x
new file mode 100644
index 00000000..e9f28f8d
--- /dev/null
+++ b/sys/mwcs/mwflookup.x
@@ -0,0 +1,31 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "mwcs.h"
+
+# MW_FLOOKUP -- Look up the named WCS function in the driver table, and
+# return the index of the associated driver. ERR is returned if the named
+# function is not found, 0 if the function is "linear", otherwise the
+# index of the function driver is returned.
+
+int procedure mw_flookup (mw, fnname)
+
+pointer mw #I pointer to MWCS descriptor
+char fnname[ARB] #I function to be lookup up
+
+int fn, i
+bool streq()
+include "mwcs.com"
+
+begin
+ if (streq (fnname, "linear"))
+ return (F_LINEAR)
+
+ fn = ERR
+ do i = 1, fn_nfn
+ if (streq (fnname, FN_NAME(i))) {
+ fn = i
+ break
+ }
+
+ return (fn)
+end