1 /*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * %sccs.include.redist.c% 9 */ 10 11 #if defined(LIBC_SCCS) && !defined(lint) 12 static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 06/04/93"; 13 #endif /* LIBC_SCCS and not lint */ 14 15 #include <stdio.h> 16 #if __STDC__ 17 #include <stdarg.h> 18 #else 19 #include <varargs.h> 20 #endif 21 22 #if __STDC__ 23 fprintf(FILE *fp, const char *fmt, ...) 24 #else 25 fprintf(fp, fmt, va_alist) 26 FILE *fp; 27 char *fmt; 28 va_dcl 29 #endif 30 { 31 int ret; 32 va_list ap; 33 34 #if __STDC__ 35 va_start(ap, fmt); 36 #else 37 va_start(ap); 38 #endif 39 ret = vfprintf(fp, fmt, ap); 40 va_end(ap); 41 return (ret); 42 } 43