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

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

Added include files for global functions and variables.

  • Property mode set to 100644
File size: 702 bytes
RevLine 
[f40a309]1/*
2 =============================================================================
3 fprintf.c -- fprintf function
4 Version 2 -- 1987-06-26 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[6262b5c]8#include "all.h"
[f40a309]9
10static FILE *Stream;
11
[7258c6a]12extern int32_t dofmt_(int16_t (*putsub)(), int8_t *format, va_list args);
13extern int16_t aputc(int16_t c, FILE *ptr);
[f40a309]14
[7258c6a]15 static int16_t fpsub(int16_t c);
[df097bf]16
[7258c6a]17int16_t fprintf(FILE *stream, int8_t *fmt, ...)
[f40a309]18{
[7258c6a]19 register int16_t count;
[f40a309]20 va_list aptr;
21
22 Stream = stream;
[bfc0072]23 va_start(aptr, fmt);
[ab83141]24 count = dofmt_(fpsub, fmt, aptr);
[f40a309]25 va_end(aptr);
26 return(count);
27}
28
[7258c6a]29static int16_t fpsub(int16_t c)
[f40a309]30{
31 return(aputc(c, Stream));
32}
[6262b5c]33
Note: See TracBrowser for help on using the repository browser.