xref: /csrg-svn/lib/libcompat/4.3/strout.c (revision 22149)
1*22149Smckusick #ifndef lint
2*22149Smckusick static char sccsid[] = "@(#)strout.c	5.1 (Berkeley) 06/05/85";
3*22149Smckusick #endif not lint
4*22149Smckusick 
52034Swnj #include	<stdio.h>
62034Swnj 
72034Swnj _strout(count, string, adjust, file, fillch)
82034Swnj register char *string;
92034Swnj register count;
102034Swnj int adjust;
1117951Sserge register FILE *file;
122034Swnj {
132034Swnj 	while (adjust < 0) {
142034Swnj 		if (*string=='-' && fillch=='0') {
152034Swnj 			putc(*string++, file);
162034Swnj 			count--;
172034Swnj 		}
182034Swnj 		putc(fillch, file);
192034Swnj 		adjust++;
202034Swnj 	}
212034Swnj 	while (--count>=0)
222034Swnj 		putc(*string++, file);
232034Swnj 	while (adjust) {
242034Swnj 		putc(fillch, file);
252034Swnj 		adjust--;
262034Swnj 	}
272034Swnj }
28