From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/imfort/impkwr.x | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sys/imfort/impkwr.x (limited to 'sys/imfort/impkwr.x') diff --git a/sys/imfort/impkwr.x b/sys/imfort/impkwr.x new file mode 100644 index 00000000..caacb3d7 --- /dev/null +++ b/sys/imfort/impkwr.x @@ -0,0 +1,31 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include "imfort.h" + +# IMPKWR -- Set the value of the named header keyword as a real. + +procedure impkwr (im, keyw, rval, ier) + +pointer im # imfort image descriptor +% character*(*) keyw +real rval +int ier + +pointer sp, kp +int errcode() + +begin + call smark (sp) + call salloc (kp, SZ_KEYWORD, TY_CHAR) + + call f77upk (keyw, Memc[kp], SZ_KEYWORD) + iferr (call imputr (im, Memc[kp], rval)) { + ier = errcode() + call im_seterrop (ier, Memc[kp]) + } else { + ier = OK + IM_UPDATE(im) = YES + } + + call sfree (sp) +end -- cgit