aboutsummaryrefslogtreecommitdiff
path: root/sys/clio/clputb.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/clio/clputb.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/clio/clputb.x')
-rw-r--r--sys/clio/clputb.x30
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/clio/clputb.x b/sys/clio/clputb.x
new file mode 100644
index 00000000..dcc99ad8
--- /dev/null
+++ b/sys/clio/clputb.x
@@ -0,0 +1,30 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# CLPUTB -- Put a boolean valued parameter to the CL.
+
+procedure clputb (param, bval)
+
+char param[ARB]
+bool bval
+
+pointer sp, value, pname
+pointer clc_find()
+
+begin
+ call smark (sp)
+ call salloc (value, SZ_FNAME, TY_CHAR)
+ call salloc (pname, SZ_FNAME, TY_CHAR)
+
+ # Update the parameter in the CL.
+ call sprintf (Memc[value], SZ_FNAME, "%b")
+ call pargb (bval)
+ call fprintf (CLOUT, "%s = %s\n")
+ call pargstr (param)
+ call pargstr (Memc[value])
+
+ # If the parameter is in the cache, update the cached value as well.
+ if (clc_find (param, Memc[pname], SZ_FNAME) != NULL)
+ call clc_enter (Memc[pname], Memc[value])
+
+ call sfree (sp)
+end