Last change
on this file since 392c73c was bfc0072, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
varargs.h -> stdarg.h.
|
-
Property mode
set to
100644
|
File size:
638 bytes
|
Rev | Line | |
---|
[f40a309] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | fprintf.c -- fprintf function
|
---|
| 4 | Version 2 -- 1987-06-26 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #include "stdio.h"
|
---|
| 9 | #include "stddefs.h"
|
---|
[bfc0072] | 10 | #include "stdarg.h"
|
---|
[f40a309] | 11 |
|
---|
| 12 | static FILE *Stream;
|
---|
| 13 |
|
---|
| 14 | extern int _dofmt();
|
---|
| 15 | extern int aputc();
|
---|
| 16 |
|
---|
[df097bf] | 17 | static int fpsub();
|
---|
| 18 |
|
---|
[bfc0072] | 19 | int fprintf(FILE *stream, char *fmt, ...)
|
---|
[f40a309] | 20 | {
|
---|
| 21 | register int count;
|
---|
| 22 | va_list aptr;
|
---|
| 23 |
|
---|
| 24 | Stream = stream;
|
---|
[bfc0072] | 25 | va_start(aptr, fmt);
|
---|
[f40a309] | 26 | count = _dofmt(fpsub, fmt, aptr);
|
---|
| 27 | va_end(aptr);
|
---|
| 28 | return(count);
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | static
|
---|
| 32 | int
|
---|
| 33 | fpsub(c)
|
---|
[73dd55f] | 34 | int c;
|
---|
[f40a309] | 35 | {
|
---|
| 36 | return(aputc(c, Stream));
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.