xref: /csrg-svn/lib/libc/stdio/printf.c (revision 32991)
1*32991Sbostic /*
2*32991Sbostic  * Copyright (c) 1987 Regents of the University of California.
3*32991Sbostic  * All rights reserved.
4*32991Sbostic  *
5*32991Sbostic  * Redistribution and use in source and binary forms are permitted
6*32991Sbostic  * provided that this notice is preserved and that due credit is given
7*32991Sbostic  * to the University of California at Berkeley. The name of the University
8*32991Sbostic  * may not be used to endorse or promote products derived from this
9*32991Sbostic  * software without specific prior written permission. This software
10*32991Sbostic  * is provided ``as is'' without express or implied warranty.
11*32991Sbostic  */
12*32991Sbostic 
1326657Sdonn #if defined(LIBC_SCCS) && !defined(lint)
14*32991Sbostic static char sccsid[] = "@(#)printf.c	5.3 (Berkeley) 12/12/87";
15*32991Sbostic #endif /* LIBC_SCCS and not lint */
1622139Smckusick 
17*32991Sbostic #include <stdio.h>
182025Swnj 
192025Swnj printf(fmt, args)
20*32991Sbostic 	char *fmt;
21*32991Sbostic 	int args;
222025Swnj {
23*32991Sbostic 	int len;
24*32991Sbostic 
25*32991Sbostic 	len = _doprnt(fmt, &args, stdout);
26*32991Sbostic 	return(ferror(stdout) ? EOF : len);
272025Swnj }
28