diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/utilities/nttools/threed/txtable/txthv.gx | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/threed/txtable/txthv.gx')
-rw-r--r-- | pkg/utilities/nttools/threed/txtable/txthv.gx | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/threed/txtable/txthv.gx b/pkg/utilities/nttools/threed/txtable/txthv.gx new file mode 100644 index 00000000..d965f704 --- /dev/null +++ b/pkg/utilities/nttools/threed/txtable/txthv.gx @@ -0,0 +1,55 @@ +# +# TXTHV -- Write scalar value into header. +# +# +# +# +# Revision history: +# ---------------- +# +# 22-Nov-96 - Task created (I.Busko) + +$if (datatype == c) +procedure txthvt (otp, col, buf) +$else +procedure txthv$t (otp, col, buf) +$endif + +pointer otp # i: table descriptor +int col # i: column number in input table +$if (datatype == c) +char buf[ARB] # i: value to be written +$else +PIXEL buf +$endif +#-- +pointer keyword + +begin + # Use original column number to build keyword name. + call malloc (keyword, SZ_LINE, TY_CHAR) + call sprintf (Memc[keyword], SZ_LINE, "TCV_%03d") + call pargi (col) + + $if (datatype == c) + call tbhadt (otp, Memc[keyword], buf) + $endif + $if (datatype == i) + call tbhadi (otp, Memc[keyword], buf) + $endif + $if (datatype == s) + call tbhadi (otp, Memc[keyword], int(buf)) + $endif + $if (datatype == b) + call tbhadb (otp, Memc[keyword], buf) + $endif + $if (datatype == r) + call tbhadr (otp, Memc[keyword], buf) + $endif + $if (datatype == d) + call tbhadd (otp, Memc[keyword], buf) + $endif + + call mfree (keyword, TY_CHAR) +end + |