xref: /csrg-svn/lib/libcompat/4.3/strout.c (revision 17951)
1*17951Sserge /* @(#)strout.c	4.2 (Berkeley) 02/13/85 */
22034Swnj #include	<stdio.h>
32034Swnj 
42034Swnj _strout(count, string, adjust, file, fillch)
52034Swnj register char *string;
62034Swnj register count;
72034Swnj int adjust;
8*17951Sserge register FILE *file;
92034Swnj {
102034Swnj 	while (adjust < 0) {
112034Swnj 		if (*string=='-' && fillch=='0') {
122034Swnj 			putc(*string++, file);
132034Swnj 			count--;
142034Swnj 		}
152034Swnj 		putc(fillch, file);
162034Swnj 		adjust++;
172034Swnj 	}
182034Swnj 	while (--count>=0)
192034Swnj 		putc(*string++, file);
202034Swnj 	while (adjust) {
212034Swnj 		putc(fillch, file);
222034Swnj 		adjust--;
232034Swnj 	}
242034Swnj }
25