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/imtypk.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/imfort/imtypk.x')
-rw-r--r-- | sys/imfort/imtypk.x | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/imfort/imtypk.x b/sys/imfort/imtypk.x new file mode 100644 index 00000000..03c71d21 --- /dev/null +++ b/sys/imfort/imtypk.x @@ -0,0 +1,33 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "imfort.h" + +# IMTYPK -- Get the datatype and comment string for a keyword. + +procedure imtypk (im, keyw, dtype, comm, ier) + +pointer im # image descriptor +% character*(*) keyw +int dtype # receives datatype code +% character*(*) comm +int ier + +pointer sp, kp, cp +int errcode() + +begin + call smark (sp) + call salloc (kp, SZ_KEYWORD, TY_CHAR) + call salloc (cp, SZ_VALSTR, TY_CHAR) + + call f77upk (keyw, Memc[kp], SZ_KEYWORD) + iferr (call imgatr (im, Memc[kp], dtype, Memc[cp], len(comm))) { + ier = errcode() + call im_seterrop (ier, Memc[kp]) + } else { + call f77pak (Memc[cp], comm, len(comm)) + ier = OK + } + + call sfree (sp) +end |