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