Last change
on this file since 0170798 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
684 bytes
|
Rev | Line | |
---|
[3ae31e9] | 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"
|
---|
| 10 | #include "varargs.h"
|
---|
| 11 |
|
---|
| 12 | static FILE *Stream;
|
---|
| 13 |
|
---|
| 14 | extern int _dofmt();
|
---|
| 15 | extern int aputc();
|
---|
| 16 |
|
---|
| 17 | int
|
---|
| 18 | fprintf(stream, fmt, va_alist)
|
---|
| 19 | FILE *stream;
|
---|
| 20 | char *fmt;
|
---|
| 21 | va_dcl
|
---|
| 22 | {
|
---|
| 23 | register int count;
|
---|
| 24 | int fpsub();
|
---|
| 25 | va_list aptr;
|
---|
| 26 |
|
---|
| 27 | Stream = stream;
|
---|
| 28 | va_start(aptr);
|
---|
| 29 | count = _dofmt(fpsub, fmt, aptr);
|
---|
| 30 | va_end(aptr);
|
---|
| 31 | return(count);
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | static
|
---|
| 35 | int
|
---|
| 36 | fpsub(c)
|
---|
| 37 | {
|
---|
| 38 | return(aputc(c, Stream));
|
---|
| 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.