source:
buchla-68k/libcio/fprintf.c@
a8c6a0e
| Last change on this file since a8c6a0e was 7af8be4, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 581 bytes | |
| Rev | Line | |
|---|---|---|
| [f40a309] | 1 | /* |
| 2 | ============================================================================= | |
| 3 | fprintf.c -- fprintf function | |
| 4 | Version 2 -- 1987-06-26 -- D.N. Lynx Crowe | |
| 5 | ============================================================================= | |
| 6 | */ | |
| 7 | ||
| [b28a12e] | 8 | #include "ram.h" |
| [f40a309] | 9 | |
| 10 | static FILE *Stream; | |
| 11 | ||
| [b28a12e] | 12 | static int16_t fpsub(int16_t c); |
| [df097bf] | 13 | |
| [7258c6a] | 14 | int16_t fprintf(FILE *stream, int8_t *fmt, ...) |
| [f40a309] | 15 | { |
| [7258c6a] | 16 | register int16_t count; |
| [f40a309] | 17 | va_list aptr; |
| 18 | ||
| 19 | Stream = stream; | |
| [bfc0072] | 20 | va_start(aptr, fmt); |
| [ab83141] | 21 | count = dofmt_(fpsub, fmt, aptr); |
| [f40a309] | 22 | va_end(aptr); |
| 23 | return(count); | |
| 24 | } | |
| 25 | ||
| [7258c6a] | 26 | static int16_t fpsub(int16_t c) |
| [f40a309] | 27 | { |
| 28 | return(aputc(c, Stream)); | |
| 29 | } |
Note:
See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](http://bob.lopatic.de/chrome/site/logo.png)