aboutsummaryrefslogtreecommitdiff
path: root/noao/twodspec/multispec/clinput.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 /noao/twodspec/multispec/clinput.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/multispec/clinput.x')
-rw-r--r--noao/twodspec/multispec/clinput.x28
1 files changed, 28 insertions, 0 deletions
diff --git a/noao/twodspec/multispec/clinput.x b/noao/twodspec/multispec/clinput.x
new file mode 100644
index 00000000..163c8354
--- /dev/null
+++ b/noao/twodspec/multispec/clinput.x
@@ -0,0 +1,28 @@
+# Specialized CL get routines.
+
+
+# CLGRANGES -- Get a range. A range string is input and the string is
+# decoded into a range array. The number of values in the range array is
+# returned by the function.
+
+int procedure clgranges (param, min_value, max_value, ranges, max_ranges)
+
+char param[ARB]
+int min_value
+int max_value
+int ranges[ARB]
+int max_ranges
+
+char str[SZ_LINE]
+int n
+
+int decode_ranges()
+
+begin
+ call clgstr (param, str, SZ_LINE)
+
+ if (decode_ranges (str,ranges,max_ranges,min_value,max_value,n) == ERR)
+ call error (0, "Error in range string")
+
+ return (n)
+end