aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibr/putstr.r
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 /unix/boot/spp/rpp/ratlibr/putstr.r
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/boot/spp/rpp/ratlibr/putstr.r')
-rw-r--r--unix/boot/spp/rpp/ratlibr/putstr.r23
1 files changed, 23 insertions, 0 deletions
diff --git a/unix/boot/spp/rpp/ratlibr/putstr.r b/unix/boot/spp/rpp/ratlibr/putstr.r
new file mode 100644
index 00000000..497e34d9
--- /dev/null
+++ b/unix/boot/spp/rpp/ratlibr/putstr.r
@@ -0,0 +1,23 @@
+include defs
+
+# putstr - output character string in specified field
+
+ subroutine putstr (str, w, fd)
+ character str (ARB)
+ integer w
+ filedes fd
+
+ character length
+
+ integer i, len
+
+ len = length (str)
+ for (i = len + 1; i <= w; i = i + 1)
+ call putch (BLANK, fd)
+ for (i = 1; i <= len; i = i + 1)
+ call putch (str (i), fd)
+ for (i = (-w) - len; i > 0; i = i - 1)
+ call putch (BLANK, fd)
+
+ return
+ end