diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/imfort/imakwc.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/imfort/imakwc.x')
-rw-r--r-- | sys/imfort/imakwc.x | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sys/imfort/imakwc.x b/sys/imfort/imakwc.x new file mode 100644 index 00000000..00e8f7d0 --- /dev/null +++ b/sys/imfort/imakwc.x @@ -0,0 +1,37 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "imfort.h" + +# IMAKWC -- Add a new keyword of type string. + +procedure imakwc (im, keyw, sval, comm, ier) + +pointer im # imfort image descriptor +% character*(*) keyw +% character*(*) sval +% character*(*) comm +int ier + +pointer sp, kp, vp, cp +int errcode() + +begin + call smark (sp) + call salloc (kp, SZ_KEYWORD, TY_CHAR) + call salloc (vp, SZ_VALSTR, TY_CHAR) + call salloc (cp, SZ_VALSTR, TY_CHAR) + + call f77upk (keyw, Memc[kp], SZ_KEYWORD) + call f77upk (sval, Memc[vp], SZ_VALSTR) + call f77upk (comm, Memc[cp], SZ_VALSTR) + + iferr (call imastr (im, Memc[kp], Memc[vp], Memc[cp])) { + ier = errcode() + call im_seterrop (ier, Memc[kp]) + } else { + ier = OK + IM_UPDATE(im) = YES + } + + call sfree (sp) +end |