|
|
1.1 root 1: static char *sccsid = "@(#)printf.c 4.1 10/9/80";
2:
3: /*
4: * Hacked "printf" which prints through putchar.
5: * DONT USE WITH STDIO!
6: */
7: printf(fmt, args)
8: char *fmt;
9: {
10: _doprnt(fmt, &args, 0);
11: }
12:
13: _strout(count, string, adjust, foo, fillch)
14: register char *string;
15: register int count;
16: int adjust;
17: register struct { int a[6]; } *foo;
18: {
19:
20: if (foo != 0)
21: abort();
22: while (adjust < 0) {
23: if (*string=='-' && fillch=='0') {
24: putchar(*string++);
25: count--;
26: }
27: putchar(fillch);
28: adjust++;
29: }
30: while (--count>=0)
31: putchar(*string++);
32: while (adjust) {
33: putchar(fillch);
34: adjust--;
35: }
36: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.