date and time created 88/10/07 16:35:45 by marc
[unix-history] / usr / src / lib / libcompat / 4.3 / strout.c
CommitLineData
2ce81398
DS
1#if defined(LIBC_SCCS) && !defined(lint)
2static char sccsid[] = "@(#)strout.c 5.2 (Berkeley) %G%";
3#endif LIBC_SCCS and not lint
b8f253e8 4
44f64966
BJ
5#include <stdio.h>
6
7_strout(count, string, adjust, file, fillch)
8register char *string;
9register count;
10int adjust;
41e01b3e 11register FILE *file;
44f64966
BJ
12{
13 while (adjust < 0) {
14 if (*string=='-' && fillch=='0') {
15 putc(*string++, file);
16 count--;
17 }
18 putc(fillch, file);
19 adjust++;
20 }
21 while (--count>=0)
22 putc(*string++, file);
23 while (adjust) {
24 putc(fillch, file);
25 adjust--;
26 }
27}