From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- sys/imfort/impkwc.x | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sys/imfort/impkwc.x (limited to 'sys/imfort/impkwc.x') diff --git a/sys/imfort/impkwc.x b/sys/imfort/impkwc.x new file mode 100644 index 00000000..307f2fc5 --- /dev/null +++ b/sys/imfort/impkwc.x @@ -0,0 +1,33 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "imfort.h" + +# IMPKWC -- Set the value of the named header keyword as a character string. + +procedure impkwc (im, keyw, sval, ier) + +pointer im # imfort image descriptor +% character*(*) keyw +% character*(*) sval +int ier + +pointer sp, kp, vp +int errcode() + +begin + call smark (sp) + call salloc (kp, SZ_KEYWORD, TY_CHAR) + call salloc (vp, SZ_VALSTR, TY_CHAR) + + call f77upk (keyw, Memc[kp], SZ_KEYWORD) + call f77upk (sval, Memc[vp], SZ_VALSTR) + iferr (call impstr (im, Memc[kp], Memc[vp])) { + ier = errcode() + call im_seterrop (ier, Memc[kp]) + } else { + ier = OK + IM_UPDATE(im) = YES + } + + call sfree (sp) +end -- cgit