xref: /csrg-svn/lib/libc/stdio/fprintf.c (revision 61180)
146080Sbostic /*-
2*61180Sbostic  * Copyright (c) 1990, 1993
3*61180Sbostic  *	The Regents of the University of California.  All rights reserved.
432990Sbostic  *
546080Sbostic  * This code is derived from software contributed to Berkeley by
646080Sbostic  * Chris Torek.
746080Sbostic  *
842632Sbostic  * %sccs.include.redist.c%
921405Sdist  */
1021405Sdist 
1126648Sdonn #if defined(LIBC_SCCS) && !defined(lint)
12*61180Sbostic static char sccsid[] = "@(#)fprintf.c	8.1 (Berkeley) 06/04/93";
1332990Sbostic #endif /* LIBC_SCCS and not lint */
1421405Sdist 
1532990Sbostic #include <stdio.h>
1646080Sbostic #if __STDC__
1746080Sbostic #include <stdarg.h>
1846080Sbostic #else
1946080Sbostic #include <varargs.h>
2046080Sbostic #endif
212005Swnj 
2246080Sbostic #if __STDC__
fprintf(FILE * fp,const char * fmt,...)2346080Sbostic fprintf(FILE *fp, const char *fmt, ...)
2446080Sbostic #else
2546080Sbostic fprintf(fp, fmt, va_alist)
2646080Sbostic 	FILE *fp;
2732990Sbostic 	char *fmt;
2846080Sbostic 	va_dcl
2946080Sbostic #endif
302005Swnj {
3146080Sbostic 	int ret;
3246080Sbostic 	va_list ap;
3316439Sralph 
3446080Sbostic #if __STDC__
3546080Sbostic 	va_start(ap, fmt);
3646080Sbostic #else
3746080Sbostic 	va_start(ap);
3846080Sbostic #endif
3946080Sbostic 	ret = vfprintf(fp, fmt, ap);
4046080Sbostic 	va_end(ap);
4146080Sbostic 	return (ret);
422005Swnj }
43