aboutsummaryrefslogtreecommitdiff
path: root/sys/clio/clputd.x
blob: 71403bd9ffa7eb381fbfd499e400032ae367a2fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

# CLPUTD -- Put a double precision parameter to the CL.

procedure clputd (param, dval)

char	param[ARB]
double	dval

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, "%g")
	    call pargd (dval)
	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