aboutsummaryrefslogtreecommitdiff
path: root/sys/imfort/imakwc.x
diff options
context:
space:
mode:
Diffstat (limited to 'sys/imfort/imakwc.x')
-rw-r--r--sys/imfort/imakwc.x37
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