aboutsummaryrefslogtreecommitdiff
path: root/sys/clio/clputx.x
diff options
context:
space:
mode:
Diffstat (limited to 'sys/clio/clputx.x')
-rw-r--r--sys/clio/clputx.x30
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/clio/clputx.x b/sys/clio/clputx.x
new file mode 100644
index 00000000..7bbe66e7
--- /dev/null
+++ b/sys/clio/clputx.x
@@ -0,0 +1,30 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# CLPUTX -- Put a complex type parameter to the CL.
+
+procedure clputx (param, xval)
+
+char param[ARB]
+complex xval
+
+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, "%z")
+ call pargx (xval)
+ 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