aboutsummaryrefslogtreecommitdiff
path: root/sys/gio/nspp/sysint/ncpchr.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/gio/nspp/sysint/ncpchr.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/gio/nspp/sysint/ncpchr.x')
-rw-r--r--sys/gio/nspp/sysint/ncpchr.x20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/gio/nspp/sysint/ncpchr.x b/sys/gio/nspp/sysint/ncpchr.x
new file mode 100644
index 00000000..4312068d
--- /dev/null
+++ b/sys/gio/nspp/sysint/ncpchr.x
@@ -0,0 +1,20 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+# NCPCHR -- Put a single character (byte) into a packed array. Do nothing if
+# the index is out of bounds.
+
+procedure ncpchr (ichars, len_ichars, index, char_value)
+
+int ichars[ARB] # packed character array
+int len_ichars # length of the array
+int index # index of char to be set
+int char_value # value to be stored
+
+char ch[1]
+
+begin
+ if (index >= 1 && index <= len_ichars) {
+ ch[1] = char_value
+ call chrpak (ch, 1, ichars, index, 1)
+ }
+end