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/gio/nspp/sysint/ncpchr.x | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sys/gio/nspp/sysint/ncpchr.x (limited to 'sys/gio/nspp/sysint/ncpchr.x') 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 -- cgit