Commit | Line | Data |
---|---|---|
2ce81398 DS |
1 | #if defined(LIBC_SCCS) && !defined(lint) |
2 | static 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) | |
8 | register char *string; | |
9 | register count; | |
10 | int adjust; | |
41e01b3e | 11 | register 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 | } |