1*46095Sbostic /*- 2*46095Sbostic * Copyright (c) 1990 The Regents of the University of California. 332991Sbostic * All rights reserved. 432991Sbostic * 5*46095Sbostic * This code is derived from software contributed to Berkeley by 6*46095Sbostic * Chris Torek. 7*46095Sbostic * 842633Sbostic * %sccs.include.redist.c% 932991Sbostic */ 1032991Sbostic 1126657Sdonn #if defined(LIBC_SCCS) && !defined(lint) 12*46095Sbostic static char sccsid[] = "@(#)printf.c 5.6 (Berkeley) 01/20/91"; 1332991Sbostic #endif /* LIBC_SCCS and not lint */ 1422139Smckusick 1532991Sbostic #include <stdio.h> 16*46095Sbostic #if __STDC__ 17*46095Sbostic #include <stdarg.h> 18*46095Sbostic #else 19*46095Sbostic #include <varargs.h> 20*46095Sbostic #endif 212025Swnj 22*46095Sbostic #if __STDC__ 23*46095Sbostic printf(char const *fmt, ...) 24*46095Sbostic #else 25*46095Sbostic printf(fmt, va_alist) 2632991Sbostic char *fmt; 27*46095Sbostic va_dcl 28*46095Sbostic #endif 292025Swnj { 30*46095Sbostic int ret; 31*46095Sbostic va_list ap; 3232991Sbostic 33*46095Sbostic #if __STDC__ 34*46095Sbostic va_start(ap, fmt); 35*46095Sbostic #else 36*46095Sbostic va_start(ap); 37*46095Sbostic #endif 38*46095Sbostic ret = vfprintf(stdout, fmt, ap); 39*46095Sbostic va_end(ap); 40*46095Sbostic return (ret); 412025Swnj } 42