aboutsummaryrefslogtreecommitdiff
path: root/sys/imfort/imaddk.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /sys/imfort/imaddk.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/imfort/imaddk.x')
-rw-r--r--sys/imfort/imaddk.x35
1 files changed, 35 insertions, 0 deletions
diff --git a/sys/imfort/imaddk.x b/sys/imfort/imaddk.x
new file mode 100644
index 00000000..0e6054dc
--- /dev/null
+++ b/sys/imfort/imaddk.x
@@ -0,0 +1,35 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include "imfort.h"
+
+# IMADDK -- Add a new keyword to the image header.
+
+procedure imaddk (im, keyw, dtype, comm, ier)
+
+pointer im # imfort image descriptor
+% character*(*) keyw
+int dtype
+% 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_LINE, TY_CHAR)
+
+ call f77upk (keyw, Memc[kp], SZ_KEYWORD)
+ call f77upk (comm, Memc[cp], SZ_LINE)
+
+ iferr (call imaddf (im, Memc[kp], dtype, Memc[cp])) {
+ ier = errcode()
+ call im_seterrop (ier, Memc[kp])
+ } else {
+ ier = OK
+ IM_UPDATE(im) = YES
+ }
+
+ call sfree (sp)
+end