source: buchla-68k/libcio/fprintf.c@ c59409e

Last change on this file since c59409e was 7af8be4, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Prototypes for formatted I/O.

  • Property mode set to 100644
File size: 581 bytes
RevLine 
[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
10static FILE *Stream;
11
[b28a12e]12static int16_t fpsub(int16_t c);
[df097bf]13
[7258c6a]14int16_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]26static int16_t fpsub(int16_t c)
[f40a309]27{
28 return(aputc(c, Stream));
29}
Note: See TracBrowser for help on using the repository browser.