aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibr/putstr.r
diff options
context:
space:
mode:
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