BSD 3 development
[unix-history] / usr / src / libc / stdio / strout.c
CommitLineData
18e5fa7e
BJ
1#include <stdio.h>
2
3_strout(count, string, adjust, file, fillch)
4register char *string;
5register count;
6int adjust;
7register struct _iobuf *file;
8{
9 while (adjust < 0) {
10 if (*string=='-' && fillch=='0') {
11 putc(*string++, file);
12 count--;
13 }
14 putc(fillch, file);
15 adjust++;
16 }
17 while (--count>=0)
18 putc(*string++, file);
19 while (adjust) {
20 putc(fillch, file);
21 adjust--;
22 }
23}