date and time created 80/12/21 16:50:58 by wnj
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Mon, 22 Dec 1980 08:50:58 +0000 (00:50 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Mon, 22 Dec 1980 08:50:58 +0000 (00:50 -0800)
SCCS-vsn: lib/libcompat/4.3/strout.c 4.1

usr/src/lib/libcompat/4.3/strout.c [new file with mode: 0644]

diff --git a/usr/src/lib/libcompat/4.3/strout.c b/usr/src/lib/libcompat/4.3/strout.c
new file mode 100644 (file)
index 0000000..ebd155a
--- /dev/null
@@ -0,0 +1,24 @@
+/* @(#)strout.c        4.1 (Berkeley) %G% */
+#include       <stdio.h>
+
+_strout(count, string, adjust, file, fillch)
+register char *string;
+register count;
+int adjust;
+register struct _iobuf *file;
+{
+       while (adjust < 0) {
+               if (*string=='-' && fillch=='0') {
+                       putc(*string++, file);
+                       count--;
+               }
+               putc(fillch, file);
+               adjust++;
+       }
+       while (--count>=0)
+               putc(*string++, file);
+       while (adjust) {
+               putc(fillch, file);
+               adjust--;
+       }
+}