/* ============================================================================= fprintf.c -- fprintf function Version 2 -- 1987-06-26 -- D.N. Lynx Crowe ============================================================================= */ #include "stdio.h" #include "stddefs.h" #include "stdarg.h" static FILE *Stream; extern int _dofmt(); extern int aputc(); static int fpsub(); int fprintf(FILE *stream, char *fmt, ...) { register int count; va_list aptr; Stream = stream; va_start(aptr, fmt); count = _dofmt(fpsub, fmt, aptr); va_end(aptr); return(count); } static int fpsub(c) int c; { return(aputc(c, Stream)); }