source:
buchla-68k/libcio/fprintf.c@
6262b5c
Last change on this file since 6262b5c was 6262b5c, checked in by , 7 years ago | |
---|---|
|
|
File size: 702 bytes |
Line | |
---|---|
1 | /* |
2 | ============================================================================= |
3 | fprintf.c -- fprintf function |
4 | Version 2 -- 1987-06-26 -- D.N. Lynx Crowe |
5 | ============================================================================= |
6 | */ |
7 | |
8 | #include "all.h" |
9 | |
10 | static FILE *Stream; |
11 | |
12 | extern int32_t dofmt_(int16_t (*putsub)(), int8_t *format, va_list args); |
13 | extern int16_t aputc(int16_t c, FILE *ptr); |
14 | |
15 | static int16_t fpsub(int16_t c); |
16 | |
17 | int16_t fprintf(FILE *stream, int8_t *fmt, ...) |
18 | { |
19 | register int16_t count; |
20 | va_list aptr; |
21 | |
22 | Stream = stream; |
23 | va_start(aptr, fmt); |
24 | count = dofmt_(fpsub, fmt, aptr); |
25 | va_end(aptr); |
26 | return(count); |
27 | } |
28 | |
29 | static int16_t fpsub(int16_t c) |
30 | { |
31 | return(aputc(c, Stream)); |
32 | } |
33 |
Note:
See TracBrowser
for help on using the repository browser.