/*
 * A quickly hacked together vprintf for systems that don't have one.
 *
 * Like, for example, BSD 4.3 systems
 */

#ifdef NEED_VPRINTF
#include <stdio.h>
#include <varargs.h>

vprintf(fmt, ap)
	char 		*fmt;
	va_list 	ap;
{
        int len;
        char buf[BUFSIZ];

        if (stdout->_flag & _IONBF) {
                stdout->_flag &= ~_IONBF;
                stdout->_base = stdout->_ptr = buf;
                len = _doprnt(fmt, ap, stdout);
                (void) fflush(stdout);
                stdout->_flag |= _IONBF;
                stdout->_base = 0;
		stdout->_bufsiz = stdout->_cnt = 0;
        } else
                len = _doprnt(fmt, ap, stdout);

        return (ferror(stdout) ? EOF : len);
}
#endif
