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

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

Use standard integer types.

  • Property mode set to 100644
File size: 744 bytes
Line 
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 "stdarg.h"
11
12static FILE *Stream;
13
14extern int32_t dofmt_(int16_t (*putsub)(), int8_t *format, va_list args);
15extern int16_t aputc(int16_t c, FILE *ptr);
16
17 static int16_t fpsub(int16_t c);
18
19int16_t fprintf(FILE *stream, int8_t *fmt, ...)
20{
21 register int16_t count;
22 va_list aptr;
23
24 Stream = stream;
25 va_start(aptr, fmt);
26 count = dofmt_(fpsub, fmt, aptr);
27 va_end(aptr);
28 return(count);
29}
30
31static int16_t fpsub(int16_t c)
32{
33 return(aputc(c, Stream));
34}
Note: See TracBrowser for help on using the repository browser.